CN107797868B - Resource adjusting method and device - Google Patents

Resource adjusting method and device Download PDF

Info

Publication number
CN107797868B
CN107797868B CN201711047422.4A CN201711047422A CN107797868B CN 107797868 B CN107797868 B CN 107797868B CN 201711047422 A CN201711047422 A CN 201711047422A CN 107797868 B CN107797868 B CN 107797868B
Authority
CN
China
Prior art keywords
scene
application
camera
mobile terminal
operating system
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
CN201711047422.4A
Other languages
Chinese (zh)
Other versions
CN107797868A (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 CN201711047422.4A priority Critical patent/CN107797868B/en
Publication of CN107797868A publication Critical patent/CN107797868A/en
Priority to PCT/CN2018/112261 priority patent/WO2019085840A1/en
Application granted granted Critical
Publication of CN107797868B publication Critical patent/CN107797868B/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
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application discloses a resource adjusting method and device. The method comprises the following steps: firstly, an operating system of a mobile terminal determines a device set consisting of at least one preset internal device of the mobile terminal in an enabling state; secondly, identifying an application running scene of a target application program currently using the preset internal equipment; then, extracting a resource adjusting strategy matched with the application running scene; and finally, adjusting the configuration of the system resources of the mobile terminal according to the resource adjustment strategy. The embodiment of the application is beneficial to improving the accuracy and efficiency of the whole process of resource adjustment and improving the refinement degree of foreground target application program resource adjustment.

Description

Resource adjusting method and device
Technical Field
The application relates to the technical field of mobile terminals, in particular to a resource adjusting method and device.
Background
With the rapid development of related technologies of smart phones, more and more applications are installed in user mobile phones, such as reading applications, payment applications, game applications, music applications, and the like, and people's clothes and eating habits are inseparable from mobile phones.
Disclosure of Invention
The embodiment of the application provides a resource adjustment method and device, and the refinement degree and the resource allocation efficiency of foreground target application program resource adjustment can be improved.
In a first aspect, an embodiment of the present application provides a resource adjustment method, which is applied to a mobile terminal, where the mobile terminal runs an operating system and one or more application programs, and the method includes:
the operating system determines a device set composed of at least one preset internal device in an enabled state of the mobile terminal, wherein the preset internal device comprises any one or more of the following devices: a camera, a microphone, a speaker;
the operating system identifies an application running scene of a target application program which currently uses the preset internal equipment;
the operating system extracts a resource adjustment strategy matched with the application running scene;
and the operating system adjusts the configuration of the system resources of the mobile terminal according to the resource adjustment strategy.
In a second aspect, an embodiment of the present application provides a resource adjusting apparatus, including a determining unit, an identifying unit, an extracting unit, and an adjusting unit,
the determining unit is configured to determine a device set composed of at least one preset internal device of the mobile terminal in an enabled state, where the preset internal device includes any one or more of the following: a camera, a microphone, a speaker;
the identification unit is used for identifying an application running scene of a target application program currently using the preset internal equipment;
the extraction unit is used for extracting a resource adjustment strategy matched with the application running scene;
and the adjusting unit is used for adjusting the configuration of the system resources of the mobile terminal according to the resource adjusting strategy.
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 configured to be executed by the processor, and the program includes instructions for executing the steps in any of the methods of the first aspect of the embodiments of the present application.
In a fourth aspect, this application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program is to make a computer perform part or all of the steps as described in any one of the methods of the first aspect of this application, and the computer includes a mobile terminal.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package, said computer comprising a mobile terminal.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
Drawings
Reference will now be made in brief to the accompanying drawings, to which embodiments of the present application relate.
FIG. 1A is a schematic diagram of a program runtime space of a smart phone;
FIG. 1B is a system architecture diagram of an android system;
fig. 2 is a schematic flowchart of a resource adjustment method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a resource adjustment method disclosed in an embodiment of the present application;
fig. 4 is a schematic flowchart of a resource adjustment method disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a mobile terminal according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The Mobile terminal according to the embodiment of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like. For convenience of description, the above-mentioned devices are collectively referred to as a mobile terminal. The operating system related to the embodiment of the application is a software system which performs unified management on hardware resources and provides a service interface for a user.
As shown in fig. 1A, a current mobile terminal such as a smart phone is generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, the one or more application programs are target application programs installed on the mobile terminal, and the operating system space runs an operating system of the mobile terminal. The mobile terminal can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the mobile terminal is not limited herein. As shown in fig. 1B, for example, the mobile terminal runs an Android system, the corresponding user space includes an Application layer (Applications) in the Android system, and the operating system space may include an Application Framework layer (Application Framework) in the Android system, a system Runtime library layer (including system Runtime Libraries and Android Runtime runtimes), and a Linux Kernel layer (Linux Kernel). The application layer comprises various application programs which are directly interacted with the user or service programs which are written by Java language and run in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) SMS, phone dialing, picture viewer, calendar, games, maps, World Wide Web (Web) browser, and other applications developed by developers. The application framework layer provides a series of class libraries required by Android application development, can be used for reusing components, and can also realize personalized extension through inheritance. And the system operation library layer is a support of an application program framework and provides services for each component in the Android system. The system operation library layer is composed of a system class library and Android operation. The Android runtime comprises two parts, namely a core library and a Dalvik virtual machine. The Linux kernel layer is used for realizing core functions such as hardware device driving, process and memory management, a network protocol stack, power management, wireless communication and the like.
Embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a schematic flowchart of a resource adjustment method provided in an embodiment of the present application, and is applied to a mobile terminal, where an operating system and one or more application programs run on the mobile terminal, as shown in the figure, the resource adjustment method includes:
s201, the operating system determines a device set composed of at least one preset internal device in an enabled state of the mobile terminal, where the preset internal device includes any one or more of the following: camera, microphone, speaker.
The camera comprises a front camera and a rear camera.
S202, the operating system identifies the application running scene of the target application program which currently uses the preset internal equipment.
The application operation scene target application program subdivides the operation scene in the operation process, the application operation scene can be obtained by an operating system according to a preset scene division strategy, and the preset scene division strategy comprises any one or more of the following strategies: the method comprises the steps of dividing according to functional modes, dividing according to behavior types, dividing according to camera categories and dividing according to shooting parameters.
For example, the target application is a camera application.
When the preset scene division policy is division according to the function mode, the application operation scene may include, for example, a camera application photographing scene, a camera application recording scene, and the like, and the preset scene division policy is not limited herein.
When the preset scene division strategy is division according to the behavior type, the application operation scene may include, for example, a camera application shooting preview scene, a camera application shooting in-process scene, and the like, which is not limited herein.
When the preset scene division strategy is division according to the camera categories, the application operation scene may include, for example, a camera application front camera scene, a camera application rear camera scene, a camera application single camera scene, a camera application double camera scene, and the like, and the preset scene division strategy is not limited herein.
When the preset scene division strategy is division according to the shooting parameters, the application operation scene may include, for example, a camera application high definition mode scene, a camera application common mode scene, and the like, which is not limited herein.
S203, the operating system extracts a resource adjustment strategy matched with the application running scene.
S204, the operating system adjusts the configuration of the system resources of the mobile terminal according to the resource adjusting strategy.
The resource adjustment strategy comprises the category of the system resource to be adjusted and the adjustment amount of the system resource in each category, wherein the system resource comprises any one or more of the following: memory resources, Central Processing Unit (CPU) resources, Graphics Processing Unit (GPU) resources, display resources, network resources and disk read/write IO resources.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
In one possible example, before the operating system extracts the resource adjustment policy matching the application execution scenario, the method further includes: the operating system determines a resource adjustment strategy packet corresponding to a preset equipment set according to a mapping relation between the equipment set and the resource adjustment strategy packet;
the extracting, by the operating system, the resource adjustment policy matched with the application running scenario includes: and the operating system extracts the resource adjusting strategy matched with the application running scene from the resource adjusting strategy package.
Wherein the resource adjustment policy package includes one or more resource adjustment policies.
For example, the front camera may correspond to a resource adjustment policy package, and the policy package may include a first resource adjustment policy for a self-portrait scene of a camera application, a second resource adjustment policy for a video scene of an instant chat application, and the like.
Also for example, the set of devices for the speaker and the microphone may correspond to a resource adjustment policy package, and the policy package may include a third resource adjustment policy for a conversation scenario of the conversation application, a second resource adjustment policy for a voice chat scenario of the instant chat application, a third resource adjustment policy for a team battle scenario of the game application, and so on.
In this example, the operating system can accurately obtain the resource adjustment policy package according to the enabled state of the internal device of the mobile terminal, and can further obtain the resource adjustment policy adapted to the application running scenario of the foreground target application from the resource adjustment policy package, that is, perform resource adjustment on the finely divided application running scenario, which is beneficial to improving the refinement degree of the resource adjustment of the foreground target application.
In one possible example, the currently foreground of the mobile terminal runs the target application, and the operating system identifies an application running scenario of the target application currently using the preset internal device, including: the operating system acquires the associated information of the target application program, wherein the associated information comprises the type information of the target application program and/or the interface information of the current application interface of the target application program; and the operating system determines the application running scene of the target application program running in the foreground according to the associated information.
The type information of the application program may be application program identification information or application type identification of the application program.
The interface information may be a text, a graphic, a component, etc., and is not limited herein.
Therefore, in this example, since the operating system can obtain the association information of the target game application program, the application running scene of the target game application program can be accurately determined in real time through the association information, which is beneficial to improving the identification accuracy and real-time performance of the application running scene, and thus improving the accuracy and efficiency of resource adjustment.
In one possible example, the association information includes type information of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps: and the operating system queries a mapping relation between preset type information of the application program and an application running scene by taking the type information as a query identifier, and determines the application running scene corresponding to the type information as the application running scene of the target application program running in the foreground.
The mobile terminal may pre-store a mapping relationship between preset type information of the application program and an application running scene, where the mapping relationship may be preset by a developer, or may be obtained by statistically analyzing historical usage data based on a preset machine learning algorithm, and the mapping relationship is not limited uniquely here.
Therefore, in this example, the operating system can quickly and accurately determine the application running scene by querying the preset mapping relationship, which is beneficial to improving the accuracy and the real-time performance of scene recognition of the mobile terminal and improving the resource adjustment efficiency.
In one possible example, the association information includes interface information of an application interface of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps: and the operating system queries a mapping relation between preset interface information and an application running scene by taking the interface information as a query identifier, and determines the application running scene corresponding to the interface information as the application running scene of the target application program operated by the foreground.
The mobile terminal may pre-store a mapping relationship between the interface information of the application program and the application running scene, where the mapping relationship may be set in advance by a developer, or may be obtained by statistically analyzing historical usage data based on a preset machine learning algorithm, and the mapping relationship is not limited uniquely here.
For example, when a camera of a mobile phone is turned on, a software detection mechanism of the mobile phone detects that a currently displayed interface displays text: and (4) selecting the emoticon needed by the user, and inquiring the preset relationship by using the interface as an inquiry identifier to obtain the shooting scene of the camera application A running in the foreground.
Therefore, in this example, the target application program can quickly determine the application running scene based on the interface information of the target application program, which is beneficial to improving the accuracy and the real-time performance of the mobile terminal in identifying the application running scene and improving the resource adjustment efficiency.
In one possible example, the association information includes type information of the target application and interface information of an application interface of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps: and the operating system queries a mapping relation between the preset combination information formed by the type information and the interface information and an application running scene by taking the combination information formed by the type information and the interface information as a query identifier, and determines the application running scene corresponding to the combination information as the application running scene of the target application program operated by the foreground.
The mobile terminal may pre-store a mapping relationship between combination information formed by preset type information and interface information of the application program and an application operation scene, where the mapping relationship may be preset by a developer, or may be obtained by statistically analyzing historical usage data based on a preset machine learning algorithm, and the mapping relationship is not limited uniquely here.
For example, the mobile phone opens the rear camera, and detects that characters are displayed right below a photographing preview interface displayed by the mobile phone: and (4) tapping the picture, pressing and holding the picture for shooting, wherein the type information is an instant chat application A, and determining that the scene is a chat instant picture scene of the instant chat application A by inquiring the mapping relation.
Therefore, in this example, the operating system detects the combination information, queries the pre-stored mapping relationship, and quickly and accurately determines the application running scene, which is beneficial to improving the accuracy and the real-time performance of the mobile terminal in identifying the application running scene and improving the resource adjustment efficiency.
In one possible example, the camera comprises a front camera and/or a rear camera; the device set composed of the at least one preset internal device in the enabled state comprises any one of the following devices: the mobile terminal comprises a device set consisting of a front camera of the mobile terminal, a device set consisting of a first rear camera of the mobile terminal, a device set consisting of a second rear camera of the mobile terminal, a device set consisting of the first rear camera and the second rear camera of the mobile terminal, and a device set consisting of the front camera and at least one rear camera of the mobile terminal.
The device set consisting of the front camera and the at least one rear camera provides a scene of influence information of scenes before and after split-screen display for split-screen display.
In this example, the internal devices can form different device sets by different forming modes, and when the operating system in the mobile terminal adjusts resources of the system application, the operating system can flexibly screen appropriate resource adjustment policy packages according to the different device sets, so as to adjust system resources in the different device sets, which is beneficial to improving the refinement degree of resource adjustment of foreground target application programs.
Referring to fig. 3, fig. 3 is a flowchart illustrating a resource adjustment method according to an embodiment of the present application, and the method is applied to a mobile terminal, where an operating system and one or more application programs run on the mobile terminal, and as shown in the diagram, performance resource optimization includes:
s301, the operating system determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state.
S302, the operating system determines a resource adjustment strategy package corresponding to the equipment set according to a mapping relation between a preset equipment set and the resource adjustment strategy package.
S303, the operating system acquires the associated information of the target application program, wherein the associated information comprises the type information of the target application program.
And S304, the operating system queries the mapping relation between the type information of the preset application program and the application running scene by taking the type information as a query identifier, and determines the application running scene corresponding to the type information as the application running scene of the target application program running in the foreground.
S305, the operating system extracts the resource adjustment strategy matched with the application running scene from the resource adjustment strategy package.
S306, the operating system adjusts the configuration of the system resource of the mobile terminal according to the resource adjusting strategy.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
In addition, the operating system can quickly and accurately determine the resource adjustment strategy matched with the current associated information of the application operation scene in a mode of inquiring the preset mapping relation and the corresponding relation, so that the system resource adjustment is performed on the application operation scene in time, and the accuracy and the efficiency of the whole process of adjusting the resources by the mobile terminal are improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a resource adjustment method provided in the embodiment of the present application, and the resource adjustment method is applied to a mobile terminal, where an operating system and one or more application programs run on the mobile terminal. As shown in the figure, the resource adjusting method includes:
s401, the operating system determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state.
S402, the operating system determines a resource adjustment strategy package corresponding to the equipment set according to a mapping relation between a preset equipment set and the resource adjustment strategy package.
S403, the operating system acquires the associated information of the target application program, wherein the associated information includes the type information of the target application program and the interface information of the current application interface of the target application program.
S404, the operating system queries a mapping relation between the preset combination information formed by the type information and the interface information and an application running scene by taking the combination information formed by the type information and the interface information as a query identifier, and determines that the application running scene corresponding to the combination information is the application running scene of the target application program running in the foreground.
S405, the operating system extracts the resource adjustment strategy matched with the application running scene from the resource adjustment strategy package.
S406, the operating system adjusts the configuration of the system resource of the mobile terminal according to the resource adjustment strategy.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
In addition, the operating system can quickly and accurately determine the resource adjustment strategy matched with the current associated information of the application operation scene in a mode of inquiring the preset mapping relation and the corresponding relation, so that the system resource adjustment is performed on the application operation scene in time, and the accuracy and the efficiency of the whole process of adjusting the resources by the mobile terminal are improved.
Consistent with the embodiments shown in fig. 2 to 4, please refer to fig. 5, where fig. 5 is a schematic structural diagram of a mobile terminal provided in an embodiment of the present application, where the mobile terminal runs one or more application programs and an operating system, and as shown, the mobile terminal includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are different from the one or more application programs, and the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the following steps;
determining a device set consisting of at least one preset internal device of the mobile terminal in an enabling state;
identifying an application running scene of a target application program currently using the preset internal equipment;
extracting a resource adjusting strategy matched with the application running scene;
and adjusting the configuration of the system resources of the mobile terminal according to the resource adjustment strategy.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
In one possible example, the program further includes instructions for: before extracting the resource adjustment strategy matched with the application operation scene, determining a resource adjustment strategy packet corresponding to the equipment set according to a mapping relation between a preset equipment set and the resource adjustment strategy packet;
in terms of extracting the resource adjustment policy matched with the application execution scenario, the instructions in the program are specifically configured to perform the following operations: and extracting the resource adjusting strategy matched with the application operation scene from the resource adjusting strategy packet.
In one possible example, in terms of the application execution scenario of the target application program that currently uses the preset internal device, the instructions in the program are specifically configured to perform the following operations: acquiring the associated information of the target application program, wherein the associated information comprises the type information of the target application program and/or the interface information of the current application interface of the target application program; and determining the application running scene of the target application program running in the foreground according to the associated information.
In one possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the instructions in the program are specifically configured to perform the following operations: and inquiring the mapping relation between the preset type information of the application program and the application running scene by taking the type information as an inquiry identifier, and determining the application running scene corresponding to the type information as the application running scene of the target application program operated in the foreground.
In one possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the instructions in the program are specifically configured to perform the following operations: and inquiring the mapping relation between preset interface information and an application running scene by taking the interface information as an inquiry identifier, and determining the application running scene corresponding to the interface information as the application running scene of the target application program operated by the foreground.
In one possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the instructions in the program are specifically configured to perform the following operations: and querying a mapping relation between the preset combination information formed by the type information and the interface information and an application running scene by taking the combination information formed by the type information and the interface information as a query identifier, and determining the application running scene corresponding to the combination information as the application running scene of the target application program running in the foreground.
In one possible example, the camera comprises a front camera and/or a rear camera; the device set composed of the at least one preset internal device in the enabled state comprises any one of the following devices: the mobile terminal comprises a device set consisting of a front camera of the mobile terminal, a device set consisting of a first rear camera of the mobile terminal, a device set consisting of a second rear camera of the mobile terminal, a device set consisting of the first rear camera and the second rear camera of the mobile terminal, and a device set consisting of the front camera and at least one rear camera of the mobile terminal.
Fig. 6 shows a block diagram of a possible functional unit of the resource adjusting apparatus involved in the embodiment. The resource adjusting apparatus 600 includes a determining unit 601, a recognizing unit 602, an extracting unit 603, and an adjusting unit 604, wherein,
the determining unit 601 is configured to determine a device set composed of at least one preset internal device of the mobile terminal in an enabled state;
the recognition unit 602 is configured to recognize an internal operation scene of a camera application running in a foreground;
the extracting unit 603 is configured to extract a resource adjustment policy matched with the application running scenario;
the adjusting unit 604 is configured to adjust the configuration of the system resource of the mobile terminal according to the resource adjusting policy.
It can be seen that, in the embodiment of the present application, an operating system of a mobile terminal first determines a device set composed of at least one preset internal device of the mobile terminal in an enabled state, then identifies an application running scenario of a target application program currently using the preset internal device, then extracts a resource adjustment policy matched with the application running scenario, and finally adjusts configuration of system resources of the mobile terminal according to the resource adjustment policy. Therefore, the operating system can accurately identify the application operation scene of the foreground target application program according to the starting state of the internal equipment of the mobile terminal, and further acquire a resource adjustment strategy adapting to the application operation scene, namely, a scheme for adjusting system resources by comprehensively applying a hardware detection mechanism and a software detection mechanism is provided aiming at the refined application operation scene.
In a possible example, before the extracting unit 603 extracts the resource adjustment policy matched with the application running scenario, the determining unit 601 is further configured to determine a resource adjustment policy package corresponding to a preset device set according to a mapping relationship between the device set and the resource adjustment policy package;
the extracting unit 603 is specifically configured to: and extracting the resource adjusting strategy matched with the application operation scene from the resource adjusting strategy packet.
In a possible example, in terms of identifying an application execution scenario of a target application currently using the preset internal device, the identifying unit 602 is specifically configured to: controlling to obtain associated information of the target application program, wherein the associated information comprises type information of the target application program and/or interface information of a current application interface of the target application program; and controlling the application running scene of the target application program which is determined to run in the foreground according to the associated information.
In a possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the identifying unit 602 is specifically configured to: and controlling to query a mapping relation between preset type information of the application program and an application running scene by taking the type information as a query identifier, and determining the application running scene corresponding to the type information as the application running scene of the target application program operated in the foreground.
In a possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the identifying unit 602 is specifically configured to: and controlling to query a mapping relation between preset interface information and an application running scene by taking the interface information as a query identifier, and determining the application running scene corresponding to the interface information as the application running scene of the target application program operated in the foreground.
In a possible example, in terms of determining an application execution scenario of the target application program executed in the foreground according to the association information, the identifying unit 602 is specifically configured to: and controlling the combined information formed by the type information and the interface information as a query identifier, querying a mapping relation between the combined information formed by the preset type information and the interface information and an application running scene, and determining the application running scene corresponding to the combined information as the application running scene of the target application program operated by the foreground.
In one possible example, the camera comprises a front camera and/or a rear camera; the device set composed of the at least one preset internal device in the enabled state comprises any one of the following devices: the mobile terminal comprises a device set consisting of a front camera of the mobile terminal, a device set consisting of a first rear camera of the mobile terminal, a device set consisting of a second rear camera of the mobile terminal, a device set consisting of the first rear camera and the second rear camera of the mobile terminal, and a device set consisting of the front camera and at least one rear camera of the mobile terminal.
It should be noted that the resource adjusting apparatus described in the embodiments of the present application is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
Among them, the determining unit 601, the identifying unit 602, the extracting unit 603, and the adjusting unit 604 may be a processor or a controller.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a smart phone 700 suitable for the resource adjustment method according to an embodiment of the present application, where the smart phone 700 includes: casing 710, touch-sensitive display screen 720, mainboard 730, battery 740 and subplate 750, be provided with leading camera 731, processor 732, memory 733, power management chip 734 on mainboard 730, be provided with oscillator 751, integrative sound chamber 752, VOOC flash charging interface 753 and fingerprint identification module 754 on the subplate.
The smart phone 700 operating system can determine a device set composed of at least one preset internal device of the mobile terminal in an enabled state; identifying an application running scene of a target application program currently using the preset internal equipment; extracting a resource adjusting strategy matched with the application running scene; and adjusting the configuration of the system resources of the mobile terminal according to the resource adjustment strategy.
The processor 732 is a control center of the smartphone, connects various parts of the entire smartphone by using various interfaces and lines, and executes various functions and processes data of the smartphone by running or executing software programs and/or modules stored in the memory 733 and calling data stored in the memory 733, thereby integrally monitoring the smartphone. Alternatively, processor 732 may include one or more processing units; preferably, the processor 732 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor may not be integrated into processor 732. The Processor 732 may be, for example, a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
The memory 733 may be used to store software programs and modules, and the processor 732 executes various functional applications and data processing of the smart phone by operating the software programs and modules stored in the memory 733. The memory 733 may mainly include a program storage area that may store an operating system, an application program required for at least one function, and the like, and a data storage area; the storage data area may store data created according to the use of the smartphone, and the like. Further, the memory 733 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. The Memory 733 may be, for example, a Random Access Memory (RAM), a flash Memory, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a register, a hard disk, a removable hard disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods described in the method embodiments, and the computer includes a mobile terminal.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as recited in the method embodiments. The computer program product may be a software installation package, said computer comprising a mobile terminal.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a 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 stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the embodiments described herein may be performed by associated hardware as instructed by a program, which may be stored in a computer readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A resource adjustment method is applied to a mobile terminal, wherein the mobile terminal runs an operating system and one or more application programs, and the method comprises the following steps:
the operating system determines a device set composed of at least one preset internal device in an enabled state of the mobile terminal, wherein the preset internal device comprises any one or more of the following devices: a camera, a microphone and a loudspeaker which are used as hardware equipment in the mobile terminal;
the operating system identifies the associated information of a target application program which currently uses the preset internal equipment to determine an application running scene, wherein the application running scene comprises a camera application shooting preview scene and a camera application shooting middle scene which correspond to the camera in the same camera application program, a camera application front camera scene, a camera application rear camera scene, a camera application single camera scene and a camera application double camera scene; identifying the associated information of the target application program currently using the preset internal equipment, wherein the associated information comprises a shooting scene of the camera application program by display characters in an interface displayed before the target application program starts detection, so as to quickly determine the application running scene based on self interface information;
the operating system extracts a resource adjustment strategy matched with the application running scene, wherein the resource adjustment strategy comprises the category of the system resource to be adjusted and the adjustment amount of each category of the system resource, and the system resource comprises any one or more of the following: the system comprises memory resources, Central Processing Unit (CPU) resources, Graphic Processing Unit (GPU) resources, display resources, network resources and disk read/write input/output (IO) resources, wherein the resource adjustment strategies comprise one or more resource adjustment strategies, and the resource adjustment strategies corresponding to a front camera comprise a first resource adjustment strategy of a self-shooting scene applied by a camera and a second resource adjustment strategy of a video scene applied by instant chat;
and the operating system adjusts the configuration of the system resources of the mobile terminal according to the resource adjustment strategy.
2. The method of claim 1, wherein before the operating system extracts the resource adjustment policy that matches the application execution scenario, the method further comprises:
the operating system determines a resource adjustment strategy packet corresponding to a preset equipment set according to a mapping relation between the equipment set and the resource adjustment strategy packet;
the extracting, by the operating system, the resource adjustment policy matched with the application running scenario includes:
and the operating system extracts the resource adjusting strategy matched with the application running scene from the resource adjusting strategy package.
3. The method according to claim 1, wherein the target application program is currently executed by the mobile terminal in a foreground, and the identifying, by the operating system, an application execution scenario of the target application program currently using the preset internal device comprises:
the operating system acquires the associated information of the target application program, wherein the associated information comprises the type information of the target application program and/or the interface information of the current application interface of the target application program;
and the operating system determines the application running scene of the target application program running in the foreground according to the associated information.
4. The method of claim 3, wherein the association information comprises type information of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps:
and the operating system queries a mapping relation between preset type information of the application program and an application running scene by taking the type information as a query identifier, and determines the application running scene corresponding to the type information as the application running scene of the target application program running in the foreground.
5. The method of claim 3, wherein the association information includes interface information of an application interface of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps:
and the operating system queries a mapping relation between preset interface information and an application running scene by taking the interface information as a query identifier, and determines the application running scene corresponding to the interface information as the application running scene of the target application program operated by the foreground.
6. The method of claim 3, wherein the association information comprises type information of the target application and interface information of an application interface of the target application; the operating system determines an application running scene of the target application program running in the foreground according to the associated information, and the method comprises the following steps:
and the operating system queries a mapping relation between the preset combination information formed by the type information and the interface information and an application running scene by taking the combination information formed by the type information and the interface information as a query identifier, and determines the application running scene corresponding to the combination information as the application running scene of the target application program operated by the foreground.
7. The method according to any one of claims 1-6, wherein the camera comprises a front camera and/or a rear camera; the device set composed of the at least one preset internal device in the enabled state comprises any one of the following devices:
the mobile terminal comprises a device set consisting of a front camera of the mobile terminal, a device set consisting of a first rear camera of the mobile terminal, a device set consisting of a second rear camera of the mobile terminal, a device set consisting of the first rear camera and the second rear camera of the mobile terminal, and a device set consisting of the front camera and at least one rear camera of the mobile terminal.
8. The method of claim 7, wherein the application execution scenario comprises any one of: the method comprises the following steps of photographing scene, video recording scene and scanning two-dimensional code scene.
9. A resource adjusting apparatus includes a determining unit, an identifying unit, an extracting unit, and an adjusting unit, wherein,
the determining unit is configured to determine a device set composed of at least one preset internal device in an enabled state of the mobile terminal, where the preset internal device includes any one or more of the following: a camera, a microphone and a loudspeaker which are used as hardware equipment in the mobile terminal;
the identification unit is used for identifying the associated information of a target application program currently using the preset internal device to determine an application running scene, wherein the application running scene comprises a camera application shooting preview scene and a camera application shooting middle scene of the corresponding camera in the same camera application program, and the camera application front camera scene, the camera application rear camera scene, the camera application single camera scene and the camera application double camera scene; identifying the associated information of the target application program currently using the preset internal equipment, wherein the associated information comprises a shooting scene of the camera application program by display characters in an interface displayed before the target application program starts detection, so as to quickly determine the application running scene based on self interface information;
the extracting unit is configured to extract a resource adjustment policy matched with the application running scenario, where the resource adjustment policy includes a category of a system resource to be adjusted and an adjustment amount of each category of the system resource, and the system resource includes any one or more of the following: the system comprises memory resources, Central Processing Unit (CPU) resources, Graphic Processing Unit (GPU) resources, display resources, network resources and disk read/write input/output (IO) resources, wherein a resource adjustment strategy package comprises one or more resource adjustment strategies, and a resource adjustment strategy package corresponding to a front camera comprises a first resource adjustment strategy of a self-shooting scene applied by a camera and a second resource adjustment strategy of a video scene applied by instant chat;
and the adjusting unit is used for adjusting the configuration of the system resources of the mobile terminal according to the resource adjusting strategy.
10. A mobile terminal comprising a processor, memory, a communications 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 programs comprising instructions for performing the steps of the method of any of claims 1-8.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 1-8, the computer comprising a mobile terminal.
CN201711047422.4A 2017-10-31 2017-10-31 Resource adjusting method and device Active CN107797868B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711047422.4A CN107797868B (en) 2017-10-31 2017-10-31 Resource adjusting method and device
PCT/CN2018/112261 WO2019085840A1 (en) 2017-10-31 2018-10-27 Resource adjustment method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711047422.4A CN107797868B (en) 2017-10-31 2017-10-31 Resource adjusting method and device

Publications (2)

Publication Number Publication Date
CN107797868A CN107797868A (en) 2018-03-13
CN107797868B true CN107797868B (en) 2020-09-25

Family

ID=61548535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711047422.4A Active CN107797868B (en) 2017-10-31 2017-10-31 Resource adjusting method and device

Country Status (2)

Country Link
CN (1) CN107797868B (en)
WO (1) WO2019085840A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107797868B (en) * 2017-10-31 2020-09-25 Oppo广东移动通信有限公司 Resource adjusting method and device
CN109413337A (en) * 2018-08-30 2019-03-01 北京达佳互联信息技术有限公司 Video Rendering method, apparatus, electronic equipment and storage medium
CN110072172B (en) * 2019-04-25 2020-10-16 广州小鹏汽车科技有限公司 Audio signal output method and system, electronic equipment and readable medium
CN112873218B (en) * 2020-12-23 2022-11-25 中国计量大学 Transformer substation inspection robot and inspection method
CN113778663B (en) * 2021-07-28 2023-05-12 荣耀终端有限公司 Scheduling method of multi-core processor and electronic equipment
CN114443256B (en) * 2022-04-07 2022-08-30 荣耀终端有限公司 Resource scheduling method and electronic equipment
CN117112187B (en) * 2022-05-16 2024-07-09 荣耀终端有限公司 Resource scheduling method and device
CN118295511A (en) * 2022-10-11 2024-07-05 荣耀终端有限公司 Resource scheduling method and related equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020987A (en) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 Method and device for determining kernel running configurations in processor

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073504A (en) * 2011-01-21 2011-05-25 深圳创维数字技术股份有限公司 Multi-scene operating method, multi-scene operating system and intelligent device
CN103942021B (en) * 2014-03-24 2018-08-14 华为技术有限公司 Content presenting method, the method for pushing and intelligent terminal of content presentation mode
CN103984538B (en) * 2014-03-27 2017-04-26 华为技术有限公司 Application scenario identification method, power consumption management method, devices and terminal equipment
CN104461711B (en) * 2014-12-15 2017-05-17 北京奇虎科技有限公司 Adaptive optimization method and adaptive optimization device of computing equipment
CN106095592B (en) * 2016-05-31 2021-08-24 Oppo广东移动通信有限公司 Foreground application program scene synchronization method, device and system
CN111258407B (en) * 2017-05-27 2021-06-29 Oppo广东移动通信有限公司 Application function control method and related product
CN107295169A (en) * 2017-06-19 2017-10-24 奇酷互联网络科技(深圳)有限公司 The optimization method and equipment and mobile terminal of a kind of background sound
CN107797868B (en) * 2017-10-31 2020-09-25 Oppo广东移动通信有限公司 Resource adjusting method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020987A (en) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 Method and device for determining kernel running configurations in processor

Also Published As

Publication number Publication date
WO2019085840A1 (en) 2019-05-09
CN107797868A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN107797868B (en) Resource adjusting method and device
CN107861816B (en) Resource allocation method and device
CN107861814B (en) Resource allocation method and equipment
CN107547746B (en) Resource allocation method and related product
CN107426432B (en) Resource allocation method and Related product
CN107577533B (en) Resource allocation method and related product
US11698815B2 (en) Method for resource allocation and related products
CN107479970B (en) Resource allocation method and related product
CN107635078B (en) Game control method and device
CN107995357A (en) Resource allocation method and device
CN107786748B (en) Image display method and apparatus
CN107807852B (en) Application program performance control method, device and computer readable storage medium
CN107483725A (en) Resource allocation method and Related product
WO2019047709A1 (en) Resource configuration method and related product
CN107450988B (en) Resource allocation method and related product
CN107832142B (en) Resource allocation method and equipment for application program
CN107589977B (en) Resource allocation method, resource allocation device, mobile terminal and medium
CN107832141A (en) Application program progress control method and equipment
CN108536480B (en) Input method configuration method and related product
US20210136432A1 (en) Method for recharging live streaming account, terminal, and storage medium
CN107517306B (en) Resource allocation method and related product
CN111373728B (en) Control method and device for camera application
WO2019047708A1 (en) Resource configuration method and related product
CN108984339B (en) Data recovery method and related product
CN107528977B (en) Resource allocation method and related product

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
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18 Wusha Haibin Road, Chang'an Town, Dongguan City, Guangdong Province

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant