Detailed Description
In order to make the technical solutions better understood by those skilled in the art, 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.
In recent years, electronic devices such as smart phones, tablet computers, multimedia players, and the like have become increasingly popular. Generally, the rated power consumption of a processor in an electronic device greatly affects the overall power consumption of the electronic device, and with the continuous development of the architecture and process of a processor such as an ARM processor, the performance of the processor is continuously improved, so as to meet the requirements of the electronic device at the current stage. However, as the performance of the processor is improved, the power consumption of the processor is also obviously improved, so that the overall power consumption of the electronic device is high and the standby time is short. The inventor finds that, when an application program is run by electronic equipment used in the market at present, responses to the operation of the application program by a user are all processed by the application processing chip, so that the application processing chip is in an on state for a long time, and the power consumption is high.
The inventor proposes that a low-power consumption processing chip is added on the basis of the application processing chip to participate in the application program and the processing of the operation acting on the application program, wherein the rated power consumption of the application processing chip is higher than that of the low-power consumption processing chip, so that the overall power consumption of the electronic device can be reduced in a mode of reducing the power consumption of the application processing chip. Specifically, the inventor proposes an application processing method, an application processing apparatus, an electronic device, and a storage medium, which are provided in the embodiments of the present application, and perform processing on a touch operation acting on a user interface of an application program through a processing unit with lower power consumption, so as to reduce power consumption of the electronic device. The specific application of the processing method is described in detail in the following examples.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an application processing method according to an embodiment of the present application. The application processing method is used for processing the touch operation acted on the user interface of the application program through the processing unit with lower power consumption so as to reduce the power consumption of the electronic equipment. In a specific embodiment, the application processing method is applied to the application processing apparatus 200 shown in fig. 6 and the electronic device 100 (fig. 7) configured with the application processing apparatus 200. The specific process of this embodiment will be described below by taking an electronic device as an example, and it is understood that the electronic device applied in this embodiment may be a device capable of running an application program, such as a smart phone, a tablet computer, a wearable electronic device, and the like, and is not limited herein. As will be described in detail with respect to the flow shown in fig. 1, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit, the application processing method may specifically include the following steps:
step S110: when the first processing unit runs a target application program, judging whether the target application program is associated with the second processing unit.
In this embodiment, the rated power consumption of the first processing unit is higher than the rated power consumption of the second processing unit, that is, when the first processing unit and the second processing unit process the same data, the power consumption caused by the first processing unit processing the data is higher than the power consumption caused by the second processing unit processing the data. In some embodiments, the first processing unit may be an application processing chip, and the second processing unit may be a low power consumption processing chip, wherein the application processing chip and the low power consumption processing chip may be respectively disposed in the electronic device in the form of independent components, and the application processing chip and the low power consumption processing chip may also be integrated with the baseband processing chip into a central processing unit, which is not limited herein.
In some embodiments, the first processing unit may detect whether the electronic device runs a target application. The running of the target application program by the electronic device may include running the target application program in a foreground of the electronic device, running the target application program in a background of the electronic device, and switching to run the target application program in the foreground and the background of the electronic device, which is not limited specifically herein. The target application program operated in the foreground is the target application program which can be interacted with a user and can be displayed in the foreground, and the target application program can be suspended when the target application program is invisible; the target application program running in the background is very limited in interaction with a user, and the life time of the target application program is hidden except the configuration period; the target application program which is switched to run in the foreground and the background of the electronic equipment refers to the target application program which can be switched between the foreground and the background at will. Optionally, in this embodiment, the running of the target application by the electronic device refers to running the target application in the foreground of the electronic device.
In some embodiments, the first processing unit may determine whether the target application is running in the foreground of the electronic device. For example, whether the target application program runs in the foreground of the electronic device may be determined by Running Task, Running Process, Activity Lifecycle calls, use states Manager, Android-owned barrier-free function, or Process information stored in a directory by a Linux system kernel of the electronic device.
The method includes the steps that whether a target application program runs in the foreground of the electronic device or not is judged through the Running Task of the electronic device, when the application program runs in the foreground, the application program can be located at the stack top of the Running Task, so that a Task process at the stack top of the Running Task can be taken out, whether the Task process is the same as the packet name of the target application program or not can be checked, it can be understood that when the packet name of the Task process at the stack top is the same as the packet name of the target application program, the application program can be represented to run in the foreground of the electronic device, and when the packet name of the Task process at the stack top is different from the packet name of the target application program, the target application program can be represented not to run in the foreground of the electronic device.
In some embodiments, when the determination result indicates that the first processing unit runs the target application, and the target application runs in the foreground of the electronic device, it may be determined whether the target application is associated with the second processing unit. Whether the target application program is associated with the second processing unit can be judged by judging whether the target application program is in a corresponding relation with the second processing unit; whether the target application program is associated with the second processing unit can be judged by judging whether the mapping relation is created between the target application program and the second processing unit in advance; whether the target application is associated with the second processing unit or not may be determined by determining whether the target application supports an Always On Display (AOD) function, and the like, which is not limited herein. In this embodiment, if the target application is associated with the second processing unit, it can be characterized that the target application can be processed by the second processing unit.
Step S120: monitoring a touch operation acting on a user interface of the target application when the target application is associated with the second processing unit.
In this embodiment, when the target application runs in the foreground of the electronic device, a user interface of the target application may be displayed through a touch screen of the electronic device, and accordingly, a user may perform a touch operation on the user interface of the target application, where the touch operation may include a single-finger click, a multi-finger click, a single-finger long-press, a multi-finger long-press, a re-press, a multi-click, a sliding operation, a large-area press, and the like, where the single-finger click is an operation of clicking a single finger on the user interface; the multi-finger clicking refers to the operation that multiple fingers click on a user interface simultaneously; the single-finger long press means that the single finger presses on the user interface for more than a preset time; the multi-finger long press means that a plurality of fingers simultaneously press on a user interface for more than a preset time; the heavy pressure means that the pressing force on the user interface exceeds the preset force; the multiple clicks refer to the fact that the number of clicks exceeds the preset number within the preset time; the sliding operation refers to dragging the card to slide on the touch screen; the large-area pressing means that the pressing range of a single finger on the user interface exceeds a preset range.
However, since the touch operation on the user interface of the target application involves complex processes such as interface jump, interface drawing, interface updating, and interface feedback, if the first processing unit with higher rated power consumption is used for processing, the larger power consumption is caused, and the cruising ability of the electronic device is poor, therefore, in some embodiments, the touch operation on the user interface of the target application can be processed by the second processing unit with lower rated power consumption, so as to reduce the power consumption of the electronic device.
In this embodiment, when the target application is associated with the second processing unit, the representation of the target application can be processed by the second processing unit, and therefore, the touch operation acting on the user interface of the target application can be monitored, and whether the target application is executed by the first processing unit or not is determined to be switched to the target application executed by the second processing unit based on the monitoring result.
Step S130: when the touch operation acting on the user interface of the target application program is monitored, the first processing unit sends a notification to the second processing unit, and then the first processing unit enters a closed state, wherein the notification is used for indicating the second processing unit to run the target application program and responding to the touch operation.
In some embodiments, when the monitoring result indicates that the user interface of the target application has a touch operation, the first processing unit may send a notification to the second processing unit in response, where the notification is used to instruct the second processing unit to run the target application and respond to the touch operation. When the second processing unit is determined to receive the notification or when the second processing unit is determined to start running the target application program, the first processing unit enters a closed state, so that power consumption caused by the target application program can be greatly reduced.
In some embodiments, when the monitoring result indicates that there is no touch operation on the user interface of the target application, the first processing unit continues to run the target application and responds to the touch operation, so as to ensure that the electronic device normally runs the target application.
As one mode, the first processing unit may wait for feedback from the second processing unit after sending a notification to the second processing unit, and accordingly, the second processing unit may feed back information to the first processing unit after receiving the notification or starting to run the target application based on the notification, and the first processing unit enters the shutdown state after receiving the feedback information sent by the second processing unit. In some embodiments, after sending the notification to the second processing unit, the first processing unit may wait for the feedback of the second processing unit within a preset time length, and may access the closed state if receiving the feedback information sent by the second processing unit within the preset time length; if the feedback information sent by the second processing unit is not received within the preset time, the first processing unit can continue to run the target application program and respond to the touch operation.
In some embodiments, in the process of running the target application and responding to the touch operation, if it is detected that the electronic device starts another application that is not associated with the second processing unit, the second processing unit may send another notification to the first processing unit, where the other notification is used to instruct the first processing unit to run the target application. In one approach, the second processing unit is configured to enter the off state after sending the other notifications to the first processing unit.
Referring to fig. 2, in the present embodiment, the second processing unit includes a microcontroller, a memory/register module, and a General-purpose input/output (GPIO), where the microcontroller is responsible for controlling a touch screen of the electronic device, the memory/register module is responsible for data storage, and the GPIO is responsible for interrupt control. When the first processing unit works, the whole second processing unit is in a closed state (does not work), and when the first processing unit runs the target application program and detects the touch operation acting on the user interface displayed on the touch screen, the second processing unit can be informed through GOIP interruption, so that the first processing unit is switched to the second processing unit, and the touch control of the low-power processing application program is realized. In addition, when the second processing unit runs other applications which are not associated with the second processing unit, the first processing unit can be notified through the GOIP interrupt, so that the second processing unit is switched to the first processing unit to realize normal running of the other applications.
An application processing method provided by one embodiment of the present application is applied to an electronic device, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit. The method comprises the steps that when a target application program is operated by a first processing unit, whether the target application program is associated with a second processing unit is judged, when the target application program is associated with the second processing unit, touch operation acting on a user interface of the target application program is monitored, when the touch operation acting on the user interface of the target application program is monitored, the first processing unit sends a notification to the second processing unit and then enters a closed state, the notification is used for indicating the second processing unit to operate the target application program and responding to the touch operation, and therefore the touch operation acting on the user interface of the application program is processed through the processing unit with lower power consumption, and power consumption of the electronic device is reduced.
Referring to fig. 3, fig. 3 is a flow chart illustrating an application processing method according to another embodiment of the present application. The method is applied to the electronic device, which includes a first processing unit and a second processing unit, where a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit, and as will be described in detail with reference to a flow shown in fig. 3, the method may specifically include the following steps:
step S210: and when the first processing unit runs the target application program, acquiring a plurality of preset application programs which can be processed by the second processing unit.
In some embodiments, when an application program is designed, whether the application program can be processed by the second processing unit may be set, and a tag of "the second processing unit can process" or "the second processing unit cannot process" may be added to an installation package of the application program after the setting is completed, so that when the application program is installed, the electronic device may know whether the application program can be processed by the second processing unit based on the tag and save a result, and when the first processing unit runs a target application program, a plurality of application programs that can be processed by the second processing unit that are set in advance may be obtained through the saved result. In addition, after the setting is completed, at least part of the application programs which can be processed by the second processing unit in all the application programs can be added into the first file and stored, and when the first processing unit runs the target application program, the first file can be obtained, and a plurality of application programs which can be processed by the second processing unit and are set in advance can be searched in the first file.
In some embodiments, the electronic device may provide a user setting interface, and a user may set, at the user setting interface, whether the application program can be processed by the second processing unit, and add a tag that is "processable by the second processing unit" or "non-processable by the second processing unit" to the description file of the application program after the setting is completed, so that when the application program is called, the electronic device may know whether the application program can be processed by the second processing unit based on the tag in the description file corresponding to the application program. In addition, after the setting is completed, at least part of the application programs which can be processed by the second processing unit in all the application programs set by the user can be added to the second file and stored, and when the first processing unit runs the target application program, the first processing unit can acquire the second file and search a plurality of preset application programs which can be processed by the second processing unit in the second file.
Step S220: and judging whether the target application program is included in the plurality of application programs.
In this embodiment, after the plurality of application programs that can be processed by the second processing unit are acquired, the target application program may be compared with the plurality of application programs to determine whether the plurality of application programs include the target application program. It is understood that if any application program of the plurality of application programs is the same as the target application program, it may be determined that the target application program is included in the plurality of application programs, and if all application programs of the plurality of application programs are not the same as the target application program, it may be determined that the target application program is not included in the plurality of application programs.
Step S230: determining that the target application is associated with the second processing unit when the target application is included in the plurality of applications.
As one way, when the determination result indicates that the target application is included in the plurality of applications, it may be determined that the second processing unit can process the target application, and thus, it may be determined that the target application is associated with the second processing unit.
Step S240: monitoring a touch operation acting on a user interface of the target application when the target application is associated with the second processing unit.
For a detailed description of step S240, please refer to step S120, which is not described herein again.
Step S250: and when the touch operation acting on the user interface of the target application program is monitored, calculating the resource parameters required by the first processing unit to respond to the touch operation.
In some embodiments, when a touch operation acting on the user interface of the target application program is monitored, the current user interface of the target application program and a next user interface to which the target application program is about to jump based on the touch operation may be obtained, and then resource parameters required by the first processing unit to respond to the touch operation are calculated based on the current user interface and the next user interface, for example, an electric quantity required by the first processing unit to respond to the touch operation, a required processor occupancy rate, a required storage space, and the like are calculated, which is not specifically limited herein.
Step S260: and judging whether the required resource parameter is larger than a second resource parameter threshold value.
In some embodiments, the electronic device presets and stores a second resource parameter threshold, and the second resource parameter threshold is used as a judgment basis for the required resource parameter. Therefore, after the resource parameter required by the first processing unit to respond to the touch operation is acquired, the required resource parameter may be compared with the second resource parameter threshold to determine whether the required resource parameter is greater than the second resource parameter threshold. The second resource parameter threshold may include, but is not limited to, a power threshold, a processor occupancy threshold, a storage space threshold, and the like.
Step S270: when the required resource parameter is greater than the second resource parameter threshold, the first processing unit sends a notification to the second processing unit, and then the first processing unit enters a closed state, where the notification is used to instruct the second processing unit to run the target application and respond to the touch operation.
In some embodiments, when the determination result indicates that the resource parameter required by the first processing unit to respond to the touch operation is greater than the second resource parameter threshold, for example, when the determination result indicates that the electric quantity required by the first processing unit to respond to the touch operation is greater than the electric quantity threshold, the required processor occupancy is greater than the processor occupancy threshold, or the required storage space is greater than the storage space threshold, it indicates that the response to the touch operation by the first processing unit causes greater power consumption, and therefore, as a way, the first processing unit enters the off state after sending a notification to the second processing unit, so as to respond to the touch operation by the second processing unit with smaller rated power consumption, and reduce the overall power consumption of the electronic device.
Step S280: and when the required resource parameter is not larger than the second resource parameter threshold value, the first processing unit continues to run the target application program and responds to the touch operation.
In some embodiments, when the determination result indicates that the resource parameter required by the first processing unit to respond to the touch operation is not greater than the second resource parameter, for example, when the determination result indicates that the electric quantity required by the first processing unit to respond to the touch operation is not greater than the electric quantity threshold, the required processor occupancy is not greater than the processor occupancy threshold, and/or the required storage space is not greater than the storage space threshold, it indicates that the power consumption caused by responding to the touch operation by the first processing unit is small, and therefore, as a way, the first processing unit continues to run the target application and responds to the touch operation, so as to ensure normal running of the target application and timely response of the touch operation.
The application processing method provided by another embodiment of the present application is applied to an electronic device, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit. When the target application program is operated, the first processing unit acquires a plurality of preset application programs which can be processed by the second processing unit, judges whether the target application program is included in the plurality of application programs, and determines that the target application program is associated with the second processing unit when the target application program is included in the plurality of application programs. When the target application program is associated with the second processing unit, touch operation acting on a user interface of the target application program is monitored, when the touch operation acting on the user interface of the target application program is monitored, resource parameters required by the first processing unit to respond to the touch operation are calculated, whether the required resource parameters are larger than a second resource parameter threshold value or not is judged, when the required resource parameters are larger than the second resource parameter threshold value, the first processing unit sends a notification to the second processing unit and then enters a closed state, the notification is used for indicating the second processing unit to run the target application program and respond to the touch operation, and when the required resource parameters are not larger than the second resource parameter threshold value, the first processing unit continues to run the target application program and respond to the touch operation. Compared with the application processing method shown in fig. 1, in the embodiment, the application programs that can be processed by the second processing unit are also preset to select the target application program associated with the second processing unit, so that the user experience and the operability are improved. In addition, in this embodiment, when the resource parameter required by the touch operation is greater than the second resource parameter threshold, the first processing unit switches to the second processing unit to perform a response, so as to reduce the power consumption of the electronic device.
Referring to fig. 4, fig. 4 is a flowchart illustrating an application processing method according to still another embodiment of the present application. The method is applied to the electronic device, which includes a first processing unit and a second processing unit, where a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit, and as will be described in detail with reference to a flow shown in fig. 4, the method may specifically include the following steps:
step S310: when the first processing unit runs the target application program, whether the target application program supports the information screen display function is judged.
In some embodiments, the electronic device supports a message screen display AOD function, and some applications also have a message screen display function, such as a calculator, a time, a mini game, an electronic device, and the like, where the message screen display is that after the electronic device enters a message screen standby state, information (such as time) can be displayed on a partial area of the touch screen, and other areas of the touch screen are in a closed state. In this embodiment, when the first processing unit runs the target application program, it may be determined whether the target application program supports the information screen display function, where the target application program may be compared with all application programs that support the information screen display function to determine whether the target application program is included in all application programs that support the information screen display function, and it may be understood that if the target application program is included in all applications that support the information screen display function, it may be determined that the target application program supports the information screen display function, and otherwise, it may be determined that the target application program does not support the information screen display function.
Step S320: determining that the target application is associated with the second processing unit when the target application supports an information screen display function.
In some embodiments, when the determination result indicates that the target application supports the touchscreen display function, it may be determined that the second processing unit (e.g., a low-power processing chip) may complete running the target application and respond to the touch operation, and thus, it may be determined that the target application is associated with the second processing unit.
Step S330: monitoring a touch operation acting on a user interface of the target application when the target application is associated with the second processing unit.
For the detailed description of step S330, please refer to step S120, which is not described herein again.
Step S340: and when the touch operation acting on the user interface of the target application program is monitored, judging whether the electronic equipment is in a message screen display mode.
In some embodiments, when a touch operation acting on a user interface of a target application is monitored, a mode of an electronic device may be acquired, so as to determine whether the electronic device is in a message screen display mode according to the acquired mode of the electronic device. It can be understood that when the target application program is run in the foreground of the electronic device, the electronic device may be in the bright screen display mode or the message screen display mode, and the electronic device may send different broadcasts when the electronic device is in different modes, so that the broadcast sent by the electronic device may be received and the broadcast mode may be identified to determine whether the electronic device is in the message screen display mode. As one mode, when the electronic device is in the bright screen display mode, a broadcast "1" may be sent out, when the electronic device is in the message screen display mode, a broadcast "0" may be sent out, and then when the broadcast is received and recognized as "1", it may be determined that the electronic device is in the bright screen display mode, and when the broadcast is received and recognized as "0", it may be determined that the electronic device is in the message screen display mode.
Of course, in this embodiment, it may also be determined whether the electronic device is in the message screen display mode through other more manners, for example, whether the electronic device is in the message screen display mode is determined through the brightness of the touch screen, and details are not described herein.
Step S350: when the electronic device is in the message screen display mode, the first processing unit enters a closed state after sending a notification to the second processing unit, where the notification is used to instruct the second processing unit to run the target application and respond to the touch operation.
In this embodiment, when the determination result indicates that the electronic device is in the touchscreen display mode, it may be determined that the second processing unit may complete the operation of the target application program and the response to the touch operation in the touchscreen display state, and therefore, the first processing unit may enter the off state after sending the notification to the second processing unit, so as to reduce the overall power consumption of the electronic device.
The application processing method provided by another embodiment of the present application is applied to an electronic device, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit. The method comprises the steps that when a target application program runs, whether the target application program supports a message screen display function is judged by a first processing unit, when the target application program supports the message screen display function, the target application program is determined to be associated with a second processing unit, when the target application program is associated with the second processing unit, touch operation acting on a user interface of the target application program is monitored, when the touch operation acting on the user interface of the target application program is monitored, whether an electronic device is in a message screen display mode is judged, when the electronic device is in the message screen display mode, the first processing unit sends a notice to the second processing unit and then enters a closed state, and the notice is used for indicating the second processing unit to run the target application program and responding to the touch operation. Compared with the application processing method shown in fig. 1, in this embodiment, it is further determined whether the application program supports the osd function to be associated with the second processing unit, so as to improve the accuracy of the determination, and when the application program supports the osd function and the electronic device is in the osd mode, the first processing unit is switched to the second processing unit to perform a response, so as to reduce the power consumption of the electronic device.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating an application processing method according to another embodiment of the present application. The method is applied to the electronic device, which includes a first processing unit and a second processing unit, where a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit, and as will be described in detail with reference to a flow shown in fig. 5, the method may specifically include the following steps:
step S410: and when the first processing unit runs the target application program, monitoring the residual resource parameters of the first processing unit.
In some embodiments, the first processing unit may monitor the remaining resource parameter of the first processing unit when running the target application, where the remaining resource parameter of the first processing unit may be monitored in real time, the remaining resource parameter of the first processing unit may be monitored at intervals of a preset time length, and the remaining resource parameter of the first processing unit may be monitored according to a rule set by a user, which is not limited herein.
The electronic device may monitor the usage of the first processing unit to obtain the remaining resource parameter of the first processing unit. For example, when the operating system of the electronic device is an Android system, the use condition and the process time of the system can be obtained through a ProcessStats class in the Android system. The specific implementation principle is that files in a/proc directory are read, when the system runs, the kernel updates the files in the/proc directory, writes the running condition of the PID into the corresponding file, and can acquire the residual resource parameters of the first processing unit according to the running condition. The remaining resource parameters of the first processing unit may include, but are not limited to, a remaining utilization rate, a remaining usage space, and the like of the first processing unit.
Step S420: and judging whether the residual resource parameter is smaller than a first resource parameter threshold value.
In some embodiments, the electronic device presets and stores a first resource parameter threshold, and the first resource parameter threshold is used as a judgment basis for the remaining resource parameter. Therefore, after the remaining resource parameter of the first processing unit is obtained, the remaining resource parameter may be compared with the first resource parameter threshold to determine whether the remaining resource parameter is smaller than the first resource parameter threshold. The first resource parameter threshold may include a usage threshold, a usage space threshold, and the like, which are not limited herein.
Step S430: when the remaining resource parameter is less than the first resource parameter threshold, determining whether the target application is associated with the second processing unit.
In some embodiments, when the remaining resource parameter of the first processing unit is smaller than the first resource parameter threshold, a problem that if the target application is continuously executed by the first processing unit and a touch operation acting on the user interface of the target application is responded, the resource of the first processing unit may be strained, so that the processing is slow or jammed is represented, and therefore, whether the target application is associated with the second processing unit can be judged to judge whether the target application can be switched from the first processing unit to the second processing unit to execute the target application and respond to the touch operation.
Step S440: monitoring a touch operation acting on a user interface of the target application when the target application is associated with the second processing unit.
Step S450: when the touch operation acting on the user interface of the target application program is monitored, the first processing unit sends a notification to the second processing unit, and then the first processing unit enters a closed state, wherein the notification is used for indicating the second processing unit to run the target application program and responding to the touch operation.
For detailed description of steps S440 to S450, please refer to steps S120 to S130, which are not described herein again.
The application processing method provided by another embodiment of the present application is applied to an electronic device, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit. When the first processing unit runs the target application program, monitoring the residual resource parameter of the first processing unit, judging whether the residual resource parameter is smaller than a first resource parameter threshold value, when the residual resource parameter is smaller than the first resource parameter threshold value, judging whether the target application program is associated with the second processing unit, when the target application program is associated with the second processing unit, monitoring a touch operation acting on a user interface of the target application program, when the touch operation acting on the user interface of the target application program is monitored, sending a notification to the second processing unit by the first processing unit, and then entering a closed state, wherein the notification is used for indicating the second processing unit to run the target application program and responding to the touch operation. Compared with the application processing method shown in fig. 1, the present embodiment further determines whether to perform the determination required for switching from the first processing unit to the second processing unit according to the remaining resource parameters of the first processing unit, so as to improve the applicability of the present solution.
Referring to fig. 6, fig. 6 is a block diagram illustrating an application processing apparatus 200 according to an embodiment of the present application. The application processing apparatus 200 is applied to the electronic device 100, and the electronic device includes a first processing unit and a second processing unit, and the rated power consumption of the first processing unit is higher than the rated power consumption of the second processing unit. As will be explained below with respect to the block diagram shown in fig. 6, the application processing apparatus 200 includes: a determination module 210, amonitoring module 220, and a control module 230, wherein:
the determining module 210 is configured to determine, when the first processing unit runs a target application, whether the target application is associated with the second processing unit. Further, the determining module 210 includes: the application program acquisition sub-module, the application judgment sub-module and the first determination sub-module, wherein:
and the application program acquisition submodule is used for acquiring a plurality of preset application programs which can be processed by the second processing unit when the first processing unit runs the target application program.
And the application judgment submodule is used for judging whether the target application program is included in the plurality of application programs.
A first determination submodule configured to determine that the target application is associated with the second processing unit when the target application is included in the plurality of applications.
Further, the determining module 210 includes: function judgement submodule and second confirm the submodule, wherein:
and the function judgment sub-module is used for judging whether the target application program supports the information screen display function or not when the first processing unit runs the target application program.
A second determining sub-module, configured to determine that the target application is associated with the second processing unit when the target application supports an information screen display function.
Further, the determining module 210 includes: a residual resource parameter monitoring submodule, a residual resource parameter judging submodule and an association judging submodule, wherein:
and the residual resource parameter monitoring submodule is used for monitoring the residual resource parameters of the first processing unit when the first processing unit runs the target application program.
And the residual resource parameter judgment submodule is used for judging whether the residual resource parameter is smaller than a first resource parameter threshold value.
And the association judgment submodule is used for judging whether the target application program is associated with the second processing unit or not when the residual resource parameter is smaller than the first resource parameter threshold value.
Amonitoring module 220, configured to monitor a touch operation applied to a user interface of the target application when the target application is associated with the second processing unit.
A control module 230, configured to, when a touch operation acting on the user interface of the target application is monitored, send a notification to the second processing unit by the first processing unit, where the notification is used to instruct the second processing unit to run the target application and respond to the touch operation, and then the first processing unit enters a closed state. Further, the control module 230 includes: mode judgement submodule and first control submodule, wherein:
and the mode judgment sub-module is used for judging whether the electronic equipment is in a message screen display mode or not when the touch operation acting on the user interface of the target application program is monitored.
The first control sub-module is configured to, when the electronic device is in the message screen display mode, send a notification to the second processing unit by the first processing unit and then enable the first processing unit to enter a closed state.
Further, the control module 230 includes: a required resource parameter calculation submodule, a required resource parameter judgment submodule, a second control submodule and a third control submodule, wherein:
and the required resource parameter calculation sub-module is used for calculating the resource parameters required by the first processing unit to respond to the touch operation when the touch operation acting on the user interface of the target application program is monitored.
And the required resource parameter judgment submodule is used for judging whether the required resource parameter is greater than a second resource parameter threshold value.
And the second control submodule is used for sending a notice to the second processing unit by the first processing unit and then enabling the first processing unit to enter a closed state when the required resource parameter is larger than the second resource parameter threshold value.
And the third control sub-module is used for continuing to run the target application program and responding to the touch operation by the first processing unit when the required resource parameter is not larger than the second resource parameter threshold value.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 7, a block diagram of an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, amemory 120, atouch screen 130, and one or more applications, wherein the one or more applications may be stored in thememory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform the methods as described in the aforementioned method embodiments. The processor 110 includes afirst processing unit 111 and asecond processing unit 112, where thefirst processing unit 111 may be an application processing chip, and thesecond processing unit 112 may be a low power consumption processing chip, which is not limited herein.
Processor 110 may include one or more processing cores, among other things. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in thememory 120 and calling data stored in thememory 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.
TheMemory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Thememory 120 may be used to store instructions, programs, code sets, or instruction sets. Thememory 120 may include a stored program area and a stored data area, wherein the stored program 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. 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.
Thetouch screen 130 is used for displaying information input by a user, information provided to the user, and various graphical user interfaces of the electronic device 100, which may be composed of graphics, text, icons, numbers, video, and any combination thereof, and in one example, theDisplay screen 130 may be a Liquid Crystal Display (LCD) or an Organic Light-Emitting Diode (OLED), which is not limited herein.
Referring to fig. 8, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 300 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-volatile computer-readable storage medium. The computer readable storage medium 300 has storage space forprogram code 310 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. Theprogram code 310 may be compressed, for example, in a suitable form.
In summary, the application processing method, the application processing apparatus, the electronic device, and the storage medium provided in the embodiments of the present application are applied to an electronic device, where the electronic device includes a first processing unit and a second processing unit, and a rated power consumption of the first processing unit is higher than a rated power consumption of the second processing unit. The method comprises the steps that when a target application program is operated by a first processing unit, whether the target application program is associated with a second processing unit is judged, when the target application program is associated with the second processing unit, touch operation acting on a user interface of the target application program is monitored, when the touch operation acting on the user interface of the target application program is monitored, the first processing unit sends a notification to the second processing unit and then enters a closed state, the notification is used for indicating the second processing unit to operate the target application program and responding to the touch operation, and therefore the touch operation acting on the user interface of the application program is processed through the processing unit with lower power consumption, and power consumption of the electronic device is reduced.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.