Touch operation response method and electronic device

By implementing a response method for touch operations in electronic devices, filtering the processing flow of touch operations in game mode, solving the problems of high system load and power consumption, and achieving more efficient system performance and user experience.

CN118444798BActive Publication Date: 2025-03-14HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311547625.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2025-03-14
Estimated Expiration
2043-11-15

AI Technical Summary

Technical Problem

In the prior art, when electronic devices handle touch operations, the system load is large and the power consumption is high, especially in game mode.

Method used

By implementing a response method for touch operation in an electronic device, when displaying a window of a game application on the touch screen, if the system is running in game mode and the touch operation is located in the window, the filtering operation is avoided from obtaining target sensor data, thereby saving system resources.

Benefits of technology

This method effectively reduces system load and power consumption, reduces redundant processes, and improves system performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118444798B_ABST
    Figure CN118444798B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method for responding to a touch operation and an electronic device, the method comprising: displaying a first window through a touch screen, wherein the first window displays an interface of a first game application; receiving a first touch operation performed by a user on the touch screen; in response to the first touch operation, if it is determined that the system of the electronic device is running in a game mode and the touch position of the first touch operation is located within the first window, filtering a first processing operation, wherein the first processing operation comprises obtaining target sensor data, wherein the target sensor data is used to identify whether the touch operation is a knuckle touch operation. The method can save power consumption of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a touch operation response method and an electronic device. Background Art

[0002] In order to facilitate user operations, electronic devices provide functions such as quick screenshot and quick screen recording. Users can use their knuckles to touch the touch screen of the electronic device in different touch modes, so that the electronic device performs different quick operations.

[0003] Specifically, the electronic device identifies a touch operation on the touch screen, and if it is determined that the touch operation is a knuckle touch operation, it responds to the knuckle touch operation by taking a screenshot or recording the screen.

[0004] The inventors have discovered that, in some application scenarios, the response method for touch operation in the related art results in a heavy load on the system and high power consumption of the electronic device. Summary of the invention

[0005] The present application provides a touch operation response method and electronic device, which can reduce system load and save power consumption of electronic equipment.

[0006] In a first aspect, the present application provides a method for responding to a touch operation, which is executed by an electronic device, the electronic device including a touch screen, the method including: displaying a first window through the touch screen, the first window displaying an interface of a first game application; receiving a first touch operation performed by a user on the touch screen; in response to the first touch operation, if it is determined that the system of the electronic device is running in a game mode and the touch position of the first touch operation is located within the first window, filtering a first processing operation, the first processing operation including obtaining target sensor data, the target sensor data being used to identify whether the touch operation is a knuckle touch operation.

[0007] Optionally, the first game application may be any game application in a game list managed by a game manager. When the system of the electronic device is in a game mode, a window of at least one game application in the game list is displayed on the touch screen.

[0008] The first touch operation may be a knuckle touch operation or a non-knuckle touch operation. The first processing operation is also a knuckle algorithm. The target sensor data refers to sensor data required for identifying the knuckle touch operation, and may include acceleration (ACC) data, for example.

[0009] When a window of a game application is displayed on the touch screen of an electronic device, if a user performs a touch operation in the window of the game application, regardless of whether the touch operation is a knuckle touch operation, the touch operation is treated as a non-knuckle touch operation. Based on this, the touch operation response method provided in the first aspect, when the window of the first game application is displayed on the touch screen, if it is determined that the system is running in game mode, and the position of the first touch operation on the touch screen is located within the window of the first game application, then the filtering algorithm is executed to filter the first processing operation, and the system of the electronic device does not need to obtain the target sensor data from the sensor subsystem through inter-core communication. In this way, the redundant process in the knuckle algorithm in the game scenario is omitted, system resources are saved, and system load and power consumption are reduced.

[0010] In a possible implementation, the first processing operation further includes: identifying whether the first touch operation is a knuckle touch operation according to the target sensor data.

[0011] In this implementation, not only the process of obtaining target sensor data in the knuckle algorithm is omitted, but also the process of identifying knuckle touch operations is omitted, further saving system resources and reducing system load and power consumption.

[0012] In one possible implementation, the electronic device includes an input framework located at the application framework layer, a THP module located at the hardware abstraction layer, and a TP driver located at the kernel layer. The method also includes: the input framework registers a monitoring event with the TP driver; when the TP driver receives touch data sent by the THP module, the TP driver sends a first notification to the input framework; the input framework obtains target sensor data in response to the first notification; and filters the first processing operation, including: the THP module does not send touch data corresponding to the first touch operation to the TP driver.

[0013] The touch data may include capacitance data, for example. That is, the input framework pre-registers a monitoring event with the TP driver to monitor the event that the THP module sends touch data to the TP driver. When the TP driver monitors that the THP module sends touch data to the TP driver, the TP driver sends a first notification (also called capacitance write notification) to the input framework. After receiving the first notification, the input framework triggers the acquisition of target sensor data. Among them, the THP module sends touch data to the TP driver, for example, the THP module can write capacitance data to the finger joint node in the TP driver.

[0014] Based on the above registration monitoring mechanism, in this method, when the THP module determines that the system of the electronic device is running in the game mode and the touch position of the first touch operation is located in the first window, it does not send touch data to the TP driver. In this way, the TP driver will not be triggered to send the first notification to the input framework, and thus the input framework will not be triggered to obtain the target sensor data. Therefore, the process of obtaining the target sensor data can be omitted, the algorithm operation process can be simplified, system resources can be saved, and the system load and power consumption can be reduced.

[0015] In one possible implementation, if it is determined that the system of the electronic device is running in game mode and the touch position of the first touch operation is located within the first window, then before filtering the first processing operation, the method also includes: determining whether the system of the electronic device is running in game mode based on the system operation mode of the electronic device; determining whether the touch position of the first touch operation is located within the first window based on the display mode of the first window and / or the coordinate range of the first window.

[0016] The system operation mode may include a game mode and a non-game mode. When the system of the electronic device is in the game mode, at least one preset game application in the electronic device is running in the foreground. The preset game application refers to the game application in the game list.

[0017] In this implementation, by obtaining the system operation mode of the electronic device, it is possible to accurately determine whether the system is in the game mode, thereby accurately determining whether a game application is running in the foreground. In this way, the accuracy of filtering the first processing operation can be improved. At the same time, by at least one of the display mode of the first window and the coordinate range of the first window, it is possible to accurately determine whether the touch position of the first touch operation is located within the first window, thereby improving the accuracy of filtering the first processing operation.

[0018] In one possible implementation, the electronic device includes a game management module located at the application framework layer and a THP module located at the hardware abstraction layer, and determines whether the touch position of the first touch operation is located within the first window according to the display mode of the first window and / or the coordinate range of the first window, including: the game management module obtains the display mode of the first window and / or the coordinate range of the first window; the game management module sends the display mode of the first window and / or the coordinate range of the first window to the THP module; the THP module determines whether the touch position of the first touch operation is located within the first window according to the display mode of the first window and / or the coordinate range of the first window.

[0019] The display modes of the window can include full-screen window mode, split-screen window mode and small window mode.

[0020] The game management module is also called a game assistant module. Optionally, the game management module may include a game coordinate calculation unit. The game coordinate calculation unit may obtain the display mode of the first window from the window manager, calculate the coordinate range of the first window, and then send it to the THP module.

[0021] The game management module is located in the application framework layer, so it can accurately and in real time obtain the display mode and coordinate range of the game window, provide accurate data to the THP module, and improve the accuracy of the knuckle algorithm filtering.

[0022] In one possible implementation, the game management module obtains the coordinate range of the first window, including: the game management module obtains the first coordinate range, the first coordinate range is the coordinate range of the first window in the first coordinate system at the current resolution of the touch screen; the game management module performs resolution conversion on the first coordinate range according to the maximum resolution and current resolution of the touch screen to obtain the coordinate range of the first window.

[0023] The first coordinate system is the physical coordinate system XOY of the touch screen. The first coordinate range is the coordinate range in the physical coordinate system of the first window at the current resolution. The coordinate range of the first window can be represented by the X coordinate and the Y coordinate in the physical coordinate system XOY.

[0024] Optionally, the resolution of the first coordinate range may be converted using the following formula:

[0025] int xTarget=(int)((float)xSrc*maxResolution.x / currentResolution.x+C)

[0026] int yTarget=(int)((float)ySrc*maxResolution.y / currentResolution.y+C)

[0027] Wherein, xTarget is the X coordinate after resolution conversion, yTarget is the Y coordinate after resolution conversion, xSrc is the X coordinate before resolution conversion, ySrc is the Y coordinate before resolution conversion, maxResolution is the maximum resolution, currentResolution is the current resolution, and C is a correction parameter, which can be 0.5, for example.

[0028] When the current resolution of the touch screen is not the highest resolution, the first coordinate range will be scaled and will not correspond to the actual coordinate range. In this implementation, after the first coordinate range is calculated, the first coordinate range is further converted to a more accurate coordinate range of the first window, thereby improving the accuracy of the subsequent THP judgment and the accuracy of the knuckle algorithm filtering, and preventing the end user from being unable to trigger the corresponding function through the knuckle touch operation outside the first window.

[0029] In one possible implementation, the THP module determines whether the touch position of the first touch operation is located within the first window based on the display mode of the first window and / or the coordinate range of the first window, including: if the display mode of the first window is a full-screen window mode, the THP module determines that the touch position of the first touch operation is located within the first window; if the display mode of the first window is a split-screen window mode or a small window mode, and the touch position of the first touch operation is within the coordinate range of the first window, the THP module determines that the touch position of the first touch operation is located within the first window.

[0030] If the display mode of the first window is a full-screen window mode, the touch position of the first touch operation must be within the first window, so there is no need to determine whether the touch position is within the coordinate range of the first window. This method can simplify the determination process and improve determination efficiency.

[0031] In one possible implementation, determining whether the system of the electronic device is running in a game mode is performed based on the system operation mode of the electronic device, including: a game management module obtains the system operation mode; the game management module sends the system operation mode to a THP module; and the THP module determines whether the system of the electronic device is running in a game mode based on the system operation mode.

[0032] As mentioned above, the game management module is located at the application framework layer, so it can accurately obtain the system operation mode, so that the THP module can accurately filter the knuckle algorithm.

[0033] In one possible implementation, the game management module sends at least one of the display mode of the first window, the coordinate range of the first window and the system operation mode to the THP module through a first command, and the first command includes a command field and a parameter field, the command field is used to transmit the system operation mode and the display mode of the first window, and the parameter field is used to transmit the coordinate range of the first window.

[0034] The command field is also known as String command, and the parameter field is also known as String parameter. Optionally, the command field can transmit different command types through different values. The parameter field can transmit different parameters through different values.

[0035] Optionally, the parameter field may include a lower width limit (widthLow), an upper width limit (widthHigh), a lower height limit (heightLow), and an upper height limit (heightHigh).

[0036] In one possible implementation, when the system operation mode is game mode and the display mode of the first window is full-screen display mode, the value of the command field is the first value; when the system operation mode is game mode and the display mode of the first window is split-screen display mode or small window mode, the value of the command field is the second value, and the parameter field is the coordinate range of the first window.

[0037] The first value may be 2, for example, and the second value may be 3, for example.

[0038] In this implementation, information can be accurately transmitted to the THP module through the first command, so that the THP module can accurately and simply identify the information sent by the game management module, thereby improving the accuracy and efficiency of information transmission.

[0039] In one possible implementation, the method also includes: when it is detected that the touch screen switches from the on state to the off state, the THP module clears the value of the parameter field and sets the value of the command field to a third value, and the third value indicates that the system operating mode is a non-gaming mode.

[0040] The third value may be -1, for example.

[0041] That is, after the user turns off the screen, the method resets the first command to a command in non-game mode. In this way, the method can enhance its ability to cope with potential risks brought by abnormal conditions such as game program crashes, ensure that the user can restore the knuckle touch operation by turning the screen on and off in abnormal conditions, and improve the user experience.

[0042] In a possible implementation, after filtering the first processing operation, the method further includes: responding to the first touch operation through the first game application.

[0043] The first touch operation is an operation performed by the system in the game mode on the first window of the first game application, so no matter whether the first touch operation is a knuckle touch operation or a non-knuckle touch operation, the first processing operation is filtered, and then the first game application responds to the first touch operation. In this way, the first touch operation is accurately responded to, thereby improving the user experience.

[0044] In one possible implementation, the method also includes: if the touch position of the first touch operation is outside the first window, executing a first processing operation to obtain first target sensor data; identifying whether the first touch operation is a knuckle touch operation based on the first target sensor data and the touch data of the first touch operation; if the first touch operation is a knuckle touch operation, responding to the first touch operation through a second application.

[0045] In this implementation, when the touch position of the first touch operation is outside the first window, the electronic device can normally write the touch data to the knuckle node, triggering the TP driver to send the first notification to the input framework, thereby triggering the input framework to obtain the ACC data. After that, the input framework can identify the knuckle event based on the capacitance data and the ACC data. In this way, the normal recognition of the knuckle touch operation in normal scenarios is achieved, ensuring the normal operation of shortcut functions such as screenshots.

[0046] In a possible implementation, the second application is a screenshot application or a screen recording application.

[0047] In one possible implementation, the method also includes: displaying the interface of the input method application through the touch screen; receiving a second touch operation performed by the user on the touch screen; in response to the second touch operation, if it is determined that the hot zone of the input method application is in a called-up state, and the touch position of the second touch operation is located within the hot zone of the input method application, filtering the first processing operation.

[0048] In this implementation, when the interface of the input method application is displayed on the touch screen, it is determined that the input method application is in the call-out state, and the touch position of the second touch operation is located in the hot zone of the input method application, the first processing operation is filtered, and the target sensor data is not obtained through the inter-core communication method. In this way, the redundant process in the knuckle algorithm in the input method scenario is omitted, system resources are saved, and the system load and power consumption are reduced.

[0049] In one possible implementation, the method also includes: if it is determined that the hot zone of the input method application is in a called-up state, and the touch position of the second touch operation is outside the hot zone of the input method application, then executing a first processing operation to obtain second target sensor data; identifying whether the second touch operation is a knuckle touch operation based on the second target sensor data and the touch data of the second touch operation; if the second touch operation is a knuckle touch operation, responding to the second touch operation through a second application.

[0050] In a possible implementation, filtering the first processing operation includes: not sending touch data of the second touch operation to the input framework.

[0051] In one possible implementation, the method further includes: determining the hot zone state and hot zone layout of the input method application; determining whether the input method hot zone is in a called-out state according to the hot zone state; and determining whether the touch position of the second touch operation is located within the hot zone of the input method application according to the hot zone layout and the hot zone coordinate range.

[0052] In one possible implementation, the input method application is located in the application layer of the electronic device, and the electronic device also includes a THP module located in the hardware abstraction layer, which determines whether the touch position of the second touch operation is located in the hot zone of the input method application based on the hot zone layout and the hot zone coordinate range, including: the input method application determines the hot zone layout and sends the hot zone layout to the THP module; the THP module determines whether the touch position of the second touch operation is located in the hot zone of the input method application based on the hot zone layout and the hot zone coordinate range.

[0053] In one possible implementation, the THP module determines whether the touch position of the second touch operation is located within the hot zone of the input method application based on the hot zone layout, including: if the hot zone layout type is a horizontal screen 90° layout or a horizontal screen 270° layout, the THP module determines whether the horizontal coordinate of the touch position of the second touch operation is located between the upper and lower height limits of the hot zone; if the hot zone layout type is a horizontal screen and vertical screen 0° layout, the THP module determines whether the vertical coordinate of the touch position of the second touch operation is located between the upper and lower height limits of the hot zone.

[0054] In a possible implementation, determining whether an input method hot zone is in a call-out state according to the hot zone state includes: when the hot zone state of the input method application changes, the changed hot zone state is sent to the THP module; and the THP module determines whether the input method hot zone is in a call-out state according to the changed hot zone state.

[0055] In one possible implementation, the input method application sends the hot zone status, hot zone layout and hot zone coordinate range to the THP module through a second command; the second command includes a command field and a parameter field, the command field is used to transmit the hot zone status and hot zone layout, and the parameter field is used to transmit the hot zone coordinate range.

[0056] In a second aspect, the present application provides a device, which is included in an electronic device, and the device has the function of implementing the electronic device behavior in the above-mentioned first aspect and the possible implementation of the above-mentioned first aspect. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, etc.

[0057] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution of the first aspect.

[0058] In a fourth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.

[0059] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.

[0060] Further optionally, the chip also includes a communication interface.

[0061] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution of the first aspect.

[0062] In a sixth aspect, the present application provides a computer program product, the computer program product comprising: a computer program code, when the computer program code runs on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is an application scenario diagram of a touch operation response method provided in an embodiment of the present application;

[0064] Figure 2 is an application scenario diagram of another touch operation response method provided in an embodiment of the present application;

[0065] Figure 3 This is another application scenario diagram of a touch operation response method provided in an embodiment of the present application;

[0066] Figure 4 This is an interface diagram of a knuckle touch operation response process in an input method scenario provided by an embodiment of the present application;

[0067] Figure 5 This is a schematic diagram of an interface of a knuckle touch operation response process in a game scenario provided by an embodiment of the present application;

[0068] Figure 6 is a system structure block diagram of an electronic device provided in an embodiment of the present application;

[0069] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0070] Figure 8 is a system structure block diagram of another electronic device provided in an embodiment of the present application;

[0071] Fig. 9 is a flowchart of a touch operation response method provided in an embodiment of the present application;

[0072] Fig.10 This is another application scenario schematic diagram provided by the embodiment of the present application;

[0073] Fig.11 is a flowchart of another touch operation response method provided in an embodiment of the present application;

[0074] Fig.12 is a flowchart of another touch operation response method provided in an embodiment of the present application;

[0075] Fig.13 is a schematic diagram of a principle of a touch operation response method provided in an embodiment of the present application;

[0076] Fig.14 This is a schematic diagram of an input method hot zone layout provided in an embodiment of the present application;

[0077] Fig.15 is another example of input method hot zone layout schematic diagram provided in an embodiment of the present application;

[0078] Fig.16 This is a schematic diagram of a coordinate conversion principle provided in an embodiment of the present application;

[0079] Fig.17 is another schematic diagram of coordinate transformation principle provided in an embodiment of the present application;

[0080] Fig.18 is a flowchart of another touch operation response method provided in an embodiment of the present application;

[0081] Fig.19 This is a schematic diagram of an interface of a split-screen window mode provided in an embodiment of the present application;

[0082] Fig. 20 This is a schematic diagram of an interface of a small window mode provided in an embodiment of the present application;

[0083] Fig.21 is a flowchart of another touch operation response method provided in an embodiment of the present application;

[0084] Fig. 22 This is a schematic diagram of an interface change of a switching window provided in an embodiment of the present application;

[0085] Fig.23It is a schematic diagram of the principle of another touch operation response method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0087] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.

[0088] References to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in the specification of the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0089] In order to better understand the embodiments of the present application, the terms or concepts that may be involved in the embodiments are explained below.

[0090] Touch panel (TP): also known as a touch screen, is an inductive display device that can receive input signals from a stylus pen, finger, etc. In other words, a touch screen is a screen that has both touch function and display function. The screens described in the following embodiments of this application all refer to touch screens.

[0091] Generally, a touch screen includes a touch detection component and a touch screen controller. The touch detection component can be installed on the upper layer of the display device to detect touch information such as the user's touch position, and transmit the detected touch information to the touch screen controller. The touch screen controller is used to process the touch information and send the corresponding signal to the processor of the electronic device. Then, after the processor processes the signal, it executes the corresponding response action, such as taking a screenshot, recording the screen, or switching windows.

[0092] The process of pressing the stylus or finger on the touch screen, moving it (or not moving it), and then lifting it is called a touch operation. A touch operation corresponds to a set of input events. Input events are also called touch events. A set of input events includes a press (down) event, several move (move) events, and a lift (up) event.

[0093] The following describes the application scenarios of the method provided in the embodiments of the present application.

[0094] Users can use their knuckles to perform preset touch operations to trigger quick screenshot, quick screen recording and other functions. The following mainly uses the screenshot function as an example to explain.

[0095] For example, Figures 1 to 3 A schematic diagram of an application scenario of a touch operation response method provided in an embodiment of the present application. Taking knuckle screenshot as an example, when the knuckle screenshot function is turned on, the user can trigger the screenshot by double-clicking the knuckle, tapping the knuckle and drawing a circle, or tapping the knuckle and drawing the letter S.

[0096] Specifically, Figure 1 As shown in Figure (a) in Figure 1, the user can double-click the screen with a finger joint to trigger a full-screen screenshot (i.e., capture the full screen). The interface after the full-screen screenshot can be as follows Figure 1 As shown in Figure (b).

[0097] like Figure 2 As shown in Figure (a) in Figure 1, the user can also tap the screen once with his knuckles and draw a circle on the screen to trigger a partial screenshot. The interface after the partial screenshot can be as follows Figure 2 As shown in Figure (b).

[0098] like Figure 3 As shown in Figure (a) in Figure 1, the user can also tap the screen once with his knuckles and draw the letter S on the screen to trigger a scrolling screenshot. The interface after the scrolling screenshot can be as follows: Figure 3 As shown in Figure (b).

[0099] It can be understood that in some scenarios, when a user performs a knuckle touch operation, the electronic device does not need to respond to the knuckle touch operation, so as to match the user's operation intention as much as possible and improve the user experience. For example, in an input method scenario, when a user performs a knuckle touch operation in the interface of the input method, the knuckle touch operation may not be responded to, and the corresponding shortcut function may not be triggered. For another example, in a game scenario, when a user performs a knuckle touch operation in the interface of a game application, the knuckle touch operation may not be responded to, and the corresponding shortcut function may not be triggered. The following is an explanation with reference to the accompanying drawings.

[0100] First, the knuckle touch response in the input method scenario is described. For example, Figure 4 This is a schematic diagram of an interface of a knuckle touch operation response process in an input method scenario provided by an embodiment of the present application. Figure 4 As shown in Figure (a), when the input method is turned on and the input method interface is displayed on the screen, when the user performs a knuckle touch operation in the area 401 where the input method interface is located, the electronic device may not trigger the corresponding shortcut function, but treat the input operation as a non-knuckle touch operation, and the input method responds. This is more likely to meet the user's operation intention, prevent the user from being affected by the input method input content, and improve the user experience. Specifically, Figure 4 In the example of a user double-clicking a finger joint, after the user performs the operation, the mobile phone does not take a screenshot, but processes the operation as a non-fingertip touch operation, and the input method responds to the input and displays the corresponding input content, such as Figure 4 Optionally, in this scenario, the user can perform a knuckle touch operation in an area outside the area 401 where the input method interface is located, and the electronic device responds to the user's operation and triggers a shortcut function.

[0101] Next, the knuckle touch response in the game scene is described. For example, Figure 5 This is a schematic diagram of an interface of a knuckle touch operation response process in a game scenario provided by an embodiment of the present application. Figure 5 As shown in Figure (a), when the game application is turned on and the game interface 501 is displayed on the screen, when the user performs a knuckle touch operation in the game interface 501, the electronic device may not trigger the corresponding shortcut function, but treat the input operation as a non-knuckle touch operation, and the game application responds. This is more likely to meet the user's operation intention, prevent the user's input of game instructions from being affected, and improve the user experience. Specifically, Figure 5 In the example of a user performing a double-click operation of a knuckle in the game interface 501, after the user performs the operation, the mobile phone does not take a screenshot, but processes the operation as a non-knuckle touch operation, and the game application responds to the input, for example, using a skill, such as Figure 5As shown in Figure (b).

[0102] Figure 4 and Figure 5 The double-click operation of the knuckles is used as an example for explanation. It can be understood that the same is true for other types of knuckle touch operations, which will not be repeated. In addition, for some other scenarios, the knuckle touch operation may not be responded to, which will not be listed here one by one. This application mainly uses the above two scenarios as examples for explanation.

[0103] Below Figure 4 Taking the input method scenario shown as an example, the response process of the knuckle touch operation in the related technology is explained.

[0104] For example, see Figure 6 In the related art, the above Figure 4 The response process of the knuckle touch operation in the input method scenario shown is as follows: the user touches the touch screen of the electronic device, and the touch panel integrated circuit (TP IC) in the hardware layer (HAL) of the electronic device collects the original capacitance data generated by the touch. After that, the original capacitance data is processed to obtain the capacitance data. The TP driver reports the capacitance data to the upper layer, for example, to the TP driver of the kernel layer. The TP driver generates an input event based on the capacitance data, and reports the input event to the input framework of the application framework (FWK) layer.

[0105] At the same time, the input framework monitors the TP driver, and the TP driver notifies the input framework when receiving the capacitance data. After receiving the notification, the input framework obtains the sensor data required to identify the finger joint touch operation from the sensor subsystem, including but not limited to acceleration (ACC) data.

[0106] The input framework determines whether the input event is a knuckle event based on the capacitance data and ACC data. After that, the input framework determines whether the position of the input event (that is, the touch position) is located within the interface of the input method. If the input event is a knuckle event and the touch position is not within the interface of the input method, the input event is reported to the screenshot application at the application (APP) layer. If the touch position of the input event is within the interface of the input method, regardless of whether the input event is a knuckle event or not, the input framework will not report the input event to the screenshot application at the application layer, that is, the screenshot application blocks the response to the knuckle event, and the input framework reports the input event to the input method application at the application layer for processing.

[0107] In the above process, each time the user performs a touch operation, the electronic device needs to report the capacitance data generated by the touch operation to the TP driver, so each touch operation will trigger the input framework to obtain ACC data from the sensor subsystem. When the touch position is located in the area where the input method interface is located, it is not necessary to determine whether the input event corresponding to the touch operation is a finger joint event, nor is it necessary to obtain ACC data. Therefore, there are redundant processes in the above process, which increases the load of the system and causes the processing power consumption of the electronic device to be high. Moreover, in general, the finger joint algorithm runs in the application processor (application processor, AP), and the sensor subsystem generally runs in the baseband processor (cooperate processor, CP). If ACC data is to be transmitted between AP and CP, communication based on inter-core communication is required, which will further increase the load of the system and cause the processing power consumption of the electronic device to be high.

[0108] In the related art, the response process of the knuckle touch operation in the game scenario is similar to the above process. The difference is that in the game scenario, the application layer includes the game application, and the input framework determines whether the input event is a knuckle event and whether there is a game application currently running. If the input event is a knuckle event and no game application is currently running, the input event is reported to the screenshot application of the application layer. If a game application is currently running, regardless of whether the input event is a knuckle event, the input framework will not report the input event to the screenshot application of the application layer, that is, the screenshot application shields the response to the knuckle event, and the input framework reports the input event to the game application of the application layer for processing. In the same input method scenario, in the game scenario, when the user performs a knuckle touch operation in the game interface, it is actually not necessary to determine whether the input event corresponding to the touch operation is a knuckle event, nor is it necessary to obtain ACC data. Therefore, there are redundant processes in the above process, which increases the load of the system and causes the processing power consumption of the electronic device to be high.

[0109] In view of this, an embodiment of the present application provides a method for responding to touch operations. When the interface of the target application is displayed on the screen, after the touch screen detects the capacitance data, a filtering algorithm is executed on the capacitance data to determine whether the preset conditions corresponding to the target application are met. If the corresponding preset conditions are met, the capacitance data is not reported to the TP driver, and thus the input framework is not triggered to obtain ACC data through inter-core communication. In this way, the redundant processes in the finger joint algorithm are omitted, system resources are saved, and system load and power consumption are reduced. Among them, for the input method scenario, the preset conditions may include that the hot zone of the input method is in the call-out state, and the touch position of the touch event is located in the hot zone of the input method. For the game scenario, the preset conditions may include that the system of the current electronic device is in game mode, and the touch position is within the coordinate range of the window of the game application.

[0110] The structure of an electronic device to which the touch operation response method provided in the embodiment of the present application is applicable is described below.

[0111] The knuckle touch operation method provided in the embodiments of the present application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), and other electronic devices with touch screens and on which applications (APPs) can be installed. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0112] For example, Figure 7 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor (i.e., ACC sensor) 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0113] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0114] The processor 110 may include one or more processing units, for example, the processor 110 may include an AP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, a baseband chip plus a coprocessor (CP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0115] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0116] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0117] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0118] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching and pedometers. In the embodiment of the present application, the acceleration sensor 180E is also used to detect the acceleration value of the mechanical force applied by the user to the touch screen. The acceleration value can be used to measure the magnitude of the mechanical force applied by the user to the touch screen, that is, it can be used to measure the strength of the touch operation performed by the user on the touch screen.

[0119] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the AP to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0120] The following describes the software system of the electronic device 100 and the coordination process between the software system and hardware.

[0121] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0122] Figure 8 1 is a system structure block diagram of an electronic device 100 of an embodiment of the present application, which includes a software architecture and a hardware layer. The software architecture adopts a layered architecture. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes an application layer, an application framework layer, a hardware abstraction layer, and a kernel layer from top to bottom. Among them, the application framework layer may include a Java framework layer and a native framework layer (also called a C++ framework layer).

[0123] The application layer may include a series of application packages. Figure 8 As shown, the application package may include applications such as screenshot, input method, game and game manager. The screenshot application may be, for example, smartshot. There is no limitation on the type of game application.

[0124] The input method application is used to implement the input of information. In an embodiment of the present application, the input method application may include a business processing module, a hot zone management module, and a hot zone coordinate calculation module. Among them, the business processing module is used to implement the business functions of the input method itself, including the input of information, the switching of input methods, etc. Specifically, the business processing module can receive input events distributed by the input framework of the application framework layer, and process the input events to respond to the user's input operations. For example, the business processing module inputs text, deletes text, switches input methods, etc. according to the user's input events.

[0125] The hot zone management module is used to manage the hot zones of the input method. Specifically, the hot zone management module can manage the state of the hot zone (referred to as the hot zone state) and the layout of the hot zone according to the preset logic. The hot zone state can include the call-out state and the call-back state. The call-out state refers to the hot zone containing the input method on the current screen, and the interface of the input method is displayed on the screen, such as Figure 4 The recall state means that the current screen does not contain the hot area of ​​the input method, and the input method interface is not displayed on the screen, for example Figure 1 , Figure 2 and Figure 3 As shown. When the hot zone is in the call-back state, if the current scene meets the preset hot zone call-out logic, for example, the user clicks the input box, the hot zone management module calls out the hot zone, displays the input method interface, and the hot zone state switches to the call-out state. When the hot zone is in the call-out state, if the current scene meets the preset hot zone call-back logic, for example, the user performs a return operation, the hot zone management module calls back the hot zone, hides the input method interface, and the hot zone state switches to the call-back state.

[0126] When calling out the hot zone, the hot zone management module can layout the display direction and display size of the hot zone according to the preset logic. In one embodiment, the hot zone management module can layout the hot zone in combination with the display mode of the current screen. The display mode of the screen is also the display direction of the interface in the screen. The display mode of the screen can include a vertical screen 0° mode, a horizontal screen 90° mode, and a horizontal screen 270° mode. Among them, the vertical screen 0° mode refers to the mode in which the interface is displayed forward when the user holds the mobile phone vertically. The horizontal screen 90° mode refers to a display mode in which the interface in the vertical screen 0° mode is rotated 90° counterclockwise. The horizontal screen 270° mode refers to a display mode in which the interface in the vertical screen 0° mode is rotated 270° counterclockwise. Optionally, the hot zone layout type can change with the change of the screen display mode. The hot zone layout type can include a vertical screen 0° layout, a horizontal screen 90° layout, a horizontal screen 270° layout, etc. When the screen display mode is the vertical screen 0° mode, the hot zone layout is the vertical screen 0° layout, when the screen display mode is the horizontal screen 90° mode, the hot zone layout is the horizontal screen 90° layout, and when the screen display mode is the horizontal screen 270° mode, the hot zone layout is the horizontal screen 270° layout. The screen display mode and hot zone layout type will be described in the subsequent embodiments in conjunction with the attached Figure 1 And explain.

[0127] The hot zone coordinate calculation module is used to calculate the coordinate range corresponding to the hot zone. Optionally, in the process of managing the hot zone state and the hot zone layout, the hot zone management module can notify the hot zone coordinate calculation module when at least one of the hot zone state and the hot zone layout changes. The hot zone calculation module calculates the hot zone coordinate range when the hot zone state is switched from the call-back state to the call-out state, and / or when the hot zone layout changes. Optionally, the hot zone coordinate range can be characterized by the coordinate range of the hot zone along the X-axis direction and / or the coordinate range along the Y-axis. Of course, the hot zone coordinate range can also be characterized by the coordinates of the four vertices of the hot zone, and the embodiments of the present application do not impose any limitation on this.

[0128] The game manager is used to manage game applications in electronic devices. Optionally, the system or the user can pre-add some game applications to the game list in the game manager, and the game manager maintains the game list.

[0129] It is understood that the application package may also include system user interface (SystemUI), camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications. Figure 8 Not shown in FIG.

[0130] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0131] like Figure 8 As shown, in an embodiment of the present application, the Java framework layer in the application framework layer may include a screen state management module, a display mode management module, a game assistant module (also referred to as a game management module) and a window manager. The screen state management module is used to manage the state of the screen according to the user's operation. The state of the screen may include a screen-on state, a screen-off state (also referred to as a screen-off state), etc. The display mode management module is used to manage the display mode of the screen. In an embodiment of the present application, the screen state management module and the display mode management module may provide the states they manage to other modules or applications based on subscription or registration. For example, the input method of the application layer may pre-register the screen state monitoring with the screen state management module. When the screen state changes, the screen state management module may send a notification to the input method so that the input method is informed that the state of the screen has changed, as well as the changed screen state, etc. The input method may also pre-register the screen display mode monitoring with the display mode management module. When the screen display mode changes, the display mode management module may send a notification to the input method. For example, when the screen display mode is a vertical screen 0° mode and the automatic rotation function is turned on, the user rotates the electronic device counterclockwise by 90°, and the screen display mode switches to a horizontal screen 90° mode. In this case, the screen display mode can send a notification to the hot zone management module of the input method, and send the switched screen display mode to the hot zone management module.

[0132] The game assistant module is used to provide auxiliary functions to the game applications in the game list. Optionally, when the electronic device is turned on, the game manager of the application layer can send the game list it manages to the game assistant module. At the same time, the game assistant module obtains the application currently running in the foreground of the electronic device from the window manager. When the game application in the game list is running in the foreground, the relevant auxiliary functions are provided to the game application.

[0133] Optionally, the game assistant module may include a mode switching unit and a game coordinate calculation unit. The mode switching unit is used to control the operating mode of the electronic device system to be a game mode or a non-game mode. Specifically, when any game application in the game list is running in the foreground, the mode switching unit switches the system to game mode, and when the game application in the game list exits, exits the game mode (i.e., enters non-game mode). Game mode is a mode for running game applications and improving game performance. In game mode, the electronic device can adjust hardware and / or software resources or operating parameters to change the operating environment of the game application. For example, adjust resources such as CPU, GPU, and memory to improve the frame rate and stability of the game, and for another example, close preset applications or services to reduce the impact on game performance, and for another example, adjust the game window to a horizontal full-screen display, etc. The embodiment of the present application does not limit the specific setting of the game mode, but the electronic device running in game mode can indicate that the electronic device is currently running a game application.

[0134] The game coordinate calculation unit is used to obtain the display mode of the game application window when the system switches to the game mode, and calculate the coordinate range of the game application window (hereinafter referred to as the game coordinate range). Among them, the window display mode may include but is not limited to full screen window mode, split screen window mode and small window mode.

[0135] The native framework layer in the application framework layer may include an input framework, which may include an event hub, an input reader, an input dispatcher, and a knuckle recognition module.

[0136] Event Hub is a highly scalable, distributed, time-series-based event center that can process streaming events (such as input events, which can be touch events) in real time and issue alarms and reminders.

[0137] The input reader is used to read and process input events from the event hub. In an embodiment of the present application, the input reader is used to call the knuckle recognition module for the down event after reading the input event, identify whether the down event is a knuckle event, and send the recognition result to the input dispatcher. The input dispatcher distributes the input event to the corresponding application according to the recognition result. For example, if the recognition result is that the down event is a knuckle event, the input distribution module distributes the down event to the screenshot application. After the screenshot application receives the down event, it confirms which type of knuckle touch operation the touch operation is based on other input events that belong to the same touch operation as the down event, that is, whether it is a knuckle double-click operation, a knuckle tapping and circle operation, or a knuckle tapping and letter S operation, etc. Afterwards, the screenshot application makes a corresponding response according to the determined knuckle touch operation.

[0138] The knuckle recognition module is used to determine whether the input event is a knuckle event according to the capacitance data and the ACC data, etc. After obtaining the recognition result, the knuckle recognition module returns the recognition result to the input reader.

[0139] In addition, the application framework layer can also include content providers, view systems, phone managers, resource managers, notification managers, etc. Figure 8 Not shown in the figure. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message may be displayed in the status bar, a prompt sound may be emitted, an electronic device may vibrate, an indicator light may flash, etc.

[0140] The hardware abstraction layer is used to abstract the hardware. In the embodiment of the present application, the hardware abstraction layer may include a touch screen host processing (THP) module and a sensor hardware abstraction layer (sensors-hal). In the embodiment of the present application, the THP module may include a data processing unit and a filtering unit. The data processing unit is used to process the original capacitance data collected by the TP IC to obtain the capacitance data of the capacitance matrix and the corresponding coordinate data.

[0141] The filtering unit is used to decide whether to filter the operation of the finger joint algorithm according to the result calculated by the hot zone coordinate calculation module. Specifically, if the decision result of the filtering unit is "filter the finger joint algorithm", the filtering unit does not write the capacity value data into the finger joint node driven by the TP (detailed description will be given in the subsequent embodiments), and thus does not trigger the finger joint recognition module to obtain the ACC data. If the decision result of the filtering unit is "do not filter the finger joint algorithm", the filtering unit writes the capacity value data into the finger joint node, thereby triggering the finger joint recognition module to obtain the ACC data.

[0142] Optionally, the THP module can implement its functions based on the running of the aptouch_daemon process.

[0143] sensors-hal is used to abstract sensors.

[0144] The kernel layer is a layer between hardware and software. In the embodiment of the present application, the kernel layer may include a TP driver and a finger joint driver.

[0145] The TP driver may have its cache (hereinafter referred to as the TP cache) and nodes. The TP cache is used to cache data related to the TP driver when it is working, such as original capacitance data. The nodes of the TP driver are used to store logical files, data, etc. related to the TP driver when it is working. The TP driver and other modules can access the TP driver through the nodes of the TP driver. Optionally, the nodes of the TP driver may include but are not limited to device input nodes, coordinate nodes, finger joint nodes, and device thp nodes. The device input node is used to store input events. The coordinate node is used to store coordinate data. The finger joint node is used to store capacitance data. The device thp node is used to store original capacitance data. It can be understood that, depending on the number of screens contained in the electronic device, the number of each node of the TP driver can be one or more. For example, when the electronic device is a single-screen device (containing only one screen), the number of each of the above nodes is one. When the electronic device is a folding screen device (containing two screens, an inner screen and an outer screen), the number of each of the above nodes is two, one for storing logical files and data related to the inner screen, and the other for storing logical files and data related to the outer screen.

[0146] The paths of each node driven by TP can be set according to actual needs. Exemplarily, the path of the coordinate node of a single-screen device can be / dev / input_mt_wrapper, the path of the coordinate node of the inner screen of the folding screen can be / dev / input_mt_wrapper0, and the path of the coordinate node of the outer screen of the folding screen can be / dev / input_mt_wrapper1. The path of the device thp node of a single-screen device can be / dev / thp, the path of the device thp node of the inner screen of the folding screen is / dev / thp0, and the path of the device thp node of the outer screen of the folding screen is / dev / thp1. The path of the finger joint node of a single-screen device can be / sys / touchscreen / roi_data, the path of the finger joint node of the inner screen of the folding screen can be / sys / touchscreen0 / roi_data, and the path of the finger joint node of the outer screen of the folding screen can be / sys / touchscreen1 / roi_data. The path of the device input node can be / dev / input.

[0147] The knuckle driver may include modules such as the knuckle file node. The knuckle file node is a functional module that supports the knuckle driver to realize its functions. The knuckle file node is used to access the sonsor subsystem, obtain relevant data of the ACC, and return the obtained data to the module requesting the data. The specific functions of the knuckle file node include but are not limited to obtaining and storing information of the ACC sensor, obtaining and storing ACC data preparation status, obtaining and storing screen form (including folded state, unfolded state, bracket state, etc.), obtaining and storing main ACC data, obtaining and storing secondary ACC data, requesting ACC data (i.e. sending ACC data request instructions), enabling knuckle processes, etc.

[0148] The paths for storing various types of data in the finger joint file node can be set according to actual needs. For example, the path of the finger joint file node can be / sys / devices / platform / honor_sensor / , the path of the ACC sensor information can be / sys / devices / platform / honor_sensor / acc_info, the path of the ACC data readiness can be / sys / devices / platform / honor_sensor / fingersense_data_ready, the path of the display status can be / sys / devices / platform / honor_sensor / fingersense_expand, and the path of the main ACC data can be / sys s / devices / platform / honor_sensor / fingersense_latch_data, the path of the deputy ACC data can be / sys / devices / platform / honor_sensor / fingersense_latch_data2, the path of the request ACC data can be / sys / devices / platform / honor_sensor / fingersense_req_data, and the path of enabling the finger joint process can be / sys / devices / platform / honor_sensor / set_fingersense_enable.

[0149] It can be understood that in addition to the above modules, the kernel layer can also include display drivers, camera drivers, audio drivers, etc. Figure 8 Not shown in FIG.

[0150] The hardware layer may include a TP IC, which is used to collect a capacitance electrical signal generated by a user touching the touch screen, and convert the capacitance electrical signal into a digital signal to obtain original capacitance data.

[0151] Some or all of the modules in the above software architecture can run in the AP. Figure 8In one embodiment, the electronic device may further include a CP, and an advanced digital signal processor (ADSP) system may run in the CP. The ADSP system may include a sensor subsystem. The sensor subsystem is used to collect sensor data, and the sensor data includes but is not limited to ACC data. The embodiment of the present application mainly describes the relevant modules for collecting ACC data in the sensor subsystem. Of course, in some other embodiments, the collection of ACC data can also be achieved through other processors or modules in other software architectures, and the embodiment of the present application does not impose any limitation on this.

[0152] like Figure 8 As shown, the sensor subsystem may include a sensor client manager at the hardware abstraction layer, a knuckle virtual sensor and an ACC driver at the kernel layer, and an ACC sensor at the hardware layer.

[0153] The sensor client management module is a software component. The sensor client management module is used to implement sensor detection and identification, sensor data reading, sensor event monitoring, sensor parameter setting and energy consumption management. In the embodiment of the present application, the sensor client management module is used to send instructions to the knuckle virtual sensor of the driver layer to obtain sensor data, and the sensor data includes but is not limited to ACC data.

[0154] The knuckle virtual sensor is used to instruct the ACC drive to drive the ACC sensor to obtain ACC data.

[0155] AP and CP can communicate based on inter-core communication. Figure 8 As shown, the hardware abstraction layer of the software system running on the AP side may also include an inter-core communication interface. The framework layer of the sensor subsystem may also include an inter-core communication interface. The inter-core communication interface may be, for example, a Qualcomm messaging interface (QMI). The inter-core communication interface is used to implement inter-core communication.

[0156] Specifically, the sensors-hal and inter-core communication interface on the AP side form a data path for inter-core communication with the inter-core communication interface and sensor client manager on the CP side. The ACC sensor in the sensor subsystem on the CP side can collect ACC data in real time and write the ACC data into the cache driven by the ACC (hereinafter referred to as the ACC cache). When the knuckle recognition module in the software architecture on the AP side needs to obtain ACC data, the knuckle file node driven by the knuckle is called. The knuckle file node sends an ACC data acquisition request to the sensor client manager through the above data path. After receiving the ACC data acquisition request, the sensor client management module sends an ACC data read instruction to the knuckle virtual sensor. The knuckle virtual sensor reads the ACC data from the cache driven by the ACC and returns the read data to the sensor client manager. The sensor client manager returns to the knuckle file node on the AP side along the above data path. The knuckle file node returns the ACC data to the knuckle recognition module.

[0157] In some embodiments, the knuckle recognition module may pre-register the capacitance write monitoring event with the TP driver of the kernel layer. When capacitance data is written to the knuckle node, the TP driver may send a notification to the knuckle recognition module, and the notification may carry the written capacitance data. After receiving the notification, the knuckle recognition module may call the knuckle file node according to the above process, initiate inter-core communication through sensors-hal, and obtain ACC data from the CP side.

[0158] Optionally, the knuckle recognition module may only register the write listener event of the down event. When the capacity value data of the down event is written to the knuckle node, the TP driver may send a notification to the knuckle recognition module to trigger the knuckle recognition module to obtain ACC data from the CP side.

[0159] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 7 and Figure 8 Taking the electronic device with the structure shown as an example, the response method of the touch operation provided in the embodiment of the present application is specifically described in combination with the drawings and application scenarios.

[0160] First, the response method of touch operation in the input method scenario is explained.

[0161] See above Figure 4 , taking the case where a user performs a double-click operation of a knuckle within the hot zone of the input method as an example, Fig. 9 : is a flow chart of a touch operation response method provided in an embodiment of the present application, the method comprising:

[0162] S101. An input method application at an application layer monitors changes in hot zone states and changes in hot zone layouts.

[0163] S102: When the hot zone state and / or hot zone layout changes, the input method application sends the changed hot zone state, the changed hot zone layout and the changed hot zone coordinate range to the filtering unit in the THP module of the hardware abstraction layer.

[0164] The filtering unit can store the changed hot zone state, the changed hot zone layout, and the changed hot zone coordinate range. In this way, the filtering unit can obtain the current hot zone state, the current hot zone layout, and the current hot zone coordinate range in real time. When the filtering algorithm needs to be executed, the filtering unit executes the relevant calculation process according to the current hot zone state, hot zone layout, and coordinate range. For details, please refer to the subsequent step S110.

[0165] It is understandable that the above steps S101 and S102 can be executed in real time by the input method. The specific implementation of steps S101 and S102 will be further described in the following embodiments.

[0166] S103 , in response to the user performing a touch operation on the screen using a finger joint, the TP IC of the hardware layer detects a capacitance electrical signal and converts the capacitance electrical signal into a digital signal to obtain original capacitance data.

[0167] Optionally, the TP IC can convert the capacitance electrical signal by capacitance sampling. The digital signal obtained after conversion is called original capacitance data.

[0168] Optionally, the original capacitance data is used to characterize the capacitance value of each capacitance node in a capacitance node matrix. The capacitance node matrix may include m rows and n columns of capacitance nodes, for example, 7*7 capacitance nodes.

[0169] It can be understood that the TP IC can periodically collect raw capacitance data, and each set of raw capacitance data collected corresponds to an input event. The following takes a set of raw capacitance data, that is, the processing process corresponding to an input event, as an example for explanation.

[0170] S104 , the TP IC writes the original capacitance data into the TP buffer of the TP driver of the kernel layer.

[0171] S105. The TP driver writes the original capacity value data in the TP cache to the device thp node.

[0172] In other words, the TP driver reads the original capacitance data from the TP cache and writes the read original capacitance data to the device thp node.

[0173] S106. The data processing unit in the THP module of the hardware abstraction layer reads the original capacitance value data from the device THP node.

[0174] Optionally, the data processing unit may actively read the original capacitance value data from the device thp node. Optionally, the TP may read the original capacitance value data from the device thp node and send it to the data processing unit. The embodiment of the present application does not make any limitation to this.

[0175] S107 . The data processing unit processes the original capacitance data to obtain capacitance data and coordinate data corresponding to the touch operation.

[0176] The data processing unit can encapsulate, normalize, calibrate and process the original capacitance data to obtain the capacitance data of the capacitance node matrix at the user touch position and the corresponding coordinate data. Optionally, the coordinate data can be represented by an XOY coordinate system, and the origin of the XOY coordinate system can be the upper left vertex of the screen when the user holds the electronic device vertically. Among them, the user holds the electronic device vertically, which means that the screen of the electronic device is facing the user, the unlock button is located on the right side or the upper side (it may be different depending on the design of different electronic devices), and the charging port is located on the lower side. The XOY coordinate system is also called a physical coordinate system.

[0177] In addition, it can be understood that the characteristics of the capacitance data corresponding to the down event, move event and up event are different. The data processing unit analyzes the capacitance data, determines the event type of the input event corresponding to the current capacitance data, whether it is a down event, a move event, or an up event, and marks the event type. In this way, a set of data in which the capacitance data, the coordinate data and the event type correspond one to one is obtained.

[0178] S108. The data processing unit in the THP module determines whether the event type corresponding to the capacitance data is a down event; if so, execute step S109; if not, execute step S111.

[0179] Optionally, the input reading module calls the knuckle recognition module to identify whether the down event is a knuckle event. That is, the knuckle recognition algorithm is mainly used to identify whether the down event is a knuckle event, and thus, the filtering of the knuckle algorithm can also be targeted at the down event.

[0180] Of course, in some other embodiments, the knuckle module may execute the knuckle recognition algorithm for any type of input event. In this case, step S108 may not be executed, and step S109 may be executed directly.

[0181] S109. The data processing unit in the THP module sends a filtering algorithm start instruction to the filtering unit in the THP module.

[0182] The filtering algorithm startup instruction may carry capacity data and coordinate data. The filtering algorithm startup instruction is used to instruct the filtering unit to execute the filtering algorithm based on the capacity data and coordinate data carried in the instruction. In the embodiment of the present application, the filtering algorithm refers to determining whether to filter the finger joint algorithm according to the preset judgment logic, and if so, filtering the finger joint algorithm.

[0183] S110, the filtering unit in the THP module responds to the filtering algorithm start instruction, determines that the hot zone state is the call-out state, and the touch position is within the hot zone coordinate range corresponding to the current hot zone layout, and the filtering unit does not perform any operation. Then continue to execute S111.

[0184] Specifically, the filtering unit responds to the filtering algorithm startup instruction, determines whether the current state of the input method hot zone is the called-out state, and determines whether the touch position is located within the hot zone coordinate range corresponding to the current hot zone layout based on the coordinate data corresponding to the touch position; if the current state of the hot zone is the called-out state, and the touch position is within the hot zone coordinate range corresponding to the current hot zone layout, it means that the current scene is a knuckle touch operation under the input method scene, and there is no need to respond to the touch operation as a knuckle touch operation, so the filtering unit does not perform any operation, that is, does not write capacitance data to the knuckle node.

[0185] As described above, the finger joint recognition module in the input framework pre-registers the capacitance value writing listening event with the TP driver. When the TP driver listens to the capacitance value data being written into the finger joint node, the finger joint recognition module sends a notification. The notification triggers the finger joint recognition module to obtain the ACC data. In this embodiment, the filtering unit does not write capacitance value data to the finger joint node, and thus does not trigger the TP driver to send a notification to the finger joint recognition module, and further does not trigger the finger joint recognition module to obtain the ACC data.

[0186] If the current input method hot zone is in the call-back state, or the input method hot zone is in the call-out state but the touch position is outside the hot zone coordinate range corresponding to the current hot zone layout, the filter unit writes the capacitance value data into the finger joint node driven by the TP. Fig.11 The embodiment shown.

[0187] S111 . The data processing unit of the THP module writes the coordinate data into the coordinate node.

[0188] S112. The TP driver generates an input event according to the coordinate data in the coordinate node.

[0189] S113. The TP driver writes the input event to the device input node.

[0190] S114. The event center in the input framework reads input events from the device input nodes.

[0191] S115. The event reading module obtains input events from the event center.

[0192] S116. When the event reading module determines that the input event is a down event, the event reading module calls the knuckle recognition module to recognize the knuckle event.

[0193] If the input event is not a move event or an up event, steps S116 and S120 are not executed, and the input event is directly sent to the input distribution module.

[0194] Optionally, the event reading module can carry information of the input event when calling the knuckle recognition module.

[0195] S117: The knuckle recognition module determines that the input event is not a knuckle event.

[0196] Specifically, the finger joint recognition module responds to the call of the event reading module and queries the capacity data and ACC data corresponding to the input event. Afterwards, it determines whether the input event is a finger joint event based on the capacity data and ACC data corresponding to the input event. When there is no corresponding capacity data and ACC data, it indicates that the input event is not a finger joint event.

[0197] In this embodiment, as in the above step S110, the capacitance data corresponding to the input event is not written into the finger joint node, so the TP driver does not send a capacitance writing notification (also called a first notification) to the finger joint recognition module, and does not trigger the finger joint recognition module to obtain ACC data. Therefore, the finger joint recognition module determines that the capacitance data and ACC data corresponding to the input event do not exist, and thus determines that the input event is not a finger joint event.

[0198] S118. The finger joint recognition module returns the recognition result (not a finger joint event) to the event reading module.

[0199] S119, the event reading module sends the recognition result (not a knuckle event) and the input event to the event distribution module.

[0200] S120: The event distribution module distributes the input event to the input method application of the application layer according to the recognition result (not a knuckle event).

[0201] Specifically, the event distribution module determines that the application to which the window displayed in the current interface belongs is an input method application, and determines that the input event is not a finger joint event, and thus distributes the input event to the input method application.

[0202] S121: The input method application processes the input event.

[0203] Optionally, the input event may be processed by a business processing module in the input method application.

[0204] Specifically, after receiving an input event, the input method application makes corresponding processing according to the type of input event, the corresponding touch position, etc. For example, if the input event is a down event, the input method application can wait, and after receiving a move event or an up event, make corresponding responses according to one or more groups of input events, such as inputting corresponding text and displaying the following. Figure 4 The interface shown in Figure (b).

[0205] In this way, the response to this input event is realized. The above process can be repeated for subsequent input events, so that the response to each touch operation of the user can be realized.

[0206] In this embodiment, the THP module includes a filtering unit. The input method can send the hot zone state, hot zone layout and hot zone coordinate range to the filtering unit when the hot zone state and / or hot zone layout changes. After the user performs a press action and the data processing unit in the THP module processes and obtains the capacity data corresponding to the down event, the filtering unit executes the filtering algorithm according to the hot zone state, hot zone layout and hot zone coordinate range. When the hot zone is in a call-out state and the touch position is within the hot zone coordinate range corresponding to the current hot zone layout, the capacity data is not written to the finger joint node. In this way, the TP driver will not be triggered to send a capacity write notification to the finger joint recognition module, and the finger joint recognition module will not be triggered to obtain ACC data. In other words, this method filters the execution process of the finger joint algorithm for touch events that fall within the hot zone coordinate range. In this way, the redundant finger joint algorithm process in the input method scenario is omitted, saving system resources and reducing system load.

[0207] It should be noted that, in the above embodiments, the example of the event reading module calling the finger joint recognition module to trigger the finger joint recognition is used for explanation, such as step S116. In practical applications, the recognition of the finger joints can also be triggered by a capacity write notification. Specifically, when the finger joint recognition module receives the capacity write notification sent by the TP driver, it triggers the acquisition of ACC data. After the ACC data is acquired, the finger joint recognition module can directly determine whether the corresponding touch event is a finger joint event based on the ACC data and the capacity data, and report the result to the input reading module. In this way, for touch events whose touch positions are located in the hot zone of the input method, the capacity data is not written to the finger joint node, which not only does not trigger the process of the finger joint recognition module to obtain ACC data, but also does not trigger the process of identifying whether the touch event is a finger joint event, that is, all processes of finger joint recognition are filtered, further saving system resources and reducing system load. The same is true in subsequent game scenarios, which will not be repeated.

[0208] The method provided in the embodiment of the present application is further explained below by taking the operation of a user tapping the knuckles and drawing circles outside the hot zone of the input method as an example.

[0209] For example, Fig.10 This is another application scenario diagram provided by the embodiment of the present application. Fig.10 As shown in FIG. 4( a ), when the input method interface is displayed on the screen, the user performs a double-click operation of the knuckle at a position outside the input method interface area 401, and the mobile phone responds to the operation and takes a full-screen screenshot, showing the following. Fig.10 The interface shown in Figure (b).

[0210] Fig.11 is a flow chart of another touch operation response method provided in an embodiment of the present application, corresponding to the above Fig.10 The method of the present application includes the following steps S201 to S224.

[0211] It should be noted that, in this embodiment, the electronic device also executes the above steps S101 and S102, which will not be described in detail here.

[0212] S201 , in response to a user performing a touch operation on a screen using a finger joint, a TP IC at a hardware layer detects a capacitance electrical signal and converts the capacitance electrical signal into a digital signal to obtain original capacitance data.

[0213] S202 , the TP IC writes the original capacitance data into the TP buffer of the TP driver of the kernel layer.

[0214] S203. The TP driver writes the original capacity value data in the TP cache to the device thp node.

[0215] S204: The data processing unit in the THP module of the hardware abstraction layer reads the original capacitance value data from the device THP node.

[0216] S205 . The data processing unit processes the original capacitance data to obtain capacitance data and coordinate data corresponding to the touch operation.

[0217] S206. The data processing unit in the THP module determines whether the event type is a down event; if so, execute step S207; if not, execute step S214.

[0218] S207: The data processing unit in the THP module sends a filtering algorithm start instruction to the filtering unit in the THP module.

[0219] S208 . The filtering unit in the THP module responds to the filtering algorithm start instruction to determine that the input method hot zone is in a call-out state and the touch position is outside the hot zone coordinate range corresponding to the current hot zone layout.

[0220] S209 , the filtering unit writes the capacitance value data into the finger joint node driven by the TP.

[0221] S210: The TP driver monitors that the capacity value data is written into the finger joint node, and sends a capacity value writing notification to the finger joint recognition module in the input framework. The capacity value writing notification carries the capacity value data written into the finger joint node by the data processing unit.

[0222] The capacitance value writing notification is used to notify the knuckle identification module that capacitance value data is written into the knuckle node.

[0223] S211. After receiving the capacity value writing notification, the knuckle recognition module calls the knuckle file node in the knuckle driver.

[0224] S212, the knuckle file node initiates inter-core communication through sensor-hal to obtain ACC data from the sensor subsystem on the CP side.

[0225] The specific process of this step can be found in the above embodiment and will not be described again here.

[0226] S213. The knuckle file node returns the acquired ACC data to the knuckle recognition module.

[0227] At this point, the finger joint recognition module obtains the capacitance data and ACC data corresponding to the current touch event. After step S213, step S214 is executed. Of course, step S214 can also be executed synchronously with the above steps S207 to S213.

[0228] S214. The data processing unit of the THP module writes the coordinate data into the coordinate node.

[0229] S215. The TP driver generates an input event according to the coordinate data in the coordinate node.

[0230] S216. The TP driver writes the input event to the device input node.

[0231] S217. The event center in the input framework reads input events from the device input node.

[0232] S218. The event reading module obtains input events from the event center.

[0233] S219: When the event reading module determines that the input event is a down event, the event reading module calls the knuckle recognition module to recognize the knuckle event.

[0234] S220: The knuckle recognition module determines that the input event is a knuckle event according to the capacitance data and the ACC data corresponding to the input event.

[0235] Specifically, the finger joint recognition module responds to the call of the event reading module and determines whether the input event is a finger joint event according to the capacity data carried in the capacity writing notification in step S210 and the ACC data obtained in steps S211 to S213. In this embodiment, the judgment result is "yes".

[0236] S221. The finger joint recognition module returns the recognition result (i.e., finger joint event) to the event reading module.

[0237] S222: The event reading module sends the recognition result (i.e., the joint event) and the input event to the event distribution module.

[0238] S223. The event distribution module distributes the input event to the screenshot application of the application layer according to the recognition result (i.e., the joint event).

[0239] S224: The screenshot application processes the input event.

[0240] Specifically, after receiving the input event, the screenshot application will process it according to the type of input event, the corresponding touch position, etc. For example, if the input event is a down event, the screenshot application can wait, and after receiving the move event or up event, it can respond according to one or more groups of input events. For example, if it is determined based on two groups of input events that the user's operation is a double-click operation, a full-screen screenshot is executed, and the following is displayed: Fig.10 The interface shown in Figure (b).

[0241] The method provided in this embodiment is that when the touch position of the knuckle touch operation is outside the hot zone coordinate range corresponding to the current hot zone layout, the filtering unit can normally write the capacitance data to the knuckle node, triggering the TP driver to send a capacitance write notification to the knuckle recognition module, thereby triggering the knuckle recognition module to obtain ACC data. After that, the knuckle recognition module can identify the knuckle event based on the capacitance data and ACC data. In this way, the normal recognition of the knuckle touch operation in normal scenarios is achieved, ensuring the normal operation of shortcut functions such as screenshots.

[0242] The following further describes the monitoring of the hot zone status and hot zone layout, as well as the calculation process of the hot zone coordinate range.

[0243] For example, Fig.12 A flowchart of another touch operation response method provided in an embodiment of the present application is shown below. Fig.13 For a schematic diagram of a touch operation response method provided in an embodiment of the present application, please refer to Fig.12 and Fig.13 , the above steps S101 and S102 may include:

[0244] S301. The hot zone management module monitors the hot zone status and the changes of the hot zone layout.

[0245] Optionally, the scenarios in which the hot zone state switches from the call-in state to the call-out state include but are not limited to the following:

[0246] (1) For an application that pulls up the input method by default when running in the foreground, when the application is started, or when the screen state changes from the off state to the on state when the application is already started, the hot zone state switches to the call-out state.

[0247] It is understandable that some applications can be installed in electronic devices. When these applications are started and run in the foreground, the output method is directly pulled up by default without the user performing any operation, and the input method interface is displayed. For these applications, when the user starts the application, the hot zone state is switched to the call-out state. Alternatively, when these applications are started and running in the foreground, the user turns off the screen and the hot zone state is switched to the call-back state. In this case, when the user switches the screen from the off state to the on state, the hot zone state is switched to the call-out state.

[0248] (2) For an application that does not launch an input method by default and is running in the foreground, the user performs a preset operation and the hot zone state switches to the call-out state.

[0249] For applications that do not launch the input method by default when running in the foreground, you can trigger the launch of the input method and call out the hot zone through the user's preset operation. The user's preset operation can be different for different applications and services. For example, For example, the preset operation may include, for example, a user clicking an input box. Taking a browser as an example, the preset operation may include, for example, a user clicking a search box, and the like.

[0250] When the hot zone state is in the call-out state and the input method interface is displayed on the screen, the user can switch the hot zone state from the call-out state to the call-back state through some operations.

[0251] Optionally, the scenarios in which the hot zone state changes from the call-out state to the call-back state include but are not limited to the following:

[0252] (1) When the user exits the input method application, the hot zone status switches to the recall status.

[0253] For example, the user clicks on an area outside the input method interface, or performs a return operation to exit the input method, the hot zone state switches from the call-out state to the call-back state, and the input method interface is no longer displayed.

[0254] (2) The input method application switches from a non-suspended state to a suspended state, and the hot zone state switches to a recalled state.

[0255] It can be understood that when the input method application is running, the input method interface can be displayed in two states: suspended state and non-suspended state. The user can switch the non-suspended state interface to a suspended state. In this case, the operations performed in the hot zone will not affect the operations of the underlying application interface, so it is considered that the hot zone state is switched to the recalled state.

[0256] (3) Input content on the screen using the stylus pen and the hot zone status switches to the recall status.

[0257] In some embodiments, when the input method interface is displayed on the screen, if the user performs an operation on the screen using a stylus, in this case, the input method interface is folded and the hot zone state is switched to the recalled state.

[0258] (4) When the hot zone is in the call-out state, when the screen goes off, the hot zone state switches to the call-back state.

[0259] It can be understood that the hot zone management module can also obtain the above-mentioned conditional parameters affecting the hot zone switching from the application framework layer or related modules of other layers, so as to determine whether to switch the hot zone state. For example, the hot zone management module can determine the application running in the foreground based on the window manager of the application framework layer. Among them, the application that pulls up the input method by default when running in the foreground can be marked in advance, so that it can be known whether these applications are started, and then determine whether the hot zone state needs to be switched. In addition, as described in the above embodiment, the hot zone management module can register the screen state monitoring with the screen state management module in advance, and when the screen state changes, the screen state management module can notify the hot zone management module. In this way, the hot zone management module can determine whether to switch the state of the hot zone.

[0260] It should be noted that the hot zone state switching scenarios listed above are only used for illustration and do not constitute any limitation to the present application.

[0261] In addition, in some scenarios, the layout of the hotspots may change, for example, when the display mode of the screen changes. The following describes the display mode of the screen and several layouts of the hotspots in conjunction with the accompanying drawings.

[0262] For example, Fig.14 A schematic diagram of an input method hot zone layout provided in an embodiment of the present application. Fig.14 Taking the note application as an example, the layout of the interface display and input method hot zone of the application in the vertical screen 0° mode is shown. Optionally, when marking a location, the electronic device can preset two coordinate systems: the physical coordinate system and the logical coordinate system. Fig.14 As shown, when the user holds the electronic device vertically as a reference for the direction description, the physical coordinate system can be an XOY coordinate system (indicated by solid lines) with the upper left corner of the screen as the origin O, the top of the screen as the X-axis, and the left side of the screen as the Y-axis. The physical coordinate system is fixed. The logical coordinate system is an Xoy coordinate system (indicated by dotted lines) with the upper left corner of the interface as the origin o, the top of the interface as the x-axis, and the left side of the interface as the y-axis when the interface is displayed in the forward direction. The logical coordinate system changes as the display direction of the interface changes.

[0263] It can be seen that in the vertical screen 0° mode, the logical coordinate system coincides with the physical coordinate system. That is to say, when the hot zone layout is a vertical screen 0° layout, the coordinate range of the hot zone in the logical coordinate system is the same as the coordinate range in the physical coordinate system. Specifically, as shown in the figure, under the vertical screen 0° layout, the hot zone fills the screen along the X-axis and the x-axis, and occupies part of the screen area along the Y-axis and the y-axis. In the embodiment of the present application, under the vertical 0° layout, the coordinate range of the hot zone along the Y-axis and the y-axis is recorded as TopY to BottomY.

[0264] Fig.15 Another example of input method hot zone layout diagram provided in an embodiment of the present application. Fig.15 Figure (a) continues to take the note application as an example, showing the interface display of the application and the layout of the input method hot zone in the horizontal screen 90° mode. As shown in the figure, the logical coordinate system and the physical coordinate system do not overlap in the horizontal screen 90° mode. When the hot zone layout is a horizontal screen 90° layout, the screen is filled along the Y-axis direction of the physical coordinate system (the x-axis of the logical coordinate system), and the screen is filled along the direction, and part of the screen area is occupied along the X-axis direction of the physical coordinate system (the y-axis of the logical coordinate system). In an embodiment of the present application, under the horizontal screen 90° layout, the coordinate range of the hot zone along the y-axis of the logical coordinate system is recorded as srcTopY to srcBottomY.

[0265] Fig.15Figure (b) continues to take the note application as an example, showing the interface display of the application and the layout of the input method hot zone in the horizontal 270° mode. As shown in the figure, the logical coordinate system and the physical coordinate system do not overlap in the horizontal 270° mode. When the hot zone layout is a horizontal 270° layout, the screen is filled along the Y-axis direction of the physical coordinate system (the x-axis of the logical coordinate system), and the screen is filled along the direction, and part of the screen area is occupied along the X-axis direction of the physical coordinate system (the y-axis of the logical coordinate system). In an embodiment of the present application, under the horizontal 270° layout, the coordinate range of the hot zone along the y-axis of the logical coordinate system is recorded as srcTopY to srcBottomY.

[0266] As described above, the hot zone management module can pre-register the screen display mode monitoring with the display mode management module, and when the display mode of the screen changes, the display mode management module can notify the hot zone management module. The hot zone management module changes the hot zone layout when the display mode changes.

[0267] S302: When at least one of the hot zone state and the hot zone layout changes, the hot zone management module sends a hot zone coordinate calculation instruction to the hot zone coordinate calculation module.

[0268] The hot zone coordinate calculation instruction is used to instruct the hot zone coordinate calculation module to calculate the changed hot zone coordinate range.

[0269] S303. The hot zone coordinate calculation module calculates the changed hot zone coordinate range in response to the hot zone coordinate calculation instruction.

[0270] Optionally, the hot zone coordinate calculation module can calculate the physical coordinate range of the hot zone. In one embodiment, the hot zone coordinate calculation module can calculate the physical coordinate range of the hot zone based on the type of hot zone layout, the logical coordinate range of the current hot zone, and the resolution of the current screen. Fig.13 , Fig.14 and Fig.15 , the hot zone coordinate calculation module can be calculated according to the following process:

[0271] (1) The hot zone coordinate calculation module obtains the logical coordinate range of the hot zone after the change.

[0272] Generally, no matter which layout is used, the hot area fills the screen along the x-axis in the logical coordinate system, so only the logical coordinate range in the y-axis direction can be calculated. Fig.14 , in a vertical screen 0° layout, the logical coordinate range is from TopY to BottomY. Fig.15 In Figures (a) and (b), in both the horizontal 90° layout and the horizontal 270° layout, the logical coordinate range is scrTopY to scrBottomY. However, the corresponding physical coordinates in these two layouts are different.

[0273] (2) The hot zone coordinate calculation module converts the logical coordinate range of the hot zone into the physical coordinate range according to the current hot zone layout.

[0274] Specifically, if the current hot zone layout is a vertical screen 0° layout, the hot zone coordinate calculation module uses the logical coordinate range of the hot zone as the physical coordinate range.

[0275] That is, targetTopY=srcTopY, targetBottomY=srcBottomY.

[0276] If the current hot zone layout is a horizontal 90° layout, the hot zone coordinate calculation module converts the logical coordinate range of the hot zone into the physical coordinate range according to the following formula group ①:

[0277] targetLeftX=currentResolution.Y-srcBottomY ①

[0278] targetRightX=currentResolution.Y-srcTopY

[0279] Among them, targetLeftX to targetRightX is the physical coordinate range of the hot zone. currentResolution.Y represents the resolution in the logical Y-axis direction, that is, the total height of the screen along the logical Y-axis (referred to as the logical Y-axis).

[0280] For example, Fig.16 This is a schematic diagram of a coordinate transformation principle provided in an embodiment of the present application. Fig.16 As shown in Figure (a) in the figure, before the conversion, the coordinate range of the hot zone along the y-axis in the logical coordinate system is from scrTopY to scrBottomY. Fig.16 As shown in Figure (b), after the conversion, the range fills the screen along the Y axis in the physical coordinate system and occupies the left half of the screen along the X axis in the physical coordinate system (referred to as the physical X axis). The maximum coordinate value along the physical X axis is the difference between the total width along the physical X axis (equal to the total height of the logical Y axis) and the maximum value of the logical Y axis, and the minimum coordinate value along the physical X axis is the difference between the total width along the physical X axis (equal to the total height of the logical Y axis) and the minimum value of the logical Y axis.

[0281] If the current hot zone layout is a horizontal 270° layout, the hot zone coordinate calculation module converts the logical coordinate range into the physical coordinate range according to the following formula group ②:

[0282] targetLeftX=srcTopY ②

[0283] targetRightX=srcBottomY

[0284] targetLeftX to targetRightX is the physical coordinate range of the hot zone. For example, Fig.17 Another example of coordinate transformation principle diagram provided in the embodiment of the present application. Fig.17 As shown in Figure (a) in the figure, before the conversion, the coordinate range of the hot zone along the y-axis in the logical coordinate system is from scrTopY to scrBottomY. Fig.17 As shown in Figure (b), after the conversion, the range fills the screen along the Y-axis in the physical coordinate system and occupies the right half of the screen along the X-axis in the physical coordinate system (referred to as the physical X-axis). The maximum coordinate value along the physical X-axis is equal to the maximum coordinate value along the logical Y-axis, and the minimum coordinate value along the physical X-axis is the minimum coordinate value along the logical Y-axis.

[0285] Optionally, the hot zone coordinate calculation module can obtain the current resolution by calling the resolution interface function getDisplaySize().

[0286] (3) The hot zone coordinate calculation module performs resolution conversion on the physical coordinate range of the hot zone to obtain the hot zone coordinate range.

[0287] When the current resolution of the screen is not the highest resolution of the screen, the calculated physical coordinates will not correspond to the actual physical coordinates, and the calculated physical coordinates will be scaled. In view of this, after calculating the physical coordinates of the hot zone, the resolution conversion is further performed to obtain the final hot zone coordinate range.

[0288] Specifically, the hot zone coordinate calculation module performs resolution conversion according to the following formula group ③:

[0289] int xTarget=(int)((float)xSrc*maxResolution.x / currentResolution.x+0.5)③

[0290] int yTarget=(int)((float)ySrc*maxResolution.y / currentResolution.y+0.5)

[0291] Wherein, xTarget is the physical X coordinate after resolution conversion, yTarget is the physical Y coordinate after resolution conversion, xSrc is the physical X coordinate before resolution conversion, and optionally, xSrc can be the above-mentioned targetLeftX or targetRightX. ySrc is the physical Y coordinate before resolution conversion, and optionally, ySrc can be the above-mentioned targetTopY or targetBottomY. maxResolution is the maximum resolution, and currentResolution is the current resolution. 0.5 is a correction parameter, and of course, in some embodiments, 0.5 can also be adjusted to other values.

[0292] Optionally, the hot zone coordinate calculation module can obtain the current resolution and the maximum resolution by calling the resolution interface function getDisplaySize().

[0293] For example, the code for obtaining the current resolution and the maximum resolution through the getDisplaySize() interface function may be as follows:

[0294]

[0295] Among them, the statement "WindowManagerEx.getDisplaySize(WindowManagerEx.GET_DISPLAY_SIZE_TYPE_INITIAL,displayd:0,maxResolution)" is used to obtain the maximum resolution, and the statement "WindowManagerEx.getDisplaySize(WindowManagerEx.GET_DISPLAY_SIZE_TYPE_BASE,displayd:0,currentResolution)" is used to obtain the current resolution.

[0296] In this implementation, the logical coordinate range of the hot zone is converted into a physical coordinate range in combination with the relationship between the logical coordinate system and the physical coordinate system under different hot zone layouts. Generally, the coordinate position corresponding to the touch event is represented by the physical coordinates. Therefore, converting the logical coordinate range of the hot zone into the physical coordinate range facilitates the subsequent filtering unit to directly compare the coordinates and determine whether the touch event occurs within the hot zone coordinate range, thereby improving the accuracy of the knuckle algorithm filtering in the input method scenario. In addition, in this implementation, the resolution of the physical coordinate range is converted based on the current resolution and the maximum resolution of the screen, so that the calculated hot zone coordinate range is more accurate, thereby improving the accuracy of the calculation of the later filtering unit, improving the accuracy of the knuckle algorithm filtering, and preventing the end user from being unable to trigger the knuckle shortcut function outside the hot zone range.

[0297] It can be understood that when the changed hot zone state is the reset state, the hot zone coordinate calculation module may not perform substantial calculations, but directly send the changed hot zone state to the filtering unit in the THP module.

[0298] S304. The hot zone coordinate calculation module sends the changed hot zone state, the changed hot zone layout, and the changed hot zone coordinate range to the filtering unit in the THP module.

[0299] Optionally, the hot zone coordinate calculation module can carry the hot zone status, hot zone layout and hot zone coordinate range in a command and send it to the filtering unit. In a specific embodiment, the hot zone coordinate calculation module can call the HwInputManager.runHwTHPCommand(String command,String parameter) interface to send a command including the hot zone status, hot zone layout and hot zone coordinate range to the THP through inter-process communication (IPC).

[0300] The parameter String command represents a command field, including a command type, which is used to establish a dedicated command channel. In the embodiment of the present application, the command field used to transmit the hot zone status, hot zone layout and hot zone coordinate range may be, for example, "THP_SetInputMethodRegion".

[0301] The parameter String parameter represents the command content, which includes the hot zone status, hot zone layout and hot zone coordinate range that need to be transmitted to THP. In the embodiment of the present application, the command field can be expressed as "status heightLowheightHigh", for example. Among them, status, heightLow and heightHigh are separated by spaces. Status represents the hot zone status and the hot zone layout type, heightLow represents the minimum value in the height direction of the hot zone, heightHigh represents the maximum value in the height direction of the hot zone, and heightLow≤heightHigh. It should be noted that in the embodiment of the present application, along the height direction and along the width direction refer to the height direction and width direction when the interface in the screen is displayed forward and the user is facing the screen.

[0302] The specific way in which status represents the hot zone status and hot zone layout type can be set according to actual needs. In a specific embodiment, if the hot zone status is the call-out state and the hot zone layout type is the vertical screen 0° layout, then status = 0. In this case, the value of heightLow is the resolution conversion result corresponding to targetTopY, and the value of heightHigh is the resolution conversion result corresponding to targetBottomY. If the hot zone status is the call-out state and the hot zone layout type is the horizontal screen 90° layout or the horizontal screen 270° layout, then status = 1. In this case, the value of heightLow is the resolution conversion result corresponding to targetLeftX, and the value of heightHigh is the resolution conversion result corresponding to targetRightX. If the hot zone status is the call-back state, then status = -1, and the values ​​of heightLow and heightHigh are empty.

[0303] In one embodiment, the code for transmitting a command through the HwInputManager.runHwTHPCommand(String command, String parameter) interface may be as follows:

[0304]

[0305] Afterwards, after the filtering unit in the THP module receives the command sent by the HwInputManager.runHwTHPCommand(String command, String parameter) interface, it can determine the hot zone status and hot zone layout status according to the value of status in the command, and determine the hot zone coordinate range according to heightLow heightHigh, and then determine whether the touch position corresponding to the down event is within the hot zone coordinate range.

[0306] Specifically, if status=0, the filtering unit determines whether the physical Y coordinate of the touch position is between the value of heightLow and the value of heightHigh; if so, it is determined that the touch position is within the hot zone coordinate range, and filtering is performed, that is, the capacitance data is not written to the TP-driven finger joint node; otherwise, it is determined that the touch position is not within the hot zone coordinate range, filtering is not performed, and the capacitance data is written to the TP-driven finger joint node.

[0307] If status=1, the filtering unit determines whether the physical X coordinate of the touch position is between the value of heightLow and the value of heightHigh; if so, it is determined that the touch position is within the hot zone coordinate range, and filtering is performed, that is, the capacitance value data is not written into the TP-driven finger joint node; otherwise, it is determined that the touch position is not within the hot zone coordinate range, and filtering is not performed, and the capacitance value data is written into the TP-driven finger joint node.

[0308] If status=-1, the filtering unit determines that the hot zone state is the recalled state, does not perform filtering, and writes the capacitance value data into the finger joint node driven by the TP.

[0309] That is, in the input method scenario, assuming that the logical coordinates of the touch position are (touchX, touchY), the logic for the filtering unit to determine whether to perform filtering is:

[0310] When status = -1, false (no filtering is performed);

[0311] When status=0, if heightLow≤touchY≤heightHigh, true (filter is executed); otherwise false (filter is not executed);

[0312] When status=1, if heightLow≤touchX≤heightHigh, true (filtering is performed); otherwise false (filtering is not performed).

[0313] In this implementation, by setting a command channel for sending hot zone status and hot zone coordinates, it is convenient to accurately transmit information to the filtering unit, and it is also convenient for the filtering unit to accurately and simply identify the information sent by the input method, thereby improving the accuracy and efficiency of information transmission.

[0314] In some embodiments, the method provided in this embodiment further includes:

[0315] When the screen state is switched from the on-screen state to the off-screen state, the filtering unit clears the saved hot zone state, hot zone layout and hot zone coordinate range, that is, clears the values ​​of the status, heightLow and heightHigh parameters, and resets the value of status to -1.

[0316] That is to say, after the user turns off the screen, the filtering unit considers that the input method interface is not displayed on the screen, resets the filtering algorithm, and does not filter the knuckle algorithm. In this way, the solution can enhance its ability to cope with potential risks brought by some abnormal conditions, such as the crash of the input method program, and ensure that the user can restore the knuckle shortcut function by turning the screen on and off in abnormal conditions, thereby improving the user experience.

[0317] Next, the response method of the touch operation in the game scene is described.

[0318] See above Figure 5 , for example, a window of game application A is displayed in full screen on the screen, and the user performs a double-click operation with a knuckle anywhere on the screen. Fig.18 FIG. 1 is a flow chart of another touch operation response method provided in an embodiment of the present application, the method comprising:

[0319] S401. In response to the user launching game application A, the mode switching unit in the game assistant module of the application framework layer determines that the currently running game application is a game in the game list based on the game list provided by the game manager and the window information provided by the window manager, and the mode switching unit switches the system operation mode to the game mode.

[0320] S402: The mode switching unit sends a mode switching notification 1 to the game coordinate calculation unit. The mode switching notification 1 is used to notify that the current system state is switched to the game mode.

[0321] Optionally, the game coordinate calculation unit may pre-register the monitoring of the system operation mode with the mode switching unit, and when the system enters or exits the game mode, the mode switching unit notifies the game coordinate calculation unit.

[0322] Optionally, the mode switching notification 1 carries the information of the system operation mode after switching and the game application. In this embodiment, the mode switching notification 1 carries the information of the "game mode" and the game application A.

[0323] S403 . The game coordinate calculation unit determines the window display mode of the game application A in response to the mode switching notification 1 , and calculates the game coordinate range.

[0324] Optionally, the game coordinate calculation unit may obtain the window display mode of the game application A from the window manager.

[0325] Optionally, the game coordinate calculation unit can calculate the physical coordinate range of the window of game application A, so that the filtering unit in the subsequent THP module can directly compare and determine whether the touch position is within the coordinate range based on the physical coordinates, thereby improving the accuracy and efficiency of the filtering algorithm.

[0326] S404. The game coordinate calculation unit sends the system operation mode (game mode), window display mode (full screen window mode) and game coordinate range to the filtering unit in the THP module of the hardware abstraction layer.

[0327] The filtering unit can store the system operation mode (game mode), window display mode (full screen window mode) and game coordinate range. It can be understood that when the system exits the game mode, the mode switching unit sends a mode switching notification 2 (carrying "non-game mode") to the game coordinate calculation unit. After receiving the mode switching notification 2, the game coordinate calculation unit can directly send the non-game mode to the filtering unit. In this way, the filtering unit can know the current system operation mode in real time.

[0328] In addition, when the system is in game mode, the game coordinate calculation unit can monitor changes in the game application window. When any one of the window display mode and the game coordinate range of the game window changes, the changed window display mode and the game coordinate range are sent to the filtering unit. In this way, the filtering unit can know the current window display mode and the game coordinate range in real time. For details, please refer to the subsequent embodiments.

[0329] In summary, the filtering unit can obtain the current system operation mode in real time, and when the system operation mode is the game mode, the filtering unit can also obtain the window display mode and game coordinate range of the game application in real time. In this way, when the filtering algorithm needs to be executed, the filtering unit executes the relevant calculation process according to the current system operation mode, window display mode and game coordinate range, and the details can be seen in the subsequent step S412.

[0330] S405 , in response to the user performing a touch operation on the screen using a finger joint, the TP IC of the hardware layer detects a capacitance electrical signal and converts the capacitance electrical signal into a digital signal to obtain original capacitance data.

[0331] S406 , the TP IC writes the original capacitance data into the TP buffer of the TP driver of the kernel layer.

[0332] S407: The TP driver writes the original capacity value data in the TP cache to the device thp node.

[0333] S408. The data processing unit in the THP module of the hardware abstraction layer reads the original capacitance value data from the device THP node.

[0334] S409: The data processing unit processes the original capacitance data to obtain capacitance data and coordinate data corresponding to the touch operation.

[0335] S410. The data processing unit in the THP module determines whether the event type corresponding to the capacitance data is a down event; if so, execute step S411; if not, execute step S413.

[0336] S411. The data processing unit in the THP module sends a filtering algorithm start instruction to the filtering unit in the THP module.

[0337] The process from step S405 to step S411 is the same as above. Figure 7 Steps S103 to S108 in the illustrated embodiment are the same and will not be described in detail.

[0338] S412: The filtering unit in the THP module responds to the filtering algorithm start instruction, determines that the system is currently in the game mode, and the touch position is within the game coordinate range, and the filtering unit does not perform any operation. Then, the process continues to execute S413.

[0339] Specifically, the filtering unit responds to the filtering algorithm startup instruction to determine whether the system is in game mode. If it is in game mode, the filtering unit determines whether the touch position is within the game coordinate range according to the coordinate data corresponding to the touch position; if the system is in game mode and the touch position is within the game coordinate range, it means that the current scene is a finger joint touch operation in the game scene, and there is no need to respond to the touch operation as a finger joint touch operation, so the filtering unit does not perform any operation, that is, does not write capacitance value data to the finger joint node. The filtering unit does not write capacitance value data to the finger joint node, so it will not trigger the TP driver to send a notification to the finger joint recognition module, and then will not trigger the finger joint recognition module to obtain ACC data.

[0340] If the system is currently in non-game mode, or the system is currently in game mode but the touch position is outside the game coordinate range, the filter unit writes the capacitance value data into the knuckle node driven by the TP.

[0341] S413. The data processing unit of the THP module writes the coordinate data into the coordinate node.

[0342] S414. The TP driver generates an input event according to the coordinate data in the coordinate node.

[0343] S415. The TP driver writes the input event to the device input node.

[0344] S416. The event center in the input framework reads input events from the device input node.

[0345] S417: The event reading module obtains input events from the event center.

[0346] S418. When the event reading module determines that the input event is a down event, the event reading module calls the knuckle recognition module to recognize the knuckle event.

[0347] S419: The knuckle recognition module determines that the input event is not a knuckle event.

[0348] S420: The finger joint recognition module returns the recognition result (not a finger joint event) to the event reading module.

[0349] S421. The event reading module sends the recognition result (not a knuckle event) and the input event to the event distribution module.

[0350] S422. The event distribution module distributes the input event to the game application A at the application layer according to the recognition result (not a knuckle event).

[0351] S423: Game application A processes the input event.

[0352] The process from step S413 to step S423 is the same as above. Fig. 9 Steps S111 to S121 in the illustrated embodiment are similar and will not be described in detail.

[0353] In the present embodiment, the game assistant module can send the system operation mode (game mode) and the game coordinate range to the filtering unit when the system enters the game mode. After the user performs a pressing action and the data processing unit in the THP module processes and obtains the capacitance data corresponding to the down event, the filtering unit executes the filtering algorithm according to the game mode and the game coordinate range. When it is determined that the touch position is within the game coordinate range, the capacitance data is not written to the finger joint node. In this way, the TP driver will not be triggered to send a capacitance write notification to the finger joint recognition module, and the finger joint recognition module will not be triggered to obtain ACC data. In other words, this method filters the execution process of the finger joint algorithm for touch events that fall within the game coordinate range. In this way, the redundant finger joint algorithm process in the game scene is omitted, saving system resources and reducing system load.

[0354] The above description is based on the full-screen window mode of the game application window display mode. It can be understood that for the split-screen window mode and the small window mode, if the filtering unit determines that the press event is not within the game coordinate range, the knuckle algorithm is not filtered, and the subsequent execution steps can refer to the above Fig.11 S209 to S224 in the illustrated embodiment will not be described in detail here.

[0355] The following describes the process in which the game coordinate calculation unit monitors changes in the game application window in the game mode.

[0356] First, several window modes are explained.

[0357] As mentioned above, the window display mode may include a full-screen window mode, a split-screen window mode, and a small window mode. Figure 5,Full-screen window mode means that the window fills the screen, that is, the window size is the same as the screen size, and the coordinate range of the window is also the coordinate range of the screen.

[0358] See also Fig.19 , the split-screen window mode means that the window occupies half of the screen. Optionally, the split-screen window mode can be a horizontal split-screen window mode (such as Fig.19 ), or it can be a vertical split-screen window mode (as shown in Figure (a) in the figure). Fig.19 Horizontal split window mode means that when the display mode of the screen is horizontal 90° mode or horizontal 270° mode, the window occupies the left half or right half of the screen. Vertical split window mode means that when the display mode of the screen is vertical 0° mode, the window occupies the upper half or lower half of the screen.

[0359] See also Fig. 20 , small window mode refers to a display mode other than full screen window mode and split screen window mode. In small window mode, the size of the window is smaller than the window in full screen window mode. Small window mode may include, for example, floating window, mini window, etc., which is not limited in the embodiments of the present application.

[0360] Take the example of a user switching the full screen window mode to the small window mode. Fig.21 A flowchart of another touch operation response method provided in an embodiment of the present application is shown below. Fig. 22 This is a schematic diagram of an example of a window switching interface change provided in the embodiment of the present application. Please refer to Fig.21 and Fig. 22 , the method comprising:

[0361] S501. When game application A is started and displayed in full screen, in response to the user's operation of switching game application A to small window mode, the window manager switches the window display mode of game application A from full screen window mode to small window mode.

[0362] Optionally, the operation of switching the small window mode may be, for example, clicking on the shrink window control in the full-screen window, or sliding upward from the bottom of the screen a preset distance, or a return operation, etc. The specific operation may be determined according to the preset window switching gesture of the electronic device, and the embodiment of the present application does not impose any limitation on this.

[0363] In this embodiment, the user switches the window to a small window through the return operation as an example. Fig. 22 As shown in Figure (a) in FIG. 1 , the return operation may be, for example, an operation of sliding from the outside of the screen to the inside. Of course, the return operation may also be clicking a return control in the three-button navigation bar.

[0364] The window manager responds to the user's operation and switches the window of game application A to small window mode, such as Fig. 22 Figure (b) in .

[0365] S502: The window manager sends a window change notification to the game coordinate calculation unit. The window change notification is used to notify the game application A that the window display mode and / or window coordinate information has changed.

[0366] Optionally, the window change notification may carry information about the changed window display mode and / or window coordinates.

[0367] Optionally, the game coordinate calculation unit may register the window change monitoring of each game application in the game list with the window manager in advance. When the window of any game application in the game list changes, the window manager sends a window change notification to the game coordinate calculation unit. In this way, the game coordinate calculation unit can obtain the window changes of game application A in real time, including the changes in the display mode of the window, the changes in the window size, and the changes in the window position.

[0368] The window manager is used to manage application windows, including the display mode, display size, display position, etc. of the windows. Therefore, the window manager can obtain information about the windows of each running application and window changes. The window coordinate information is used to characterize the position and size of the window. Optionally, the window coordinate information can be the coordinates of the four vertices of the window, the coordinates of the four edges of the window, or the window coordinate range. The window coordinate information can be physical coordinates.

[0369] Of course, in other embodiments, the game coordinate calculation unit may also periodically obtain the window display mode and window coordinate information of the game application A from the window manager after receiving the mode switching notification 1 sent by the mode switching unit. Specifically, as described in the above steps S403 and S404, after receiving the mode switching notification 1, the game coordinate calculation unit may obtain the window display mode of the game application A from the window manager for the first time, calculate the game coordinate range, and send the system operation mode, window display mode and game coordinate range to the filtering unit in the THP module. Afterwards, the game coordinate unit obtains the window display mode and window coordinate information of the game application A from the window manager once every preset time interval until receiving the mode switching notification 2 sent by the mode switching unit, notifying the system mode to switch to the non-game mode.

[0370] Optionally, when the game coordinate calculation unit obtains the window display mode and window coordinate information from the window manager, it may send a window information acquisition request to the window manager. The window information acquisition request may carry information of game application A, such as the name or ID of game application A. In response to the window information acquisition request, the window manager queries the display mode and window coordinate information of the window of game application A according to the information of game application A carried therein, and returns the information to the game coordinate calculation unit. In this way, the game coordinate calculation unit can learn whether the window display mode and window coordinate information have changed, and when they have changed, calculate the changed game coordinate range.

[0371] S503: The game coordinate calculation unit calculates a changed game coordinate range in response to the window change notification.

[0372] S504: The game coordinate calculation unit sends the changed window display mode and the changed game coordinate range to the filtering unit in the THP module.

[0373] In this way, the filtering unit can obtain the current window display mode and game coordinate range in real time, so as to accurately determine whether the knuckle touch operation occurs within the window of the game application, and then accurately determine whether to filter the knuckle algorithm, thereby saving power consumption and improving the response accuracy of the knuckle touch operation.

[0374] The calculation process of the game coordinate range is further explained below.

[0375] For example, Fig.23 For another schematic diagram of a touch operation response method provided in an embodiment of the present application, see Fig.23 The "calculating the game coordinate range" in the above step S403 and the "the game coordinate calculation unit calculating the changed game coordinate range" in S503 are collectively referred to as "calculating the game coordinate range", and the process may include:

[0376] 1) The game coordinate calculation unit obtains the physical coordinate range of the window of game application A from the window manager.

[0377] In this embodiment, the game coordinate calculation is described by taking the window coordinate information obtained from the window manager as the physical coordinate range as an example. Fig. 20, the physical coordinate range of the window can be expressed as: Left X, Right X, Top Y, Bottem Y. Left X represents the X coordinate value of the left edge of the window in the physical coordinate system XOY, Right X represents the X coordinate value of the right edge of the window in the physical coordinate system XOY, Top Y represents the Y coordinate value of the upper edge of the window in the physical coordinate system XOY, and BottemY represents the Y coordinate value of the lower edge of the window in the physical coordinate system XOY.

[0378] As described above, the game coordinate calculation unit may actively obtain the physical coordinate range from the window manager, or the window manager may notify the game coordinate calculation unit, which will not be described in detail.

[0379] 2) The game coordinate calculation unit performs resolution conversion on the physical coordinate range of the window to obtain the game coordinate range.

[0380] In this embodiment, the physical coordinate range of the window can be directly obtained from the window manager, so there is no need to perform the conversion process of converting logical coordinates into physical coordinates, and the resolution conversion is directly performed. The resolution conversion process is the same or similar to the resolution conversion process of the input method hot zone coordinates. The maximum resolution and the current resolution can be obtained through the above interface function, and the resolution conversion can be realized through the above formula group ③, which will not be repeated here.

[0381] In one embodiment, the above step "S404, the game coordinate calculation unit sends the system operation mode (game mode) and the game coordinate range to the filtering unit in the THP module of the hardware abstraction layer", and the step "S504, the game coordinate calculation unit sends the changed window display mode and the changed game coordinate range to the filtering unit in the THP module", when executed, the game coordinate calculation unit can reuse the above HwInputManager.runHwTHPCommand(String command, String parameter) interface to send a command containing one or more of the system operation mode, window display mode and game coordinate range to THP.

[0382] Different from the above embodiment, in this embodiment, the command field of the parameter String parameter can be expressed as "status widthLow widthHigh heightLow heightHigh". Among them, widthLow, widthHigh, heightLow and heightHigh are separated by spaces. widthLow represents the minimum value (lower limit) of the window of the game application along the width direction, widthHigh represents the maximum value (upper limit) of the window of the game application along the width direction, heightLow represents the minimum value (lower limit) of the window of the game application along the height direction, and heightHigh represents the maximum value (upper limit) of the window of the game application along the height direction. Among them, widthLow≤widthHigh and heightLow≤heightHigh. In other words, widthLow and widthHigh limit the range of the game window along the X-axis direction of the physical coordinate system, and heightLow and heightHigh limit the range of the game window along the Y-axis direction of the physical coordinate system.

[0383] In addition, in this embodiment, status is used to characterize the system operation mode and the window display mode. If the system operation mode is game mode and the window display mode is full-screen window mode, status = 2, and the values ​​of widthLow, widthHigh, heightLow and heightHigh are empty. If the system operation mode is game mode and the window display mode is split-screen window mode or small window mode, the values ​​of widthLow, widthHigh, heightLow and heightHigh are Left X, Right X, Top Y, Bottem Y, respectively, which are the corresponding results obtained after the resolution conversion in the above step S502. If the system operation mode is non-game mode, status = -1, and the values ​​of widthLow, widthHigh, heightLow and heightHigh are empty.

[0384] Please continue to see Fig.23 After the filtering unit in the THP module receives the command sent by the HwInputManager.runHwTHPCommand(String command,String parameter) interface, it can determine whether the system operation mode is the game mode and the display mode of the game window according to the value of status in the command. The game coordinate range can be determined according to widthLow, widthHigh, heightLow and heightHigh, and then it can be determined whether the touch position corresponding to the down event is within the game coordinate range.

[0385] Specifically, if status=2, it means that the system is in game mode and the game application window is displayed in full screen, then the touch position must be within the game coordinate range, so the filtering unit can directly perform filtering, that is, the capacitance value data is not written into the TP-driven knuckle node.

[0386] If status=3, the filtering unit determines whether the physical X coordinate of the touch position is between the value of widthLow and the value of widthHigh, and the physical Y coordinate of the touch position is between the value of heightLow and the value of heightHigh; if so, it is determined that the touch position is within the game coordinate range, and filtering is performed, that is, the capacity value data is not written into the TP-driven finger joint node; otherwise, it is determined that the touch position is not within the game coordinate range, filtering is not performed, and the capacity value data is written into the TP-driven finger joint node.

[0387] If status=-1, the filtering unit determines that the system is in non-gaming mode, does not perform filtering, and writes the capacitance value data to the knuckle node of the TP driver.

[0388] That is, in the game scenario, assuming that the logical coordinates of the touch position are (touchX, touchY), the logic of the filtering unit determining whether to perform filtering is:

[0389] When status = -1, false (no filtering is performed);

[0390] When status = 2, true (filter is executed);

[0391] When status=3, if widthLow≤touchX≤widthHigh and heightLow≤touchX≤heightHigh, then true (filtering is performed); otherwise false (filtering is not performed).

[0392] In this implementation, by reusing the HwInputManager.runHwTHPCommand(String command,String parameter) interface, on the one hand, the transmission of commands in the game scenario is realized, which not only can accurately transmit information to the filtering unit, but also facilitates the filtering unit to accurately and simply identify the information sent by the game assistant module, thereby improving the accuracy and efficiency of information transmission; on the other hand, there is no need to add a new interface, which reduces the complexity of the system and improves the efficiency of the algorithm operation.

[0393] Similar to the input method scenario, in this implementation, when the screen state switches from the on screen state to the off screen state, the filtering unit can also clear the saved system state and game coordinate range, that is, clear the values ​​of the status, widthLow, widthHigh, heightLow and heightHigh parameters, and reset the value of status to -1. In this way, the method can enhance its ability to respond to potential risks brought by abnormal conditions such as game program crashes, ensure that users can restore the knuckle shortcut function by turning the screen on and off in abnormal conditions, and improve the user experience.

[0394] The above describes in detail an example of a response method for a touch operation provided in an embodiment of the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.

[0395] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0396] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0397] The electronic device provided in this embodiment is used to execute the above-mentioned touch operation response method, and thus can achieve the same effect as the above-mentioned implementation method.

[0398] In the case of an integrated unit, the electronic device may further include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, etc. The communication module may be used to support the electronic device to communicate with other devices.

[0399] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0400] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 7 Device of the structure shown.

[0401] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the touch operation response method of any of the above embodiments.

[0402] The embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the touch operation response method in the above-mentioned embodiment.

[0403] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the response method of the touch operation in the above-mentioned method embodiments.

[0404] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.

[0405] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0406] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0407] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0408] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0409] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0410] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for responding to a touch operation, the method being executed by an electronic device, the electronic device comprising a touch screen, characterized in that: The electronic device comprises an input framework located at an application framework layer, a THP module located at a hardware abstraction layer, and a TP driver located at a kernel layer, and the method comprises: The input framework registers a monitoring event with the TP driver; based on the monitoring event, the TP driver sends a first notification to the input framework when receiving the touch data sent by the THP module, and the input framework obtains target sensor data for identifying the knuckle touch operation in response to the first notification; Displaying a first window through the touch screen, wherein the first window displays an interface of a first game application; Receiving a first touch operation performed by a user on the touch screen; In response to the first touch operation, if it is determined that the system of the electronic device is running in a game mode and the touch position of the first touch operation is located within the first window, the THP module does not send touch data corresponding to the first touch operation to the TP driver.

2. The method according to claim 1, characterized in that If it is determined that the system of the electronic device is running in the game mode and the touch position of the first touch operation is located within the first window, before the THP module does not send the touch data corresponding to the first touch operation to the TP driver, the method further includes: Determining, according to the system operation mode of the electronic device, whether the system of the electronic device is operating in the game mode; Whether the touch position of the first touch operation is located within the first window is determined according to the display mode of the first window and / or the coordinate range of the first window.

3. The method according to claim 2, characterized in that The electronic device includes a game management module located at an application framework layer, and determining whether a touch position of the first touch operation is located within the first window according to a display mode of the first window and / or a coordinate range of the first window includes: The game management module acquires the display mode of the first window and / or the coordinate range of the first window; The game management module sends the display mode of the first window and / or the coordinate range of the first window to the THP module; The THP module determines whether the touch position of the first touch operation is located within the first window according to the display mode of the first window and / or the coordinate range of the first window.

4. The method according to claim 3, characterized in that The game management module obtains the coordinate range of the first window, including: The game management module acquires a first coordinate range, where the first coordinate range is a coordinate range of the first window in a first coordinate system at a current resolution of the touch screen; The game management module performs resolution conversion on the first coordinate range according to the maximum resolution of the touch screen and the current resolution to obtain the coordinate range of the first window.

5. The method according to claim 3, characterized in that: The THP module determines whether the touch position of the first touch operation is located within the first window according to the display mode of the first window and / or the coordinate range of the first window, including: If the display mode of the first window is a full-screen window mode, the THP module determines that the touch position of the first touch operation is located within the first window; If the display mode of the first window is a split-screen window mode or a small window mode, and the touch position of the first touch operation is within the coordinate range of the first window, the THP module determines that the touch position of the first touch operation is within the first window.

6. The method according to claim 2, characterized in that The electronic device includes a game management module located at the application framework layer, and the determining whether the system of the electronic device is running in the game mode according to the system running mode of the electronic device includes: The game management module obtains the system operation mode; The game management module sends the system operation mode to the THP module; The THP module determines whether the system of the electronic device is running in the game mode according to the system operation mode.

7. The method according to claim 6, characterized in that The game management module sends at least one of the display mode of the first window, the coordinate range of the first window and the system operation mode to the THP module through a first command, wherein the first command includes a command field and a parameter field, the command field is used to transmit the system operation mode and the display mode of the first window, and the parameter field is used to transmit the coordinate range of the first window.

8. The method according to claim 7, characterized in that When the system operation mode is the game mode and the display mode of the first window is the full screen display mode, the value of the command field is a first value; When the system operation mode is the game mode and the display mode of the first window is the split-screen display mode or the small window mode, the value of the command field is the second value, and the parameter field is the coordinate range of the first window.

9. The method according to claim 8, characterized in that The method further comprises: When detecting that the touch screen switches from the on state to the off state, the THP module clears the value of the parameter field and sets the value of the command field to a third value, wherein the third value indicates that the system operation mode is a non-gaming mode.

10. The method according to claim 1, characterized in that The method further comprises: If it is determined that the system of the electronic device is running in a game mode, and the touch position of the first touch operation is located within the first window, the first touch operation is responded to through the first game application.

11. The method according to claim 1, characterized in that: The method further comprises: If the touch position of the first touch operation is outside the first window, the THP module sends touch data corresponding to the first touch operation to the TP driver, and when the TP driver receives the touch data corresponding to the first touch operation sent by the THP module, the TP driver sends the first notification to the input framework, and the input framework obtains first target sensor data in response to the first notification; identifying, according to the first target sensor data and the touch data of the first touch operation, whether the first touch operation is a knuckle touch operation; If the first touch operation is a knuckle touch operation, the first touch operation is responded to through a second application.

12. The method according to claim 11, characterized in that The second application is a screenshot application or a screen recording application.

13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: Displaying the interface of the input method application through the touch screen; receiving a second touch operation performed by a user on the touch screen; In response to the second touch operation, if it is determined that the hot zone of the input method application is in a call-out state and the touch position of the second touch operation is located within the hot zone of the input method application, the THP module does not send touch data corresponding to the second touch operation to the TP driver.

14. An electronic device, characterized in that: include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other so that the electronic device executes the method as claimed in any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor calls instructions so that the electronic device executes the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Terminal control method, terminal and computer readable storage medium

    CN107391172A