Touch method and electronic device

CN122824192APending Publication Date: 2026-09-25HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510362482.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种触控方法和电子设备,能够解决电子设备中的按键容易误触发的问题,提升用户操作电子设备按键的体验感受

Benefits of technology

[0036]第三方面的有益效果可以参考第一方面的有益效果或第二方面的有益效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122824192A_ABST
    Figure CN122824192A_ABST
Patent Text Reader

Abstract

The application relates to a touch control method and an electronic device, and relates to the technical field of electronic devices, and can solve the problem that a key is easily mis-triggered in an electronic device. The touch control method is applied to an electronic device with a key module. The key module comprises a key cap and a pressure sensor, and the pressure sensor is used for detecting a pressure value borne by the key cap. The method comprises the following steps: acquiring the pressure value detected by the pressure sensor multiple times. In the case that the pressure values provided by the pressure sensor for consecutive N times are all greater than or equal to a first pressure threshold value, a first task is executed; the first task corresponds to the first pressure threshold value, and N is an integer greater than or equal to 2.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and more particularly to a touch control method and an electronic device. Background Technology

[0002] Electronic devices typically have one or more buttons. Users can manipulate these buttons to perform corresponding functions. For example, mobile phones have volume + buttons, volume - buttons, and a lock screen button. Using the volume + button increases the playback volume, using the volume - button decreases the playback volume, and using the lock screen button locks the screen.

[0003] With the development of button technology, buttons can no longer perform only a single function. For example, the same button can control an electronic device to perform one function when the user lightly touches it, and to perform another function when the user presses the button harder.

[0004] However, buttons on current electronic devices are prone to accidental triggering. Summary of the Invention

[0005] This application provides a touch control method and an electronic device that can solve the problem of accidental triggering of buttons in electronic devices and improve the user experience of operating electronic device buttons.

[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, a touch control method is provided. This touch control method is applied to an electronic device having a button module. The button module includes keycaps and a pressure sensor, the pressure sensor being used to detect the pressure value applied to the keycaps. The method includes: acquiring the pressure values ​​detected by the pressure sensor multiple times; and performing a first task if the pressure values ​​provided by the pressure sensor are all greater than or equal to a first pressure threshold N times consecutively; the first task corresponds to the first pressure threshold, where N is an integer greater than or equal to 2.

[0008] For example, by applying the corresponding pressure to the button module in N consecutive cycles, the user can successfully trigger the hard press command, and then execute the first task corresponding to the hard press command.

[0009] In this application, the electronic device only executes the first task corresponding to the pressure value of the keycap when the key module is touched by the user multiple times in succession and the pressure value of each touch meets the triggering requirements. This can avoid the situation where the user accidentally presses the key module at a certain moment when they do not want to trigger the touch command (such as a hard press), thus causing the touch command to be accidentally triggered and the first task to be executed, thereby improving the comfort of the user's key operation experience when using the electronic device.

[0010] In some feasible embodiments of the first aspect, after acquiring pressure values ​​detected by the pressure sensor multiple times, the method further includes: performing a second task if the pressure values ​​provided by the pressure sensor are all greater than or equal to a second pressure threshold and less than a first pressure threshold M consecutively. The second task corresponds to the second pressure threshold, where the second pressure threshold is less than the first pressure threshold, and M is greater than or equal to 2.

[0011] For example, by applying light pressure to the button module for N consecutive cycles, a user can successfully trigger a light touch command and then execute the second task corresponding to the light touch command.

[0012] In this embodiment, the electronic device only executes the second task corresponding to the pressure value of the keycap when the key module is touched by the user multiple times in succession and the pressure value of each touch meets the triggering requirements. This can avoid the situation where the user accidentally touches the key module at a certain moment when they do not want to trigger a certain touch command (such as a light touch), thus causing the touch command to be accidentally triggered and the second task to be executed, thereby improving the comfort of the user's key operation experience when using the electronic device.

[0013] In some feasible embodiments of the first aspect, the key further includes a press position sensor for detecting the position coordinates of the pressure applied to the keycap. Multiple acquisitions of the pressure value detected by the pressure sensor include: multiple acquisitions of press information, each acquisition including acquiring the pressure value detected by the pressure sensor and the position coordinates detected by the press position sensor. After multiple acquisitions of press information, the method further includes: performing a third task if the pressure values ​​provided by the pressure sensor are all greater than or equal to a third pressure threshold and less than a second pressure threshold for P consecutive times, and the position coordinates detected by the press position sensor in any two adjacent presses within the P consecutive times are different; the third task corresponds to the third pressure threshold, where the third pressure threshold is less than the second pressure threshold, and P is greater than or equal to 2.

[0014] For example, if a user applies sliding pressure to the key module for P consecutive cycles and the keycaps are pressed at different positions in each of the P cycles, a sliding command can be successfully triggered, thereby executing the third task corresponding to the sliding command.

[0015] In this embodiment, the electronic device will only execute the third task corresponding to the pressure value of the keycap if the pressure value of the key module meets the pressure triggering requirement multiple times in a row, and the position coordinates of the pressure also meet the position triggering requirement multiple times in a row. This can avoid the situation where the user accidentally touches the key module at a certain moment when they do not want to trigger a certain touch command (such as sliding), which will cause the touch command to be accidentally triggered and the third task to be executed. This improves the comfort of the user's key operation experience when using the electronic device.

[0016] In some feasible embodiments of the first aspect, the key further includes a press position sensor for detecting the position coordinates of the pressure applied to the keycap. Multiple acquisitions of the pressure value detected by the pressure sensor include: multiple acquisitions of press information, each acquisition including acquiring the pressure value detected by the pressure sensor and the position coordinates detected by the press position sensor. After multiple acquisitions of press information, the method further includes: performing a third task if the pressure value provided by the pressure sensor for the first time is greater than or equal to a third pressure threshold and less than a second pressure threshold, and the pressure values ​​provided by the pressure sensor for the next P-1 consecutive times are greater than the third pressure threshold, and the position coordinates detected by the press position sensor in any two adjacent presses within the P consecutive times are different; the third task corresponds to the third pressure threshold, where the third pressure threshold is less than the second pressure threshold, and P is greater than or equal to 2.

[0017] In this embodiment, the electronic device will only execute the third task corresponding to the pressure value of the keycap if the pressure value of the key module meets the pressure triggering requirement multiple times in a row, and the position coordinates of the pressure also meet the position triggering requirement multiple times in a row. This can avoid the situation where the user accidentally touches the key module at a certain moment when they do not want to trigger a certain touch command (such as sliding), which will cause the touch command to be accidentally triggered and the third task to be executed. This improves the comfort of the user's key operation experience when using the electronic device.

[0018] Secondly, a touch control method is provided. This touch control method is applied to an electronic device having a button module. The button module includes keycaps and a pressure sensor, the pressure sensor being used to detect the pressure value applied to the keycaps. The method includes: acquiring the A-th pressure value detected by the pressure sensor; where A is a positive integer. If the A-th pressure value is greater than or equal to a first pressure threshold, acquiring the (A+1)-th pressure value detected by the pressure sensor. If the (A+1)-th pressure value is greater than or equal to the first pressure threshold, executing a first task; the first task corresponds to the first pressure threshold.

[0019] For example, by applying the corresponding pressure to the button module in N consecutive cycles, the user can successfully trigger the hard press command, and then execute the first task corresponding to the hard press command.

[0020] In this application, the electronic device only executes the first task corresponding to the pressure value of the keycap when the key module is touched by the user multiple times in succession and the pressure value of each touch meets the triggering requirements. This can avoid the situation where the user accidentally presses the key module at a certain moment when they do not want to trigger the touch command (such as a hard press), thus causing the touch command to be accidentally triggered and the first task to be executed, thereby improving the comfort of the user's key operation experience when using the electronic device.

[0021] In some feasible embodiments of the second aspect, after acquiring the pressure value detected by the pressure sensor for the Ath time, the method further includes: if the pressure value for the Ath time is greater than or equal to a second pressure threshold and less than a first pressure threshold, acquiring the pressure values ​​continuously detected by the pressure sensor for N-1 times after the Ath time. If all N-1 continuously detected pressure values ​​are greater than or equal to the second pressure threshold, a second task is performed; the second task corresponds to the second pressure threshold, which is less than the first pressure threshold.

[0022] For example, if the pressure value corresponding to the first cycle in a series of N cycles is greater than or equal to the light touch pressure threshold and less than the heavy press pressure threshold, and the pressure values ​​for the subsequent N-1 cycles are all greater than or equal to the light touch pressure threshold, a light touch command can be triggered, thereby enabling the electronic device to perform the second task corresponding to the light touch command.

[0023] In this implementation, when a user wants to trigger a light touch, they only need to precisely control the pressure value of the button in the first cycle of N consecutive cycles. In the subsequent N-1 cycles, even if the user increases the pressure value due to inaccurate pressure control, resulting in a pressure value exceeding the hard press pressure threshold, the light touch can still be successfully triggered. In this way, electronic devices can reduce or even eliminate the situation where hard press commands are accidentally triggered due to inaccurate user pressure control, improving the user's comfort in the button operation experience when using electronic devices.

[0024] In some feasible embodiments of the second aspect, after acquiring the pressure value detected by the pressure sensor for the (A+1)th time, the method includes: if the pressure value for the (A+1)th time is greater than or equal to a second pressure threshold and less than a first pressure threshold, acquiring the pressure values ​​detected by the pressure sensor for N-2 consecutive times after the (A+1)th time. The first of the N-2 consecutive times is the (A+2)th time. If all N-2 consecutively detected pressure values ​​are greater than or equal to the second pressure threshold, a second task is performed. The second task corresponds to the second pressure threshold, which is less than the first pressure threshold.

[0025] For example, a touch command can be triggered when the pressure value corresponding to the first cycle in a series of N cycles is greater than or equal to the heavy press pressure threshold, the pressure value corresponding to the second cycle in a series of N cycles is greater than or equal to the light touch pressure threshold but less than the heavy press pressure threshold, and the pressure value corresponding to the third cycle and subsequent cycles in a series of N cycles is greater than or equal to the second pressure threshold, thereby the electronic device executes the second task corresponding to the touch command.

[0026] In this implementation, when a user intends to trigger a light touch, in the first cycle of N consecutive cycles, the user's inaccurate pressure control leads to an increase in the pressing pressure value, exceeding the heavy press pressure threshold. However, in at least one subsequent cycle, the user precisely controls the button pressure value (the pressure value is greater than or equal to the light touch pressure threshold and less than the heavy press pressure threshold), and in multiple subsequent cycles, the pressure value is always greater than the light touch pressure threshold, thus successfully triggering the light touch. In this way, electronic devices can reduce or even eliminate the occurrence of accidental heavy presses due to inaccurate user pressure control, improving the user's comfort during button operation.

[0027] In some feasible embodiments of the second aspect, the key further includes a press position sensor, which is used to detect the position coordinates of the pressure applied to the keycap. Acquiring the pressure value detected by the pressure sensor for the Ath time includes: acquiring the press information for the Ath time, the press information including the pressure value detected by the pressure sensor and the position coordinates detected by the press position sensor. After acquiring the pressure value detected by the pressure sensor for the Ath time, the method further includes: if the pressure value in the press information for the Ath time is greater than or equal to a third pressure threshold and less than a second pressure threshold, acquiring the press information for the next N-1 consecutive times after the Ath time. The third pressure threshold is less than the second pressure threshold, and the first of the N-1 consecutive presses is designated as the A+1th time. If the pressure value in all N-1 presses is greater than or equal to the third pressure threshold, and the position coordinates of the Ath time and any two adjacent position coordinates in the N-1 presses are different, a third task is performed. The third task corresponds to the third pressure threshold.

[0028] For example, if the pressure value corresponding to the first cycle in N consecutive cycles is greater than or equal to the sliding pressure threshold and less than the light touch pressure threshold, and the pressure values ​​of the subsequent N-1 cycles are all greater than or equal to the sliding pressure threshold, and the position coordinates of any two adjacent cycles in N consecutive cycles are different, a sliding command can be triggered, thereby the electronic device executes the third task corresponding to the sliding command.

[0029] In this implementation, when a user wants to trigger a slide, they only need to precisely control the pressure value of the button in the first cycle of N consecutive cycles (the pressure value is greater than or equal to the slide pressure threshold and less than the touch pressure threshold). In the subsequent N-1 cycles, even if the user increases the pressure value due to inaccurate pressure control, resulting in a pressure value greater than the touch pressure threshold, the slide can still be triggered smoothly. In this way, electronic devices can reduce or even eliminate the situation where touch commands are accidentally triggered due to inaccurate pressure control by the user, improving the comfort of the button operation experience when using electronic devices.

[0030] In some feasible implementations of the second aspect, performing a third task includes: acquiring the position coordinates detected by the pressure position sensor in two consecutive detections; determining the direction of pressure change based on the two consecutive detections of position coordinates; and performing either a first subtask or a second subtask, wherein the direction of pressure change corresponding to the first subtask is different from the direction of pressure change corresponding to the second subtask.

[0031] For example, based on the position coordinates detected in two consecutive tests, it can be determined that the direction of the pressure change on the button module is upward relative to the electronic device. In this case, the triggered sliding command can be an upward sliding command, and the electronic device executes the first sub-task corresponding to the upward sliding command. Alternatively, based on the position coordinates detected in two consecutive tests, it can be determined that the direction of the pressure change on the button module is downward relative to the electronic device. In this case, the triggered sliding command can be a downward sliding command, and the electronic device executes the second sub-task corresponding to the downward sliding command.

[0032] In this embodiment, when a sliding command is triggered, the sliding direction can be determined based on the position coordinates of two adjacent detections. Different sliding commands are then triggered based on different sliding directions, allowing the electronic device to perform different tasks. This enhances the richness and playability of the user's sliding operation on the button module.

[0033] In some feasible embodiments of the second aspect, after performing the third task, the method further includes: acquiring a pressure value detected by a pressure sensor. If the pressure value is less than a third pressure threshold, the third task is terminated.

[0034] In some feasible embodiments of the second aspect, after performing the third task, the method further includes: acquiring the position coordinates detected by the press position sensor in two consecutive instances. If the position coordinates detected in two consecutive instances are the same, the third task is terminated.

[0035] Thirdly, an electronic device is provided. The electronic device includes a button module, a memory, and one or more processors. The memory is coupled to the processors. The memory stores computer program code, which includes computer instructions that, when executed by the processor, cause the electronic device to perform the method as described in any of the first aspects, or cause the electronic device to perform the method as described in any of the second aspects.

[0036] The beneficial effects of the third aspect can be referenced from the beneficial effects of the first aspect or the second aspect, and will not be elaborated here.

[0037] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any of the first aspects, or to perform the method as described in any of the second aspects.

[0038] The benefits of the fourth aspect can be referenced from the benefits of the first or second aspect, and will not be elaborated here. Attached Figure Description

[0039] Figure 1 A schematic diagram illustrating the relationship between user pressure and button triggering command in a button press;

[0040] Figure 2 This is a schematic diagram of the structure of an electronic device;

[0041] Figure 3 for Figure 2 An exploded three-dimensional diagram of the electronic device shown.

[0042] Figure 4 Schematic diagrams of two partial structures for button mounting on electronic devices provided for some embodiments of this application;

[0043] Figure 5 A partial structural diagram of a button mounted on an electronic device, provided for other embodiments of this application;

[0044] Figure 6 A partial structural diagram of a button mounted on an electronic device, provided for further embodiments of this application;

[0045] Figure 7 A partial structural diagram of a button mounted on an electronic device, provided for further embodiments of this application;

[0046] Figure 8 A schematic diagram of the pressing pressure on a button and the button trigger command in a touch method provided in some embodiments of this application;

[0047] Figure 9 Flowcharts of touch methods provided for some embodiments of this application;

[0048] Figure 10 A schematic diagram of the pressing pressure on the button and the button triggering command in a touch method provided in some other embodiments of this application;

[0049] Figure 11 Flowcharts of touch methods provided for other embodiments of this application;

[0050] Figure 12 A schematic diagram illustrating the pressing pressure on a button and the button triggering command in a touch method provided in some further embodiments of this application;

[0051] Figure 13 A flowchart of a touch method provided for further embodiments of this application;

[0052] Figure 14A schematic diagram of the structure of an electronic device provided for some embodiments of this application. Detailed Implementation

[0053] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application are within the scope of protection of this application.

[0054] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.

[0055] Furthermore, in this application, directional terms such as "upper," "lower," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and may change accordingly depending on the orientation of the components in the accompanying drawings.

[0056] In describing some embodiments, the terms "connected," "linked," and their derivative expressions may be used. For example, the term "connected" may be used to indicate that two or more components are in direct or indirect physical contact with each other. For example, "A and B are connected" can mean that A and B are connected directly, or it can mean that A and B are connected through other components. Furthermore, the term "coupled" can refer to an electrical connection that enables signal transmission; coupling can indicate direct coupling or indirect coupling.

[0057] "At least one of A, B and C" has the same meaning as "at least one of A, B or C", both including the following combinations of A, B and C: only A, only B, only C, combinations of A and B, combinations of A and C, combinations of B and C, and combinations of A, B and C.

[0058] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.

[0059] As used herein, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).

[0060] For ease of understanding, the technical terms used in this application will be explained and described below.

[0061] 1. Solid-state buttons

[0062] Solid-state buttons are hardware structures that enable users to perform touch operations and input commands into electronic devices. Solid-state buttons can intelligently recognize user touch operations, identifying the touch force, duration, and location applied to the button, thereby recognizing touch commands such as light touches, heavy presses, and swipes. This significantly expands the interaction methods between buttons and users, resulting in high interaction efficiency.

[0063] Solid-state keys can include keycaps and pressure sensors. The pressure sensors detect the pressure applied to the keycaps. When a solid-state key includes one pressure sensor, the electronic device can identify the applied pressure and duration of the press by acquiring the pressure value detected by the sensor. When a solid-state key includes at least two pressure sensors, it can not only identify the applied pressure and duration of the press, but also determine the coordinates of the press position based on the changes in pressure values ​​detected by different sensors.

[0064] Figure 1 This diagram illustrates the relationship between user pressure and button triggering command in a button press. Figure 1 The middle arrow indicates the pressure applied by the user when pressing the button. Currently, electronic devices with solid-state buttons have a problem with false triggering when detecting different user pressure levels. Details are as follows:

[0065] 1. When a user intends to lightly touch the button, they may not control the pressure accurately and press the button slightly too hard, easily triggering a hard press and resulting in an accidental touch. For example... Figure 1 As shown in T8, the user intended to tap lightly, but due to excessive pressure, the button was triggered to press hard.

[0066] Second, if a user intends to press harder, they may not control the pressure accurately and press the button too lightly, easily triggering a light touch and resulting in an accidental press. For example... Figure 1 As shown at time T17, the user wanted to press hard, but due to insufficient pressure, the button was triggered as a light touch.

[0067] Third, when a user intends to press hard, the user's pressure control accurately triggers the hard press. However, because the user's pressing force also meets the triggering conditions for a light touch, the light touch is mistakenly triggered. For example... Figure 1As shown in T5, T6, T8, T12, T13, T15, and T19 to T21, the user only wants to press hard, but the button will trigger a light touch at the same time as the hard press.

[0068] Fourth, if a user initially controls the pressure accurately to trigger a light touch, but later miscontrols the pressure, increasing the pressure to meet the trigger conditions for a hard press, the hard press may be mistakenly triggered. Figure 1 As shown in T14 and T15, if the user wants to lightly press, the pressing pressure at T14 accurately triggers the light press. If the user wants to continue lightly pressing, the increased pressing pressure at T15 causes the button to trigger a hard press.

[0069] All of these accidental touch scenarios reduce the user's comfort when using electronic devices and operating the buttons.

[0070] Based on this, embodiments of this application provide a touch control method and an electronic device. After a user applies pressure to the button module, the electronic device repeatedly determines within a certain period whether the pressure applied by the user meets the triggering conditions for a touch command. Only after the pressure applied by the user meets the triggering conditions for the touch command is the touch command triggered so that the electronic device can perform the corresponding task. This can reduce or even avoid the problem of false triggering caused by the user's inaccurate pressure control in a short period of time, as well as the problem of false triggering when a heavy press is simultaneously triggered by a light touch, thereby improving the user's comfort in the button operation experience when using the electronic device.

[0071] Understandably, in the embodiments of this application, after a user operates the button module of an electronic device, the electronic device will trigger a touch command after a certain period of time, thereby executing the task required by the user.

[0072] The electronic devices provided in the embodiments of this application are electronic devices with buttons, and may include, but are not limited to, smartphones, tablets, laptops, handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices (smartwatches, smart bracelets, smart rings, etc.), virtual reality devices, etc. The embodiments of this application do not limit this. The following description uses a smartphone as an example of an electronic device, but it is not limited to smartphones.

[0073] Please see Figure 2 and Figure 3 , Figure 2 A schematic diagram of the electronic device is shown; Figure 3 It shows Figure 2The diagram shows an exploded perspective view of the electronic device. The electronic device 100 may include a button module (hereinafter referred to as buttons) 10, a housing 30, a screen 40, and a circuit board 50. The housing 30 and the screen 40 together form a storage space, and the circuit board 50 may be located within this storage space. The buttons 10 may be solid-state buttons.

[0074] Understandable Figure 2 and Figure 3 The electronic device 100 is shown only schematically, and the actual shape, size, location, and construction of these components are not subject to change. Figure 2 and Figure 3 As well as the limitations of the accompanying figures below.

[0075] Screen 40 is used to display images, videos, etc. Screen 40 includes a light-transmitting cover plate 41 and a display screen 42. The light-transmitting cover plate 41 is stacked and fixedly connected to the display screen 42. The light-transmitting cover plate 41 is mainly used to protect the display screen 42 and prevent dust. The material of the light-transmitting cover plate 41 includes, but is not limited to, glass. The display screen 42 can be a flexible display screen or a rigid display screen. For example, the display screen 42 can be an organic light-emitting diode (OLED) display screen, an active-matrix organic light-emitting diode (AMOLED) display screen, a mini organic light-emitting diode (MLED) display screen, a micro organic light-emitting diode (MLED) display screen, a quantum dot light-emitting diode (QLED) display screen, a liquid crystal display (LCD), etc., without limitation.

[0076] The housing 30 is used to protect the internal electronic components of the electronic device 100. The housing 30 may include a back cover 31 and a middle frame 32. The middle frame 32 includes a side frame 321 and a plate 322 located inside the side frame 321.

[0077] The back cover 31 is located on the side of the display screen 42 away from the light-transmitting cover plate 41, and is stacked and spaced apart from the light-transmitting cover plate 41 and the display screen 42. The frame 321 is located between the back cover 31 and the light-transmitting cover plate 41. The frame 321 can be fixed to the back cover 31. Exemplarily, the frame 321 can be fixed to the back cover 31 by adhesive, or the frame 321 can be integrally formed with the back cover 31, i.e., the frame 321 and the back cover 31 are a single structural component. The light-transmitting cover plate 41 can be fixed to the frame 321 by adhesive. The light-transmitting cover plate 41, the back cover 31, and the frame 321 together form a storage space for the electronic device 100. This storage space accommodates the display screen 42, the middle frame 32, and the circuit board 50.

[0078] like Figure 3 As shown, the plate 322 is disposed within the aforementioned storage space, and the plate 322 is located on the side of the display screen 42 away from the light-transmitting cover plate 41. The edge of the plate 322 is fixed to the frame 321. In some embodiments, the edge of the plate 322 can be fixed to the frame 321 by adhesive, or the plate 322 and the frame 321 can be integrally formed, that is, the plate 322 and the frame 321 are a single structural component. The display screen 42 can be located on the side of the plate 322 closer to the light-transmitting cover plate 41, and the circuit board 50 can be located on the side of the plate 322 closer to the back cover 31.

[0079] The circuit board 50 is used to house electronic components and enable electrical connections between them. In some embodiments, the circuit board 50 may include a main circuit board 51 and a sub-circuit board 52. The main circuit board 51 and the sub-circuit board 52 are disposed in a portion of the space between the middle frame 32 and the back cover 31, and are stacked with the back cover 31. In some embodiments, both the main circuit board 51 and the sub-circuit board 52 are fixed to the board body 322.

[0080] The main circuit board 51 is used to integrate a control chip. The control chip can be, for example, a system-on-chip (SOC), an application processor (AP), double data rate synchronous dynamic random access memory (DDR), or universal flash storage (UFS). In some embodiments, the main circuit board 51 is electrically connected to the display screen 42, and the main circuit board 51 is used to control the display screen 42 to display images or videos.

[0081] The main circuit board 51 can be a rigid circuit board, a flexible circuit board, or a rigid-flex circuit board. The main circuit board 51 can use an FR-4 dielectric board, a Rogers dielectric board, or a hybrid dielectric board of FR-4 and Rogers, etc. It should be noted that FR-4 is a designation for a flame-retardant material grade, and the Rogers dielectric board is a high-frequency board.

[0082] Sub-circuit board 52 is used to integrate electronic devices such as antenna (e.g., 5G antenna) RF front-end, universal serial bus (USB) devices, and vibration motors.

[0083] The secondary circuit board 52 can also be a rigid circuit board, a flexible circuit board, or a rigid-flex circuit board. The secondary circuit board 52 can also be an FR-4 dielectric board, a Rogers dielectric board, or a hybrid dielectric board of FR-4 and Rogers.

[0084] The circuit board 50 may also include a connection structure 53. The connection structure 53 can be electrically connected to the main circuit board 51 and the sub-circuit board 52 to realize data and signal transmission between the sub-circuit board 52 and the main circuit board 51. The connection structure 53 may include, but is not limited to, a flexible printed circuit (FPC), wires, enameled wires, or a structure formed by braiding wires and flexible materials.

[0085] Button 10 can be mounted on the housing (e.g., bezel 321, or back cover 31) 30 of electronic device 100. For example, button 10 can be located in the center of bezel 321 and serve as a volume control button, screen lock button, etc. of electronic device 100.

[0086] Please see Figure 4 , Figure 4 The diagram illustrates two partial structural designs of buttons mounted on an electronic device, as provided in some embodiments of this application. Button 10 may include a keycap 11 for user touch. The user can press the keycap 11 to perform touch operations such as light touch, heavy press, and swipe, thereby inputting different touch commands to the electronic device.

[0087] The button 10 may also include a resilient beam 12. The end of the resilient beam 12 may be connected to the mid-frame 32 of the electronic device. For example, as... Figure 4 As shown in (a), the middle frame 32 of the electronic device includes a middle frame body and a connecting body, the connecting body being parallel to the keycap 11 and fixedly connected to the end of the elastic beam 12. As another example, as... Figure 4 As shown in (b), the middle frame 32 of the electronic device includes a middle frame body and a connecting body, the connecting body being perpendicular to the keycap and fixedly connected to the end of the elastic beam 12.

[0088] The elastic beam 12 can also be connected to the keycap 11 to receive the pressing pressure transmitted by the keycap 11 and deform accordingly. Exemplarily, the keycap 11 may include a cap body 111 and a guide post 112 connecting the cap body 111 and the elastic beam 12. The cap body 111 and the guide post 112 may be an integrally formed structure, or they may be an integral structure formed by assembling (welding or gluing) each other; no limitation is made here. The surface of the cap body 111 away from the elastic beam 12 includes a pressing surface for the user to press. When the user presses the cap body 111, the pressure received by the cap body 111 is transmitted to the elastic beam 12, causing the elastic beam 12 to deform.

[0089] Specifically, the degree of deformation of the elastic beam 12 under pressure is negatively correlated with the rigidity of the elastic beam 12. For example, the higher the rigidity of the elastic beam 12, the smaller the deformation caused by pressure; the lower the rigidity of the elastic beam 12, the greater the deformation caused by pressure.

[0090] The elastic beam 12 can be made of suitable materials such as silicon steel or stainless steel, and no limitation is made here.

[0091] The button 10 may also include a pressure sensor 13. The pressure sensor 13 may typically include a polymer ink-printed pressure sensor, a piezoresistive pressure sensor, a microelectromechanical system (MEMS) pressure sensor, etc. The pressure sensor 13 may be directly or indirectly disposed on the elastic beam 12. The pressure sensor 13 can sense the magnitude of the user's pressing force by sensing the degree of deformation of the elastic beam 12. For example, as... Figure 4 As shown in (a) and (b), the pressure sensor 13 is disposed on the elastic beam 12. When the elastic beam 12 deforms due to the pressing force, the elastic beam 12 drives the pressure sensor 13 to deform, thereby the pressure sensor 13 outputs a sensing signal to indicate the pressure value, pressure duration and other information of the pressing force on the keycap 11 due to its own deformation.

[0092] Button 10 may also include FPC 14. FPC 14 can be mounted on the elastic beam 12 and coupled to pressure sensor 13. Additionally, FPC 14 may include a first board-to-board (BTB) connector, and the main circuit board 51 may also include a second BTB connector. The first BTB connector is connected to the second BTB connector, allowing FPC 14 to communicate with the SOC on the main circuit board 51. Thus, FPC 14 can transmit the sensing signal output by pressure sensor 13 to the SOC on the main circuit board 51. Therefore, the SOC can determine the pressure value and pressing duration of the button 10 based on the sensing signal output by pressure sensor 13. Furthermore, when button 100 includes at least two pressure sensors 13, the SOC can also determine the position coordinates of the pressure applied to button 10 based on the pressure value changes of multiple pressure sensors 13. In this embodiment, since the position coordinates of the pressure can be obtained based on multiple pressure sensors 13, the multiple pressure sensors 13 can also be considered as pressing position sensors.

[0093] The frame 321 may have a recess 323. At least a portion of the keycaps 11 of the solid-state buttons 10 are received within the recess 323. For example, the cap body 111 is received within the recess 323 of the housing 30.

[0094] Please see Figure 5 , Figure 5 This is a partial structural diagram of a button mounted on an electronic device, provided for some other embodiments of this application. The button 10 may include a keycap 11, an elastic structure 15, a pressure sensor 13, and an FPC 14. The elastic structure 15 may be connected to the keycap 11, and the elastic structure 15 is used to receive the pressing pressure transmitted by the keycap 11 and deform accordingly.

[0095] The elastic structure 15 may include multiple stacked steel sheets. For example... Figure 5 As shown, the elastic structure 15 may include steel sheets a, b, c, d, and e stacked sequentially along the direction away from the keycap 11. Steel sheet a deforms under the pressure transmitted from the keycap 11, and this deformation exerts pressure on steel sheet b, causing it to deform as well. This process is gradually transmitted, resulting in deformation of steel sheets a, b, c, d, and e.

[0096] Steel sheet b may have a through hole, allowing steel sheets b, a, and c to collectively form a storage space. Pressure sensor 13 can be disposed within this storage space. Pressure sensor 13 can be directly or indirectly disposed on steel sheet a; alternatively, pressure sensor 13 can be directly or indirectly disposed on steel sheet c, without limitation.

[0097] One end of the FPC14 can extend into the storage space and be coupled to the pressure sensor 13, while the other end of the FPC14 can extend out of the storage space and be coupled to the main circuit board 51. In this way, the FPC14 can transmit the sensing signal output by the pressure sensor 13 to the SOC on the main circuit board 51. Therefore, the SOC can determine the pressure value and press duration of the button 10 based on the sensing signal output by the pressure sensor 13. Furthermore, the SOC can determine the position coordinates of the pressure applied to the button 10 based on the pressure value changes of the two pressure sensors 13. In this embodiment, since the position coordinates of the pressure can be obtained from multiple pressure sensors 13, the multiple pressure sensors 13 can also be considered as press position sensors.

[0098] Please see Figure 6 , Figure 6 This is a partial structural diagram of a button mounted on an electronic device, provided for further embodiments of this application. The button 10 may include a keycap 11, an elastic structure 15, a pressure sensor 13, and an FPC 14.

[0099] The keycap 11 may include a stacked pressing layer 113, an adhesive layer 114, and a circuit board 115. The adhesive layer 114 may be located between the pressing layer 113 and the circuit board 115, so that the pressing layer 113 and the circuit board 115 are tightly bonded together. The pressing layer 113 faces the user and is used for the user's fingers to press.

[0100] The pressing layer 113 may include an insulating material, such as plastic. The pressing layer 113 may also include a plurality of capacitors 116 arranged in an array. Each capacitor 116 may consist of two opposing metal plates serving as the two electrodes of a capacitor. The insulating material covers the plurality of capacitors 116.

[0101] Multiple metal wires inside the circuit board 115 can pass through the adhesive layer 114 and part of the pressing layer 113, connecting to the two plates of each capacitor 116. When the user presses the pressing layer 113, the capacitance value of the capacitor 116 in the corresponding pressing area of ​​the pressing layer 113 will change. In this way, the circuit board 115 can detect the capacitance change of each capacitor 116.

[0102] The pressing layer 113 will deform under the pressure of the user. The deformation of the pressing layer 113 will put pressure on the adhesive layer 114, causing the adhesive layer 114 to deform. The deformation of the adhesive layer 114 will put pressure on the circuit board 115, causing the circuit board 115 to deform.

[0103] The elastic structure 15 may include multiple stacked steel sheets. For example... Figure 6As shown, the elastic structure 15 may include steel sheets f, g, and h stacked sequentially along the direction away from the keycap 11. Steel sheet f deforms under the pressure transmitted from the keycap 11. The deformation of steel sheet f exerts pressure on steel sheet g, causing steel sheet g to deform, and the deformation of steel sheet g exerts pressure on steel sheet h, causing steel sheet h to deform.

[0104] The pressure sensor 13 can be directly or indirectly disposed on the steel plate h. Exemplarily, the pressure sensor 13 is located on the surface of the steel plate h away from the keycap 11. The pressure sensor 13 can detect the user's pressing pressure by detecting the deformation of the steel plate h. The number of pressure sensors 13 can be one, such as... Figure 6 As shown.

[0105] One end of the FPC14 can be coupled to the pressure sensor 13, and the other end of the FPC14 can be coupled to the main circuit board 51. In this way, the FPC14 can transmit the sensing signal output by the pressure sensor 13 to the SOC on the main circuit board 51. As a result, the SOC can determine the pressure value of the button 10 based on the sensing signal output by the pressure sensor 13.

[0106] FPC14 can also be coupled to circuit board 115. In this way, FPC14 can transmit the capacitance changes of each capacitor 116 to the SOC on the main circuit board 51. Therefore, the SOC can determine the position coordinates of the pressure applied to the button 10 based on the capacitance changes of each capacitor 116. In this embodiment, the position coordinates of the pressure can be obtained based on the capacitance changes of multiple capacitors 116; therefore, the multiple capacitors 116 can also be considered as pressure position sensors.

[0107] Please see Figure 7 , Figure 7 This is a partial structural diagram of a button mounted on an electronic device, provided for further embodiments of this application. The button 10 may include a keycap 11, a bracket 17, a pressure sensor 13, and an FPC 14.

[0108] Figure 7 The structure and function of keycap 11 in the middle, and Figure 6 The structure and function of the middle keycap 11 are basically the same, so they will not be described again here.

[0109] The support 17 can be a frame. The frame can include an elastic material, such as steel. The support 17 can be connected to the keycap 11. When the keycap 11 is pressed by the user and deforms, the deformation of the keycap 11 will exert pressure on the support 17, causing the support 17 to deform.

[0110] For example, the bracket 17 can be a single-opening frame, such as a square-shaped frame. Alternatively, the bracket 17 can be a double-opening frame, such as a 90° rotated square-shaped frame. The double-opening frame can improve the support performance of the bracket 17.

[0111] The single or double port in the bracket 17 can be filled with plastic or rubber to enhance the support performance of the bracket 17. In some examples, the middle frame 32 can be inserted into the single or double port in the bracket 17, so that the bracket 17 is fixedly connected to the middle frame 32, thereby allowing the button 10 to be mounted on the middle frame 32.

[0112] The pressure sensor 13 can be mounted on the bracket 17. For example, the pressure sensor 13 is located on the surface of the bracket 17 away from the keycap 11. The pressure sensor 13 can detect the user's pressing pressure by detecting deformation of the bracket 17.

[0113] FPC14 may include a first segment 141, a second segment 142, and a third segment 143, with the second segment 142 connecting both the first segment 141 and the third segment 143 to form a single integrated structure. The first segment 141 may be located between the bracket 17 and the keycap 11 and coupled to the circuit board 115 in the keycap 11 to obtain capacitance change information of each capacitor 116. The third segment 143 may be located on the side of the bracket 17 away from the keycap 11 and coupled to the pressure sensor 13 to obtain the output sensing signal.

[0114] FPC14 can also be coupled to the SOC on the main circuit board 51. In this way, the SOC can determine the pressure value of the button 10 based on the sensing signal output by the pressure sensor 13, and the SOC can determine the position coordinates of the pressure on the button 10 based on the capacitance changes of each capacitor 116.

[0115] Understandably, regardless of the method used by the button 10 in the electronic device 100 Figures 4 to 7 Either method can obtain the pressure value and position coordinates of the user pressing button 10.

[0116] The following details how the electronic device uses button 10 to trigger the corresponding touch command.

[0117] Figure 8 The diagram illustrates the pressing pressure on a button and the button trigger command in a touch method provided by some embodiments of this application; Figure 9 A flowchart of a touch method provided by some embodiments of this application is shown. Figure 8 The middle arrow indicates the pressure applied by the user when pressing the button, and Figure 8 The pressure value of the user pressing the button, and Figure 1 The pressure applied by the user when pressing the button is consistent.

[0118] Electronic devices can be pre-configured with a light-touch pressure threshold F 轻阈 and the pressure threshold F 重阈 Lightly touch the pressure threshold F 轻阈 This refers to the user's pressing pressure exceeding the light touch pressure threshold F. 轻阈 The force required to trigger a light touch command is met. (Pressure threshold F) 重阈 This refers to the user's pressing pressure exceeding the heavy pressing pressure threshold F. 重阈 It meets the force requirements for triggering a hard press command. Specifically, the hard press pressure threshold F... 重阈 Greater than the light touch pressure threshold F 轻阈 For example, pressing the pressure threshold F 重阈 The threshold pressure is 15N, and the light touch pressure is F. 轻阈 It is 7N.

[0119] The electronic device can also be pre-configured to detect the interval period of the user's pressing pressure using the pressure sensor 13. For example, the electronic device can be configured to detect the user's pressing pressure at a frequency of 50Hz, so that the interval period for the pressure sensor 13 to detect the user's pressing pressure once is 20ms. As another example, the electronic device can be configured to detect the user's pressing pressure at a frequency of 100Hz, so that the interval period for the pressure sensor 13 to detect the user's pressing pressure once is 10ms.

[0120] Electronic devices can also be pre-configured to receive the number of cycles T required to trigger touch commands (tap commands or hard press commands). 限 For example, T 限 =2, or T 限 =3,T 限 =4, etc., no restrictions are imposed here. Using T 限 For example, if the pressure sensor 13 detects that the user's pressing pressure is greater than the hard press pressure threshold for three consecutive detection cycles, the electronic device will trigger the hard press command.

[0121] In the embodiments of this application, the process of the touch method executed by the electronic device is as follows: Figure 9 As shown, it may include steps S201 to S214.

[0122] Step S201: Set the number of detection cycles T 检 =0, number of light touch cycles T 轻 =0, and the number of repress cycles T 重 =0.

[0123] Step S202: T 检 =T 检 +1.

[0124] Step S203: Obtain T 检 Cyclic pressing force value F[T]检 ].

[0125] Step S204: Determine F[T] 检 ]≥Repress pressure threshold F 重阈 ?

[0126] In F[T 检 ]≥F 重阈 In the case of F[T], proceed to step S205; 检 ] < F 重阈 In the case of S210, proceed to step S210.

[0127] Step S205: T 重 ≠ outlier?

[0128] T 重 = An outlier indicates that the current judgment has been exited and a new judgment has been requested. Therefore, in T 重 If the value is not an outlier, proceed to step S206; in T 重 =In case of an abnormal value, jump to step S212.

[0129] Step S206: T 重 =T 重 +1.

[0130] Step S207: T 轻 =T 轻 +1.

[0131] Step S208: T 重 ≥T 限 ?

[0132] In T 重 ≥T 限 In the case of T, proceed to step S209; 重 <T 限 In the case of [the previous step], return to step S202 and begin a new round of judgment.

[0133] Step S209: The electronic device triggers a hard press command.

[0134] Step S210: Set T 重 =Outlier.

[0135] Step S211: Determine F[T] 检 ]≥ Light touch pressure threshold F 轻阈 ?

[0136] In F[T 检 ] < F 轻阈 In this case, if the pressure applied by the user does not meet the requirements for triggering a light touch or a hard press, the touch command triggering process needs to be exited and the judgment factors reset. Therefore, in F[T检 ]≥F 轻阈 In the case of F[T], proceed to step S212; 检 ] < F 轻阈 In the case of [the previous step], return to step S201.

[0137] Step S212: T 轻 =T 轻 +1.

[0138] Step S213: T 轻 ≥T 限 ?

[0139] In T 轻 ≥T 限 In the case of T, proceed to step S214; 轻 <T 限 In the case of [the previous step], return to step S202 and begin a new round of judgment.

[0140] Step S214: The electronic device triggers a touch command.

[0141] With T 限 For example, if = 3, Figure 8 As shown, the process of an electronic device triggering a touch command from cycle T2 to cycle T5 is explained.

[0142] Within period T2, T2 serves as the first detection period T. 检 =1. From Figure 8 It can be seen from F[1]<F 重阈 Therefore, steps S205 to S209 are not executed, and step S210 is executed to set T. 重 =Abnormal value. Therefore, this touch command will only be considered a light touch, not a hard press. From Figure 8 It can be seen from F[1]≥F 轻阈 Execution step S212 causes T 轻 =1.

[0143] Because of T 轻 =1<T 限 =3, return to step S202. Within cycle T3, T3 serves as the second detection cycle T. 检 =2. From Figure 8 It can be seen from this that when F[2] < F 重阈 Therefore, steps S205 to S209 are not executed, and step S210 is executed to set T. 重 =Outlier. From Figure 8 It can be seen from F[2]≥F 轻阈 Execution step S212 causes T 轻 =2.

[0144] Because of T 轻 =2<T 限 =3, return to step S202. Within cycle T4, T4 serves as the third detection cycle T. 检 =3. From Figure 8 It can be seen from F[3]<F 重阈 Therefore, steps S205 to S209 are not executed, and step S210 is executed to set T. 重 =Outlier. From Figure 8 It can be seen from F[3]≥F 轻阈 Execution step S212 causes T 轻 =3.

[0145] Because of T 轻 =T 限 =3, execute step S214, so that the electronic device triggers a touch command in cycle T5.

[0146] In this embodiment, the user can successfully trigger the touch command by applying the corresponding pressure to the button 10 for three consecutive cycles. This avoids the situation where the user accidentally touches the button 10 at a certain moment when they do not want to trigger the touch command, thus improving the user's comfort in the button operation experience when using electronic devices.

[0147] It should be noted that the touch command is triggered in cycle T5, but the pressure value detected by pressure sensor 13 in cycle T5 is not limited. The pressure value detected by pressure sensor 13 in cycle T5 can be less than F. 轻阈 Or greater than F 重阈 None of these factors affect the triggering of touch commands. Similarly, the pressure value detected within the cycle of triggering a touch command does not affect the triggering of the touch command within that cycle, and this will not be elaborated upon further.

[0148] T 限 For example, if = 3, Figure 8 As shown, the process of an electronic device triggering a touch command from cycle T6 to cycle T9 is explained.

[0149] Within cycle T6, T6 serves as the first detection cycle T. 检 =1. From Figure 8 It can be seen from F[1]≥F 重阈 Therefore, steps S210 to S214 are not executed, and at this time T 重 ≠ outlier, executing steps S206 and S207 makes T 重 =1 and T 轻 =1. Since F[1]≥F 重阈It simultaneously meets the requirements for triggering both light touch and hard press, so this touch command will simultaneously determine whether it is a hard press or a light touch.

[0150] Because of T 重 =1<T 限 =3, return to step S202. Within cycle T7, T7 serves as the second detection cycle T. 检 =2. From Figure 8 It can be seen from this that when F[2] < F 重阈 Therefore, steps S205 to S209 are not executed, and step S210 is executed to set T. 重 =Abnormal value. Therefore, this touch command trigger will skip the hard press check and only check for a light touch. From Figure 8 It can be seen from F[2]≥F 轻阈 Execution step S212 causes T 轻 =2.

[0151] Because of T 轻 =2<T 限 =3, and return to step S202 in cycle T8. Within cycle T8, T8 serves as the third detection cycle T. 检 =3. From Figure 8 It can be seen from F[3]≥F 重阈 And within the T7 cycle, T 重 = An outlier, therefore steps S210 to S211 are not executed, and step S212 is executed to make T 轻 =3.

[0152] Because of T 轻 =T 限 =3, execute step S214, so that the electronic device triggers a touch command in cycle T9.

[0153] Understandably, even if the user's pressing force on button 10 is ≥ F during T6 and T8 cycles... 重阈 Then, the pressure value ≥ F 轻阈 The conditions for triggering a tap command are met, therefore the T6 and T8 cycles are also considered as tap command detection cycles.

[0154] In this embodiment, when the user wants to trigger a touch command, the pressure value is sometimes greater than or equal to F due to inaccurate control of the pressing pressure. 重阈 Even under certain conditions, a light touch command can still be successfully triggered. This reduces or even eliminates the possibility of accidental hard presses due to inaccurate user pressure, improving the user's comfort when using electronic devices.

[0155] T 限 For example, if = 3, Figure 8 As shown, the process of an electronic device triggering a re-press command from cycle T19 to cycle T22 is explained.

[0156] Within the T19 cycle, T19 serves as the first detection cycle T. 检 =1. From Figure 8 It can be seen from F[1]≥F 重阈 Therefore, steps S210 to S214 are not executed, and at this time T 重 ≠ outlier, executing steps S206 and S207 makes T 重 =1 and T 轻 =1. Since F[1]≥F 重阈 It simultaneously meets the requirements for triggering both light touch and hard press, so this touch command will simultaneously determine whether it is a hard press or a light touch.

[0157] Because of T 重 =1<T 限 =3, return to step S202. Within cycle T20, T20 serves as the second detection cycle T. 检 =2. From Figure 8 It can be seen from F[2]≥F 重阈 Therefore, steps S210 to S214 are not executed, and at this time T 重 ≠ outlier, executing steps S206 and S207 makes T 重 =2 and T 轻 =2.

[0158] Because of T 重 =2<T 限 =3, return to step S202. Within cycle T21, T21 is the third detection cycle T 检 =3. From Figure 8 It can be seen from F[3]≥F 重阈 Therefore, steps S210 to S214 are not executed, and at this time T 重 ≠ outlier, executing steps S206 and S207 makes T 重 =3 and T 轻 =3.

[0159] Because of T 重 =T 限 =3, execute step S209, so that the electronic device triggers the re-press command in cycle T22.

[0160] In this embodiment, the user can successfully trigger the hard press command by applying the corresponding pressure to the button 10 for three consecutive cycles. This avoids the situation where the user accidentally presses the button 10 at a certain moment when they do not want to trigger the hard press command, thus improving the user's comfort in the button operation experience when using electronic devices.

[0161] The electronic device provided in the embodiments of this application can also trigger a sliding command based on the change in the position coordinates of the user pressing the button 10. The method by which the SOC obtains the pressure value and the position coordinates of the pressure on the button 10 has already been explained, and will not be repeated here.

[0162] Figure 10 The diagram illustrates the pressing pressure on a button and the button trigger command in a touch method provided by some other embodiments of this application; Figure 11 A flowchart of a touch method provided in some other embodiments of this application is shown. Figure 10 The middle arrow indicates the pressure applied by the user when pressing the button. Figure 10 In the context of positional changes, pattern fill is used to indicate that the position has shifted. Figure 10 In the context of positional changes, blank spaces are used to indicate that the position has not moved.

[0163] Electronic devices can be pre-configured with a sliding pressure threshold F 滑阈 Lightly touch the pressure threshold F 轻阈 and the pressure threshold F 重阈 Sliding pressure threshold F 滑阈 This refers to the user's pressing force exceeding the sliding pressure threshold F. 滑阈 The force required to trigger the sliding command is met. Lightly touch the pressure threshold F. 轻阈 This refers to the user's pressing pressure exceeding the light touch pressure threshold F. 轻阈 The force required to trigger a light touch command is met. (Pressure threshold F) 重阈 This refers to the user's pressing pressure exceeding the heavy pressing pressure threshold F. 重阈 It meets the force requirements for triggering a hard press command. Specifically, the hard press pressure threshold F... 重阈 Greater than the light touch pressure threshold F 轻阈 Lightly touch the pressure threshold F 轻阈 Greater than the sliding pressure threshold F 滑阈 For example: Pressing the pressure threshold F 重阈 The threshold pressure is 15N, and the light touch pressure is F. 轻阈 The sliding pressure threshold F is 10N. 滑阈 It is 5N.

[0164] The electronic device can also be pre-configured to detect the period of user pressure applied by the pressure sensor 13. For example, the electronic device can be configured to detect user pressure at a frequency of 50Hz, so that the period of one user pressure application by the pressure sensor 13 is 20ms. Alternatively, the electronic device can be configured to detect user pressure at a frequency of 100Hz, so that the period of one user pressure application by the pressure sensor 13 is 10ms.

[0165] Electronic devices can also be pre-configured to receive the number of cycles T required to trigger touch commands (swipe commands, tap commands, or press commands). 限 For example, T 限 =2, or T 限 =3,T 限 =4, etc., no restrictions are imposed here. Using T 限 For example, if the pressure sensor 13 detects that the user's pressing pressure is greater than the sliding pressure threshold for three consecutive cycles, and the pressure sensor 13 detects a change in the position coordinate of the pressure on the button 10 for three consecutive cycles, then the sliding command will be triggered.

[0166] In the embodiments of this application, the process of the touch method executed by the electronic device is as follows: Figure 11 As shown, it may include steps S301 to S319.

[0167] Step S301: Set the number of detection cycles T 检 =0, number of sliding cycles T 滑 =0, number of light touch cycles T 轻 =0, and the number of repress cycles T 重 =0.

[0168] Step S302: T 检 =T 检 +1.

[0169] Step S303: Obtain T 检 Cyclic pressing force value F[T] 检 ] and T 检 The position coordinates of the period W[T 检 ].

[0170] Step S304: Determine F 滑阈 <F[T 检 ] < F 轻阈 ?

[0171] In F 滑阈 <F[T 检 ] < F 轻阈 In the case of F[T], proceed to step S305; 检 ]≥F 轻阈or F 滑阈 ≥F[T 检 In the case of […], proceed to step S309.

[0172] Step S305: Determine W[T] 检 ]≠W[T 检 -1]?

[0173] Step S305 is used to detect whether the position coordinates of the pressure on button 10 have changed. In T 检 When = 1, the default is W[T] 检 ]≠W[T 检 -1]. In T 检 When ≥2, compare T 检 The position coordinates of the period and T 检 -1 cycle position coordinates.

[0174] In W[T 检 ]≠W[T 检 In the case of -1], proceed to step S306; in W[T 检 ] = W[T 检 In the case of -1], step S301 is executed, which means exiting the judgment of triggering the sliding command.

[0175] Step S306: T 滑 =T 滑 +1.

[0176] Step S307: T 滑 ≥T 限 ?

[0177] In T 滑 ≥T 限 In the case of T, proceed to step S308; 滑 <T 限 In the case of [the previous step], return to step S302 and begin a new round of judgment.

[0178] Step S308: The electronic device triggers a sliding command.

[0179] Step S309: Determine F[T] 检 ]≥Repress pressure threshold F 重阈 ?

[0180] In F[T 检 ]≥F 重阈 In the case of F[T], proceed to step S310; 检 ] < F 重阈 In the case of this, proceed to step S315.

[0181] Step S310: T 重 ≠ outlier?

[0182] T 重 = An outlier indicates that the current judgment has been exited and a new judgment has been requested. Therefore, in T 重 If the value is not an outlier, proceed to step S311; in T 重 =In case of an abnormal value, jump to step S317.

[0183] Step S311: T 重 =T 重 +1.

[0184] Step S312: T 轻 =T 轻 +1.

[0185] Step S313: T 重 ≥T 限 ?

[0186] In T 重 ≥T 限 In the case of T, proceed to step S314; 重 <T 限 In the case of [the previous step], return to step S302 and begin a new round of judgment.

[0187] Step S314: The electronic device triggers a hard press command.

[0188] Step S315: Set T 重 =Outlier.

[0189] Step S316: Determine F[T] 检 ]≥ Light touch pressure threshold F 轻阈 ?

[0190] In F[T 检 ]≥F 轻阈 In the case of F[T], proceed to step S317; 检 ] < F 轻阈 In the case of S301, return to the execution step, indicating that the judgment of triggering touch command is exited.

[0191] Step S317: T 轻 =T 轻 +1.

[0192] Step S318: T 轻 ≥T 限 ?

[0193] In T 轻 ≥T 限 In the case of T, proceed to step S319; 轻 <T 限 In the case of [the previous step], return to step S302 and begin a new round of judgment.

[0194] Step S319: The electronic device triggers a touch command.

[0195] With T 限 For example, if = 3, Figure 10 As shown, the process of an electronic device triggering a sliding command from cycle T1 to cycle T4 is explained.

[0196] Within period T1, T1 serves as the first detection period T. 检 =1. From Figure 10 It can be seen from F 滑阈 <F[1]<F 轻阈 Therefore, steps S305 to S307 are executed, but steps S309 to S319 are not executed. Step S305 is executed because T... 检 When W = 1, W[1] ≠ W[0], and then step S306 is executed to make T 滑 =1.

[0197] Because of T 滑 =1<T 限 =3, return to step S302. Within cycle T2, T2 serves as the second detection cycle T. 检 =2. From Figure 10 It can be seen from F 滑阈 <F[2]<F 轻阈 Therefore, steps S305 to S307 are executed, but steps S309 to S319 are not executed. Step S305 is executed because T... 检 When W = 2, the pattern fill indicates that W[2] ≠ W[1], and then step S306 is executed to make T 滑 =2.

[0198] Because of T 滑 =2<T 限 =3, return to step S302. Within cycle T3, T3 serves as the third detection cycle T. 检 =3. From Figure 10 It can be seen from F 滑阈 <F[3]<F 轻阈 Therefore, steps S305 to S307 are executed, but steps S309 to S319 are not executed. Step S305 is executed because T... 检 When W = 3, the pattern fill indicates that W[3] ≠ W[2], and then step S306 is executed to make T 滑 =3.

[0199] Because of T 滑 =T 限=3, execute step S308, so that the electronic device responds to the change of the user's pressing position (W[1] to W[3]) during the T4 cycle and triggers the corresponding sliding command.

[0200] In this embodiment, by applying the corresponding sliding pressure to button 10 for three consecutive cycles and continuously moving the pressing position, the user can successfully trigger the sliding command. This avoids the situation where the user accidentally touches button 10 at a certain moment when they do not want to trigger the sliding command, thus improving the user's comfort in the button operation experience when using electronic devices.

[0201] Figure 12 This illustration shows a schematic diagram of the pressing pressure on a button and the button trigger command in a touch method provided by some other embodiments of this application; Figure 13 A flowchart of a touch method provided by yet another embodiment of this application is shown. Figure 12 The middle arrow indicates the pressure applied by the user when pressing the button. Figure 12 In the context of positional changes, pattern fill is used to indicate that the position has shifted. Figure 12 In the context of positional changes, blank spaces are used to indicate that the position has not moved. Figure 12 The pressure value of the user pressing the button, and Figure 1 The pressure applied by the user when pressing the button is consistent.

[0202] Electronic devices can be pre-configured with a sliding pressure threshold F 滑阈 Lightly touch the pressure threshold F 轻阈 and the pressure threshold F 重阈 The electronic device can also be pre-configured with pressure sensor 13 to detect the duration of the user's pressing pressure. The electronic device can also be pre-configured with the number of cycles T required to trigger touch commands (slide commands, tap commands, or hard press commands). 限 .

[0203] In the embodiments of this application, the process of the touch method executed by the electronic device is as follows: Figure 13 As shown, it may include steps S401 to S421.

[0204] Step S401: Set the number of detection cycles T 检 =0, number of sliding cycles T 滑 =0, number of light touch cycles T 轻 =0, and the number of repress cycles T 重 =0.

[0205] Step S402: T 检 =T 检 +1.

[0206] Step S403: Obtain T 检 Cyclic pressing force value F[T]检 ] and T 检 The position coordinates of the period W[T 检 ].

[0207] Step S404: Determine F 滑阈 <F[T 检 ] < F 轻阈 ?

[0208] In F 滑阈 <F[T 检 ] < F 轻阈 In the case of F[T], proceed to step S405; 检 ]≥F 轻阈 or F 滑阈 ≥F[T 检 In the case of […], proceed to step S409.

[0209] Step S405: Determine W[T] 检 ]≠W[T 检 -1]?

[0210] Step S405 is used to detect whether the position coordinates of the pressure on button 10 have changed. In T 检 When = 1, the default is W[T] 检 ]≠W[T 检 -1]. In T 检 When ≥2, compare T 检 The position coordinates of the period and T 检 -1 cycle position coordinates.

[0211] In W[T 检 ]≠W[T 检 In the case of -1], proceed to step S406; in W[T 检 ] = W[T 检 In the case of -1], step S401 is executed, which means exiting the judgment of triggering the sliding command.

[0212] Step S406: T 滑 =T 滑 +1.

[0213] Step S407: T 滑 ≥T 限 ?

[0214] In T 滑 ≥T 限 In the case of T, proceed to step S408; 滑 <T 限 In the case of [the previous step], return to step S402 and begin a new round of judgment.

[0215] Step S408: The electronic device triggers a sliding command.

[0216] Slide command and W[T 检 ] and W[T 检 The positional change of [-1] is related.

[0217] Step S409: Determine F[T] 检 ]≥Repress pressure threshold F 重阈 ?

[0218] Step S410: T 滑 >0?

[0219] In T 滑 If the value is greater than 0, it indicates that the current stage is in the sliding judgment phase, and step S405 is executed; in T 滑 If the value is ≤0, it means that the sliding was not judged in this stage, and step S411 is executed.

[0220] Step S411: T 重 ≠ outlier?

[0221] In T 重 If the value is not an outlier, proceed to step S412; in T 重 =In case of an abnormal value, jump to step S419.

[0222] Step S412: T 重 =T 重 +1.

[0223] Step S413: T 轻 =T 轻 +1.

[0224] Step S414: T 重 ≥T 限 ?

[0225] In T 重 ≥T 限 In the case of T, proceed to step S415; 重 <T 限 In the case of [the previous step], return to step S402 and begin a new round of judgment.

[0226] Step S415: The electronic device triggers a hard press command.

[0227] Step S416: Set T 重 =Outlier.

[0228] Step S417: Determine F[T] 检 ]≥ Light touch pressure threshold F 轻阈 ?

[0229] In F[T 检 ]≥F轻阈 In the case of F[T], proceed to step S418; 检 ] < F 轻阈 In the case of S401, the process returns to the previous step, indicating that the determination of triggering the touch command is exited.

[0230] Step S418: T 滑 >0?

[0231] In T 滑 If the value is greater than 0, it indicates that the current stage is in the sliding judgment phase, and step S405 is executed; in T 滑 If the value is ≤0, it means that the sliding was not judged in this stage, and step S419 is executed.

[0232] Step S419: T 轻 =T 轻 +1.

[0233] Step S420: T 轻 ≥T 限 ?

[0234] In T 轻 ≥T 限 In the case of T, proceed to step S421; 轻 <T 限 In the case of [the previous step], return to step S402 and begin a new round of judgment.

[0235] Step S421: The electronic device triggers a touch command.

[0236] With T 限 For example, if = 3, Figure 12 As shown, the process of an electronic device triggering a sliding command from cycle T1 to cycle T4 is explained.

[0237] Within period T1, T1 serves as the first detection period T. 检 =1. From Figure 12 It can be seen from F 滑阈 <F[1]<F 轻阈 Therefore, steps S405 to S407 are executed, but steps S409 to S421 are not executed. Step S405 is executed because T... 检 When W = 1, W[1] ≠ W[0], and then step S406 is executed to make T 滑 =1.

[0238] Because of T 滑 =1<T 限 =3, return to step S402. Within cycle T2, T2 serves as the second detection cycle T. 检 =2. From Figure 12 It can be seen from this that F[2]≥F轻阈 Therefore, steps S416 to S418 are executed. Because T 滑 >0, execute step S405, the pattern fill indicates W[2]≠W[1], and then execute step S406 to make T 滑 =2.

[0239] Because of T 滑 =2<T 限 =3, return to step S402. Within cycle T3, T3 serves as the third detection cycle T. 检 =3. From Figure 12 It can be seen from this that F[3]≥F 轻阈 Therefore, steps S416 to S418 are executed. Because T 滑 >0, execute step S405, the pattern fill indicates W[3]≠W[2], and then execute step S406 to make T 滑 =3.

[0240] Because of T 滑 =T 限 =3, execute step S408, so that the electronic device responds to the change of the user's pressing position (W[1] to W[3]) during the T4 cycle and triggers the corresponding sliding command.

[0241] In this embodiment, when the user wants to trigger a sliding command, the pressure value is sometimes greater than or equal to F due to inaccurate control of the pressing pressure. 轻阈 Even under certain conditions, the swipe command can still be successfully triggered. This reduces or even eliminates the possibility of accidental triggering of touch commands due to inaccurate user pressure, improving the user's comfort when using electronic devices.

[0242] With T 限 For example, if = 3, Figure 12 As shown, the process of an electronic device triggering a sliding command from cycle T11 to cycle T14 is explained.

[0243] Within the T11 cycle, T11 serves as the first detection cycle T. 检 =1. From Figure 12 It can be seen from F 滑阈 <F[1]<F 轻阈 Therefore, steps S405 to S407 are executed, but steps S409 to S421 are not executed. Step S405 is executed because T... 检 When W = 1, W[1] ≠ W[0], and then step S406 is executed to make T 滑 =1.

[0244] Because of T 滑 =1<T 限=3, return to step S402. Within cycle T12, T12 serves as the second detection cycle T. 检 =2. From Figure 12 It can be seen from this that F[2]≥F 重阈 Therefore, step S410 is executed, because T 滑 >0, proceed to step S405, pattern fill indicates W[2]≠W[1], then proceed to step S406 to make T 滑 =2.

[0245] Because of T 滑 =2<T 限 =3, return to step S402. Within cycle T13, T13 serves as the third detection cycle T. 检 =3. From Figure 12 It can be seen from this that F[3]≥F 重阈 Therefore, step S410 is executed, because T 滑 >0, proceed to step S405, pattern fill indicates W[3]≠W[2], then proceed to step S406 to make T 滑 =3.

[0246] Because of T 滑 =T 限 =3, execute step S408, so that the electronic device responds to the change of the user's pressing position (W[1] to W[3]) during the T14 cycle and triggers the corresponding sliding command.

[0247] In this embodiment, when the user wants to trigger a sliding command, the pressure value is sometimes greater than or equal to F due to inaccurate control of the pressing pressure. 重阈 Even under certain conditions, the swipe command can still be successfully triggered. This reduces or even eliminates the possibility of accidental hard presses due to inaccurate user pressure, improving the user's comfort when using electronic devices.

[0248] With T 限 For example, if = 3, Figure 12 As shown, the process of an electronic device triggering a re-press command from cycle T19 to cycle T22 is explained.

[0249] Within the T19 cycle, T19 serves as the first detection cycle T. 检 =1. From Figure 12 It can be seen from F 重阈 <F[1], therefore steps S405 to S408 are not executed, and step S409 is executed instead. Since T 滑 =0 and T 重 ≠ outlier, execute steps S412 and S413 to make T 重 =1 and T轻 =1.

[0250] Because of T 重 =1<T 限 =3, return to step S402, T20 is the second detection cycle T 检 =2. From Figure 12 It can be seen from F 重阈 <F[2], therefore steps S405 to S407 are not executed, and step S409 is executed instead. Because T 滑 =0 and T 重 ≠ outlier, execute steps S412 and S413 to make T 重 =2 and T 轻 =2.

[0251] Because of T 重 =2<T 限 =3, return to step S402, T21 is the third detection cycle T 检 =3. From Figure 12 It can be seen from F 重阈 <F[3], therefore steps S405 to S407 are not executed, and step S409 is executed instead. Because T 滑 =0 and T 重 ≠ outlier, execute steps S412 and S413 to make T 重 =3 and T 轻 =3.

[0252] Because of T 滑 =T 限 =3, execute step S415, so that the electronic device triggers the re-press command in cycle T22.

[0253] In this embodiment, the user can successfully trigger the hard press command by applying the corresponding pressure to the button 10 for three consecutive cycles. This avoids the situation where the user accidentally presses the button 10 at a certain moment when they do not want to trigger the hard press command, thus improving the user's comfort in the button operation experience when using electronic devices.

[0254] In several embodiments of the sliding command in this application, the sliding command can be continuously triggered based on the user's pressing force value and the change in the user's pressing position after the sliding command is triggered.

[0255] In some examples, within a period following the electronic device triggering a swipe command, the user's pressure value is greater than or equal to F. 滑阈 Furthermore, the swipe command continues to be triggered even when the user's pressing position changes. Also, the swipe command continues even when the user's pressing force is less than F. 滑阈Alternatively, if the user's pressing position remains unchanged (e.g., the position coordinates are the same in two adjacent detection cycles), the sliding command will be terminated.

[0256] In other examples, the sliding command continues to be triggered if the user's pressure value is greater than or equal to 0N and the user's pressure position changes within a cycle after the electronic device triggers the sliding command. Furthermore, the sliding command triggering ends if the user's pressure value is less than 0N or the user's pressure position remains unchanged (e.g., the position coordinates are the same in two adjacent detection cycles).

[0257] Understandably, after a slide command is triggered, the pressure applied by the user to maintain the slide command only needs to be greater than 0N; it is not required that the user's pressure be at F. 滑阈 To F 轻阈 Between. For example, the pressure applied by the user is greater than F. 轻阈 In this case, the electronic device does not trigger a touch command but instead maintains the triggering of a swipe command.

[0258] In this way, after triggering the sliding command, the user can continue to trigger the sliding command while keeping their finger pressed on button 10; and the sliding command can be terminated after the finger leaves the button. In this embodiment, after triggering the sliding command, the electronic device can reduce the force precision requirement of the user's pressing force value for continuous triggering of the sliding command, which helps to improve the user's comfort in the button operation experience when using the electronic device.

[0259] The electronic device can be pre-programmed with various functional tasks that map to different touch commands of button 10. After the electronic device triggers a touch command on button 10, it determines the target functional task corresponding to the touch command and then executes that target functional task to meet the user's needs.

[0260] In some examples, button 10 is a volume control button. In music playback scenarios, electronic devices can be pre-programmed to map a light touch of button 10 to a play / pause task, a hard press of button 10 to a mute task, an up swipe of button 10 (a type of sliding command) to a volume increase task, and a down swipe of button 10 (another type of sliding command) to a volume decrease task.

[0261] Thus, in a music playback scenario, if the user touches button 10 to trigger a light touch command, the electronic device will perform a play / pause task, thereby pausing music playback; or, if the user touches button 10 to trigger a hard press command, the electronic device will perform a mute task, thereby turning off the music playback volume; or, if the user touches button 10 to trigger an up swipe command, the electronic device will perform a volume up task, thereby increasing the music playback volume; or, if the user touches button 10 to trigger a down swipe command, the electronic device will perform a volume down task, thereby decreasing the music playback volume.

[0262] In other examples, button 10 is a volume control button. In camera shooting scenarios, the electronic device can be pre-programmed to map a light touch command of button 10 to a focus task, a heavy press command of button 10 to a shooting task, an upward swipe command of button 10 (a type of sliding command) to a task to activate the wide-angle shooting mode, and a downward swipe command of button 10 (another type of sliding command) to a task to activate the macro shooting mode.

[0263] Thus, in a music playback scenario, if the user touches button 10 to trigger a light touch command, the electronic device will perform a focusing task, thereby adjusting the camera's focal length; or, if the user touches button 10 to trigger a hard press command, the electronic device will perform a photo-taking task, thereby capturing an image; or, if the user touches button 10 to trigger an upward swipe command, the electronic device will perform a task to activate wide-angle shooting mode, thereby improving the camera's field of view and angle; or, if the user touches button 10 to trigger a downward swipe command, the electronic device will perform a task to activate macro shooting mode, thereby magnifying the details of objects in the camera's field of view.

[0264] Because a user's finger has inertia when touching the button 10 of an electronic device, even after the pressure applied by the user's finger reaches the trigger condition of the touch command, the user will continue to apply pressure to the button 10 until the electronic device performs the task required by the user and is perceived by the user, at which point the user's finger will leave the button 10. Therefore, when the electronic device 100 performs the task corresponding to the touch command, it can provide vibration feedback to the user using the button 10, or display a screen 40 to indicate the task execution (such as icon changes), so that the user can perceive that the task has been executed.

[0265] Figure 14 A schematic diagram of the structure of an electronic device provided for some embodiments of this application.

[0266] This application also provides an electronic device, such as... Figure 14As shown, the electronic device includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 are interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (e.g., the memory of the electronic device). As another example, the interface circuit 702 can be used to send signals to other devices (e.g., the processor 701 or the screen of the electronic device). Exemplarily, the interface circuit 702 can read instructions stored in the memory and send those instructions to the processor 701. When the instructions are executed by the processor 701, the electronic device can perform the steps in the above embodiments. Of course, the electronic device may also include other discrete components, which are not specifically limited in this application embodiment.

[0267] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device described above, cause the controller to perform various functions or steps of the electronic device described above.

[0268] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps of the electronic device described above.

[0269] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0270] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0271] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0272] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0273] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0274] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A touch control method, characterized in that, A method applicable to an electronic device having a button module, the button module including a keycap and a pressure sensor, the pressure sensor being used to detect the pressure value applied to the keycap; the method includes: The pressure values ​​detected by the pressure sensor are acquired multiple times; If the pressure value provided by the pressure sensor is greater than or equal to the first pressure threshold for N consecutive times, a first task is executed; the first task corresponds to the first pressure threshold, and N is an integer greater than or equal to 2.

2. The method according to claim 1, characterized in that, After acquiring the pressure values ​​detected by the pressure sensor multiple times, the method further includes: If the pressure value provided by the pressure sensor is greater than or equal to the second pressure threshold and less than the first pressure threshold for M consecutive times, a second task is executed; the second task corresponds to the second pressure threshold, the second pressure threshold is less than the first pressure threshold, and M is greater than or equal to 2.

3. The method according to claim 1 or 2, characterized in that, The button also includes a press position sensor, which is used to detect the position coordinates of the pressure applied to the keycap. The process of repeatedly acquiring the pressure values ​​detected by the pressure sensor includes: The pressure information is acquired multiple times, and each acquisition of pressure information includes the pressure value detected by the pressure sensor and the position coordinates detected by the pressure position sensor. After acquiring the pressure information multiple times, the method further includes: If, for P consecutive times, the pressure values ​​provided by the pressure sensor are all greater than or equal to a third pressure threshold and less than a second pressure threshold, and the position coordinates detected by the pressure position sensor in any two adjacent press positions within the P consecutive times are different, then a third task is executed; the third task corresponds to the third pressure threshold, where the third pressure threshold is less than the second pressure threshold, and P is greater than or equal to 2; or... If the pressure value provided by the pressure sensor is greater than or equal to the third pressure threshold and less than the second pressure threshold for the first time, and the pressure value provided by the pressure sensor is greater than the third pressure threshold for P-1 consecutive times after the first time, and the position coordinates detected by the pressing position sensor are different for any two adjacent times in the P consecutive times, then the third task is executed; the third task corresponds to the third pressure threshold, the third pressure threshold is less than the second pressure threshold, and P is greater than or equal to 2.

4. A touch control method, characterized in that, A method applicable to an electronic device having a button module, the button module including a keycap and a pressure sensor, the pressure sensor being used to detect the pressure value applied to the keycap; the method includes: Obtain the pressure value detected by the pressure sensor for the Ath time; where A is a positive integer; If the pressure value at the Ath time is greater than or equal to the first pressure threshold, the pressure value at the (A+1)th time detected by the pressure sensor is obtained. If the pressure value at the (A+1)th time is greater than or equal to the first pressure threshold, the first task is executed; the first task corresponds to the first pressure threshold.

5. The method according to claim 4, characterized in that, After acquiring the pressure value detected by the pressure sensor for the Ath time, the method further includes: If the pressure value at the Ath time is greater than or equal to the second pressure threshold and less than the first pressure threshold, the pressure values ​​detected by the pressure sensor for N-1 consecutive times after the Ath time are obtained. If the pressure values ​​detected consecutively for N-1 times are all greater than or equal to the second pressure threshold, a second task is executed; the second task corresponds to the second pressure threshold, and the second pressure threshold is less than the first pressure threshold.

6. The method according to claim 4 or 5, characterized in that, After acquiring the pressure value detected by the pressure sensor for the (A+1)th time, the method includes: If the pressure value at the (A+1)th time is greater than or equal to the second pressure threshold and less than the first pressure threshold, the pressure sensor detects pressure values ​​for N-2 consecutive times after the (A+1)th time; the first of the N-2 consecutive times is the (A+2)th time. If the pressure values ​​detected consecutively for N-2 consecutive times are all greater than or equal to the second pressure threshold, a second task is executed; the second task corresponds to the second pressure threshold, and the second pressure threshold is less than the first pressure threshold.

7. The method according to any one of claims 4 to 6, characterized in that, The button also includes a press position sensor, which is used to detect the position coordinates of the pressure applied to the keycap. The step of obtaining the pressure value detected by the pressure sensor for the Ath time includes: Obtain the press information for the Ath press, the press information including the pressure value detected by the pressure sensor and the position coordinates detected by the press position sensor; After acquiring the pressure value detected by the pressure sensor for the Ath time, the method further includes: If the pressure value in the Ath press information is greater than or equal to the third pressure threshold and less than the second pressure threshold, obtain the press information for the next N-1 consecutive presses after the Ath press; the third pressure threshold is less than the second pressure threshold, and the first of the N-1 consecutive presses is the A+1th press; If the pressure value in all N-1 presses is greater than or equal to the third pressure threshold, and the position coordinates of the Ath press are different from the position coordinates of any two adjacent presses in the N-1 presses, then the third task is executed; the third task corresponds to the third pressure threshold.

8. The method according to claim 7, characterized in that, The execution of the third task includes: Obtain the position coordinates of two consecutive press position sensors; Based on the two adjacent detected position coordinates, the direction of pressure change is determined; Execute either the first subtask or the second subtask; the direction of pressure change corresponding to the first subtask is different from the direction of pressure change corresponding to the second subtask.

9. The method according to claim 7 or 8, characterized in that, After performing the third task, the method further includes: Obtain the pressure value detected by the pressure sensor; If the pressure value is less than the third pressure threshold, the third task is terminated. And / or, Obtain the position coordinates of two consecutive press position sensors; If the location coordinates detected in two consecutive tests are the same, the third task ends.

10. An electronic device, characterized in that, The device includes a button module, a memory, and one or more processors; the memory is coupled to the processors; the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-9.