Touch operation processing method and device, electronic equipment and storage medium
By adjusting the click distance threshold when running the resources in the preset whitelist in the front desk of the electronic device, the problem of user rapid continuous touch operation recognition error is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202311185222.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-03-14
AI Technical Summary
When users perform fast and continuous touch operations, it is difficult for electronic devices to accurately identify, resulting in misidentified problems and affecting the user experience.
Adjust the click distance threshold when running the resources in the preset whitelist in the electronic device's foreground. If the target resource is not in the whitelist, set a larger first click distance threshold; if in the whitelist, set a smaller second click distance threshold to reduce the difficulty of adjacent touch operations being recognized as continuous clicks.
Reduces misidentification problems during fast continuous clicking, and improves user operation accuracy and user experience.
Smart Images

Figure CN119620877A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and more specifically, to a method and device for processing touch operations, an electronic device, and a storage medium. Background Art
[0002] With the development of science and technology, electronic devices are used more and more widely and have more and more functions, becoming one of the necessities in people's daily life. At present, electronic devices are generally designed with a touch screen structure for users to perform touch operations on the touch screen. However, when users perform touch operations on the touch screen, there may be rapid and continuous touch operations, which causes the electronic device to be unable to accurately identify the touch operation and form misrecognition, resulting in poor user experience. Summary of the invention
[0003] In view of the above problems, the present application proposes a touch operation processing method, device, electronic device and storage medium to solve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a method for processing touch operations, which is applied to an electronic device, wherein the electronic device includes a touch screen, and the method includes: receiving a resource startup instruction, wherein the resource startup instruction is used to instruct the electronic device to start a target resource in the foreground; if the target resource is not in a preset whitelist, then starting the target resource in the foreground of the electronic device, and determining the click distance threshold of the electronic device as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations determined as continuous click operations; or if the target resource is in the preset whitelist, then starting the target resource in the foreground of the electronic device, and determining the click distance threshold of the electronic device as a second click distance threshold, wherein the second click distance threshold is less than the first click distance threshold.
[0005] In a second aspect, an embodiment of the present application provides a touch operation processing device, which is applied to an electronic device, wherein the electronic device includes a touch screen, and the device includes: a resource startup instruction receiving module, which is used to receive a resource startup instruction, wherein the resource startup instruction is used to instruct the electronic device to start the target resource in the foreground; a first click distance threshold determination module, which is used to start the target resource in the foreground of the electronic device if the target resource is not in a preset whitelist, and determine the click distance threshold of the electronic device as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations determined as continuous click operations; or a second click distance threshold determination module, which is used to start the target resource in the foreground of the electronic device if the target resource is in the preset whitelist, and determine the click distance threshold of the electronic device as a second click distance threshold, wherein the second click distance threshold is less than the first click distance threshold.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
[0008] The touch operation processing method, device, electronic device and storage medium provided in the embodiments of the present application receive a resource startup instruction for instructing to start a target resource in the foreground. If the target resource is not in a preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points on the touch screen that satisfy adjacent touch operations determined to be continuous click operations. If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold that is less than the first click distance threshold, so as to reduce the click distance threshold of the electronic device when running the resources in the preset whitelist in the foreground of the electronic device, thereby reducing the difficulty of adjacent touch operations being identified as continuous click operations, thereby increasing the probability of adjacent touch operations being identified as continuous click operations, reducing the problem of misidentification during rapid continuous clicks, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic diagram of a text message editing page provided in an embodiment of the present application is shown;
[0011] Figure 2 A first schematic diagram of a touch operation on a text message editing page provided in an embodiment of the present application is shown;
[0012] Figure 3 A second schematic diagram of a touch operation on a text message editing page provided in an embodiment of the present application is shown;
[0013] Figure 4 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0014] Figure 5 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0015] Figure 6 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0016] Figure 7 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0017] Figure 8 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0018] Fig. 9 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0019] Fig.10 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0020] Fig.11 This application shows Fig.10 A schematic flow chart of step S702 of the touch operation processing method shown;
[0021] Fig.12 A schematic diagram showing a flow chart of a method for processing a touch operation provided by an embodiment of the present application;
[0022] Fig.13A module block diagram of a touch operation processing device provided by an embodiment of the present application is shown;
[0023] Fig.14 A block diagram of an electronic device for executing a method for processing a touch operation according to an embodiment of the present application is shown;
[0024] Fig.15 A storage unit for storing or carrying a program code for implementing a method for processing a touch operation according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] At present, electronic devices generally identify touch operations acting on the touch screen based on touch screen algorithms, but touch screen algorithms have some shortcomings. For example, when a user quickly alternates clicking on the touch screen with two fingers, the touch screen algorithm of the electronic device is easy to identify it as a sliding operation of the two fingers, that is, the continuous clicking operation is mistakenly identified as a sliding operation. Specifically, when a user quickly alternates clicking on the touch screen with two fingers, the expected phenomenon is that the electronic device detects that the first finger is pressed and then lifted, and the second finger is pressed and then lifted, so as to achieve a continuous clicking operation. However, the abnormal phenomenon is often that the electronic device detects that the first finger is pressed, and the second finger slides, that is, the two fingers appear to be continuous, which is mistakenly identified as a sliding operation, resulting in a poor user experience.
[0027] See also Figure 1-Figure 3 ,like Figure 1 As shown, for the SMS editing page, during the SMS editing process, the user continuously clicks the controls corresponding to the letters "h" and "f", such as Figure 2 and Figure 3 At this point, the user's original intention is to perform consecutive click operations on the letter "h" and the letter "f", but the electronic device may recognize it as a sliding operation from the letter "h" to the letter "f", resulting in misrecognition and a poor user experience.
[0028] In view of the above problems, the inventor has discovered after long-term research and proposed the touch operation processing method, device, electronic device and storage medium provided in the embodiments of the present application, which reduces the difficulty of adjacent touch operations being recognized as continuous click operations by reducing the click distance threshold of the electronic device when the resources in the preset whitelist are running in the foreground of the electronic device, thereby increasing the probability of adjacent touch operations being recognized as continuous click operations, reducing the problem of misidentification in the process of rapid continuous clicks, and improving the user experience. Among them, the specific touch operation processing method is described in detail in the subsequent embodiments.
[0029] See also Figure 4 , Figure 4 A flow chart of a method for processing touch operations provided by an embodiment of the present application is shown. The method is used to reduce the difficulty of adjacent touch operations being recognized as continuous click operations by reducing the click distance threshold of the electronic device when the electronic device runs a resource in a preset whitelist in the foreground, thereby increasing the probability of adjacent touch operations being recognized as continuous click operations, reducing the problem of misidentification during rapid continuous clicks, and improving the user experience. In a specific embodiment, the method for processing touch operations is applied to Fig.13 The touch operation processing device 200 and the electronic device 100 equipped with the touch operation processing device 200 are shown in FIG. Fig.14 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment may include a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited here. In this embodiment, the electronic device includes a touch screen. Figure 4 The process shown in FIG. 1 is described in detail, and the method for processing the touch operation may specifically include the following steps:
[0030] Step S101: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0031] In this embodiment, the electronic device may receive a resource activation instruction for instructing the electronic device to activate the target resource in the foreground.
[0032] In some embodiments, the electronic device may determine that a resource startup instruction has been received when a target touch operation is detected on the touch screen of the electronic device; may determine that a resource startup instruction has been received when a target touch operation is detected on a physical key of the electronic device; may determine that a resource startup instruction has been received when a target voice is detected input into the electronic device; may determine that a resource startup instruction has been received when a target shake operation is detected on the electronic device; may determine that a resource startup instruction has been received when the electronic device is detected in a target posture, etc., without limitation herein.
[0033] As an implementable manner, when a target touch operation acting on the touch screen of the electronic device is detected, determining that a resource startup instruction has been received may include: when a target sliding operation acting on the touch screen of the electronic device is detected, determining that a resource startup instruction has been received; when a target click operation acting on the touch screen of the electronic device is detected, determining that a resource startup instruction has been received; when a target pressing operation acting on the touch screen of the electronic device is detected, determining that a resource startup instruction has been received, etc., and no limitation is made here.
[0034] Optionally, the target resource may include at least one of a target application and a target page of the application. For example, the resource startup instruction may instruct the electronic device to start the target application in the foreground; may instruct the electronic device to start the target page of the application in the foreground; may also instruct the electronic device to start the target page of the target application in the foreground, etc., which are not limited here.
[0035] As one approach, if the target resource is a target application, then when a click operation acting on an application icon corresponding to the target application is detected, it can be determined that a resource start instruction has been received.
[0036] As another way, if the target resource is a target page of an application, then it can be determined that the resource start instruction has been received when a click operation acting on a target control in the application for triggering a jump to the target page is detected.
[0037] Step S102: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0038] In some embodiments, the electronic device may be provided with a click distance threshold. Optionally, the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfies adjacent touch operations that are determined to be continuous click operations. That is, based on the click distance threshold set by the electronic device, if touch points of adjacent touch operations acting on the touch screen are detected, the distance relationship between the touch points of the adjacent touch operations can be obtained, and if the distance relationship is less than or equal to the click distance threshold set by the electronic device, the adjacent touch operations can be determined as sliding operations; if the distance relationship is greater than the click distance threshold set by the electronic device, the adjacent touch operations can be determined as continuous click operations.
[0039] In some embodiments, the electronic device may be provided with a preset whitelist, wherein a plurality of resources (such as applications and / or application pages) may be added to the preset whitelist. Optionally, the resources added to the preset whitelist may be resources that are expected to increase the probability that the corresponding adjacent touch operations are determined as continuous click operations, for example, may be applications that are expected to increase the probability that the corresponding adjacent touch operations are determined as continuous click operations, may be pages of applications that are expected to increase the probability that the corresponding adjacent touch operations are determined as continuous click operations, etc., which are not limited here.
[0040] In this embodiment, when a resource activation instruction for instructing an electronic device to activate a target resource in the foreground is received, the target resource can be searched in a preset whitelist. If the target resource is found in the preset whitelist, it can be determined that the target resource is in the preset whitelist; if the target resource is not found in the preset whitelist, it can be determined that the target resource is not in the preset whitelist.
[0041] In some embodiments, if it is determined that the target resource is not in the preset whitelist, the target resource can be started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be the first click distance threshold. If it is determined that the target resource is not in the preset whitelist, it indicates that there is no expectation to increase the probability that the corresponding adjacent touch operation is determined to be a continuous click operation. Based on this, for the case where the target resource is not in the preset whitelist, the click distance threshold of the electronic device can be set to a larger first click distance threshold. At this time, if the distance relationship between the touch points of the adjacent touch operations acting on the target resource is within the first click distance threshold, the adjacent touch operation can be considered to be a sliding operation; if the distance relationship between the touch points of the adjacent touch operations acting on the target resource is outside the first click distance threshold, the adjacent touch operation can be considered to be a continuous click operation.
[0042] In some implementations, the first click distance threshold may be a click distance threshold set by default for the electronic device.
[0043] Step S103: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0044] In some embodiments, if it is determined that the target resource is in a preset whitelist, the target resource can be started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold. If it is determined that the target resource is in the preset whitelist, it indicates that it is expected to increase the probability that the corresponding adjacent touch operation is determined to be a continuous click operation. Based on this, for the case where the target resource is in the preset whitelist, the click distance threshold of the electronic device can be set to a smaller second click distance threshold. At this time, if the distance relationship between the touch points of the adjacent touch operations acting on the target resource is within the second click distance threshold, the adjacent touch operation can be considered to be a sliding operation; if the distance relationship between the touch points of the adjacent touch operations acting on the target resource is outside the second click distance threshold, the adjacent touch operation can be considered to be a continuous click operation.
[0045] In some embodiments, the second click distance threshold is smaller than the first click distance threshold. The first click distance threshold may be a click distance threshold set by default for the electronic device. The second click distance threshold may be obtained by subtracting a certain value from the click distance threshold set by default for the electronic device.
[0046] A method for processing touch operations provided in an embodiment of the present application receives a resource startup instruction for instructing to start a target resource in the foreground. If the target resource is not in a preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points on the touch screen that satisfy adjacent touch operations determined to be continuous click operations. If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold that is less than the first click distance threshold, so as to reduce the click distance threshold of the electronic device when running the resource in the preset whitelist in the foreground of the electronic device, thereby reducing the difficulty of adjacent touch operations being identified as continuous click operations, thereby increasing the probability of adjacent touch operations being identified as continuous click operations, reducing the problem of misidentification during rapid continuous clicks, and improving the user experience.
[0047] See also Figure 5 , Figure 5The schematic diagram of the process of the touch operation processing method provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which includes a touch screen. Figure 5 The process shown in FIG. 1 is described in detail. In this embodiment, the first click distance threshold includes a first sub-click distance threshold. The method for processing the touch operation may specifically include the following steps:
[0048] Step S201: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0049] Step S202: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0050] For the detailed description of step S201 - step S202 , please refer to step S101 - step S102 , which will not be repeated here.
[0051] Step S203: if a current adjacent touch operation acting on the touch screen is detected, determining first touch positions corresponding to the touch points of the current adjacent touch operations.
[0052] Optionally, the first click distance threshold may include a first sub-click distance threshold.
[0053] In this embodiment, when it is determined that the target resource is not in the preset whitelist and the click distance threshold of the electronic device is determined to be the first click distance threshold (first sub-click distance threshold), the touch operation acting on the touch screen can be detected. Among them, if the current adjacent touch operation acting on the touch screen is detected (the current adjacent touch operation acting on the interface of the target resource, such as the current adjacent touch operation acting on the page of the target application, or the current adjacent touch operation acting on the target page of the application), the touch positions corresponding to the touch points of the current adjacent touch operation can be determined as the first touch position. Optionally, the current adjacent touch operation can be triggered by one or more fingers of one hand of the user, or can be triggered by one or more fingers of both hands of the user, which is not limited here.
[0054] In some embodiments, the touch screen of the electronic device may be a capacitive touch screen, wherein the touch position corresponding to the touch point acting on the touch screen may be determined by utilizing the capacitive sensing principle of the touch screen, specifically, the touch screen identifies the coordinates corresponding to the touch points of the current adjacent touch operation, which may be by calculating the capacitance difference between the current adjacent touch operation contacting the touch screen and not contacting the touch screen, calculating the area of the capacitance difference, finding the peak difference value of the area, and judging whether it is within a certain preset reporting point threshold, thereby determining the reporting point coordinates corresponding to the touch points of the current adjacent touch operation as the first touch position.
[0055] As an implementable manner, the current adjacent touch operations may include at least two adjacent touch operations, for example, may include two adjacent touch operations, three adjacent touch operations, four adjacent touch operations, etc., which is not limited here.
[0056] Step S204: determining a first distance between the touch points of the current adjacent touch operations based on the first touch positions corresponding to the touch points of the current adjacent touch operations.
[0057] In this embodiment, when the first touch positions corresponding to the touch points of the current adjacent touch operations are determined, the distance between the touch points of the current adjacent touch operations can be determined as the first distance based on the first touch positions corresponding to the touch points of the current adjacent touch operations.
[0058] In some implementations, when determining the first touch positions corresponding to the touch points of the current adjacent touch operations, the first touch positions corresponding to the touch points of the current adjacent touch operations can be calculated using a distance algorithm to determine the first distance between the touch points of the current adjacent touch operations. Optionally, the distance algorithm may include: Wherein, dx represents the difference in abscissas between touch points of adjacent touch operations in a coordinate system established by the electronic device, and dy represents the difference in abscissas between touch points of adjacent touch operations in a coordinate system established by the electronic device.
[0059] Step S205: If the first distance is greater than the first sub-click distance threshold, the current adjacent touch operation is determined as a continuous click operation.
[0060] In some implementations, when the first spacing is obtained, the first spacing can be compared with the first sub-click distance threshold to determine the relationship between the first spacing and the first sub-click distance threshold. Optionally, the relationship between the first spacing and the first sub-click distance threshold may include: the first spacing is less than the first sub-click distance threshold, the first spacing is equal to the first sub-click distance threshold, or the first spacing is greater than the first sub-click distance threshold.
[0061] In this embodiment, if the first distance is determined to be greater than the first sub-click distance threshold based on the relationship between the first distance and the first sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is large, and the condition for determining it as a continuous click operation is met, and the current adjacent touch operation can be determined as a continuous click operation. Subsequently, the electronic device can execute a response corresponding to the continuous click operation.
[0062] Step S206: If the first distance is less than or equal to the first sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation.
[0063] In this embodiment, if the first spacing is determined to be less than or equal to the first sub-click distance threshold based on the relationship between the first spacing and the first sub-click distance threshold, then it can be considered that the spacing between the touch points of the adjacent touch operations is small, and the condition for determining it as a sliding operation is met (the condition for determining it as a continuous click operation is not met), and the current adjacent touch operation can be determined as a sliding operation. Subsequently, the electronic device can execute a response corresponding to the sliding operation.
[0064] Step S207: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0065] The specific description of step S207 can be found in step S103 and will not be repeated here.
[0066] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4 In the method for processing touch operations shown in the figure, in this embodiment, when the click distance threshold of the electronic device is determined as the first click distance threshold, if the current adjacent touch operation acting on the touch screen is detected, the first touch positions corresponding to the touch points of the current adjacent touch operations are determined, and based on the first touch positions corresponding to the touch points of the current adjacent touch operations, the first spacing between the touch points of the current adjacent touch operations is determined; if the first spacing is greater than the first sub-click distance threshold, the adjacent touch operation is determined as a continuous click operation; if the first spacing is less than or equal to the first sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation, so that for resources in a non-whitelist, a larger first sub-click distance threshold is set to distinguish and judge between continuous click operations and sliding operations, so as to ensure the accuracy of operation recognition of such resources.
[0067] See also Figure 6 , Figure 6The schematic diagram of the process of the touch operation processing method provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which includes a touch screen. Figure 6 The process shown in FIG. 1 is described in detail. In this embodiment, the first click distance threshold includes a second sub-click distance threshold. The touch operation processing method may specifically include the following steps:
[0068] Step S301: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0069] Step S302: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0070] For the detailed description of step S301 - step S302 , please refer to step S101 - step S102 , which will not be repeated here.
[0071] Step S303: if current adjacent touch operations acting on the touch screen are detected, first touch positions corresponding to the touch points of the current adjacent touch operations are determined.
[0072] Step S304: determining a first distance between the touch points of the current adjacent touch operations based on the first touch positions corresponding to the touch points of the current adjacent touch operations.
[0073] For the detailed description of step S303 - step S304 , please refer to step S203 - step S204 , which will not be repeated here.
[0074] Step S305: determining the second touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation.
[0075] Optionally, the first click distance threshold may also include a second sub-click distance threshold.
[0076] In this embodiment, when the current adjacent touch operation acting on the touch screen is detected, it can be detected whether there is a previous adjacent touch operation of the current adjacent touch operation. If so, the touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation can be determined as the second touch positions. Optionally, the previous adjacent touch operation can be triggered by one or more fingers of one hand of the user, or can be triggered by one or more fingers of both hands of the user, which is not limited here.
[0077] As a method, assuming that the current adjacent touch operation includes a first touch operation and a second touch operation, and the first touch operation is performed before the second touch operation, the previous adjacent touch operation of the current adjacent touch operation may include a third touch operation and the first touch operation, and the third touch operation is performed before the first touch operation.
[0078] In some embodiments, the touch screen of the electronic device may be a capacitive touch screen, wherein the touch position corresponding to the touch point acting on the touch screen may be determined by utilizing the capacitive sensing principle of the touch screen, specifically, the touch screen identifies the coordinates corresponding to the touch points of the previous adjacent touch operation, which may be by calculating the capacitance difference between the touch screen in contact with the previous adjacent touch operation and the touch screen in non-contact with the previous adjacent touch operation, calculating the area of the capacitance difference, finding the peak difference value of the area, and determining whether it is within a certain preset reporting point threshold, thereby determining the reporting point coordinates corresponding to the touch points of the previous adjacent touch operation as the second touch position.
[0079] Step S306: determining a second distance between the touch points of the previous adjacent touch operations based on the second touch positions corresponding to the touch points of the previous adjacent touch operations.
[0080] In this embodiment, when the second touch positions corresponding to the touch points of the previous adjacent touch operations are determined, the distance between the touch points of the previous adjacent touch operations can be determined as the second distance based on the second touch positions corresponding to the touch points of the previous adjacent touch operations.
[0081] In some embodiments, when determining the second touch positions corresponding to the touch points of the previous adjacent touch operation, the second touch positions corresponding to the touch points of the previous adjacent touch operation can be calculated using a distance algorithm to determine the second distance between the touch points of the previous adjacent touch operation.
[0082] Step S307: Determine a first target spacing based on the first spacing and the second spacing.
[0083] In this embodiment, when the first spacing and the second spacing are determined, the first target spacing can be determined based on the first spacing and the second spacing. As a way, when the first spacing and the second spacing are determined, the first spacing and the second spacing can be calculated by a spacing algorithm to determine the first target spacing. Optionally, the spacing algorithm may include d=a / (b+const), where a represents the first spacing, b represents the second spacing, and const is a constant.
[0084] Step S308: If the first target distance is greater than the second sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as continuous click operations.
[0085] In some implementations, when the first target distance is obtained, the first target distance can be compared with the second sub-click distance threshold to determine the relationship between the first target distance and the second sub-click distance threshold. Optionally, the relationship between the first target distance and the second sub-click distance threshold may include: the first target distance is less than the second sub-click distance threshold, the first target distance is equal to the second sub-click distance threshold, or the first target distance is greater than the second sub-click distance threshold.
[0086] In this embodiment, if the first target distance is determined to be greater than the second sub-click distance threshold based on the relationship between the first target distance and the second sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is large, and the condition for determining it as a continuous click operation is met, and the previous adjacent touch operation and the current adjacent touch operation can be determined as continuous click operations. Subsequently, the electronic device can execute a response corresponding to the continuous click operation.
[0087] Step S309: If the first target distance is less than or equal to the second sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations.
[0088] In this embodiment, if the first target distance is determined to be less than or equal to the second sub-click distance threshold based on the relationship between the first target distance and the second sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is small, and the condition for determining it as a sliding operation is met (the condition for determining it as a continuous click operation is not met), then the previous adjacent touch operation and the current adjacent touch operation can be determined as sliding operations. Subsequently, the electronic device can execute a response corresponding to the sliding operation.
[0089] Step S310: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0090] The specific description of step S310 can be found in step S103 and will not be repeated here.
[0091] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4In the method for processing touch operations shown in the embodiment, when the click distance threshold of the electronic device is determined as the first click distance threshold, if the current adjacent touch operation acting on the touch screen is detected, the first touch positions corresponding to the touch points of the current adjacent touch operation are determined, and the first spacing between the touch points of the current adjacent touch operation is determined based on the first touch positions corresponding to the touch points of the current adjacent touch operation, and the second touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation are determined, and the second spacing between the touch points of the previous adjacent touch operation is determined based on the second touch positions corresponding to the touch points of the previous adjacent touch operation, and the first target spacing is determined based on the first spacing and the second spacing, and if the first target spacing is greater than the second sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as continuous click operations, and if the first target spacing is less than or equal to the second sub-click operation, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations, so that for resources in the non-whitelist, a larger second sub-click distance threshold is set to distinguish and judge between continuous click operations or sliding operations, so as to ensure the accuracy of operation recognition of such resources.
[0092] See also Figure 7 , Figure 7 The schematic diagram of the process of the touch operation processing method provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which includes a touch screen. Figure 7 The process shown in FIG. 1 is described in detail. In this embodiment, the second click distance threshold includes a third sub-click distance threshold. The touch operation processing method may specifically include the following steps:
[0093] Step S401: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0094] Step S402: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0095] Step S403: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0096] For the detailed description of steps S401 to S403 , please refer to steps S101 to S103 , which will not be repeated here.
[0097] Step S404: if a current adjacent touch operation acting on the touch screen is detected, determining third touch positions corresponding to the touch points of the current adjacent touch operations.
[0098] Optionally, the second click distance threshold may include a third sub-click distance threshold.
[0099] In this embodiment, when it is determined that the target resource is in the preset whitelist and the click distance threshold of the electronic device is determined as the second click distance threshold (third sub-click distance threshold), the touch operation acting on the touch screen can be detected. Among them, if the current adjacent touch operation acting on the touch screen is detected (the current adjacent touch operation acting on the interface of the target resource, such as the current adjacent touch operation acting on the page of the target application, or the current adjacent touch operation acting on the target page of the application), the touch positions corresponding to the touch points of the current adjacent touch operation can be determined as the third touch position. Optionally, the current adjacent touch operation can be triggered by one or more fingers of one hand of the user, or can be triggered by one or more fingers of both hands of the user, which is not limited here.
[0100] In some embodiments, the touch screen of the electronic device may be a capacitive touch screen, wherein the touch position corresponding to the touch point acting on the touch screen may be determined by utilizing the capacitive sensing principle of the touch screen, specifically, the touch screen identifies the coordinates corresponding to the touch points of the current adjacent touch operation, which may be by calculating the capacitance difference between the current adjacent touch operation contacting the touch screen and not contacting the touch screen, calculating the area of the capacitance difference, finding the peak difference value of the area, and judging whether it is within a certain preset reporting point threshold, thereby determining the reporting point coordinates corresponding to the touch points of the current adjacent touch operation as the third touch position.
[0101] Step S405: determining a third distance between the touch points of the current adjacent touch operations based on the third touch positions corresponding to the touch points of the current adjacent touch operations.
[0102] In this embodiment, when the third touch positions corresponding to the touch points of the current adjacent touch operations are determined, the distance between the touch points of the current adjacent touch operations can be determined as the third distance based on the third touch positions corresponding to the touch points of the current adjacent touch operations.
[0103] In some embodiments, when determining the third touch positions corresponding to the touch points of the current adjacent touch operations, the third touch positions corresponding to the touch points of the current adjacent touch operations can be calculated using a distance algorithm to determine the third distance between the touch points of the current adjacent touch operations.
[0104] Step S406: If the third distance is greater than the third sub-click distance threshold, the current adjacent touch operation is determined as a continuous click operation.
[0105] In some implementations, when the third spacing is obtained, the third spacing can be compared with a third sub-click distance threshold to determine the relationship between the third spacing and the third sub-click distance threshold. Optionally, the relationship between the third spacing and the third sub-click distance threshold can include: the third spacing is less than the third sub-click distance threshold, the third spacing is equal to the third sub-click distance threshold, or the third spacing is greater than the third sub-click distance threshold.
[0106] In this embodiment, if the third distance is determined to be greater than the third sub-click distance threshold based on the relationship between the third distance and the third sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is large, and the condition for determining it as a continuous click operation is met, and the current adjacent touch operation can be determined as a continuous click operation. Subsequently, the electronic device can execute a response corresponding to the continuous click operation.
[0107] Step S407: If the third distance is less than or equal to the third sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation.
[0108] In this embodiment, if the third distance is determined to be less than or equal to the third sub-click distance threshold based on the relationship between the third distance and the third sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is small, and the condition for determining it as a sliding operation is met (the condition for determining it as a continuous click operation is not met), and the current adjacent touch operation can be determined as a sliding operation. Subsequently, the electronic device can execute a response corresponding to the sliding operation.
[0109] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4In the method for processing touch operations shown in the figure, in this embodiment, when the click distance threshold of the electronic device is determined as the second click distance threshold, if the current adjacent touch operation acting on the touch screen is detected, the third touch positions corresponding to the touch points of the current adjacent touch operations are determined, and based on the third touch positions corresponding to the touch points of the current adjacent touch operations, the third distance between the touch points of the current adjacent touch operations is determined; if the third distance is greater than the third sub-click distance threshold, the adjacent touch operation is determined as a continuous click operation; if the third distance is less than or equal to the third sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation, so that for the resources in the whitelist, a smaller first sub-click distance threshold is set to distinguish and judge between continuous click operations and sliding operations, so as to ensure the accuracy of operation recognition of such resources.
[0110] See also Figure 8 , Figure 8 The schematic diagram of the process of the touch operation processing method provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which includes a touch screen. Figure 8 The process shown in FIG. 1 is described in detail. In this embodiment, the second click distance threshold includes a fourth sub-click distance threshold. The method for processing the touch operation may specifically include the following steps:
[0111] Step S501: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0112] Step S502: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0113] Step S503: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0114] For the detailed description of steps S501 to S503 , please refer to steps S101 to S103 , which will not be repeated here.
[0115] Step S504: if a current adjacent touch operation acting on the touch screen is detected, then determining third touch positions corresponding to the touch points of the current adjacent touch operation.
[0116] Step S505: determining a third distance between the touch points of the current adjacent touch operations based on the third touch positions corresponding to the touch points of the current adjacent touch operations.
[0117] For the detailed description of step S504 to step S505, please refer to step S404 to step S405, which will not be repeated here.
[0118] Step S506: determining fourth touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation.
[0119] Optionally, the second click distance threshold may also include a fourth sub-click distance threshold.
[0120] In this embodiment, when the current adjacent touch operation acting on the touch screen is detected, it can be detected whether there is a previous adjacent touch operation of the current adjacent touch operation. If so, the touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation can be determined as the fourth touch position. Optionally, the previous adjacent touch operation can be triggered by one or more fingers of one hand of the user, or can be triggered by one or more fingers of both hands of the user, which is not limited here.
[0121] In some embodiments, the touch screen of the electronic device may be a capacitive touch screen, wherein the touch position corresponding to the touch point acting on the touch screen may be determined by utilizing the capacitive sensing principle of the touch screen, specifically, the touch screen identifies the coordinates corresponding to the touch points of the previous adjacent touch operation, which may be by calculating the capacitance difference between the touch screen contacting and non-contacting of the previous adjacent touch operation, calculating the area of the capacitance difference, finding the peak difference value of the area, and determining whether it is within a certain preset reporting point threshold, thereby determining the reporting point coordinates corresponding to the touch points of the previous adjacent touch operation as the fourth touch position.
[0122] Step S507: determining a fourth distance between the touch points of the previous adjacent touch operations based on the fourth touch positions corresponding to the touch points of the previous adjacent touch operations.
[0123] In this embodiment, when the fourth touch positions corresponding to the touch points of the previous adjacent touch operations are determined, the distance between the touch points of the previous adjacent touch operations can be determined as the fourth distance based on the fourth touch positions corresponding to the touch points of the previous adjacent touch operations.
[0124] In some embodiments, when determining the fourth touch position corresponding to each touch point of the previous adjacent touch operation, the fourth touch position corresponding to each touch point of the previous adjacent touch operation can be calculated using a distance algorithm to determine the fourth distance between the touch points of the previous adjacent touch operation.
[0125] Step S508: Determine a second target distance based on the third distance and the fourth distance.
[0126] In this embodiment, when the third spacing and the fourth spacing are determined, the second target spacing can be determined based on the third spacing and the fourth spacing. As a way, when the third spacing and the fourth spacing are determined, the third spacing and the fourth spacing can be calculated by a spacing algorithm to determine the second target spacing.
[0127] Step S509: If the second target distance is greater than the fourth sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as continuous click operations.
[0128] In some implementations, when the second target distance is obtained, the second target distance may be compared with the fourth sub-click distance threshold to determine the relationship between the second target distance and the fourth sub-click distance threshold. Optionally, the relationship between the second target distance and the fourth sub-click distance threshold may include: the second target distance is less than the fourth sub-click distance threshold, the second target distance is equal to the fourth sub-click distance threshold, or the second target distance is greater than the fourth sub-click distance threshold.
[0129] In this embodiment, if the second target distance is determined to be greater than the fourth sub-click distance threshold based on the relationship between the second target distance and the fourth sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is large, and the condition for determining it as a continuous click operation is met, and the previous adjacent touch operation and the current adjacent touch operation can be determined as continuous click operations. Subsequently, the electronic device can execute a response corresponding to the continuous click operation.
[0130] Step S510: If the second target distance is less than or equal to the fourth sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations.
[0131] In this embodiment, if the second target distance is determined to be less than or equal to the fourth sub-click distance threshold based on the relationship between the second target distance and the fourth sub-click distance threshold, then it can be considered that the distance between the touch points of the adjacent touch operations is small, and the condition for determining it as a sliding operation is met (the condition for determining it as a continuous click operation is not met), then the previous adjacent touch operation and the current adjacent touch operation can be determined as sliding operations. Subsequently, the electronic device can execute a response corresponding to the sliding operation.
[0132] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4 In the method for processing touch operations shown in the embodiment, when the click distance threshold of the electronic device is determined as the second click distance threshold, if the current adjacent touch operation acting on the touch screen is detected, the third touch positions corresponding to the touch points of the current adjacent touch operation are determined, and the third spacing between the touch points of the current adjacent touch operation is determined based on the third touch positions corresponding to the touch points of the current adjacent touch operation, and the fourth touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation are determined, and the fourth spacing between the touch points of the previous adjacent touch operation is determined based on the fourth touch positions corresponding to the touch points of the previous adjacent touch operation, and the second target spacing is determined based on the third spacing and the fourth spacing, and if the second target spacing is greater than the fourth sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as continuous click operations, and if the second target spacing is less than or equal to the second sub-click operation, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations, so that for the resources in the whitelist, a larger second sub-click distance threshold is set to distinguish and judge between continuous click operations or sliding operations, so as to ensure the accuracy of operation recognition of such resources.
[0133] See also Fig. 9 , Fig. 9 A schematic diagram of a process flow of a method for processing a touch operation provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, which includes a touch screen. Fig. 9 The process shown in FIG. 1 is described in detail, and the method for processing the touch operation may specifically include the following steps:
[0134] Step S601: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0135] Step S602: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0136] Step S603: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0137] For the detailed description of steps S601 to S603 , please refer to steps S101 to S103 , which will not be repeated here.
[0138] Step S604: If the target resource switches from running in the foreground of the electronic device to running in the background of the electronic device, or the target resource switches from running in the foreground of the electronic device to exiting, the click distance threshold of the electronic device is switched from the second click distance threshold to the first click distance threshold.
[0139] In this embodiment, during the process of running the target resource in the foreground of the electronic device, the running state of the target resource can be detected. The running state of the target resource may include: the target resource continues to run in the foreground of the electronic device, the target resource switches from running in the foreground of the electronic device to running in the background of the electronic device, or the target resource switches from running in the foreground of the electronic device to exiting the running.
[0140] Optionally, the operating status of the target resource can be detected in real time; the operating status of the target resource can be detected at preset time intervals; the operating status of the target resource can be detected at preset time points; the operating status of the target resource can also be detected according to other preset rules, etc., which are not limited here.
[0141] As an implementable manner, if the target resource continues to run in the foreground of the electronic device, the click distance threshold of the electronic device can be kept set to the second click distance threshold.
[0142] As another feasible method, if the target resource is switched from running in the foreground of the electronic device to running in the background of the electronic device, the click distance threshold of the electronic device can be switched from the second click distance threshold to the first click distance threshold. By adapting and setting different click distance thresholds according to the running scenario of the target resource, the touch operation can be better identified and the user experience can be improved.
[0143] As another feasible method, if the target resource switches from running in the foreground of the electronic device to exiting the running, the click distance threshold of the electronic device can be switched from the second click distance threshold to the first click distance threshold. By adapting and setting different click distance thresholds according to the running scenario of the target resource, the touch operation can be better identified and the user experience can be improved.
[0144] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4 The touch operation processing method shown in the figure, in this embodiment, when the target resource switches from running in the foreground of the electronic device to running in the background of the electronic device, or the target resource switches from running in the foreground of the electronic device to exiting, the click distance threshold of the electronic device is switched from the second click distance threshold to the first click distance threshold, thereby adapting to different resource scenarios and configuring different click distance thresholds to ensure the accuracy of operation recognition.
[0145] See also Fig.10 , Fig.10 A schematic diagram of a process flow of a method for processing a touch operation provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, which includes a touch screen. Fig.10 The process shown in FIG. 1 is described in detail, and the method for processing the touch operation may specifically include the following steps:
[0146] Step S701: Acquire resources to be added.
[0147] In this embodiment, the resource to be added may be obtained. Optionally, the resource to be added may include an application to be added, or may include a page of the application to be added.
[0148] In some implementations, the resource to be added may be automatically determined and acquired by the electronic device, or the resource to be added may be selected by a user from the electronic device, and the electronic device acquires the resource to be added based on the user's selection, which is not limited here.
[0149] Step S702: If the resource to be added has an information input function, the resource to be added is added to the preset whitelist.
[0150] In this embodiment, when the resource to be added is obtained, it can be determined whether the resource to be added has an information input function. If it is determined that the resource to be added has an information input function, it indicates that when the resource to be added is running in the foreground of the electronic device, there may be a user need to quickly and continuously click the resource, and the resource to be added can be added to the preset whitelist; if it is determined that the resource to be added does not have an information input function, it indicates that when the resource to be added is running in the foreground of the electronic device, there is no user need to quickly and continuously click the resource, and the resource to be added may not be added to the preset whitelist.
[0151] In some embodiments, if the resource to be added is an application, if the application is an input method application, it can be determined that the application can input information through the keyboard and it has the information input function, then the resource to be added can be added to the preset whitelist; if the application is a calculator application, it can be determined that the application can input information through the keyboard and it has the information input function, then the resource to be added can be added to the preset whitelist.
[0152] In some embodiments, if the resource to be added is a page of an application, if the page of the application is a payment page, it can be determined that the page of the application can be input with a password through the keyboard, and it has an information input function, then the resource to be added can be added to a preset whitelist; if the resource to be added is a page of an application, if the page of the application is a text message editing page, it can be determined that the page of the application can be input with information through the keyboard, and it has an information input function, then the resource to be added can be added to the preset whitelist.
[0153] See also Fig.11 , Fig.11 This application shows Fig.10 The process flow diagram of step S702 of the touch operation processing method shown in FIG. Fig.11 The process shown is described in detail, and the method may specifically include the following steps:
[0154] Step S7021: If the resource to be added has an information input function, determine the spacing between multiple information input controls corresponding to the information input function of the resource to be added.
[0155] Optionally, the information input function of the resource to be added is implemented through multiple information input controls, that is, the user can input information through the information input controls. The multiple information input controls may include multiple keys in a keyboard.
[0156] In some implementations, if it is determined that the resource to be added has an information input function, the spacing between multiple information input controls corresponding to the information input function of the resource to be added can be determined. As a method, the coordinates corresponding to each of the multiple information input controls corresponding to the information input function of the resource to be added can be obtained, and the spacing between the multiple information input controls can be determined based on the coordinates corresponding to each of the multiple information input controls.
[0157] Step S7022: If the distance between the multiple information input controls is less than the distance threshold, the resource to be added is added to the preset whitelist.
[0158] In some implementations, the electronic device may pre-set and store a spacing threshold, which is used as a basis for determining the spacing between multiple information input controls. Therefore, in this embodiment, when the spacing between multiple information input controls is obtained, the spacing between the multiple information input controls may be compared with the spacing threshold.
[0159] Among them, if the spacing between multiple information input controls is less than the spacing threshold, it can be considered that the spacing between the multiple information input controls is too close. When information is input through continuous click operations on multiple information input controls, the electronic device may mistakenly identify the continuous click operations as sliding operations, thereby causing misrecognition of touch operations. The resource to be added can be added to the preset whitelist.
[0160] Step S703: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0161] Step S704: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0162] Step S705: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0163] For the detailed description of steps S703 to S705 , please refer to steps S101 to S103 , which will not be repeated here.
[0164] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4The touch operation processing method shown in the embodiment also obtains the resource to be added. If the resource to be added has the information input function, the resource to be added is added to the preset whitelist, thereby improving the accuracy and rationality of the resources in the preset whitelist.
[0165] See also Fig.12 , Fig.12 A schematic diagram of a process flow of a method for processing a touch operation provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, which includes a touch screen. Fig.12 The process shown in FIG. 1 is described in detail, and the method for processing the touch operation may specifically include the following steps:
[0166] Step S801: receiving a resource activation instruction, wherein the resource activation instruction is used to instruct the electronic device to activate a target resource in the foreground.
[0167] For the detailed description of step S801, please refer to step S101, which will not be repeated here.
[0168] Step S802: Obtain the resource name corresponding to the target resource.
[0169] Optionally, the resources added to the preset whitelist may be added in the form of resource names, that is, the content actually added and recorded in the preset whitelist is the resource name of each resource.
[0170] In this embodiment, since the content recorded in the preset whitelist is the resource name of each resource, in order to determine whether the target resource is in the preset whitelist, the resource name corresponding to the target resource can be obtained. For example, the application name of the target application can be obtained, or the page name of the target page of the application can be obtained.
[0171] Step S803: Based on the resource name, search for the target resource in the preset whitelist.
[0172] In this embodiment, when the resource name of the target resource is obtained, the target resource can be searched in a preset whitelist based on the resource name.
[0173] In some embodiments, if there is a resource name in the preset whitelist that matches the resource name of the target resource, it can be determined that the target resource is in the preset whitelist; if there is no resource name in the preset whitelist that matches the resource name of the target resource, it can be determined that the target resource is not in the preset whitelist.
[0174] Step S804: If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0175] Step S805: If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
[0176] For the detailed description of step S804 to step S805, please refer to step S102 to step S103, which will not be repeated here.
[0177] Compared with the touch operation processing method provided in an embodiment of the present application, Figure 4 The touch operation processing method shown in the figure, this embodiment also obtains the resource name corresponding to the target resource, and searches for the target resource in a preset whitelist based on the resource name, thereby improving the efficiency and accuracy of resource search.
[0178] See also Fig.13 , Fig.13 FIG. 2 shows a block diagram of a touch operation processing device provided by an embodiment of the present application. The touch operation processing device 200 is applied to the above electronic device, which includes a touch screen. Fig.13 The block diagram shown in FIG. 1 is used to illustrate that the touch operation processing device 200 includes: a resource startup instruction receiving module 210, a first click distance threshold determination module 220 and a second click distance threshold determination module 230, wherein:
[0179] The resource start instruction receiving module 210 is used to receive a resource start instruction, wherein the resource start instruction is used to instruct the electronic device to start a target resource in the foreground.
[0180] The first click distance threshold determination module 220 is used to start the target resource in the foreground of the electronic device if the target resource is not in the preset whitelist, and determine the click distance threshold of the electronic device as the first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations.
[0181] The second click distance threshold determination module 230 is used to start the target resource in the foreground of the electronic device if the target resource is in the preset whitelist, and determine the click distance threshold of the electronic device as the second click distance threshold, wherein the second click distance threshold is less than the first click distance threshold.
[0182] Further, the first click distance threshold includes a first sub-click distance threshold, and the touch operation processing device 200 further includes: a first touch position determination module, a first spacing determination module, a first continuous click operation determination module and a first sliding operation determination module, wherein:
[0183] The first touch position determination module is configured to determine first touch positions corresponding to touch points of the current adjacent touch operations if a current adjacent touch operation acting on the touch screen is detected.
[0184] The first distance determining module is used to determine a first distance between the touch points of the current adjacent touch operations based on first touch positions corresponding to the touch points of the current adjacent touch operations.
[0185] The first continuous click operation determination module is configured to determine the current adjacent touch operation as a continuous click operation if the first spacing is greater than the first sub-click distance threshold.
[0186] The first sliding operation determining module is configured to determine the current adjacent touch operation as a sliding operation if the first distance is less than or equal to the first sub-click distance threshold.
[0187] Furthermore, the first click distance threshold further includes a second sub-click distance threshold, and the touch operation processing device 200 further includes: a second touch position determination module, a second distance determination module, a first target distance determination module, a second continuous click operation determination module, and a second sliding operation determination module, wherein:
[0188] The second touch position determination module is used to determine the second touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation.
[0189] The second distance determining module is used to determine the second distance between the touch points of the previous adjacent touch operation based on the second touch positions corresponding to the touch points of the previous adjacent touch operation.
[0190] The first target distance determination module is used to determine a first target distance based on the first distance and the second distance.
[0191] The second continuous click operation determination module is configured to determine the current adjacent touch operation and the previous adjacent touch operation as continuous click operations if the first target distance is greater than the second sub-click distance threshold.
[0192] The second sliding operation determining module is configured to determine the current adjacent touch operation and the previous adjacent touch operation as sliding operations if the first target distance is less than or equal to the second sub-click distance threshold.
[0193] Further, the second click distance threshold includes a third sub-click distance threshold, and the touch operation processing device 200 further includes: a third touch position determination module, a third distance determination module, a third continuous click operation determination module, and a third sliding operation determination module, wherein:
[0194] The third touch position determination module is configured to determine the third touch positions corresponding to the touch points of the current adjacent touch operations if the current adjacent touch operations acting on the touch screen are detected.
[0195] The third distance determining module is used to determine a third distance between the touch points of the current adjacent touch operations based on third touch positions corresponding to the touch points of the current adjacent touch operations.
[0196] The third continuous click operation determination module is used to determine the current adjacent touch operation as a continuous click operation if the third interval is greater than the third sub-click distance threshold.
[0197] The third sliding operation determining module is used to determine the current adjacent touch operation as a sliding operation if the third distance is less than or equal to the third sub-click distance threshold.
[0198] Furthermore, the second click distance threshold further includes a fourth tap distance threshold, and the touch operation processing device 200 further includes: a fourth touch position determination module, a fourth distance determination module, a second target distance determination module, a fourth continuous click operation determination module, and a fourth sliding operation determination module, wherein:
[0199] The fourth touch position determination module is used to determine the fourth touch positions corresponding to the touch points of the previous adjacent touch operation of the current adjacent touch operation.
[0200] The fourth distance determining module is used to determine a fourth distance between the touch points of the previous adjacent touch operations based on fourth touch positions corresponding to the touch points of the previous adjacent touch operations.
[0201] The second target distance determination module is used to determine the second target distance based on the third distance and the fourth distance.
[0202] The fourth continuous click operation determination module is used to determine the current adjacent touch operation and the previous adjacent touch operation as continuous click operations if the second target distance is greater than the fourth sub-click distance threshold.
[0203] The fourth sliding operation determining module is used to determine the current adjacent touch operation and the previous adjacent touch operation as sliding operations if the second target distance is less than or equal to the fourth sub-click distance threshold.
[0204] Furthermore, the touch operation processing device 200 further includes: a first click distance threshold switching module and a second click distance threshold switching module, wherein:
[0205] The first click distance threshold switching module is used to switch the click distance threshold of the electronic device from the second click distance threshold to the first click distance threshold if the target resource switches from running in the foreground of the electronic device to running in the background of the electronic device.
[0206] The second click distance threshold switching module is used to switch the click distance threshold of the electronic device from the second click distance threshold to the first click distance threshold if the target resource switches from running in the foreground of the electronic device to exiting the running.
[0207] Furthermore, the touch operation processing device 200 further includes: a to-be-added resource acquisition module and a to-be-added resource adding module, wherein:
[0208] The resource acquisition module to be added is used to obtain the resources to be added.
[0209] The resource adding module to be added is used for adding the resource to be added to the preset whitelist if the resource to be added has an information input function.
[0210] Furthermore, the module for adding resources to be added includes: a submodule for determining the distance between controls and a submodule for adding resources to be added, wherein:
[0211] The control spacing determination submodule is used to determine the spacing between multiple information input controls corresponding to the information input function of the resource to be added if the resource to be added has an information input function.
[0212] The resource adding submodule to be added is used to add the resource to be added to the preset whitelist if the distance between the multiple information input controls is less than the distance threshold.
[0213] Furthermore, the touch operation processing device 200 further includes: a resource name acquisition module and a target resource search module, wherein:
[0214] The resource name acquisition module is used to obtain the resource name corresponding to the target resource.
[0215] The target resource search module is used to search for the target resource in the preset whitelist based on the resource name.
[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0217] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0218] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0219] See also Fig.14 , which shows a structural block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a touch screen 130, and one or more applications, wherein one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0220] Among them, the processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 110 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0221] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing functions (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0222] The touch screen 130 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device 100. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos, and any combination thereof. In one example, the touch screen 130 can be a liquid crystal display (LCD) or an organic light-emitting diode (OLED), which is not limited here.
[0223] See also Fig.15, which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 300 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0224] The computer readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer readable storage medium 300 has storage space for program code 310 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 310 can be compressed, for example, in an appropriate form.
[0225] In summary, the touch operation processing method, device, electronic device and storage medium provided in the embodiments of the present application receive a resource startup instruction for instructing to start a target resource in the foreground. If the target resource is not in a preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points on the touch screen that satisfy adjacent touch operations determined to be continuous click operations. If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold that is less than the first click distance threshold, so as to reduce the click distance threshold of the electronic device when running the resources in the preset whitelist in the foreground of the electronic device, thereby reducing the difficulty of adjacent touch operations being identified as continuous click operations, thereby increasing the probability of adjacent touch operations being identified as continuous click operations, reducing the problem of misidentification during rapid continuous clicks, and improving the user experience.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned 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 spirit and 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 an electronic device, the electronic device includes a touch screen, and the method includes: Receiving a resource startup instruction, wherein the resource startup instruction is used to instruct the electronic device to start a target resource in the foreground; If the target resource is not in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations; or If the target resource is in the preset whitelist, the target resource is started in the foreground of the electronic device, and the click distance threshold of the electronic device is determined to be a second click distance threshold, wherein the second click distance threshold is smaller than the first click distance threshold.
2. The method according to claim 1, characterized in that: The first click distance threshold includes a first sub-click distance threshold, and after the target resource is started in the foreground of the electronic device if the target resource is not in the preset whitelist and the click distance threshold of the electronic device is determined as the first click distance threshold, the method further includes: If a current adjacent touch operation acting on the touch screen is detected, determining first touch positions corresponding to touch points of the current adjacent touch operations; Determining a first distance between touch points of the current adjacent touch operations based on first touch positions corresponding to the touch points of the current adjacent touch operations; If the first distance is greater than the first sub-click distance threshold, determining the current adjacent touch operation as a continuous click operation; or If the first distance is less than or equal to the first sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation.
3. The method according to claim 2, characterized in that The first click distance threshold further includes a second sub-click distance threshold, and after determining the first distance between the touch points of the current adjacent touch operations based on the first touch positions corresponding to the touch points of the current adjacent touch operations, further includes: Determine second touch positions corresponding to touch points of a previous adjacent touch operation of the current adjacent touch operation; Determining a second distance between the touch points of the previous adjacent touch operations based on the second touch positions corresponding to the touch points of the previous adjacent touch operations; Determining a first target spacing based on the first spacing and the second spacing; If the first target distance is greater than the second sub-click distance threshold, determining the current adjacent touch operation and the previous adjacent touch operation as continuous click operations; or If the first target distance is less than or equal to the second sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations.
4. The method according to claim 1, characterized in that: The second click distance threshold includes a third sub-click distance threshold, and after the step of starting the target resource in the foreground of the electronic device if the target resource is in the preset whitelist and determining the click distance threshold of the electronic device as the second click distance threshold, further includes: If a current adjacent touch operation acting on the touch screen is detected, determining third touch positions corresponding to the touch points of the current adjacent touch operation; determining a third distance between the touch points of the current adjacent touch operations based on third touch positions corresponding to the touch points of the current adjacent touch operations; If the third distance is greater than the third sub-click distance threshold, determining the current adjacent touch operation as a continuous click operation; or If the third distance is less than or equal to the third sub-click distance threshold, the current adjacent touch operation is determined as a sliding operation.
5. The method according to claim 4, characterized in that The second click distance threshold further includes a fourth sub-click distance threshold, and after determining the third distance between the touch points of the current adjacent touch operations based on the third touch positions corresponding to the touch points of the current adjacent touch operations, further includes: Determine fourth touch positions corresponding to touch points of a previous adjacent touch operation of the current adjacent touch operation; determining a fourth distance between the touch points of the previous adjacent touch operations based on fourth touch positions corresponding to the touch points of the previous adjacent touch operations; Determining a second target spacing based on the third spacing and the fourth spacing; If the second target distance is greater than the fourth sub-click distance threshold, determining the current adjacent touch operation and the previous adjacent touch operation as continuous click operations; or If the second target distance is less than or equal to the fourth sub-click distance threshold, the current adjacent touch operation and the previous adjacent touch operation are determined as sliding operations.
6. The method according to any one of claims 1 to 5, characterized in that after starting the target resource in the foreground of the electronic device and determining the click distance threshold of the electronic device as the second click distance threshold, the method further comprises: If the target resource is switched from running in the foreground of the electronic device to running in the background of the electronic device, switching the click distance threshold of the electronic device from the second click distance threshold to the first click distance threshold; or If the target resource switches from running in the foreground of the electronic device to exiting the running, the click distance threshold of the electronic device is switched from the second click distance threshold to the first click distance threshold.
7. The method according to any one of claims 1 to 5, characterized in that: Before receiving the resource start instruction, the method further includes: Get the resources to be added; If the resource to be added has an information input function, the resource to be added is added to the preset whitelist.
8. The method according to claim 7, characterized in that If the resource to be added has an information output function, adding the resource to be added to the preset whitelist includes: If the resource to be added has an information input function, determining the spacing between multiple information input controls corresponding to the information input function of the resource to be added; If the distance between the multiple information input controls is less than the distance threshold, the resource to be added is added to the preset whitelist.
9. The method according to any one of claims 1 to 5, characterized in that: After receiving the resource start instruction, the method further includes: Obtain the resource name corresponding to the target resource; Based on the resource name, the target resource is searched in the preset whitelist.
10. The method according to any one of claims 1 to 5, characterized in that: The target resource includes at least one of a target application and a target page of the application.
11. A touch operation processing device, characterized in that: Applied to an electronic device, the electronic device includes a touch screen, and the device includes: A resource startup instruction receiving module, used for receiving a resource startup instruction, wherein the resource startup instruction is used for instructing the electronic device to start a target resource in the foreground; a first click distance threshold determination module, configured to, if the target resource is not in a preset whitelist, start the target resource in the foreground of the electronic device, and determine the click distance threshold of the electronic device as a first click distance threshold, wherein the click distance threshold of the electronic device is used to characterize the minimum distance relationship between touch points acting on the touch screen that satisfy adjacent touch operations that are determined to be continuous click operations; or A second click distance threshold determination module is used to start the target resource in the foreground of the electronic device if the target resource is in the preset whitelist, and determine the click distance threshold of the electronic device as a second click distance threshold, wherein the second click distance threshold is less than the first click distance threshold.
12. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 10.