CN109992389B - Method and device for executing touch program, terminal and storage medium - Google Patents

Method and device for executing touch program, terminal and storage medium Download PDF

Info

Publication number
CN109992389B
CN109992389B CN201910279682.7A CN201910279682A CN109992389B CN 109992389 B CN109992389 B CN 109992389B CN 201910279682 A CN201910279682 A CN 201910279682A CN 109992389 B CN109992389 B CN 109992389B
Authority
CN
China
Prior art keywords
touch
program
core
terminal
execution
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
CN201910279682.7A
Other languages
Chinese (zh)
Other versions
CN109992389A (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 CN201910279682.7A priority Critical patent/CN109992389B/en
Publication of CN109992389A publication Critical patent/CN109992389A/en
Application granted granted Critical
Publication of CN109992389B publication Critical patent/CN109992389B/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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Abstract

The embodiment of the application discloses an execution method, an execution device, a terminal and a storage medium of a touch program, and belongs to the technical field of computers. The terminal carries out the unbinding operation aiming at the touch program, so that the touch program does not need to wait until the original program becomes idle when the original program is occupied when the touch program initiates the operation request, the touch program can directly obtain the processing of the corresponding execution core when the touch program initiates the operation request, the corresponding execution core can be obtained according to the operation mode of the terminal, the scheduling effect of the resources of the terminal is improved while the response time delay of the touch program is shortened, and the performance of the terminal for responding to the touch program is integrally improved.

Description

Method and device for executing touch program, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a device, a terminal and a storage medium for executing a touch program.
Background
With the increasing technology of processor manufacturing, many manufacturers manufacture multi-core processors to increase the computing power of the terminal.
For the aspects of performance, power consumption and the like, the Big-Little architecture is commonly adopted in the current multi-core processor. The processor adopting the Big-Little architecture comprises a plurality of high-performance cores and a plurality of low-performance cores, wherein the high-performance cores are used for processing complex operations, and the low-performance cores are used for processing simple operations. Touch-like programs are typically bound in a specified low-performance core.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal and a storage medium for executing a touch program, which can solve the problem. The technical scheme is as follows:
according to an aspect of the present application, there is provided a method for executing a touch-type program, which is applied to a terminal including at least one first processor core and at least one second processor core, where the performance of the first processor core is higher than that of the second processor core, the method including:
when the original core bound by the touch class program is the second processor core, unbinding the touch class program from the original core, wherein the touch class program is used for processing touch events in the terminal, and the original core is the processor core bound by the touch class program in a default mode;
when an operation request of the touch program is received and the original core is occupied, acquiring an operation mode of the terminal;
determining a corresponding execution core according to the operation mode, wherein the execution core is a processor core except the original core in the terminal;
executing the touch program on the execution core according to the operation request of the touch program
According to another aspect of the present application, there is provided an apparatus for executing a touch-type program, which is applied to a terminal including at least one first processor core and at least one second processor core, wherein the performance of the first processor core is higher than that of the second processor core, the apparatus including:
a first unbinding module, configured to, when an original core to which a touch class program is bound is the second processor core, unbind the touch class program from the original core, where the touch class program is used to process a touch event in the terminal, and the original core is a processor core to which the touch class program is bound by default;
the mode acquisition module is used for acquiring the operation mode of the terminal when the operation request of the touch program is received and the original core is occupied;
a core determining module, configured to determine, according to the operation mode, a corresponding execution core, where the execution core is a processor core of the terminal except for the original core;
and the program execution module is used for executing the touch program on the execution core according to the operation request of the touch program.
According to another aspect of the present application, there is provided a terminal comprising a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the execution method of the touch-type program provided in the present application.
According to another aspect of the present application, there is provided a computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement a method of executing a touch-based program as provided in the implementations of the present application.
The beneficial effects brought by the technical scheme provided by the embodiment of the application can include:
the terminal using the multi-core processor can enable the touch program to be unbound from the original core, and when the operation request of the touch program is received and the original core is occupied, the corresponding execution core is determined according to the operation mode of the terminal, and the touch program is executed on the execution core. The terminal carries out the unbinding operation aiming at the touch program, so that the touch program does not need to wait until the original program becomes idle when the original program is occupied when the touch program initiates the operation request, the touch program can directly obtain the processing of the corresponding execution core when the touch program initiates the operation request, the corresponding execution core can be obtained according to the operation mode of the terminal, the scheduling effect of the resources of the terminal is improved while the response time delay of the touch program is shortened, and the performance of the terminal for responding to the touch program is integrally improved.
Drawings
In order to more clearly describe the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a block diagram of a terminal according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method for executing a touch-type program provided by an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a trigger position corresponding to a touch type program provided based on the embodiment shown in FIG. 2;
FIG. 4 is a flowchart of a method for executing a touch-type program according to another exemplary embodiment of the present application;
fig. 5 is a block diagram of an apparatus for executing a touch-type program according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
For example, the method for executing the touch-type program according to the embodiment of the present application may be applied to a terminal that has a display screen and a function of executing the touch-type program. The terminal can comprise a mobile phone, a tablet computer, intelligent glasses, an intelligent watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-to-read machine, an electronic book, an electronic dictionary or a vehicle-mounted terminal and the like.
Referring to fig. 1, fig. 1 is a block diagram of a terminal according to an exemplary embodiment of the present application, and as shown in fig. 1, the terminal includes a processor 120 and a memory 140, where the memory 140 stores at least one instruction, and the instruction is loaded and executed by the processor 120 to implement an execution method of a touch-based program according to various method embodiments of the present application.
In this application, the terminal 100 is an electronic device with a touch control function, and the terminal 100 includes at least one first processor core and at least one second processor core. Wherein the performance of the first processor core is higher than the performance of the second processor core. The terminal can unbind the touch type program from the original core when the touch type program is bound to the original core and the second processor core, wherein the touch type program is used for processing touch events in the terminal, and the original core and the touch type program default to the bound processor cores. When the terminal 100 receives the operation request of the touch program and the original core is occupied, the terminal 100 can obtain the operation mode of the terminal, determine the corresponding execution core according to the operation mode of the terminal, and finally execute the touch program on the execution core according to the operation request of the touch program.
Processor 120 may include one or more processing cores. The processor 120 connects various parts within the overall terminal 100 using various interfaces and lines, and performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 140 and calling data stored in the memory 140. Optionally, the processor 120 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable gate Array (FPGA), and Programmable Logic Array (PLA). The processor 120 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 the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 120, but may be implemented by a single chip.
The Memory 140 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 140 includes a non-transitory computer-readable medium. The memory 140 may be used to store instructions, programs, code sets, or instruction sets. The memory 140 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 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 store data and the like referred to in the following respective method embodiments.
The display assembly 160 includes a display screen. In the scenario of this embodiment, the display component 160 may further include a touch sensor, which may be pasted in the display screen and integrated with the display screen into the display component 160.
Referring to fig. 2, fig. 2 is a flowchart of an execution method of a touch class program according to an exemplary embodiment of the present application. The method for executing the touch-type program can be applied to the terminal shown above. In fig. 2, the method for executing the touch-type program includes:
and 210, when the original core bound by the touch class program is the second processor core, unbinding the touch class program from the original core.
In the embodiment of the application, the touch program is used for processing the touch event in the terminal, and the original core is a processor core bound by the touch program by default. It should be noted that, the terminal enables the touch operation of the user to obtain the response of the terminal by running the touch program, so as to achieve a good effect of human-computer interaction.
In one possible implementation, the terminal can determine the original core bound by the touch class program before the touch class program runs, and the original core is the processor core bound by the touch class program by default. In one implementation, the original core may also be referred to as the processor core to which the touch class program is bound by default. When the terminal confirms that the original core bound by the touch class program is the second processor core, the terminal unbinds the touch class program from the original core.
Optionally, in a possible implementation manner of the embodiment of the present application, the touch-type program may be a program of the terminal in a touch task chain. Optionally, the touch program may include at least one of a touch interruption program, a touch analysis program, a touch reporting program, and a touch determination program.
Step 220, when the operation request of the touch program is received and the original core is occupied, the operation mode of the terminal is obtained.
In the embodiment of the application, the terminal can check the use condition of the original core when receiving the operation request of the touch program. When the original core is occupied, the terminal will acquire the operation mode of the terminal itself. It should be noted that the operation mode of the terminal itself may be a mode manually set by the user. The operation mode of the terminal itself may also be an operation mode that the terminal automatically enters according to a currently running service or application when the terminal itself runs.
In another possible implementation, the terminal may maintain the binding relationship when the original core to which the touch class program binds is the first processor core. Optionally, when the original core bound by the touch class program is the first processor core, the terminal may also release the binding relationship, and when an operation request of the touch class program is received and the original core is occupied, the operation mode of the terminal is acquired.
In another possible implementation manner, the terminal can further determine whether to acquire the operation mode of the terminal according to the trigger position corresponding to the touch type program. In this scenario, the terminal can perform the step (1) and the step (2) to implement that the terminal executes the execution method of the touch-type program provided by the present application when the terminal substantially needs to bind the touch-type program on the execution core.
And (1) when an operation request of the touch program is received and the original core is occupied, acquiring a trigger position corresponding to the touch program.
In the embodiment of the application, when the terminal receives the operation request of the touch program and the original core is occupied, the terminal acquires the trigger position corresponding to the touch program. In one embodiment, the trigger position corresponding to the touch-type program is an action position of a touch operation of a user. The terminal can acquire the action position. In one possible implementation, the action location may be coordinates or other data capable of representing a location.
And (2) acquiring the operation mode of the terminal when the trigger position is in the target area.
In the embodiment of the application, when the trigger position is in the target area, the operation mode of the terminal is acquired. In one possible implementation, when the trigger position is in the target area, it is interpreted that the user may have triggered the specified button. Alternatively, when the target area is a display area of the designated button, when the trigger position is in the target area, it indicates that the user has triggered the designated button. In this scenario, the terminal acquires its own operating mode to complete the execution method of the touch program provided in the embodiment of the present application.
Referring to fig. 3, fig. 3 is a schematic diagram of a trigger position corresponding to a touch type program provided based on the embodiment shown in fig. 2. In fig. 3, the trigger position 310 is a trigger position corresponding to a touch-like program, and a finger of a user touches the screen at the trigger position. The target area 320 is a sub-area in the terminal 300, in which terminal 300 the trigger position 310 is in the target area 320.
Therefore, in the terminal 300 shown in fig. 3, the terminal will acquire its own operation mode.
And step 230, determining a corresponding execution core according to the running mode, wherein the execution core is a processor core except the original core in the terminal.
In the embodiment of the application, the terminal can determine the corresponding execution core according to the operation mode. The execution core is a processor core of the terminal other than the original core. In one scenario, the terminal may store a corresponding relationship between the operating mode and the execution core in advance, and determine the corresponding execution core according to the corresponding relationship and the current operating mode.
And step 240, executing the touch program on the execution core according to the operation request of the touch program.
In the embodiment of the application, after the execution core is determined, the terminal runs the touch program on the execution core according to the running request of the specific touch program. Therefore, the touch program is executed on a proper execution core, the execution time delay of the touch program is reduced, and the execution effect of the touch program is improved.
To sum up, the embodiment of the present application discloses a terminal using a multi-core processor, which is capable of unbinding a touch program from an original core, and determining a corresponding execution core according to an operation mode of the terminal when receiving an operation request of the touch program and the original core is occupied, and executing the touch program on the execution core. The terminal carries out the unbinding operation aiming at the touch program, so that the touch program does not need to wait until the original program becomes idle when the original program is occupied when the touch program initiates the operation request, the touch program can directly obtain the processing of the corresponding execution core when the touch program initiates the operation request, the corresponding execution core can be obtained according to the operation mode of the terminal, the scheduling effect of the resources of the terminal is improved while the response time delay of the touch program is shortened, and the performance of the terminal for responding to the touch program is integrally improved.
Based on the solution disclosed in the previous embodiment, the terminal can also rebind the touch class program to the corresponding execution core, please refer to the following embodiments.
Referring to fig. 4, fig. 4 is a flowchart of an execution method of a touch-based program according to another exemplary embodiment of the present application. The method for executing the touch-type program can be applied to the terminal shown in fig. 1. In fig. 3, the method for executing the touch-type program includes:
and step 410, when the original core bound by the touch type program is the second processor core, unbinding the touch type program from the original core.
In the embodiment of the present application, the execution process of step 410 is the same as the execution process of step 210, and is not described herein again.
In step 421, when receiving the operation request of the touch type program, detecting whether the touch type program is triggered by the first touch event.
Step 422, if the touch program is triggered by the first touch event and the original core is occupied, the operation mode of the terminal is obtained.
In the embodiment of the application, the first touch event is an event that the touch screen of the terminal is triggered by the first contact point in an idle state.
In a possible implementation manner, the terminal can be triggered to generate a touch event when a touch operation of a user is received in the touch screen. Subsequently, the touch event triggers a touch-type program of the terminal to initiate an operation request. It should be noted that the first touch event refers to an event that the touch screen of the terminal is triggered by the first touch point in the idle state.
In other words, two states of the touch screen may be designed in the terminal, including an idle state and a busy state. The idle state is used for indicating that the touch screen does not receive the touch event after the time-out duration. The timeout period may be a predetermined length of time. When the terminal receives the touch event, the terminal determines the state of the touch screen as a busy state and resets the timer according to the overtime duration. And when the timer is over, the terminal confirms the state of the touch screen as an idle state. In this idle state, the terminal will monitor whether there is a touch point in the touch screen. When a first touch point appears on the touch screen, a first touch event is triggered in the terminal.
Step 431, acquiring the execution core corresponding to the running mode.
In the embodiment of the application, the terminal can acquire the execution core corresponding to the running mode. Optionally, the execution core is a processor core in an unoccupied state.
In the embodiment of the present application, the terminal is further capable of implementing an operation of acquiring a performance class corresponding to the operation mode by performing the step (a1) and the step (a 2).
And (a1) acquiring performance categories corresponding to the operation modes, wherein the performance categories comprise a high performance category and a low performance category.
In the embodiment of the application, the terminal can acquire the performance category corresponding to the operation mode. Alternatively, the performance category may be queried by the attributes of the run mode. For example, the terminal can query the attributes of the run mode for options of the performance class.
And step (a2), determining the corresponding execution core according to the performance category.
It should be noted that the high performance class corresponds to the first processor core, and the low performance class corresponds to the second processor core.
In the embodiment of the application, the terminal determines the corresponding execution core according to the performance class.
In one possible implementation, when the performance class is a high performance class, the terminal determines the execution core as the first processor core.
In another possible implementation, the terminal determines the execution core as the second processor core when the performance class is a low performance class.
For example, when the processor of the terminal includes a first processor core and a second processor core, the terminal can determine the corresponding execution core according to the performance class. When the eight-core processor includes a large core 0, a large core 1, a large core 2, a large core 3, a small core 0, a small core 1, a small core 2, and a small core 3, and the large core 0, the large core 1, and the large core 2 are occupied, the performance class of the operation mode of the terminal is a high performance class, and the large core 3 is used as an execution core by the terminal.
Step 432, binding the touch class program into the execution core.
In the embodiment of the application, the terminal can bind the touch class program into the execution core. It should be noted that, the execution core is a core that can respond to the touch-type program immediately at present, and can meet the performance requirement of the touch-type program. Therefore, the embodiment of the application can also bind the touch type program into the execution core, so that the touch type program can obtain the best execution effect in the execution in the latest period.
In the embodiment of the present application, the terminal can also implement an operation of binding the touch class program into the execution core by executing the step (b1) and the step (b 2).
And (b1) acquiring the states of the core binding function switch, wherein the states comprise an on state and an off state.
In the embodiment of the application, the terminal can also acquire the state of the core binding function switch. The core binding function switch comprises an on state and an off state.
Alternatively, in one scenario, the tie function switch may be one. When the core binding function switch is one, the core binding function switch may be a global switch of the terminal, or may be a local switch that is effective for a specific application or a specific scene.
Alternatively, in another scenario, the core binding function switch may be at least two. And when the at least two core binding function switches are in an on state, the terminal binds the target process and the first processor core.
For example, the tie-up function switch may be a global touch acceleration switch, or may be a local game acceleration switch. When the binding function switch is a local game acceleration switch, the terminal executes the execution method of the touch program provided by the application when the game runs. Alternatively, the game may be run in the foreground, or the game may be run in the background.
And (b2) binding the touch program and the execution core when the state of the binding function switch is in an on state.
In the embodiment of the application, when the state of the binding function switch is the on state, the terminal binds the touch program and the execution core, so that the touch program is directly run through the execution core when being executed recently.
And step 441, setting a timer according to the target time length from the moment when the touch program is bound to the execution core.
In the embodiment of the application, the terminal can set the timer according to the target duration from the time when the touch program is bound to the execution core. It should be noted that the target duration is a duration that the terminal uses to control the touch-type program to occupy the execution core.
In one possible approach, the target duration may be a constant value set in the terminal. For example, one of 40ms, 50ms or 100 ms. The above numerical values are merely exemplary, and do not limit the embodiments of the present application.
In the embodiment of the present application, after completing step 441, the terminal can perform both step 442 and step 443 and step 444.
In step 442, if the timer is over, the touch class program and the execution core are unbound.
In the embodiment of the application, the terminal can process the relationship between the touch program and the execution core according to whether the timer is overtime or not.
In one scenario, when the timer times out, the terminal will release the binding relationship between the target process and the execution core. When the binding relationship between the touch program and the execution core is released, the touch program may run on the first processor core or the second processor core when running, which is not limited in the embodiment of the present application.
In another scenario, when the timer does not time out, the terminal will maintain the binding relationship between the touch-type program and the execution core.
In step 443, a second touch event is monitored during a time period when the timer has not expired.
In the embodiment of the present application, the second touch event is triggered in the target area and is a subsequent touch event of the first touch event.
It should be noted that, in the period when the timer does not time out, the touch-type program is continuously bound to the execution core. At this time, the terminal monitors a touch event triggered in the target area, the touch event being a subsequent touch event to the first touch event.
Alternatively, in one possible embodiment, the target area is a display area of a designated button in the terminal. In this scenario, the first touch event is used to indicate that the designated button is triggered, and when the designated button is triggered, the function corresponding to the designated button is turned on. And the second touch event is used for indicating that the specified button is triggered for the second time, and when the specified button is triggered for the second time, the function corresponding to the specified button is closed. Therefore, when the second touch event occurs, the function corresponding to the designated button in the terminal is closed, and the terminal can not bind the touch program on the execution core any more, so that the power consumption of the terminal is reduced.
At step 444, when the second touch event is monitored, the touch class program and the execution core are unbound.
In the embodiment of the application, when the terminal monitors the second touch event, the terminal binds the touch program with the virtual execution core contact, so that the energy consumption of the terminal is saved, and the working time of the terminal is prolonged.
To sum up, the embodiment can release the binding relationship between the touch program and the second processor core, and when the operation request of the touch program is received and the original core is occupied and the touch event triggered on the touch screen is the first touch event, the operation mode of the terminal is obtained, and the execution core for executing the touch program is determined according to the operation mode of the terminal. The terminal can execute the execution method of the touch program provided by the application at the first touch event, so that the touch program can be quickly started when actually needed, the scheme cannot be started by mistake when the scheme is not needed, and the overall power consumption of the terminal is saved on the basis of effectively reducing the execution delay of the touch program.
The execution method of the touch program provided in this embodiment can also set the timer at the time when the touch program and the execution core are bound, and when the timer times out, the binding between the touch program and the execution core is released, so that the touch program is bound to the execution core only when needed, and is automatically released from the execution core when idle, thereby improving the scheduling effect of the overall performance of the terminal, and achieving the balance between the performance and the power consumption.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, fig. 5 is a block diagram of an apparatus for executing a touch-based program according to an exemplary embodiment of the present application. The execution means of the touch-type program may be implemented as all or a part of the terminal by software, hardware, or a combination of both. The device is applied to a terminal, the terminal comprises at least one first processor core and at least one second processor core, the performance of the first processor core is higher than that of the second processor core, and the device comprises: a first unbinding module 510, a pattern acquisition module 520, a core determination module 530, and a program execution module 540.
A first unbinding module 510, configured to, when an original core to which a touch class program is bound is the second processor core, unbind the touch class program from the original core, where the touch class program is used to process a touch event in the terminal, and the original core is a processor core to which the touch class program is bound by default;
a mode obtaining module 520, configured to obtain an operation mode of the terminal when the operation request of the touch type program is received and the original core is occupied;
a core determining module 530, configured to determine, according to the operation mode, a corresponding execution core, where the execution core is a processor core of the terminal except for the original core;
and a program executing module 540, configured to execute the touch class program on the execution core according to the operation request of the touch class program.
In an optional embodiment, the core determining module 530 is configured to obtain the execution core corresponding to the running mode; binding the touch class program into the execution core.
In an optional embodiment, the core determining module 530 is configured to obtain performance categories corresponding to the operation modes, where the performance categories include a high performance category and a low performance category; determining the corresponding execution core according to the performance category; wherein the high performance class corresponds to the first processor core and the low performance class corresponds to the second processor core.
In an alternative embodiment, the core determining module 530 is configured to obtain the state of the core binding function switch, where the state includes an on state and an off state; and when the state of the core binding function switch is the on state, binding the touch program and the execution core.
In an optional embodiment, the mode obtaining module 520 is configured to detect whether the touch class program is triggered by a first touch event when an operation request of the touch class program is received; if the touch program is triggered by a first touch event and the original core is occupied, acquiring the running mode of the terminal; wherein the first touch event is an event that a touch screen of the terminal is triggered by a first contact point in an idle state.
In an optional embodiment, the apparatus further includes a timer setting module and a second unbinding module, where the timer setting module is configured to set a timer according to a target duration from a time when the touch class program is bound to the execution core; and the second unbinding module is used for unbinding the touch program and the execution core when the timer is timed out.
In an alternative embodiment, the apparatus relates to a touch-type program comprising: at least one of a touch interruption program, a touch analysis program, a touch reporting program and a touch judgment program.
In an optional embodiment, the apparatus further includes the monitoring module and a third unbinding module, where the monitoring module is configured to monitor a second touch event in a time period when the timer is not expired, where the second touch event is triggered in the target area and is a subsequent touch event to the first touch event; and the third unbinding module is used for unbinding the touch type program and the execution core when the second touch event is monitored.
In an optional embodiment, the mode obtaining module 520 is configured to obtain a trigger position corresponding to the touch class program when the operation request of the touch class program is received and the original core is occupied; and when the trigger position is in the target area, acquiring the operation mode of the terminal.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the method for executing the touch-based program according to the above embodiments.
It should be noted that: in the embodiment, when the execution device of the touch-type program executes the execution method of the touch-type program, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed to different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the execution device of the touch program provided in the above embodiments and the execution method embodiment of the touch program belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the implementation of the present application and is not intended to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (8)

1. A method for executing a touch-type program, the method being applied to a terminal, the terminal comprising at least one first processor core and at least one second processor core, the performance of the first processor core being higher than that of the second processor core, the method comprising:
determining an original core bound by a touch class program, wherein the original core is a processor core bound by the touch class program or by default;
when the original core bound by the touch class program is the second processor core, unbinding the touch class program from the original core, wherein the touch class program is used for processing the touch event in the terminal;
when receiving an operation request of the touch program, detecting whether the touch program is triggered by a first touch event; if the touch program is triggered by a first touch event and the original core is occupied, acquiring a trigger position corresponding to the touch program; when the trigger position is in a target area, acquiring the operation mode of the terminal; the first touch event is an event triggered by a first contact point when a touch screen of the terminal is in an idle state;
acquiring an execution core corresponding to the running mode, wherein the execution core is a processor core which is in an unoccupied state except the original core in the terminal;
binding the touch class program into the execution core;
and executing the touch program on the execution core according to the operation request of the touch program.
2. The method of claim 1, wherein the obtaining the execution core corresponding to the run mode comprises:
acquiring performance categories corresponding to the operation modes, wherein the performance categories comprise a high performance category and a low performance category;
determining the corresponding execution core according to the performance category;
wherein the high performance class corresponds to the first processor core and the low performance class corresponds to the second processor core.
3. The method of claim 1, wherein binding the touch class program into the execution core comprises:
acquiring states of a core binding function switch, wherein the states comprise an on state and an off state;
and when the state of the core binding function switch is the on state, binding the touch program and the execution core.
4. The method of claim 1, further comprising:
setting a timer according to a target duration from the moment when the touch program is bound to the execution core;
and if the timer is overtime, the touch program and the execution core are unbound.
5. The method of claim 4, further comprising:
monitoring a second touch event in a time period when the timer is not overtime, wherein the second touch event is triggered in the target area and is a subsequent touch event of the first touch event;
and when the second touch event is monitored, the touch type program and the execution core are unbound.
6. An apparatus for executing a touch-based program, the apparatus being applied to a terminal, the terminal including at least one first processor core and at least one second processor core, the first processor core having a higher performance than the second processor core, the apparatus comprising:
means for determining an original core of a touch class program binding, the original core being a processor core of the touch class program default binding or default binding;
a first unbinding module, configured to, when an original core to which a touch class program is bound is the second processor core, unbind the touch class program from the original core, where the touch class program is used to process a touch event in the terminal, and the original core is a processor core to which the touch class program is bound by default;
the mode acquisition module is used for detecting whether the touch type program is triggered by a first touch event or not when receiving an operation request of the touch type program; if the touch program is triggered by a first touch event and the original core is occupied, acquiring a trigger position corresponding to the touch program; when the trigger position is in a target area, acquiring the operation mode of the terminal; the first touch event is an event triggered by a first contact point when a touch screen of the terminal is in an idle state;
a core determining module, configured to obtain an execution core corresponding to the running mode, and bind the touch class program to the execution core, where the execution core is a processor core that is in an unoccupied state except for the original core in the terminal;
and the program execution module is used for executing the touch program on the execution core according to the operation request of the touch program.
7. A terminal, characterized in that the terminal comprises a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to realize the execution method of the touch-type program according to any one of claims 1 to 5.
8. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method for executing the touch-based program according to any one of claims 1 to 5.
CN201910279682.7A 2019-04-09 2019-04-09 Method and device for executing touch program, terminal and storage medium Active CN109992389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910279682.7A CN109992389B (en) 2019-04-09 2019-04-09 Method and device for executing touch program, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910279682.7A CN109992389B (en) 2019-04-09 2019-04-09 Method and device for executing touch program, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109992389A CN109992389A (en) 2019-07-09
CN109992389B true CN109992389B (en) 2022-02-01

Family

ID=67132618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910279682.7A Active CN109992389B (en) 2019-04-09 2019-04-09 Method and device for executing touch program, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109992389B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881140A (en) * 2005-06-16 2006-12-20 乐金电子(昆山)电脑有限公司 Apparatus and method for automatically controlling processor mode of multi-core processor
CN102789306A (en) * 2012-06-11 2012-11-21 任少华 Multi-mode intelligent computer system
CN103246559A (en) * 2012-02-10 2013-08-14 联想(北京)有限公司 Application processing method and electronic equipment
CN105320568A (en) * 2014-05-27 2016-02-10 三星电子株式会社 Method for task group migration and electronic device supporting the same
CN106445686A (en) * 2016-09-21 2017-02-22 东软集团股份有限公司 Resource distribution method and device
CN106879056A (en) * 2017-02-23 2017-06-20 上海与德信息技术有限公司 The electricity saving method and device of a kind of terminal
CN109165091A (en) * 2018-07-03 2019-01-08 南昌黑鲨科技有限公司 Method, mobile terminal and the storage medium of running quality are applied in a kind of optimization

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881140A (en) * 2005-06-16 2006-12-20 乐金电子(昆山)电脑有限公司 Apparatus and method for automatically controlling processor mode of multi-core processor
CN103246559A (en) * 2012-02-10 2013-08-14 联想(北京)有限公司 Application processing method and electronic equipment
CN102789306A (en) * 2012-06-11 2012-11-21 任少华 Multi-mode intelligent computer system
CN105320568A (en) * 2014-05-27 2016-02-10 三星电子株式会社 Method for task group migration and electronic device supporting the same
CN106445686A (en) * 2016-09-21 2017-02-22 东软集团股份有限公司 Resource distribution method and device
CN106879056A (en) * 2017-02-23 2017-06-20 上海与德信息技术有限公司 The electricity saving method and device of a kind of terminal
CN109165091A (en) * 2018-07-03 2019-01-08 南昌黑鲨科技有限公司 Method, mobile terminal and the storage medium of running quality are applied in a kind of optimization

Also Published As

Publication number Publication date
CN109992389A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN107783803B (en) System optimization method and device of intelligent terminal, storage medium and intelligent terminal
CN110008027B (en) Process running method and device, terminal and storage medium
US20190258514A1 (en) I/O Request Scheduling Method and Apparatus
CN107273130B (en) Method, device and terminal for accelerating interface drawing
CN108132735B (en) Terminal and application control method
CN109064538B (en) View rendering method and device, storage medium and intelligent terminal
CN110377141B (en) Application processing method and device, electronic equipment and storage medium
EP3435209B1 (en) Method for recognizing a screen-off gesture, and storage medium and terminal thereof
CN108762831B (en) Application program preloading method and device, storage medium and terminal
JP5673672B2 (en) Multi-core processor system, control program, and control method
WO2018036505A1 (en) Method and device for managing background applications of terminal
CN107450838B (en) Response method and device of black screen gesture, storage medium and mobile terminal
CN109033247B (en) Application program management method and device, storage medium and terminal
EP3663925A1 (en) Method for processing refreshing display abnormality, and terminal
CN115576645B (en) Virtual processor scheduling method and device, storage medium and electronic equipment
CN107479700B (en) Black screen gesture control method and device, storage medium and mobile terminal
CN111124519B (en) Method and system for optimizing starting speed of android application program based on input response
CN109992389B (en) Method and device for executing touch program, terminal and storage medium
WO2020150058A1 (en) Method, apparatus, and electronic device for improving cpu performance
CN111045789A (en) Virtual machine starting method and device, electronic equipment and storage medium
CN113134234B (en) Information display method, device, terminal and storage medium
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN109831714B (en) Method and device for identifying earphone keys and electronic equipment
CN111796939A (en) Processing method and device and electronic equipment
CN111221633A (en) Terminal control method and device, mobile terminal and storage medium

Legal Events

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