Patent Description:
Currently, various terminals (for example, a mobile phone and a tablet computer) generally use a touchscreen as an input apparatus, which greatly improves input and operation efficiency of a user. Generally, parameters of the touchscreen such as a touch sensitivity and response events for different touch actions are set before delivery of the touchscreen (or the terminal).

However, in different touch areas in different application scenarios, the user usually imposes different response requirements on the parameters of the touchscreen such as the touch sensitivity. For example, a refined operation is usually required for copying text information on a web page, and comparatively rapid control experience is required for controlling role running in a control game. Obviously, a fixed parameter that is set before delivery cannot meet a touch requirement of the user. This reduces input and output efficiency of the terminal.

<CIT> relates to information processing apparatus, control method thereof, and storage medium.

Implementations of this application provide a touch control method and an apparatus, to implement refined and personalized control on a touchscreen, and improve input and output efficiency of a terminal.

The following terms "first" and "second" are merely intended for a purpose of description, and shall not be understood as an indication or implication of relative importance or implicit indication of the number of indicated technical features. Therefore, a feature limited by "first" or "second" may explicitly or implicitly include one or more features. In the description of the implementations of this application, unless otherwise stated, "a plurality of" means two or more than two.

A touch control method provided in the implementations of this application may be applied to any terminal having a touchscreen, such as a mobile phone, a wearable device, an augmented reality (augmented reality, AR) device/virtual reality (virtual reality, VR) device, a tablet computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, or a personal digital assistant (personal digital assistant, PDA). Certainly, a specific form of the terminal is not limited in the following implementations.

As shown in <FIG>, the terminal in the implementations of this application may be a mobile phone <NUM>. The mobile phone <NUM> is used as an example below to describe the implementations in detail. It should be understood that the mobile phone <NUM> shown in the figure is merely an example of the terminal, and the mobile phone <NUM> may have more or fewer components than those shown in the figure, or may combine two or more components, or may have different component configurations.

As shown in <FIG>, the mobile phone <NUM> may specifically include components such as a processor <NUM>, a radio frequency (radio frequency, RF) circuit <NUM>, a memory <NUM>, a touchscreen <NUM>, a Bluetooth apparatus <NUM>, one or more sensors <NUM>, a wireless fidelity (WIreless-Fidelity, Wi-Fi) apparatus <NUM>, a positioning apparatus <NUM>, an audio circuit <NUM>, a peripheral interface <NUM>, and a power supply system <NUM>. These components may communicate with each other by using one or more communications buses or signal lines (not shown in <FIG>). A person skilled in the art may understand that a hardware structure shown in <FIG> does not constitute a limitation on the mobile phone, and the mobile phone <NUM> may include more or fewer components than those shown in the figure, or may combine some components, or may have different component arrangements.

The following describes in detail the components of the mobile phone <NUM> with reference to <FIG>.

The processor <NUM> is a control center of the mobile phone <NUM>. The processor <NUM> is connected to parts of the mobile phone <NUM> by using various interfaces and lines, runs or executes an application program stored in the memory <NUM>, and invokes data stored in the memory <NUM>, to perform various functions of the mobile phone <NUM> and data processing. In some implementations, the processor <NUM> may include one or more processing units. For example, the processor <NUM> may be a Kirin <NUM> chip manufactured by the Huawei. In some implementations of this application, the processor <NUM> may further include a fingerprint verification chip, configured to verify a collected fingerprint.

The radio frequency circuit <NUM> may be configured to receive and send a radio signal in an information receiving and sending process or in a call process. Particularly, after receiving downlink data from a base station, the radio frequency circuit <NUM> may send the downlink data to the processor <NUM> for processing, and send related uplink data to the base station. Generally, the radio frequency circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuit <NUM> may further communicate with another device through wireless communication. The wireless communication may use any communications standard or protocol, including but not limited to global system for mobile communications, a general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, an email, an SMS message service, and the like.

The memory <NUM> is configured to store the application program and data. The processor <NUM> runs the application program and the data stored in the memory <NUM>, to perform various functions of the mobile phone <NUM> and data processing. The memory <NUM> mainly includes a program storage area and a data storage area. The program storage area may store an operating system, and an application program required by at least one function (for example, a sound playing function or an image playing function). The data storage area may store data (for example, audio data or an address book) created when the mobile phone <NUM> is used. In addition, the memory <NUM> may include a high-speed random access memory (random access memory, RAM), or may include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or another volatile solid-state storage device. The memory <NUM> may store various operating systems such as an iOS® operating system developed by Apple and an Android® operating system developed by Google. The memory <NUM> may be independent and is connected to the processor <NUM> by using the communications bus; or the memory <NUM> may be integrated with the processor <NUM>.

The touchscreen <NUM> may specifically include a touchpad <NUM>-<NUM> and a display <NUM>-<NUM>.

The touchpad <NUM>-<NUM> may collect a touch operation performed by a user of the mobile phone <NUM> on or near the touchpad <NUM>-<NUM> (for example, an operation performed by the user on the touchpad <NUM>-<NUM> or near the touchpad <NUM>-<NUM> by using any proper object such as a finger or a stylus), and send collected touch information to another component (such as the processor <NUM>). The touch operation performed by the user near the touchpad <NUM>-<NUM> may be referred to as a floating touch. The floating touch may mean that the user does not need to directly touch the touchpad for selecting, moving, or dragging an object (for example, an icon), and the user only needs to be near the terminal to execute an expected function. In addition, the touchpad <NUM>-<NUM> may be implemented in a plurality of types such as a resistive type, a capacitive type, an infrared type, a surface acoustic wave type.

The display (may also be referred to as a display screen) <NUM>-<NUM> may be configured to display information entered by the user or information provided for the user, and various menus of the mobile phone <NUM>. The display <NUM>-<NUM> may be configured in a form of a liquid crystal display, an organic light emitting diode, or the like. The touchpad <NUM>-<NUM> may cover the display <NUM>-<NUM>. After detecting the touch operation performed on or near the touchpad <NUM>-<NUM>, the touchpad <NUM>-<NUM> transfers the touch operation to the processor <NUM> to determine a type of the touch operation. Then the processor <NUM> may provide a corresponding visual output on the display <NUM>-<NUM> based on the type of the touch operation. Although in <FIG>, the touchpad <NUM>-<NUM> and the display screen <NUM>-<NUM> are used as two independent components to implement input and output functions of the mobile phone <NUM>. However, in some implementations, the touchpad <NUM>-<NUM> and the display screen <NUM>-<NUM> may be integrated to implement the input and output functions of the mobile phone <NUM>.

In this implementation of this application, the user may set touch mapping rules for different touch areas on the touchscreen <NUM> in different application scenarios. For example, as shown in (a) in <FIG>, when an application A is running, a touch sensitivity of a rectangular touch area 21a in a center of the touchscreen <NUM> may be set to twice that of another area. Alternatively, as shown in (b) in <FIG>, when an application B is running, a response event for a touch action (for example, a tap touch action or a touch and hold touch action) in a touch area 22b may be customized.

Therefore, in different application scenarios, a touch area customized by the user may be obtained by dividing the touchscreen <NUM> into logical areas. In addition, the user may set, in the customized touch area, a touch mapping rule that conforms to a current application scenario and an operation habit of the user, so that the user subsequently obtains a customized touch feeling in the customized touch area. This implements refined and personalized control on the touchscreen <NUM>, and provides more rich touch experience for the terminal including the touchscreen <NUM>.

The touch sensitivity may be used to reflect a ratio of a movement distance of a display object generated when the terminal responds to a specific touch operation on the touchscreen <NUM> to an actual sliding distance of a finger on the touchscreen <NUM> in the touch operation. A higher touch sensitivity indicates a larger ratio, and a lower touch sensitivity indicates a smaller ratio. For some refined operations such as an image retouching operation and a text marking operation, a relatively low touch sensitivity may improve accuracy of these operations. However, for some operations with relatively strong real-time performance such as attack and running operations in a game, a relatively high touch sensitivity may improve speeds of these operations and user experience.

The response event for the touch action is a specific touch operation corresponding to a touch event generated by the mobile phone <NUM> when the mobile phone <NUM> receives a touch action entered by the user at a specific location on the touchscreen <NUM>. For example, when the user taps a point C on the touchscreen <NUM>, the mobile phone <NUM> may generate two touch events: an action down event and an action up event at the point C. After the mobile phone <NUM> reports the two touch events to a corresponding application, the application may determine, by invoking a library function that is preset in the mobile phone <NUM>, that the two touch events correspond to a tap operation, and then respond to the tap operation to implement an application function of the tap operation at the point C.

Certainly, in addition to the touch sensitivity and the response event for the touch action, the touch mapping rule may further include other parameters used to adjust a touch habit of the user, for example, touch precision, touch pressure sensing, and a touch time. This is not limited in this implementation of this application.

It can be understood that the touchscreen <NUM> is formed by stacking a plurality of layers of materials. In this implementation of this application, only the touchpad (layer) and the display screen (layer) are displayed, and another layer is not recorded in this implementation of this application. In addition, the touchpad <NUM>-<NUM> may be disposed on a front side of the mobile phone <NUM> in a full panel form, and the display screen <NUM>-<NUM> may also be disposed on the front side of the mobile phone <NUM> in a full panel form. In this way, a bezel-less structure can be implemented for the front side of the mobile phone.

The mobile phone <NUM> may further include the Bluetooth apparatus <NUM>, configured to implement exchange data between the mobile phone <NUM> and another terminal (for example, a mobile phone or a smartwatch) at a short distance from the mobile phone <NUM>. In this implementation of this application, the Bluetooth apparatus may be an integrated circuit, a Bluetooth chip, or the like.

The mobile phone <NUM> may further include the at least one sensor <NUM>, such as a fingerprint collection device <NUM>, a light sensor, a motion sensor, and another sensor. Specifically, the fingerprint collection device <NUM> may be configured on a back side of the mobile phone <NUM> (for example, at a lower part of a rear-facing camera), or the fingerprint collection device <NUM> may be configured on the front of the mobile phone <NUM> (for example, at a lower part of the touchscreen <NUM>). For another example, the fingerprint collection device <NUM> may be disposed on the touchscreen <NUM> to implement a fingerprint recognition function. In other words, the fingerprint collection device <NUM> may be integrated with the touchscreen <NUM> to implement the fingerprint recognition function of the mobile phone <NUM>. The light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of the display of the touchscreen <NUM> based on luminance of ambient light, and the proximity sensor may power off the display when the mobile phone <NUM> is moved to an ear. As a type of motion sensor, an accelerometer sensor may detect acceleration values in various directions (usually on three axes). The accelerometer sensor may detect a value and a direction of gravity when the accelerometer sensor is stationary, and may be applied to an application for recognizing a mobile phone posture (for example, switching between a landscape screen and a vertical screen, a related game, and magnetometer posture calibration), a function related to vibration recognition (such as a pedometer and a knock), and the like. Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor may be further configured in the mobile phone <NUM>.

The Wi-Fi apparatus <NUM> is configured to provide the mobile phone <NUM> with network access that complies with a Wi-Fi related standard protocol. The mobile phone <NUM> may access a Wi-Fi access point by using the Wi-Fi apparatus <NUM>, to help the user receive and send an email, browse a web page, access streaming media, and the like. The Wi-Fi apparatus <NUM> provides wireless broadband Internet access for the user. In some other implementations, the Wi-Fi apparatus <NUM> may be used as a Wi-Fi wireless access point, and may provide Wi-Fi network access for another terminal.

The positioning apparatus <NUM> is configured to provide a geographical location for the mobile phone <NUM>. It can be understood that the positioning apparatus <NUM> may be specifically a receiver of a positioning system such as a global positioning system (global positioning system, GPS), a BeiDou navigation satellite system, or a Russian GLONASS. After receiving the geographical location sent by the positioning system, the positioning apparatus <NUM> sends the information to the processor <NUM> for processing, or sends the information to the memory <NUM> for storage. In some other implementations, the positioning apparatus <NUM> may alternatively be a receiver of an assisted global positioning system (assisted global positioning system, AGPS). The AGPS system serves as an assisted server to assist the positioning apparatus <NUM> in completing ranging and positioning services. In this case, the assisted positioning server communicates with the terminal such as the positioning apparatus <NUM> (namely, a GPS receiver) of the mobile phone <NUM> through a wireless communications network, to provide positioning assistance. In some other implementations, the positioning apparatus <NUM> may alternatively be a positioning technology that is based on a Wi-Fi access point. Each Wi-Fi access point has a globally unique media access control (media access control, MAC) address, and the terminal can scan and collect a broadcast signal of a nearby Wi-Fi access point when the terminal enables Wi-Fi. Therefore, a MAC address that is broadcast by the Wi-Fi access point can be obtained. The terminal sends, to a location server through the wireless communications network, data (for example, the MAC address) that can identify the Wi-Fi access point. The location server obtains a geographical location of each Wi-Fi access point through retrieving, calculates a geographical location of the terminal and sends the geographical location to the positioning apparatus <NUM> of the terminal with reference to a strength of a Wi-Fi broadcast signal.

The audio circuit <NUM>, a speaker <NUM>, and a microphone <NUM> may provide an audio interface between the user and the mobile phone <NUM>. The audio circuit <NUM> may convert received audio data into an electrical signal and transmit the electrical signal to the speaker <NUM>, and the speaker <NUM> converts the electrical signal into a sound signal for output. In addition, the microphone <NUM> converts a collected sound signal into an electrical signal, and the audio circuit <NUM> receives the electrical signal, converts the electrical signal into audio data, and outputs the audio data to the RF circuit <NUM>, to send the audio data to, for example, another mobile phone, or outputs the audio data to the memory <NUM> for further processing.

The peripheral interface <NUM> is configured to provide various interfaces for an external input/output device (for example, a keyboard, a mouse, an external display, an external memory, or a subscriber identification module card). For example, the terminal is connected to the mouse through a universal serial bus (universal serial bus, USB) interface. By using a metal contact on a card slot of a subscriber identification module (subscriber identification module, SIM) card provided by a telecommunications operator, the terminal is connected to the subscriber identification module card. The peripheral interface <NUM> may be configured to couple the external input/output peripheral device to the processor <NUM> and the memory <NUM>.

The mobile phone <NUM> may further include the power supply apparatus <NUM> (for example, a battery and a power management chip) that supplies power to the components. The battery may be logically connected to the processor <NUM> by using the power management chip, so that functions such as charging, discharging, and power consumption management are implemented by using the power supply apparatus <NUM>.

Although not shown in <FIG>, the mobile phone <NUM> may further include a camera (a front-facing camera and/or the rear-facing camera), a flashlight, a micro projection apparatus, a near field communication (NFC near field communication, NFC) apparatus, or the like.

Further, the mobile phone <NUM> may run an operating system such as an Android operating system or an iOS operating system. The Android operating system is used as an example. As shown in <FIG>, the Android operating system may be divided into four layers: an application layer <NUM> (namely, an APP layer), an application framework layer <NUM> (namely, a framework layer), a system runtime library layer <NUM> (namely, a library layer), and a Linux kernel layer <NUM> in descending order.

The Linux kernel layer <NUM> may be configured to control functions of the mobile phone <NUM> such as security (Security), memory management (Memory Management), program management (Process Management), network stack (Network Stack), and driver model (Driver Model). The Linux kernel layer <NUM> is also used as an abstraction layer between hardware (for example, a CPU, a network interface card, and a memory) and a software stack, and may hide specific hardware details, to provide a unified service for upper layers (the system runtime library layer <NUM>, the application framework layer <NUM>, and the application layer <NUM>).

The system runtime library layer <NUM> includes some C/C++ libraries, such as a media library, a system C library, and a display management library (Surface Manager). These libraries can be used by different components in the Android system, and the system runtime library layer <NUM> may provide a service for a developer by using the framework layer <NUM>.

The framework layer <NUM> provides the developer with an API framework that can be used for fully accessing an application program. Specifically, the framework layer <NUM> provides a large quantity of APIs for developing an application program, and an APP that meets a related service requirement may be constructed by invoking a corresponding API.

The application layer <NUM> mainly includes an APP compiled in a java language. When operating an operation interface of the APP, a user interacts with the system runtime library layer <NUM> or the Linux kernel layer <NUM> by invoking a related API at the framework layer <NUM>, to implement a function corresponding to the operation interface.

In this implementation of this application, a process in which an APP (for example, an application A) running at the application layer <NUM> obtains a touch operation entered by the user on the touchscreen <NUM> is a process of distributing a message layer by layer in ascending order.

Specifically, as shown in <FIG>, when a finger of the user touches the touchscreen <NUM> at a hardware layer, the touchscreen <NUM> obtains related information (for example, coordinates of a touch point) of the touch operation. Further, the touchscreen <NUM> may report, to the Linux kernel layer <NUM> in an interruption form by using a corresponding driver, an original touch event generated by the touch action. The framework layer <NUM> includes an event bus layer 202a that communicates with a lower layer and an input read distribution layer 202b that communicates with an upper layer. After obtaining the original touch event, the Linux kernel layer <NUM> may perform an encapsulation operation such as coordinate system conversion on the touch event, to generate an advanced touch event (for example, an action down event, an action move event, and an action up event) that can be read by the upper layer, and send the advanced touch event to the event bus layer 202a. Then, the event bus layer 202a distributes the advanced touch event to the input read distribution layer 202b.

Finally, the input read distribution layer 202b reports the advanced touch event to an application process of the application A that is running at the application layer <NUM>. In this case, the application process of the application A may invoke a C/C++ library function at the system runtime library layer <NUM> to determine a specific operation corresponding to the advanced touch event, for example, a tap operation. Further, a library function at the system runtime library layer <NUM> may call back a callback function that is written by the application A for the tap operation in advance, and the callback function specifies a function executed by the application A to respond to the tap operation of the user. For example, the callback function may be an onclick function, so that the application A executes a callback function corresponding to the tap operation at a location of the touch point. For example, the onclick function written by the application A for the tap operation at the touch point is used to implement a video playback function.

Corresponding to obtaining of the touch operation, a process in which the application A at the application layer <NUM> implements a function indicated by the callback function is a process in which delivering is performed layer by layer in descending order, and finally the control instruction is executed by related hardware.

An example of implementing the foregoing video playback function is used. when the application process of the application A at the application layer <NUM> determines, based on a touch operation reported by the bottom layer, that the video playback function needs to be implemented, a video playback instruction may be generated and sent to the input read distribution layer 202b and the event bus layer 202a at the framework layer <NUM> layer by layer; then the event bus layer 202a sends the video playback instruction to the Linux kernel layer <NUM>; and finally the Linux kernel layer <NUM> implements a video playback output by invoking hardware such as a processor, a memory, and the touchscreen <NUM> by using a driver.

In this implementation of this application, the user predefines, on the touchscreen <NUM>, a touch mapping rule of a specific touch area when the application A is running. Therefore, after the Linux kernel layer <NUM> obtains the touch operation reported by the touchscreen <NUM>, the Linux kernel layer <NUM> (or the framework layer <NUM>) of the terminal may determine whether a location of a touch point in the touch operation falls within the touch area customized by the user. If the location of the touch point in the touch operation falls within the touch area customized by the user, related information carried in the touch operation may be modified according to the touch mapping rule that is set by the user. For example, the user predefines that a tap operation in a touch area <NUM> is mapped to a double-tap operation. In this case, when the touch operation reported by the touchscreen <NUM> is determined by the terminal as the tap operation falling within the touch area <NUM>, the terminal may change a response event for the touch action from the tap operation to the double-tap operation. Further, a callback function corresponding to the double-tap operation is called back to the APP running at the application layer <NUM>, to implement a touch control effect of the double-tap operation. This implements refined and customized touch control on the touchscreen <NUM>, and improves input efficiency of the terminal.

The following describes in detail a touch control method provided in an implementation of this application with reference to a specific implementation.

A terminal obtains a first input of a user when running a target application, where the first input is used to trigger the terminal to enter a setting interface of a customized touch area.

The target application may be any application installed in the terminal, such as a video application, a game application, or a communication application. This is not limited in this implementation of this application.

A game application A is used as an example. In a process in which the terminal runs the application A, a control used to customize a touch area may be displayed on a display interface of the application A. As shown in <FIG>, a control <NUM> may be displayed on a login interface of the application A, to prompt the user to customize touch mapping rules for different touch areas when the application A is running. This improves input and response efficiency when the application A is running. Therefore, when it is detected that the user taps the control <NUM>, the first input of the user is obtained.

Alternatively, as shown in <FIG>, an option <NUM> "customize a touch mapping rule" may be set on a setting interface of the application A. After the user taps the option <NUM> "customize a touch mapping rule", the user may tap an option "modify a rule" to customize different touch areas and touch mapping rules for different touch areas. In this case, when it is detected that the user taps the option "modify a rule", the first input of the user is obtained.

Certainly, the user may also provide, on a setting interface of an operating system of the terminal, an entry for setting customized touch areas and touch mapping rules for different applications. As shown in <FIG>, the terminal provides an option <NUM> "customized touch" on the setting interface. After enabling the option <NUM> "customized touch", the user may select to set customized touch areas and touch mapping rules for different applications (for example, the application A). The application A is used as an example. After the user selects an effective application of the customized touch as the application A, as shown in <FIG>, an established touch area (for example, a touch area <NUM> and a touch area <NUM> in <FIG>) may be modified. After the user taps a button <NUM> in the touch area <NUM>, a size and a location of the touch area, and a touch mapping rule for the touch area <NUM> may be modified. Certainly, the user may also tap a button <NUM> for adding a customized touch area, to create a new touch area and touch mapping rule. This is not limited in this implementation of this application.

Certainly, the user may also enter, to the terminal by using a voice or the like, the first input used to enable a touch mapping rule in a customized touchscreen. This is not limited in this implementation of this application.

The terminal displays a translucent setting interface on a display interface of the target application.

In response to the first input of the user, in step S502, the terminal may draw a translucent image layer on the display interface of the current target application through superimposing, and display the translucent image layer on the touchscreen of the terminal as the setting interface. In this case, as shown in <FIG>, the terminal may prompt the user to draw a customized target touch area on a setting interface <NUM>. The user may freely customize a target touch area required by the user, and set a touch mapping rule that is valid for the target touch area in the customized target touch area. This improves input and output performance when the target application runs.

The terminal obtains a second input of the user on the setting interface, where the second input includes the target touch area customized by the user on the touchscreen and a target touch mapping rule that is set for the target touch area.

In some implementations of this application, still as shown in <FIG>, the user may draw a target touch area <NUM> of a specific size at any location on the setting interface <NUM> by using an area template <NUM> (for example, a rectangular template, a triangle template, or a circular template) that is preset by the terminal. In this case, the terminal may record a specific location and size of the target touch area <NUM> on the touchscreen by using a plane geometric function (for example, a rectangular area function or a circular area function) of the area template. For example, as shown in <FIG>, the target touch area <NUM> may be represented as: Area <NUM> = f (p, r), where p represents coordinates of a circle center, and r represents a circle radius.

In some other implementations of this application, as shown in <FIG>, the user may also draw boundary points of the target touch area on the setting interface <NUM> in a specific order (for example, a clockwise or counterclockwise order). A line connecting these boundary points may constitute a target touch area <NUM>. In this case, the terminal may record a specific location and size of the target touch area <NUM> on the touchscreen by using coordinates of the boundary points. For example, still as shown in <FIG>, the target touch area <NUM> may be represented as Area <NUM> {A, B, C, D, and E}, where A, B, C, D, and E are coordinates of five boundary points of the target touch area <NUM> in a clockwise order.

Further, after customizing the target touch area on the setting interface <NUM>, the user may continue to set the touch mapping rule for the target touch area. For example, as shown in <FIG>, the user sets a circular area in a lower left corner of a game application A as the target touch area <NUM>. After recording the location and the size of the target touch area <NUM>, the terminal may further prompt the user to modify a touch mapping rule for the target touch area <NUM>, for example, a touch sensitivity <NUM> of the target touch area <NUM> and a response event <NUM> for a touch action.

The terminal may display the touch sensitivity <NUM> in a form of a progress bar on a current setting interface. The user may change a progress of the progress bar by performing a drag operation, to modify the touch sensitivity of the target touch area <NUM>.

Still as shown in <FIG>, an example in which the progress bar of the touch sensitivity <NUM> ranges from -<NUM> to <NUM> is used. When the user sets the touch sensitivity <NUM> to <NUM>, it indicates that the touch sensitivity of the target touch area <NUM> does not need to be modified. In other words, the terminal uses a default touch sensitivity of the terminal when responding to the touch operation performed by the user in the target touch area <NUM>. In other words, if the terminal (or the target application) predefines that when the user slides <NUM> on the touchscreen each time, a display object corresponding to the operation may be controlled to move <NUM> meter. Therefore, when the user sets the touch sensitivity <NUM> to <NUM>, and when the user slides <NUM> on the touchscreen each time, the terminal still controls the corresponding display object to move <NUM> meter when the terminal responds to the operation.

When the touch sensitivity <NUM> that is set by the user is greater than <NUM>, it indicates that the user expects that the touch sensitivity in the target touch area <NUM> is higher than a current default value. For example, a value of the touch sensitivity <NUM> is <NUM>. In this case, for each touch action of moving <NUM> by the user in the target touch area <NUM>, the terminal may control, in response to the touch action, a corresponding display object to move <NUM> meters, in other words, respond to the touch action of the user in the target touch area <NUM> by using a distance twice the default touch sensitivity. For example, as shown in <FIG>, when the user moves from a point A (<NUM>, <NUM>) to a point B (<NUM>, <NUM>) in the target touch area <NUM>, based on the example that the touch sensitivity that is set by the user is <NUM>, the terminal may multiply both horizontal coordinates and vertical coordinates of the point A and the point B by <NUM>, to obtain A (<NUM>, <NUM>) and B' (<NUM>, <NUM>), and report the modified coordinate points to the target application, so that the target application considers that the user moves from A (<NUM>, <NUM>) to B' (<NUM>, <NUM>), to respond to the current touch action of the user with the double distance.

Correspondingly, when the touch sensitivity <NUM> that is set by the user is less than <NUM>, it indicates that the user expects the touch sensitivity in the target touch area <NUM> is lower than the current default value. For example, the value of the touch sensitivity <NUM> is -<NUM>. In this case, for each touch action of moving <NUM> by the user in the target touch area <NUM>, the terminal may control, in response to the touch action, a corresponding display object to move <NUM> meter, in other words, respond to the touch action of the user in the target touch area <NUM> by using a distance <NUM>/<NUM> time the default touch sensitivity. Still as shown in <FIG>, when the user moves from the point A (<NUM>, <NUM>) to the point B (<NUM>, <NUM>) in the target touch area <NUM>, based on the example that the touch sensitivity that is set by the user is - <NUM>, the terminal may multiply both horizontal coordinates and vertical coordinates of the point A and the point B by <NUM>, to obtain A (<NUM>, <NUM>) and B" (<NUM>, <NUM>), and report the modified coordinate points to the target application, so that the target application considers that the user moves from A (<NUM>, <NUM>) to B" (<NUM>, <NUM>), to respond to the current touch action of the user by using <NUM>/<NUM> time the distance.

In this way, <FIG> is still used as an example. Because the target touch area <NUM> in the lower left corner of the game application A is generally used to control a movement direction and a movement distance of a game character, when the user increases the touch sensitivity in the target touch area <NUM>, the game character may be controlled, by using a touch operation with a relatively short movement distance, to move to a relatively distant location. This improves a movement speed of the game character, brings better game experience to the user, and improves efficiency of input and output operations when the terminal runs the application A.

Optionally, to enable the user to quickly recognize the touch mapping rule of the touch sensitivity, when the user adjusts the value of the touch sensitivity <NUM> to be at different locations of the progress bar, the terminal may correspondingly prompt the user with a specific meaning of a current touch sensitivity. As shown in <FIG>, when the user sets the value of the touch sensitivity <NUM> to <NUM>, the terminal may prompt, by using a floating window <NUM>, the user that the movement speed of the game character is increased by <NUM> times in this case.

In this case, the terminal may use a touch sensitivity <NUM> that is set by the user as a coordinate mapping parameter in the touch mapping rule. Alternatively, a <NUM> times magnification rate corresponding to the touch sensitivity <NUM> may be used as the coordinate mapping parameter in the touch mapping rule. Certainly, when the touch sensitivity that is set by the user is less than <NUM>, a minification rate corresponding to the current touch sensitivity may be used as the coordinate mapping parameter in the touch mapping rule. Subsequently, when detecting that the user enters a first touch operation in the target touch area, the terminal may increase or decrease coordinate values of a coordinate point in the first touch operation based on the coordinate mapping parameter, to map the first touch operation to a second touch operation.

In other words, the terminal may provide, in a form of a touch sensitivity, a customized function for the target touch area for the user, and the terminal may store, in a form of a coordinate mapping parameter, the touch sensitivity that is customized and set by the user, so as to subsequently implement the customized function for the touch sensitivity based on the coordinate mapping parameter.

It may be understood that the user may further customize a plurality of target touch areas in the setting interface displayed in step S502, and set a touch mapping rule for each target touch area.

The game application A is still used as an example. As shown in <FIG>, the user customizes two target touch areas on the setting interface. One is a circular area (namely, a target touch area <NUM>) at a lower left corner of the touchscreen, and the other is a rectangular area (namely, the target touch area <NUM>) at a lower right corner of the touchscreen.

For the target touch area <NUM>, the user sets a value of a touch sensitivity in a touch mapping rule of the target touch area <NUM> to <NUM>, so as to improve a movement speed of a game character of the application A. For the target touch area <NUM>, because the area is generally used to implement various attack operations in a game in the application A, these operations are generally set when the application A is released or when the terminal is delivered from a factory. For example, you can double-tap an attack button to launch an attack. However, it is difficult for the user to perform a double-tap operation. The user may expect that a tap operation can also achieve an attack effect that the double-tap operation can achieve. However, some game applications determine an input value of a function by using a frequency of a continuous tap operation, but the continuous tap operation is difficult. The user may expect to achieve an effect of the continuous tap operation by performing a touch and hold operation.

In this implementation of this application, the user may further customize a response event of a touch action in the target touch area. Still as shown in <FIG>, the user may select an option of "mapping a tap operation to a double-tap operation" and an option of "mapping a touch and hold operation to a continuous tap operation" in the target touch area <NUM>. The terminal stores a response event of the touch action selected by the user. Subsequently, when the terminal receives a tap operation entered by the user in the target touch area <NUM>, the terminal may map the tap operation to a double-tap operation according to a touch mapping rule that is preset by the user for the target touch area <NUM>, so as to implement a double-tap operation effect, and improve efficiency of input and output operations when the terminal runs the application A.

In addition, the terminal may further provide a more detailed setting option of the touch mapping rule for the user. For example, when the user sets that the tap operation is mapped to the double-tap operation, a time interval of the double-tap operation may be further set. When the user sets that the touch and hold operation is mapped to the continuous tap operation, parameters such as a time threshold (in other words, how long the touch lasts is mapped to the continuous tap operation) of the touch and hold operation and a time interval between adjacent tap operations mapped by the touch and hold operation may be set, so that touch experience of the user on an operation interface of the application A more conforms to an operation habit of the user.

Further, as shown in <FIG>, after receiving a touch mapping rule that is set by the user for a target touch area (for example, the target touch area <NUM>), the terminal may further prompt the user to set the target touch area and an object on which the touch mapping rule of the target touch area takes effect. For example, it may be set that the touch mapping rule of increasing the touch sensitivity to <NUM> in the target touch area <NUM> takes effect on all interfaces in a running process of the application A, or it may be set that the touch mapping rule takes effect only on one or more interfaces in the running process of the application A, for example, a battle interface in a battle scenario.

Each application may distinguish different interfaces by using an interface identifier (for example, a class name of an Activity in an Android system) during running. Therefore, the terminal may associate the touch mapping rule with a class name that is of an Activity of one or more interfaces and that is set by the user.

For example, the terminal may prestore a correspondence between different types of display interfaces in the application A and class names of Activities of the display interfaces. For example, a setting interface in the application A includes an Activity <NUM> and an Activity <NUM>, and a battle interface in the application A includes an Activity <NUM> and an Activity <NUM>. When the user sets an effective object of the touch mapping rule to the battle interface, the terminal may associate the touch mapping rule with the Activity <NUM> and the Activity <NUM>. Subsequently, when the terminal identifies that a touch operation entered by the user occurs on the associated interface, the terminal may respond to the touch action of the user in the target touch area <NUM> by using the touch mapping rule. Alternatively, the user may manually enter each display interface to set a touch mapping rule that takes effect only on a current interface. This is not limited in this implementation of this application.

Certainly, identifiers such as a package name or a process ID used when different applications are running are usually different. Therefore, the user may also set the touch mapping rule to be effective for another one or more applications. In this case, the terminal may associate the touch mapping rule with the identifier that is of the one or more applications and that is set by the user, in this way, when running the one or more applications subsequently, the terminal may also respond to the touch action of the user in the target touch area <NUM> by using the touch mapping rule.

It should be noted that when the user customizes the plurality of target touch areas in the setting interface, the plurality of target touch areas may overlap. As shown in <FIG>, the user first customizes and sets a target touch area <NUM> and a touch mapping rule A of the target touch area <NUM> in the setting interface, and then customizes and sets a target touch area <NUM> in the setting interface. There is an overlapping area between the target touch area <NUM> and the target touch area <NUM>.

In this case, if a touch mapping rule B that is set by the user for the target touch area <NUM> conflicts with the touch mapping rule A, for example, the user sets a value of touch sensitivity in the target touch area <NUM> to <NUM>, and subsequently sets a value of a touch sensitivity in the target touch area <NUM> to <NUM>, the touch mapping rule B conflicts with the touch mapping rule A. In this case, the terminal may display an error prompt to the user, or still as shown in <FIG>, the terminal may reconfirm with the user whether to change the touch sensitivity previously set for the target touch area <NUM>, and if the user confirms to change the touch sensitivity of the target touch area <NUM>, in this case, the terminal may set values of touch sensitivities of both the target touch area <NUM> and the target touch area <NUM> to <NUM>.

Certainly, if the touch mapping rule A of the target touch area <NUM> does not conflict with the touch mapping rule B of the target touch area <NUM>, the terminal may continue to perform the following step S504, in other words, store each target touch area customized by the user and its target touch mapping rule in a certain data structure.

The terminal stores a correspondence among the target touch area, the target touch mapping rule of the target touch area, and the target application.

Specifically, after the terminal obtains the target touch area customized by the user on the touchscreen and the target touch mapping rule that is set for the target touch area, the terminal may store the correspondence among the target touch area, the target touch mapping rule of the target touch area, and the application (or an interface) on which the target touch mapping rule takes effect in a memory by using a preset data structure, so that when a touch operation entered by the user is subsequently received, a corresponding target touch mapping rule can be found to responded to the touch operation.

As shown in Table <NUM>, the terminal may set a profile (configuration) file for each target touch area by using one target touch area as granularity. The profile file is associated with one or more corresponding applications (or interfaces). Each profile file records a location of a corresponding target touch area on the touchscreen and a target touch mapping rule of the target touch area.

A profile <NUM> is used as an example. The user enters a customized target touch area Area <NUM> and a touch sensitivity of the Area <NUM> (namely, the second input in step S503) to the terminal on the setting interface of the game application A. In response to the second input, the terminal generates the profile <NUM>. The profile <NUM> includes coordinate information of the Area <NUM> and a target touch mapping rule that is set by the user for the Area <NUM>. In the target touch mapping rule, a value of the touch sensitivity is modified to <NUM>, and the response event of the touch action still uses a default response mechanism of the terminal and is not modified. In addition, the terminal establishes a correspondence between the profile <NUM> and the application A. Subsequently, when running the application A, the terminal may obtain, by querying a mapping relationship shown in Table <NUM>, all profile files corresponding to the application A.

In addition, in some implementations of this application, as shown in <FIG>, the terminal may further share a generated profile file to another device. In this way, a same customized target area and a same touch control effect may be copied on the another device. Certainly, if a display parameter such as screen resolution of a receiving device that receives the profile file is different from a display parameter of the terminal that sends the profile file, the receiving device may also perform corresponding conversion on the received profile file for use. This is not limited in this implementation of this application.

Alternatively, in some other implementations of this application, still as shown in <FIG>, the terminal may upload the generated profile file to a cloud server. When running a related application (for example, the game application A), another terminal may also download, from the cloud, the profile <NUM> corresponding to the application A, and copy a same customized target area and a same touch control effect on the another device.

Certainly, after receiving the profile file reported by each terminal, the server may also optimize, by using an algorithm such as big data statistics, a profile file corresponding to an application (or an interface). For example, when <NUM>% of terminals run the application A, the value of the touch sensitivity of the Area <NUM> is adjusted to be greater than <NUM>, in this case, the server may optimize a profile file that includes the Area <NUM> and that correspond to the application A, adjust a value of a touch sensitivity in a target touch mapping rule of the profile file that includes the Area <NUM> and that corresponds to the application A to <NUM>, and further deliver an optimized profile file to a terminal whose touch sensitivity is lower than <NUM>, so that the terminal implements a touch control effect with a higher touch sensitivity when running the application A. Certainly, after receiving the optimized profile file sent by the server, the terminal may further prompt the user whether to use the touch mapping rule that is set in the optimized profile file, so as to improve user experience.

By performing steps S501 to S504, in different application scenarios, the user may divide the touchscreen of the terminal into logical areas, to obtain a touch area customized by a user. In addition, the user may set, in the touch area customized by the user, a touch mapping rule that conforms to a current application scenario and an operation habit of the user, so that the user subsequently obtains a customized touch feeling in the touch area customized by the user. This implements refined and personalized control on the touchscreen of the terminal, so as to improve input and output efficiency of the terminal in different application scenarios.

In some other implementations of this application, a touch control method is provided.

A terminal obtains a first touch operation entered by a user on a touchscreen.

The terminal obtains coordinate information of a touch point through which the first touch operation passes. The touch point described herein may be a touch point detected by the touchscreen when the user enters the first touch operation, or may be a pixel that corresponds to the touch point detected by the touchscreen and that is on a display screen.

Similar to step S501, the target application may be any application installed in the terminal, such as a video application, a game application, or a communication application. This is not limited in this implementation of this application.

The game application A is still used as an example. When running the application A, the terminal may display a display interface of the application A on the touchscreen in real time, and the user may enter a corresponding input operation on the touchscreen to implement a related function provided by the application A.

For example, as shown in <FIG>, after starting the application A, the terminal enters a battle interface <NUM> in a game, and the user may tap a simulated control handle <NUM> in a lower left corner area of the battle interface <NUM> to control a game character to move up, down, left, and right. Therefore, when the user moves the simulated control handle <NUM> to slide rightward (namely, the first touch operation), the touchscreen of the terminal may report detected touch information (for example, including a touch event and coordinate information of a touch point) to a kernel layer, a framework layer, and an application layer of the terminal in sequence.

Certainly, the touchscreen may further add touch information such as touch time of the detected current touch operation to the first touch operation. This is not limited in this implementation of this application.

In addition, the coordinate information in the touch operation may be absolute coordinate information of the touch point on the touchscreen, or may be relative coordinate information obtained after the terminal converts the absolute coordinate information.

The absolute coordinate information is coordinates of the touch point in a coordinate system defined by a manufacturer of the touchscreen. For example, in a process of producing a touchscreen, a coordinate system of the touchscreen may be set in an IC chip of the touchscreen. As shown in (a) in <FIG>, a first coordinate system is set by using a lower left corner of the touchscreen as an origin O (<NUM>, <NUM>). In this case, when the touchscreen detects that the user enters a touch operation at a point P of the touchscreen, it may be determined, in the first coordinate system, that coordinates of the point P are P (<NUM>, <NUM>). In this case, P (<NUM>, <NUM>) is the absolute coordinate information.

However, in some cases, a coordinate system set on the touchscreen may be different from a coordinate system defined by an operating system of the terminal. For example, as shown in (b) in <FIG>, the operating system of the terminal sets a second coordinate system by using an upper left corner of the touchscreen as an origin O' (<NUM>, <NUM>). In this case, the touch operation entered by the user at the point P on the touchscreen is mapped, in the second coordinate system, to a touch operation at a point P' (<NUM>, <NUM>) on the touchscreen. In this case, P' (<NUM>, <NUM>) is the relative coordinate information.

Optionally, the foregoing process of mapping the absolute coordinate information to the relative coordinate information may be completed by the kernel layer in the terminal, or may be completed by the framework layer in the terminal. This is not limited in this implementation of this application.

The terminal determines whether the first touch operation is performed on a first preset area in a target interface.

The target interface is any interface presented by the target application running in the foreground in step S601. For example, the first preset area is the target touch area customized by the user in the foregoing implementation, and the target interface may cover a part or all of the target touch area.

In addition, that the first touch operation is performed on the first preset area may mean that the touchscreen detects, in a floating or touch manner, that an operation object or an operation track of the first touch operation of the user falls within the first preset area. For example, when it is detected that coordinates of a touch point of the first touch operation fall within the first preset area, it may be determined that the first touch operation is performed on the first preset area.

Specifically, in step S602, after obtaining the first touch operation in the target interface, to determine whether to respond to the first touch operation by using the touch mapping rule customized by the user, the terminal may obtain an identifier of the target application that is running in the foreground at this time, and further search, based on the identifier of the target application, the correspondence shown in Table <NUM> for all profile files corresponding to the target application. Because each of these profile files records a specific location of the target touch area customized by the user, the terminal may determine, based on coordinate information of the touch point in the first touch operation, a profile file in which the first touch operation specifically falls within the target touch area.

For example, if the terminal obtains that an identifier of a currently running application is a package name of the application A, it may be determined, through Table <NUM>, that two profile files (namely, the profile <NUM> and the profile <NUM> in Table <NUM>) are customized by the user when the application A is running. Further, the terminal may separately compare coordinate information P (x, y) of the touch point in the first touch operation with the Area <NUM> in the profile <NUM> and the Area <NUM> in the profile <NUM>, to determine that the P point falls within the target touch area Area <NUM> in the lower left corner of the touchscreen.

It should be noted that, when the terminal determines whether the coordinate information falls within the target touch area, a coordinate system used by the coordinate information of the touch point should be the same as a coordinate system used by the target touch area recorded in Table <NUM>. For example, the terminal records the location of the Area <NUM> based on the second coordinate system defined by the operating system, and the coordinate information P (x, y) of the touch point in the first touch operation reported by the touchscreen to the terminal is recorded based on the first coordinate system. In this case, when the touchscreen reports the coordinate information P (x, y) to the kernel layer of the terminal, the kernel layer may map the coordinate information P (x, y) to coordinates P' (x', y') in the second coordinate system, and further determine whether the coordinates P' (x', y') falls within the target touch area Area <NUM>.

If the first touch operation falls within the first preset area, the terminal maps the first touch operation to a second touch operation.

The target application responds to the second touch operation, to implement a customized touch function when the target application is running.

Still using an example in which the coordinate information P (x, y) of the touch point in the first touch operation falls within the target touch area Area <NUM>, in this case, with reference to the architectural diagram of the Android system shown in <FIG> and <FIG>, as shown in <FIG>, the touchscreen encapsulates the detected first touch operation as an original touch event by using a driver, and reports the original touch event to a kernel layer <NUM> of the terminal. Further, the kernel layer <NUM> maps the coordinate information P (x, y) carried in the original touch event to coordinates P' (x', y') in the second coordinate system, and encapsulates the original touch event as an advanced touch event that can be read by an upper layer, and reports the advanced touch event to a framework layer <NUM>. The framework layer <NUM> may determine, by querying a correspondence between a profile file and an application shown in Table <NUM>, that coordinates P' (x', y') carried in the advanced touch event falls within the target touch area Area <NUM> customized by the user in the profile <NUM>.

In this case, the terminal may search for a target touch mapping rule recorded in the profile <NUM>. A coordinate mapping parameter used to reflect a touch sensitivity is set in the target touch mapping rule. For example, the coordinate mapping parameter is <NUM>, in other words, the application A responds, at a distance ratio of <NUM> times, to the first touch action entered by the user in the target touch area Area <NUM>. Then, the framework layer <NUM> may multiply both a horizontal coordinate and a vertical coordinate in the coordinates P' (x', y') by <NUM> times, to obtain modified coordinates Q (<NUM>. 8x', <NUM>. 8y'), and use the modified coordinates Q (<NUM>. 8x', <NUM>. 8y') as coordinate information of a touch point in the second touch operation. The framework layer <NUM> adds the modified coordinates Q (<NUM> x', <NUM>. 8y') to the advanced touch event, and reports the advanced touch event to the application A that is running at the application layer, so that the application A may respond to the second touch operation based on the modified coordinates Q (<NUM>. 8x', <NUM>. In other words, the user enters the first touch operation at the point P (x, y) to the touchscreen, and an application in the terminal finally responds to the user with the second touch operation at the point Q (<NUM>. 8x', <NUM>.

For example, as shown in <FIG>, the terminal detects the first touch operation entered by the user at the point P (<NUM>, <NUM>). Because the point P falls within the target touch area Area <NUM> customized by the user in the profile <NUM>, the terminal modifies coordinates P (<NUM>, <NUM>) to coordinates Q (<NUM> x <NUM>, <NUM> x <NUM>) = Q (<NUM>, <NUM>) based on a value <NUM> of a touch sensitivity in the profile <NUM>. In this case, after the application A obtains the second touch operation whose coordinate values are Q (<NUM>, <NUM>), if coordinates of a touch point in a touch operation received by the application A last time are O (<NUM>, <NUM>), the application A considers that a finger of the user controls the simulated control handle <NUM> to move rightward by <NUM> from O (<NUM>, <NUM>) to Q (<NUM>, <NUM>), and actually the user controls the simulated control handle <NUM> to move rightward by <NUM> from the point O (<NUM>, <NUM>) to the point P (<NUM>, <NUM>). This implements an effect of controlling the simulated control handle <NUM> to move <NUM>, and improves a movement speed of a game character.

In addition, if a control area of the simulated control handle <NUM> is fixed, for example, the user is only allowed to control the simulated control handle <NUM> in a circular area shown in an Area <NUM> in <FIG>. In this case, if the terminal modifies the coordinates of the touch point in the first touch operation based on the value of the touch sensitivity, and the modified coordinates (for example, the Q point) exceed a control boundary of the control area Area <NUM> of the simulated control handle <NUM>, as shown in <FIG>, the terminal may report, to the application A, a Z point that is on the control boundary and that is closest to the point Q as mapped coordinate information of the touch point in the second touch operation, so as to avoid a problem that the application cannot correctly respond to the first touch operation because the modified coordinates exceed the control area corresponding to the first touch operation.

It should be noted that the foregoing implementation is described by using an implementation of a fixed touch sensitivity as an example. In other words, as shown in (a) in <FIG>, after the user sets the touch sensitivity of the target touch area Area <NUM> to <NUM>, the terminal always responds to the touch operation of the user in the target touch area Area <NUM> in a ratio of <NUM>.

It may be understood that the terminal may also modify the touch operation in a non-linear manner, and finally reach a touch sensitivity that is set by the user. For example, as shown in (b) in <FIG>, after the user sets the touch sensitivity of the target touch area Area <NUM> to <NUM>, the terminal may change the touch sensitivity based on a distance of sliding by the user in the Area <NUM>, and gradually increase the touch sensitivity of the terminal when the sliding distance is larger, until the touch sensitivity is increased to <NUM> times of the default touch sensitivity.

In addition, as shown in <FIG>, after the framework layer <NUM> reports the advanced touch event to the application A that is running at the application layer, the application A may invoke a related library function at a system runtime library layer <NUM>, and the library function helps the application A determine, based on a parameter transferred in the advanced touch event, a specific touch operation performed by the user at the point P, for example, a tap operation. After determining that the current touch operation is the tap operation, if a profile file corresponding to the touch point P records that a response event of the tap operation is a double-tap operation, the terminal does not callback a callback function written for the tap operation in the application A, but call back a callback function written for the double-tap operation in the application A, in other words, (the tap operation) the first touch operation is mapped to the second touch operation (the double-tap operation), so that the application A responds to the double-tap operation and implements an effect of the double-tap operation at the touch point P.

Certainly, if the framework layer <NUM> obtains an advanced touch event <NUM> generated when the user performs the tap operation at the point P, and can determine, based on the advanced touch event <NUM>, that the user performs the tap operation at the point P, at this time, the framework layer <NUM> may modify, based on the profile file corresponding to the point, the advanced touch event <NUM> generated by the tap operation to an advanced touch event <NUM> that should be generated when the user performs the double-tap operation at the point P, and report the advanced touch event <NUM> to the application A that is running in the application layer. In this way, when the application A invokes a related library function at the system runtime library layer <NUM>, it may be determined that a specific touch operation performed by the user at the point P is the double-tap operation. In this case, the terminal may call back the callback function written for the double-tap operation in the application A, so that the application A can also respond to the double-tap operation and implement the effect of the double-tap operation at the point P.

Further, in a running process of an application, the user usually has different requirements on a touch sensitivity of the application only when the user performs a touch operation of a sliding type. Therefore, when coordinate information in the touch operation falls within the target touch area, the terminal may determine, by using a library function, that the current touch operation is a sliding operation, and then, the coordinate information in the touch operation is modified based on the touch sensitivity customized by the user in the profile file.

Certainly, if the coordinate information in the touch operation does not fall within a target touch area preset for the target application, or a touch mapping rule that is set in a profile file corresponding to the coordinate information is a default touch mapping rule of the terminal, after obtaining the touch operation, the terminal does not need to modify the touch operation, and the target application responds to the touch operation based on related touch information carried in the actual touch operation. This is not limited in this implementation of this application.

It may be understood that, to implement the foregoing functions, the terminal and the like include corresponding hardware structures and/or software modules for performing the functions. A person skilled in the art should easily be aware that, in combination with the examples described in the implementations disclosed in this specification, units, algorithms, and steps may be implemented by hardware or a combination of hardware and computer software in this application. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the implementations of this application.

In the implementations of this application, the terminal may be divided into functional modules based on the foregoing method examples. For example, each functional module may be obtained through division based on each corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module. It should be noted that, in this implementation of this application, module division is an example, and is merely logical function division. In actual implementation, another division manner may be used.

When each function module is obtained through division based on each corresponding function, <FIG> is a possible schematic structural diagram of the terminal in the foregoing implementations. The terminal includes an obtaining unit <NUM>, a storage unit <NUM>, a display unit <NUM>, and a mapping unit <NUM>.

The obtaining unit <NUM> is configured to support the terminal in performing processes S501 and S503 in <FIG> and process S601 in <FIG>. The storage unit <NUM> is configured to support the terminal in performing the process S504 in <FIG>. The display unit <NUM> is configured to support the terminal in performing the process S502 in <FIG>. The mapping unit <NUM> is configured to support the terminal in performing the processes S602 to S604 in <FIG>. All related content of the steps in the foregoing method implementations may be cited in function descriptions of a corresponding functional module.

When an integrated unit is used, the mapping unit <NUM> may be used as a processing module, the storage unit <NUM> may be used as a storage module, the obtaining unit <NUM> may be used as an input module, and the display unit <NUM> may be used as a display module.

In this case, <FIG> is a possible schematic structural diagram of a terminal in the foregoing implementations. A processing module <NUM> is configured to control and manage an action of the terminal. An input module <NUM> is configured to support interaction between the terminal and a user. A storage module <NUM> is configured to store program code and data of the terminal. The display module <NUM> is configured to display the information entered by the user or information provided for the user, and various menus of the terminal.

In this implementation of this application, the terminal may obtain, by using the input module <NUM>, a first touch operation entered by the user on a touchscreen. When the first touch operation is performed on a first preset area on a target interface (namely, an interface on which a target application runs in the foreground), the processing module <NUM> may map the first touch operation to a second touch operation, so that the target application responds to the second touch operation, to implement refined and personalized control on the touchscreen.

All related content of the steps related to the application switching method may be cited in related descriptions in steps S501 to S504 or S601 to S604 in the foregoing implementation.

The processing module <NUM> may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a GPU, a general-purpose processor, a digital signal processor (Digital Signal Processing, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA), or another programmable logic device, a transistor logic device, a hardware component, or a combination thereof. The processor may implement or execute various example logical blocks, modules, and circuits described with reference to content disclosed in this application. The processor may be a combination of processors implementing a computing function, for example, a combination of one or more microprocessors, or a combination of the DSP and a microprocessor.

The input module <NUM> may be an input/output device or a communications interface such as a touchscreen or a microphone.

The storage module <NUM> may be a memory. The memory may include a high-speed random access memory (RAM), or may include a nonvolatile memory, such as a disk storage device, a flash storage device, or another volatile solid-state storage device.

The display module <NUM> may be a display, and the display may be specifically configured in a form of a liquid crystal display, an organic light-emitting diode, or the like. In addition, a touchpad may be further integrated into the display, and is configured to: collect a touch event on or near the touchpad, and send collected touch information to another component (such as the processor).

When the processing module <NUM> is a processor, the input module <NUM> is a touchscreen, the storage module <NUM> is a memory, and the display module <NUM> is a display, the terminal provided in this implementation of this application may be the mobile phone <NUM> shown in <FIG>.

All or some of the foregoing implementations may be implemented by using software, hardware, firmware, or any combination thereof. When a software program is used to implement the implementations, the implementations may be implemented completely or partially in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the procedure or functions according to the implementations of this application are all or partially generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid-state drive Solid State Disk (SSD).

Claim 1:
A touch control method, comprising:
obtaining (S601), by a system of a terminal, a first touch operation entered by a user on a touchscreen of the terminal;
mapping (S602, S603), by the system of the terminal, the first touch operation to a second touch operation in accordance with a touch mapping rule, when a touch point of the first touch operation falls within a first preset area included in at least one preset area on a target interface of a target application, wherein the target application is running in a foreground and wherein the touch mapping rule corresponds to the first preset area and the touch mapping rule is used to instruct to map the first touch operation obtained in the first preset area to the second touch operation;
reporting, by the system of a terminal, the second touch operation to the target application;
wherein the system of the terminal comprises a framework layer;
the obtaining, by the system of the terminal, the first touch operation comprise: obtaining, by the framework layer, the first touch operation;
the mapping, by the system of the terminal, the first touch operation to the second touch operation comprise: mapping, by the framework layer, the first touch operation to the second touch operation;
wherein the system of the terminal further comprises a kernel layer;
wherein the method further comprises:
detecting, by the kernel layer, the first touch operation; and,
reporting, by the kernel layer, the first touch operation to the framework layer;
wherein, the obtaining, by the framework layer, the first touch operation comprise: obtaining, by the framework layer, the first touch operation from the kernel layer,
wherein the method further comprises: reporting the first touch operation to the target application when the touch point of the first touch operation does not fall within any of the at least one preset area;
wherein the mapping comprises:
modifying a coordinate value of the touch point in the first touch operation to obtain a coordinate value of a touch point in the second touch operation.