WO2019042180A1 - Resource allocation method and related product - Google Patents

Resource allocation method and related product Download PDF

Info

Publication number
WO2019042180A1
WO2019042180A1 PCT/CN2018/101352 CN2018101352W WO2019042180A1 WO 2019042180 A1 WO2019042180 A1 WO 2019042180A1 CN 2018101352 W CN2018101352 W CN 2018101352W WO 2019042180 A1 WO2019042180 A1 WO 2019042180A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame rate
target application
policy
module
resource
Prior art date
Application number
PCT/CN2018/101352
Other languages
French (fr)
Chinese (zh)
Inventor
程杰
陈岩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019042180A1 publication Critical patent/WO2019042180A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present application relates to the field of mobile terminal technologies, and in particular, to a resource configuration method and related products.
  • the embodiment of the present application provides a resource configuration method and related products, which can improve performance and stability of a target application of a mobile terminal during operation.
  • the embodiment of the present application provides a resource configuration method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, where the operating system includes a management module and multiple policy modules. Each policy module is used to determine a performance improvement policy for an application; the method includes:
  • the management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application;
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules
  • the operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
  • the embodiment of the present application provides a resource configuration apparatus, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, where the resource configuration device includes a processing unit and a communication unit.
  • the processing unit is configured to control a scenario data packet sent by the management module by a target application that is running by the communication unit, where the scenario data packet includes an application identifier and frame rate information of a target application; and is used for controlling
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and a performance improvement policy for controlling the policy module to determine the target application according to the frame rate information; Controlling the operating system to adjust allocation of system resources of the target application according to the performance improvement policy.
  • an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory, and are configured by The processor executes, the program comprising instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute as implemented in the present application.
  • the computer comprises a mobile terminal.
  • an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Apply some or all of the steps described in any of the methods of the first aspect of the embodiments.
  • the computer program product can be a software installation package, the computer comprising a mobile terminal.
  • 1A is a schematic diagram of a program running space of a smart phone
  • 1B is a system architecture diagram of an Android system
  • FIG. 2 is a schematic flowchart of a resource configuration method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a resource configuration method according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a resource configuration method according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 6 is a block diagram of a functional unit of a mobile terminal disclosed in an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the mobile terminal involved in the embodiments of the present application may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user devices (User Equipment, UE), mobile station (MS), terminal device, and the like.
  • user devices User Equipment, UE
  • MS mobile station
  • terminal device terminal device, and the like.
  • the operating system involved in the embodiments of the present invention is a software system that uniformly manages hardware resources and provides a service interface to users.
  • a mobile terminal such as a smart phone is generally provided with a program running space, and the program running space includes a user space and an operating system space, wherein the user space runs one or more applications, and the one or more applications
  • the program is a third-party application installed on the mobile terminal, and the operating system space runs an operating system with the mobile terminal.
  • the mobile terminal can specifically run the Android Android system, the mobile operating system iOS developed by Apple, etc., and is not limited herein.
  • the mobile terminal runs an Android system as an example, and the corresponding user space includes an application layer in the Android system, and the operating system space may include an application framework layer in the Android system.
  • the application layer includes various types of applications that directly interact with the user, or a service program written in the Java language and running in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) text messages, phone dialing, picture browsers, calendars, games, maps, World Wide Web (Web) browsers, etc. Programs, as well as other applications developed by developers.
  • SMS Short Messaging Service
  • the application framework layer provides a set of libraries needed to develop Android applications, which can be used to reuse components, or to extend personalization through inheritance.
  • the system runtime layer is the support of the application framework, providing services for the various components in the Android system.
  • the system runtime layer consists of the system class library and the Android runtime.
  • the Android runtime consists of a core library and a Dalvik virtual machine.
  • the Linux kernel layer is used to implement core functions such as hardware device driver, process and memory management, network protocol stack, power management, and wireless communication.
  • the process created by the third-party application is initially run in the user space.
  • it wants to perform operations such as sending data and reading disk resources on the network, it must call standard interface functions provided by the operating system, such as write and send.
  • the CPU calls the code of the operating system space to complete the user's request operation.
  • third-party applications want to call the functions provided by the operating system and can only call the standard interface functions they provide.
  • the operating system does not know which functions are actually executed by the third-party application, and the target application cannot command the operating system to perform special operations.
  • the two are independent of each other, which makes the operating system unable to distinguish the internal running scenario of the target application. It can only be adapted using a standard set of parameters, and it is not possible to perform targeted performance optimization for the internal running scenario of the target application.
  • the embodiment of the present application provides a resource configuration method for a target application of a mobile terminal, where the management module receives a scenario data packet sent by a running target application, and the scenario data package includes a target application.
  • the allocation of system resources Optimizing the performance of the internal running scenario of the target application during the running process by the operating system is beneficial to improving the real-time and accuracy of the performance optimization of the mobile terminal controlling the target application.
  • FIG. 2 is a schematic flowchart of a resource configuration method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more applications, where the operating system includes A management module and a plurality of policy modules, each of which is used to determine a performance improvement policy of an application.
  • the resource configuration method includes:
  • the management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
  • the target application refers to a third-party application installed in the user space of the mobile terminal, and the third-party application may be a game-like application, and the third-party game application may be installed by the user or by the developer.
  • the mobile terminal is pre-installed at the factory, and is not limited here.
  • the scene data packet includes frame rate information of an internal running scenario when the target application is running.
  • the frame rate information includes a frame rate of a display interface of the game application.
  • the maximum frame rate of the display interface of the game application is generally limited to 60 frames, but the operating system cannot obtain the frame rate information of the display interface, and the game application can package the frame rate information in the data packet after acquiring the current frame rate information.
  • the management module sent to the operating system.
  • the scenario data packet may include the game application identifier and the frame rate information of the running target application, and may further include at least one of the following: a key performance parameter, a data format identifier, a startup information, a resource update information, an account login information, and an interface.
  • Type information, behavior information of the target application (such as data transmission behavior information, data reception behavior information, etc.), etc., are not limited herein.
  • the format of the scene data packet may be, for example, a Java Object Object Notation (JSON), a protocol buffer (ProtocolBuffer, Protobuf), a custom format, and the like, and is not limited herein.
  • the internal running scenario may be divided according to different preset conditions. For example, according to whether there is user interaction, the internal running scenario may be divided into an interactive scenario and a non-interactive scenario, or may be divided into a single user scenario and multiple users according to the complexity of the task.
  • the scenario is divided into a startup scenario, a resource update scenario, an account login scenario, a mall scenario, and a main interface scenario according to different behaviors.
  • the target application includes a data connection module
  • the operating system includes a data connection management module
  • the data connection management module establishes a preset data channel with the data connection module
  • the management module receives
  • the scenario data packet sent by the running target application includes: the management module receiving, by using the preset data channel, a scenario data packet sent by the target application.
  • the preset data channel is an effective data transmission link established between the target application and the operating system when the target application is running, and the data transmission link is cleared after the target application is not running.
  • the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, wherein the data collection module is configured to collect key information of the target application at runtime;
  • the module is used to sort the collected key information, such as merging duplicate information, deleting redundant information, etc.;
  • the priority management module is used to classify the collected key information according to the importance of the key information, and prioritize the high priority. Key information, filtering key information with lower priority, or reducing the use of lower priority key information during packet generation;
  • data receiving module is used to receive and parse the data sent by the operating system and deliver it to the target Inside the application.
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules.
  • Each of the multiple policy modules may be applicable to one application, and the multiple policy modules correspond to multiple different applications.
  • the first policy module is applicable to the first game application
  • the second policy module is applicable to the second game application or the like.
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and the management module uses the application identifier as a query identifier to query a mapping between a preset policy module and an application identifier. Relationship, determining a policy module corresponding to the application identifier in the scenario data packet.
  • the policy module determines, according to the frame rate information, a performance improvement policy of the target application.
  • the performance improvement policy refers to a resource configuration policy, such as a CPU resource adjustment policy, a GPU resource adjustment policy, a memory bandwidth resource adjustment policy, a disk resource adjustment policy, and a network resource, for improving the running performance of the running target application. Adjustment strategies, etc., are not limited here.
  • the operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
  • the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
  • the network resources include network resources of the data network of the mobile terminal, network resources of the wireless fidelity Wi-Fi network, and control parameter resources of the Bluetooth module.
  • the operating system can communicate with the kernel layer of the operating system space through direct connection communication, and adjust the configuration of the system resource.
  • Direct communication means direct communication through an abstract Application Programming Interface (API).
  • API Application Programming Interface
  • the operating system can communicate with the kernel layer of the operating system space through indirect communication to adjust the configuration of the system resource, and the indirect communication mode refers to indirect communication by calling a proxy service, such as a network.
  • a proxy service such as a network.
  • the Wi-Fi subsystem or the data network subsystem in the resource does not run in the same system as the operating system. It needs to access these system resources indirectly through some proxy methods.
  • the Wi-Fi proxy service is provided in the operating system. The interface of the proxy service is invoked to communicate indirectly with the Wi-Fi subsystem.
  • the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application.
  • the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
  • the policy module determines a performance promotion policy of the target application according to the frame rate information, including: the policy module determines a system resource to be adjusted corresponding to the frame rate information; The policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  • the policy module may query the corresponding relationship between the preset frame rate information and the resource to obtain the system resource to be adjusted, and the corresponding relationship may include, for example, a correspondence between the frame rate and the GPU resource, or a frame rate and a resource.
  • the correspondence between combinations for example, CPU resources and GPU resources is not limited here.
  • the resource associated with the frame rate information is a system resource to be adjusted, and the performance improvement strategy of the target application can be further determined according to the system resource to be adjusted, which is beneficial to improving the accuracy of the mobile terminal controlling the target application for optimization.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the frame rate information includes a current frame rate value of the target application, that is, the number of frames displayed per second.
  • the frame rate of the game application is generally limited to 60 frames, and the preset frame rate value may be a value less than 60, for example, 50.
  • a frame when detecting a frame rate value of the current display interface of the game application is less than 50 frames, calculating a difference between the frame rate value and the preset frame rate value, and the policy module determines, according to the difference, an adjustment amount of the resource to be adjusted, where
  • the adjustment amount can be calculated by a preset formula. Specifically, the larger the difference is, the larger the adjustment amount is, or the difference is the query identifier, and the mapping relationship between the preset difference and the adjustment amount is determined.
  • the adjustment amount corresponding to the difference is an adjustment amount of the system resource to be adjusted.
  • the policy module determines the to-be-adjusted resource corresponding to the frame rate information when the frame rate value is lower than the preset frame rate value.
  • the resource to be adjusted may be a CPU resource, such as a CPU quantity and frequency, or a memory resource, or a disk. Resources to increase the game frame rate and improve the user experience.
  • the amount of adjustment can further determine the performance improvement strategy of the target application, which is beneficial to improve the accuracy of the mobile terminal to control the target application for optimization.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application; the policy module determines a reference frame rate interval to which the frame rate value belongs; and the policy module searches between a preset frame rate interval and an adjustment amount of a system resource to be adjusted The mapping relationship determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • each reference frame rate interval corresponds to an adjustment amount of system resources to be adjusted, and a mapping relationship between adjustment amounts of system resources whose frame rate interval is very hot to be adjusted is formed.
  • the policy module may determine the reference frame rate interval to which the frame rate value belongs, by searching for a preset frame rate interval and system resources to be adjusted.
  • the mapping relationship between the adjustment amounts determines the adjustment amount of the system resource to be adjusted corresponding to the reference interval.
  • the frame rate information includes a current frame rate value of the target application, and the reference frame rate interval corresponding to the frame rate value is determined, and the adjustment amount of the system resource to be adjusted corresponding to the frame rate value is further determined. It is beneficial to improve the accuracy of the mobile terminal control target application for running optimization.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determining, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines, between the frame rate value and the preset frame rate value, when detecting that the frame rate value is higher than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the operating system may downgrade the system resources of the target application, such as reducing the allocation of the corresponding system resources to reduce the frame rate,
  • the target application's frame rate can be stabilized within a preset frame rate range, optimizing the power consumption of the target application, which is beneficial to enhance the user experience.
  • determining the system resource to be adjusted by determining the difference between the frame rate value and the preset frame rate value can further determine the performance improvement strategy of the target application, which is beneficial to improve the accuracy of the mobile terminal to control the target application for optimization.
  • the method before the management module receives the scenario data packet sent by the target application that is running, the method further includes: the management module sending the first data format to the target application, where The first data format is used by the target application to convert the second data format of the scene data packet to the first data format.
  • the data format identifier may be, for example, the JSON, Protobuf, etc., which is not limited herein.
  • the management module parses the scene data packet according to the data format indicated by the first data format identifier, determines the game application type identifier of the target application, and the game loading scene identifier, and The policy module sends the game application type identifier and the game loading scene identifier; it can be seen that the management module uniformly processes the scene data packet, and the policy module only needs to directly receive the processing result of the management module, so that the setting is beneficial to the lightweighting and The function of the refined policy module facilitates maintenance, addition, and other operations on the policy module to improve system stability.
  • the application identifier and the scene identifier cannot be correctly determined due to the format difference, which is beneficial to improving the success rate of the mobile terminal for performing accurate resource configuration for the running target application.
  • the target application and the operating system agree on a specific data format to transmit the scenario data packet, so that after receiving the scenario data packet, the operating system can analyze the application identifier and the scenario identifier in the scenario data packet in real time, and reduce Processing delays is beneficial to improve data processing efficiency and improve real-time resource adjustment for target applications in operation.
  • FIG. 3 is a schematic flowchart of a resource configuration method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where an operating system runs on the mobile terminal. And one or more applications, the operating system includes a management module and a plurality of policy modules, each of which is used to determine a performance improvement policy of an application.
  • the resource configuration method includes:
  • the management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules.
  • the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application.
  • the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value.
  • the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted.
  • the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
  • the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application.
  • the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
  • the mobile terminal does not need to load all the policy modules at the same time, and only needs to load the policy module corresponding to the target application running in the foreground of the mobile terminal, which is beneficial to reducing the mobile terminal.
  • Resource utilization improve resource utilization and control efficiency.
  • FIG. 4 is a schematic flowchart of a resource configuration method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where the mobile terminal runs.
  • An operating system and one or more target applications the operating system including a management module, a plurality of policy modules, and a data connection management module, each policy module for determining a performance improvement policy of an application, the target application
  • the data connection module is included, and the scene data package includes a game application type identifier and a game loading scene identifier of the target application, and the scene data package includes a data format identifier.
  • the resource configuration method includes:
  • the data connection management module establishes a data channel with the data connection module.
  • the data connection management module receives, by using the data channel, a scenario data packet sent by the target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
  • the management module determines a policy module corresponding to the application identifier in the multiple policy modules.
  • the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application.
  • the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value.
  • the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted.
  • the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
  • the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application.
  • the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
  • the mobile terminal does not need to load all the policy modules at the same time, and only needs to load the policy module corresponding to the target application running in the foreground of the mobile terminal, which is beneficial to reducing the mobile terminal.
  • Resource utilization improve resource utilization and control efficiency.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • the mobile terminal runs one or more An application and an operating system, as shown, the mobile terminal includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are different from the one or more applications, and The one or more programs are stored in the memory and are configured to be executed by the processor, the program including instructions for performing the following steps:
  • the allocation of system resources of the target application is adjusted according to the performance improvement policy.
  • the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application.
  • the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
  • the instructions in the program are specifically configured to: control the policy module to determine a system resource to be adjusted corresponding to the frame rate information; and controlling the policy module to determine a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application; the policy module determines a reference frame rate interval to which the frame rate value belongs; and the policy module searches between a preset frame rate interval and an adjustment amount of a system resource to be adjusted The mapping relationship determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is higher than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
  • the target application includes a data connection module
  • the operating system includes a data connection management module
  • the data connection management module establishes a preset data channel with the data connection module
  • the management module receives
  • the scenario data packet sent by the running target application includes: the management module receiving, by using the preset data channel, a scenario data packet sent by the target application.
  • the method before the management module receives the scenario data packet sent by the target application that is running, the method further includes: the management module sending the first data format to the target application, where The first data format is used by the target application to convert the second data format of the scene data packet to the first data format.
  • the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, where the data collection module is configured to collect key information of the target application at runtime.
  • the data collation module is configured to sort the collected key information
  • the priority management module is configured to classify the collected key information according to the importance degree of the key information, and preferentially process the key information with high priority, and the filtering priority is compared.
  • Low key information, or the use of lower priority key information during the packet generation process which is used to receive and parse the data sent by the operating system and pass it to the target application.
  • the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
  • the mobile terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the functions.
  • the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for each particular application to implement the described functionality, but such implementation should not be considered to be beyond the scope of the application.
  • the embodiment of the present application may divide a functional unit into a mobile terminal according to the method example.
  • each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit.
  • the integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 6 shows a block diagram of one possible functional unit composition of the resource configuration apparatus involved in the embodiment.
  • the resource configuration device 600 is applied to a mobile terminal on which an operating system and one or more applications are run.
  • the resource configuration device 600 includes a processing unit 602 and a communication unit 603.
  • the processing unit 602 is configured to perform control management on the action of the resource configuration apparatus.
  • the processing unit 602 is configured to support the resource configuration apparatus to perform steps S201-S203 in FIG. 2, steps S301-S307 in FIG. 3, and steps in FIG. S401-S408 and/or other processes for the techniques described herein.
  • the resource configuration device may further include a storage unit 601 for storing program codes and data.
  • the processing unit 602 is configured to control, by the management module, the scenario data packet sent by the running target application by the communication unit 603, where the scenario data packet includes an application identifier and frame rate information of the target application; And the control module is configured to determine a policy module corresponding to the application identifier in the multiple policy modules; and a performance improvement policy for controlling the policy module to determine the target application according to the frame rate information; And for controlling the operating system to adjust the allocation of system resources of the target application according to the performance improvement policy.
  • the processing unit 602 is specifically configured to: control the policy module to determine the frame rate information, where the policy module determines a performance improvement policy of the target application according to the frame rate information. Corresponding system resources to be adjusted; and controlling the policy module to determine a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  • the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information. Determining, by the policy module, a frame rate value of the current interface of the target application according to the frame rate information; and controlling the policy module to determine the frame rate value when detecting that the frame rate value is lower than a preset frame rate value And a difference between the predetermined frame rate value; and controlling the policy module to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy module to generate according to the adjustment amount The performance improvement strategy of the target application.
  • the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  • the policy module determines a frame rate value of the current interface of the target application according to the frame rate information; and controls the policy module to determine a reference frame rate interval to which the frame rate value belongs; and controls the policy module to search for a preset And a mapping relationship between the frame rate interval and the adjustment amount of the system resource to be adjusted, and determining an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. And controlling the policy module to generate a performance improvement policy of the target application according to the adjustment amount.
  • the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information. Determining, by the policy module, a frame rate value of the current interface of the target application according to the frame rate information; and controlling the policy module to determine the frame rate value and when detecting that the frame rate value is higher than a preset frame rate value a difference between the preset frame rate values; and controlling, by the policy module, to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy module to generate, according to the adjustment amount A performance improvement strategy for the target application.
  • the target application includes a data connection module
  • the operating system includes a data connection management module
  • the data connection management module establishes a preset data channel with the data connection module
  • the processing unit 602 is specifically configured to: control, by the management module, the scenario data packet sent by the target application by using the preset data channel, in the aspect of receiving the scenario data packet sent by the running target application.
  • the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, where the data collection module is configured to collect key information of the target application at runtime.
  • the data collation module is configured to sort the collected key information
  • the priority management module is configured to classify the collected key information according to the importance degree of the key information, and preferentially process the key information with high priority, and the filtering priority is compared.
  • Low key information, or the use of lower priority key information during the packet generation process which is used to receive and parse the data sent by the operating system and pass it to the target application.
  • the processing unit 602 is further configured to control the management module to the target
  • the application sends a first data format, the first data format being used by the target application to convert the second data format of the scene data packet to the first data format.
  • the target application includes a data connection module, and the operating system includes a data connection management module.
  • the resource configuration device further includes a channel establishment unit, and the channel establishment unit is configured to control the data connection management module and the data.
  • the connection module establishes the preset data channel.
  • the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
  • the processing unit 602 may be a processor or a controller
  • the communication unit 603 may be an internal communication interface between the processor and the program running space, such as a communication interface between the processor and the operating system space, or a communication between the processor and the user space.
  • the interface or the like, the storage unit 601 may be a memory.
  • FIG. 7 is a schematic structural diagram of a smart phone 700.
  • the smart phone 700 includes a housing 710, a touch display screen 720, a main board 730, a battery 740, and a sub-board 750.
  • the main board 730 is provided with a front camera 731, a processor 732, a memory 733, a power management chip 734, and the like.
  • the sub board is provided with a vibrator 751, an integrated sound chamber 752, a VOOC flash charging interface 753, and a fingerprint recognition module 754.
  • the smart phone includes a target application and an operating system, the target application runs in a user space, and the operating system runs in an operating system space.
  • the operating system includes a management module and a plurality of policy modules, and each policy module is used to determine an application. Performance improvement strategy.
  • the management module receives the scenario data packet sent by the running target application, the scenario data packet includes the application identifier and the frame rate information of the target application, and the management module determines a policy module corresponding to the application identifier among the multiple policy modules; the policy module is configured according to the frame
  • the rate information determines a performance improvement policy of the target application; the operating system adjusts the allocation of system resources of the target application according to the performance improvement policy.
  • the processor 732 is a control center of the smartphone, and connects various parts of the entire smartphone by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 733, and calling the storage in the memory 733.
  • the processor 732 may include one or more processing units; preferably, the processor 732 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the modem processor may also not be integrated into the processor 732.
  • the processor 732 can be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and field programmable. Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the memory 733 can be used to store software programs and modules, and the processor 732 executes various functional applications and data processing of the smartphone by running software programs and modules stored in the memory 733.
  • the memory 733 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the smartphone, and the like.
  • the memory 733 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the memory 733 can be, for example, a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), and an electrically erasable memory.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • EEPROM Electrically erasable memory.
  • registers hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to execute part or all of any of the methods described in the method embodiment.
  • the computer includes a mobile terminal.
  • the embodiment of the present application further provides a computer program product, comprising: a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute as described in the method embodiment Part or all of the steps of either method.
  • the computer program product can be a software installation package, the computer comprising a mobile terminal.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory.
  • a computer readable memory A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed in the embodiments of the present application are a resource allocation method and a related product. The method comprises: a management module in an operating system of a mobile terminal receives a scene data packet sent by a currently running target application program, the scene data packet comprising an application identifier and frame rate information of the target application program; the management module determines a strategy module corresponding to the application identifier from among multiple strategy modules; the strategy module determines a performance improvement strategy for the target application program according to the frame rate information; and the operating system adjusts the allocation of system resources for the target application program according to the performance improvement strategy. The embodiments of the present application are beneficial for improving the real-time performance and precision of performance optimization carried out by a target application program under the control of a mobile terminal.

Description

资源配置方法及相关产品Resource allocation method and related products 技术领域Technical field
本申请涉及移动终端技术领域,具体涉及资源配置方法及相关产品。The present application relates to the field of mobile terminal technologies, and in particular, to a resource configuration method and related products.
背景技术Background technique
随着智能手机相关技术的快速发展,越来越多的应用被安装在用户手机中,如阅读类应用、支付类应用、游戏类应用、音乐类应用等,人们的衣食住行已经与手机密不可分。With the rapid development of smart phone related technologies, more and more applications are installed in user mobile phones, such as reading applications, payment applications, game applications, music applications, etc., people's clothing, food and shelter have been inseparable from mobile phones.
发明内容Summary of the invention
本申请实施例提供了资源配置方法及相关产品,可以提高移动终端的目标应用程序在运行过程中的性能和稳定性。The embodiment of the present application provides a resource configuration method and related products, which can improve performance and stability of a target application of a mobile terminal during operation.
第一方面,本申请实施例提供一种资源配置方法,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述操作***包括管理模块和多个策略模块,每个策略模块用于确定一个应用程序的性能提升策略;所述方法包括:In a first aspect, the embodiment of the present application provides a resource configuration method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, where the operating system includes a management module and multiple policy modules. Each policy module is used to determine a performance improvement policy for an application; the method includes:
所述管理模块接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;The management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application;
所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;The management module determines a policy module corresponding to the application identifier in the multiple policy modules;
所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;Determining, by the policy module, a performance improvement policy of the target application according to the frame rate information;
所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。The operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
第二方面,本申请实施例提供一种资源配置装置,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述资源配置装置包括处理单元和通信单元,In a second aspect, the embodiment of the present application provides a resource configuration apparatus, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, where the resource configuration device includes a processing unit and a communication unit.
所述处理单元,用于控制所述管理模块通过所述通信单元正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;以及用于控制所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;以及用于控制所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;以及用于控制所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。The processing unit is configured to control a scenario data packet sent by the management module by a target application that is running by the communication unit, where the scenario data packet includes an application identifier and frame rate information of a target application; and is used for controlling The management module determines a policy module corresponding to the application identifier in the multiple policy modules, and a performance improvement policy for controlling the policy module to determine the target application according to the frame rate information; Controlling the operating system to adjust allocation of system resources of the target application according to the performance improvement policy.
第三方面,本申请实施例提供一种移动终端,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。In a third aspect, an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory, and are configured by The processor executes, the program comprising instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤,所述计算机包括移动终端。In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute as implemented in the present application. In some or all of the steps described in any of the methods of the first aspect, the computer comprises a mobile terminal.
第五方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括移动终端。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Apply some or all of the steps described in any of the methods of the first aspect of the embodiments. The computer program product can be a software installation package, the computer comprising a mobile terminal.
附图说明DRAWINGS
下面将对本申请实施例所涉及到的附图作简单地介绍。The drawings referred to in the embodiments of the present application will be briefly described below.
图1A是一种智能手机的程序运行空间的示意图;1A is a schematic diagram of a program running space of a smart phone;
图1B是一种安卓***的***架构图;1B is a system architecture diagram of an Android system;
图2是本申请实施例提供的一种资源配置方法的流程示意图;2 is a schematic flowchart of a resource configuration method according to an embodiment of the present application;
图3是本申请实施例公开的一种资源配置方法的流程示意图;3 is a schematic flowchart of a resource configuration method according to an embodiment of the present application;
图4是本申请实施例公开的一种资源配置方法的流程示意图;4 is a schematic flowchart of a resource configuration method according to an embodiment of the present application;
图5是本申请实施例公开的一种移动终端的结构示意图;FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure;
图6是本申请实施例公开的一种移动终端的功能单元组成框图;6 is a block diagram of a functional unit of a mobile terminal disclosed in an embodiment of the present application;
图7是本申请实施例公开的一种智能手机的结构示意图。FIG. 7 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、***、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not intended to describe a particular order. Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or, optionally, Other steps or units inherent to these processes, methods, products, or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为移动终端。本发明实施例所涉及到的操作***是对硬件资源进行统一管理,并向用户提供业务接口的软件***。The mobile terminal involved in the embodiments of the present application may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user devices (User Equipment, UE), mobile station (MS), terminal device, and the like. For convenience of description, the devices mentioned above are collectively referred to as mobile terminals. The operating system involved in the embodiments of the present invention is a software system that uniformly manages hardware resources and provides a service interface to users.
如图1A所示,目前智能手机等移动终端一般设置有程序运行空间,该程序运行空间包括用户空间和操作***空间,其中,用户空间运行有一个或多个应用程序,该一个或多个应用程序为移动终端安装的第三方应用程序,操作***空间运行有移动终端的操作***。该移动终端具体可以运行安卓Android***、苹果公司开发的移动操作***iOS等,此处不做唯一限定。如图1B所示,以所述移动终端运行有Android***为例,对应的用户空间包括该Android***中的应用层(Applications),操作***空间可以包括该Android***中的应用程序框架层(Application Framework)、***运行库层(包括***运行库层Libraries和Android运行时Android Runtime)、Linux内核层(Linux Kernel)。其中,应用层上包括各类与用户直接交互的应用程序,或由Java语言编写的运行于后台的服务程序。例如,智能手机上实现的常见基本功能的程序,诸如短消息业务(Short Messaging Service,SMS)短信,电话拨号,图片浏览器,日历,游戏,地图,万维网(World Wide Web,Web)浏览器等程序,以及开发人员开发的其他应用程序。应用程序框架层提供开发Android应用程序所需的一系列类库,能够用于重用组件,也可以通过继承实现个性化的扩展。***运行库层是应用程序框架的支撑,为Android***中的各个组件提供服务。***运行库层由***类库和Android运行时构成。Android运行时包含核心库和Dalvik虚拟机两部分。Linux 内核层用于实现硬件设备驱动,进程和内存管理,网络协议栈,电源管理,无线通信等核心功能。As shown in FIG. 1A, a mobile terminal such as a smart phone is generally provided with a program running space, and the program running space includes a user space and an operating system space, wherein the user space runs one or more applications, and the one or more applications The program is a third-party application installed on the mobile terminal, and the operating system space runs an operating system with the mobile terminal. The mobile terminal can specifically run the Android Android system, the mobile operating system iOS developed by Apple, etc., and is not limited herein. As shown in FIG. 1B , the mobile terminal runs an Android system as an example, and the corresponding user space includes an application layer in the Android system, and the operating system space may include an application framework layer in the Android system. Framework), system runtime layer (including system runtime layer Libraries and Android runtime Android Runtime), Linux kernel layer (Linux Kernel). The application layer includes various types of applications that directly interact with the user, or a service program written in the Java language and running in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) text messages, phone dialing, picture browsers, calendars, games, maps, World Wide Web (Web) browsers, etc. Programs, as well as other applications developed by developers. The application framework layer provides a set of libraries needed to develop Android applications, which can be used to reuse components, or to extend personalization through inheritance. The system runtime layer is the support of the application framework, providing services for the various components in the Android system. The system runtime layer consists of the system class library and the Android runtime. The Android runtime consists of a core library and a Dalvik virtual machine. The Linux kernel layer is used to implement core functions such as hardware device driver, process and memory management, network protocol stack, power management, and wireless communication.
所述第三方应用程序所创建的进程一开始是运行在用户空间的,当它要执行网络发送数据、读取磁盘资源等动作时,必须通过调用write、send等由操作***提供的标准接口函数来完成,即由CPU调用操作***空间的代码来完成用户的请求操作。可见,第三方应用程序想要调用操作***提供的功能,只能调用其提供的标准接口函数。同时,操作***不知道第三方应用程序具体在执行哪些功能,目标应用程序也不能命令操作***执行特殊的操作,这两者是相互独立的,这使得操作***无法区分目标应用程序的内部运行场景,只能使用一套标准的参数去适配,无法针对目标应用程序的内部运行场景进行针对性的性能优化。The process created by the third-party application is initially run in the user space. When it wants to perform operations such as sending data and reading disk resources on the network, it must call standard interface functions provided by the operating system, such as write and send. To complete, that is, the CPU calls the code of the operating system space to complete the user's request operation. It can be seen that third-party applications want to call the functions provided by the operating system and can only call the standard interface functions they provide. At the same time, the operating system does not know which functions are actually executed by the third-party application, and the target application cannot command the operating system to perform special operations. The two are independent of each other, which makes the operating system unable to distinguish the internal running scenario of the target application. It can only be adapted using a standard set of parameters, and it is not possible to perform targeted performance optimization for the internal running scenario of the target application.
针对所述情况,本申请实施例提出一种针对移动终端的目标应用程序的资源配置方法,该方法中,管理模块接收正在运行的目标应用程序发送的场景数据包,场景数据包包括目标应用程序的应用标识和帧率信息;管理模块确定多个策略模块中与应用标识对应的策略模块;策略模块根据帧率信息确定目标应用程序的性能提升策略;操作***按照性能提升策略调整目标应用程序的***资源的分配。实现由操作***针对目标应用程序在运行过程中的内部运行场景的性能进行优化,有利于提高移动终端控制目标应用程序进行性能优化的实时性和精确度。For the above situation, the embodiment of the present application provides a resource configuration method for a target application of a mobile terminal, where the management module receives a scenario data packet sent by a running target application, and the scenario data package includes a target application. The application identifier and the frame rate information; the management module determines a policy module corresponding to the application identifier in the plurality of policy modules; the policy module determines a performance improvement policy of the target application according to the frame rate information; and the operating system adjusts the target application according to the performance improvement policy The allocation of system resources. Optimizing the performance of the internal running scenario of the target application during the running process by the operating system is beneficial to improving the real-time and accuracy of the performance optimization of the mobile terminal controlling the target application.
下面结合附图对本申请实施例进行介绍。The embodiments of the present application are described below with reference to the accompanying drawings.
请参阅图2,图2是本申请实施例提供了一种资源配置方法的流程示意图,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述操作***包括管理模块和多个策略模块,每个策略模块用于确定一个应用程序的性能提升策略,如图所示,本资源配置方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of a resource configuration method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more applications, where the operating system includes A management module and a plurality of policy modules, each of which is used to determine a performance improvement policy of an application. As shown in the figure, the resource configuration method includes:
S201,所述管理模块接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息。S201. The management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
其中,目标应用程序是指安装在移动终端的用户空间的第三方应用程序,该第三方应用程序可以是游戏类应用程序,该第三方游戏类应用程序可以由用户安装,也可以由开发人员在移动终端出厂前预装,此处不做唯一限定。The target application refers to a third-party application installed in the user space of the mobile terminal, and the third-party application may be a game-like application, and the third-party game application may be installed by the user or by the developer. The mobile terminal is pre-installed at the factory, and is not limited here.
其中,场景数据包包括目标应用程序正在运行时的内部运行场景的帧率信息,在目标应用程序为游戏应用程序时,帧率信息包括游戏应用程序的显示界面的帧率。游戏应用程序的显示界面的最高帧率一般限制在60帧,但是操作***无法获取到显示界面的帧率信息,游戏应用程序可在获取当前的帧率信息后,将帧率信息打包在数据包中发送给操作***的管理模块。The scene data packet includes frame rate information of an internal running scenario when the target application is running. When the target application is a game application, the frame rate information includes a frame rate of a display interface of the game application. The maximum frame rate of the display interface of the game application is generally limited to 60 frames, but the operating system cannot obtain the frame rate information of the display interface, and the game application can package the frame rate information in the data packet after acquiring the current frame rate information. The management module sent to the operating system.
其中,场景数据包可以包括正在运行的目标应用程序的游戏应用标识和帧率信息,还可以包括以下至少一种:关键性能参数、数据格式标识、启动信息、资源更新信息、账号登陆信息、界面类型信息、目标应用程序的行为信息(如数据发送行为信息、数据接收行为信息等)等,此处不做唯一限定。此外,场景数据包的格式例如可以是Java脚本对象标记(JavaScript Object Notation,JSON)、协议缓冲区(ProtocolBuffer,Protobuf)、自定义格式等数据传输格式,此处不做唯一限定。The scenario data packet may include the game application identifier and the frame rate information of the running target application, and may further include at least one of the following: a key performance parameter, a data format identifier, a startup information, a resource update information, an account login information, and an interface. Type information, behavior information of the target application (such as data transmission behavior information, data reception behavior information, etc.), etc., are not limited herein. In addition, the format of the scene data packet may be, for example, a Java Object Object Notation (JSON), a protocol buffer (ProtocolBuffer, Protobuf), a custom format, and the like, and is not limited herein.
其中,内部运行场景可以按照不同预设条件进行划分,如按照是否有用户交互可以划分内部运行场景为交互式场景和非交互式场景,或者,按照任务的复杂度划分为单用户场景和多用户场景,或者按照不同的行为划分为启动场景、资源更新场景、账号登录场景、商城场景、主界面场景等。The internal running scenario may be divided according to different preset conditions. For example, according to whether there is user interaction, the internal running scenario may be divided into an interactive scenario and a non-interactive scenario, or may be divided into a single user scenario and multiple users according to the complexity of the task. The scenario is divided into a startup scenario, a resource update scenario, an account login scenario, a mall scenario, and a main interface scenario according to different behaviors.
在一个可能的示例中,所述目标应用程序包括数据连接模块,所述操作***包括数据 连接管理模块,所述数据连接管理模块与所述数据连接模块建立预设数据通道;所述管理模块接收正在运行的目标应用程序发送的场景数据包,包括:所述管理模块通过所述预设数据通道接收所述目标应用程序发送的场景数据包。In one possible example, the target application includes a data connection module, the operating system includes a data connection management module, and the data connection management module establishes a preset data channel with the data connection module; the management module receives The scenario data packet sent by the running target application includes: the management module receiving, by using the preset data channel, a scenario data packet sent by the target application.
其中,所述预设数据通道为目标应用程序正在运行时,目标应用程序与操作***之间建立的有效的数据传输链路,目标应用程序不在运行后,该数据传输链路会被清除。The preset data channel is an effective data transmission link established between the target application and the operating system when the target application is running, and the data transmission link is cleared after the target application is not running.
在本可能的示例中,目标应用程序还可以包括数据收集模块、数据整理模块、优先级管理模块、数据接收模块,其中,数据收集模块用于收集目标应用程序在运行时的关键信息;数据整理模块用于整理收集到的关键信息,如合并重复的信息,删除冗余的信息等;优先级管理模块用于根据关键信息的重要程度对收集到的关键信息进行分类,优先处理优先级高的关键信息,过滤优先级较低的关键信息,或者在数据包生成过程中减少优先级较低的关键信息的使用;数据接收模块用于接收并解析操作***发送的数据,并将其传递给目标应用程序内部。In the possible example, the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, wherein the data collection module is configured to collect key information of the target application at runtime; The module is used to sort the collected key information, such as merging duplicate information, deleting redundant information, etc.; the priority management module is used to classify the collected key information according to the importance of the key information, and prioritize the high priority. Key information, filtering key information with lower priority, or reducing the use of lower priority key information during packet generation; data receiving module is used to receive and parse the data sent by the operating system and deliver it to the target Inside the application.
S202,所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块。S202. The management module determines a policy module corresponding to the application identifier in the multiple policy modules.
其中,所述多个策略模块中的每个策略模块可适用于一个应用,多个策略模块对应多个不同的应用。如第一策略模块适用于第一游戏应用程序,第二策略模块适用于第二游戏应用程序等。Each of the multiple policy modules may be applicable to one application, and the multiple policy modules correspond to multiple different applications. For example, the first policy module is applicable to the first game application, and the second policy module is applicable to the second game application or the like.
其中,所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块,包括:所述管理模块以应用标识为查询标识,查询预设的策略模块和应用标识之间的映射关系,确定场景数据包中的应用标识对应的策略模块。The management module determines a policy module corresponding to the application identifier in the multiple policy modules, and the management module uses the application identifier as a query identifier to query a mapping between a preset policy module and an application identifier. Relationship, determining a policy module corresponding to the application identifier in the scenario data packet.
S203,所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略。S203. The policy module determines, according to the frame rate information, a performance improvement policy of the target application.
其中,性能提升策略是指用于提高所述正在运行的目标应用程序的运行性能的资源配置策略,如CPU资源调整策略、GPU资源调整策略、内存带宽资源调整策略、磁盘资源调整策略、网络资源调整策略等,此处不做唯一限定。The performance improvement policy refers to a resource configuration policy, such as a CPU resource adjustment policy, a GPU resource adjustment policy, a memory bandwidth resource adjustment policy, a disk resource adjustment policy, and a network resource, for improving the running performance of the running target application. Adjustment strategies, etc., are not limited here.
S204,所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。S204. The operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
在一个可能的示例中,所述资源包括所述移动终端的以下资源中的至少一种:CPU资源、GPU资源、内存带宽资源、磁盘资源、网络资源。其中,网络资源包括移动终端的数据网络的网络资源、无线保真Wi-Fi网络的网络资源、蓝牙模块的控制参数资源等。In one possible example, the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource. The network resources include network resources of the data network of the mobile terminal, network resources of the wireless fidelity Wi-Fi network, and control parameter resources of the Bluetooth module.
其中,在所述***资源为CPU资源、GPU资源内存带宽资源、磁盘资源中的至少一种时,操作***可以通过直连通信方式与操作***空间的内核层通信,调整该***资源的配置,直连通信方式是指通过抽象的应用程序编程接口(Application Programming Interface,API)直接通信。When the system resource is at least one of a CPU resource, a GPU resource memory bandwidth resource, and a disk resource, the operating system can communicate with the kernel layer of the operating system space through direct connection communication, and adjust the configuration of the system resource. Direct communication means direct communication through an abstract Application Programming Interface (API).
其中,在所述***资源为网络资源时,操作***可以通过间接通信方式与操作***空间的内核层通信,调整该***资源的配置,间接通信方式是指通过调用代理服务来间接通信,如网络资源中的Wi-Fi子***或者数据网络子***与操作***不运行在同一个***内,需要通过一些代理的方式,间接访问这些***资源,操作***中提供了Wi-Fi的代理服务,通过调用该代理服务的接口来间接和Wi-Fi子***通信。Wherein, when the system resource is a network resource, the operating system can communicate with the kernel layer of the operating system space through indirect communication to adjust the configuration of the system resource, and the indirect communication mode refers to indirect communication by calling a proxy service, such as a network. The Wi-Fi subsystem or the data network subsystem in the resource does not run in the same system as the operating system. It needs to access these system resources indirectly through some proxy methods. The Wi-Fi proxy service is provided in the operating system. The interface of the proxy service is invoked to communicate indirectly with the Wi-Fi subsystem.
可以看出,本申请实施例中,移动终端的操作***中的管理模块首先接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息,其次,管理模块确定所述多个策略模块中与所述应用标识对应的策略模块,然后,策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,最后,操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。由于场景数据包包括目标应用程序的应用标识和帧率信息,且场景数据包由正在运行的目标应用程序发送,操作***能够根据应用标识准确确定适用的策略模块,进而调用该策略模块根据场景标识精细化确定 目标应用程序的当前的内部运行场景的性能提升策略,并由操作***按照该性能提升策略实时调整目标应用程序的***资源的配置,实现了由操作***对运行过程中的目标应用程序进行实时的性能优化,有利于提高移动终端控制目标应用程序进行性能优化的实时性和精确度。It can be seen that, in the embodiment of the present application, the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application. Since the scenario data packet includes the application identifier and the frame rate information of the target application, and the scenario data packet is sent by the running target application, the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
在一个可能的示例中,所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块确定所述帧率信息对应的待调整的***资源;所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略。In one possible example, the policy module determines a performance promotion policy of the target application according to the frame rate information, including: the policy module determines a system resource to be adjusted corresponding to the frame rate information; The policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
其中,策略模块可以查询预设的帧率信息与资源之间的对应关系,以获取待调整的***资源,该对应关系例如可以包括帧率与GPU资源之间的对应关系,或者帧率与资源组合(例如:CPU资源和GPU资源)之间的对应关系,此处不做唯一限定。The policy module may query the corresponding relationship between the preset frame rate information and the resource to obtain the system resource to be adjusted, and the corresponding relationship may include, for example, a correspondence between the frame rate and the GPU resource, or a frame rate and a resource. The correspondence between combinations (for example, CPU resources and GPU resources) is not limited here.
可见,本示例中,帧率信息关联的资源为待调整的***资源,根据待调整的***资源可进一步确定目标应用程序的性能提升策略,有利于提高移动终端控制目标应用程序进行优化的准确度。It can be seen that, in this example, the resource associated with the frame rate information is a system resource to be adjusted, and the performance improvement strategy of the target application can be further determined according to the system resource to be adjusted, which is beneficial to improving the accuracy of the mobile terminal controlling the target application for optimization. .
在一个可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;所述策略模块根据所述差值确定上调所述待调整的***资源的调整量;所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
其中,帧率信息包括目标应用程序当前的帧率值,即每秒显示的帧数,游戏应用程序的帧率一般限定在60帧,预设帧率值可为小于60的数值,例如为50帧,在检测游戏应用程序当前显示界面的帧率值小于50帧时,计算帧率值和预设帧率值之间的差值,策略模块根据该差值确定待调整资源的调整量,该调整量可以由预设公式计算得到,具体可以是差值越大,调整量越大,或者,以所述差值为查询标识,查询预设的差值和调整量之间的映射关系,确定所述差值对应的调整量为所述待调整的***资源的调整量。The frame rate information includes a current frame rate value of the target application, that is, the number of frames displayed per second. The frame rate of the game application is generally limited to 60 frames, and the preset frame rate value may be a value less than 60, for example, 50. a frame, when detecting a frame rate value of the current display interface of the game application is less than 50 frames, calculating a difference between the frame rate value and the preset frame rate value, and the policy module determines, according to the difference, an adjustment amount of the resource to be adjusted, where The adjustment amount can be calculated by a preset formula. Specifically, the larger the difference is, the larger the adjustment amount is, or the difference is the query identifier, and the mapping relationship between the preset difference and the adjustment amount is determined. The adjustment amount corresponding to the difference is an adjustment amount of the system resource to be adjusted.
其中,策略模块在检测到帧率值低于预设帧率值时,确定帧率信息对应的待调整资源,待调整资源具体可为CPU资源,例如CPU数量和频率,或者内存资源,或者磁盘资源,以此提升游戏帧率,提高用户体验。The policy module determines the to-be-adjusted resource corresponding to the frame rate information when the frame rate value is lower than the preset frame rate value. The resource to be adjusted may be a CPU resource, such as a CPU quantity and frequency, or a memory resource, or a disk. Resources to increase the game frame rate and improve the user experience.
可见,本示例中,通过在检测到帧率信息中的帧率值小于预设帧率值时,通过确定帧率值和预设帧率值之间的差值来确定上调待调整的***资源的调整量,从而可进一步确定目标应用程序的性能提升策略,有利于提高移动终端控制目标应用程序进行优化的准确度。It can be seen that, in this example, by determining the difference between the frame rate value and the preset frame rate value, when determining that the frame rate value in the frame rate information is less than the preset frame rate value, determining to adjust the system resource to be adjusted The amount of adjustment can further determine the performance improvement strategy of the target application, which is beneficial to improve the accuracy of the mobile terminal to control the target application for optimization.
在一个可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;所述策略模块确定所述帧率值所属的参考帧率区间;所述策略模块查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定所述参考帧率区间对应的所述待调整的***资源的调整量。所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application; the policy module determines a reference frame rate interval to which the frame rate value belongs; and the policy module searches between a preset frame rate interval and an adjustment amount of a system resource to be adjusted The mapping relationship determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
其中,设置有多个参考帧率区间,每个参考帧率区间对应有待调整的***资源的调整量,形成帧率区间很热待调整的***资源的调整量之间的映射关系。Wherein, a plurality of reference frame rate intervals are set, and each reference frame rate interval corresponds to an adjustment amount of system resources to be adjusted, and a mapping relationship between adjustment amounts of system resources whose frame rate interval is very hot to be adjusted is formed.
其中,策略模块在根据帧率信息确定目标应用程序当前界面的帧率值后,即可确定该帧率值所属的参考帧率区间,通过查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定参考区间对应的待调整的***资源的调整量。After determining the frame rate value of the current interface of the target application according to the frame rate information, the policy module may determine the reference frame rate interval to which the frame rate value belongs, by searching for a preset frame rate interval and system resources to be adjusted. The mapping relationship between the adjustment amounts determines the adjustment amount of the system resource to be adjusted corresponding to the reference interval.
可见,本示例中,帧率信息包括目标应用程序的当前帧率值,通过确定该帧率值对应 的参考帧率区间,再进一步确定帧率值对应的待调整的***资源的调整量,有利于提高移动终端控制目标应用程序进行运行优化的准确度。It can be seen that, in this example, the frame rate information includes a current frame rate value of the target application, and the reference frame rate interval corresponding to the frame rate value is determined, and the adjustment amount of the system resource to be adjusted corresponding to the frame rate value is further determined. It is beneficial to improve the accuracy of the mobile terminal control target application for running optimization.
在一种可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;所述策略模块在检测到所述帧率值高于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;所述策略模块根据所述差值确定下调所述待调整的***资源的调整量;所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determining, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines, between the frame rate value and the preset frame rate value, when detecting that the frame rate value is higher than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
其中,在检测到帧率值大于预设帧率值时,即帧率过剩的情况,这时操作***可以下调目标应用程序的***资源,如减少对应的***资源的分配以降低帧率,如此可以将目标应用程序的帧率稳定在预设帧率范围内,优化目标应用程序的功耗,有利于提升用户体验。Wherein, when detecting that the frame rate value is greater than the preset frame rate value, that is, the frame rate is excessive, the operating system may downgrade the system resources of the target application, such as reducing the allocation of the corresponding system resources to reduce the frame rate, The target application's frame rate can be stabilized within a preset frame rate range, optimizing the power consumption of the target application, which is beneficial to enhance the user experience.
可见,本示例中,通过在检测到帧率信息中的帧率值大于预设帧率值时,通过确定帧率值和预设帧率值之间的差值来确定下调待调整的***资源的调整量,从而可进一步确定目标应用程序的性能提升策略,有利于提高移动终端控制目标应用程序进行优化的准确度。It can be seen that, in this example, when the frame rate value in the frame rate information is detected to be greater than the preset frame rate value, determining the system resource to be adjusted by determining the difference between the frame rate value and the preset frame rate value The amount of adjustment can further determine the performance improvement strategy of the target application, which is beneficial to improve the accuracy of the mobile terminal to control the target application for optimization.
在一个可能的示例中,所述管理模块接收正在运行的所述目标应用程序发送的场景数据包之前,所述方法还包括:所述管理模块向所述目标应用程序发送第一数据格式,所述第一数据格式用于所述目标应用程序转换所述场景数据包的第二数据格式为所述第一数据格式。In a possible example, before the management module receives the scenario data packet sent by the target application that is running, the method further includes: the management module sending the first data format to the target application, where The first data format is used by the target application to convert the second data format of the scene data packet to the first data format.
其中,数据格式标识例如可以是所述JSON、Protobuf等,此处不做限定。The data format identifier may be, for example, the JSON, Protobuf, etc., which is not limited herein.
其中,所述管理模块按照所述第一数据格式标识所指示的数据格式解析所述场景数据包,确定所述目标应用程序的所述游戏应用类型标识和所述游戏加载场景标识,并向所述策略模块发送所述游戏应用类型标识和所述游戏加载场景标识;可见,由管理模块对场景数据包进行统一处理,策略模块仅需要直接接收管理模块的处理结果,如此设置有利于轻量化和精细化策略模块的功能,便于对策略模块进行维护、添加等操作,提高***稳定性。此外,可避免因格式差异无法正确确定出应用标识和场景标识,有利于提高移动终端为运行中的目标应用程序进行准确资源配置的成功率。The management module parses the scene data packet according to the data format indicated by the first data format identifier, determines the game application type identifier of the target application, and the game loading scene identifier, and The policy module sends the game application type identifier and the game loading scene identifier; it can be seen that the management module uniformly processes the scene data packet, and the policy module only needs to directly receive the processing result of the management module, so that the setting is beneficial to the lightweighting and The function of the refined policy module facilitates maintenance, addition, and other operations on the policy module to improve system stability. In addition, the application identifier and the scene identifier cannot be correctly determined due to the format difference, which is beneficial to improving the success rate of the mobile terminal for performing accurate resource configuration for the running target application.
可见,本示例中,目标应用程序和操作***约定好特定的数据格式传输场景数据包,使得操作***在接收到场景数据包后,能够实时解析该场景数据包中的应用标识和场景标识,降低处理时延,有利于提高数据处理效率,提高针对运行中的目标应用程序进行资源调整的实时性。It can be seen that, in this example, the target application and the operating system agree on a specific data format to transmit the scenario data packet, so that after receiving the scenario data packet, the operating system can analyze the application identifier and the scenario identifier in the scenario data packet in real time, and reduce Processing delays is beneficial to improve data processing efficiency and improve real-time resource adjustment for target applications in operation.
与所述图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种资源配置方法的流程示意图,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述操作***包括管理模块和多个策略模块,每个策略模块用于确定一个应用程序的性能提升策略。如图所示,本资源配置方法包括:FIG. 3 is a schematic flowchart of a resource configuration method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where an operating system runs on the mobile terminal. And one or more applications, the operating system includes a management module and a plurality of policy modules, each of which is used to determine a performance improvement policy of an application. As shown in the figure, the resource configuration method includes:
S301,所述管理模块接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息。S301. The management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
S302,所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块。S302. The management module determines a policy module corresponding to the application identifier in the multiple policy modules.
S303,所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值。S303. The policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application.
S304,所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值。S304. The policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value.
S305,所述策略模块根据所述差值确定上调所述待调整的***资源的调整量。S305. The policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted.
S306,所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。S306. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
S307,所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。S307. The operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
可以看出,本申请实施例中,移动终端的操作***中的管理模块首先接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息,其次,管理模块确定所述多个策略模块中与所述应用标识对应的策略模块,然后,策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,最后,操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。由于场景数据包包括目标应用程序的应用标识和帧率信息,且场景数据包由正在运行的目标应用程序发送,操作***能够根据应用标识准确确定适用的策略模块,进而调用该策略模块根据场景标识精细化确定目标应用程序的当前的内部运行场景的性能提升策略,并由操作***按照该性能提升策略实时调整目标应用程序的***资源的配置,实现了由操作***对运行过程中的目标应用程序进行实时的性能优化,有利于提高移动终端控制目标应用程序进行性能优化的实时性和精确度。It can be seen that, in the embodiment of the present application, the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application. Since the scenario data packet includes the application identifier and the frame rate information of the target application, and the scenario data packet is sent by the running target application, the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
此外,通过划分多个策略模块能够实现对不同类型应用的精细化控制,且移动终端无需同时加载全部策略模块,仅需要加载移动终端前台运行的目标应用程序对应的策略模块,有利于降低移动终端的资源占用,提高资源利用率和控制效率。In addition, by dividing the multiple policy modules, the fine control of different types of applications can be implemented, and the mobile terminal does not need to load all the policy modules at the same time, and only needs to load the policy module corresponding to the target application running in the foreground of the mobile terminal, which is beneficial to reducing the mobile terminal. Resource utilization, improve resource utilization and control efficiency.
与所述图2、图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种资源配置方法的流程示意图,应用于移动终端,所述移动终端上运行有操作***和一个或多个目标应用程序,所述操作***包括管理模块、多个策略模块和数据连接管理模块,每个策略模块用于确定一个应用程序的性能提升策略,所述目标应用程序包括数据连接模块,所述场景数据包包括目标应用程序的游戏应用类型标识和游戏加载场景标识,所述场景数据包包括数据格式标识。如图所示,本资源配置方法包括:4, FIG. 4 is a schematic flowchart of a resource configuration method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where the mobile terminal runs. An operating system and one or more target applications, the operating system including a management module, a plurality of policy modules, and a data connection management module, each policy module for determining a performance improvement policy of an application, the target application The data connection module is included, and the scene data package includes a game application type identifier and a game loading scene identifier of the target application, and the scene data package includes a data format identifier. As shown in the figure, the resource configuration method includes:
S401,所述数据连接管理模块与所述数据连接模块建立数据通道。S401. The data connection management module establishes a data channel with the data connection module.
S402,所述数据连接管理模块通过所述数据通道接收所述目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息。S402. The data connection management module receives, by using the data channel, a scenario data packet sent by the target application, where the scenario data packet includes an application identifier and frame rate information of the target application.
S403,所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块。S403. The management module determines a policy module corresponding to the application identifier in the multiple policy modules.
S404,所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值。S404. The policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application.
S405,所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值。S405. The policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value.
S406,所述策略模块根据所述差值确定上调所述待调整的***资源的调整量。S406. The policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted.
S407,所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。S407. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
S408,所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。S408. The operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
可以看出,本申请实施例中,移动终端的操作***中的管理模块首先接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息,其次,管理模块确定所述多个策略模块中与所述应用标识对应的策略模块,然后,策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,最后,操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。由于场景数据包包括目标应用程序的应用标识和帧率信息,且场景数据包由正在运行的目标应用程序发送,操作***能够根据应用标识准确确定适用的策略模块,进而调用该策略模块根据场景标识精细化确定目标应用程序的当前的内部运行场景的性能提升策略,并由操作***按照该性能提升策略实时调整目标应用程序的***资源的配置,实现了由操作***对运行过程中的目标应用程序进行实时的性能优化,有利于提高移动终端控制目标应用程序进行性能优化的实时性和精确度。It can be seen that, in the embodiment of the present application, the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application. Since the scenario data packet includes the application identifier and the frame rate information of the target application, and the scenario data packet is sent by the running target application, the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
此外,通过划分多个策略模块能够实现对不同类型应用的精细化控制,且移动终端无需同时加载全部策略模块,仅需要加载移动终端前台运行的目标应用程序对应的策略模块,有利于降低移动终端的资源占用,提高资源利用率和控制效率。In addition, by dividing the multiple policy modules, the fine control of different types of applications can be implemented, and the mobile terminal does not need to load all the policy modules at the same time, and only needs to load the policy module corresponding to the target application running in the foreground of the mobile terminal, which is beneficial to reducing the mobile terminal. Resource utilization, improve resource utilization and control efficiency.
与所述图2、图3、图4所示的实施例一致的,请参阅图5,图5是本申请实施例提供的一种移动终端的结构示意图,该移动终端运行有一个或多个应用程序和操作***,如图所示,该移动终端包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序不同于所述一个或多个应用程序,且所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行以下步骤的指令:Referring to FIG. 2, FIG. 3, and FIG. 4, FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal runs one or more An application and an operating system, as shown, the mobile terminal includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are different from the one or more applications, and The one or more programs are stored in the memory and are configured to be executed by the processor, the program including instructions for performing the following steps:
控制所述管理模块接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;Controlling, by the management module, a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application;
控制所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;Controlling, by the management module, a policy module corresponding to the application identifier in the multiple policy modules;
控制所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;Controlling, by the policy module, a performance improvement policy of the target application according to the frame rate information;
按照所述性能提升策略调整所述目标应用程序的***资源的分配。The allocation of system resources of the target application is adjusted according to the performance improvement policy.
可以看出,本申请实施例中,移动终端的操作***中的管理模块首先接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息,其次,管理模块确定所述多个策略模块中与所述应用标识对应的策略模块,然后,策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,最后,操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。由于场景数据包包括目标应用程序的应用标识和帧率信息,且场景数据包由正在运行的目标应用程序发送,操作***能够根据应用标识准确确定适用的策略模块,进而调用该策略模块根据场景标识精细化确定目标应用程序的当前的内部运行场景的性能提升策略,并由操作***按照该性能提升策略实时调整目标应用程序的***资源的配置,实现了由操作***对运行过程中的目标应用程序进行实时的性能优化,有利于提高移动终端控制目标应用程序进行性能优化的实时性和精确度。It can be seen that, in the embodiment of the present application, the management module in the operating system of the mobile terminal first receives the scenario data packet sent by the running target application, and the scenario data packet includes the application identifier and the frame rate information of the target application. Second, the management module determines a policy module corresponding to the application identifier in the multiple policy modules, and then the policy module determines a performance improvement policy of the target application according to the frame rate information, and finally, the operating system follows the The performance improvement policy adjusts the allocation of system resources of the target application. Since the scenario data packet includes the application identifier and the frame rate information of the target application, and the scenario data packet is sent by the running target application, the operating system can accurately determine the applicable policy module according to the application identifier, and then invoke the policy module according to the scenario identifier. Fine-tuning the performance improvement strategy of the current internal running scenario of the target application, and the operating system adjusts the configuration of the system resource of the target application in real time according to the performance improvement policy, and implements the target application in the running process by the operating system. Real-time performance optimization is beneficial to improve the real-time and accuracy of performance optimization of mobile terminal control target applications.
在一个可能的示例中,在所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略方面,所述程序中的指令具体用于执行以下操作:控制所述策略模块确定所述帧率信息对应的待调整的***资源;以及控制所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略。In one possible example, in the determining, by the policy module, the performance improvement policy of the target application according to the frame rate information, the instructions in the program are specifically configured to: control the policy module to determine a system resource to be adjusted corresponding to the frame rate information; and controlling the policy module to determine a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
在一个可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;所述策略模块根据所述差值确定上调所述待调整的***资源的调整量;所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
在一个可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;所述策略模块确定所述帧率值所属的参考帧率区间;所述策略模块查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定所述参考帧率区间对应的所述待调整的***资源的调整量。所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of a current interface of the target application; the policy module determines a reference frame rate interval to which the frame rate value belongs; and the policy module searches between a preset frame rate interval and an adjustment amount of a system resource to be adjusted The mapping relationship determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. The policy module generates a performance improvement policy of the target application according to the adjustment amount.
在一个可能的示例中,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:所述策略模块根据所述帧率信息确定所述目标 应用程序当前界面的帧率值;所述策略模块在检测到所述帧率值高于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;所述策略模块根据所述差值确定下调所述待调整的***资源的调整量;所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In a possible example, the policy module determines a performance promotion policy of the target application according to the system resource to be adjusted and the frame rate information, including: the policy module determines, according to the frame rate information, a frame rate value of the current interface of the target application; the policy module determines a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is higher than a preset frame rate value And the policy module determines, according to the difference, an adjustment amount of the system resource to be adjusted, where the policy module generates a performance improvement policy of the target application according to the adjustment amount.
在一个可能的示例中,所述目标应用程序包括数据连接模块,所述操作***包括数据连接管理模块,所述数据连接管理模块与所述数据连接模块建立预设数据通道;所述管理模块接收正在运行的目标应用程序发送的场景数据包,包括:所述管理模块通过所述预设数据通道接收所述目标应用程序发送的场景数据包。In one possible example, the target application includes a data connection module, the operating system includes a data connection management module, and the data connection management module establishes a preset data channel with the data connection module; the management module receives The scenario data packet sent by the running target application includes: the management module receiving, by using the preset data channel, a scenario data packet sent by the target application.
在一个可能的示例中,所述管理模块接收正在运行的所述目标应用程序发送的场景数据包之前,所述方法还包括:所述管理模块向所述目标应用程序发送第一数据格式,所述第一数据格式用于所述目标应用程序转换所述场景数据包的第二数据格式为所述第一数据格式。In a possible example, before the management module receives the scenario data packet sent by the target application that is running, the method further includes: the management module sending the first data format to the target application, where The first data format is used by the target application to convert the second data format of the scene data packet to the first data format.
在一个可能的示例中,所述目标应用程序还可以包括数据收集模块、数据整理模块、优先级管理模块、数据接收模块,所述数据收集模块用于收集目标应用程序在运行时的关键信息,所述数据整理模块用于整理收集到的关键信息,所述优先级管理模块用于根据关键信息的重要程度对收集到的关键信息进行分类,优先处理优先级高的关键信息,过滤优先级较低的关键信息,或者在数据包生成过程中减少优先级较低的关键信息的使用,所述数据接收模块用于接收并解析操作***发送的数据,并将其传递给目标应用程序内部。In a possible example, the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, where the data collection module is configured to collect key information of the target application at runtime. The data collation module is configured to sort the collected key information, and the priority management module is configured to classify the collected key information according to the importance degree of the key information, and preferentially process the key information with high priority, and the filtering priority is compared. Low key information, or the use of lower priority key information during the packet generation process, which is used to receive and parse the data sent by the operating system and pass it to the target application.
在一个可能的示例中,所述资源包括所述移动终端的以下资源中的至少一种:CPU资源、GPU资源、内存带宽资源、磁盘资源、网络资源。In one possible example, the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
所述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,移动终端为了实现所述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The solution of the embodiment of the present application is mainly introduced from the perspective of performing the process on the method side. It can be understood that the mobile terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the functions. Those skilled in the art will readily appreciate that the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for each particular application to implement the described functionality, but such implementation should not be considered to be beyond the scope of the application.
本申请实施例可以根据所述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。所述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide a functional unit into a mobile terminal according to the method example. For example, each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
在采用集成的单元的情况下,图6示出了所述实施例中所涉及的资源配置装置的一种可能的功能单元组成框图。资源配置装置600应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述资源配置装置600包括:处理单元602和通信单元603。处理单元602用于对资源配置装置的动作进行控制管理,例如,处理单元602用于支持资源配置装置执行图2中的步骤S201-S203、图3中的步骤S301-S307、图4中的步骤S401-S408和/或用于本文所描述的技术的其它过程。资源配置装置还可以包括存储单元601,用于存储程序代码和数据。In the case of an integrated unit, FIG. 6 shows a block diagram of one possible functional unit composition of the resource configuration apparatus involved in the embodiment. The resource configuration device 600 is applied to a mobile terminal on which an operating system and one or more applications are run. The resource configuration device 600 includes a processing unit 602 and a communication unit 603. The processing unit 602 is configured to perform control management on the action of the resource configuration apparatus. For example, the processing unit 602 is configured to support the resource configuration apparatus to perform steps S201-S203 in FIG. 2, steps S301-S307 in FIG. 3, and steps in FIG. S401-S408 and/or other processes for the techniques described herein. The resource configuration device may further include a storage unit 601 for storing program codes and data.
所述处理单元602,用于控制所述管理模块通过所述通信单元603接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;以及用于控制所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;以及用于控制所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;以及 用于控制所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。The processing unit 602 is configured to control, by the management module, the scenario data packet sent by the running target application by the communication unit 603, where the scenario data packet includes an application identifier and frame rate information of the target application; And the control module is configured to determine a policy module corresponding to the application identifier in the multiple policy modules; and a performance improvement policy for controlling the policy module to determine the target application according to the frame rate information; And for controlling the operating system to adjust the allocation of system resources of the target application according to the performance improvement policy.
在一个可能的示例中,在所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元602具体用于:控制所述策略模块确定所述帧率信息对应的待调整的***资源;以及控制所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略。In one possible example, the processing unit 602 is specifically configured to: control the policy module to determine the frame rate information, where the policy module determines a performance improvement policy of the target application according to the frame rate information. Corresponding system resources to be adjusted; and controlling the policy module to determine a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
在一个可能的示例中,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元602具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;以及控制所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;以及控制所述策略模块根据所述差值确定上调所述待调整的***资源的调整量;以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In one possible example, the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information. Determining, by the policy module, a frame rate value of the current interface of the target application according to the frame rate information; and controlling the policy module to determine the frame rate value when detecting that the frame rate value is lower than a preset frame rate value And a difference between the predetermined frame rate value; and controlling the policy module to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy module to generate according to the adjustment amount The performance improvement strategy of the target application.
在一个可能的示例中,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元602具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;以及控制所述策略模块确定所述帧率值所属的参考帧率区间;以及控制所述策略模块查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定所述参考帧率区间对应的所述待调整的***资源的调整量。以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In one possible example, the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information. The policy module determines a frame rate value of the current interface of the target application according to the frame rate information; and controls the policy module to determine a reference frame rate interval to which the frame rate value belongs; and controls the policy module to search for a preset And a mapping relationship between the frame rate interval and the adjustment amount of the system resource to be adjusted, and determining an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. And controlling the policy module to generate a performance improvement policy of the target application according to the adjustment amount.
在一个可能的示例中,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元602具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;控制所述策略模块在检测到所述帧率值高于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;以及控制所述策略模块根据所述差值确定下调所述待调整的***资源的调整量;以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。In one possible example, the processing unit 602 is specifically configured to: control the performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information. Determining, by the policy module, a frame rate value of the current interface of the target application according to the frame rate information; and controlling the policy module to determine the frame rate value and when detecting that the frame rate value is higher than a preset frame rate value a difference between the preset frame rate values; and controlling, by the policy module, to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy module to generate, according to the adjustment amount A performance improvement strategy for the target application.
在一个可能的示例中,所述目标应用程序包括数据连接模块,所述操作***包括数据连接管理模块,所述数据连接管理模块与所述数据连接模块建立预设数据通道;在所述管理模块接收正在运行的目标应用程序发送的场景数据包方面,所述处理单元602具体用于:控制所述管理模块通过所述预设数据通道接收所述目标应用程序发送的场景数据包。In one possible example, the target application includes a data connection module, the operating system includes a data connection management module, and the data connection management module establishes a preset data channel with the data connection module; The processing unit 602 is specifically configured to: control, by the management module, the scenario data packet sent by the target application by using the preset data channel, in the aspect of receiving the scenario data packet sent by the running target application.
在一个可能的示例中,所述目标应用程序还可以包括数据收集模块、数据整理模块、优先级管理模块、数据接收模块,所述数据收集模块用于收集目标应用程序在运行时的关键信息,所述数据整理模块用于整理收集到的关键信息,所述优先级管理模块用于根据关键信息的重要程度对收集到的关键信息进行分类,优先处理优先级高的关键信息,过滤优先级较低的关键信息,或者在数据包生成过程中减少优先级较低的关键信息的使用,所述数据接收模块用于接收并解析操作***发送的数据,并将其传递给目标应用程序内部。In a possible example, the target application may further include a data collection module, a data collation module, a priority management module, and a data receiving module, where the data collection module is configured to collect key information of the target application at runtime. The data collation module is configured to sort the collected key information, and the priority management module is configured to classify the collected key information according to the importance degree of the key information, and preferentially process the key information with high priority, and the filtering priority is compared. Low key information, or the use of lower priority key information during the packet generation process, which is used to receive and parse the data sent by the operating system and pass it to the target application.
在一个可能的示例中,所述管理模块通过所述通信单元603接收正在运行的所述目标应用程序发送的场景数据包之前,所述处理单元602还用于控制所述管理模块向所述目标应用程序发送第一数据格式,所述第一数据格式用于所述目标应用程序转换所述场景数据包的第二数据格式为所述第一数据格式。In one possible example, before the management module receives the scenario data packet sent by the target application that is running by the communication unit 603, the processing unit 602 is further configured to control the management module to the target The application sends a first data format, the first data format being used by the target application to convert the second data format of the scene data packet to the first data format.
其中,所述目标应用程序包括数据连接模块,所述操作***包括数据连接管理模块;所述资源配置装置还包括通道建立单元,所述通道建立单元,用于控制数据连接管理模块与所述数据连接模块建立所述预设数据通道。The target application includes a data connection module, and the operating system includes a data connection management module. The resource configuration device further includes a channel establishment unit, and the channel establishment unit is configured to control the data connection management module and the data. The connection module establishes the preset data channel.
在一个可能的示例中,所述资源包括所述移动终端的以下资源中的至少一种:CPU资源、GPU资源、内存带宽资源、磁盘资源、网络资源。In one possible example, the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
其中,处理单元602可以是处理器或控制器,通信单元603可以是处理器和程序运行空间之间的内部通信接口,如处理器与操作***空间的通信接口,或者处理器与用户空间的通信接口等,存储单元601可以是存储器。The processing unit 602 may be a processor or a controller, and the communication unit 603 may be an internal communication interface between the processor and the program running space, such as a communication interface between the processor and the operating system space, or a communication between the processor and the user space. The interface or the like, the storage unit 601 may be a memory.
请参阅图7,图7是本申请实施例提供了一种智能手机700的结构示意图,所述智能手机700包括:壳体710、触控显示屏720、主板730、电池740和副板750,主板730上设置有前置摄像头731、处理器732、存储器733、电源管理芯片734等,副板上设置有振子751、一体音腔752、VOOC闪充接口753和指纹识别模组754。Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of a smart phone 700. The smart phone 700 includes a housing 710, a touch display screen 720, a main board 730, a battery 740, and a sub-board 750. The main board 730 is provided with a front camera 731, a processor 732, a memory 733, a power management chip 734, and the like. The sub board is provided with a vibrator 751, an integrated sound chamber 752, a VOOC flash charging interface 753, and a fingerprint recognition module 754.
其中,该智能手机包括目标应用程序和操作***,目标应用程序运行于用户空间,操作***运行于操作***空间,操作***包括管理模块和多个策略模块,每个策略模块用于确定一个应用程序的性能提升策略。管理模块接收正在运行的目标应用程序发送的场景数据包,场景数据包包括目标应用程序的应用标识和帧率信息;管理模块确定多个策略模块中与应用标识对应的策略模块;策略模块根据帧率信息确定目标应用程序的性能提升策略;操作***按照性能提升策略调整目标应用程序的***资源的分配。The smart phone includes a target application and an operating system, the target application runs in a user space, and the operating system runs in an operating system space. The operating system includes a management module and a plurality of policy modules, and each policy module is used to determine an application. Performance improvement strategy. The management module receives the scenario data packet sent by the running target application, the scenario data packet includes the application identifier and the frame rate information of the target application, and the management module determines a policy module corresponding to the application identifier among the multiple policy modules; the policy module is configured according to the frame The rate information determines a performance improvement policy of the target application; the operating system adjusts the allocation of system resources of the target application according to the performance improvement policy.
所述处理器732是智能手机的控制中心,利用各种接口和线路连接整个智能手机的各个部分,通过运行或执行存储在存储器733内的软件程序和/或模块,以及调用存储在存储器733内的数据,执行智能手机的各种功能和处理数据,从而对智能手机进行整体监控。可选的,处理器732可包括一个或多个处理单元;优选的,处理器732可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,所述调制解调处理器也可以不集成到处理器732中。该处理器732例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The processor 732 is a control center of the smartphone, and connects various parts of the entire smartphone by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 733, and calling the storage in the memory 733. The data, the various functions of the smartphone and the processing of the data, so that the overall monitoring of the smartphone. Optionally, the processor 732 may include one or more processing units; preferably, the processor 732 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the modem processor may also not be integrated into the processor 732. The processor 732 can be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and field programmable. Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
所述存储器733可用于存储软件程序以及模块,处理器732通过运行存储在存储器733的软件程序以及模块,从而执行智能手机的各种功能应用以及数据处理。存储器733可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序等;存储数据区可存储根据智能手机的使用所创建的数据等。此外,存储器733可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。该存储器733例如可以是随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质。The memory 733 can be used to store software programs and modules, and the processor 732 executes various functional applications and data processing of the smartphone by running software programs and modules stored in the memory 733. The memory 733 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the smartphone, and the like. Further, the memory 733 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The memory 733 can be, for example, a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), and an electrically erasable memory. Programmable EPROM (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如所述方法实施例中记载的任一方法的部分或全部步骤,所述计算机包括移动终端。The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to execute part or all of any of the methods described in the method embodiment. In the step, the computer includes a mobile terminal.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如所述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括移动终端。The embodiment of the present application further provides a computer program product, comprising: a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute as described in the method embodiment Part or all of the steps of either method. The computer program product can be a software installation package, the computer comprising a mobile terminal.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的 动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present application is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present application. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在所述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the embodiment, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。所述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解所述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。One of ordinary skill in the art can understand that all or part of the various steps of the embodiments can be completed by a program to instruct related hardware, the program can be stored in a computer readable memory, and the memory can include: Disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or optical disk.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been described in detail above. The principles and implementations of the present application are described in the specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present application. A person skilled in the art will have a change in the specific embodiments and the scope of the application according to the idea of the present application. In summary, the content of the present specification should not be construed as limiting the present application.

Claims (20)

  1. 一种资源配置方法,其特征在于,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述操作***包括管理模块和多个策略模块,每个策略模块用于确定一个应用程序的性能提升策略;所述方法包括:A resource configuration method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, and the operating system includes a management module and a plurality of policy modules, and each policy module uses Determining an application's performance improvement strategy; the method includes:
    所述管理模块接收正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;The management module receives a scenario data packet sent by a running target application, where the scenario data packet includes an application identifier and frame rate information of the target application;
    所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;The management module determines a policy module corresponding to the application identifier in the multiple policy modules;
    所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;Determining, by the policy module, a performance improvement policy of the target application according to the frame rate information;
    所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。The operating system adjusts allocation of system resources of the target application according to the performance improvement policy.
  2. 根据权利要求1所述的方法,其特征在于,所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略,包括:The method according to claim 1, wherein the policy module determines a performance improvement policy of the target application according to the frame rate information, including:
    所述策略模块确定所述帧率信息对应的待调整的***资源;The policy module determines a system resource to be adjusted corresponding to the frame rate information;
    所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略。The policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  3. 根据权利要求2所述的方法,其特征在于,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:The method according to claim 2, wherein the policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information, including:
    所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;Determining, by the policy module, a frame rate value of a current interface of the target application according to the frame rate information;
    所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;And determining, by the policy module, a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is lower than a preset frame rate value;
    所述策略模块根据所述差值确定上调所述待调整的***资源的调整量;Determining, by the policy module, an adjustment amount of the system resource to be adjusted that is adjusted according to the difference;
    所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The policy module generates a performance improvement policy of the target application according to the adjustment amount.
  4. 根据权利要求2所述的方法,其特征在于,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:The method according to claim 2, wherein the policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information, including:
    所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;Determining, by the policy module, a frame rate value of a current interface of the target application according to the frame rate information;
    所述策略模块确定所述帧率值所属的参考帧率区间;The policy module determines a reference frame rate interval to which the frame rate value belongs;
    所述策略模块查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定所述参考帧率区间对应的所述待调整的***资源的调整量。The policy module searches for a mapping relationship between a preset frame rate interval and an adjustment amount of the system resource to be adjusted, and determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval.
    所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The policy module generates a performance improvement policy of the target application according to the adjustment amount.
  5. 根据权利要求2所述的方法,其特征在于,所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略,包括:The method according to claim 2, wherein the policy module determines a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information, including:
    所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;Determining, by the policy module, a frame rate value of a current interface of the target application according to the frame rate information;
    所述策略模块在检测到所述帧率值高于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;And determining, by the policy module, a difference between the frame rate value and the preset frame rate value when detecting that the frame rate value is higher than a preset frame rate value;
    所述策略模块根据所述差值确定下调所述待调整的***资源的调整量;Determining, by the policy module, an adjustment amount of the system resource to be adjusted that is to be adjusted according to the difference;
    所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The policy module generates a performance improvement policy of the target application according to the adjustment amount.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述目标应用程序包括数据连接模块,所述操作***包括数据连接管理模块,所述数据连接管理模块与所述数据连接模块建立预设数据通道;所述管理模块接收正在运行的目标应用程序发送的场景数据包,包括:The method according to any one of claims 1 to 5, wherein the target application comprises a data connection module, the operating system comprises a data connection management module, the data connection management module and the data connection module Establishing a preset data channel; the management module receives the scenario data packet sent by the running target application, including:
    所述管理模块通过所述预设数据通道接收所述目标应用程序发送的场景数据包。The management module receives the scenario data packet sent by the target application by using the preset data channel.
  7. 根据权利要求6所述的方法,其特征在于,所述目标应用程序还可以包括数据收集模块、数据整理模块、优先级管理模块、数据接收模块,所述数据收集模块用于收集目标应用程序在运行时的关键信息,所述数据整理模块用于整理收集到的关键信息,所述优先 级管理模块用于根据关键信息的重要程度对收集到的关键信息进行分类,优先处理优先级高的关键信息,过滤优先级较低的关键信息,或者在数据包生成过程中减少优先级较低的关键信息的使用,所述数据接收模块用于接收并解析操作***发送的数据,并将其传递给目标应用程序内部。The method according to claim 6, wherein the target application further comprises a data collection module, a data collation module, a priority management module, and a data receiving module, wherein the data collection module is configured to collect the target application. The key information of the runtime is used to organize the collected key information, and the priority management module is configured to classify the collected key information according to the importance degree of the key information, and prioritize the key with high priority. Information, filtering key information with lower priority, or reducing the use of lower priority key information during data packet generation, which is used to receive and parse data sent by the operating system and pass it to Inside the target application.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述管理模块接收正在运行的所述目标应用程序发送的场景数据包之前,所述方法还包括:The method according to any one of claims 1 to 7, wherein before the management module receives the scenario data packet sent by the target application that is running, the method further includes:
    所述管理模块向所述目标应用程序发送第一数据格式,所述第一数据格式用于所述目标应用程序转换所述场景数据包的第二数据格式为所述第一数据格式。The management module sends a first data format to the target application, where the first data format is used by the target application to convert the second data format of the scene data packet to the first data format.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述资源包括所述移动终端的以下资源中的至少一种:CPU资源、GPU资源、内存带宽资源、磁盘资源、网络资源。The method according to any one of claims 1-8, wherein the resource comprises at least one of the following resources of the mobile terminal: CPU resource, GPU resource, memory bandwidth resource, disk resource, network resource .
  10. 一种资源配置装置,其特征在于,应用于移动终端,所述移动终端上运行有操作***以及一个或多个应用程序,所述资源配置装置包括处理单元和通信单元,A resource configuration device, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, and the resource configuration device includes a processing unit and a communication unit.
    所述处理单元,用于控制所述管理模块通过所述通信单元正在运行的目标应用程序发送的场景数据包,所述场景数据包包括目标应用程序的应用标识和帧率信息;以及用于控制所述管理模块确定所述多个策略模块中与所述应用标识对应的策略模块;以及用于控制所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略;以及用于控制所述操作***按照所述性能提升策略调整所述目标应用程序的***资源的分配。The processing unit is configured to control a scenario data packet sent by the management module by a target application that is running by the communication unit, where the scenario data packet includes an application identifier and frame rate information of a target application; and is used for controlling The management module determines a policy module corresponding to the application identifier in the multiple policy modules, and a performance improvement policy for controlling the policy module to determine the target application according to the frame rate information; Controlling the operating system to adjust allocation of system resources of the target application according to the performance improvement policy.
  11. 根据权利要求10所述的资源配置装置,其特征在于,在所述策略模块根据所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元具体用于:控制所述策略模块确定所述帧率信息对应的待调整的***资源;以及控制所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略。The resource configuration apparatus according to claim 10, wherein in the determining, by the policy module, the performance improvement policy of the target application according to the frame rate information, the processing unit is specifically configured to: control the policy The module determines the system resource to be adjusted corresponding to the frame rate information; and controls the policy module to determine a performance improvement policy of the target application according to the system resource to be adjusted and the frame rate information.
  12. 根据权利要求11所述的资源配置装置,其特征在于,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;以及控制所述策略模块在检测到所述帧率值低于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;以及控制所述策略模块根据所述差值确定上调所述待调整的***资源的调整量;以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The resource configuration apparatus according to claim 11, wherein the processing unit determines, according to the system resource to be adjusted and the frame rate information, a performance improvement policy of the target application, the processing unit Specifically, the method is configured to: determine, according to the frame rate information, a frame rate value of a current interface of the target application; and control the policy module to detect that the frame rate value is lower than a preset frame rate value. Determining a difference between the frame rate value and the preset frame rate value; and controlling the policy module to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy The module generates a performance improvement policy of the target application according to the adjustment amount.
  13. 根据权利要求11所述的资源配置装置,其特征在于,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;以及控制所述策略模块确定所述帧率值所属的参考帧率区间;以及控制所述策略模块查找预设的帧率区间和待调整的***资源的调整量之间的映射关系,确定所述参考帧率区间对应的所述待调整的***资源的调整量。以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The resource configuration apparatus according to claim 11, wherein the processing unit determines, according to the system resource to be adjusted and the frame rate information, a performance improvement policy of the target application, the processing unit Specifically, the method is configured to: determine, according to the frame rate information, a frame rate value of a current interface of the target application; and control the policy module to determine a reference frame rate interval to which the frame rate value belongs; and a control center The policy module searches for a mapping relationship between a preset frame rate interval and an adjustment amount of the system resource to be adjusted, and determines an adjustment amount of the system resource to be adjusted corresponding to the reference frame rate interval. And controlling the policy module to generate a performance improvement policy of the target application according to the adjustment amount.
  14. 根据权利要求11所述的资源配置装置,其特征在于,在所述策略模块根据所述待调整的***资源和所述帧率信息确定所述目标应用程序的性能提升策略方面,所述处理单元具体用于:控制所述策略模块根据所述帧率信息确定所述目标应用程序当前界面的帧率值;控制所述策略模块在检测到所述帧率值高于预设帧率值时,确定所述帧率值和所述预设帧率值之间的差值;以及控制所述策略模块根据所述差值确定下调所述待调整的***资源的调整量;以及控制所述策略模块根据所述调整量生成所述目标应用程序的性能提升策略。The resource configuration apparatus according to claim 11, wherein the processing unit determines, according to the system resource to be adjusted and the frame rate information, a performance improvement policy of the target application, the processing unit Specifically, the policy module is configured to determine a frame rate value of the current interface of the target application according to the frame rate information, and control the policy module to detect that the frame rate value is higher than a preset frame rate value, Determining a difference between the frame rate value and the preset frame rate value; and controlling the policy module to determine, according to the difference, an adjustment amount of the system resource to be adjusted to be adjusted; and controlling the policy module Generating a performance improvement policy of the target application according to the adjustment amount.
  15. 根据权利要求10-14任一项所述的资源配置装置,其特征在于,所述目标应用程序包括数据连接模块,所述操作***包括数据连接管理模块,所述数据连接管理模块与所述数据连接模块建立预设数据通道;在所述管理模块接收正在运行的目标应用程序发送的场景数据包方面,所述处理单元具体用于:控制所述管理模块通过所述预设数据通道接收所述目标应用程序发送的场景数据包。The resource configuration apparatus according to any one of claims 10 to 14, wherein the target application comprises a data connection module, the operating system comprises a data connection management module, the data connection management module and the data The connection module establishes a preset data channel; the processing unit is specifically configured to: control the management module to receive the preset data channel by using the preset data channel, where the management module receives the scenario data packet sent by the running target application The scenario packet sent by the target application.
  16. 根据权利要求15所述的资源配置装置,其特征在于,所述目标应用程序还可以包括数据收集模块、数据整理模块、优先级管理模块、数据接收模块,所述数据收集模块用于收集目标应用程序在运行时的关键信息,所述数据整理模块用于整理收集到的关键信息,所述优先级管理模块用于根据关键信息的重要程度对收集到的关键信息进行分类,优先处理优先级高的关键信息,过滤优先级较低的关键信息,或者在数据包生成过程中减少优先级较低的关键信息的使用,所述数据接收模块用于接收并解析操作***发送的数据,并将其传递给目标应用程序内部。The resource configuration apparatus according to claim 15, wherein the target application program further comprises a data collection module, a data collation module, a priority management module, and a data receiving module, wherein the data collection module is configured to collect a target application. The key information of the program at runtime, the data sorting module is used for sorting the collected key information, and the priority management module is configured to classify the collected key information according to the importance degree of the key information, and prioritize the high priority. Key information, filtering key information with lower priority, or reducing the use of lower priority key information during packet generation, which is used to receive and parse data sent by the operating system and Passed inside the target application.
  17. 根据权利要求10-16任一项所述的资源配置装置,其特征在于,所述管理模块通过所述通信单元接收正在运行的所述目标应用程序发送的场景数据包之前,所述处理单元还用于控制所述管理模块向所述目标应用程序发送第一数据格式,所述第一数据格式用于所述目标应用程序转换所述场景数据包的第二数据格式为所述第一数据格式。The resource configuration apparatus according to any one of claims 10 to 16, wherein the processing unit further receives, before the management module receives the scene data packet sent by the target application that is running, the processing unit further And a method for controlling the management module to send a first data format to the target application, where the first data format is used by the target application to convert a second data format of the scene data packet to the first data format .
  18. 根据权利要求10-17任一项所述的资源配置装置,其特征在于,所述资源包括所述移动终端的以下资源中的至少一种:CPU资源、GPU资源、内存带宽资源、磁盘资源、网络资源。The resource configuration apparatus according to any one of claims 10-17, wherein the resource includes at least one of the following resources of the mobile terminal: a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, Internet resources.
  19. 一种移动终端,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行权利要求1-9任一项方法中的步骤的指令。A mobile terminal, comprising: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor The program includes instructions for performing the steps of the method of any of claims 1-9.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法,所述计算机包括移动终端。A computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to perform the method of any one of claims 1-9 Method, the computer comprises a mobile terminal.
PCT/CN2018/101352 2017-08-31 2018-08-20 Resource allocation method and related product WO2019042180A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710775918.7 2017-08-31
CN201710775918.7A CN107589998A (en) 2017-08-31 2017-08-31 Resource allocation method and Related product

Publications (1)

Publication Number Publication Date
WO2019042180A1 true WO2019042180A1 (en) 2019-03-07

Family

ID=61051868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101352 WO2019042180A1 (en) 2017-08-31 2018-08-20 Resource allocation method and related product

Country Status (2)

Country Link
CN (1) CN107589998A (en)
WO (1) WO2019042180A1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107589998A (en) * 2017-08-31 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN108646938B (en) 2018-03-13 2020-04-17 Oppo广东移动通信有限公司 Configuration method and device of touch screen, terminal and storage medium
CN109062715B (en) * 2018-07-05 2022-02-08 Oppo(重庆)智能科技有限公司 Method and device for determining memory clock frequency and terminal
CN110798738B (en) * 2018-08-01 2022-01-28 Oppo广东移动通信有限公司 Frame rate control method, device, terminal and storage medium
CN109284186A (en) * 2018-08-21 2019-01-29 奇酷互联网络科技(深圳)有限公司 Mobile terminal and its method and apparatus for detecting frame rate adjustment mobile terminal performance
CN109376053B (en) * 2018-09-20 2022-11-08 Oppo广东移动通信有限公司 Data processing method and device and mobile terminal
CN109240833A (en) * 2018-09-26 2019-01-18 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium
CN109413480B (en) * 2018-09-30 2021-10-08 Oppo广东移动通信有限公司 Picture processing method, device, terminal and storage medium
CN109474751A (en) * 2018-12-26 2019-03-15 深圳先进技术研究院 Energy consumption management method, system and the mobile terminal of mobile terminal
CN111861539B (en) * 2020-06-05 2024-04-05 百度在线网络技术(北京)有限公司 Resource processing method, device, electronic equipment and storage medium
CN113285976A (en) * 2021-04-07 2021-08-20 上海商米科技集团股份有限公司 Cloud control process management system
CN115097994B (en) * 2021-10-30 2023-05-09 荣耀终端有限公司 Data processing method and related device
CN114157824B (en) * 2021-11-29 2023-08-18 联想(北京)有限公司 Control method and electronic equipment
CN114222084B (en) * 2021-12-01 2023-05-23 联想(北京)有限公司 Control method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799488A (en) * 2012-07-06 2012-11-28 中山大学深圳研究院 Application resource management system applied to digital television
CN103430151A (en) * 2012-07-06 2013-12-04 华为终端有限公司 Method and apparatus for configuring resource
CN104216783A (en) * 2014-08-20 2014-12-17 上海交通大学 Method for automatically managing and controlling virtual GPU (Graphics Processing Unit) resource in cloud gaming
CN104267800A (en) * 2014-09-19 2015-01-07 上海联彤网络通讯技术有限公司 Method for implementing automatic adjustment of display resolution of application in operating system
CN107589998A (en) * 2017-08-31 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and Related product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8875148B2 (en) * 2011-06-14 2014-10-28 International Business Machines Corporation Product-specific system resource allocation within a single operating system instance
CN102932383B (en) * 2011-08-08 2015-07-29 联想(北京)有限公司 A kind of data transmission method, terminal and terminal system
CN106020990B (en) * 2016-06-30 2020-01-10 宇龙计算机通信科技(深圳)有限公司 Control method of central processing unit and terminal equipment
CN106201551A (en) * 2016-07-22 2016-12-07 宇龙计算机通信科技(深圳)有限公司 A kind of application program exits method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799488A (en) * 2012-07-06 2012-11-28 中山大学深圳研究院 Application resource management system applied to digital television
CN103430151A (en) * 2012-07-06 2013-12-04 华为终端有限公司 Method and apparatus for configuring resource
CN104216783A (en) * 2014-08-20 2014-12-17 上海交通大学 Method for automatically managing and controlling virtual GPU (Graphics Processing Unit) resource in cloud gaming
CN104267800A (en) * 2014-09-19 2015-01-07 上海联彤网络通讯技术有限公司 Method for implementing automatic adjustment of display resolution of application in operating system
CN107589998A (en) * 2017-08-31 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and Related product

Also Published As

Publication number Publication date
CN107589998A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
WO2019042180A1 (en) Resource allocation method and related product
WO2019042294A1 (en) Resource allocation method and related product
WO2019047709A1 (en) Resource configuration method and related product
WO2019042169A1 (en) Resource allocation method and related products
US11151010B2 (en) Resource configuration method, mobile terminal and storage medium
WO2019042171A1 (en) Resource allocation method and product related thereto
CN107479970B (en) Resource allocation method and related product
CN107450988B (en) Resource allocation method and related product
CN107426432B (en) Resource allocation method and Related product
US11698815B2 (en) Method for resource allocation and related products
US11099901B2 (en) Method for resource allocation and terminal device
US10936371B2 (en) Method for resource allocation and related products
CN107547745B (en) Resource allocation method and related product
US11301300B2 (en) Method for resource allocation and terminal device
US11016812B2 (en) Method for resource allocation and terminal device
CN107517306B (en) Resource allocation method and related product
CN107807852B (en) Application program performance control method, device and computer readable storage medium
WO2019085840A1 (en) Resource adjustment method and apparatus
WO2019047708A1 (en) Resource configuration method and related product
WO2019072208A1 (en) Application running control method and device
US11182210B2 (en) Method for resource allocation and terminal device
CN107832142B (en) Resource allocation method and equipment for application program
CN107528977B (en) Resource allocation method and related product
WO2019042172A1 (en) Resource allocation method and product related thereto
WO2019076254A1 (en) Game application control method, and device

Legal Events

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

Ref document number: 18849588

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: 18849588

Country of ref document: EP

Kind code of ref document: A1