Touch operation processing method and device and storage medium

CN121532741APending Publication Date: 2026-02-13HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380100339.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

The prior art calls the knuckle recognition algorithm every time the touch screen operation, resulting in increased system load and risk of misidentification, affecting the user experience.

Method used

By introducing a touch operation processing method in the electronic device, a mark is generated using the number of touch points and the capacitance value data, and whether to call the knuckle recognition algorithm, thereby filtering non-knuckle operations.

Benefits of technology

It reduces the frequency of calling knuckle recognition algorithms, reduces system load and misidentification risks, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121532741A_ABST
    Figure CN121532741A_ABST
Patent Text Reader

Abstract

The invention provides a touch operation processing method and device and a storage medium. In the method, when a touch operation is received, whether the touch operation is filtered or not is determined by determining the number of touch points, that is, based on a touch area, and when it is determined that the touch operation is a non-finger joint operation needing to be filtered, the electronic equipment is set not to call a finger joint recognition algorithm. Therefore, the condition that a knuckle recognition algorithm is called for each touch operation can be avoided, so that occupation of system resources is reduced, and the system load is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Touch operation processing method, device and storage medium Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method, device, and storage medium for processing touch operations. Background Art

[0002] To facilitate user operation and enhance the user experience, more and more electronic devices are supporting shortcut functions based on knuckle operation (hereinafter referred to as "knuckle function"). After the knuckle function is enabled, each time the electronic device detects a touch screen operation, it triggers a knuckle recognition algorithm to determine whether the touch screen operation is a knuckle operation, so as to meet the user's demand for knuckle function at any time.

[0003] However, the vast majority of user touchscreen operations are not intended to utilize the knuckle function, meaning that knuckle function is a low-probability operation in user touchscreen operations. Therefore, the current practice of invoking the knuckle recognition algorithm for every touchscreen operation significantly increases the system's baseline load and increases the risk of misidentification of knuckles, resulting in the display of sliding tracks and a negative impact on the user experience.

[0004] Summary of the Invention

[0005] In order to solve the above technical problems, the present application provides a touch operation processing method, device and storage medium, which aims to judge each touch operation to identify some non-finger joint operations and filter them, thereby reducing the call to the finger joint recognition algorithm, thereby reducing the basic load of the system and the occurrence of misrecognition.

[0006] In a first aspect, the present application provides a method for processing a touch operation, applied to an electronic device. The method comprises: receiving a first touch operation from a user; detecting the first touch operation to obtain the number of touch points corresponding to the first touch operation; generating a first identifier based on the number of touch points, the first identifier being used to indicate whether to skip invoking a knuckle recognition algorithm; when the first identifier is a first value, the electronic device does not invoke the knuckle recognition algorithm to identify the first touch operation; when the first identifier is a second value, the electronic device invokes the knuckle recognition algorithm to identify the first touch operation.

[0007] The electronic device is a device with a touch screen.

[0008] The first touch operation may be regarded as any touch operation performed by the user on the touch screen of the electronic device.

[0009] The number of touch points is the number of touch points on the touch screen within one scanning cycle when a touch operation occurs, and can be expressed as TouchNum.

[0010] Among them, the first identifier can be regarded as a newly added field for describing whether to skip calling the knuckle recognition algorithm, such as the Bitmap field mentioned in the following embodiment.

[0011] Regarding the generation of the first identifier, namely the Bitmap field, please refer to the embodiment shown in FIG17 below, which will not be described again here.

[0012] The first value is, for example, “0” recorded at the 0th bit in the Bitmap field, and the second value is, for example, “1” recorded at the 0th bit in the Bitmap field.

[0013] For example, when the first identifier is a first value, the current touch operation can be determined as a non-knuckle operation. When the first identifier is a second value, the current touch operation may be a knuckle operation or a non-knuckle operation. In this case, a knuckle recognition algorithm needs to be called for specific recognition processing.

[0014] Among them, finger joint operations include commonly known single finger joint operations and double finger joint operations.

[0015] For single finger joint operations, for example, it can be a single finger joint double-click, a single finger joint single click and draw a circle, a single finger joint single click and draw an S, etc.

[0016] For a two-knuckle operation, for example, it can be a double-knuckle operation.

[0017] Among them, non-knuckle operations are touch operations other than the currently mentioned knuckle operations, such as click operations and sliding operations performed using fingers.

[0018] Among them, when the first touch operation is a non-knuckle operation, that is, when the first identifier is the first value, the electronic device does not call the knuckle recognition algorithm to identify and process the first touch operation, but will still identify whether the first touch operation is a finger click operation or a sliding operation, and then determine which specific operation the current first touch operation is, so that the electronic device can make a correct response to ensure user experience.

[0019] Therefore, each time a touch operation is received, the number of touch points corresponding to the touch operation is determined, and then based on the number of touch points, it is determined whether the current touch operation is a non-knuckle operation, that is, whether the touch operation is filtered is determined based on the touch area. By generating a first identifier of a first value when it is determined that the touch operation is a non-knuckle operation that needs to be filtered, and otherwise generating a first identifier of a second value, when the electronic device receives an event corresponding to a touch operation, it can determine whether it is necessary to call the knuckle recognition algorithm this time based on the value of the first identifier. For example, when the first identifier is the first value, the knuckle recognition algorithm is not called, thereby avoiding calling the knuckle recognition algorithm for each touch operation, thereby reducing the occupation of system resources and lowering the system load.

[0020] In addition, since the number of times the knuckle recognition algorithm is called is greatly reduced, the risk of misrecognition causing the screen interface to display a sliding trajectory is also reduced.

[0021] According to the first aspect, a first identifier is generated based on the number of touch points, including: when the number of touch points is greater than a preset number, a first identifier of a first value is generated; when the number of touch points is equal to the preset number, a first identifier of a second value is generated; when the number of touch points is less than the preset number, a first identifier is generated based on the capacitance data corresponding to the first touch operation.

[0022] The preset number is determined according to the number of knuckles required by the knuckle function supported by the electronic device, and may specifically be the maximum number of knuckles required by the knuckle function.

[0023] The capacitance data is capacitance data collected by a touch sensor in a touch screen of an electronic device, such as a TP IC, in a capacitance sampling mode.

[0024] The capacitance data used to determine whether the first operation is a non-knuckle operation can be the original capacitance data collected by the TP IC, that is, the capacitance data processed by the THP algorithm / module, or the target capacitance data processed by the THP algorithm / module.

[0025] Therefore, each time a touch operation is received, the number of touch points corresponding to the touch operation is first compared with the preset number, and then whether the current touch operation is a non-knuckle operation is determined based on the comparison result, so that non-knuckle operations can be quickly excluded.

[0026] In addition, for touch operations that cannot be sorted out based on the number of touch points, further judgment is performed based on the capacitance data corresponding to the touch operation, thereby taking into account both the processing speed and the accuracy of the processing results.

[0027] According to the first aspect, or any implementation of the first aspect above, a first identifier is generated based on the capacitance data corresponding to the first touch operation, including: obtaining original capacitance data corresponding to the first touch operation, where the original capacitance data is capacitance data that has not been processed using a touch processing algorithm; based on the touch processing algorithm, determining a pressure value corresponding to the first touch operation based on the original capacitance data; and generating the first identifier based on the pressure value.

[0028] The touch processing algorithm, namely the THP algorithm (module), is usually implemented by the application processor touch daemon (aptouch_daemon).

[0029] The raw capacitance data is collected by the TP IC and reported to the capacitance data cache in the touch screen driver (TP driver) for caching. It is then written to a dedicated capacitance processing node (such as the / dev / thp* node). The aptouch_daemon accesses the / dev / thp* node through the THP module to obtain the raw capacitance data for processing.

[0030] Because the knuckle function requires the user to tap the touch screen with a certain force using their knuckles to trigger it, the pressure applied to the touch screen is a factor in determining whether a touch operation is a knuckle operation. Therefore, if the number of touch points meets the knuckle operation criteria, the pressure factor is further considered. This allows for filtering out touch operations that do not meet the pressure factor, further reducing the frequency of calls to the knuckle recognition algorithm.

[0031] According to the first aspect, or any implementation method of the first aspect above, based on the touch processing algorithm, according to the original capacitance data, the pressure value corresponding to the first touch operation is determined, including: based on the touch processing algorithm, according to the original capacitance data, the touch center point of the first touch operation is determined, the touch center point is the point with the largest capacitance; the capacitance value of the touch center point and the capacitance values ​​of M area points adjacent to the touch center point are obtained from the original capacitance data, where M is an integer greater than 0; according to preset weights, the obtained M+9 capacitance values ​​are weighted summed; the weighted sum result is multiplied by a preset coefficient to obtain the pressure value corresponding to the first touch operation.

[0032] The touch center point can also be expressed as a peak point, that is, a point with the largest capacitance.

[0033] Here, M is, for example, 8, and M+1 is 9.

[0034] When M is 8, the 9 capacitance values ​​obtained can form a 3×3 two-dimensional capacitance value data matrix. Each capacitance value in the capacitance value data matrix can be recorded as V0, V1, V2, V3, V4, V5, V6, V7, and V8 from top to bottom. Among them, V4 is the touch center point (also referred to as the center point). In the specific implementation, the capacitance values ​​of the 9 points can be recorded as V i , where i∈[0,8].

[0035] Among them, the weight can be expressed as k i .

[0036] Among them, the coefficient can be expressed as α.

[0037] The pressure value (Pressure) corresponding to the first touch operation or any other touch operation can be determined based on the following formula:

[0038] According to the first aspect, or any implementation method of the first aspect above, a first identifier is generated according to the pressure value, including: when the pressure value is greater than a preset pressure threshold, a first identifier of the first value is generated; when the pressure value is less than or equal to the preset pressure threshold, determining whether the capacity data corresponding to the first operation is valid; when the capacity data is valid, a first identifier of the second value is generated; when the capacity data is invalid, a first identifier of the first value is generated.

[0039] The preset pressure threshold can be determined based on the minimum pressure value required for the electronic device to touch the knuckles, for example, it can be set to 600.

[0040] Therefore, only when the pressure value of a touch operation is less than or equal to the preset pressure threshold is the touch operation considered as a possible knuckle operation. When the pressure value is greater than the preset pressure threshold, the touch operation is directly considered not to be a knuckle operation. Therefore, based on the corresponding pressure value of the touch screen operation, touch operations that are unlikely to be knuckle operations are further filtered out, further reducing the frequency of calling the knuckle recognition algorithm and reducing system load.

[0041] According to the first aspect, or any implementation method of the first aspect above, determining whether the capacitance data corresponding to the first operation is valid includes: based on the touch processing algorithm, determining the touch center point of the first touch operation according to the original capacitance data, the touch center point being the point with the largest capacitance; determining the distance between the touch center point and the edge of the current screen of the electronic device according to the preset dimension N; wherein N is an odd number; determining whether the touch center point is located at the edge of the current screen of the electronic device according to the coordinates, distance and maximum pixel of the current screen of the electronic device; when the touch center point is not located at the edge of the current screen of the electronic device, determining that the capacitance data corresponding to the first operation is valid; when the touch center point is located at the edge of the current screen of the electronic device, determining that the capacitance data corresponding to the first operation is invalid.

[0042] Since knuckle manipulation typically occurs in the center of an electronic device's screen, touch operations on the edges are typically sliding. Therefore, by determining whether the center of a touch operation is located at the edge of the electronic device's screen, non-touch operations such as sliding can be filtered out. This further reduces the frequency of calls to the knuckle recognition algorithm and reduces system load.

[0043] According to the first aspect, or any implementation of the first aspect above, based on the following formula, the distance between the touch center point and the current screen edge of the electronic device is determined according to the preset dimension N: Dis = (N+1) / 2-2

[0044] Wherein, Dis is the distance between the touch center point and the edge of the current screen of the electronic device, and N is an odd number determined according to the dimension of the target capacitance data expected to be extracted from the original capacitance data.

[0045] According to the first aspect, or any implementation of the first aspect above, determining whether the touch center point is located at the edge of the current screen of the electronic device based on the coordinates of the touch center point, the distance, and the maximum pixel of the current screen of the electronic device includes: determining an X-edge coordinate value of the X-axis and a Y-edge coordinate value of the Y-axis based on the distance and the maximum pixel; determining whether the X coordinate value of the touch center point on the X-axis is less than the distance, or determining whether the X coordinate value is greater than the X-edge coordinate value; determining whether the Y coordinate value of the touch center point on the Y-axis is less than the distance, or determining whether the Y coordinate value is greater than the Y-edge coordinate value; when the X coordinate value is less than the distance, or greater than the X-edge coordinate value, and the Y coordinate value is less than the distance, or greater than the Y-edge coordinate value, determining that the touch center point is not located at the edge of the current screen of the electronic device; otherwise, determining that the touch center point is located at the edge of the current screen of the electronic device.

[0046] Only when the X- and Y-axis coordinates of the touch center point do not fall on the edge of the screen is the touch determined to be a possible knuckle operation, and the knuckle recognition algorithm is considered for identification and processing. Touches that fall on the edge of the screen are directly identified as sliding operations and filtered out without calling the knuckle recognition algorithm. This allows touch operations in specific scenarios to be directly filtered out as non-knuckle operations, further reducing the frequency of calling the knuckle recognition algorithm and reducing system load.

[0047] Furthermore, since the validity of the capacitance data is determined directly based on the original capacitance data, there is no need to first extract the target capacitance data from the original capacitance data, thereby reducing the time and resources required for processing.

[0048] According to the first aspect, or any implementation of the first aspect above, the X-axis edge coordinate value and the Y-axis edge coordinate value are determined based on the distance and the maximum pixel based on the following formula: X-edge coordinate value = curResolution.x-Dis-1 Y-edge coordinate value = curResolution.y-Dis-1

[0049] Wherein, curResolution.x is the maximum pixel of the X-axis, curResolution.y is the maximum pixel of the Y-axis, and Dis is the distance between the touch center point and the current screen edge of the electronic device.

[0050] According to the first aspect, or any implementation of the first aspect above, determining whether the capacitance data corresponding to the first operation is valid includes: extracting capacitance data from original capacitance data based on a touch processing algorithm, and constructing a first capacitance matrix, where the first capacitance matrix is ​​an N×N target capacitance matrix without zero padded, where N is an odd number; when the number of pixels in the first capacitance matrix is ​​less than or equal to a preset number of pixels, determining that the capacitance data corresponding to the first operation is invalid; when the number of pixels in the first capacitance matrix is ​​greater than the preset number of pixels, determining that the capacitance data corresponding to the first operation is valid.

[0051] The preset number of pixels is related to the dimension of the target capacity matrix.

[0052] By comparing the number of pixels in the first capacitance matrix not padded with zeros with the preset number of pixels, a quick judgment on the validity of the capacitance data is achieved.

[0053] Furthermore, since the validity of the capacitance data is determined directly based on the original capacitance data, there is no need to first extract the target capacitance data from the original capacitance data, thereby reducing the time and resources required for processing.

[0054] According to the first aspect, or any implementation of the first aspect above, the preset number of pixels is determined based on the following formula: preset number of pixels = N*(N-2).

[0055] According to the first aspect, or any implementation of the first aspect above, determining whether the capacitance value data corresponding to the first operation is valid includes: extracting capacitance value data from original capacitance value data based on a touch processing algorithm, constructing a first capacitance value matrix, where the first capacitance value matrix is ​​an N×N target capacitance value matrix without zero-padded, where N is an odd number; when the first capacitance value matrix is ​​not an N×N capacitance value matrix, padding the first capacitance value matrix with zeros to obtain an N×N target capacitance value matrix; obtaining capacitance values ​​of two vertices on a diagonal line in the target capacitance value matrix; and determining whether the capacitance value data corresponding to the first operation is valid based on the capacitance values ​​of the two vertices on the diagonal line.

[0056] Therefore, whether the target capacity data is valid can be quickly determined based on the vertex values ​​of a group of vertices on the diagonal line without paying attention to the capacity values ​​at other positions, which not only improves the processing speed but also reduces the occupation of system resources.

[0057] According to the first aspect, or any implementation of the first aspect above, obtaining the capacity values ​​of two vertices on the diagonal of the target capacity matrix includes: obtaining the capacity value of the upper left vertex and the capacity value of the lower right vertex of the target capacity matrix; or obtaining the capacity value of the upper right vertex and the capacity value of the lower left vertex of the target capacity matrix.

[0058] According to the first aspect, or any implementation method of the first aspect above, determining whether the capacity data corresponding to the first operation is valid based on the capacity values ​​of the two vertices on the diagonal includes: determining whether the capacity values ​​of the two vertices on the diagonal are both valid capacity values; when the capacity values ​​of the two vertices on the diagonal are both valid values, determining that the capacity data corresponding to the first operation is valid.

[0059] According to the first aspect, or any implementation method of the first aspect above, the vertices in the target matrix include the edge corner point of the target matrix and the next vertex along the diagonal of the edge corner point; determining whether the capacity values ​​of the two vertices on the diagonal are both valid capacity values, including: determining whether the two capacity values ​​in each vertex on the diagonal have non-zero values; when both vertices on the diagonal have non-zero values, determining that the capacity value data corresponding to the first operation is valid.

[0060] According to the first aspect, or any implementation of the first aspect above, the preset number, ie, TouchNum, is 2.

[0061] For example, consider knuckle manipulation, which is categorized into single-knuckle manipulation and double-knuckle manipulation. A single-knuckle manipulation corresponds to 1 touch point, while a double-knuckle manipulation corresponds to 2 touch points. Therefore, as a possible implementation, the preset number can be set to 2. That is, scenarios with more than 2 touch points can be determined not to be knuckle manipulation scenarios.

[0062] According to the first aspect, or any implementation of the first aspect above, after the electronic device calls the finger joint recognition algorithm to identify and process the first touch operation, the method also includes: when it is determined that the first touch operation is a finger joint operation, setting the time corresponding to the first touch operation to the system time when the first touch operation is received; when it is determined that the first touch operation is not a finger joint operation, setting the time corresponding to the first touch operation to a default invalid value.

[0063] The default invalid value may be set to -1, for example.

[0064] According to the first aspect, or any implementation of the first aspect above, the method also includes: when receiving the user's second touch operation, determining whether the time corresponding to the first touch operation is a default invalid value; when the time corresponding to the first touch operation is not the default invalid value, determining the time interval between the two touch operations based on the system time when the second touch operation is received and the time corresponding to the first touch operation; when the time interval is less than the preset time interval threshold, setting the time corresponding to the first touch operation to the default invalid value, setting the time corresponding to the second touch operation to the system time when the second touch operation is received, and calling the finger joint recognition algorithm to identify and process the second touch operation; otherwise, generating a second identifier corresponding to the second touch operation based on the number of touch points and / or capacitance data corresponding to the second touch operation, the second identifier is used to indicate whether to skip calling the finger joint recognition algorithm; when the second identifier is the first value, the electronic device does not call the finger joint recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the default invalid value; when the second identifier is the second value, the electronic device calls the finger joint recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the system time when the second touch operation is received.

[0065] Therefore, for two consecutive touch operations, when the first touch operation meets the three elements of knuckle operation, namely, the number of touch points (TouchNum), pressure value (Pressure), and valid capacitance value (IsCapValid()), the filtering threshold of the second touch operation that occurs immediately thereafter is lowered, that is, the above three elements are not used for filtering, but the time interval between the two touch operations is directly considered, thereby avoiding filtering out knuckle operations with non-standard movements, and at the same time filtering out non-knuckle operations that do not meet the requirements, which not only ensures the user operation experience but also reduces the frequency of calling the knuckle recognition algorithm.

[0066] According to the first aspect, or any implementation of the first aspect above, the method also includes: when the time corresponding to the first touch operation is a default invalid value, generating a second identifier corresponding to the second touch operation based on the number of touch points and / or capacitance data corresponding to the second touch operation; when the second identifier is the first value, the electronic device does not call the finger joint recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the default invalid value; when the second identifier is the second value, the electronic device calls the finger joint recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the system time when the second touch operation is received.

[0067] According to the first aspect, or any implementation method of the first aspect above, when the first touch operation is a non-finger joint operation, the first touch operation is filtered, that is, the value of the first identifier corresponding to the first touch operation is a first indication, and the electronic device calls the finger joint recognition algorithm to identify and process the first touch operation, including: when the first identifier is a first value, the target capacitance data extracted from the original capacitance data corresponding to the first touch operation is not sent to the touch screen driver, and the coordinate data extracted from the original capacitance data corresponding to the first touch operation and the generated first identifier are sent to the touch screen driver; the touch screen driver generates an input event of the first touch operation based on the first identifier and the coordinate data, and reports the input event to the input event framework; the event reading module in the input event frame reads the value of the first identifier in the input event; when the first identifier is the first value, the event reading module does not notify the finger joint module to call the finger joint recognition algorithm to identify and process the first touch operation; when the first identifier is a second value, the event reading module notifies the finger joint module in the input event frame to call the finger joint recognition algorithm to identify and process the first touch operation.

[0068] That is, the steps in the branch corresponding to step 103.1 in Figure 4B are not executed, and only steps 103.2 and thereafter are executed. Whether to execute steps 115 and 116 depends on the value of the first identifier.

[0069] According to the first aspect, or any implementation of the first aspect above, the first identifier is a field in a bitmap format with a length of 32 bits; wherein the first value and the second value are recorded in the 0th bit of the first identifier in an alternative form.

[0070] According to the first aspect, or any implementation of the first aspect above, the method also includes: when receiving the first touch operation, obtaining the height value of the input method hot zone and the state of the current screen of the electronic device, the height value includes the coordinate value corresponding to the upper edge of the input method hot zone and the coordinate corresponding to the lower edge, the state includes the vertical screen state and the horizontal screen state, the input method hot zone is the distribution area of ​​the keyboard corresponding to the input method in the interface currently displayed by the electronic device; when the state is the horizontal screen state, converting the height value to the coordinate system corresponding to the vertical screen state; performing resolution conversion on the height value in the coordinate system corresponding to the vertical screen state to obtain the target height value; determining the area of ​​the input method hot zone on the current screen of the electronic device according to the state and the target height value; when the touch point coordinates of the first touch operation fall in the area of ​​the input method hot zone on the current screen of the electronic device, determining that the first touch operation is a non-finger joint operation; otherwise, determining that the first touch operation is not a non-finger joint operation.

[0071] Among them, the coordinate value corresponding to the upper edge of the input method hot zone in the height value can be expressed as Top, and the coordinate value corresponding to the lower edge can be expressed as Bottom.

[0072] Among them, the horizontal screen state may include 90° horizontal screen and 270° horizontal screen (distinguished by the position of the power button on the side frame of the electronic device).

[0073] For a horizontal screen of 90°, the top before coordinate conversion can be expressed as srcTopY, and the bottom as srcBottomY; the top after conversion can be expressed as targetRightX, and the bottom can be expressed as targetLeftX.

[0074] Regarding the conversion from srcTopY to targetRightX in horizontal screen at 90°, it can be achieved according to the formula targetRightX=currentResolution.Y-srcTopY; the conversion from srcBottomY to targetLeftX can be achieved according to the formula targetLeftX=currentResolution.Y-srcBottomY.

[0075] For a horizontal screen of 270°, the top before coordinate conversion can be expressed as srcTopY, and the bottom as srcBottomY; the top after conversion can be expressed as targetLeftX, and the bottom can be expressed as targetRightX.

[0076] Regarding the conversion from srcTopY to targetLeftX in horizontal screen 270°, it can be achieved according to the formula targetLeftX=srcTopY; the conversion from srcBottomY to targetRightX can be achieved according to the formula targetRightX=srcBottomY.

[0077] The resolution conversion is specifically from low resolution to high resolution. It can be implemented according to the following formula: int xTarget = (int)((float)xSrc*maxResolution.x / currentResolution.x+0.5) int yTarget = (int)((float)ySrc*maxResolution.y / currentResolution.y+0.5)

[0078] Where xTarget and yTarget are the target X-axis coordinate values ​​and target Y-axis coordinate values ​​after conversion, xSrc and ySrc are the original X-axis coordinate values ​​and original Y-axis coordinate values ​​before conversion, i.e., Top, Bottom, etc. mentioned above, maxResolution is the maximum resolution, and currentResolution is the current resolution.

[0079] In a second aspect, the present application provides a method for processing touch operations. The method, applied to an electronic device, comprises: receiving a first operation from a user; in response to the first operation, presenting a first interface of a first application, the first interface comprising a first area and a second area, the first area being the area where a keyboard corresponding to an input method is distributed within the first interface; receiving a second operation from a user in the first area; in response to the second operation, presenting the user's input information in the first area; wherein, upon receiving the second operation, the knuckle recognition algorithm is not invoked to recognize and process the second operation.

[0080] Among them, the first application can be any application that can call the input method and display the keyboard corresponding to the input method, such as a notepad application, an instant messaging application, etc., which are not listed here one by one and this application does not impose any restrictions on this.

[0081] The first interface is, for example, a chat interface of an instant messaging application.

[0082] Among them, the first area, namely the input method hot zone mentioned in the following embodiments, is the distribution area of ​​the keyboard shown in Figures 19 to 22.

[0083] The second area may be an area for displaying content, such as an area for displaying chat content, recorded notes, etc. In practical applications, it can be understood as an area in the first interface excluding the first area.

[0084] The first operation is, for example, a click operation on the first application.

[0085] The second operation is the same as the first touch operation described in the first aspect and any one of the implementations of the first aspect, and can be regarded as any touch operation performed by the user on the touch screen of the electronic device.

[0086] In response to the second operation, the user's input information is displayed in the first area, for example, the character touched by the second operation is displayed in the input box of the keyboard.

[0087] Therefore, for touch operations occurring in the input method hot zone, unnecessary redundant actions are reduced and the system load is lowered by preventing the background program from calling the knuckle recognition algorithm.

[0088] According to the second aspect, the method further includes: receiving a third operation of the user in the second area; calling a knuckle recognition algorithm to recognize the third operation, and obtaining a recognition result of the third operation.

[0089] The third operation may also be any touch operation performed by the user on the touch screen of the electronic device.

[0090] In this way, by setting the touch operation to occur in a non-input method hot zone, the call recognition process of the knuckle recognition algorithm is performed normally, thereby avoiding missing knuckle operations and ensuring timely response to the knuckle operations made by the user.

[0091] According to the second aspect, or any implementation of the above second aspect, when the recognition result of the third operation is a screenshot operation, a screenshot of the first interface is performed; when the recognition result of the third operation is a screen recording operation, the first interface is recorded.

[0092] Among them, when the recognition result indicates that the third operation is a single finger joint double-click operation as shown in (1) in Figure 1A, the electronic device will take a full-screen screenshot of the first interface in response to the third operation.

[0093] Among them, when the recognition result indicates that the third operation is a circle drawing operation after clicking with a single finger joint as shown in (1) in Figure 1B, the electronic device will take a screenshot of the circled area in the first interface in response to the third operation.

[0094] Among them, when the recognition result indicates that the third operation is the operation of drawing an S after clicking a single finger joint as shown in (2) in Figure 1B, the electronic device will take a scrolling screenshot of the first interface in response to the third operation.

[0095] Among them, when the recognition result indicates that the third operation is a double-knuckle double-click operation as shown in (2) in Figure 1A, the electronic device will record the first interface in response to the third operation.

[0096] According to the second aspect, or any implementation of the second aspect above, the method also includes: receiving a fourth operation of the user; in response to the fourth operation, switching the first interface to the second interface, the second interface does not include the first area; receiving a fifth operation of the user on the second interface; calling the knuckle recognition algorithm to identify the fifth operation, and obtaining a recognition result of the fifth operation.

[0097] The fifth operation may also be any touch operation performed by the user on the touch screen of the electronic device.

[0098] The recognition result may be the recognition result of the third operation in the second aspect described above.

[0099] In this way, by setting the touch operation to occur in the interface that does not include the input method hot zone, the call recognition process of the knuckle recognition algorithm is performed normally, thereby avoiding missing knuckle operations and ensuring timely response to the knuckle operations made by the user.

[0100] According to the second aspect, or any implementation method of the above second aspect, the finger joint recognition algorithm is called to identify and process the received operation, including: determining the value of the first identifier corresponding to the received operation, the first identifier is used to indicate whether to skip calling the finger joint recognition algorithm; when the first identifier is a first value, the finger joint recognition algorithm is not called to identify and process the received operation; when the first identifier is a second value, the finger joint recognition algorithm is called to identify and process the received operation.

[0101] Among them, the electronic device calls the knuckle recognition algorithm to identify and process the received operations, and the identified and processed operations are the above-mentioned operations that do not occur in the input method hot zone, such as the third operation, the fifth operation, etc.

[0102] The first identifier is the same as the first identifier and the second identifier mentioned in the first aspect and any one of the implementations of the first aspect, and is specifically the Bitmap field mentioned in the following embodiments.

[0103] The first value is, for example, "0" recorded at the 0th bit in the Bitmap field, and the second value is, for example, "1" recorded at the 0th bit in the Bitmap field.

[0104] In this way, when the received operation does not act on the input method hot zone, it is further determined whether to call the knuckle recognition algorithm based on the value of the first identifier corresponding to the current operation, thereby further reducing unnecessary redundant actions and reducing system load.

[0105] In a third aspect, the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor being coupled; the memory storing program instructions, which, when executed by the processor, cause the electronic device to execute the instructions of the method in the first aspect or any possible implementation of the first aspect.

[0106] The implementation of the third aspect corresponds to the first aspect and any one of the implementations of the first aspect. The technical effects corresponding to the implementation of the third aspect can be found in the technical effects corresponding to the first aspect and any one of the implementations of the first aspect, as well as the technical effects corresponding to the second aspect and any one of the implementations of the second aspect, and will not be repeated here.

[0107] In a fourth aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0108] The implementation of the fourth aspect corresponds to the first aspect and any one of the implementations of the first aspect. The technical effects corresponding to the implementation of the fourth aspect can be found in the technical effects corresponding to the first aspect and any one of the implementations of the first aspect, as well as the technical effects corresponding to the second aspect and any one of the implementations of the second aspect, and will not be repeated here.

[0109] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the instructions of the method in the first aspect or any possible implementation of the first aspect.

[0110] The implementation of the fifth aspect corresponds to the first aspect and any one of the implementations of the first aspect. The technical effects corresponding to the implementation of the fifth aspect can be found in the technical effects corresponding to the first aspect and any one of the implementations of the first aspect, as well as the technical effects corresponding to the second aspect and any one of the implementations of the second aspect, and will not be repeated here.

[0111] In a sixth aspect, the present application provides a chip system comprising a processor and a memory, wherein the memory stores program instructions. When the program instructions are executed by the processor, the chip system executes the instructions of the method in the first aspect or any possible implementation of the first aspect.

[0112] The implementation of the sixth aspect corresponds to the first aspect and any one of the implementations of the first aspect. The technical effects corresponding to the implementation of the sixth aspect can be found in the technical effects corresponding to the first aspect and any one of the implementations of the first aspect, as well as the technical effects corresponding to the second aspect and any one of the implementations of the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] FIG1A is a schematic diagram of a scenario in which a user performs knuckle manipulation according to an embodiment of the present application;

[0114] FIG1B is a schematic diagram of another scenario of a user performing knuckle manipulation according to an embodiment of the present application;

[0115] FIG2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0116] FIG3 is a schematic diagram of the appearance of an electronic device provided in an embodiment of the present application;

[0117] FIG4A is a schematic diagram of the software structure of an electronic device supporting the invocation of a knuckle recognition algorithm provided by an embodiment of the present application;

[0118] FIG4B is a schematic diagram of the interaction between the functional modules in the software and hardware structures during the process of calling a knuckle recognition algorithm provided by an embodiment of the present application;

[0119] FIG5 is a schematic diagram of the software structure of an electronic device that implements a method for processing touch operations provided by an embodiment of the present application;

[0120] FIG6 is a schematic diagram of determining a pressure value according to a capacitance value generated by a touch screen according to an embodiment of the present application;

[0121] FIG7 is a schematic diagram of parameters determined according to capacitance generated by a touch screen according to an embodiment of the present application;

[0122] FIG8 is a schematic diagram of capacitance data corresponding to sliding touch screen operations from the top, bottom, left, and right edges of the touch screen of an electronic device provided by an embodiment of the present application;

[0123] FIG9 is a schematic diagram of a filtering process for non-knuckle operations in a single touch screen operation provided by an embodiment of the present application;

[0124] FIG10 is a schematic diagram of the vertices of the four corners in a 7×7 capacitance matrix provided in an embodiment of the present application;

[0125] FIG11 is a schematic diagram of determining whether a capacitance value is valid based on the vertex values ​​of the four corners specified in a 7×7 capacitance value matrix according to an embodiment of the present application;

[0126] FIG12 is a schematic diagram of determining whether a capacitance value is valid based on the vertex values ​​of the four corners specified in a 7×7 capacitance value matrix according to an embodiment of the present application;

[0127] FIG13 is a schematic diagram of the distance between the peak point and the boundaries of two columns of 0 provided in an embodiment of the present application;

[0128] FIG14 is a schematic diagram of determining whether a touch screen operation is an edge touch operation according to the interval to which the peak point coordinates belong, provided by an embodiment of the present application;

[0129] FIG15 is a schematic diagram of a filtering process for non-knuckle operations in two consecutive touch screen operations provided by an embodiment of the present application;

[0130] FIG16 is a schematic diagram of a newly added field for indicating whether the current touch screen operation needs to be filtered, provided in an embodiment of the present application;

[0131] FIG17 is a schematic diagram of a filtering process for implementing non-knuckle operations based on the newly added fields in FIG16 according to an embodiment of the present application;

[0132] FIG18 is a schematic diagram of a filtering process for non-knuckle operations when a touch screen operation occurs in an input method hot zone, provided by an embodiment of the present application;

[0133] FIG19 is a schematic diagram of obtaining the original height value of the input method hot zone according to an embodiment of the present application;

[0134] FIG20 is a schematic diagram illustrating differentiating between 90° and 270° rotations of an electronic device display interface according to an embodiment of the present application;

[0135] FIG21 is a schematic diagram of the coordinates of the input method hot zone after the horizontal screen is converted 90° to the vertical screen according to an embodiment of the present application;

[0136] FIG22 is a coordinate diagram of the input method hot zone after converting the horizontal screen 270° to the vertical screen provided in an embodiment of the present application. DETAILED DESCRIPTION

[0137] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0138] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0139] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.

[0140] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0141] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.

[0142] At present, in order to facilitate user operations and improve user experience, more and more electronic devices support shortcut functions based on knuckle operations (hereinafter referred to as: knuckle functions).

[0143] For example, in some possible implementations, as shown in FIG1A (1), after the knuckle function is turned on, the user can quickly double-click a single knuckle to take a full-screen screenshot. That is, the user can use a single knuckle to exert a little force and quickly double-click the touch screen of the electronic device to capture the current screen interface.

[0144] For example, in some other possible implementations, as shown in (2) in FIG1A , after the knuckle function is turned on, the user can quickly double-click with two knuckles to record the screen. That is, the user can use two knuckles to exert a little force and quickly double-click the touch screen of the electronic device to start the screen recording tool and then record the current screen interface.

[0145] For example, in some other possible implementations, as shown in FIG1B (1), after the knuckle function is turned on, the user can tap and circle the touch screen with a single knuckle to achieve a partial screenshot. That is, the user uses a single knuckle to slightly exert force, clicks the touch screen of the electronic device, and then circles, and the screen interface within the circled area can be captured.

[0146] For example, in some other possible implementations, as shown in (2) in FIG1B , after the knuckle function is turned on, the user can tap the touch screen with a single knuckle and draw an S to achieve scrolling screenshots. That is, the user can use a single knuckle to slightly exert force, click the touch screen of the electronic device, and then draw an S to scroll the current screen interface and take a screenshot.

[0147] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. In specific implementations, if there are other knuckle functions implemented based on knuckle operations, they are also applicable to the technical solution provided in the embodiment of this application.

[0148] It should be noted that in order to realize the various knuckle functions mentioned above, after the knuckle function is turned on, the electronic device will trigger the knuckle recognition algorithm to determine whether the touch screen operation is a knuckle operation every time it detects a touch screen operation, so as to meet the user's demand for the use of the knuckle function at any time.

[0149] However, the vast majority of user touchscreen operations are not intended to utilize knuckle functions, meaning knuckle functions are a low-probability operation. However, in order to accurately respond to each user's request for knuckle functions, electronic devices must invoke a knuckle recognition algorithm for each touchscreen operation to determine whether it is a knuckle operation, or a knuckle touch event.

[0150] Therefore, the current practice of calling the knuckle recognition algorithm for each touch screen operation will seriously increase the basic load of the system, and will also increase the risk of the knuckles displaying sliding trajectories due to misidentification. For example, a normal sliding operation may be identified as a knuckle operation as shown in (1) or (2) in Figure 1B, and the motion trajectory of the sliding operation will be displayed on the current screen interface, affecting the user experience.

[0151] In view of this, the present application provides a filtering solution for non-finger joint operations based on the characteristics and usage scenarios of user touch screen operations, aiming to judge each touch operation to identify non-finger joint operations under specific touch screen operation characteristics and usage scenarios, and filter these identified non-finger joint operations (i.e., not calling the finger joint recognition algorithm), thereby reducing the call to the finger joint recognition algorithm, thereby reducing the basic load of the system and the occurrence of misidentification.

[0152] In order to facilitate understanding of the finger joint operations and non-fingered joint operations mentioned in the embodiments of the present application, a detailed description is given below.

[0153] Specifically, in the technical solutions provided in the embodiments of this application, the so-called knuckle operation refers to the touch operation shown in Figures 1A and 1B, that is, the touch screen is touched by the knuckles of the fingers, thereby causing the electronic device to respond accordingly. The so-called non-knuckle operation refers to the touch operation other than the knuckle operation shown in Figures 1A and 1B, such as the sliding operation and clicking operation on the touch screen using the pads of the fingers.

[0154] In order to better understand the technical solutions provided by the embodiments of the present application, before describing the technical solutions of the embodiments of the present application, the hardware structure of the electronic devices to which the embodiments of the present application are applicable and the appearance of some electronic devices are first described in conjunction with the accompanying drawings.

[0155] The filtering scheme for non-knuckle operations provided in the embodiments of the present application is applicable to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, laptop computers, and other electronic devices with touch screens. These examples are not listed here one by one, and the embodiments of the present application do not impose any restrictions on the specific types of electronic devices. For ease of explanation, Figure 2 uses a mobile phone as an example for illustration.

[0156] 2 , 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 (including: a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, etc.), 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.

[0157] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (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 smart sensor hub (SensorHub), etc., which are not listed one by one here and this application does not limit this.

[0158] The application processor mentioned above is used to output sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or to display images or videos through the display screen 194, or to recognize and process touch operations, etc.

[0159] Furthermore, it should be noted that regarding the processor 110 including the aforementioned processing units, in some implementations, the different processing units may be independent devices. That is, each processing unit may be considered a processor. In other implementations, the different processing units may also be integrated into one or more processors.

[0160] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0161] In addition, in some implementations, the processor 110 may further include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. These interfaces are not listed here one by one and are not limited in this application.

[0162] In addition, processor 110 may also include a memory for storing instructions and data. In some implementations, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces processor 110 latency, and thus improves system efficiency.

[0163] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music, videos, screenshots based on knuckle manipulation, and recorded screen data can be stored on the external memory card.

[0164] Among them, the internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, and the finger joint function mentioned in the embodiment of the present application, etc.). The data storage area can store data created during the use of the electronic device 100 (such as screen data captured and recorded based on finger joint operations), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0165] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging implementations, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0166] Among them, the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other implementations, the power management module 141 can also be set in the processor 110. In other implementations, the power management module 141 and the charging management module 140 can also be set in the same device.

[0167] 2 , illustratively, the wireless communication function of the electronic device 100 may be implemented through antenna 1 , antenna 2 , mobile communication module 150 , wireless communication module 160 , a modem processor, and a baseband processor.

[0168] 2 , illustratively, the mobile communication module 150 may provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The wireless communication module 160 may provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., applied to the electronic device 100.

[0169] Among them, the button 190 may include a power button / power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The electronic device 100 can receive key input and generate signal input related to the user settings and function control of the electronic device 100. Specifically, in the technical solution provided in the embodiment of the present application, the degree of rotation of the electronic device 100 can be identified according to the case, such as the position of the power button / power button (Power button). For details, please refer to the description of the embodiment shown in Figure 20, which will not be repeated here.

[0170] Among them, the motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0171] The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0172] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0173] In addition, regarding the sensor module 180 integrated in the electronic device 100, in some implementations, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and are not limited in this application.

[0174] Specifically, in the technical solution provided in the embodiments of this application, the sensor module 180 must include at least a touch sensor capable of sensing touch operations and a motion sensor capable of sensing motion data generated during touch operations, such as an acceleration transducer (ACC), a gyroscope, and a geomagnetic sensor. For ease of explanation, this embodiment uses an ACC as the motion sensor and ACC as the motion data generated.

[0175] For example, in some implementations, the touch sensor is, for example, a touch panel integrated circuit (TP IC). This can be integrated into the display screen 194. This type of display screen 194 can be described as a touch panel / touch screen (TP). For ease of description, it will be referred to as a touch screen below.

[0176] Regarding the role of the TP IC and ACC device in the electronic device 100 in the filtering solution for non-knuckle operations provided in this embodiment, as well as the interaction with other functional modules, please refer to the following description of the embodiment shown in Figure 4A for details, which will not be repeated here.

[0177] This concludes the introduction to the hardware structure of the electronic device 100. It should be understood that the electronic device 100 shown in FIG2 is merely an example. In a specific implementation, the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration. The various components shown in FIG2 may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0178] In addition, it should be noted that the electronic device 100, such as a mobile phone, with respect to the hardware structure shown in FIG2 may be viewed from the outside as the mobile phone 100 shown in FIG3. For example, as a possible implementation, the button 190 (specifically the power button) may be located on the side frame of the mobile phone 100.

[0179] Referring to (1) in FIG3 , for example, as a possible implementation, the power button can be located on the right side frame of the display screen (when viewed from the rear shell, as shown in (2) in FIG3 , it is located on the left side frame of the rear shell).

[0180] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0181] 2 , the software structure of the electronic device 100 is described below. Before describing the software structure of the electronic device 100 , the architecture that the software system of the electronic device 100 can adopt is first described.

[0182] Specifically, in actual applications, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.

[0183] In addition, it is understandable that the software systems used by current mainstream electronic devices include but are not limited to Windows systems, Android systems, and iOS systems. For ease of explanation, the embodiment of the present application takes the layered architecture Android system as an example to exemplify the software structure of the electronic device 100.

[0184] In addition, the subsequent filtering solution for non-knuckle operations provided in the embodiments of this application is also applicable to other systems in specific implementations.

[0185] 4A , which is a block diagram of the software structure capable of recognizing knuckle operations in the current electronic device 100 .

[0186] As shown in Figure 4A, the layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some implementations, the Android system is divided into five layers, from top to bottom: the Applications (APP) layer, the Application Framework (FWK) layer (which can be understood as the system service framework), the Android runtime (Android runtime) and system library (i.e., the local framework and runtime environment, also known as the Native layer), the Hardware Abstraction Layer (HAL) and the Kernel layer.

[0187] In addition, it should be noted that in the technical solution for finger joint operation recognition, some operations are implemented on the AP side (application processor), and some operations are implemented on the low-power processor, which can also be called an intelligent sensor hub (SensorHub).

[0188] On the AP side, the overall system architecture can be divided into the five layers mentioned above. On the Sensor Hub side, its layered architecture, from top to bottom, can be the Sensor subsystem framework and the Sensor subsystem driver.

[0189] Among them, the APP layer can include a series of application packages. FWK provides application programming interface (API) and programming framework for applications in the APP layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. The Native layer provides some local services and commonly used system libraries. HAL is used to encapsulate hardware drivers and provide a unified interface to the upper-level framework. The Kernel layer is the kernel layer of the operating system, which includes various hardware drivers.

[0190] Continuing to refer to FIG. 4A , illustratively, for the AP side, each of the above five layers has a corresponding functional module.

[0191] Among them, the APP layer can include applications such as smart screenshots, system interface, and settings.

[0192] For example, in one possible implementation, operations such as turning on and off the finger joint function can be implemented through the function entry provided in the settings application.

[0193] For example, in another possible implementation, operations such as turning on and off the finger joint function can be implemented through the function entry provided in the pull-down notification bar.

[0194] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0195] For example, when the knuckle function is turned on, when the user performs knuckle operations, a screenshot can be taken through the smart screenshot application, and the motion trajectory can be displayed on the screen interface through the system interface application.

[0196] 4A , the FWK layer may include an input method module. Specifically, in actual applications, it may also include other functional modules, such as a window manager, a content provider, a view system, a phone manager, a resource manager, etc., which are not listed here one by one and are not limited in this application.

[0197] Continuing to refer to FIG4A , illustratively, the Native layer may include an input event module (Input module), wherein the Input module may include an event center (EventHub), an event reading module (InputReader), an event publishing module (InputDispatcher), and a knuckle module.

[0198] Among them, EventHub is an event collection and processing service. During the process of identifying knuckle operations, it can store the Input events reported by the TP driver.

[0199] Among them, InputReader is used to obtain the Input event generated by the touch screen from EventHub, and call the knuckle module to determine whether the current touch operation is a knuckle operation based on the knuckle recognition algorithm.

[0200] Among them, the knuckle module is also used to return the judgment result (knuckle recognition result) to the InputDispatcher. When the InputDispatcher determines that the current touch operation is a knuckle operation based on the knuckle recognition result, it will call the corresponding App, such as the smart screenshot application, system interface application, etc. to implement operations such as screenshot and screen recording, and feedback to the user.

[0201] 4A , illustratively, the HAL may include an application processor daemon module (aptouch_daemon), wherein the aptouch_daemon may include a touch host process module (THP module).

[0202] Among them, the THP module is used to process the capacitance data provided by the TP driver to obtain capacitance data in the form of a 7×7 matrix and coordinate data required for finger joint operation recognition.

[0203] Continuing to refer to FIG4A , illustratively, the Kernel layer may include TP driver and knuckle driver.

[0204] The TP driver can include multiple functional nodes, such as the capacity data cache for caching unprocessed capacity data (raw capacity data), the / dev / thp* node for storing raw capacity data, the capacity node for storing capacity data in 7×7 matrix form, the coordinate node for storing coordinate data, and the / dev / input node for generating input events.

[0205] Among them, the knuckle drive may include an ACC data acquisition node.

[0206] Continuing to refer to FIG. 4A , illustratively, the aforementioned raw capacitance data is specifically collected by the capacitance sampling module in the TP IC and reported to the capacitance data cache in the TP driver.

[0207] Continuing to refer to FIG4A , for example, for the SensorHub side, in the scenario involving finger joint recognition, the main components involved are the Sensor subsystem framework, the functional modules driven by the Sensor subsystem, and hardware devices such as the ACC device.

[0208] Continuing to refer to FIG. 4A , illustratively, the Sensor subsystem driver may include an ACC driver.

[0209] The ACC driver may include an ACC data cache, which may be used to cache raw ACC data collected by an ACC data collection module in the ACC device.

[0210] It should be noted that since the knuckle driver and ACC driver are located on the AP and SernsorHub sides, respectively, their requirements for ACC data are different. Therefore, in order to enable interaction between these two drivers and transmit ACC data to the knuckle driver, a knuckle virtual sensor driver needs to be set up in the Sensor subsystem driver on the SernsorHub side.

[0211] The knuckle virtual sensor driver is used to process the original ACC data cached in the ACC driver into ACC data that meets the needs, such as 128 sets of ACC data.

[0212] Continuing to refer to FIG4A , illustratively, the Sensor subsystem framework may include a Sensor client manager.

[0213] In addition, it should be noted that since the AP and SensorHub can be two processors with different cores, in order to achieve communication between the AP and SensorHub, the AP side needs to have a function module / interface that supports establishing inter-core communication in the HAL, and the Sensor subsystem framework on the SensorHub side also needs to have a function module / interface that supports establishing inter-core communication.

[0214] In addition, it should be noted that different chip platforms provide different inter-core communication modules / interfaces. For ease of explanation, this embodiment uses the Qualcomm platform chip used in the electronic device as an example. The AP side and the Sensor Hub side support the establishment of an inter-core communication function module / interface, which can be the Qualcomm Messaging Interface (QMI).

[0215] In addition, it should be noted that in some possible implementations, the inter-core communication channel between the AP and SensorHub can be initiated by the AP. Therefore, the HAL on the AP side can also include an intelligent sensor hardware abstraction module (sensors-hal) for invoking the inter-core communication interface on the AP side and initiating inter-core communication.

[0216] This concludes the introduction to the software structure of the electronic device 100 that enables each touch operation to be performed by invoking a knuckle recognition algorithm to determine whether the touch operation is a knuckle operation. It should be understood that the layers in the software structure shown in FIG4A and the components contained in each layer do 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 layers than shown, and each layer may include more or fewer components, and this application does not impose any limitations thereon.

[0217] In order to better understand the filtering solution for non-knuckle operations provided in the embodiment of the present application, the following, in conjunction with Figure 4B, first describes the implementation process of calling the knuckle recognition algorithm to determine whether each touch operation is a knuckle operation each time a touch operation occurs.

[0218] Before explaining FIG4B , the arrows shown in FIG4B are first explained. Specifically, the solid black unidirectional arrows in FIG4B represent data channels, and the direction of the arrows represents the direction of data flow; the dashed black unidirectional arrows represent command channels, and the direction of the arrows represents the control direction, that is, the direction of command transmission; and the solid black bidirectional arrows represent bidirectional channels that can transmit both data and commands.

[0219] 4B , an exemplary implementation process of calling a knuckle recognition algorithm to determine whether each touch operation is a knuckle operation may include:

[0220] 101. When receiving any form of touch operation performed by the user on the touch screen, the TP IC generates capacitance data corresponding to the touch operation by capacitance sampling, and writes the generated capacitance data to the / dev / thp* node of the TP driver.

[0221] Among them, any form of touch operation can be a sliding operation, a click operation triggered by a finger, a single finger joint operation, a double finger joint operation, etc.

[0222] The process by which the TP IC generates capacitance data corresponding to a touch operation through capacitance sampling may specifically involve converting the electrical signal generated by the touch operation into a digital signal via a capacitance sampling module within the TP IC. In other words, the capacitance data referred to in the embodiments of the present application refers to the digital signal converted from the electrical signal generated by the touch operation.

[0223] Continuing with FIG4B , illustratively, when the capacitance data generated by the TP IC is written to the / dev / thp* node of the TP driver, the capacitance data cache in the TP driver is used. That is, after the TP IC generates the capacitance data, it first reports the capacitance data to the capacitance data cache of the TP driver, and then the TP driver writes the capacitance data in the capacitance data cache to the / dev / thp* node.

[0224] For ease of description, in this embodiment, the capacitance data generated by the capacitance sampling module is described as original capacitance data, and the capacitance data processed by the THP module is described as target capacitance data.

[0225] For example, in some possible implementations, in order to ensure that the THP module can extract target capacitance data and coordinate nodes that meet the requirements from the original capacitance data, the original capacitance data generated by the capacitance sampling module in the TP IC can be a digital signal converted from the electrical signal of the entire touch screen.

[0226] For example, in some other possible implementations, in order to reduce the amount of calculation and thus reduce the basic load on the system, the raw capacitance data generated by the capacitance sampling module in the TP IC can be a digital signal converted from the electrical signal of the local screen area corresponding to the touch operation.

[0227] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0228] 102. The THP module in aptouch_daemon reads raw capacity data from the / dev / thp* nodes of the TP driver.

[0229] For example, in one possible implementation, when the original capacitance data is a digital signal converted from the electrical signal of the entire touch screen, the THP module can only read the original capacitance data of the local screen area corresponding to the touch operation from the / dev / thp* node.

[0230] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0231] 103.1, the THP module processes the original capacitance value, converts the original capacitance value data into target capacitance value data of a 7×7 matrix, and writes the target capacitance value data into the capacitance value node driven by the TP.

[0232] The format of the target capacitance data of the 7×7 matrix can be shown as (1) to (4) in FIG8 .

[0233] It should be understood that the above description is merely an example for a better understanding of the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. In actual applications, the target capacity data can be matrices of other dimensions, such as 5×5, 9×9, etc., depending on business needs, and this application does not impose any restrictions on this. For ease of explanation, this embodiment of the application uses a 7×7 matrix as an example.

[0234] 103.2, the THP module processes the original capacitance data, extracts coordinate data from the original capacitance data, and writes the coordinate data into the coordinate node of the TP driver.

[0235] The coordinate data extracted from the original capacitance data includes, for example, the peak point of the touch operation, that is, the coordinates of the point corresponding to the maximum capacitance data when the touch operation acts on the touch screen.

[0236] 104. After the target capacitance value data is written into the capacitance value node, the TP driver sends the target capacitance value data in the capacitance value node to the finger joint module in the Input framework, so that the finger joint module obtains the ACC data collected by the ACC device through the ACC data acquisition node in the finger joint driver.

[0237] It should be noted that in order to enable the TP driver to proactively send the target capacity value data to the finger joint module when the target capacity value data is present in the capacity node, the finger joint module can proactively register a monitoring event with the TP driver after initialization. In this way, when the target capacity value data is written to the capacity node, the monitoring event will be promptly detected, thereby implementing the operation of step 104.

[0238] 105. When the finger joint module receives the target capacitance value data reported by the TP driver, it writes an ACC data acquisition request to the ACC data acquisition node in the finger joint driver.

[0239] 106 / 106', the knuckle driver initiates QMI inter-core communication through sensors-hal, establishes a QMI inter-core communication channel between the AP side and the SensorHub side, and realizes communication with the Sensor Client Manager on the SensorHub side.

[0240] 107. The Sensor Client Manager sends a request to obtain ACC data to the knuckle virtual Sensor driver.

[0241] 108. The knuckle virtual sensor driver sends a request to the ACC driver to obtain ACC data that meets the requirements according to the ACC data acquisition request.

[0242] 109. The ACC driver sends the original ACC data cached in the ACC data cache to the knuckle virtual sensor driver, and the knuckle virtual sensor driver processes the original ACC data into ACC data that meets the requirements of the knuckle module.

[0243] For the convenience of explanation, this embodiment describes the ACC data collected by the ACC data sampling module in the ACC device as raw ACC data, and describes the ACC data obtained by the Sensor client manager calling the knuckle virtual Sensor driver as target ACC data.

[0244] It should be noted that after the knuckle function is enabled, the ACC data sampling module in the ACC device will collect raw ACC data in real time or at a set period, and cache the collected raw ACC data in the ACC driver's ACC data cache. Then, upon receiving a request to obtain ACC data from the knuckle virtual sensor driver, the module will send the raw ACC data to the knuckle virtual sensor driver.

[0245] 110. The knuckle virtual sensor driver processes the original ACC data into target ACC data that meets the requirements of the knuckle module, and reports the obtained target ACC data to the sensor client manager.

[0246] It should be noted that in order to ensure that the target ACC data finally obtained by the knuckle module can be used for identifying knuckle operations while reducing the amount of calculation, the moment when the knuckle virtual sensor driver can receive the request to obtain ACC data is the time node, and the preset group of ACC data before the time node is obtained in the original ACC data as the target ACC data.

[0247] For example, in a possible implementation, the preset group of ACC data may be 128 groups of ACC data.

[0248] The preset group may be determined based on a sampling period or a refresh frequency of the original ACC data collected by the ACC data sampling module in the ACC device, and this application does not impose any limitation thereto.

[0249] 106 ′, the Sensor Client Manager reports the target ACC data to the ACC data acquisition node in the knuckle driver through the QMI inter-core communication channel.

[0250] 111. After acquiring target ACC data, the ACC data acquisition node in the knuckle driver reports the target ACC data to the knuckle module.

[0251] 112. The TP driver writes the coordinate data in the coordinate node to the / dev / input node and generates an Input event based on the coordinate data.

[0252] 113. The TP driver reports each Input event generated by touching the screen and the coordinate data it carries to the EventHub in the Input framework for further processing.

[0253] 114. The InputReader in the Input framework obtains the Input event and the coordinate data it carries from the EventHub.

[0254] 115. After receiving the Input event generated by the touch screen, the InputReader in the Input framework sends the coordinate data to the finger joint module.

[0255] 116. The knuckle module calls the knuckle recognition algorithm, analyzes and processes the received coordinate data, target capacitance data, and target ACC data, determines whether the current touch operation is a knuckle operation, and reports the determined knuckle recognition result to the InputReader.

[0256] Continuing with Figure 4B , in an exemplary implementation, steps 103.1, 104, 105, 106, 107-110, 106', and 111 are performed synchronously with steps 103.2, 112-115. Furthermore, steps 103.1 and 104 are processed faster than steps 103.2, 112-115, enabling the knuckle module to obtain the target ACC data before the Input event and its associated coordinate data arrive.

[0257] 117, InputReader forwards the knuckle recognition results obtained by the knuckle module to InputDispatcher, which publishes them.

[0258] 118. When the knuckle recognition result indicates that the touch operation is a knuckle operation, the InputDispatcher calls the corresponding App, such as the smart screenshot application and the system interface application (SystemUI.apk), to perform corresponding processing and feedback to the user.

[0259] In addition, it should be noted that in some possible implementation scenarios, for example, when there is an input method hot zone (expanded keyboard area) in the current screen interface, the user uses the keyboard to edit text. During this process, the electronic device will frequently recognize touch operations. At present, in order to avoid the operation of using the keyboard to edit text being interfered with by knuckle operations, the knuckle operations made in the input method hot zone will not make corresponding screenshots or screen recording responses. However, the bottom layer of the electronic device will still call the knuckle recognition algorithm to identify the knuckle operation every time a touch operation is sensed. That is, the input method module will execute step 119, such as notifying the THP module to process the currently obtained raw capacitance data, and send the current status information of the input method, such as calling out (expanding the keyboard), calling back (retracting the keyboard), whether the input method hot zone changes size, whether the screen rotates, etc., to the THP module.

[0260] Therefore, based on the structure shown in Figure 4B, every time a touch operation occurs, the knuckle recognition algorithm is called to identify and process the touch operation to determine whether it is a knuckle operation. Then, when it is determined that the touch operation is a knuckle operation, a corresponding response to the knuckle operation is made in a timely manner.

[0261] Considering that users touch the screen very frequently, but the knuckle function is used relatively infrequently, calling the knuckle recognition algorithm for each touch will increase the basic load of the electronic device system and increase the risk of displaying sliding tracks due to misidentification. Therefore, in order to reduce the call to the knuckle recognition algorithm and thus reduce the basic load of the system and the possibility of misidentification, the embodiment of the present application has made improvements based on the software structure of the electronic device shown in Figure 4A. The modified software structure of the electronic device is shown in Figure 5.

[0262] See Figure 5, for example, compared with the software structure of the electronic device shown in Figure 4A that calls the knuckle recognition algorithm for each touch operation, the software structure of the electronic device for implementing the filtering solution for non-knuckle operations provided in the embodiment of the present application mainly integrates the knuckle filtering algorithm for filtering non-knuckle operations in the THP module, adds a field for describing whether to call the knuckle recognition algorithm (referred to as the Bitmap field in this embodiment) in the coordinate node driven by TP, and adds an input method hot zone information acquisition submodule in the input method module.

[0263] Among them, the knuckle filtering algorithm is used to judge each recognized touch operation each time a touch operation occurs, so as to identify specific touch screen operation characteristics and non-knuckle operations in usage scenarios, and then add corresponding identification information (the not_bypass information mentioned below) to the Bitmap field through the recognition results. In this way, when the Input event carrying the Bitmap field is transmitted to the InputReader, the InputReader can determine whether to notify the knuckle module to call the knuckle recognition algorithm to identify and process this touch operation based on the not_bypass information in the Bitmap field.

[0264] The Bitmap field is used to indicate whether to filter the current touch operation, that is, whether to call the knuckle recognition algorithm.

[0265] Among them, the input method hot zone information acquisition submodule is used to obtain the state and height value of the input method hot zone, and process it into a state and height value that meets the requirements, and then transmit it to the THP module through the channel corresponding to step 119 shown in Figure 4B, so that the THP module can implement filtering of non-finger joint operations based on the finger joint filtering algorithm.

[0266] Regarding the filtering scheme for non-knuckle operations implemented according to the above three items, please refer to the description of the following embodiment for details, which will not be repeated here.

[0267] It should be understood that the above description is merely an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation on this embodiment. In actual applications, any one or more of the above items may be added to the software structure of the electronic device according to business needs, and this application does not impose any limitation on this.

[0268] Based on the software structure of the electronic device shown in Figure 5, the following is a detailed description of the touch operation processing scheme implemented based on the three newly added items, namely the knuckle filtering algorithm in the THP module, the Bitmap field in the coordinate node driven by the TP, and the status and height value of the input method hot zone obtained by the input method hot zone information acquisition submodule in the input method module, specifically the filtering scheme for non-knuckle operations.

[0269] For ease of explanation, this embodiment divides the filtering solution for non-knuckle operations into the aptouch_daemon filtering phase, the TP driver filtering phase, and the input method hot zone filtering phase. The aptouch_daemon filtering phase can be divided into filtering for non-knuckle operations in a single touch screen operation and filtering for non-knuckle operations in two consecutive touch screen operations.

[0270] The following is the relevant content of the filtering link of aptouch_daemon:

[0271] (1) Filtering non-knuckle operations in single touch screen operations

[0272] Specifically, there are three main indicators for judging knuckle operation: the number of touch points (TouchNum), the pressure value generated by touching the screen (Pressure), and whether the capacitance value is valid (IsCapValid()).

[0273] Among them, TouchNum represents the number of touch points on the touch screen in one scanning cycle.

[0274] For example, as shown in the description of the scenes corresponding to knuckle operations in Figures 1A and 1B, knuckle operations can include single-knuckle operations and double-knuckle operations. For single-knuckle operations, the corresponding TouchNum is 1, and for double-knuckle operations, the corresponding TouchNum is 2. In other words, only touch operations with a TouchNum less than or equal to 2 are likely to be knuckle operations. Therefore, touch operations with a TouchNum greater than 2 can be determined as non-knuckle operations and thus filtered out.

[0275] The Pressure can be calculated based on the capacitance value generated by the touch screen. The specific calculation formula is as follows: Formula (1).

[0276] For ease of understanding, the following is explained in conjunction with Figure 6. Specifically, when calculating the Pressure generated by a touch screen, it is first necessary to determine the center point of the touch, that is, the point with the maximum capacitance. Take the touch position shown in (1) in Figure 6 as the center point of the touch as an example.

[0277] Then, after determining the center point, the capacitance values ​​of the center point (such as V4 shown in (2) in Figure 6) and its eight neighboring points (such as V0, V1, V2, V3, V5, V6, V7, and V8 shown in (2) in Figure 6) can be obtained, thereby forming a 3×3 matrix of capacitance value data.

[0278] Next, the capacitance values ​​of the 9 points obtained above are recorded as V i, where i∈[0,8].

[0279] Next, the capacitance values ​​of these 9 points are calculated based on the weight k. i Perform weighted summation.

[0280] Finally, multiply the summation result by the coefficient α to get Pressure.

[0281] It should be noted that the above Pressure calculation is performed by the THP module based on the original capacitance data.

[0282] For example, in some possible implementations, the THP module can also determine the coordinate information of the touch point, the primary touch point, the secondary touch point, the current touch point ID, etc. based on the raw capacitance data. Regarding the above parameters, the TP driver will first write them to the coordinate node and then write them to the / dev / input node.

[0283] Understandably, since different Input events correspond to different X-axis coordinates (ABS_MT_POSITION_X), Y-axis coordinates (ABS_MT_POSITION_Y), pressure values ​​(ABS_MT_PRESSURE), current touch point ID (ABS_MT_TRACKING_ID), primary touch point (ABS_MT_TOUCH_MAGOR), and secondary touch point (ABS_MT_TOUCH_MINOR), the above parameters written to the / dev / input node will be recorded in the corresponding Input event path. As shown in Figure 7, when the Input event generated based on the current data is event9, the above parameters will be recorded in the / dev / input node under the path of event9, such as / dev / input / event9.

[0284] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0285] Among them, IsCapValid() mainly determines whether there are two rows / columns with capacitance values ​​of 0 in the four directions of the current target capacitance data: up, down, left, and right. Specifically, if so, it returns False, indicating that the target capacitance data is invalid. If not, it returns True, indicating that the target capacitance data is valid. Among them, when the target capacitance data is invalid, it can be determined that the current touch operation is a non-knuckle operation. When the target capacitance data is valid, it can be further combined with other judgment conditions to determine whether the current touch operation is a non-knuckle operation.

[0286] To verify the feasibility of the above judgment criteria for IsCapValid(), Security-Enhanced Linux (SEL) was disabled, and then swiping operations were performed on the four sides of the electronic device's touch screen multiple times, namely swiping from the top, bottom, left, and right sides. The adb Shell command, specifically adb shell tpd roidata, was used to obtain the target capacitance data corresponding to these swiping operations. The results showed that each swiping operation performed on the four sides of the touch screen of an electronic device, such as a mobile phone, met the scenario of at least two rows or two columns containing all zeros.

[0287] For a more intuitive understanding, the target capacitance data of a 7×7 matrix generated by sliding from the top, bottom, left, and right edges are respectively shown below in conjunction with FIG8 .

[0288] Referring to (1) in FIG8 , illustratively, in a scenario where the user slides into the touch screen from the upper side of the touch screen, the top three rows of the target capacitance data in the 7×7 matrix are all zeros.

[0289] Referring to (2) in FIG8 , illustratively, in the scenario of sliding into the touch screen from the bottom side of the touch screen, the bottom two rows of the target capacitance data in the 7×7 matrix are all zeros.

[0290] Referring to (3) in FIG8 , illustratively, in a scenario where the user slides into the touch screen from the left side, the leftmost three columns of the target capacitance data in the 7×7 matrix are all zeros.

[0291] Referring to (4) in FIG8 , illustratively, in the scenario of sliding into the touch screen from the right side of the touch screen, the rightmost two columns of the target capacitance data of the 7×7 matrix are all zeros.

[0292] In other words, swipe operations from all four sides of the electronic device's touchscreen all meet the scenario where at least two rows or two columns are all zeros. The target capacitance data corresponding to these scenarios are all invalid capacitance values. Therefore, based on the judgment criteria of the above IsCapValid() method, it can be determined that swiping into the touchscreen from the top, bottom, left, or right sides is a non-knuckle operation.

[0293] Therefore, in a possible implementation, based on the three judgment factors of TouchNum, Pressure, and IsCapValid(), a filtering process for non-knuckle operations in a single touch screen operation as shown in FIG9 can be implemented.

[0294] 9 , an exemplary process of filtering non-knuckle touches by a single touch based on the knuckle filtering algorithm implemented in the THP module of aptouch_daemon includes:

[0295] 201, whether TouchNum is greater than 2.

[0296] For example, in a possible implementation, when receiving a touch of the touch screen by the user, the THP module may first perform filtering based on the TouchNum generated by the touch operation based on a knuckle filtering algorithm.

[0297] From the above description of knuckle operations, we can see that knuckle operations can be single-knuckle operations with TouchNum being 1, and double-knuckle operations with TouchNum being 2. Therefore, by determining whether TouchNum is greater than 2, non-knuckle operations can be quickly filtered out.

[0298] Specifically, if TouchNum is determined to be greater than 2, indicating that there are three or more touch points in the current scan cycle, then the current touch operation must be non-knuckle operation. In this case, step 206 can be directly executed, that is, the current touch operation can be filtered out. In other words, steps 103.1, 103.2, and subsequent steps shown in Figure 4B will not be executed, and therefore the knuckle module will not be triggered to call the knuckle recognition algorithm to identify knuckle operation.

[0299] On the contrary, that is, when TouchNum is not greater than 2 (may be equal to 2 or may be equal to 1), the THP module may further execute step 202 based on the knuckle filtering algorithm.

[0300] 202, whether TouchNum is equal to 2.

[0301] Specifically, if it is determined through judgment that TouchNum is equal to 2, it indicates that there are 2 touch points in the current scanning cycle, which meets one element of double-knuckle operation. In order to ensure that the scene can normally judge whether it is a double-knuckle operation (double-knuckle double-click operation), step 205 can be executed, that is, this touch operation is not filtered.

[0302] On the contrary, if it is determined through judgment that TouchNum is equal to 1, it indicates that there is one touch point in the current scanning cycle, which meets one element of single-finger joint operation. In order to ensure that the scenario can normally judge whether it is a single-finger joint operation (single-finger joint double-click operation, or single-finger joint single-click and wreath operation, or single-finger joint single-click and draw S operation), the THP module can further judge based on the two judgment factors of Pressure and IsCapValid() based on the finger joint filtering algorithm.

[0303] For example, in one possible implementation, it is possible to first determine whether the Pressure corresponding to the current touch operation meets a preset condition, such as being greater than a preset pressure threshold, and then determine whether the target capacitance is valid. That is, first execute step 203 in FIG. 9 and then execute step 204.

[0304] For example, in another possible implementation, it is possible to first determine whether the target capacitance is valid, and then determine whether the pressure corresponding to the current touch operation meets a preset condition, such as being greater than a preset pressure threshold. That is, step 204 in FIG. 9 is first executed, and then step 203 is executed.

[0305] As an example, this embodiment takes the implementation method of first executing step 203 in FIG. 9 and then executing step 204 as an example.

[0306] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0307] 203, whether the pressure value is greater than the preset pressure threshold.

[0308] For example, the preset pressure threshold can be determined according to the pressure value corresponding to the force of tapping that satisfies the knuckle operation specified in different electronic devices.

[0309] It's important to note that pressure is positively correlated with the screen contact area. Generally speaking, the pads of your fingers (especially your thumb) have a larger contact area with the screen than your knuckles, resulting in a higher pressure. Therefore, if the pressure exceeds a preset threshold, it can be assumed that the current touch operation is not a knuckle operation, meaning that non-knuckle operations need to be filtered out.

[0310] Based on this judgment condition, when Pressure is less than or equal to a preset pressure threshold, such as 600, the THP module can further execute step 204 based on the knuckle filtering algorithm. Otherwise, it is considered that the current touch operation does not meet the force required to trigger the knuckle function, and thus the touch operation can be directly filtered out, that is, step 206 is directly executed.

[0311] 204, whether the target capacity data is valid.

[0312] The criteria for determining whether the target capacitance value is valid can be determined according to the criteria of the aforementioned IsCapValid() method. Specifically, when the capacitance value data is the target capacitance value data, that is, the capacitance value data of a 7×7 matrix obtained by processing the original capacitance value data and padding it with zeros (hereinafter described as a 7×7 capacitance value matrix), the validity of the target capacitance value data can be quickly determined based on the four vertices of the 7×7 capacitance value matrix (the upper left vertex, the upper right vertex, the lower left vertex, and the lower right vertex).

[0313] It should be noted that, in this embodiment, the vertices used to determine whether the target capacitance data is valid refer to the corner point and the next vertex along the diagonal line. These four vertices of the 7×7 capacitance matrix can be shown in FIG10 .

[0314] Continuing to refer to FIG10 , for example, in this embodiment, the two values ​​in the circle corresponding to each vertex are used as vertex values, wherein the upper left vertex and the lower right vertex form a group of corresponding diagonal vertices, and the upper right vertex and the lower left vertex form a group of corresponding diagonal vertices.

[0315] Continuing to refer to FIG. 10 , for example, in a specific judgment, if the vertex values ​​of the two vertices on the diagonal are both valid capacity values, that is, the four capacity values ​​involved in the two vertices on the diagonal are all non-zero values, then it can be determined that the 7×7 capacity value matrix is ​​valid.

[0316] Continuing with FIG10 , for example, if the top left vertex has a non-zero value, then the top two rows and leftmost two columns can be confirmed to be valid, i.e., these two rows and two columns are not all zeros, and touch operations that slide into the touch screen from the top or from the left can be ruled out. If the bottom right vertex has a non-zero value, then the bottom two rows and rightmost two columns can be confirmed to be valid, i.e., these two rows and two columns are not all zeros, and touch operations that slide into the touch screen from the bottom or from the right can be ruled out.

[0317] Accordingly, if the upper right vertex has a non-zero value, then the top two rows and rightmost two columns can be confirmed to be valid, that is, these two rows and two columns are not all zeros, and the touch operation of sliding into the touch screen from the top or from the right can be ruled out. If the lower left vertex has a non-zero value, then the bottom two rows and leftmost two columns can be confirmed to be valid, that is, these two rows and two columns are not all zeros, and the touch operation of sliding into the touch screen from the bottom or from the left can be ruled out.

[0318] Based on this method, after substituting the target capacitance value data of each sliding scenario (1) to (4) in Figure 8 into the 7×7 capacitance value matrix shown in Figure 10, we can obtain (1) to (4) in Figure 11.

[0319] Referring to (1) in FIG11 , for example, the two capacity values ​​in the upper left vertex are both 0, the two capacity values ​​in the upper right vertex are both 0, the two capacity values ​​in the lower left vertex are both non-zero values ​​(one 2, one 15), and the two capacity values ​​in the lower right vertex are both non-zero values ​​(one -11, one -13). According to the above method of determining whether the target capacity value data is valid by using the diagonal vertices, the vertex values ​​of the diagonal vertices of the upper left vertex and the lower right vertex are selected to determine that the top two rows are all 0. Similarly, the vertex values ​​of the diagonal vertices of the upper right vertex and the lower left vertex are selected to determine that the top two rows are all 0. As for the bottom two rows, the leftmost two columns, and the rightmost two columns, because the vertex values ​​of the bottom left vertex and the bottom right vertex are both non-zero, the bottom two rows, the leftmost two columns, and the rightmost two columns are all non-zero. Based on the judgment criteria of IsCapValid() above, if the 7×7 capacitance matrix contains two rows or two columns of all zeros, it can be determined that the 7×7 capacitance matrix is ​​invalid. This also corresponds to the scenario where a touch operation of sliding into the touch screen from the top side of the electronic device touch screen is a non-knuckle operation.

[0320] Referring to (2) in FIG11 , for example, the two capacity values ​​in the upper left vertex are both non-zero values ​​(one -18, one 15), the two capacity values ​​in the upper right vertex are both non-zero values ​​(one -18, one 0), the two capacity values ​​in the lower left vertex are both 0, and the two capacity values ​​in the lower right vertex are both 0. According to the above method of determining whether the target capacity value data is valid by using the diagonal vertices, the vertex values ​​of the diagonal vertices of the upper left vertex and the lower right vertex are selected to determine that the bottom two rows are all 0. Similarly, the vertex values ​​of the diagonal vertices of the upper right vertex and the lower left vertex are selected to determine that the bottom two rows are all 0. Since the vertex values ​​of the upper left vertex and the upper right vertex are non-zero, the top two rows, the leftmost two columns, and the rightmost two columns are all non-zero. Based on the judgment criteria of IsCapValid() above, if the 7×7 capacitance matrix contains two rows or two columns of all zeros, it can be determined that the 7×7 capacitance matrix is ​​invalid. This also corresponds to the scenario where a touch operation of sliding into the touch screen from the bottom side of the electronic device is a non-knuckle operation.

[0321] See (3) in Figure 11. For example, the two capacity values ​​in the upper left vertex are both 0, the two capacity values ​​in the upper right vertex have non-zero values ​​(one 0, one 130), the two capacity values ​​in the lower left vertex are both 0, and the two capacity values ​​in the lower right vertex are both non-zero values ​​(one -8, one 83). According to the above method of determining whether the target capacity value data is valid by using the diagonal vertices, the vertex values ​​of the diagonal vertices of the upper left vertex and the lower right vertex are selected to determine that the two leftmost columns are all 0. Similarly, the vertex values ​​of the diagonal vertices of the upper right vertex and the lower left vertex are selected to determine that the two leftmost columns are all 0. As for the top two rows, the bottom two rows, and the rightmost two columns, because the vertex values ​​of the top right vertex and the lower right vertex are non-zero, the top two rows, the bottom two rows, and the rightmost two columns are all non-zero. Based on the judgment criteria of the above IsCapValid() method, if the 7×7 capacitance matrix contains two rows or two columns of all zeros, it can be determined that the 7×7 capacitance matrix is ​​invalid. This also corresponds to the scenario where a touch operation of sliding into the touch screen of an electronic device from the left side is a non-knuckle operation.

[0322] Referring to (4) in FIG11 , for example, the two capacity values ​​in the upper left vertex have non-zero values ​​(one 0 and one 18), the two capacity values ​​in the upper right vertex are both 0, the two capacity values ​​in the lower left vertex have non-zero values ​​(one 0 and one 26), and the two capacity values ​​in the lower right vertex are both 0. According to the above method of determining whether the target capacity value data is valid by using the diagonal vertices, the vertex values ​​of the diagonal vertices of the upper left vertex and the lower right vertex are selected to determine that the two rightmost columns are all 0. Similarly, the vertex values ​​of the diagonal vertices of the upper right vertex and the lower left vertex are selected to determine that the two rightmost columns are all 0. As for the top two rows, the bottom two rows, and the leftmost two columns, because the vertex values ​​of the top left vertex and the right lower left vertex are non-zero, the top two rows, the bottom two rows, and the leftmost two columns are all non-zero. Based on the judgment criteria of the above IsCapValid() method, if the 7×7 capacitance matrix contains two rows or two columns of all zeros, it can be determined that the 7×7 capacitance matrix is ​​invalid. This also corresponds to the scenario where a touch operation of sliding into the touch screen from the right side of the electronic device is a non-knuckle operation.

[0323] From the above description, we can determine that the target capacity data is valid based on the vertex values ​​of a group of vertices on the diagonal line. Based on this, without paying attention to the capacity values ​​at other positions, for the 7×7 capacity value matrix shown in Figure 12, if the two capacity values ​​of the upper left vertex are 23 and 47, the two capacity values ​​of the upper right vertex are 68 and 51, the two capacity values ​​of the lower left vertex are 46 and 32, and the two capacity values ​​of the lower right vertex are 18 and 54, it can be determined that the 7×7 capacity value matrix shown in Figure 12 is a valid 7×7 capacity value matrix, that is, the target capacity value data corresponding to this matrix is ​​valid.

[0324] It should be understood that the above is for the judgment of the validity of the target capacitance value data. However, in actual application scenarios, the capacitance value validity can also be judged based on the original capacitance value data. In this way, there is no need to first perform the process of extracting the target capacitance value data from the original capacitance value data, thereby reducing the time and resources required for processing.

[0325] Exemplarily, when the capacitance value data is the original unprocessed original capacitance value data, for each touch operation, the THP module needs to obtain an N×N capacitance matrix centered on the capacitance peak point (peak point / maximum value point), that is, obtain the target capacitance value data. However, if the touch point is located at the edge of the screen, the THP module can actually only obtain an N×M, or M×N, or M×M capacitance matrix (M < N). For such scenarios, when determining whether the capacitance value is valid, the following two schemes can be adopted.

[0326] Scheme 1: Judge according to the coordinate values (p_x, p_y) of the peak point

[0327] Exemplarily, taking N = 7 as an example, as shown in FIG. 13, it shows the relative positions of the peak point and other capacitance value points in the x-axis direction of the 7×7 capacitance matrix that the THP module hopes to obtain; the two black vertical lines respectively represent the boundaries of the actually obtained 7×5 capacitance matrix when there are two columns of 0 at the left / right edge. Then at this time, the distance Dis of the peak point relative to the boundary of the two columns of 0 is Dis = (N + 1) / 2 - 2 (including the peak point itself, N is odd). If the distance of the peak point relative to the screen edge is less than or equal to Dis, at least two columns of 0 need to be filled. And according to the above judgment criterion of IsCapValid(), when the 7×7 capacitance matrix includes 2 rows or 2 columns of all 0s, it can be determined that the 7×7 capacitance matrix is invalid. That is, based on the current original capacitance value data for processing, the obtained target capacitance value data is actually invalid. Therefore, the THP module does not need to process the original capacitance value data to obtain the target capacitance value data.

[0328] Based on this, for the scenario of the original capacitance value data, when judging the capacitance value validity, it can be judged whether p_x and Dis, or p_y and Dis satisfy the following conditions: p_x < Dis, or p_x > curResolution.x - Dis - 1, or p_y < Dis, or p_y > curResolution.y - Dis - 1.

[0329] Where, curResolution.x is the maximum pixel of the X axis, and curResolution.y is the maximum pixel of the Y axis.

[0330] Specifically, if the above conditions are satisfied, it is determined that the capacitance value is invalid, otherwise it is determined that the capacitance value is valid.

[0331] For ease of understanding, the following specific description is given using the p_x value of the X-axis as an example in conjunction with Figure 14. For example, still taking the target capacitance data of 7×7 as an example, when N=7, according to the above formula for determining Dis, Dis=(7+1) / 2-2=2.

[0332] As shown in Figure 14, for example, if the maximum pixel on the X-axis is curResolution.x = 10 (the 10 pixels 0 to 9 shown in Figure 14), then when p_x < 2 or p_x > 10-2-1 = 7, the peak point falls on the left or right edge of the screen; otherwise, the peak point falls in the middle area of ​​the screen along the X-axis. The judgment logic for the Y-axis is similar and will not be repeated here.

[0333] For example, when both the X-axis coordinate and the Y-axis coordinate of the peak point do not fall on the edge of the screen, the capacitance value is determined to be valid. Otherwise, the capacitance value is determined to be invalid.

[0334] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0335] Solution 2: Judge based on the number of pixels in the actual capacitance matrix

[0336] It can be understood that the actually obtained capacitance matrix in this embodiment is the capacitance matrix corresponding to the capacitance data not padded with zeros extracted from the original capacitance data.

[0337] Specifically, in this capacitance validity determination scheme, when the number of pixels in the actual capacitance matrix is ​​≤ N*(N–2), the capacitance is determined to be invalid (from the code logic, False can be returned). Otherwise, the capacitance is determined to be valid (from the code logic, True can be returned).

[0338] For example, taking N = 9, the THP module expects to obtain a 9×9 capacitance matrix. When the touch point is at the edge of the screen, as shown above, the actual capacitance matrix will have at least two rows or columns missing capacitance values. In this case, the actual capacitance matrix pixel count = 9*7 = 63 ≤ 9*(9–2) = 63, and the capacitance values ​​are invalid. When the touch point is not at the edge of the screen, the actual capacitance matrix will have at most one row and one column missing capacitance values. In this case, the actual capacitance matrix pixel count = 8*8 = 64 > 9*(9–2) = 63, and the capacitance values ​​are valid.

[0339] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. In practical applications, IsCapValid() can improve operating efficiency as much as possible and thereby reduce the frequency of running unnecessary code, and this application does not impose any restrictions on this.

[0340] In addition, it should be noted that in actual applications, according to IsCapValid(), non-knuckle operations can be filtered separately, or they can be integrated into the filtering schemes described in Figures 9 and 15. This application does not impose any restrictions on this.

[0341] This enables a quick determination of the validity of capacitance data.

[0342] If it is determined that the target capacitance data is valid, step 205 may be executed. Otherwise, step 206 may be executed.

[0343] 205, single touch without filtering.

[0344] 206, single touch filtering.

[0345] Therefore, the THP module in aptouch_daemon, based on the knuckle filtering algorithm and the judgment processing logic shown in Figure 9, obtains the original capacitance data and, based on the three judgment factors of TouchNum, Pressure, and IsCapValid(), can determine in the THP module touch operations that clearly do not meet the knuckle operation requirements. For these touch operations that do not meet the knuckle operation requirements (non-knuckle operations), the recognition results (not_bypass information) are transmitted to the TP driver and then added to the added Bitmap field, so that the Input event generated by the dev / input node in the TP driver can carry this field. In this way, the InputReader in the Input framework can obtain the not_bypass information carried in the Bitmap field by parsing the Input event, and then determine whether to notify the knuckle module to call the knuckle recognition algorithm to identify and process this touch operation based on the not_bypass information. In this way, it is possible to filter out touch operations that are clearly not knuckle operations in a single touch screen operation, that is, non-knuckle operations, thereby greatly reducing the pressure on the system's basic load.

[0346] In addition, since the number of times the knuckle module is triggered to call the knuckle recognition algorithm is greatly reduced, the risk of misidentification causing the screen interface to display a sliding running trajectory is also reduced.

[0347] (2) Filtering non-knuckle operations in two consecutive touch screen operations

[0348] Based on the actual usage scenario of the user, considering that when the knuckles are double-clicked to take a screenshot or record a screen, there may be certain operational inconveniences or it may be difficult to successfully recognize the screen due to the user's misoperation. For example, the second time the user taps the knuckles, the entire finger or the upper half of the finger may directly touch the touch screen due to inertia. Therefore, for such situations, in order to improve the recognition success rate of the knuckle double-click operation, this embodiment reduces the filtering threshold of the next touch operation of a single knuckle operation (here refers to the touch operation corresponding to step 205 in Figure 9), thereby ensuring that the knuckle operation is filtered out and the user's operating experience is guaranteed.

[0349] Specifically, in the filtering process for non-knuckle operations in two consecutive touch screen operations, for the first touch operation, whether filtering is required can be determined based on the filtering solution for non-knuckle operations in a single touch operation shown in the embodiment of FIG9 . In other words, whether the first touch operation qualifies as a knuckle operation is determined.

[0350] When determining that the first touch operation is a knuckle operation (single or double knuckle click), in one possible implementation, the next touch operation may only focus on the time interval between the two touch operations. If the time interval is less than a preset time interval threshold, it can be determined that the second touch operation is also a knuckle operation, i.e., no filtering is required.

[0351] Based on this, for filtering non-knuckle operations in two consecutive touch screen operations, it is only necessary to set the two consecutive touch operations (n ​​and n+1) to meet the following two conditions at the same time, and then the n+1 touch operation can be not filtered. Otherwise, it will be filtered.

[0352] Condition 1: The nth touch operation is not filtered.

[0353] Condition 2: The time interval between the (n+1)th touch operation and the (n)th touch operation is less than a preset time interval threshold, such as 500 ms.

[0354] Specifically, if the nth touch operation is not filtered, the corresponding timestamp T1 is recorded. If the timestamp corresponding to the n+1th touch operation is T2, when the time threshold between T2 and T1 is less than the preset time threshold (delta), the n+1th touch operation is directly sent and the timestamp is updated. If it is outside the delta neighborhood, the timestamp is cleared (for example, set to an invalid value of -1), and filtering is performed according to the TouchNum, Pressure, and IsCapValid() in the above embodiment, that is, the principles of steps 201 to 206 in the embodiment shown in Figure 9.

[0355] Based on the above filtering rules, the filtering process of non-knuckle operations in two consecutive touch screen operations can be shown in Figure 15, which specifically includes:

[0356] 301 : When receiving the n+1th touch operation on the touch screen, determine whether the timestamp T1 corresponding to the nth touch operation is a preset invalid value.

[0357] For example, in one possible implementation, a preset invalid value, such as -1 as mentioned above, may be set as a default during the initialization phase. Therefore, in step 301, determining whether the timestamp T1 corresponding to the nth touch operation is the preset invalid value may be expressed as "T1!=-1?".

[0358] Continuing with FIG. 15 , for example, when T1! = -1, it indicates that the nth touch operation is a touch operation that has not been filtered out, that is, the single touch operation meets the conditions for a knuckle operation. In this case, the time interval filtering rule can be used to further determine whether the n+1th touch operation is a non-knuckle operation that needs to be filtered out, that is, step 203 is executed.

[0359] On the contrary, when T1=-1, step 305 is executed. That is, based on the method of steps 201 to 206 in the embodiment shown in FIG9 , the n+1th touch operation is filtered for non-knuckle operations in single touch operations to determine whether the n+1th touch operation needs to be filtered.

[0360] 302. Get the current system time and assign it to T2.

[0361] 303 : Determine the time interval between T2 and T1 based on the time interval, and then determine whether the time interval is less than a preset time threshold.

[0362] Continuing to refer to FIG15 , illustratively, if the time interval T2-T1 is less than a preset time threshold, such as 500 ms, it is determined that the (n+1)th touch operation meets the condition of a knuckle operation. In this case, step 304 may be executed.

[0363] Continuing with FIG15 , for example, if the time interval T2-T1 is not less than a preset time threshold, such as 500ms, it can be determined that the n+1 touch operation does not meet the conditions for a knuckle operation. In this case, step 305 can be executed. That is, based on the method of steps 201 to 206 in the embodiment shown in FIG9 , the n+1 touch operation is filtered for non-knuckle operations in a single touch operation, and then it is determined whether the n+1 touch operation needs to be filtered.

[0364] 304. Set the timestamp corresponding to T1 to an invalid value.

[0365] It should be noted that in this embodiment, -1 is used to represent an invalid value, so the timestamp corresponding to T1 is set to an invalid value, that is, T1=-1, so that other touch operations will not be judged based on T1 subsequently.

[0366] Continuing with FIG. 15 , for example, after T1 is set to a preset invalid value, the information related to the (n+1)th touch operation can be sent to other functional modules for processing, so that the knuckle module can call the knuckle recognition algorithm to determine whether the touch operation is a knuckle operation. In other words, the (n+1)th touch operation is not filtered.

[0367] 305 , determining whether the (n+1)th touch operation needs to be filtered based on the three judgment factors of TouchNum, Pressure, and IsCapValid().

[0368] For details, please refer to the implementation details of steps 201 to 206 in the embodiment shown in FIG9 , which will not be repeated here.

[0369] Continuing with FIG15 , for example, when the n+1th touch operation does not need to be filtered, it is determined that this touch operation can be regarded as the first operation of a new knuckle operation. The timestamp of the first operation is still represented by T1, and T1 is set to the current system time, that is, step 306 is executed. Otherwise, it indicates that this touch operation needs to be filtered out. In this case, T1 needs to be set to an invalid value (-1), that is, step 307 is executed.

[0370] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0371] As can be seen from the description of the embodiment shown in FIG15 , in the filtering process for non-knuckle operations in two consecutive touch screen operations implemented by the THP module in aptouch_daemon based on the knuckle filtering algorithm, it is only necessary to follow the following principles:

[0372] For any (n+1th) touch operation, first determine whether the previous (nth) touch operation is filtered. The determination is based on whether T1! = -1.

[0373] If T1=-1, further determine whether single touch filtering is performed.

[0374] It should be noted that in order to simplify the code logic in the specific implementation, the codes of the three judgment elements TouchNum, Pressure and IsCapValid() can be encapsulated into separate functional modules respectively, or the codes of these three judgment elements can be encapsulated into one functional module, so that they can be directly called in this embodiment.

[0375] If the above single filtering condition is met, T1 is set to -1, and the current touch operation is determined to be a non-knuckle operation, and is filtered.

[0376] If the above single filtering conditions are not met, set T1 = current time and do not filter this touch operation.

[0377] If T1! = -1, set T2 = current time, and further determine whether T2 – T1 <delta。

[0378] If not, further determine whether single touch filtering is required, that is, call the above-encapsulated function modules of the three judgment elements TouchNum, Pressure, and IsCapValid().

[0379] If so, set T1 = -1 and do not filter this touch operation.

[0380] It should be noted that in the various embodiments of this application, the "filtering" or "non-filtering" of non-knuckle operations recorded refers specifically to the recognition results of the knuckle filtering algorithm in the THP module. Based on this recognition result, a corresponding value can be added to the Bitmap field. For example, in the following embodiments, the convention of "1" indicates not filtering this touch operation, that is, the corresponding recognition result is "non-filtering". The convention of "0" indicates filtering this touch operation, that is, the corresponding recognition result is "filtering".

[0381] For example, if the recognition result is "filtered," or the value of the specified bit in the Bitmap field is "0," InputReader will not notify the knuckle module to call the knuckle recognition algorithm to recognize and process the touch operation. Conversely, if the recognition result is "unfiltered," or the value of the specified bit in the Bitmap field is "1," InputReader will notify the knuckle module to call the knuckle recognition algorithm to recognize and process the touch operation.

[0382] Therefore, the THP module in aptouch_daemon can judge and process the logic shown in Figure 15 based on the knuckle filtering algorithm, and can also recognize non-knuckle operations in two consecutive touch operations, and can recognize non-knuckle operations in a single touch screen operation, so that most touch operations that do not conform to knuckle operations, that is, non-knuckle operations, can be identified at the source. In this way, by adding the corresponding recognition results in the Bitmap field, the InputReader can reduce the call to the knuckle module, thereby reducing the call to the knuckle recognition algorithm, and greatly reducing the pressure on the system's basic load.

[0383] In addition, since the number of times the knuckle module is triggered to call the knuckle recognition algorithm is greatly reduced, the risk of misidentification causing the screen interface to display a sliding running trajectory is also reduced.

[0384] The following is the relevant content of the TP-driven filtering link:

[0385] Specifically in this embodiment, the filtering solution implemented in the TP driver is achieved by allocating a new field in the Input event, and agreeing to use the newly allocated field to describe whether to call the knuckle recognition algorithm, thereby filtering non-knuckle operations.

[0386] According to the information recorded under the path corresponding to the Input event shown in Figure 7, the newly allocated field in this embodiment also uses the ABS_MT identifier, and the field name can be distinguished from other fields. As an implementation method, for example, it can be named ABS_MT_NOT_BYPASS.

[0387] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0388] In addition, it should be noted that the newly added field may be a field in a Bitmap format. For the sake of convenience, the newly added field will be described as a Bitmap field in the following text.

[0389] As shown in Figure 16, the Bitmap field is 32 bits long. In one possible implementation, the content in bit 0 can be used to describe whether to call the knuckle recognition algorithm, that is, whether to bypass the knuckle recognition algorithm. The remaining bytes are used to support subsequent scalability.

[0390] For example, in one possible implementation, it can be agreed that when the content in bit 0 is 1, it indicates that the touch operation is not filtered, that is, the knuckle recognition algorithm needs to be called. When the content in bit 0 is 0, it indicates that the touch operation is filtered, that is, the knuckle recognition algorithm needs to be skipped, that is, the knuckle recognition algorithm is not called.

[0391] For example, in another possible implementation, it can be agreed that when the content in bit 0 is 0, it indicates that the touch operation is not filtered, that is, the knuckle recognition algorithm needs to be called. When the content in bit 0 is 1, it indicates that the touch operation is filtered, that is, the knuckle recognition algorithm needs to be skipped, that is, the knuckle recognition algorithm is not called.

[0392] It should be understood that the above description is merely an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. For ease of explanation, this embodiment uses 1 to indicate not filtering this touch operation and 0 to indicate filtering this touch operation.

[0393] Regarding the filling of the 0th bit content in the Bitmap field and the calling process of the Bitmap field, as shown in Figure 17, specifically including:

[0394] 401. Each time aptouch_daemon senses a user touching the screen, the THP module calls the knuckle filtering algorithm to determine whether the current touch is a touch operation that needs to be filtered (the determination result is recorded as not_bypass information).

[0395] Regarding the specific implementation details of the THP module calling the knuckle algorithm to determine whether the current touch is a touch operation that needs to be filtered, please refer to the embodiments shown in Figures 9 and 15, which will not be repeated here.

[0396] Specifically, this embodiment stipulates that when the content of bit 0 of the Bitmap field is 1, it indicates that the touch operation is not filtered, that is, the knuckle recognition algorithm is invoked; when the content of bit 0 of the Bitmap field is 0, it indicates that the touch operation is filtered, that is, the knuckle recognition algorithm is not invoked. Therefore, the determined not_bypass information is either 1 or 0.

[0397] 402, aptouch_daemon sends the determined not_bypass information to the coordinate node driven by the TP through the THP module.

[0398] Specifically, the THP module may send the not_bypass information to the coordinate node driven by the TP through the data channel as shown in step 132.1 in FIG4B.

[0399] 403. The TP driver fills the not_bypass information into the 0th bit of the Bitmap field and writes the Bitmap field into the coordinate node.

[0400] 404. The TP driver writes the relevant data in the coordinate node (including the data in the Bitmap field) to the dev / input / node.

[0401] Specifically, the TP driver may write the relevant data in the coordinate node to the dev / input / node through the data channel as shown in step 112 in FIG. 4B .

[0402] 405, TP driver generates Input event based on the relevant data cached in dev / input / node.

[0403] The information included in the Input event may be shown in Figure 7. Specifically in this embodiment, based on the fields shown in Figure 7, a Bitmap field is added.

[0404] Continuing with FIG17 , illustratively, after generating an Input event, the TP driver sends the Input event to the EventHub of the Input box, for example, via the data channel shown in step 113 in FIG4B .

[0405] 406. InputReader reads the not_bypass information of bit 0 in the Bitmap field.

[0406] 407, InputReader determines whether the not_bypass information is 1.

[0407] 408. InputReader notifies the knuckle module to call the knuckle recognition algorithm.

[0408] That is, step 115 shown in FIG. 4B is performed.

[0409] 409, InputReader does not notify the knuckle module to call the knuckle recognition algorithm.

[0410] That is, InputReader does not interact with the knuckle module. Thus, the knuckle module does not receive the coordinate information of InputReader and will not call the knuckle recognition algorithm to perform recognition processing of the knuckle operation.

[0411] Therefore, the TP driver fills the corresponding Bitmap field of the Input event based on the "not_bypass" information sent by the THP module in aptouch_daemon. Before the Input framework calls the knuckle module and then calls the knuckle recognition algorithm, it decides whether to call the knuckle recognition algorithm based on the "not_bypass" information in bit 0 of the Bitmap field, thereby reducing the number of calls to the knuckle recognition algorithm.

[0412] The following is the relevant content of the filtering link of the input method hot zone:

[0413] It should be noted that in the current system, knuckle touches within the input method hot zone (keyboard area) will not trigger actions such as screenshots and screen recordings. This is because when the Input framework recognizes that the coordinates of the touch operation are within the input method hot zone, it blocks the calls to apps such as knuckle screenshots and screen recordings. However, in the background program, the knuckle module will still be called when a touch occurs in the input method hot zone, and ACC data will be obtained through inter-core communication. This process generates unnecessary redundant actions and increases system load.

[0414] To address this issue, this embodiment utilizes a knuckle filtering algorithm in the THP module of aptouch_daemon to filter touch operations that fall within the input method hot zone. That is, the filtering scheme for the input method hot zone needs to involve both the input method module and the THP module. The filtering process for touch operations in the input method hot zone implemented by these two modules can be shown in FIG18 , specifically including steps 501 to 504 implemented by the input method hot zone information acquisition submodule in the input method module, and steps 601 to 604 implemented in the THP module.

[0415] 501. Get the height value (top and bottom) of the input method hot zone.

[0416] Specifically, when the input method state is switched (called out, called back, resized, screen rotated, etc.), it is necessary to obtain the height value of the current input method hot zone.

[0417] For ease of explanation, in this embodiment, the input method is in the called-out state, that is, the input method hot zone is expanded on the current screen, as shown in (1) in Figure 19.

[0418] Regarding the height value of the input method hot zone that needs to be obtained, this embodiment takes the height values ​​of the upper and lower sides as an example. For example, when the mobile phone is in a vertical screen state, the Top and Bottom are obtained as coordinates on the Y axis. When the touch screen of the mobile phone is in the state shown in (1) in Figure 19, the obtained Top can be recorded as TopY in (2) in Figure 19, and the obtained Bottom can be recorded as BottomY in (2) in Figure 19.

[0419] 502, coordinate conversion.

[0420] It should be understood that electronic devices, such as mobile phones, typically have a landscape state and a portrait state during use. In one possible implementation, it can be agreed that the height values ​​of the input method hot zones obtained are all based on the portrait state. Therefore, when the electronic device is currently in the landscape state, the obtained coordinates need to be converted, that is, from the coordinate values ​​corresponding to the landscape state to the coordinate values ​​corresponding to the portrait state.

[0421] In landscape mode, the screen interface will rotate 90° or 270° (depending on the position of the power button on the side frame of the electronic device), causing the input method hotspot to rotate in the direction, and thus its logical coordinates and physical coordinates to rotate at a certain angle. However, the THP module cannot obtain the screen rotation status. Therefore, the input method module, specifically the input method hotspot information acquisition submodule, needs to perform coordinate conversion when the screen is rotated.

[0422] For ease of explanation, this embodiment takes a mobile phone as an example, and the position of its power button can be shown as (1) in Figure 3.

[0423] For example, for the mobile phone shown in (1) in FIG3 , when the screen is rotated at 90° in landscape mode, the screen interface displaying the input method hot zone may be as shown in (1) in FIG20 ; when the screen is rotated at 270° in landscape mode, the screen interface displaying the input method hot zone may be as shown in (2) in FIG20 .

[0424] For the case of a 90° horizontal screen, see (1) in FIG. 21 , the Top before coordinate conversion can be expressed as srcTopY, and the Bottom as srcBottomY.

[0425] For a 90° horizontal screen, you need to rotate right 90° to restore it to a vertical screen. After converting the 90° horizontal screen coordinate system to the vertical screen coordinate system, that is, converting from (1) in Figure 21 to (2) in Figure 21, the top of the vertical screen conversion can be expressed as targetRightX, and the bottom can be expressed as targetLeftX.

[0426] According to (1) and (2) in Figure 21, the coordinate transformation of the horizontal screen at 90° can be determined based on the following formulas (2) and (3): targetLeftX = currentResolution.Y - srcBottomY Formula (2) targetRightX = currentResolution.Y - srcTopY Formula (3)

[0427] For the case of a 270° horizontal screen, see (1) in FIG22 , the Top before coordinate conversion can still be represented as srcTopY, and the Bottom as srcBottomY.

[0428] Regarding the horizontal screen of 270°, it is necessary to rotate right 270° to restore it to the vertical screen. After converting the coordinate system of the horizontal screen of 270° to the vertical screen coordinate system, that is, converting from (1) in Figure 22 to (2) in Figure 22, the top of the vertical screen conversion can be expressed as targetLeftX, and the bottom can be expressed as targetRightX.

[0429] According to (1) and (2) in FIG. 22 , the coordinate transformation of the horizontal screen at 270° can be determined based on the following formulas (4) and (5): targetLeftX = srcTopY Formula (4) targetRightX = srcBottomY Formula (5)

[0430] 503, resolution conversion.

[0431] When the screen's current resolution is not the highest, the logical coordinates provided by the input method module and the physical coordinates on the THP side will not correspond (the coordinate values ​​are scaled), causing the THP module to misjudge the location of the input method hotspot. This issue can also prevent knuckle screenshots from being triggered in non-input method areas.

[0432] Therefore, after obtaining the converted coordinates, this embodiment will also perform resolution conversion on the coordinates on the input method module side, converting the coordinates at low resolution to corresponding coordinates at the highest resolution.

[0433] The conversion formulas used when converting from low resolution to high resolution are shown in the following formulas (6) and (7). int xTarget = (int)((float)xSrc*maxResolution.x / currentResolution.x+0.5) Formula (6) int yTarget = (int)((float)ySrc*maxResolution.y / currentResolution.y+0.5) Formula (7)

[0434] Where xTarget and yTarget are the target X-axis coordinate values ​​and target Y-axis coordinate values ​​after conversion, xSrc and ySrc are the original X-axis coordinate values ​​and original Y-axis coordinate values ​​before conversion, maxResolution is the maximum resolution, and currentResolution is the current resolution.

[0435] 504, the status and height value of the input method hot zone after processing.

[0436] Therefore, after coordinate conversion and resolution conversion, the processed state and height value of the input method hot zone can be obtained.

[0437] At this time, the input method hot zone information acquisition submodule can call a predefined input event management interface to send a command to the THP module.

[0438] Specifically, the predefined input event management interface may include a command field and command content, wherein both the command field and the command content may be defined as a string type (String).

[0439] As a possible implementation manner, the predefined input event management interface may be defined as, for example, HwInputManager.runHwTHPCommand(String command, String parameter).

[0440] Specifically, the parameter command in the above interface represents the command field, which is used to determine the command type and establish a dedicated command channel.

[0441] Specifically in this embodiment, the newly extended command field can be expressed as: "THP_SetInputMethodRegion".

[0442] The parameter parameter indicates the command content, which includes the input method hot zone coordinate data "status heightLow heightHigh" (separated by spaces) that needs to be transmitted to the THP module.

[0443] Among them, status indicates the horizontal and vertical status of the current screen, heightLow and heightHigh indicate the height values ​​of the input method hot zone, and it is sufficient to ensure that heightLow <= heightHigh.

[0444] For example, in a possible implementation, parameter values ​​may be differentiated according to status.

[0445] Specifically, when the input method hot zone is called out and the screen state is 0° vertical, status=0, and the corresponding parameter value can be expressed as "0 TopY BottomY".

[0446] When the input method hot zone is called out and the screen state is vertical 90° / 270°, status=1, and the corresponding parameter value can be expressed as "1 LeftX RightX".

[0447] Reset the status in the input method hot zone. Regardless of whether the screen is in landscape or portrait orientation, status = -1.

[0448] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0449] In addition, it should be noted that for the call-up state, the specific implementation includes but is not limited to the following scenarios, which make the input method hot zone (hereinafter referred to as the input method typing interface) visible: the electronic device switches from screen off to screen on, and the input method typing interface is directly displayed on the screen; the user clicks on the input box and the input method pops up; the input method layout changes with the horizontal and vertical screen of the mobile phone, including the actual horizontal and vertical screen state of the input method interface when the screen is rotated to 180°.

[0450] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0451] In addition, it should be noted that for the recall state, the specific implementation includes but is not limited to the following scenarios, which cause the input method typing interface to be invisible: switching from non-floating input method typing to floating state; switching from input method typing to stylus input method; switching from input method to other applications.

[0452] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0453] In addition, it should be noted that for the horizontal split-screen scenario, the knuckle recognition algorithm blocks the input method hotspot range consistent with the knuckle recognition algorithm's effective blocking range in the implementation shown in Figure 4B. The floating input method scenario remains consistent with the implementation shown in Figure 4B, without the knuckle recognition algorithm and without screenshot or video filtering.

[0454] Thus, the operation on the input method module side is completed.

[0455] 601, determine the touch point coordinates.

[0456] Specifically, when a touch operation is received, the THP module determines the touch point coordinates.

[0457] 602, input method hot zone status and height value cache.

[0458] Specifically, when the THP module obtains a command whose command field is THP_SetInputMethodRegion, it parses the command content parameter to obtain the status and height value of the input method hot zone.

[0459] After obtaining the status and height value of the input method hot zone, the THP module can record the status as status and the height value as heightLow and heightHigh respectively, and write the updated values ​​into the cache of the THP module so that the THP module can obtain the touch point coordinates for subsequent processing.

[0460] 603, whether the touch point falls within the input method hot zone.

[0461] After each touch operation, it is determined whether the touch point falls within the input method hot zone range based on the height value of the input method hot zone obtained from the input method module and the touch coordinates (touch point coordinates) calculated from the original capacitance value.

[0462] Exemplarily, the touch point coordinates can be defined as (touchX, touchY), and the conditions for determining whether the touch point falls within the input method hot zone can be as follows: when status = -1, False can be returned, specifically indicating that the touch point is not within the input method hot zone; when status = 0, if heightLow < = touchY < = heightHigh, True can be returned, specifically indicating that the touch point is within the input method hot zone, otherwise False is returned; when status = 1, if heightLow < = touchX < = heightHigh, True, otherwise False is returned.

[0463] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0464] According to the above judgment conditions, when it is determined that the touch point does not fall within the input method hot zone, the filtering result determined this time can be determined as touch non-filtering, that is, step 604; otherwise, it is touch filtering, that is, step 605.

[0465] 604, touch without filtering.

[0466] 605, touch filter.

[0467] The filtering result determined by the THP module according to the current touch point coordinates and the height value of the input method hot zone can be transmitted through the Bitmap field in the above embodiment, that is, the call to the knuckle recognition algorithm is blocked in the InputReader.

[0468] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0469] Therefore, through the filtering process shown in Figure 18, when the Input framework recognizes that the coordinates corresponding to the touch operation are located in the input method hot zone, it can prevent the background program from calling the knuckle recognition algorithm and obtaining ACC data through inter-core communication, thereby reducing unnecessary redundant actions and reducing system load.

[0470] In addition, it should be noted that in order to strengthen the filtering solution for input method hot zones provided in this embodiment to deal with potential risks, such as input method program crashes, etc. In one possible implementation, the filtering status of the input method hot zones can be reset by using the screen-on / off operation in the system, so that the user can restore the knuckle screenshot and screen recording capabilities of the electronic device in an abnormal state by turning the screen on and off.

[0471] For example, when an abnormal state occurs and the user turns the screen on and off on the electronic device, the electronic device performs the following operations: When the screen is off, the THP module clears the cached values ​​of the input method hot zone status and height value and resets them to the default value, such as status = -1. In this way, when the electronic device turns the screen on, it can be made to believe that there is no input method hot zone, thereby restoring normal knuckle recognition logic.

[0472] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0473] In addition, it should be understood that, in order to implement the above functions, the electronic device includes hardware and / or software modules that perform the corresponding functions. In combination with the 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 be beyond the scope of this application.

[0474] In addition, it should be noted that the touch operation processing methods provided in the above embodiments implemented by electronic devices in actual application scenarios can also be performed by a chip system included in the electronic device, wherein the chip system may include a processor. The chip system can be coupled to a memory so that when the chip system is running, it calls a computer program stored in the memory to implement the touch operation processing method performed by the above electronic device. The processor in the chip system can be an application processor or a processor other than an application processor.

[0475] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the touch operation processing method in the above-mentioned embodiment.

[0476] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the touch operation processing method in the above-mentioned embodiment.

[0477] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the touch operation processing method in the above-mentioned embodiment to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.

[0478] In addition, it can be seen from the above description that the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application 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.

[0479] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing a touch operation, characterized in that: Applied to electronic equipment, the method comprises: Receiving a first operation from a user; In response to the first operation, presenting a first interface of a first application, the first interface including a first area and a second area, the first area being a distribution area of ​​a keyboard corresponding to an input method in the first interface; receiving a second operation of the user in the first area; In response to the second operation, presenting the user's input information in the first area; When the second operation is received, the finger joint recognition algorithm is not called to perform recognition processing on the second operation.

2. The method according to claim 1, characterized in that The method further comprises: receiving a third operation of the user in the second area; The knuckle recognition algorithm is called to recognize the third operation to obtain a recognition result of the third operation.

3. The method according to claim 1, characterized in that The method further comprises: receiving a fourth operation of the user; In response to the fourth operation, switching the first interface to a second interface, where the second interface does not include the first area; receiving a fifth operation performed by the user on the second interface; The finger joint recognition algorithm is called to recognize the fifth operation to obtain a recognition result of the fifth operation.

4. The method according to claim 2 or 3, characterized in that: The calling of the knuckle recognition algorithm to perform recognition processing on the received operation includes: Determine a value of a first identifier corresponding to the received operation, where the first identifier is used to indicate whether to skip calling the knuckle recognition algorithm; When the first identifier is a first value, the knuckle recognition algorithm is not called to perform recognition processing on the received operation; When the first identifier is the second value, the knuckle recognition algorithm is called to perform recognition processing on the received operation.

5. A method for processing a touch operation, characterized in that: Applied to electronic equipment, the method comprises: Receiving a first touch operation from a user; Detecting the first touch operation to obtain the number of touch points corresponding to the first touch operation; generating a first identifier according to the number of touch points, wherein the first identifier is used to indicate whether to skip calling the knuckle recognition algorithm; When the first identifier is a first value, the electronic device does not call a finger joint recognition algorithm to perform recognition processing on the first touch operation; When the first identifier is a second value, the electronic device calls a finger joint recognition algorithm to perform recognition processing on the first touch operation.

6. The method according to claim 5, characterized in that The step of generating a first identifier according to the number of touch points includes: When the number of touch points is greater than a preset number, generating the first identifier of the first value; When the number of touch points is equal to the preset number, generating the first identifier of the second value; When the number of the touch points is less than the preset number, the first identifier is generated according to the capacitance data corresponding to the first touch operation.

7. The method according to claim 6, characterized in that The generating the first identifier according to the capacitance data corresponding to the first touch operation includes: Acquire original capacitance data corresponding to the first touch operation, where the original capacitance data is capacitance data that has not been processed by a touch processing algorithm; Based on the touch processing algorithm, and according to the original capacitance data, determining a pressure value corresponding to the first touch operation; The first identifier is generated according to the pressure value.

8. The method according to claim 7, characterized in that The determining, based on the touch processing algorithm and according to the original capacitance data, a pressure value corresponding to the first touch operation includes: Based on the touch processing algorithm, and according to the original capacitance data, determining a touch center point of the first touch operation, the touch center point being a point with the largest capacitance; Acquire the capacitance value of the touch center point and the capacitance values ​​of M area points adjacent to the touch center point from the original capacitance value data, where M is an integer greater than 0; According to the preset weights, the obtained M+1 capacitance values ​​are weighted and summed; The weighted sum result is multiplied by a preset coefficient to obtain the pressure value corresponding to the first touch operation.

9. The method according to claim 7, characterized in that: The step of generating the first identifier according to the pressure value includes: When the pressure value is greater than a preset pressure threshold, generating the first identifier of the first value; When the pressure value is less than or equal to the preset pressure threshold, determining whether the capacitance data corresponding to the first operation is valid; When the capacitance data is valid, generating the first identifier of the second value; When the capacitance data is invalid, the first identifier of the first value is generated.

10. The method according to claim 9, characterized in that The determining whether the capacitance data corresponding to the first operation is valid includes: Based on the touch processing algorithm, and according to the original capacitance data, determining a touch center point of the first touch operation, the touch center point being a point with the largest capacitance; Determine the distance between the touch center point and the edge of the current screen of the electronic device according to a preset dimension N, wherein N is an odd number; Determining whether the touch center point is located at an edge of the current screen of the electronic device according to the coordinates of the touch center point, the distance, and the maximum pixel of the current screen of the electronic device; When the touch center point is not located at an edge of the current screen of the electronic device, determining that the capacitance data corresponding to the first operation is valid; When the touch center point is located at an edge of a current screen of the electronic device, it is determined that the capacitance data corresponding to the first operation is invalid.

11. The method according to claim 10, characterized in that The determining, according to the coordinates of the touch center point, the distance, and the maximum pixel of the current screen of the electronic device, whether the touch center point is located at the edge of the current screen of the electronic device comprises: Determine an X edge coordinate value of an X axis and a Y edge coordinate value of a Y axis according to the distance and the maximum pixel; Determine whether the X coordinate value of the touch center point on the X axis is less than the distance, or determine whether the X coordinate value is greater than the X edge coordinate value; Determine whether the Y coordinate value of the touch center point on the Y axis is less than the distance, or determine whether the Y coordinate value is greater than the Y edge coordinate value; When the X coordinate value is less than the distance, or greater than the X edge coordinate value, and the Y coordinate value is less than the distance, or greater than the Y edge coordinate value, determining that the touch center point is not located at the edge of the current screen of the electronic device; Otherwise, it is determined that the touch center point is located at the edge of the current screen of the electronic device.

12. The method according to claim 9, characterized in that The determining whether the capacitance data corresponding to the first operation is valid includes: Based on the touch processing algorithm, capacitance data is extracted from the original capacitance data to construct a first capacitance matrix, where the first capacitance matrix is ​​a target capacitance matrix of N×N without zero filling, where N is an odd number; When the number of pixels in the first capacitance matrix is ​​less than or equal to a preset number of pixels, determining that the capacitance data corresponding to the first operation is invalid; When the number of pixels in the first capacitance matrix is ​​greater than the preset number of pixels, it is determined that the capacitance data corresponding to the first operation is valid.

13. The method according to claim 9, characterized in that The determining whether the capacitance data corresponding to the first operation is valid includes: Based on the touch processing algorithm, capacitance data is extracted from the original capacitance data to construct a first capacitance matrix, where the first capacitance matrix is ​​a target capacitance matrix of N×N without zero filling, where N is an odd number; When the first capacitance value matrix is ​​not an N×N capacitance value matrix, the first capacitance value matrix is ​​padded with 0 to obtain the N×N target capacitance value matrix; Obtaining the capacity values ​​of two vertices on the diagonal line of the target capacity value matrix; It is determined whether the capacity data corresponding to the first operation is valid according to the capacity values ​​of the two vertices on the diagonal line.

14. The method according to claim 13, characterized in that Obtaining the capacity values ​​of two vertices on the diagonal line of the target capacity matrix includes: Obtaining the capacity value of the upper left vertex and the capacity value of the lower right vertex of the target capacity matrix; or, The capacity value of the upper right vertex and the capacity value of the lower left vertex of the target capacity matrix are obtained.

15. The method according to claim 14, characterized in that The determining, according to the capacity values ​​of the two vertices on the diagonal line, whether the capacity value data corresponding to the first operation is valid includes: Determine whether the capacitance values ​​of the two vertices on the diagonal line are both valid capacitance values; When the capacity values ​​of the two vertices on the diagonal line are both valid values, it is determined that the capacity value data corresponding to the first operation is valid.

16. The method according to any one of claims 13 to 15, characterized in that The vertices in the target matrix include the edge corner point of the target matrix and the next vertex along the diagonal line of the edge corner point; Determining whether the capacitance values ​​of the two vertices on the diagonal line are both valid capacitance values ​​includes: Determine whether two capacitance values ​​in each vertex on the diagonal line have non-zero values; When both of the two vertices on the diagonal line have non-zero values, it is determined that the capacity data corresponding to the first operation is valid.

17. The method according to any one of claims 5 to 16, characterized in that After the electronic device calls the finger joint recognition algorithm to perform recognition processing on the first touch operation, the method further includes: When it is determined that the first touch operation refers to a joint operation, setting the time corresponding to the first touch operation to the system time when the first touch operation is received; When it is determined that the first touch operation is not the knuckle operation, the time corresponding to the first touch operation is set to a default invalid value.

18. The method according to claim 17, characterized in that The method further comprises: When receiving a second touch operation from the user, determining whether the time corresponding to the first touch operation is the default invalid value; When the time corresponding to the first touch operation is not the default invalid value, determining the time interval between the two touch operations according to the system time when the second touch operation is received and the time corresponding to the first touch operation; When the time interval is less than a preset time interval threshold, the time corresponding to the first touch operation is set to a default invalid value, the time corresponding to the second touch operation is set to the system time when the second touch operation is received, and the knuckle recognition algorithm is called to perform recognition processing on the second touch operation; otherwise, generating a second identifier corresponding to the second touch operation according to the number of touch points and / or capacitance data corresponding to the second touch operation, wherein the second identifier is used to indicate whether to skip calling the knuckle recognition algorithm; When the second identifier is the first value, the electronic device does not call the finger joint recognition algorithm to recognize the second touch operation, and sets the time corresponding to the second touch operation to the default invalid value; When the second identifier is a second value, the electronic device calls a knuckle recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the system time when the second touch operation is received.

19. The method according to claim 18, characterized in that The method further comprises: When the time corresponding to the first touch operation is the default invalid value, generating a second identifier corresponding to the second touch operation according to the number of touch points and / or capacitance data corresponding to the second touch operation; When the second identifier is the first value, the electronic device does not call the finger joint recognition algorithm to recognize the second touch operation, and sets the time corresponding to the second touch operation to the default invalid value; When the second identifier is a second value, the electronic device calls a knuckle recognition algorithm to identify and process the second touch operation, and sets the time corresponding to the second touch operation to the system time when the second touch operation is received.

20. The method according to any one of claims 5 to 19, characterized in that The method further comprises: Upon receiving the first touch operation, obtaining a height value of an input method hot zone and a current screen state of the electronic device, wherein the height value includes a coordinate value corresponding to an upper edge of the input method hot zone and a coordinate value corresponding to a lower edge, and the state includes a vertical screen state and a horizontal screen state, and the input method hot zone is a distribution area of ​​a keyboard corresponding to an input method in an interface currently displayed by the electronic device; When the state is the horizontal screen state, converting the height value to a coordinate system corresponding to the vertical screen state; Performing resolution conversion on the height value in the coordinate system corresponding to the vertical screen state to obtain a target height value; Determine, according to the state and the target height value, that the input method hot zone is located in an area of ​​the current screen of the electronic device; When the touch point coordinates of the first touch operation fall within the area of ​​the input method hot zone on the current screen of the electronic device, the first identifier of the first value is generated; Otherwise, generate the first identifier of the second value.

21. An electronic device, characterized in that: The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the touch operation processing method as described in any one of claims 1 to 4, or executes the touch operation processing method as described in any one of claims 5 to 20.

22. A computer-readable storage medium, characterized in that: It includes a computer program, which, when running on an electronic device, enables the electronic device to execute the touch operation processing method as described in any one of claims 1 to 4, or execute the touch operation processing method as described in any one of claims 5 to 20.