Touch control method and related device

By differentiating between pressing and sliding operations through pressure trends and distance thresholds, the method improves the accuracy of touch responses in electronic devices, addressing incorrect interpretations and non-responses.

CN117707351BActive Publication Date: 2024-12-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310512156.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-12-17
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

Electronic devices often fail to accurately distinguish between pressing and sliding operations on touch-sensitive surfaces, leading to incorrect responses or non-responses, which degrade user experience.

Method used

The method involves detecting a first touch operation with increasing pressure and a subsequent touch operation with stable pressure to determine if it's a pressing or sliding action, using pressure value trends and distance thresholds to differentiate between the two.

Benefits of technology

This approach reduces incorrect responses to pressing operations interpreted as sliding and non-responses to short sliding operations, enhancing user interaction accuracy and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707351B_ABST
    Figure CN117707351B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a touch method and related equipment. The method includes: at a first moment, the electronic device detects a first touch operation, and the electronic device does not perform a sliding operation process; in the first touch operation, the touch object moves a first distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows an increasing trend; at a second moment, the electronic device detects a second touch operation, and the electronic device performs a sliding operation process; in the second touch operation, the touch object moves a second distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows a stable trend; the second distance is less than or equal to the first distance. In this way, the scenario in which the electronic device does not respond to the short sliding operation after receiving the short sliding operation can be reduced; and the scenario in which the electronic device mistakenly responds to the pressing operation as a sliding operation can be reduced; thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a touch control method and related equipment. Background Art

[0002] The electronic device may be configured with a touch device, for example, a laptop may be configured with a touchpad, a mobile phone may be configured with a touch screen, a tablet may be configured with a touch screen, etc. The user may perform an operation in the touch device, and the electronic device may perform a corresponding function according to the operation. For example, the operation may include a pressing operation, a sliding operation, etc. In some scenarios, the touch device may be a touchpad. The electronic device displays a desktop, and an icon of a music application is displayed at the cursor position. The user presses the touchpad, and in response to the pressing operation, the electronic device may set the icon of the music application to a selected state. In other scenarios, the user slides the touchpad, and in response to the sliding operation, the electronic device may move the cursor position.

[0003] However, in a possible implementation, when a user performs a sliding operation or a pressing operation on the touch pad, the electronic device may fail to respond or respond incorrectly. Summary of the invention

[0004] The embodiments of the present application provide a touch method and related devices, which are applied to the field of terminal technology and can reduce the scenario in which the electronic device does not respond to a short sliding operation after receiving the short sliding operation; and reduce the scenario in which the electronic device mistakenly responds to a pressing operation as a sliding operation.

[0005] In the first aspect, the embodiment of the present application proposes a touch method and related equipment. The method includes: at a first moment, the electronic device detects a first touch operation, and the electronic device does not perform a sliding operation process; in the first touch operation, the touch object moves a first distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows an increasing trend; at a second moment, the electronic device detects a second touch operation, and the electronic device performs a sliding operation process; in the second touch operation, the touch object moves a second distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows a stable trend; the second distance is less than or equal to the first distance, and the first moment is earlier than the second moment. In this way, when the user is performing a pressing operation and the finger is slightly offset, the electronic device will not respond to the operation as a sliding operation according to the slight offset, reducing the scene of the electronic device responding incorrectly; and when the touch object slides a short distance in the touch area, the electronic device can perform a sliding operation according to the pressure value showing a stable trend, reducing the scene of the electronic device not responding when the user performs a short sliding operation; thereby improving the user's use experience.

[0006] The first touch operation can be Figure 5The pressing operation shown in a in the figure, the second touch operation can be Figure 8 The sliding operation shown in a in FIG.

[0007] In a possible implementation, the number of buffered pressure values ​​in the electronic device is M, and the pressure values ​​showing an increasing trend satisfy the following conditions: N>a×(M-1), and p M >p1; where N is p i >p i-1 The number of, a is the first preset threshold; p i is the i-th pressure value cached by the electronic device, p i-1 is the i-1th pressure value cached by the electronic device, p M is the Mth pressure value cached by the electronic device, p1 is the first pressure value cached by the electronic device; and / or, N>b×(M-1), L>c×(M-1), and p M >p1; where b is the second preset threshold; c is the third preset threshold; L is p i ≤p i-1 And p i +Val1>p i-1 Val1 is a first preset margin value; and / or, K>d×(M-2), and p M >p1; where K is p i >p i-2 The number of i-2 is the i-2th pressure value cached by the electronic device; d is the fourth preset threshold; and / or, K>e×(M-2), J>f×(M-2) and p M >p1; where e is the fifth preset threshold; f is the sixth preset threshold; J is p i ≤p i-2 And p i +Val1>p i-2 In this way, the electronic device can accurately obtain the change trend of the pressure value based on multiple methods, so as to determine whether the touch operation is a sliding operation according to the change trend of the pressure value.

[0008] In a possible implementation, before the electronic device does not perform the sliding operation process, it includes: the electronic device collects pressure values ​​and touch coordinates, the touch coordinates are used to characterize the touch position of the touch object in the touch area; the electronic device calculates the change trend of the pressure value, and the electronic device calculates the moving distance according to the touch coordinates; the electronic device does not perform the sliding operation process, including: when the change trend of the pressure value and / or the moving distance meets the first preset condition, the electronic device does not perform the sliding operation process; wherein the first preset condition includes: the moving distance is less than or equal to the first sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend; the first sliding threshold is less than the second sliding threshold. In this way, the scenario where the electronic device mistakenly responds to the pressing operation as a sliding operation can be reduced, thereby improving the user experience.

[0009] In a possible implementation, a pressure sampling rate and a touch sampling rate are set in the electronic device, the pressure sampling rate includes the frequency at which the electronic device collects pressure values, and the touch sampling rate includes the frequency at which the electronic device collects touch coordinates; the pressure sampling rate is less than or equal to the touch sampling rate; when the change trend of the pressure value and / or the moving distance meet the first preset condition, the electronic device does not perform the sliding operation process, including: the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is less than or equal to the first sliding threshold, the electronic device does not perform the sliding operation process; or, if the moving distance is greater than the first sliding threshold, the electronic device determines whether the pressure value is increasing; if the pressure value is increasing, the electronic device does not perform the sliding operation process. In this way, when the pressure sampling rate is less than or equal to the touch sampling rate, the electronic device can determine whether the touch operation is a sliding operation according to the above determination process; reduce the scenario where the electronic device mistakenly responds to the pressing operation as a sliding operation, thereby improving the user experience.

[0010] In a possible implementation, a pressure sampling rate and a touch sampling rate are set in the electronic device, the pressure sampling rate includes the frequency at which the electronic device collects pressure values, and the touch sampling rate includes the frequency at which the electronic device collects touch coordinates; the pressure sampling rate is greater than the touch sampling rate; when the change trend of the pressure value and / or the moving distance meet the first preset condition, the electronic device does not perform the sliding operation process, including: the electronic device determines whether the pressure value is increasing; if the pressure value is increasing, the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the electronic device does not perform the sliding operation process; or, if the pressure value is not increasing, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is less than or equal to the first sliding threshold, the electronic device does not perform the sliding operation process. In this way, when the pressure sampling rate is greater than the touch sampling rate, the electronic device can determine whether the touch operation is a sliding operation according to the above determination process; reduce the scenario where the electronic device mistakenly responds to the pressing operation as a sliding operation, thereby improving the user experience.

[0011] In a possible implementation, the electronic device performs a sliding operation process, including: when the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device performs the sliding operation process; wherein the second preset condition includes: the moving distance is greater than the second sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend; the first sliding threshold is less than the second sliding threshold. In this way, the user can reduce the number of sliding operations performed by the user, and when the user's finger moves a short distance in the touch area, the electronic device cannot respond to the sliding operation, thereby improving the user experience.

[0012] In a possible implementation, a pressure sampling rate and a touch sampling rate are set in the electronic device, and the pressure sampling rate is less than or equal to the touch sampling rate; when the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device executes a sliding operation process, including: the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the electronic device determines whether the change trend of the pressure value is an increasing trend; if the change trend of the pressure value is not an increasing trend, the electronic device executes the sliding operation process; or, if the moving distance is greater than the second sliding threshold, the electronic device executes the sliding operation process. In this way, when the pressure sampling rate is less than or equal to the touch sampling rate, the electronic device can determine whether the touch operation is a sliding operation according to the above determination process; reduce the scene where the electronic device does not respond to the sliding operation, thereby improving the user experience.

[0013] In a possible implementation, a pressure sampling rate and a touch sampling rate are set in the electronic device, and the pressure sampling rate is greater than the touch sampling rate; when the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device executes a sliding operation process, including: the electronic device determines whether the change trend of the pressure value is an increasing trend; if the change trend of the pressure value is an increasing trend, the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is greater than the second sliding threshold, the electronic device executes the sliding operation process; or, if the change trend of the pressure value is not an increasing trend, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the electronic device executes the sliding operation process. In this way, when the pressure sampling rate is greater than the touch sampling rate, the electronic device can determine whether the touch operation is a sliding operation according to the above determination process; reduce the scene where the electronic device does not respond to the sliding operation, thereby improving the user experience.

[0014] In a possible implementation, the first sliding threshold and the second sliding threshold are both adjustable values; wherein the first sliding threshold is positively correlated with the moving speed of the touch object in the touch area, and the second sliding threshold is positively correlated with the moving speed of the touch object in the touch area. In this way, the electronic device can adjust the first sliding threshold and the second sliding threshold according to the sliding speed, which can improve the accuracy of the electronic device in determining whether the touch operation is a sliding operation.

[0015] In a possible implementation, the moving distance D satisfies any of the following formulas:

[0016]

[0017] Where (x0, y0) is the initial touch coordinate of the touch object contacting the touch area; (x i ,y i ) is the i+1th touch coordinate collected by the electronic device during the movement of the touch object; or,

[0018]

[0019] Among them, (x i-1 ,y i-1 ) is the i-th touch coordinate collected by the electronic device during the movement of the touch object, and n is the number of touch coordinates. In this way, the electronic device can accurately obtain the moving distance based on a variety of methods, so as to subsequently determine whether the touch operation is a sliding operation based on the moving distance.

[0020] In a second aspect, an embodiment of the present application provides an electronic device, which may also be referred to as a terminal, a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc.

[0021] The electronic device comprises: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method as in the first aspect.

[0022] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.

[0023] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.

[0024] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.

[0025] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of a scenario in which an electronic device incorrectly responds to a touch operation in a possible implementation;

[0027] Figure 2 A schematic diagram of the principle of an electronic device incorrectly responding to a touch operation in a possible implementation;

[0028] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0031] Figure 6 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0032] Figure 7 A schematic diagram of a pressure value changing trend with a pressing operation provided in an embodiment of the present application;

[0033] Figure 8 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0034] Fig. 9 A schematic diagram of a pressure value changing trend with a sliding operation provided in an embodiment of the present application;

[0035] Fig.10 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0036] Fig.11 A schematic diagram of a pressure buffer storing pressure values ​​provided in an embodiment of the present application;

[0037] Fig.12 A schematic diagram of a coordinate cache storing touch coordinates provided in an embodiment of the present application;

[0038] Fig.13 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0039] Fig.14 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0040] Fig.15 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0041] Fig.16 A schematic diagram of a touch control method provided in an embodiment of the present application;

[0042] Fig.17 A schematic diagram of internal interaction of a touch control method provided in an embodiment of the present application;

[0043] Fig.18 A schematic diagram of the structure of a touch control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0045] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0046] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.

[0047] In a possible implementation, when a user sometimes performs a pressing operation or a sliding operation on a touch-sensitive device of an electronic device, the electronic device does not respond or responds incorrectly to the operation.

[0048] Taking the electronic device as a laptop as an example, the following Figure 1 Scenarios of erroneous responses of electronic devices in possible implementations are described.

[0049] In one possible implementation scenario, Figure 1 As shown in interface a in FIG. 1 , the electronic device includes a screen 101 and a touch panel 102. The electronic device displays an icon 103 of a music application and a cursor 104, wherein the positions of the icon 103 of the music application and the cursor 104 partially overlap. When the electronic device receives a pressing operation on the touch panel by the user, the electronic device displays Figure 1 The interface shown in b. Figure 1 In the interface shown in b, the position of the cursor 104 moves, and the position of the cursor 104 no longer overlaps with the position of the music application icon 103. The electronic device responds incorrectly to the pressing operation.

[0050] In another possible implementation scenario, Figure 1 As shown in the c interface in FIG. 1 , the electronic device displays an icon 103 of a music application and a cursor 104, wherein the positions of the icon 103 of the music application and the cursor 104 partially overlap. When the electronic device receives a short sliding operation of the user on the touch pad, the electronic device displays Figure 1 The interface shown in d in the figure, wherein the short sliding operation can be understood as the sliding distance of the user's finger on the touchpad is relatively short, and the embodiment of the present application does not specifically limit the boundary value between the short sliding operation and the normal sliding operation. Figure 1 In the interface shown in d, the position of the cursor 104 does not move, and the position of the cursor 104 still partially overlaps with the position of the music application icon 103. The electronic device does not respond to the sliding operation.

[0051] The reasons for the above electronic device error response scenario are:

[0052] In the first scenario, the contact area between the user's finger and the touchpad increases during the process from touching the touchpad to pressing the touchpad, and the coordinates of the finger when the electronic device detects the finger pressing the touchpad may be offset from the coordinates when the finger just touches the touchpad. Figure 2 As shown, in L1, as the finger presses the touchpad, the contact area between the finger and the touchpad (the contact area can be an ellipse for example) gradually increases. In L1′, the coordinate point recognized by the electronic device when the finger just touches the touchpad can be point A, and the coordinate point recognized by the electronic device when the finger presses the touchpad can be point B. It can be seen that there is an offset between point A and point B, and the moving distance between point A and point B is l1.

[0053] The electronic device is provided with a sliding distance threshold. When the moving distance l1 exceeds the sliding distance threshold, the electronic device may identify the operation as a sliding operation, thereby causing the electronic device to mistakenly respond to the user's pressing operation as a sliding operation. Figure 1 The interface shown in b.

[0054] For the second scenario, the electronic device receives a sliding operation with a short sliding distance (also called a short sliding operation). During the sliding process, the contact area between the finger and the touchpad (the contact area can be an ellipse as an example) is roughly the same, such as Figure 2As shown in L2 in FIG. In L2′, the coordinate point recognized by the electronic device before the user moves the finger may be point C, and the coordinate point recognized by the electronic device after the user moves the finger may be point D. It can be seen that there is sliding between point C and point D, and the distance deviation between point C and point D is l2.

[0055] The electronic device is set with a sliding distance threshold. When the user's finger slides lightly and short on the touchpad, the sliding distance of the finger may be less than the sliding distance threshold. The electronic device may not recognize the operation as a sliding operation, which results in the electronic device being unable to respond to the short sliding operation when receiving the short sliding operation. Figure 1 The interface shown in d.

[0056] It can be seen that the electronic device can identify the pressing operation and the short sliding operation according to the sliding distance threshold. In order to improve the accuracy of the electronic device in responding to the pressing operation, the sliding distance threshold can be increased. However, after increasing the sliding distance threshold, the moving distance required for the electronic device to respond to the short sliding operation increases, which may cause the electronic device to not respond to the short sliding operation with a small distance deviation. Therefore, the method of controlling the moving distance only by increasing the sliding distance threshold is not applicable.

[0057] It has been found that when the user performs a pressing operation, the pressure applied by the finger on the touchpad gradually increases; and when the user's finger moves on the touchpad, the pressure applied by the finger on the touchpad is relatively stable, and there is no trend of the pressure changing from small to large.

[0058] In view of this, an embodiment of the present application provides a touch method, and the electronic device can comprehensively determine whether the user operation is a sliding operation based on the pressure change trend and / or moving distance when the user performs the touch operation. For example, when the user performs a touch operation on the touchpad and the user's finger moves a short distance on the touchpad, the electronic device can determine whether the pressure applied by the user to the touchpad is increasing; if the pressure value is not increasing, the electronic device can execute the sliding operation process, which can reduce the scenario where the electronic device does not respond to the short sliding operation after receiving the short sliding operation; for another example, if the pressure value is increasing, the electronic device may not execute the sliding operation process, which can reduce the scenario where the electronic device mistakenly responds to the pressing operation as a sliding operation, thereby improving the user experience.

[0059] In the embodiment of the present application, the electronic device may also be referred to as a terminal device. The electronic device in the embodiment of the present application may also be any form of electronic device, for example, the electronic device may include a handheld device, a vehicle-mounted device, and the like. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, user equipment (UE), mobile stations (MS), mobile terminals (MT), access terminals, subscriber units, subscriber stations, mobile stations, mobile stations, remote stations, remote terminals, mobile devices, terminals, wireless communication devices, user agents or user devices, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loops (WLANs), wireless cellular telephones, wireless telephones, wireless cellular ... loop, WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, terminal device in a 5G network or terminal device in a future evolved public land mobile communication network (public land mobile network, PLMN), etc., and the embodiments of the present application are not limited to this.

[0060] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0061] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

[0062] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a CPU, a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating systems, Unix operating systems, Android operating systems, iOS operating systems, or windows operating systems. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0063] For example, Figure 3 A schematic structural diagram of an electronic device is shown.

[0064] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

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

[0066] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The controller may be the nerve center and command center of the terminal device, and the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

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

[0068] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a USB interface, etc.

[0069] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device. In other embodiments of the present application, the terminal device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0070] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0071] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor. For example, in an embodiment of the present application, the processor may enable the terminal device to execute the power consumption control method provided in an embodiment of the present application by running instructions stored in the internal memory.

[0072] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.

[0073] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also power the terminal device through the power management module 141.

[0074] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory interface 120, the display screen 194, and the wireless communication module 160. In some embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0075] The wireless communication module 160 can provide wireless communication solutions for application in terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0076] The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna.

[0077] The terminal device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information. The terminal device can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0078] The terminal device can implement audio functions such as audio playback or recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0079] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The terminal device may include 1 or N speakers 170A, where N is a positive integer greater than 1. The terminal device can listen to music, videos, or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones.

[0080] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The terminal device can receive key input and generate key signal input related to user settings and function control of the terminal device.

[0081] The indicator 192 may be an indicator light, which may be used to indicate the charging status, or a change in the amount of electricity, etc.

[0082] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0083] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1. The terminal device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.

[0084] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a Windows system with a layered architecture as an example to exemplify the software structure of the terminal device.

[0085] Figure 4 It is a software structure block diagram of the terminal device of an embodiment of the present application.

[0086] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Windows system is divided into user state and kernel state. Among them, the user state includes the application layer and the subsystem dynamic link library. The kernel state can be divided into the executive body, the kernel and the device driver, as well as the hardware abstraction layer (HAL), etc.

[0087] like Figure 4 As shown, the application layer includes computer housekeeper, office, browser, social, music, video, game and other applications. Applications can include system applications and third-party applications. The application layer can also include an environment subsystem, which can display certain subsets of basic execution system services to applications in a specific form to provide an execution environment for applications.

[0088] The subsystem dynamic link library may include an application programming interface (API) module, which includes Windows API, Windows native API, etc. Among them, both Windows API and Windows native API can provide system call entry and internal function support for applications, the difference is that Windows native API is an API native to the Windows system. For example, Windows API may include user.dll and kernel.dll, and Windows native API may include ntdll.dll. Among them, user.dll is a Windows user interface interface, which can be used to perform operations such as creating windows and sending messages. Kernel.dll is used to provide applications with an interface to access the kernel. ntdll.dll is an important Windows NT kernel-level file. When Windows starts, ntdll.dll resides in a specific write-protected area in the memory, so that other programs cannot occupy this memory area.

[0089] The executive body may include a process manager, a virtual memory manager, an I / O manager, a power module, an operating system event driver (OsEventDriver) node, and the like.

[0090] The process manager is used to create and terminate processes and threads.

[0091] The Virtual Memory Manager implements "virtual memory". The Virtual Memory Manager also provides basic support for the Cache Manager.

[0092] The I / O manager performs device-independent input / output and further processes calls appropriate device drivers.

[0093] The system event driven node can interact with the kernel and driver layer, for example, interact with the graphics card driver, and after determining that there is a GPU video decoding event, report the GPU video decoding event to the scene recognition engine.

[0094] The power module, also known as the power manager, manages the power state changes of all devices that support power state changes.

[0095] The kernel and driver layer include the kernel and device drivers.

[0096] The kernel is an abstraction of the processor architecture, isolating the executive body from the differences in the processor architecture to ensure the portability of the system. The kernel can perform thread scheduling and dispatching, trap handling and exception dispatching, interrupt handling and dispatching, etc.

[0097] Device drivers run in kernel mode and are interfaces between the I / O system and related hardware. Device drivers may include graphics card drivers, audio drivers, pressure drivers, touch drivers, camera drivers, keyboard drivers, etc.

[0098] HAL is a kernel-state module that can hide various hardware-related details, such as I / O interfaces, interrupt controllers, and multi-processor communication mechanisms, and provide a unified service interface for different hardware platforms running Windows, achieving portability on multiple hardware platforms. It should be noted that in order to maintain the portability of Windows, Windows internal components and user-written device drivers do not directly access the hardware, but call routines in HAL.

[0099] In the embodiment of the present application, the HAL may include a storage module and a logic control module.

[0100] The logic control module is used to control the working mode and solution processing flow of the touch area, and the logic control module can also control the communication process of the electronic device.

[0101] The storage module is used to store programs and various data. In the embodiment of the present application, the storage module may include a coordinate buffer and a pressure buffer, wherein the coordinate buffer is used to cache touch coordinates, and the pressure buffer is used to cache pressure values.

[0102] The electronic device may further include a hardware layer, wherein the hardware layer includes a Bluetooth module, a WiFi module, a pressure detection module, a touch detection module, and the like.

[0103] The touch detection module, also called a capacitance detection chip, is used to detect touch information of a touch object. In the embodiment of the present application, the touch detection module can obtain the touch coordinates of the touch object in the touch area.

[0104] The pressure detection module is used to detect the pressure applied by the touch object to the touch area.

[0105] It should be noted that the embodiments of the present application are only illustrated using the Windows system as an example. In other operating systems (such as the Android system, the IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.

[0106] The embodiment of the present application takes the electronic device as a laptop computer and the touch control device as a touch pad as an example to illustrate the touch control method of the embodiment of the present application. The implementation of the present application does not limit the form of the electronic device and the touch device. The electronic device can be a touch device configured with pressure information. For example, the electronic device can be a mobile phone, and the touch control device can be a touch screen; the electronic device can be a tablet computer, and the touch control device can be a touch screen; the electronic device can also be a display, and the touch control device can be a display panel; the electronic device can also be a laptop computer, and the touch control device can be a touch screen, etc.

[0107] The following combination Figure 5 The touch control method provided in the embodiment of the present application is described. Figure 5 A schematic diagram of an interface of a touch control method provided in an embodiment of the present application is shown. Figure 5 As shown:

[0108] For example, Figure 5 As shown in the interface a in FIG. , the electronic device may include a screen 501 and a touchpad 502 , and the screen 501 displays an icon 503 of a music application and a cursor 504 , wherein the icon 503 of the music application is in an unselected state, and the positions of the icon 503 of the music application and the cursor 504 overlap.

[0109] When the user's finger performs a pressing operation on the touch panel 502, the electronic device may display the Figure 5 The interface shown in b. Figure 5 In the interface shown in b, the position of the cursor 504 has not moved, and the icon 503 of the music application is in a selected state; wherein, during the user's pressing operation, the user's finger has not left the touchpad 502, and the user's finger has moved a certain distance on the touchpad.

[0110] The user's finger moves a certain distance on the touchpad. It can be understood that in actual scenarios, when the user performs a pressing operation, the user's finger moves from the time the user's finger just touches the touchpad to the time the user presses the touchpad. For example, the scenario in which the user's finger just touches the touchpad can be as follows: Figure 6 As shown in a, where Figure 6 The dotted line shown in a in FIG. 1 can be understood as the pressing position of the user's finger recognized by the electronic device. When the user's finger presses down, the contact area between the finger and the touchpad continues to expand, and at the same time, the pressing position of the user's finger recognized by the electronic device will also change, such as Figure 6 As shown in b. It can be seen that Figure 6 The dashed line shown in a Figure 6 The dotted lines shown in b in do not overlap, and the moving distance of the two dotted lines is l1, so the user's finger moves a distance of l1 on the touchpad.

[0111] In the embodiment of the present application, although the user's finger moves a certain distance in the touchpad when performing a pressing operation, the electronic device does not recognize the pressing operation as a sliding operation. This is because when the user's finger presses the touchpad, the pressure value received by the touchpad is increasing. The electronic device in the embodiment of the present application can determine that the operation is not a sliding operation based on the increasing pressure value.

[0112] Exemplarily, in an embodiment of the present application, at a first moment, the electronic device detects a first touch operation, and the electronic device does not perform a sliding operation process; in the first touch operation, the touch object moves a first distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area tends to increase.

[0113] The first touch operation can be Figure 5 The touch object may be a tool for the user to interact with the electronic device, for example, the touch object may be a finger of the user, or a stylus, etc. The touch area may be the first distance and may be l1. It is understandable that when the user uses the stylus to perform a pressing operation, the stylus may slide a small distance in the touch area due to improper movements, and this scenario will not be described separately in the embodiments of the present application.

[0114] Touch operations may include pressing operations and sliding operations. The touch object can achieve single-click, double-click, drag, scroll, zoom, and rotate effects by controlling the direction, number, and duration of the touch operation. For example, the touch object can perform two pressing operations to achieve a double-click effect; the touch object can perform a sliding operation after double-clicking to select a target to achieve a drag effect. The embodiments of the present application do not limit the specific manifestation of the touch operation.

[0115] Figure 7FIG. 4 shows a schematic diagram of a change trend of the pressure value on the touch area when the user performs a pressing operation, taking the number of pressure values ​​as 9 as an example. Figure 7 As shown:

[0116] The electronic device collected 9 pressure values, Figure 7 In the pressure value change trend diagram shown, the horizontal axis is the pressure value p1, p2...p9, and the vertical axis reflects the force applied by the user in the touch area. The vertical axis can be the actual pressure value in units of kilogram force, Newton, etc., or the actual pressure value can be converted to a corresponding digital value. The embodiment of the present application does not limit this. It can be seen that in the pressure value change trend diagram, p2>p1, p3>p2...p9>p8. The pressure value gradually increases.

[0117] In the embodiment of the present application, the change trend of the pressure value can be a uniform growth or a non-uniform growth. The non-uniform growth can be a fluctuation in the growth process of the pressure value. The embodiment of the present application does not limit the form of the pressure value showing an increasing trend. The embodiment of the present application takes the number of pressure values ​​as 9 as an example to illustrate the change trend of the pressure value, but this value does not limit the touch method of the embodiment of the present application.

[0118] It should be noted that the embodiment of the present application takes the process of the electronic device performing a pressing operation as an example to illustrate the process of the electronic device not performing a sliding operation. The embodiment of the present application can also use other gesture operation processes to illustrate the process of the electronic device not performing a sliding operation, and the embodiment of the present application does not limit this. For example, other gesture operations can be single-click, double-click, short-time pressing, long-time pressing, etc.

[0119] In a touch control method provided by an embodiment of the present application, at a first moment, when a touch object moves a first distance in a touch control area, the touch object does not leave the touch control area, and the pressure value of the touch object pressing the touch control area shows an increasing trend, the electronic device does not perform a sliding operation process. In this way, when the user is performing a pressing operation and the finger is slightly offset, the electronic device will not respond to the operation as a sliding operation based on the slight offset, thereby reducing the scenario of the electronic device responding incorrectly, thereby improving the user experience.

[0120] In some scenarios, the user may perform a sliding operation in the touch area, and the sliding distance of the touch object in the touch area is relatively short.

[0121] For example, Figure 8 A schematic diagram of an interface of a touch control method provided in an embodiment of the present application is shown. Figure 8 As shown:

[0122] For example, Figure 8As shown in a in FIG. 8 , the electronic device may include a screen 801 and a touch panel 802 , and an icon 803 of a music application and a cursor 804 are displayed on the screen 801 , wherein the position of the icon 803 of the music application and the position of the cursor 804 partially overlap.

[0123] When the user's finger performs a sliding operation on the touch panel 802, the electronic device may display a Figure 8 The interface shown in b. Figure 8 In the interface shown in b, the position of the cursor 804 moves, and the position of the cursor 804 does not overlap with the position of the music application icon 803; wherein, during the user's sliding operation, the user's finger does not leave the touchpad 802, and the user's finger moves a certain distance on the touchpad, and the moving distance of the user's finger before and after the movement is l2.

[0124] Exemplarily, in an embodiment of the present application, at a second moment, the electronic device detects a second touch operation, and the electronic device executes a sliding operation process; in the second touch operation, the touch object moves a second distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows a steady trend; the first moment is earlier than the second moment.

[0125] The second touch operation can be Figure 8 The sliding operation shown in a in FIG. 1 ; the touch object may be a tool for a user to interact with the electronic device, for example, the touch object may be a finger of the user, or a stylus, etc.

[0126] Fig. 9 FIG. 4 shows a schematic diagram of a change trend of the pressure value on the touch area when the user performs a sliding operation, taking the number of pressure values ​​as 9 as an example. Fig. 9 As shown:

[0127] The electronic device collected 9 pressure values, Fig. 9 In the schematic diagram of the pressure value change trend shown, the horizontal axis is the pressure values ​​p1, p2...p9, and the vertical axis reflects the force applied by the user on the touch area.

[0128] In actual scenarios, when the touch object just touches the touch area, the force applied by the touch object to the touch area is small; when the touch object moves in the touch area, the force applied by the touch object to the touch area is relatively stable. For example, p1 may correspond to the pressure value applied when the user's finger just touches the touchpad, p2>p1; during the movement of the finger, the pressure values ​​of p2, p3...p9 are relatively stable, with no obvious increasing or decreasing trend.

[0129] The embodiment of the present application takes the number of pressure values ​​as 9 as an example to illustrate the change trend of the pressure value, but this value does not limit the touch method of the embodiment of the present application.

[0130] In a possible implementation, the second distance is less than or equal to the first distance. Figure 5 When the finger moves a distance l1 during the pressing operation shown in a in FIG. Figure 8 During the sliding operation shown in a in FIG. 1 , the moving distance of the finger is l2; wherein the moving distance l1 may be greater than or equal to the moving distance l2.

[0131] The touch control method provided in the embodiment of the present application can comprehensively determine whether the user operation is a sliding operation based on the pressure change trend and / or the moving distance, so there will be a scenario where the moving distance l1 of the pressing operation is greater than or equal to the moving distance l2 of the sliding operation. Taking the scenario where the first distance = the second distance = l as an example, the touch object also moves a distance l in the touch control area. If the pressure value shows an increasing trend, the electronic device does not perform the sliding operation; if the pressure value shows an increasing trend, the electronic device does not perform the sliding operation.

[0132] In a possible implementation, the electronic device executes the sliding operation process when the moving distance is greater than the sliding distance threshold; the electronic device does not execute the sliding operation process when the moving distance is less than or equal to the sliding distance threshold. Therefore, in a possible implementation, it is rare that the moving distance l1 of the pressing operation is greater than or equal to the moving distance l2 of the sliding operation.

[0133] It should be noted that, in order to facilitate the embodiment of the touch method provided by the embodiment of the present application, the embodiment of the present application exemplarily provides a scenario that is different from the possible implementation scenario, but the scenario does not limit the embodiment of the present application. For example, the second distance can be less than or equal to the first distance, the second distance can also be greater than the first distance, the first moment can be earlier than the second moment, and the first moment can also be later than the second moment, and the embodiment of the present application does not limit this.

[0134] In a touch control method provided by an embodiment of the present application, at a second moment, when a touch object moves a second distance in a touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows a steady trend, the electronic device performs a sliding operation process; wherein the second distance is less than or equal to the first distance, and the first moment is earlier than the second moment. In this way, when the touch object slides a short distance in the touch area, the electronic device can perform a sliding operation according to the pressure value showing a steady trend, reducing the scenario where the electronic device does not respond when the user performs a short sliding operation, thereby improving the user experience.

[0135] The above embodiments are combined Figure 5-Figure 9 The applicable scenarios of the touch control method of the embodiment of the present application are introduced. Figure 10-Figure 17 The process of the touch control method according to the embodiment of the present application is described.

[0136] For example, Fig.10 A schematic diagram of a touch control method provided in an embodiment of the present application is shown. Fig.10 As shown:

[0137] S1001. The electronic device collects pressure values ​​and touch coordinates.

[0138] The touch coordinates are used to represent the touch position of the touch object in the touch area. When the touch object performs a touch operation in the touch area, the electronic device can collect the pressure value and touch coordinates of the touch object when touching.

[0139] In one possible implementation, the electronic device may periodically collect pressure values ​​and touch coordinates to obtain multiple pressure values ​​and multiple touch coordinates. The pressure values ​​and the touch-to-air coordinates may be in a corresponding relationship or in a non-corresponding relationship; for example, when the frequency at which the electronic device collects pressure values ​​is the same as the frequency at which the touch coordinates are collected, the electronic device simultaneously obtains the pressure values ​​and the touch-to-air coordinates, and the pressure values ​​and the touch-to-air coordinates correspond to the same touch position. When the frequency at which the electronic device collects pressure values ​​is different from the frequency at which the touch coordinates are collected, the touch position corresponding to the pressure value is different from the touch position corresponding to the touch-to-air coordinates. The embodiments of the present application are not limited to this.

[0140] S1002: The electronic device calculates a change trend of the pressure value, and the electronic device calculates a moving distance according to the touch coordinates.

[0141] The change trend of the pressure value may be an increasing trend, a stable trend, etc. The moving distance may be a moving distance of the touch object in the touch control area.

[0142] In the embodiment of the present application, at the initial moment when the touch object contacts the touch area, the electronic device can obtain an initial pressure value, and then the electronic device can collect and cache the pressure value over time. The electronic device can cache the pressure value based on a pressure buffer. The method for caching the pressure value of the electronic device can be as follows: Fig.11 As shown:

[0143] Exemplarily, the specification of the pressure cache is M, and the pressure cache can cache M pressure values, for example, M can be 10; wherein the M value can be positively correlated with the memory and / or computing power of the electronic device. Fig.11 As shown in a in the figure. The pressure values ​​include: p1, p2, p3…p i …p M .

[0144] When the electronic device continues to collect pressure values ​​p M+1 When the electronic device will p M+1 Push to the end of the pressure buffer in sequence and clear the oldest cached pressure value; for example, Fig.11As shown in b, the electronic device will p M+1 After caching into the pressure cache, p1 is cleared to ensure that the number of pressure values ​​in the pressure cache is M.

[0145] The electronic device may obtain a change trend of the pressure value based on the pressure value in the pressure buffer. For example, in a first implementation, the electronic device may obtain a change trend of the pressure value based on the change trend of two adjacent pressure values ​​(for example, p i >p i-1 ) to determine the overall change trend of the pressure value. In the second implementation, the electronic device can determine the overall change trend of the pressure value based on the change trend of two adjacent pressure values ​​and the change trend after adding the margin value. In the third implementation, the electronic device can determine the overall change trend of the pressure value based on the change trend of two pressure values ​​separated by one pressure value (for example, p i >p i-2 ) to determine the overall change trend of the pressure value. In a fourth implementation, the electronic device may determine the overall change trend of the pressure value based on the change trend of two pressure values ​​separated by one pressure value and the change trend after adding the margin value. These four implementations are described below.

[0146] In the first implementation, the electronic device can determine the overall change trend of the pressure value according to the change trend of two adjacent pressure values, and the pressure value showing an increasing trend satisfies the following conditions:

[0147] N>a×(M-1), and p M >p1.

[0148] Where N is p i >p i-1 The number of, a is the first preset threshold. M is the Mth pressure value cached by the electronic device, p1 is the first pressure value cached by the electronic device; p i is the i-th pressure value cached by the electronic device, p i-1 The i-1th pressure value cached by the electronic device.

[0149] The pressure buffer caches M pressure values, and there can be M-1 comparison results between two adjacent pressure values; among them, N comparison results are that the current pressure value is greater than the previous pressure value (p i >p i-1 ); M-1-N comparison results are that the current pressure value is less than or equal to the previous pressure value (p i ≤p i-1 ).

[0150] When p i >p i-1 The ratio of the number of comparison results to the total number of comparison results exceeds a first preset threshold, and p M>p1, the electronic device determines that the pressure value is increasing.

[0151] For example, the first preset threshold is 70%. i > i-1 The number of comparison results of which accounts for more than 70% of the total number of comparison results, and p M >p1, the electronic device determines that the pressure value is increasing.

[0152] In a second implementation, the electronic device may determine the overall change trend of the pressure value according to the change trend of two adjacent pressure values ​​and the change trend after adding the margin value.

[0153] The pressure values ​​collected by the electronic device actually have certain data fluctuations. The embodiment of the present application can reduce the pressure data fluctuations through the margin value Val and improve the accuracy of the calculation method. Among them, the pressure value with an increasing trend meets the following conditions:

[0154] N>b×(M-1), L>c×(M-1), and p M >p1.

[0155] Wherein, b is the second preset threshold, c is the third preset threshold, L is p i ≤p i-1 And p i +Val1>p i-1 , Val1 is the first preset margin value.

[0156] The pressure buffer caches M pressure values, and there can be M-1 comparison results between two adjacent pressure values; among them, N comparison results are that the current pressure value is greater than the previous pressure value (p i > i-1 ); M-1-N comparison results are that the current pressure value is less than or equal to the previous pressure value (p i ≤p i-1 ); Among them, among the M-1-N comparison results, L comparison results are p i +Val1>p i-1 .

[0157] When p i > i-1 The ratio of the number of comparison results to the total number of comparison results exceeds the second threshold, p i ≤p i-1 And p i +Val1>p i-1 The ratio of the number of comparison results to the total number of comparison results exceeds the third threshold, and p M >p1, the electronic device determines that the pressure value is increasing.

[0158] The first preset threshold, the second preset threshold, and the third preset threshold satisfy: c < b < a. For example, the second preset threshold is 50%, and the third preset threshold is 40%. When the proportion of the number of comparison results where p i > p i-1 in the total number of comparison results exceeds 50%, and p i ≤ p i-1 and p i + Val1 > p i-1 in the total number of comparison results exceeds 40%, and when p M > p1, the electronic device determines that the pressure value is showing an increasing trend.

[0159] In the embodiments of the present application, the first preset margin value can be a fixed value or a variable, and the embodiments of the present application do not limit this. Exemplarily, the first preset margin value is a variable, and the first preset margin value can be positively correlated with the pressure value. For example, the first preset margin value does not exceed 10% of the pressure value p i .

[0160] In the third implementation manner, the electronic device can determine the overall change trend of the pressure value according to the change trends of two pressure values separated by one pressure value. The pressure value showing an increasing trend satisfies the following conditions:

[0161] K > d × (M - 2), and p M > p1.

[0162] Wherein, K is the number of p i > p i-2 ; d is the fourth preset threshold; p i-2 is the (i - 2)-th pressure value cached by the electronic device.

[0163] There are M pressure values cached in the pressure cache, and there can be M - 2 comparison results between two pressure values separated by one pressure value; among them, K comparison results are that the i-th pressure value p i is greater than the (i - 2)-th pressure value (p i > p i-2 ); M - 2 - K comparison results are that the i-th pressure value is less than or equal to the (i - 2)-th pressure value (p i ≤ p i-2 ).

[0164] When the proportion of the number of comparison results where p i > p i-2 in the total number of comparison results exceeds the fourth threshold, and p M > p1, the electronic device determines that the pressure value is showing an increasing trend.

[0165] The fourth preset threshold and the first preset threshold can satisfy: a ≤ d. For example, the fourth preset threshold is 80%. When the proportion of the number of comparison results where p i > p i-2 in the total number of comparison results exceeds 80%, and p M > p1, the electronic device determines that the pressure value is showing an increasing trend.

[0166] In the fourth implementation, the pressure value showing an increasing trend satisfies the following conditions:

[0167] K > e×(M - 2), J > f×(M - 2) and p M > p1.

[0168] where e is the fifth preset threshold, f is the sixth preset threshold, and J is the number of p i ≤ p i-2 and p i + Val1 > p i-2 ; Val2 is the second preset margin value.

[0169] There are M pressure values cached in the pressure cache, and there can be M - 2 comparison results of p i and p i-2 ; among them, K comparison results are p i > p i-2 ; M - 2 - K comparison results are p i ≤ p i-2 , and among the M - 2 - K comparison results, J comparison results are p i + Val2 > p i-2 .

[0170] When the proportion of the number of comparison results where p i > p i-2 in the total number of comparison results exceeds the fifth threshold, p i ≤ p i-2 and p i + Val2 > p i-2 in the total number of comparison results exceeds the sixth threshold, and p M > p1, the electronic device determines that the pressure value is showing an increasing trend.

[0171] The fourth preset threshold, the fifth preset threshold, and the sixth preset threshold can satisfy: f < e < d. For example: the fifth preset threshold is 60%, and the sixth preset threshold is 30%. When the proportion of the number of comparison results where p i > p i-2 in the total number of comparison results exceeds 60%, p i ≤ p i-2 and p i + Val2 > pi-2 The number of comparison results of which accounts for more than 30% of the total number of comparison results, and p M >p1, the electronic device determines that the pressure value is increasing.

[0172] In the embodiment of the present application, the second preset margin value can be a fixed value or a variable, and the embodiment of the present application does not limit this. For example, the second preset margin value is a variable, the second preset margin value can be positively correlated with the pressure value, and the second preset margin value is greater than the first preset margin value. For example, the second preset margin value does not exceed the pressure value p i 20% of.

[0173] In the embodiment of the present application, at the initial moment when the touch object contacts the touch area, the electronic device can obtain the initial touch coordinates, and then the electronic device can collect and cache the touch coordinates over time. The electronic device can cache the touch coordinates (x, y) based on the coordinate cache. In the embodiment of the present application, the electronic device can obtain the touch coordinates using the capacitance change, or it can obtain the touch coordinates based on other parameters; for example, the coordinate cache can be a capacitance cache (coor buffer), and the coordinate cache can also be other forms of buffers, which are not limited in the embodiment of the present application.

[0174] The method for caching touch coordinates in an electronic device can be as follows: Fig.12 As shown:

[0175] For example, the coordinate cache has a size of H, and the coordinate cache can cache H touch coordinates. The value of H may be positively correlated with the memory and / or computing power of the electronic device. For example, H may be 10. Fig.12 As shown in a in the figure; the touch coordinates include: (x0, y0), (x1, y1)...(x H-1 ,y H-1 ). The initial touch coordinates may be (x0, y0).

[0176] When the electronic device continues to collect (x H ,y H ), the electronic device pushes the touch coordinates into the end of the coordinate cache in sequence and clears the touch coordinates with the longest cache time; for example, Fig.12 As shown in b, the electronic device will (x H ,y H ) is cached into the coordinate cache, (x0, y0) is cleared to ensure that the number of touch coordinates in the coordinate cache is H.

[0177] The electronic device may calculate the moving distance based on the touch coordinates in the coordinate buffer.

[0178] In some embodiments, the electronic device may calculate the moving distance based on the initial touch coordinates, and the moving distance may satisfy the following formula:

[0179]

[0180] Wherein, (x0, y0) is the initial touch coordinate (the first touch coordinate) of the touch object contacting the touch area; (x i ,y i ) is the i+1th touch coordinate collected by the electronic device during the movement of the touch object.

[0181] Exemplarily, after collecting the initial touch coordinates, the electronic device records (x0, y0); after collecting the second touch coordinates (x1, y1), the electronic device calculates the distance D1 from (x1, y1) to (x0, y0). At this time, D=D1.

[0182] When the electronic device collects the third touch coordinate (x2, y2), it calculates the distance D2 from (x2, y2) to (x0, y0).

[0183] When D2 is greater than D1, D is assigned the value of D2.

[0184] Similarly, the moving distance is kept as the maximum distance of the touch object in the touch area, so as to reduce the calculation error caused by the back and forth movement of the touch object in the touch area and improve the accuracy of the moving distance.

[0185] In some other embodiments, the electronic device may calculate the moving distance based on the distance between the i-th touch coordinate and the i+1-th touch coordinate, and the moving distance may satisfy the following formula:

[0186]

[0187] Among them, (x i-1 ,y i-1 ) is the i-th touch coordinate collected by the electronic device during the movement of the touch object, and n is the number of touch coordinates.

[0188] Exemplarily, after the electronic device acquires the first touch coordinate, it records the first touch coordinate (x0, y0). When the electronic device acquires the second touch coordinate (x1, y1), it calculates the distance D1 between (x1, y1) and (x0, y0). At this time, D=D1.

[0189] When the electronic device collects the third touch coordinate (x2, y2), the distance D2 between (x2, y2) and (x1, y1) is calculated. At this time, D = D1 + D2.

[0190] By analogy, the moving distance D = D1 + D2 + ... D H-1 .

[0191] The above embodiments show two methods for calculating the moving distance. The embodiments of the present application may also use other methods to calculate the moving distance, which will not be described in detail in the embodiments of the present application. S1003. When the changing trend of the pressure value and / or the moving distance meets the first preset condition, the electronic device does not perform the sliding operation process; wherein the first preset condition includes: the moving distance is less than or equal to the first sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend; the first sliding threshold is less than the second sliding threshold.

[0192] The first sliding threshold and the second sliding threshold may be used as a basis for determining whether the touch operation is a sliding operation, wherein the first sliding threshold is smaller than the second sliding threshold.

[0193] It is understandable that the moving distance of a press operation is generally shorter, while the moving distance of a slide operation is generally longer; in actual operation, there is an upper limit value of the moving distance for a press operation. When the moving distance of a touch operation is greater than the upper limit value, the electronic device determines that the touch operation is a slide operation, and the upper limit value may be the second slide threshold value. Similarly, there is a lower limit value of the moving distance for a slide operation. When the moving distance of a touch operation is less than or equal to the lower limit value, the electronic device determines that the touch operation is not a slide operation, and the lower limit value may be the first slide threshold value.

[0194] For a touch operation whose moving distance is between the first sliding threshold and the second sliding threshold, the method of the electronic device determining whether the touch operation is a pressing operation or a sliding operation only by the moving distance is inaccurate. The embodiment of the present application can further determine the type of touch operation according to the change trend of the pressure value of the pressing operation and the sliding operation, thereby improving the accuracy of the electronic device in responding to the touch operation.

[0195] In the embodiment of the present application, when the change trend of the pressure value and / or the moving distance meets the first preset condition, the electronic device does not perform the sliding operation process. The first preset condition can be as follows:

[0196] In some embodiments, when the moving distance is less than or equal to the first sliding threshold, the electronic device does not perform the sliding operation process.

[0197] For example, if the user's finger presses the touchpad and the electronic device does not detect movement during the pressing process, the movement distance is zero. At this time, the electronic device confirms that the touch operation is a pressing operation rather than a sliding operation, and thus does not execute the sliding operation process.

[0198] In other embodiments, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend.

[0199] When the moving distance is between the first sliding threshold and the second sliding threshold, the electronic device can determine whether the touch operation is a sliding operation according to the change trend of the pressure value. For example, when the change trend of the pressure value is an increasing trend, the pressure on the touch area increases, which can correspond to the scene where the touch object performs a pressing operation in the touch area.

[0200] A touch control method provided by an embodiment of the present application collects pressure values ​​and touch coordinates through an electronic device, and the touch coordinates are used to characterize the touch position of a touch object in a touch area; the electronic device calculates the change trend of the pressure value, and the electronic device calculates the moving distance according to the touch coordinates; when the change trend of the pressure value and / or the moving distance meet the first preset condition, the electronic device does not perform the sliding operation process; wherein the first preset condition includes: the moving distance is less than or equal to the first sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend; the first sliding threshold is less than the second sliding threshold. In this way, the scenario where the electronic device mistakenly responds to the pressing operation as a sliding operation can be reduced, thereby improving the user experience.

[0201] The above embodiments describe a scenario in which the touch object moves during a touch operation, but the touch operation is not a sliding operation. Fig.13 A scenario in which a touch object moves during a touch operation and the touch operation is a sliding operation is described.

[0202] For example, Fig.13 A schematic diagram of a touch control method provided in an embodiment of the present application is shown. Fig.13 As shown:

[0203] S1301. The electronic device collects pressure values ​​and touch coordinates.

[0204] S1302: The electronic device calculates a change trend of the pressure value, and the electronic device calculates a moving distance according to the touch coordinates.

[0205] For steps S1301-S1302, reference may be made to the relevant description of steps S1001-S1002, which will not be repeated here.

[0206] S1303. When the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device executes the sliding operation process; wherein the second preset condition includes: the moving distance is greater than the second sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend.

[0207] Exemplarily, in some embodiments, when the moving distance is greater than the second sliding threshold, the electronic device executes the sliding operation process.

[0208] For example, when a user's finger slides on the touchpad and during the sliding process, the electronic device detects that the moving distance is long, the moving distance is a large value. At this time, the electronic device confirms that the touch operation is a sliding operation rather than a pressing operation, and thus executes the sliding operation process.

[0209] In other embodiments, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend.

[0210] When the moving distance is between the first sliding threshold and the second sliding threshold, the electronic device can determine whether the touch operation is a sliding operation according to the change trend of the pressure value. For example, when the change trend of the pressure value is a stable trend, the pressure on the touch area is relatively stable, which can correspond to the scene where the touch object performs a sliding operation in the touch area.

[0211] In a possible implementation, the pressure value presenting a stable trend may be opposite to the pressure value presenting an increasing trend. When the pressure value is not presenting an increasing trend, the electronic device may determine that the pressure value presents a stable trend.

[0212] In another possible implementation, the electronic device may also determine whether the pressure value is a stable trend based on whether the difference between the pressure values ​​is less than a certain threshold, whether the first pressure value is greater than or equal to the last pressure value, etc., which is not described in detail in the embodiments of the present application.

[0213] In the embodiment of the present application, when the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device performs the sliding operation process; wherein the second preset condition includes: the moving distance is greater than the second sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend; the first sliding threshold is less than the second sliding threshold. In this way, the user can reduce the number of sliding operations performed by the user, and the user's finger moves a short distance in the touch area, and the electronic device cannot respond to the sliding operation, thereby improving the user's experience.

[0214] In the embodiment of the present application, the electronic device may include a touch detection module, a logic control module, a pressure detection module, a storage module and a power module, etc. Among them, the touch detection module may be a capacitive detection chip, which is used to detect the touch information of the touch object in the touch area; the pressure detection module is used to detect the pressure value applied to the touch area by the touch object when touching the touch area; the logic control module is used to control the working mode and processing flow of the touch area, etc.; the storage module is used to store the pressure value and the moving distance; the power module is responsible for the power management of the touch area, for example: switching the working mode and / or sleep mode of the touch area. The electronic device may also include a touch area driving module and a key response module, etc., which are not listed one by one in the embodiment of the present application.

[0215] In the embodiment of the present application, the electronic device is provided with a pressure sampling rate and a touch sampling rate, wherein the pressure sampling rate may be the frequency at which the electronic device collects pressure values, for example, if the pressure sampling rate is 100 Hz, the electronic device collects pressure values ​​once every 10 ms. The touch sampling rate may be the frequency at which the electronic device collects touch coordinates, and the touch coordinates may be used to characterize the touch position of the touch object in the touch area, for example, if the touch sampling rate is 100 Hz, the electronic device collects touch coordinates once every 10 ms.

[0216] In a possible implementation, when the pressure sampling rate is less than or equal to the touch sampling rate, the electronic device acquires the touch coordinates faster than the pressure value. The electronic device may first determine the moving distance according to the touch coordinates, and then determine the change trend of the pressure value according to the pressure value. The execution process of the electronic device may be as follows: Fig.14 shown.

[0217] For example, Fig.14 A schematic diagram of a flow chart of a touch control method provided in an embodiment of the present application is shown.

[0218] S1401. The power module switches the mode of the touch area to the working mode.

[0219] The power module may be responsible for the power management of the touch area of ​​the electronic device. When the touch area is in the working mode, the touch area may receive touch operations. In one possible implementation, the touch area may receive touch operations when it is in the working mode; for example, the electronic device may sequentially execute steps S1401-S1402. In another possible implementation, the power module may also switch the mode of the touch area from the sleep mode to the working mode based on the touch operation. For example, the electronic device may sequentially execute steps S1402 and S1401. The embodiments of the present application are not limited to this.

[0220] S1402: A touch area of ​​the electronic device receives a touch operation.

[0221] S1403: The touch detection module collects touch coordinates.

[0222] The touch detection module can be a capacitance detection chip. The touch area of ​​the electronic device is provided with a capacitance sensor, which can report the capacitance value in the touch area to the touch detection module. The touch detection module obtains the coordinate value of the touch object in the touch area based on the capacitance value, and the touch detection module can obtain the touch coordinates.

[0223] S1404: The touch detection module caches the touch coordinates to the storage module.

[0224] The storage module may include a coordinate cache. The touch detection module may periodically collect touch coordinates according to the touch sampling rate, and the touch detection module caches the touch coordinates so that the subsequent logic control module can calculate the moving distance based on these touch coordinates.

[0225] S1405: The logic control module obtains the touch coordinates from the storage module and calculates the moving distance of the touch object.

[0226] The calculation process of step S1405 can refer to the relevant description of step S1002, and will not be described in detail in this embodiment of the present application.

[0227] S1406. The pressure detection module collects pressure values.

[0228] The touch area of ​​the electronic device is provided with a pressure sensor, and the pressure sensor can report the pressure value in the touch area to the pressure detection module, and the pressure detection module can obtain the pressure value.

[0229] S1407: The pressure detection module caches the pressure value to the storage module.

[0230] The storage module also includes a pressure buffer. The pressure detection module can periodically collect pressure values ​​according to the pressure sampling rate, and the pressure detection module caches the touch coordinates in the pressure buffer so that the subsequent logic control module can count the change trends of these pressure values.

[0231] S1408. The logic control module obtains the pressure value from the storage module and calculates the change trend of the pressure value.

[0232] The calculation process of step S1408 can refer to the relevant description of step S1002, and this embodiment of the present application will not be repeated here.

[0233] S1409: The logic control module determines whether the moving distance is greater than a second sliding threshold.

[0234] It is understandable that the pressure acquisition rate is less than or equal to the touch acquisition rate, and the electronic device can first acquire H touch coordinates, so the logic control module can first use the moving distance to make a judgment.

[0235] When the moving distance is greater than the second sliding threshold, the moving distance of the touch object is large, and the electronic device can determine that the touch operation is a sliding operation, such as step S1415. When the moving distance is less than or equal to the second sliding threshold, the electronic device needs to make further determinations, such as step S1410.

[0236] S1410: If the moving distance is less than or equal to the second sliding threshold, the logic control module determines whether the moving distance is greater than the first sliding threshold.

[0237] When the moving distance is less than or equal to the first sliding threshold, the change trend of the pressure value and / or the moving distance meets the first preset condition, and the first preset condition includes: the moving distance is less than or equal to the first sliding threshold. The electronic device can determine that the touch operation is not a sliding operation, as in step S1414.

[0238] When the moving distance is greater than the first sliding threshold, the electronic device still needs to further determine the type of touch operation, such as step S1411.

[0239] S1411: If the moving distance is greater than the first sliding threshold, the logic control module determines whether the pressure value is increasing.

[0240] S1412: If the pressure value shows an increasing trend, the logic control module does not execute the sliding operation process.

[0241] In step S1412, if the change trend of the pressure value and / or the moving distance meets the first preset condition, the first preset condition includes: the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value is increasing, the electronic device does not perform the sliding operation.

[0242] Alternatively, S1413, if the pressure value does not show an increasing trend, the logic control module executes the sliding operation process.

[0243] In step S1413, the change trend of the pressure value and / or the moving distance meets the second preset condition, and the second preset condition includes: the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend. The electronic device performs the sliding operation process.

[0244] Optionally, after step S1410, the method further includes:

[0245] S1414: If the moving distance is less than or equal to the first sliding threshold, the logic control module does not execute the sliding operation process.

[0246] In step S1414, if the change trend of the pressure value and / or the moving distance meets a first preset condition, the first preset condition includes: the moving distance is less than or equal to a first sliding threshold value, and the electronic device does not perform the sliding operation process.

[0247] Optionally, after step S1409, the method further includes:

[0248] S1415: If the moving distance is greater than the second sliding threshold, the logic control module executes the sliding operation process.

[0249] In step S1415, the change trend of the pressure value and / or the moving distance meets the second preset condition, and the second preset condition includes: the moving distance is greater than the second sliding threshold, and the electronic device executes the sliding operation process.

[0250] Optionally, after steps S1401-S1415, the method further includes:

[0251] S1416: When the time for which the touch area does not receive a touch operation is greater than a time threshold, the power module switches the mode of the touch area to a sleep mode.

[0252] If the touch area of ​​the electronic device does not receive any touch operation from the user within a period of time, the touch area may enter sleep mode, and the power module switches the mode of the touch area to sleep mode to save power consumption of the touch area.

[0253] It should be noted that in the embodiment of the present application, the electronic device may or may not correspond to the pressing operation process when not performing the sliding operation process. The embodiment of the present application does not limit the process performed by the electronic device after the electronic device does not perform the sliding operation.

[0254] In another possible implementation, when the pressure sampling rate is greater than the touch sampling rate, the speed at which the electronic device acquires the touch coordinates is less than the speed at which the pressure value is acquired. The electronic device may first determine the change trend of the pressure value according to the pressure value, and then determine the moving distance according to the touch coordinates. The execution process of the electronic device may be as follows: Fig.15 shown.

[0255] For example, Fig.15 A schematic diagram of a flow chart of a touch control method provided in an embodiment of the present application is shown.

[0256] S1501: A touch area of ​​an electronic device receives a touch operation.

[0257] S1502: The pressure detection module collects pressure values.

[0258] S1503: The pressure detection module caches the pressure value to the storage module.

[0259] S1504. The logic control module obtains the pressure value from the storage module and calculates the change trend of the pressure value.

[0260] S1505: The touch detection module collects touch coordinates.

[0261] S1506: The touch detection module caches the touch coordinates to the storage module.

[0262] S1507: The logic control module obtains the touch coordinates from the storage module and calculates the moving distance of the touch object.

[0263] For steps S1501-S1507, reference may be made to the relevant descriptions of steps S1401-S1408, which will not be repeated here.

[0264] S1508. The logic control module determines whether the pressure value is increasing.

[0265] It is understandable that the pressure acquisition rate is greater than the touch acquisition rate, and the electronic device may first acquire M pressure values, and the logic control module may first use the pressure values ​​to make a determination.

[0266] When the pressure value increases, the touch operation may be a pressing operation by the user, or a long sliding operation by the user with gradually increasing pressure during the movement, and the electronic device cannot determine whether it is a sliding operation. The electronic device needs to make further determinations, such as step S1509.

[0267] When the pressure value does not show an increasing trend, the touch operation may be that the user lightly swipes across the touch area; the touch operation may also be that the touch object moves too close, and the electronic device cannot recognize the sliding operation; the electronic device needs to further determine, such as step S1512.

[0268] S1509: If the pressure value shows an increasing trend, the logic control module determines whether the moving distance is greater than a second sliding threshold.

[0269] S1510: If the moving distance is greater than the second sliding threshold, the logic control module executes the sliding operation process.

[0270] The change trend of the pressure value and / or the moving distance meets a second preset condition, and the second preset condition includes: the moving distance is greater than a second sliding threshold. The electronic device performs a sliding operation process.

[0271] S1511: If the moving distance is less than or equal to the second sliding threshold, the logic control module does not execute the sliding operation process.

[0272] In step S1511, the change trend of the pressure value is an increasing trend, and the moving distance is less than the second sliding threshold.

[0273] When the moving distance is less than or equal to the first sliding threshold, the change trend of the pressure value and / or the moving distance meets the first preset condition, and the first preset condition includes: the moving distance is less than or equal to the first sliding threshold. When the moving distance is greater than the first sliding threshold, the change trend of the pressure value and / or the moving distance meets the first preset condition, and the first preset condition includes: the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend.

[0274] Therefore, the change trend of the pressure value and / or the moving distance in step S1511 meets the first preset condition, and the electronic device may not execute the sliding operation process.

[0275] Optionally, after step S1508, the method further includes:

[0276] S1512: If the pressure value does not show an increasing trend, the logic control module determines whether the moving distance is greater than a first sliding threshold.

[0277] S1513: If the moving distance is greater than the first sliding threshold, the logic control module executes the sliding operation process.

[0278] In step S1513, the change trend of the pressure value satisfies a stable trend, and the moving distance is greater than the first sliding threshold.

[0279] When the moving distance is greater than the second sliding threshold, the change trend of the pressure value and / or the moving distance meets the second preset condition, and the second preset condition includes: the moving distance is greater than the second sliding threshold. When the moving distance is less than the second sliding threshold, the change trend of the pressure value and / or the moving distance meets the second preset condition, and the second preset condition includes: the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend.

[0280] The electronic device can perform a sliding operation process.

[0281] S1514: If the moving distance is less than or equal to the first sliding threshold, the logic control module does not execute the sliding operation process.

[0282] The change trend of the pressure value and / or the moving distance in step S1514 meets the first preset condition, and the first preset condition includes: the moving distance is less than or equal to the first sliding threshold, and the electronic device does not perform the sliding operation process.

[0283] In some scenarios, the touch object may move quickly in the touch area, and the electronic device may adjust the values ​​of the first sliding threshold and the second sliding threshold according to the moving speed of the touch object.

[0284] For example, Fig.16 As shown, the first sliding threshold and the second sliding threshold are both adjustable values; wherein the first sliding threshold is positively correlated with the moving speed of the touch object in the touch area, and the second sliding threshold is positively correlated with the moving speed of the touch object in the touch area. After the electronic device collects the pressure value and the touch coordinates, it also includes:

[0285] S1601: A logic control module of an electronic device calculates a moving speed of a touch object in a touch area.

[0286] In a possible implementation, the electronic device records the initial touch coordinates and the first time, wherein the first time is the time when the touch object is at the initial touch coordinates. Subsequently, the electronic device may collect and cache the touch coordinates over time.

[0287] The electronic device can be based on the current touch coordinates (xi ,y i ) and the touch coordinates at the previous moment (x i-1 ,y i-1 ) to calculate the movement speed.

[0288] The moving speed V can satisfy the following formula:

[0289] V=V x +V y

[0290] in, t i For electronic devices, we get (x i ,y i ) time, t i-1 For electronic devices, we get (x i-1 ,y i-1 ) time.

[0291] S1602: The logic control module of the electronic device adjusts the first sliding threshold and the second sliding threshold respectively according to the moving speed.

[0292] The first sliding threshold is positively correlated with the moving speed, the second sliding threshold is positively correlated with the moving speed, and the adjusted first sliding threshold is smaller than the adjusted second sliding threshold.

[0293] In the embodiment of the present application, the electronic device may perform steps S1601-S1602 after step S1404; the electronic device may also perform steps S1601-S1602 after step S1506. The embodiment of the present application does not limit this.

[0294] Combine the following Fig.17 The internal interaction of each module in the electronic device in the embodiment of the present application is described. Fig.17 FIG. 4 shows an internal interaction diagram of a touch control method provided by an embodiment of the present application. Fig.17 As shown:

[0295] The electronic device receives a touch operation of a touch object. In response to the touch operation, the pressure detection module collects the pressure value, and the touch detection module collects the touch coordinates. The electronic device transmits the pressure value to the hardware abstraction layer through the pressure driver, and the electronic device transmits the touch coordinates to the hardware abstraction layer through the touch driver. The storage module records the touch coordinates through the coordinate cache, and records the pressure value through the pressure cache. After the logic control module obtains the pressure value and the touch coordinates from the cache module, the logic control module calculates the change trend of the pressure value, the moving distance and the moving speed, etc., and the logic control module determines whether the change trend of the pressure value and / or the moving distance meet the first preset condition or the second preset condition.

[0296] When the change trend of the pressure value and / or the moving distance meets the second preset condition, the logic control module transmits the sliding operation event to the API module, and the API module reports it to the application layer. The application layer can respond to the sliding operation, for example, cursor movement.

[0297] When the change trend of the pressure value and / or the moving distance meets the first preset condition, the logic control module transmits the non-sliding event to the API module, and the API module reports it to the application layer. The application layer may not perform the sliding operation, wherein not performing the sliding operation may be performing a pressing operation or other touch operation, which is not limited in the embodiment of the present application.

[0298] Combined with the above Figure 3-Figure 17 , the touch control method provided in the embodiment of the present application is described, and the device for executing the touch control method provided in the embodiment of the present application is described below. Fig.18 As shown, Fig.18 This is a schematic diagram of the structure of a touch control device provided in an embodiment of the present application. The touch control device 1800 may be a terminal device in an embodiment of the present application, or may be a chip or chip system in the terminal device.

[0299] like Fig.18 As shown, the touch device 180 can be used in a communication device, circuit, hardware component or chip, and the touch device 180 includes: a memory 1801, a processor 1802, an interface circuit 1803 and a display screen 1804. The display screen 1804 is used to support the display step of the touch method; the processor 1802 is used to support the touch device to perform information processing steps, the interface circuit 1803 is used to support the touch device to perform receiving or sending steps; the memory 1801 is used to support the touch device to perform storage steps. The display screen 1804 can also be called a display unit; the processor 1802 can also be called a processing unit, the interface circuit 1803 can also be called a communication unit; the memory 1801 can also be called a storage unit.

[0300] In one possible implementation, at a first moment, processor 1802 detects a first touch operation, and processor 1802 does not execute a sliding operation process; in the first touch operation, the touch object moves a first distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area tends to increase; at a second moment, processor 1802 detects a second touch operation, and processor 1802 executes a sliding operation process; in the second touch operation, the touch object moves a second distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area tends to be stable; the second distance is less than or equal to the first distance, and the first moment is earlier than the second moment.

[0301] In a possible implementation, the number of cached pressure values ​​in the memory 1801 is M, and the pressure values ​​showing an increasing trend satisfy the following conditions: N>a×(M-1), and p M >p1; where N is p i > i-1 The number of, a is the first preset threshold; p i is the i-th pressure value cached in the memory 1801, p i-1 is the i-1th pressure value cached in the memory 1801, p M is the Mth pressure value cached in the memory 1801, p1 is the first pressure value cached in the memory 1801; and / or, N>b×(M-1), L>c×(M-1), and p M >p1; where b is the second preset threshold; c is the third preset threshold; L is p i ≤p i-1 And p i +Val1>p i-1 Val1 is a first preset margin value; and / or, K>d×(M-2), and p M >p1; where K is p i > i-2 The number of i-2 is the i-2th pressure value cached in the memory 1801; d is the fourth preset threshold; and / or, K>e×(M-2), J>f×(M-2) and p M >p1; where e is the fifth preset threshold; f is the sixth preset threshold; J is p i ≤p i-2 And p i +Val1>p i-2 number, Val2 is the second preset margin value.

[0302] In a possible implementation, before the processor 1802 does not execute the sliding operation process, it includes: the processor 1802 collects pressure values ​​and touch coordinates, the touch coordinates are used to characterize the touch position of the touch object in the touch area; the processor 1802 calculates the change trend of the pressure value, and the processor 1802 calculates the moving distance according to the touch coordinates; the processor 1802 does not execute the sliding operation process, including: when the change trend of the pressure value and / or the moving distance meets a first preset condition, the processor 1802 does not execute the sliding operation process; wherein the first preset condition includes: the moving distance is less than or equal to the first sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows an increasing trend; the first sliding threshold is less than the second sliding threshold.

[0303] In a possible implementation, the memory 1801 stores a pressure sampling rate and a touch sampling rate, the pressure sampling rate includes the frequency at which the processor 1802 collects pressure values, and the touch sampling rate includes the frequency at which the processor 1802 collects touch coordinates; the pressure sampling rate is less than or equal to the touch sampling rate; when the change trend of the pressure value and / or the moving distance meets the first preset condition, the processor 1802 does not execute the sliding operation process, including: the processor 1802 determines whether the moving distance is greater than a second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the processor 1802 determines whether the moving distance is greater than the first sliding threshold; if the moving distance is less than or equal to the first sliding threshold, the processor 1802 does not execute the sliding operation process; or, if the moving distance is greater than the first sliding threshold, the processor 1802 determines whether the pressure value is increasing; if the pressure value is increasing, the processor 1802 does not execute the sliding operation process.

[0304] In a possible implementation, the memory 1801 stores a pressure sampling rate and a touch sampling rate, the pressure sampling rate includes the frequency at which the processor 1802 collects pressure values, and the touch sampling rate includes the frequency at which the processor 1802 collects touch coordinates; the pressure sampling rate is greater than the touch sampling rate; when the change trend of the pressure value and / or the moving distance meets the first preset condition, the processor 1802 does not execute the sliding operation process, including: the processor 1802 determines whether the pressure value is increasing; if the pressure value is increasing, the processor 1802 determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the processor 1802 does not execute the sliding operation process; or, if the pressure value is not increasing, the processor 1802 determines whether the moving distance is greater than the first sliding threshold; if the moving distance is less than or equal to the first sliding threshold, the processor 1802 does not execute the sliding operation process.

[0305] In one possible implementation, the processor 1802 executes a sliding operation process, including: when the changing trend of the pressure value and / or the moving distance meets the second preset condition, the processor 1802 executes the sliding operation process; wherein the second preset condition includes: the moving distance is greater than the second sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend; the first sliding threshold is less than the second sliding threshold.

[0306] In one possible implementation, the memory 1801 stores a pressure sampling rate and a touch sampling rate, and the pressure sampling rate is less than or equal to the touch sampling rate; when the changing trend of the pressure value and / or the moving distance meets the second preset condition, the processor 1802 executes a sliding operation process, including: the processor 1802 determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the processor 1802 determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the processor 1802 determines whether the changing trend of the pressure value is an increasing trend; if the changing trend of the pressure value is not an increasing trend, the processor 1802 executes the sliding operation process; or, if the moving distance is greater than the second sliding threshold, the processor 1802 executes the sliding operation process.

[0307] In one possible implementation, the memory 1801 stores a pressure sampling rate and a touch sampling rate, and the pressure sampling rate is greater than the touch sampling rate; when the changing trend of the pressure value and / or the moving distance meets the second preset condition, the processor 1802 executes a sliding operation process, including: the processor 1802 determines whether the changing trend of the pressure value is an increasing trend; if the changing trend of the pressure value is an increasing trend, the processor 1802 determines whether the moving distance is greater than the second sliding threshold; if the moving distance is greater than the second sliding threshold, the processor 1802 executes the sliding operation process; or, if the changing trend of the pressure value is not an increasing trend, the processor 1802 determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the processor 1802 executes the sliding operation process.

[0308] In a possible implementation, the first sliding threshold and the second sliding threshold are both adjustable values; wherein the first sliding threshold is positively correlated with the moving speed of the touch object in the touch area, and the second sliding threshold is positively correlated with the moving speed of the touch object in the touch area.

[0309] In a possible implementation, the moving distance D satisfies any of the following formulas:

[0310]

[0311] Where (x0, y0) is the initial touch coordinate of the touch object contacting the touch area; (x i ,y i ) is the i+1th touch coordinate collected by the processor 1802 during the movement of the touch object; or,

[0312]

[0313] Among them, (x i-1 ,y i-1) is the ith touch coordinate collected by the processor 1802 during the movement of the touch object, and n is the number of touch coordinates.

[0314] The touch control method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0315] An embodiment of the present application provides a terminal device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the above method.

[0316] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0317] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0318] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0319] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0320] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0321] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A touch control method, characterized in that: Applied to an electronic device, the electronic device includes a touch area, and the method includes: At a first moment, the electronic device detects a first touch operation, and the electronic device does not perform a sliding operation process; in the first touch operation, the touch object moves a first distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows an increasing trend; At a second moment, the electronic device detects a second touch operation, and the electronic device executes the sliding operation process; in the second touch operation, the touch object moves a second distance in the touch area, the touch object does not leave the touch area, and the pressure value of the touch object pressing the touch area shows a stable trend; the second distance is less than or equal to the first distance, and the first moment is earlier than the second moment; Among them, the changing trend of the pressure value is determined according to at least one of the following methods: the changing trend of two adjacent pressure values, the changing trend of two adjacent pressure values ​​and the changing trend after adding a margin value, the changing trend of two pressure values ​​separated by one pressure value, the changing trend of two pressure values ​​separated by one pressure value and the changing trend after adding a margin value.

2. The method according to claim 1, characterized in that The number of cached pressure values ​​in the electronic device is M, and the pressure value showing an increasing trend satisfies the following conditions: N>a×(M-1), and p M >p1; where N is p i >p i-1 The number of, a is the first preset threshold; p i is the i-th pressure value cached by the electronic device, p i-1 is the i-1th pressure value cached by the electronic device, p M is the Mth pressure value cached by the electronic device, and p1 is the first pressure value cached by the electronic device; and / or, N>b×(M-1), L>c×(M-1), and p M >p1; where b is the second preset threshold; c is the third preset threshold; L is p i ≤p i-1 And p i +Val1>p i-1 Val1 is the first preset margin value; and / or, K>d×(M-2), and p M >p1; where K is p i >p i-2 The number of i-2 is the i-2th pressure value cached by the electronic device; d is the fourth preset threshold; and / or, K>e×(M-2), J>f×(M-2) and p M >p1; where e is the fifth preset threshold; f is the sixth preset threshold; J is p i ≤p i-2 And p i +Val1>p i-2 number, Val2 is the second preset margin value.

3. The method according to claim 1, characterized in that Before the electronic device does not perform the sliding operation process, it includes: The electronic device collects the pressure value and the touch coordinates, where the touch coordinates are used to represent a touch position of the touch object in the touch area; The electronic device calculates a change trend of the pressure value, and the electronic device calculates a moving distance according to the touch coordinates; The electronic device does not perform a sliding operation process, including: When the changing trend of the pressure value and / or the moving distance meets a first preset condition, the electronic device does not execute the sliding operation process; wherein the first preset condition includes: the moving distance is less than or equal to a first sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to a second sliding threshold, and the pressure value shows an increasing trend; the first sliding threshold is less than the second sliding threshold.

4. The method according to claim 3, characterized in that The electronic device is provided with a pressure sampling rate and a touch sampling rate, the pressure sampling rate includes the frequency at which the electronic device collects the pressure value, and the touch sampling rate includes the frequency at which the electronic device collects the touch coordinates; the pressure sampling rate is less than or equal to the touch sampling rate; When the change trend of the pressure value and / or the moving distance meets a first preset condition, the electronic device does not perform the sliding operation process, including: The electronic device determines whether the moving distance is greater than the second sliding threshold; If the moving distance is less than or equal to the second sliding threshold, the electronic device determines whether the moving distance is greater than the first sliding threshold; If the moving distance is less than or equal to the first sliding threshold, the electronic device does not perform the sliding operation process; Alternatively, if the moving distance is greater than the first sliding threshold, the electronic device determines whether the pressure value is increasing; if the pressure value is increasing, the electronic device does not execute the sliding operation process.

5. The method according to claim 3, characterized in that: The electronic device is provided with a pressure sampling rate and a touch sampling rate, the pressure sampling rate includes the frequency at which the electronic device collects the pressure value, and the touch sampling rate includes the frequency at which the electronic device collects the touch coordinates; the pressure sampling rate is greater than the touch sampling rate; When the change trend of the pressure value and / or the moving distance meets a first preset condition, the electronic device does not perform the sliding operation process, including: The electronic device determines whether the pressure value shows an increasing trend; If the pressure value shows an increasing trend, the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is less than or equal to the second sliding threshold, the electronic device does not perform the sliding operation process; Alternatively, if the pressure value does not show an increasing trend, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is less than or equal to the first sliding threshold, the electronic device does not execute the sliding operation process.

6. The method according to any one of claims 1 to 5, characterized in that: The electronic device performs a sliding operation process, including: When the change trend of the pressure value and / or the moving distance meets the second preset condition, the electronic device executes the sliding operation process; wherein the second preset condition includes: the moving distance is greater than the second sliding threshold; or, the moving distance is greater than the first sliding threshold, the moving distance is less than or equal to the second sliding threshold, and the pressure value shows a stable trend; the first sliding threshold is less than the second sliding threshold.

7. The method according to claim 6, characterized in that The electronic device is provided with a pressure sampling rate and a touch sampling rate, and the pressure sampling rate is less than or equal to the touch sampling rate; When the change trend of the pressure value and / or the moving distance meets a second preset condition, the electronic device executes the sliding operation process, including: The electronic device determines whether the moving distance is greater than the second sliding threshold; If the moving distance is less than or equal to the second sliding threshold, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the electronic device determines whether the change trend of the pressure value is an increasing trend; if the change trend of the pressure value is not an increasing trend, the electronic device performs a sliding operation process; Alternatively, if the moving distance is greater than the second sliding threshold, the electronic device executes the sliding operation process.

8. The method according to claim 6, characterized in that The electronic device is provided with a pressure sampling rate and a touch sampling rate, wherein the pressure sampling rate is greater than the touch sampling rate; When the change trend of the pressure value and / or the moving distance meets a second preset condition, the electronic device executes the sliding operation process, including: The electronic device determines whether the change trend of the pressure value is an increasing trend; If the change trend of the pressure value is an increasing trend, the electronic device determines whether the moving distance is greater than the second sliding threshold; if the moving distance is greater than the second sliding threshold, the electronic device performs a sliding operation process; Alternatively, if the change trend of the pressure value is not an increasing trend, the electronic device determines whether the moving distance is greater than the first sliding threshold; if the moving distance is greater than the first sliding threshold, the electronic device executes the sliding operation process.

9. The method according to any one of claims 3-5, 7-8, characterized in that: The first sliding threshold and the second sliding threshold are both adjustable values; wherein the first sliding threshold is positively correlated with the moving speed of the touch object in the touch area, and the second sliding threshold is positively correlated with the moving speed of the touch object in the touch area.

10. The method according to any one of claims 3-5, 7-8, characterized in that: The moving distance satisfies any of the following formulas: Wherein, D is the moving distance; (x0, y0) is the initial touch coordinate of the touch object contacting the touch area; (x i ,y i ) is the i+1th touch coordinate collected by the electronic device during the movement of the touch object; or, Among them, (x i-1 ,y i-1 ) is the i-th touch coordinate collected by the electronic device during the movement of the touch object, and n is the number of the touch coordinates.

11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 10.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 10.