CN109032793B - Resource allocation method, device, terminal and storage medium - Google Patents

Resource allocation method, device, terminal and storage medium Download PDF

Info

Publication number
CN109032793B
CN109032793B CN201810757425.5A CN201810757425A CN109032793B CN 109032793 B CN109032793 B CN 109032793B CN 201810757425 A CN201810757425 A CN 201810757425A CN 109032793 B CN109032793 B CN 109032793B
Authority
CN
China
Prior art keywords
application
target
identifier
thread
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810757425.5A
Other languages
Chinese (zh)
Other versions
CN109032793A (en
Inventor
王猛猛
程杰
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810757425.5A priority Critical patent/CN109032793B/en
Publication of CN109032793A publication Critical patent/CN109032793A/en
Application granted granted Critical
Publication of CN109032793B publication Critical patent/CN109032793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The embodiment of the application discloses a method, a device, a terminal and a storage medium for resource allocation, which belong to the technical field of computers. Therefore, in the embodiment of the application, the system in the terminal can actively acquire the resource adjustment parameter according to whether the thread running in the target application is the thread on which the image rendering thread depends, so that the target application actively acquires the system resource required by the current scene when running, the risk of image display blockage caused by insufficient system resources is reduced, and the running stability of the target application and the smoothness of image display are improved.

Description

Resource allocation method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a resource configuration method, a resource configuration device, a terminal and a storage medium.
Background
With the increasing functionality of the application programs, the system resource demand of the terminal is increasing when the application programs are operated.
In the related art, when an application starts, a system of a terminal allocates a system resource of a specified size to the application. And when the system resources can meet the running requirements of the application program, the application program runs normally.
However, when the system resources cannot meet the operation requirements of the application, the application may be stuck because the required system resources cannot be acquired.
Disclosure of Invention
The embodiment of the application provides a resource configuration method, a resource configuration device, a terminal and a storage medium, which can solve the problem that when system resources cannot meet the operation requirements of an application program, the application program is blocked because the required system resources cannot be acquired. The technical scheme is as follows:
according to a first aspect of the present application, there is provided a method of resource configuration, the method comprising:
acquiring a target identifier of a target application, wherein the target identifier is an identifier of a thread currently operated by the target application;
detecting whether the target identifier belongs to a feature identifier, wherein the feature identifier is used for indicating a thread on which an image rendering thread of the target application depends;
when the target identifier belongs to the feature identifier, acquiring a resource adjustment parameter corresponding to the target identifier, wherein the resource adjustment parameter is used for configuring system resources for the target application;
and configuring system resources for the target application according to the resource adjustment parameters.
According to a second aspect of the present application, there is provided an apparatus for resource configuration, the apparatus comprising:
the identification acquisition module is used for acquiring a target identification of a target application, wherein the target identification is an identification of a thread currently operated by the target application;
the identification detection module is used for detecting whether the target identification belongs to a characteristic identification, and the characteristic identification is used for indicating a thread on which an image rendering thread of the target application depends;
a parameter obtaining module, configured to obtain a resource adjustment parameter corresponding to the target identifier when the target identifier belongs to the feature identifier, where the resource adjustment parameter is used to configure a system resource for the target application;
and the resource allocation module is used for allocating system resources for the target application according to the resource adjustment parameters.
According to a third aspect of the present application, there is provided a terminal comprising a processor and a memory, wherein at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method for configuring resources according to the first aspect.
According to a fourth aspect of the present application, there is provided a computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the method of resource configuration according to the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, a system in the terminal can actively acquire the resource adjustment parameter according to whether the thread running in the target application is the thread on which the image rendering thread depends, and when the thread running in the target application is the thread on which the image rendering thread depends, acquire the corresponding resource adjustment parameter and configure system resources for the target application, so that the target application actively acquires the system resources required by the current scene during running, the risk of image display blockage caused by insufficient system resources is reduced, and the running stability of the target application and the fluency of image display are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a block diagram illustrating a terminal 100 according to an exemplary embodiment of the present application;
FIG. 2 is a schematic diagram illustrating data communication between a third party application and an operating system;
FIG. 3 shows a system architecture diagram of an Android system;
FIG. 4 is a schematic diagram illustrating data communication between another third party application and an operating system;
FIG. 5 is a schematic diagram illustrating data communication between a third party application and an operating system;
FIG. 6 illustrates a system architecture diagram of an IOS system;
FIG. 7 is a flow diagram of a method for resource configuration provided by an exemplary embodiment of the present application;
FIG. 8 is a flowchart of a method for another resource configuration provided by another exemplary embodiment of the present application;
FIG. 9 is a block diagram illustrating an apparatus for resource configuration provided by an exemplary embodiment of the present application;
fig. 10 is a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In order to make the solution shown in the embodiments of the present application easy to understand, several terms appearing in the embodiments of the present application will be described below.
The target application comprises the following steps: is an application that can be installed and run in the terminal, i.e., an application that can be installed and run in the operating system of the terminal. Optionally, the target application invokes an image rendering thread, and the thread on which the image rendering thread depends optimizes the image displayed by the target application.
Alternatively, the target application may be at least one of a gaming application, a shopping application, an instant messaging application, a blogging application, a mapping and drawing application, a text editing application, a ticketing application, a map navigation application, a video playback application, a live broadcast application, a browser application, a reading application, a music application, a financial payment application, a camera application, a photo beautification program, a smart device control application, a telephony application, a text messaging program, a weather application, a clock program, a system search application, a contacts program, a shared traffic application, a logistics application, a taxi taking application, a take-away application, an attendance card punching application, and a code scanning application.
Alternatively, when the target application is a game application, the game application may include at least one of a separately packaged game application, a game application providing a launch portal through a third party application, and a game application integrated in a third party application.
Alternatively, when the gaming application is a stand-alone packaged gaming application, the gaming application may be a separate application, program or client. For example, the game application may be an application installed in a terminal mounting an android system by apk (android package); alternatively, the game application may be an application installed in a terminal having an ios operating system installed therein via an ipa (apple app) installation package.
Alternatively, when the game application is an application that provides access through a third-party application, the game application may be provided access by the specified third-party application. For example, the game application may be a mini program (mini program), a Light App (Light App), a fast App, or the like written by html5(HyperText Markup Language 5, 5 th edition).
Optionally, the game applications may also be classified according to the way the game is played, and may for example comprise at least one of a first person shooter type game application FPS, a role-playing type game application RPG, an action role-playing type game application ARPG, a multiplayer online tactical sports game application MOBA, a massively multiplayer online type game application MMOG, an elimination type game application, a fishing type game application, a card type game application, a music type game application and a placement type game application.
In one possible implementation, when the gaming application is a massively multiplayer online class gaming application, MMOG, the MMOG may include: at least one of a policy-like massively multiplayer online game application MMOSLG, an adventure-like massively multiplayer online game application MMOAVG, a simulation-like massively multiplayer online game application MMOSG, a sports-like massively multiplayer online game application MMOSPT, a racing-like massively multiplayer online game application MMORCG, and a role-playing massively multiplayer online game application MMORPG.
Alternatively, the gaming application may run in a three-dimensional virtual environment provided by the gaming engine, which may be a three-dimensional virtual environment displayed when the gaming application is run on the terminal. The three-dimensional virtual environment may be a simulation environment of a real world, a semi-simulation semi-fictional environment, or a completely fictional environment.
It should be noted that the game engine may also create a virtual object in the three-dimensional virtual environment, and the virtual object may be a virtual character, a virtual animal, a virtual plant, a virtual article, and the like. Such as characters, animals, plants, houses, vehicles, guns, body armor, helmets, scopes, medical kits, etc., that are displayed in a three-dimensional virtual environment. Alternatively, the virtual object may be created by an animation skeleton technique provided by the game engine. Each virtual object has its own shape and volume in the three-dimensional virtual environment, occupying part of the space in the three-dimensional virtual environment.
Optionally, in some gaming applications, a camera model is also provided, which is located around a virtual object in a three-dimensional virtual environment. For example, when the game application is FPS, RPG, ARPG, MOBA, or MMOG, the camera model may be located near or at the head of the virtual object at the first-person perspective, and capture the perspective of the eyes of the virtual object as the photographic object; when the over-shoulder view angle of the first person is adopted, the camera model is positioned behind the virtual object, and the game picture acquired by the over-shoulder view angle comprises part or all of the virtual object.
Optionally, the target application may be in corresponding scenes at different stages of the running process, and the target application may include at least one designated scene during the running process. Optionally, when the target application is a game application, the specified scene includes a garbage collection scene, a resource loading scene, a resource updating scene, an account login scene, a game main interface scene, and a mall interface scene. When the appointed scene is at least one of a garbage recovery scene, a resource loading scene, a gun shooting scene, a vehicle driving scene and a playground circle battle scene, the game application can call an image rendering thread to perform loading optimization on the image. Optionally, when the game application calls the image rendering thread to perform load optimization on the image, the game application will call the thread on which the image rendering thread depends at the same time, so that the image rendering work of the game application is completed normally.
Target identification: may refer to the identification of the thread that the target application is currently running. Optionally, the target identifier may be an ID of the thread, or may also be a number of the thread, which is not limited in this embodiment.
Characteristic identification: may be used to indicate the threads on which the image rendering threads of the target application depend. Optionally, the target identifier may be an ID of the thread, or may also be a number of the thread, which is not limited in this embodiment.
Resource adjustment parameters: and the target parameters are used for instructing the terminal to adjust the hardware. Optionally, the resource adjustment parameter may be at least one of a utilization rate of a Central Processing Unit (CPU), a core number of the CPU, a utilization rate of a Graphics Processing Unit (GPU), a core number of the GPU, and an input/output interface I/O rate. The resource adjustment parameter may also be a parameter of other hardware capable of adjusting, which is not limited in this application.
System resources: refers to hardware that can affect the graphics loading performance of a target application. In one possible implementation, system resources may refer to hardware resources in a terminal for graphics processing. Optionally, the system resource includes at least one of a CPU resource, a GPU resource, a memory bandwidth resource, a disk resource, and a network resource.
For example, the resource configuration method shown in the embodiment of the present application may be applied to a terminal, where the terminal has a display screen and a function of running a target application. The terminal may include a mobile phone, a tablet computer, a laptop computer, a desktop computer, a computer all-in-one machine, a server, a workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-and-read machine, an electronic book, an electronic dictionary, a vehicle-mounted terminal, a Virtual Reality (VR) player terminal, an Augmented Reality (AR) player terminal, or the like.
In a possible implementation manner, the terminal may implement the following architecture in order to apply the method for resource configuration shown in the embodiment of the present application. Referring to fig. 1, a block diagram of a terminal 100 according to an exemplary embodiment of the present application is shown. The terminal 100 may be an electronic device capable of running an application, such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, an all-in-one computer, a server, a workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-and-read machine, an electronic book, an electronic dictionary, a vehicle-mounted terminal, a Virtual Reality (VR) player terminal, or an Augmented Reality (AR) player terminal. The terminal 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and an input-output device 130.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall terminal 100 using various interfaces and lines, and performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like, and the operating system may be an Android (Android) system (including a system based on Android system depth development), an IOS system developed by apple inc (including a system based on IOS system depth development), or other systems. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
The memory 120 may be divided into an operating system space, where an operating system runs, and a user space, where native and third-party applications run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
As shown in fig. 2, in order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
Taking an operating system as an Android system as an example, programs and data stored in the memory 120 are as shown in fig. 3, and a Linux kernel layer 220, a system runtime library layer 240, an application framework layer 260, and an application layer 280 may be stored in the memory 120, where the Linux kernel layer 220, the system runtime library layer 240, and the application framework layer 260 belong to an operating system space, and the application layer 280 belongs to a user space. The Linux kernel layer 220 provides underlying drivers for various hardware of the terminal 100, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, power management, and the like. The system runtime library layer 240 provides the main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system Runtime layer 240 is an Android Runtime library (Android Runtime), which mainly provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 260 provides various APIs that may be used in building applications, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 280, and the application programs may be native application programs of the operating system, such as a contact program, a short message program, a clock program, a camera application, and the like; or a third-party application developed by a third-party developer, such as a game-like application, an instant messaging program, a photo beautification program, a shopping program, and the like.
One possible communication between the operating system and third-party applications is shown in fig. 4, where the third-party applications have Software Development Kits (SDKs) embedded therein for communicating with the operating system.
The SDK includes a plurality of abstracted Application Programming Interfaces (APIs), which are provided by an operating system developer to a third-party Application developer, and the third-party Application developer embeds the SDK into the third-party Application. After the third-party application program is installed and operated in the operating system, the API provided by the SDK can be called to communicate with the operating system.
As shown in fig. 4, the system runtime layer 240 may additionally include an interface communication system 242. The interface communication system 242 may be viewed as a subsystem within the operating system or as an application embedded within the operating system. The interface communication system 242 is provided with an SDK interface, and a third-party application calls an API of the embedded SDK to perform data communication with the SDK interface in an adhesion (Binder) manner. In this way, the data related to the application scenario of the third party application can be transmitted to the operating system through the SDK. By means of the embedded SDK, the operating system can also actively transmit data to the third-party application program, or the operating system and the third-party application program can perform bidirectional data transmission.
In another possible communication manner, as shown in fig. 5, the third-party application may also establish a long connection with a Socket interface of the interface communication system 242 in a Socket manner, and data related to the application scenario of the third-party application may be transmitted to the operating system through the long connection.
As shown in fig. 4 and 5, different policy modules may be arranged in the interface communication system 242, and after receiving data sent by the third-party application program, the interface communication system 242 analyzes the data by using the policy module corresponding to the third-party application program to obtain a corresponding resource adaptation optimization policy. Based on the analyzed resource adaptation optimization strategy, the interface communication system 242 notifies the Linux kernel layer 220 through the control interface to perform system resource adaptation optimization. The control interface may communicate with the Linux kernel layer 220 in a Sysfs manner.
In yet another possible implementation manner, the operating system may obtain the target identifier in the third-party application program (i.e., the target program) in an inter-process communication manner, without implanting an SDK interface in the third-party application in advance, so that the terminal has an effect of providing system resources for the third-party application that are not processed in advance.
Optionally, different policy modules in the interface communication system 242 may correspond to different third-party applications (that is, policy modules are set for different applications), or different policy modules correspond to different types of third-party applications (that is, policy modules are set for different types of applications), or different policy modules correspond to different system resources (that is, policy modules are set for different system resources), or different policy modules correspond to different application scenarios (that is, policy modules are set for different application scenarios), and the specific setting manner of the policy modules is not limited in the embodiment of the present application.
The interface communication system 242 may also communicate with the application framework layer 260 in a Binder manner, and is configured to receive foreground application information sent by the application framework layer 260, so that system resource optimization is performed only for a third-party application program currently running in a foreground based on the foreground application information.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are shown in fig. 6, and the IOS system includes: a Core operating system Layer 320(Core OS Layer), a Core Services Layer 340(Core Services Layer), a Media Layer 360(Media Layer), and a touchable Layer 380(Cocoa Touch Layer). The kernel operating system layer 320 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the kernel services layer 340. The core services layer 340 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, that are needed by the application. The media layer 360 provides audiovisual interfaces for applications, such as graphics-related interfaces, audio-related interfaces, video-related interfaces, and audio/video transmission technology wireless broadcast (AirPlay) interfaces. The touchable layer 380 provides various common interface-related frameworks for application development, and the touchable layer 380 is responsible for user touch interaction operations on the terminal 100. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework illustrated in FIG. 6, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 340 and a UIKit framework in the touchable layer 380. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The Android system can be referred to as a mode and a principle for realizing data communication between the third-party application program and the operating system in the IOS system, and details are not repeated herein.
The input-output device 130 may include a touch display screen for receiving a touch operation of a user thereon or nearby using any suitable object such as a finger, a touch pen, or the like, and displaying a user interface of each application. The touch display screen is generally provided at a front panel of the terminal 100. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configuration of terminal 100 as illustrated in the above-described figures is not intended to be limiting of terminal 100, and that terminals may include more or less components than those illustrated, or some components may be combined, or a different arrangement of components. For example, the terminal 100 further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a Wireless Fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
Please refer to fig. 7, which is a flowchart illustrating a method for configuring resources according to an exemplary embodiment of the present application. The resource allocation method can be applied to the terminal shown above. Optionally, the resource configuration method may be executed by a system service or a system application in the operating system, which is not limited in this embodiment. In fig. 1, the method for resource allocation includes:
step 710, a target identifier of the target application is obtained, where the target identifier is an identifier of a currently running thread of the target application.
In the embodiment of the application, the operating system can acquire the target identifier of the target application. It should be noted that the target application is a third party application. Wherein the target identification is an identification of a thread currently running by the application. Optionally, the target application is an application running in the foreground in the terminal.
In a communication mode in which an operating system obtains a target identifier of a target application, the operating system establishes a data interaction channel with a second SDK (Software Development Kit) embedded in the target application through a first SDK; and acquiring a target identifier of the target application through the data interaction channel.
For example, when the terminal runs a game application with a high performance requirement in the foreground, the operating system may obtain an identification of the thread currently running by the target application. The obtaining mode may be periodic obtaining or obtaining when the thread changes. For example, the operating system may obtain the identification of the thread currently running by the target application in a 1 millisecond period. Alternatively, the operating system may monitor the thread called by the target application, and when the target application newly invokes the thread and/or deactivates the thread, the operating system will retrieve the identification of the thread currently running by the target application.
Alternatively, a target application invoking target thread may indicate that the application is in a specified scenario, which may be a garbage collection scenario (GC) and a resource loading scenario.
And 720, detecting whether the target identifier belongs to a feature identifier, wherein the feature identifier is used for indicating a thread on which an image rendering thread of the target application depends.
In the embodiment of the application, the operating system can detect whether the target identifier belongs to a feature identifier, wherein the feature identifier is used for indicating a thread on which an image rendering thread of the target application depends.
In a possible implementation manner, the characteristic identifier may be data stored in the memory chip in advance by the terminal. In this embodiment, the feature identifier may be data that is written in advance by the terminal at the time of shipment, or may be data that is acquired by the terminal from a push message of a related server.
In another possible implementation manner, the feature identifier may also be an identifier determined by an operating system of the terminal according to an image rendering thread of the target application, and in this implementation manner, the operating system may perform the following steps to obtain the feature identifier.
And (1) acquiring a rendering thread identifier of an image rendering thread of the target application.
And (2) searching threads which are depended by the image rendering threads according to the rendering thread identifiers.
And (3) determining the identifier of the thread on which the image rendering thread depends as a feature identifier, and storing the feature identifier in a feature identifier library.
In one possible implementation, the operating system may perform this step after the target application is launched. For example, after the game application a is normally started, the operating system may perform the above steps (1) to (3) in the background, so as to establish the feature identifier library.
In another possible implementation manner, the operating system may perform the above steps (1) to (3) when the target application is started for the first time, so as to establish the feature identifier library. It should be noted that the first starting of the target application may refer to the first starting of the application after the terminal completes installation of the target application, or may refer to the first starting of the target application after the target application completes resource update.
It should be noted that, when the terminal is provided with the feature identifier library, the operating system may search the feature identifier matching the target identifier from the feature identifier library.
And 730, when the target identifier belongs to the feature identifier, acquiring a resource adjustment parameter corresponding to the target identifier, wherein the resource adjustment parameter is used for configuring system resources for the target application.
In the embodiment of the application, when the target identifier belongs to the feature identifier, the operating system obtains a resource adjustment parameter corresponding to the target identifier, where the resource adjustment parameter is used to configure system resources for the target application.
In one possible implementation, the operating system is preset with a corresponding relationship between the specific feature identifier and the system adjustment parameter. The operating system may determine whether the target identifier belongs to the feature identifier, and then determine which feature identifier the target identifier belongs to, and determine the system adjustment parameter corresponding to the feature identifier as the resource adjustment parameter corresponding to the target identifier.
Watch 1
Figure BDA0001727064270000121
Wherein, table one shows a correspondence between the feature identifier and the system tuning parameter that can be implemented. When the operating system recognizes that the target identifier belongs to the feature identifier, the operating system determines which feature identifier in table one the target identifier belongs to. For example, when the operating system determines that the target identifier belongs to the feature identifier C, the operating system determines the resource adjustment parameter corresponding to the target identifier as "CPU utilization 50%, GPU utilization 50%". The operating system may obtain the resource adjustment parameter corresponding to the target identifier when finding the feature identifier matching the target identifier from the feature identifier library composed of the feature identifier a, the feature identifier B, the feature identifier C, and the feature identifier D.
Step 740, configuring system resources for the target application according to the resource adjustment parameters.
In the embodiment of the application, the operating system configures system resources for the target application according to the resource adjustment parameter. Since the step is specifically executed by the system application or the system service in the operating system, the system application or the system service adjusts the corresponding hardware according to the resource adjustment parameter, so as to complete the configuration of the system resource for the target application. For example, when the resource adjustment parameter is "CPU usage 50%, GPU usage 50%", the operating system will allocate 50% of the CPU usage resource for the target application and 50% of the GPU usage resource for the GPU.
In one possible implementation, the priority of the system application or system service adjustment hardware may be set to be highest so that the system application or system service configures system resources for the target application in a shorter time.
In summary, in the embodiment of the present application, a system in a terminal can actively obtain a resource adjustment parameter according to whether a thread running in a target application is a thread on which an image rendering thread depends, and when the thread running in the target application is a thread on which an image rendering thread depends, obtain a corresponding resource adjustment parameter and configure system resources for the target application, so that the target application actively obtains system resources required by a current scene during running, a risk of image display stagnation caused by insufficient system resources is reduced, and running stability of the target application and smoothness of image display are improved.
On the basis of the previous embodiment, the terminal can also locally generate the resource adjustment parameter corresponding to the target identifier. Please refer to the following examples.
Please refer to fig. 8, which is a flowchart illustrating another method for configuring resources according to another exemplary embodiment of the present application. The resource allocation method can be applied to the terminal shown above. In fig. 8, the method for resource allocation includes:
step 801, obtain a target identifier of a target application.
In the embodiment of the present application, the execution process of step 801 is the same as the execution manner of step 710, and is not described herein again. Wherein the target identification is an identification of a thread currently running by the target application.
Step 802, detecting whether the target identifier belongs to the feature identifier.
In the embodiment of the present application, the execution process of step 802 is the same as the execution process of step 720, and is not described herein again. Wherein the feature identifies a thread upon which an image rendering thread for the indication target application depends.
It should be noted that after the operating system performs step 802, the operating system may perform step 803 and step 804, or may also perform step 805 to step 807, or may also perform step 808 to step 811.
And 803, when the target identifier belongs to the feature identifier, acquiring a running log of the target thread.
In this embodiment of the application, when the target identifier belongs to the feature identifier, the operating system may obtain an operation schedule of the target thread, and the operation log records historical operation data of the target thread.
It should be noted that the running schedule may be implemented as a data group or a character string, and the running log may be stored as a separate file, for example, a file with a format of xml (eXtensible Markup Language) or txt (text). Alternatively, the execution log may be integrated in a designated area of another file, for example, in the execution log of the target application.
Wherein the historical operating data comprises: at least one of thread running time, CPU utilization rate, GPU utilization rate and I/O rate of input/output interface.
And step 804, acquiring data of n times of operation from the operation log, inputting the data of n times of operation into the parameter calculation model, and acquiring the resource adjustment parameter.
In this embodiment of the present application, the operating system may obtain data of n times of operations from the operation log, and input the data of n times of operations into the parameter calculation model, where n is a positive integer.
In a possible implementation manner, the operating system obtains data of at least two times of running of the target thread from the running log, and inputs the data of at least two times of running into the parameter calculation model together, wherein n is a positive integer. At this point, the parametric calculation model will process the data for the at least two runs.
Optionally, the parameter calculation model is a weighted evaluation model, and the weighted evaluation model is configured to assign a corresponding weight to each piece of operating data, and determine a sum of each piece of weighted operating data as the resource adjustment parameter. For the data of n times of operation, the duration between the time of ending the operation and the current system time is inversely related to the weight of the corresponding data. Wherein, the data of n times of operation includes: at least one of the utilization rate of the central processing unit CPU, the utilization rate of the graphic processing unit GPU and the I/O rate of the input/output interface.
For example, the operating system acquires data of the target thread which runs three times in the last time, and the data is divided into data D1, data D2 and data D3 from far to near from the near-running end time. The weighted evaluation model assigns weights to the cubic data of 0.1, 0.3, and 0.6, respectively. If the data that the target thread runs three times last only includes the utilization rate of the CPU, the correspondence between the data content and the weight that the target thread runs three times last can be referred to in table two.
Watch two
Operating data D1 D2 D3
Data content The utilization rate of the CPU is 47 percent The utilization rate of the CPU is 43 percent The utilization rate of the CPU is 52%
Weight of 0.1 0.3 0.6
When the parameter calculation model provides the weights as shown in table two, the operating system may calculate the resource adjustment parameter G through the parameter calculation model according to the following formula: if the result of the calculation is that G is 47% × 0.1+ 43% × 0.3+ 52% × 0.6 and G is 48.8%, the operating system determines the resource adjustment parameter as the CPU utilization rate of 48.8% and acquires the data.
In another possible implementation, the operating system obtains the last run data from the run log and inputs the last run data into the parameter calculation model. When the parameter calculation model detects that the running data is only one data, the parameter calculation model directly outputs the last running data. The operating system then determines this last run of data as a resource adjustment parameter.
Step 805, when the history data includes the thread running time length and the target identifier belongs to the feature identifier, obtaining the time length of n times of running from the running log of the target thread, and inputting the time length data of n times of running into the weighted evaluation model to obtain the running time length of the target thread.
In this embodiment, when the history data includes the running time of the thread and the target identifier belongs to the feature identifier, the operating system obtains the running time of n times from the running log of the target thread, and inputs the running time data of n times into the weighted evaluation model to obtain the running time of the target thread. It should be noted that the target thread running time is a historical statistical data, and is not used to set the actual running time limit of the target thread. The actual running time of the target thread is still controlled by the target application, and the operating system does not intervene.
Referring to table three, table three shows the calculated parameters of the target thread run length provided by a weighted evaluation model.
Watch III
Duration identification T1 T2 T3 Tm
Duration of time 500ms 1100ms 1000ms 980ms
Weight of 0.1 0.3 0.6 1
In table three, when the target identifier belongs to the feature identifier, the operating system obtains the time length of the last three runs from the run log of the target thread, the sequence from far to near from the end time of the runs is T1, T2 and T3, the weighted evaluation models are the models belonging to weights 0.1, 0.3 and 0.6, respectively, and according to the formula for calculating the target thread run time length Tm: tm is 500ms × 0.1+1100ms × 0.3+1000ms × 0.6, and calculated as 980 ms. That is, under the data in Table three, the operating system will confirm that the target thread run length is 980 ms.
Step 806, detecting whether the running time of the target thread is greater than a target threshold.
In this embodiment, a target threshold, which is a specified duration data, is stored in advance in the operating system. It should be noted that the duration data may be an empirical value set by a technical developer for a scenario where a terminal runs a target thread, and the target threshold may be modified in a scenario where a system updates a resource package, downloads a patch, or upgrades a system function.
After the operating system obtains the target thread running time, the operating system may detect whether the target running time is greater than a target threshold. For example, when the target threshold is 1000ms and the target thread running time is 980ms, the operating system will detect that the target thread running time is not greater than the target threshold.
In step 807, if the target thread running time is not greater than the target threshold, the resource adjustment parameter is adjusted to the system remaining resource value.
In this embodiment, if the target thread running duration is not greater than the target threshold, the operating system adjusts the resource adjustment parameter to the system remaining resource value.
In the actual implementation scene, in order to guarantee the operation effect of the target thread and not cause large power consumption pressure on the terminal, the estimation of the operation time of the target thread is designed. When the estimated value is that the running time of the target thread is not greater than the target threshold, the operating system considers that the target thread can call all the remaining system resources in a short time, and large power consumption pressure on the system is not caused. Therefore, the design can guarantee the operation effect of the target thread to the maximum extent on the premise of not causing large power consumption pressure on the terminal, reduce the risk of image display blockage caused by insufficient system resources, and improve the stability of target application operation and the smoothness of image display.
In an actual implementation scenario, for example, if the remaining system resources are 43% of CPU usage and 55% of GPU usage, the operating system allocates both 43% of CPU usage and 55% of GPU usage to the target application.
The resource adjustment parameter includes at least one of a CPU usage rate, a GPU usage rate and an I/O rate.
And 808, when the target identifier belongs to the feature identifier, matching and acquiring the resource adjustment parameter corresponding to the target identifier from the adjustment parameter library.
In the embodiment of the application, when the target identifier belongs to the feature identifier, the operating system matches and obtains the adjustment parameter corresponding to the target identifier from the adjustment parameter library. Alternatively, the adjustment parameter library may be an adjustment policy preset by the terminal, and the adjustment policy may be a resource adaptation optimization policy mentioned in fig. 4 or fig. 5.
Step 809, configuring system resources for the target application according to the first adjustment parameter in the first period.
In the embodiment of the application, the operating system configures system resources for the target application according to the first adjustment parameter in the first time period.
And step 810, detecting whether the target application is stuck within a second time interval.
In the embodiment of the application, the operating system detects whether the target application is stuck within the second time period. Wherein the second period is one of the first periods, e.g., the first period is 10:00 to 10: 05 for a period of 5 minutes, the second period may be a period between 10:00 and 10: 05. The operating system will detect whether the target application is stuck during this second period. Optionally, the cause of the stuck condition includes dropped frames and network delay. In the application, the operating system can judge that the target application is stuck by detecting the frame rate of the target application. For example, when the operating system detects that the frame rate of the target application is lower than a preset frame rate, the operating system determines that the target application is stuck.
In step 811, if the target application is stuck in the second time period, the second adjustment parameter is obtained as the resource adjustment parameter of the target application in the third time period.
In this embodiment of the application, if the target application is stuck in the second time period, the operating system may obtain the second adjustment parameter. It should be noted that the system resource indicated by the second adjustment parameter is higher than the system resource indicated by the first adjustment parameter. For example, the system resource indicated by the first tuning parameter may be 20% CPU usage, and the system resource indicated by the second tuning parameter may be greater than 20% CPU usage. For example, 25% CPU utilization. The operating system may allocate system resources for the target application in accordance with the second adjustment parameter during the third time period. The third time interval is a next time interval adjacent to the second time interval, and the third time interval is not limited in the embodiment of the present application.
And step 812, when the target thread stops running, releasing the system resources configured for the target application according to the resource adjustment parameters.
In the embodiment of the application, the target thread occupies more system resources. Therefore, the power consumption of the target thread is comprehensively considered, and the system resources configured for the target application according to the resource adjustment parameters are released when the target thread stops running.
In summary, the resource configuration method provided in this embodiment can enable the operating system to obtain the identifier of the target application, obtain the running log of the target thread when it is detected that the target identifier belongs to the feature identifier, obtain data of n times of running from the running log, input the data of n times of running into the parameter calculation model, and obtain the resource adjustment parameter. Therefore, according to the embodiment, when the thread currently running in the target application depends on the image rendering thread, the running log can be obtained from the target thread and the resource adjustment parameter can be calculated, so that the resource adjustment parameter can meet the requirement of the target application, large power consumption can not be caused, and the balance of power consumption and application blockage can be realized.
The resource configuration method provided in this embodiment can also obtain the running time length of n times from the running log of the target thread when the history data includes the running time length of the thread and the target identifier belongs to the feature identifier, input the running time length data of n times into the weighted evaluation model to obtain the running time length of the target thread, and adjust the resource adjustment parameter to the remaining resource value of the system if the running time length of the target thread is not greater than the target threshold. According to the method and the device, when the estimated running time of the target thread is not more than the target threshold value, the resource adjustment parameter can be adjusted to the value of the residual system resource, so that the target thread in the target application can acquire all the residual system resources in the system, and the running smoothness of the target application is guaranteed to the greatest extent.
The resource configuration method provided in this embodiment can further match and obtain a resource adjustment parameter corresponding to the target identifier from the adjustment parameter library when the target identifier belongs to the feature identifier, configure the system resource for the target application according to the first adjustment parameter in a first time period, detect whether the target application is stuck in a second time period included in the first time period, and if the target application is stuck in the second time period, obtain the second adjustment parameter as the resource adjustment parameter of the target application in a third time period. Wherein the system resource indicated by the second adjustment parameter is higher than the system resource indicated by the first adjustment parameter, and the third time interval is a next time interval adjacent to the second time interval. The operating system can acquire more system resources in time when the target application is blocked after the first adjustment parameter is set. Therefore, the method and the device for adjusting the display image can achieve rapid acquisition of the system resources required by the target application under the condition that the terminal does not have the calculation resource adjustment parameters, reduce the risk of image display blockage caused by insufficient system resources, and improve the running stability of the target application and the smoothness of image display.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 9, a block diagram of an apparatus for resource configuration according to an exemplary embodiment of the present application is shown. The resource configuring means may be implemented as all or a part of the terminal by software, hardware or a combination of both. The device includes:
an identifier obtaining module 910, configured to obtain a target identifier of a target application, where the target identifier is an identifier of a currently running thread of the target application;
an identifier detecting module 920, configured to detect whether the target identifier belongs to a feature identifier, where the feature identifier is used to indicate a thread on which an image rendering thread of the target application depends;
a parameter obtaining module 930, configured to obtain a resource adjustment parameter corresponding to the target identifier when the target identifier belongs to the feature identifier, where the resource adjustment parameter is used to configure a system resource for the target application;
a resource allocation module 940, configured to allocate system resources for the target application according to the resource adjustment parameter.
In an optional embodiment, the apparatus further comprises an execution module, configured to obtain a rendering thread identifier of an image rendering thread of the target application; searching threads on which the image rendering threads depend according to the rendering thread identifiers; and determining the identifier of the thread on which the image rendering thread depends as the feature identifier, and storing the feature identifier in a feature identifier library.
In an optional embodiment, the executing module is further configured to search the feature identifier library for the feature identifier matching the target identifier. The parameter obtaining module 930 is configured to obtain a resource adjustment parameter corresponding to the target identifier when the feature identifier matching the target identifier is found in the feature identifier library.
In an optional embodiment, the parameter obtaining module 930 is configured to, when the target identifier belongs to the feature identifier, obtain a running log of the target thread, where the running log is used to record historical running data of the target thread; and acquiring data of n-time operation from the operation log, inputting the data of n-time operation into a parameter calculation model, and acquiring the resource adjustment parameter, wherein n is a positive integer.
In an alternative embodiment, the historical operating data obtained by the parameter obtaining module 930 includes: at least one of thread running time, CPU utilization rate, GPU utilization rate and I/O rate of input/output interface.
In an alternative embodiment, in the present apparatus, the parameter calculation model is a weighted evaluation model, and the weighted evaluation model is configured to assign a corresponding weight to each of the run data, and determine a sum of each of the weighted run data as the resource adjustment parameter; and aiming at the data of the n times of operation, the duration between the time of ending the operation and the current system time is inversely related to the weight of the corresponding data.
In an optional embodiment, when the history data includes the thread running time length, and when the target identifier belongs to the feature identifier, the apparatus is configured to obtain a running time length of n times from the running log when the target identifier belongs to the feature identifier, and input the running time length data of n times into a weighted evaluation model to obtain the running time length of the target thread; detecting whether the running time of the target thread is greater than a target threshold value; and if the running time of the target thread is not greater than the target threshold, adjusting a resource adjustment parameter to a system residual resource value, wherein the resource adjustment parameter comprises at least one of the utilization rate of the CPU, the utilization rate of the GPU and the I/O rate.
In an optional embodiment, the parameter obtaining module 930 is configured to, when the target identifier belongs to the feature identifier, match and obtain a first resource adjustment parameter corresponding to the target identifier from an adjustment parameter library. A resource configuration module 940, configured to configure system resources for the target application according to the first adjustment parameter in a first period.
In an optional embodiment, the detecting whether the target application is stuck within a second time period, wherein the second time period is one time period included in the first time period; if the target application is stuck in the second time interval, acquiring a second adjusting parameter as a resource adjusting parameter of the target application in a third time interval, wherein the system resource indicated by the second adjusting parameter is higher than the system resource indicated by the first adjusting parameter, and the third time interval is the next time interval adjacent to the second time interval.
In an optional embodiment, the identifier obtaining module 910 is configured to establish a data interaction channel with a second SDK embedded in the target application through a first software development kit SDK; and acquiring a target identifier of the target application through the data interaction channel.
In an alternative embodiment, the target application involved in the device comprises at least one of a gaming application, a shopping program, an instant messaging program, a blogging application, a drawing application, a text editing application, a ticketing application, a map navigation application, a video playing application, a live broadcast application, a browser application, a reading application, a music application, a financial payment application, a camera application, a photo beautification program, a smart device control application, a telephony application, a text messaging program, a weather application, a clock program, a system search application, a contacts program, a shared transportation application, a logistics application, a taxi taking application, a take-out application, an attendance card punching application, and a code scanning application.
Referring to fig. 10, which is a block diagram of a terminal according to an exemplary embodiment of the present application, as shown in fig. 10, the terminal includes a processor 1010, a memory 1020 and a screen component 1030, where the memory 1020 stores at least one instruction, and the instruction is loaded and executed by the processor 1010 to implement the method for configuring resources according to the above embodiments. Among other things, screen component 1030 is used to display a user interface for the target application runtime.
The present application further provides a computer-readable medium, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement the method for resource allocation according to the above embodiments.
The present application further provides a computer program product, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement the method for resource allocation according to the above embodiments.
It should be noted that: in the method for resource allocation provided in the foregoing embodiment, only the division of the functional modules is illustrated when executing the method for resource allocation, and in practical applications, the function allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the resource allocation apparatus and the resource allocation method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A method of resource allocation, the method comprising:
acquiring a target identifier of a target application, wherein the target identifier is an identifier of a thread currently operated by the target application;
detecting whether the target identifier belongs to a feature identifier, wherein the feature identifier is used for indicating a thread on which an image rendering thread of the target application depends;
when the target identifier belongs to the feature identifier, matching and acquiring a first resource adjusting parameter corresponding to the target identifier from an adjusting parameter library, wherein the resource adjusting parameter is used for configuring system resources for the target application;
in a first period, configuring system resources for the target application according to a first adjusting parameter;
detecting whether the target application is stuck within a second time period, wherein the second time period is one time period contained in the first time period;
if the target application is stuck in the second time interval, acquiring a second adjusting parameter as a resource adjusting parameter of the target application in a third time interval, wherein the system resource indicated by the second adjusting parameter is higher than the system resource indicated by the first adjusting parameter, and the third time interval is the next time interval adjacent to the second time interval.
2. The method of claim 1, further comprising:
acquiring a rendering thread identifier of an image rendering thread of the target application;
searching threads on which the image rendering threads depend according to the rendering thread identifiers;
and determining the identifier of the thread on which the image rendering thread depends as the feature identifier, and storing the feature identifier in a feature identifier library.
3. The method of claim 2, wherein the detecting whether the target identifier belongs to a feature identifier comprises:
searching the characteristic identification matched with the target identification in the characteristic identification library;
when the target identifier belongs to the feature identifier, acquiring a resource adjustment parameter corresponding to the target identifier includes:
and when the characteristic identifier matched with the target identifier is found in the characteristic identifier library, acquiring a resource adjustment parameter corresponding to the target identifier.
4. The method according to claim 1, wherein when the target identifier belongs to the feature identifier, matching and obtaining a first resource adjustment parameter corresponding to the target identifier from an adjustment parameter library includes:
when the target identification belongs to the feature identification, acquiring an operation log of a target thread, wherein the operation log is used for recording historical operation data of the target thread;
and acquiring data of n-time operation from the operation log, inputting the data of n-time operation into a parameter calculation model, and acquiring the resource adjustment parameter, wherein n is a positive integer.
5. The method of claim 4, wherein the historical operating data comprises: at least one of thread running time, CPU utilization rate, GPU utilization rate and I/O rate of input/output interface.
6. The method of claim 4, wherein the parameter calculation model is a weighted evaluation model for assigning a corresponding weight to each of the run data and determining a sum of each weighted run data as the resource adjustment parameter;
and aiming at the data of the n times of operation, the duration between the time of ending the operation and the current system time is inversely related to the weight of the corresponding data.
7. The method according to claim 5, wherein when the historical operating data includes the thread runtime length, and when the target identifier belongs to the feature identifier, obtaining a resource adjustment parameter corresponding to the target identifier includes:
when the target identification belongs to the feature identification, acquiring the time length of n-time operation from the operation log, and inputting the time length data of the n-time operation into a weighted evaluation model to obtain the operation time length of the target thread;
detecting whether the running time of the target thread is greater than a target threshold value;
and if the running time of the target thread is not greater than the target threshold, adjusting a resource adjustment parameter to a system residual resource value, wherein the resource adjustment parameter comprises at least one of the utilization rate of the CPU, the utilization rate of the GPU and the I/O rate.
8. The method of any one of claims 1 to 7, wherein obtaining the target identifier of the target application comprises:
establishing a data interaction channel with a second SDK embedded in the target application through a first Software Development Kit (SDK);
and acquiring a target identifier of the target application through the data interaction channel.
9. The method of any of claims 1 to 7, wherein the target application comprises:
at least one of a gaming application, a shopping application, an instant messaging application, a blogging application, a mapping application, a text editing application, a ticketing application, a map navigation application, a video playback application, a live broadcast application, a browser application, a reading application, a music application, a financial payment application, a camera application, a photo beautification program, a smart device control application, a telephony application, a text messaging program, a weather application, a clock program, a system search application, a contacts program, a shared traffic application, a logistics application, a taxi taking application, a take away application, an attendance card punch application, and a code scan application.
10. An apparatus for resource configuration, the apparatus comprising:
the identification acquisition module is used for acquiring a target identification of a target application, wherein the target identification is an identification of a thread currently operated by the target application;
the identification detection module is used for detecting whether the target identification belongs to a characteristic identification, and the characteristic identification is used for indicating a thread on which an image rendering thread of the target application depends;
a parameter obtaining module, configured to, when the target identifier belongs to the feature identifier, obtain, in a matching manner, a first resource adjustment parameter corresponding to the target identifier from an adjustment parameter library, where the resource adjustment parameter is used to configure a system resource for the target application;
the resource allocation module is used for allocating system resources for the target application according to the first adjustment parameter in a first period;
the resource configuration module is further configured to detect whether the target application is stuck within a second time period, where the second time period is one time period included in the first time period; if the target application is stuck in the second time interval, acquiring a second adjusting parameter as a resource adjusting parameter of the target application in a third time interval, wherein the system resource indicated by the second adjusting parameter is higher than the system resource indicated by the first adjusting parameter, and the third time interval is the next time interval adjacent to the second time interval.
11. A terminal, characterized in that the terminal comprises a processor and a memory, in which at least one instruction is stored, which is loaded and executed by the processor to implement the method of resource allocation according to any of claims 1 to 9.
12. A computer-readable storage medium having stored thereon at least one instruction which is loaded and executed by a processor to implement a method of resource allocation according to any one of claims 1 to 9.
CN201810757425.5A 2018-07-11 2018-07-11 Resource allocation method, device, terminal and storage medium Active CN109032793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810757425.5A CN109032793B (en) 2018-07-11 2018-07-11 Resource allocation method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810757425.5A CN109032793B (en) 2018-07-11 2018-07-11 Resource allocation method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109032793A CN109032793A (en) 2018-12-18
CN109032793B true CN109032793B (en) 2021-03-16

Family

ID=64642168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810757425.5A Active CN109032793B (en) 2018-07-11 2018-07-11 Resource allocation method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109032793B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096378B (en) * 2019-04-29 2021-01-08 杭州涂鸦信息技术有限公司 Inter-thread communication method and related device
CN110278331B (en) * 2019-06-26 2021-08-20 Oppo广东移动通信有限公司 System attribute feedback method, device, terminal and storage medium
CN112231186B (en) * 2019-07-15 2024-03-15 深圳市腾讯网域计算机网络有限公司 Performance data processing method and device, electronic equipment and medium
CN110503042B (en) * 2019-08-23 2022-04-19 Oppo广东移动通信有限公司 Image processing method and device and electronic equipment
CN110515736B (en) * 2019-08-29 2023-01-13 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for limiting background object
CN110532100B (en) * 2019-09-02 2022-04-15 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for scheduling resources
CN110795056B (en) * 2019-11-08 2023-08-15 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for adjusting display parameters
CN111078394B (en) * 2019-11-08 2022-12-06 苏州浪潮智能科技有限公司 GPU thread load balancing method and device
CN110837420B (en) * 2019-11-12 2022-11-15 Oppo广东移动通信有限公司 Resource scheduling method, device, terminal and storage medium
CN111176836B (en) * 2019-12-09 2023-04-28 中国联合网络通信集团有限公司 Cloud rendering resource scheduling method and device
CN111259019B (en) * 2020-01-09 2023-05-12 腾讯科技(深圳)有限公司 Resource allocation method, device, equipment and storage medium
CN112416461B (en) * 2020-11-25 2024-04-12 百度在线网络技术(北京)有限公司 Video resource processing method, device, electronic equipment and computer readable medium
CN112631677A (en) * 2020-12-21 2021-04-09 上海影创信息科技有限公司 Resource support prompting method and system
CN115333941B (en) * 2022-01-28 2023-08-22 花瓣云科技有限公司 Method for acquiring application running condition and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8347302B1 (en) * 2008-10-09 2013-01-01 Amazon Technologies, Inc. System-aware resource scheduling
CN106095592A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of prospect application scenarios synchronous method and device, system
CN107291546A (en) * 2016-03-30 2017-10-24 华为技术有限公司 A kind of resource regulating method and device
CN107547745A (en) * 2017-08-31 2018-01-05 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107589977A (en) * 2017-09-06 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and related product
CN107894920A (en) * 2017-11-09 2018-04-10 广东欧珀移动通信有限公司 Resource allocation method and Related product

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881320B (en) * 2015-05-22 2018-11-27 北京京东尚科信息技术有限公司 A kind of telescopic method for generating text
CN105760224A (en) * 2016-01-06 2016-07-13 杭州华三通信技术有限公司 Dynamic resource adjustment method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8347302B1 (en) * 2008-10-09 2013-01-01 Amazon Technologies, Inc. System-aware resource scheduling
CN107291546A (en) * 2016-03-30 2017-10-24 华为技术有限公司 A kind of resource regulating method and device
CN106095592A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of prospect application scenarios synchronous method and device, system
CN107547745A (en) * 2017-08-31 2018-01-05 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107589977A (en) * 2017-09-06 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and related product
CN107894920A (en) * 2017-11-09 2018-04-10 广东欧珀移动通信有限公司 Resource allocation method and Related product

Also Published As

Publication number Publication date
CN109032793A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109032793B (en) Resource allocation method, device, terminal and storage medium
CN109582463B (en) Resource allocation method, device, terminal and storage medium
CN108874539B (en) Resource allocation method, device, terminal and storage medium
US20160328463A1 (en) Management of application state data
CN111433743B (en) APP remote control method and related equipment
CN109343902B (en) Audio processing assembly operation method and device, terminal and storage medium
CN110795056B (en) Method, device, terminal and storage medium for adjusting display parameters
CN110955499B (en) Processor core configuration method, device, terminal and storage medium
CN112988400B (en) Video memory optimization method and device, electronic equipment and readable storage medium
CN109445941B (en) Method, device, terminal and storage medium for configuring processor performance
CN110837420B (en) Resource scheduling method, device, terminal and storage medium
CN110413347A (en) The processing method of advertisement, device, storage medium and terminal in application program
CN111124668A (en) Memory release method and device, storage medium and terminal
CN110968362B (en) Application running method, device and storage medium
US20120100912A1 (en) Method of reusing physics simulation results and game service apparatus using the same
CN111309210B (en) Method, device, terminal and storage medium for executing system functions
CN112333460A (en) Live broadcast management method and device, computer and readable storage medium
CN112256354A (en) Application starting method and device, storage medium and electronic equipment
US11684852B2 (en) Create and remaster computer simulation skyboxes
US11511190B2 (en) Merge computer simulation sky box with game world
CN116957671A (en) Interactive content display method, interactive popularization page configuration method and device
CN112612487A (en) Application installation method and device, storage medium and terminal
CN117692691A (en) Live broadcast room interaction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant