Threshold calibration method, key assembly and electronic device
By implementing the threshold calibration method in electronic devices, the impact of aging deformation components on the pressure detection unit is adjusted, the accuracy problem caused by the aging of key components is solved, and the user experience and fault detection capabilities are improved.
Patent Information
- Application Number
- CN202311076642.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-08-24
AI Technical Summary
After long-term use, the key components may age, causing the pressure threshold to change and affecting the accuracy of the electronic device in determining whether the user is using the key components.
A threshold calibration method is provided, in which the processing unit adjusts the first pressure threshold according to pressure information, calibrates the impact of aging deformation components on the pressure detection unit, and ensures the accuracy of user input.
The accuracy of the processing unit in determining whether the user uses the key component of the electronic device is improved, the user experience is improved, and potential faults are discovered in a timely manner through reminder information.
Smart Images

Figure CN117707355B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic products, and in particular to a threshold calibration method, a key assembly and an electronic device. Background Art
[0002] At present, electronic devices such as mobile phones and tablet computers can be provided with key components to replace physical keys. Such key components do not need to be pressed and popped up like physical keys, but when the user presses the surface of the key component with a finger, for example, the user's pressing force is sensed, and whether the user uses the key component of the electronic device is determined based on the detected pressure and a preset pressure threshold.
[0003] However, the button assembly may age after long-term use. In this case, if the pressure threshold is not calibrated, it may affect the accuracy of the electronic device in determining whether the user uses the button assembly. Summary of the invention
[0004] The present application provides a threshold calibration method, a key assembly, and an electronic device, which can calibrate the pressure threshold set in the processing unit when the deformable component has aging phenomena such as deformation, thereby improving the accuracy of the processing unit in determining whether the user uses the key assembly of the electronic device and improving the user experience. The technical solution is as follows:
[0005] In a first aspect, a threshold calibration method is provided. The threshold calibration method is applied to a processing unit in an electronic device, and is used to calibrate a first pressure threshold set in the processing unit.
[0006] The electronic device has a key assembly. The key assembly includes a processing unit, a deformation component, and a pressure detection unit. The pressure detection unit is connected to the processing unit. The pressure detection unit is used to detect the magnitude of the pressure of the deformation component on the pressure detection unit, and output pressure information corresponding to the magnitude of the pressure. In other words, the pressure information is used to indicate the magnitude of the pressure of the deformation component on the pressure detection unit. Here, the processing unit is used to execute the threshold calibration method of the present application, which is described below.
[0007] The method includes: the processing unit performs a preset operation when the pressure increases to be greater than or equal to a first pressure threshold as determined based on the pressure information; and the processing unit ends the preset operation when the pressure decreases to be less than or equal to a second pressure threshold as determined based on the pressure information.
[0008] The method also includes: if the processing unit determines that the first pressure threshold needs to be calibrated based on the pressure information, the processing unit determines the first pressure value based on the pressure when the pressure is less than the third pressure threshold based on the pressure information; if the absolute value of the difference between the first pressure value and the reference pressure value is less than or equal to the first preset threshold, the processing unit subtracts the reference pressure value from the first pressure threshold and adds the first pressure value to obtain the calibrated first pressure threshold.
[0009] Among them, the first pressure threshold is the use trigger threshold. That is, when the pressure determined according to the pressure information increases to be greater than or equal to the first pressure threshold, the processing unit determines that the user uses the key component. The second pressure threshold is the stop use trigger threshold. That is, when the pressure determined according to the pressure information decreases to be less than or equal to the second pressure threshold, the processing unit determines that the user stops using the key component. The third pressure threshold is the non-pressing threshold. That is, when the pressure determined according to the pressure information is less than the third pressure threshold, the processing unit determines that the user does not press the key component. The reference pressure value is stored in the processing unit, the size of the pressure detected by the pressure detection unit when the user does not press the key component.
[0010] In the present application, the processing unit can determine whether the user uses the key component, stops using the key component, and does not press the key component based on the pressure information. The first pressure threshold is the trigger threshold for the use of the key component. When the first pressure threshold needs to be calibrated, the processing unit can determine the first pressure value based on the magnitude of the pressure when the user does not press the key component. Afterwards, the processing unit can subtract the reference pressure value from the first pressure threshold and add the first pressure value to obtain the calibrated first pressure threshold. In this way, the difference between the calibrated first pressure threshold and the first pressure threshold before calibration is equal to the difference between the first pressure value and the reference pressure value, which is equal to the amount of influence of the aging deformation component on the magnitude of the pressure detected by the pressure detection unit. Therefore, the threshold calibration method can calibrate the first pressure threshold, thereby improving the accuracy of the processing unit in determining whether the user uses the key component of the electronic device and improving the user experience.
[0011] In some embodiments, the method further includes: if the processing unit determines according to the pressure information that the pressure meets the preset condition for a preset number of times within the first preset time period, then determining according to the pressure information whether the first pressure threshold needs to be calibrated. The preset condition means that the pressure first increases to be greater than or equal to the first pressure threshold, and then decreases to be less than or equal to the second pressure threshold.
[0012] In some embodiments, the method further includes: if the time between the current moment and the last time the first pressure threshold was calibrated is greater than or equal to a second preset time, the processing unit determines whether the first pressure threshold needs to be calibrated based on the pressure information.
[0013] In some embodiments, the processing unit determines that the first pressure threshold needs to be calibrated based on the pressure information, specifically including: when the processing unit determines that the pressure meets the preset conditions based on the pressure information, the processing unit determines the second pressure value based on the pressure after a third preset time period; if the absolute value of the difference between the second pressure value and the reference pressure value is greater than the second preset threshold, the processing unit determines that the first pressure threshold needs to be calibrated.
[0014] The second preset threshold may be less than or equal to the first preset threshold.
[0015] Furthermore, when the processing unit determines according to the pressure information that the pressure meets the preset condition, before the step of determining the second pressure value according to the pressure after the third preset time period, the method further includes: the processing unit sets M=0.
[0016] In this case, when the processing unit determines according to the pressure information that the pressure size meets the preset condition, the step of determining the second pressure value according to the pressure size after the third preset time period specifically includes: when the processing unit determines according to the pressure information that the pressure size meets the preset condition, the processing unit uses the pressure size after the third preset time period as a third pressure value, and sets M=M+1; if M<X, the processing unit re-executes the step of using the pressure size after the third preset time period as a third pressure value, and sets M=M+1, when the processing unit determines according to the pressure information that the pressure size meets the preset condition, and sets X=M+1, where X is an integer greater than or equal to 3; if M=X, the processing unit uses the average value of X-2 third pressure values excluding the maximum value and the minimum value among the X third pressure values obtained as the second pressure value.
[0017] In some embodiments, if the processing unit determines that the first pressure threshold needs to be calibrated based on the pressure information, then when the processing unit determines that the pressure is less than the third pressure threshold based on the pressure information, the step of determining the first pressure value based on the pressure specifically includes: if the processing unit determines that the first pressure threshold needs to be calibrated based on the pressure information, the processing unit obtains the posture parameters of the electronic device; if it is determined that the electronic device is in a horizontal resting state based on the posture parameters of the electronic device, then when the processing unit determines that the pressure is less than the third pressure threshold based on the pressure information, the processing unit determines the first pressure value based on the pressure.
[0018] In some embodiments, when the processing unit determines according to the pressure information that the pressure is less than the third pressure threshold, the step of determining the first pressure value according to the pressure specifically includes:
[0019] When the pressure size determined according to the pressure information is always less than the third pressure threshold within a fourth preset time length, the processing unit obtains m fourth pressure values from the pressure values determined within the fourth preset time length, and the determination moments of two adjacent fourth pressure values among the m fourth pressure values are separated by a fifth preset time length, and m is an integer greater than or equal to 3; the processing unit takes the average value of m-2 fourth pressure values excluding the maximum value and the minimum value among the m fourth pressure values as the first pressure value.
[0020] In some embodiments, the method includes: if the absolute value of the difference between the first pressure value and the reference pressure value is greater than a first preset threshold, the processing unit controls the display screen of the electronic device to output a reminder message. The reminder message is used to remind the user to check whether a fault occurs.
[0021] Furthermore, the reminder information is also used to remind whether to calibrate the first pressure threshold. The reminder information includes a first control, and the first control is used to instruct to calibrate the first pressure threshold.
[0022] In this case, if the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold value, then after the step of the processing unit controlling the display screen of the electronic device to output a reminder message, it also includes: if a selection instruction for the first control is received within a sixth preset time period, the processing unit re-executes the step and subsequent steps of determining the first pressure value according to the pressure when the processing unit determines that the pressure is less than the third pressure threshold value according to the pressure information.
[0023] In the second aspect, a key assembly is also provided. The key assembly includes a processing unit, a deformation component, and a pressure detection unit. The pressure detection unit is connected to the processing unit. The pressure detection unit is used to output pressure information to the processing unit, and the pressure information is used to indicate the magnitude of the pressure of the deformation component on the pressure detection unit. When the processing unit is working, it executes any method as described in the first aspect.
[0024] In a third aspect, an electronic device is also provided, comprising the key assembly as in the second aspect.
[0025] The technical effects obtained by the above-mentioned second and third aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a schematic diagram of the appearance of a first electronic device provided in an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of the appearance of a second electronic device provided in an embodiment of the present application;
[0028] Figure 3It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 4 It is a structural schematic diagram of the first key assembly provided in an embodiment of the present application;
[0030] Figure 5 This is a schematic diagram of the use of the first key assembly provided in an embodiment of the present application;
[0031] Figure 6 It is a directional diagram of a force exerted by a user on a deformable component provided by an embodiment of the present application;
[0032] Figure 7 is a direction diagram of the force of a deformable component itself on a pressure detection unit provided in an embodiment of the present application;
[0033] Figure 8 is a structural schematic diagram of a second key assembly provided in an embodiment of the present application;
[0034] Fig. 9 is a schematic diagram of the use of the second key assembly provided in an embodiment of the present application;
[0035] Fig.10 is a schematic diagram of the first type of pressure information provided in an embodiment of the present application;
[0036] Fig.11 is a structural schematic diagram of a third key assembly provided in an embodiment of the present application;
[0037] Fig.12 is a flow chart of a first threshold calibration method provided in an embodiment of the present application;
[0038] Fig.13 is a schematic diagram of the second type of pressure information provided in an embodiment of the present application;
[0039] Fig.14 is a schematic diagram of the third type of pressure information provided in an embodiment of the present application;
[0040] Fig.15 This is a schematic diagram of a screen showing a first electronic device outputting reminder information provided by an embodiment of the present application;
[0041] Fig.16 This is a schematic diagram of a screen showing a second electronic device outputting reminder information provided by an embodiment of the present application;
[0042] Fig.17 is a schematic diagram of the fourth type of pressure information provided in an embodiment of the present application;
[0043] Fig.18 is a schematic diagram of the fifth type of pressure information provided in an embodiment of the present application;
[0044] Fig.19 This is a flow chart of a second threshold calibration method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0046] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0047] Before explaining the threshold calibration method provided in the embodiment of the present application in detail, the application scenario of the threshold calibration method is first explained.
[0048] The threshold calibration method is applied to a processing unit in a key assembly in an electronic device, which may be a mobile phone, a tablet computer, a laptop computer, etc. Figure 1 and Figure 2 1 is a schematic diagram of the appearance of two different electronic devices 10 provided in the embodiments of the present application. Figure 1 The electronic device 10 shown in the figure is a mobile phone. Figure 2 The electronic device 10 shown in FIG. 1 is a tablet computer.
[0049] Figure 3 1 is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of the present application. Figure 3As shown, the electronic device 10 may include a processing module 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging chip 140, a power management module 141, a energy storage unit 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a motor 191, an indicator 192, a camera 193, a display screen 194 and a SIM card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint recognition device 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0050] The processing module 110 may include one or more processing devices, for example, the processing module 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural-network processing unit (NPU), etc. Among them, different processing devices may be independent devices or integrated into one or more processors. In some embodiments, the processing module 110 may be a system on chip (SOC) in the electronic device 10. In other embodiments, the processing module 110 may also be other devices with processing functions in the electronic device 10 that are independent of the SOC.
[0051] The controller may be the nerve center and command center of the electronic device 10. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0052] A memory may also be provided in the processing module 110 for storing instructions and data. In some embodiments, the memory in the processing module 110 is a cache memory. The memory may store instructions or data that the processing module 110 has just used or circulated. If the processing module 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processing module 110, and thus improves the efficiency of the system.
[0053] In some embodiments, the processing module 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0054] The wireless communication function of the electronic device 10 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
[0055] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Figure 3 The structures of antenna 1 and antenna 2 in the electronic device 10 are only examples. Each antenna in the electronic device 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0056] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 10. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be arranged in the processing module 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be arranged in the same device as at least some of the modules of the processing module 110.
[0057] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 10. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processing module 110. The wireless communication module 160 can also receive the signal to be sent from the processing module 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0058] In some embodiments, the antenna 1 of the electronic device 10 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 10 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM and / or IR technology, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0059] The electronic device 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processing module 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0060] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processing module 110 executes various functional applications and data processing of the electronic device 10 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 10 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0061] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 10 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 10 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 10 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 10 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 10 and cannot be separated from the electronic device 10.
[0062] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0063] Still like Figure 1 and Figure 2As shown, the electronic device 10 has a key assembly 11. The key assembly 11 is a combination device composed of multiple devices in the electronic device 10, which is used to replace the traditional physical keys to control the electronic device 10. For example, the key assembly 11 can be the volume key of the electronic device 10, or the lock screen key of the electronic device 10, etc., which is not limited here. The difference between the key assembly 11 and the physical key is that when the user uses the physical key to control the electronic device 10, it is necessary to press the physical key or release the physical key to make it bounce up. The physical key is easily damaged during the continuous pressing and bouncing process, resulting in failure to bounce up; while the key assembly 11 determines whether the user uses the key assembly 11 to control the electronic device 10 by detecting the force applied by the user to press it. Therefore, the key assembly 11 does not need to be pressed and bounced when working, which makes the service life of the key assembly 11 longer than that of the physical key.
[0064] The structure of the key assembly 11 of the electronic device 10 is described below.
[0065] Figure 4 1 is a schematic diagram of the structure of a key assembly 11 provided in an embodiment of the present application. Figure 4 As shown, the button assembly 11 includes a deformation component 14 , a pressure detection unit 16 and a processing unit 12 .
[0066] The deformation component 14 may be a deformation sheet for bearing force. The deformation component 14 may not deform or may slightly deform when subjected to force. For example, the deformation component 14 may be a metal deformation sheet, a ceramic deformation sheet, a plastic deformation sheet, etc. Generally, the deformation component 14 is a component with a certain elasticity, that is, it has the ability to recover after being deformed by force. Figure 5 1 is a schematic diagram of the use of a key assembly 11 provided in an embodiment of the present application. Figure 5 As shown, when a user uses the key assembly 11 of the electronic device 10, a force F1a may be applied to the deformable component 14 from one side of the deformable component 14. The direction of the force F1a applied to the deformable component 14 is as shown in FIG. Figure 6 As shown in Figure (a).
[0067] The pressure detection unit 16 is located on the other side of the deformation component 14. The other side here is relative to the "one side" in "when the user uses the button assembly 11 of the electronic device 10, the user can apply force F1a to the deformation component 14 from one side of the deformation component 14." That is to say, when the user uses the button assembly 11, with the deformation component 14 as the dividing line, the user's finger using the button assembly 11 and the pressure detection unit 16 are located on different sides of the deformation component 14. In this way, when the user uses the button assembly 11, that is, when the user applies force F1a to the deformation component 14, the deformation component 14 will transfer the force F1a to the pressure detection unit 16. For the sake of ease of description, the force generated by the deformation component 14 on the pressure detection unit 16 under the action of force F1a is called force F1, then the magnitude of force F1 is the same as the magnitude of force F1a, and the direction of force F1 is the same as the direction of force F1a. The direction of force F1 exerted on the pressure detection unit 16 is as follows: Figure 6 As shown in Figure (b).
[0068] The pressure detection unit 16 is used to detect the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16. It can be understood that the difference between force F1 and pressure F0 is that force F1 refers to the force exerted by the deformation component 14 on the pressure detection unit 16 only under the action of force F1a; pressure F0 refers to the force of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16, and the pressure F0 may be formed by the superposition of multiple forces including force F1. In an embodiment of the present application, the pressure detection unit 16 is also used to output pressure information to the processing unit 12. The pressure information corresponds to the size of the pressure F0, or in other words, the pressure information is used to indicate the size of the pressure F0 exerted by the deformation component 14 on the pressure detection unit 16. In some embodiments, the pressure detection unit 16 may be a pressure sensor 180A in the electronic device 10.
[0069] Understandable, such as Figure 7 As shown, in the key assembly 11, the deformable component 14 itself may also generate a force F2 on the pressure detection unit 16, the direction of the force F2 is the same as the direction of the force F1, and the magnitude of the force F2 may be 0. In this case, the pressure F0 is formed by the superposition of multiple forces including the force F1 and the force F2, and the magnitude of the pressure F0 of the deformable component 14 on the pressure detection unit 16 is not only related to the magnitude of the force F1, but also related to the magnitude of the force F2.
[0070] The processing unit 12 refers to a device with processing functions in the electronic device 10. The processing unit 12 here can be the processing module 110 in the electronic device 10, or one or more processing devices in the processing module 110. The processing unit 12 has an input end. The input end of the processing unit 12 is connected to the pressure detection unit 16, so that the processing unit 12 can receive the pressure information output by the pressure detection unit 16.
[0071] In some other embodiments of the present application, a pressure detection unit 16 may also be provided on a side of the deformable component 14 away from the key feedback unit 18. The pressure detection units 16 located on different sides of the deformable component 14 are used to detect pressure from different directions of the deformable component 14.
[0072] Figure 8 1 is a schematic diagram of the structure of another key assembly 11 provided in an embodiment of the present application. Figure 8 As shown, in some embodiments, the key assembly 11 further includes a key body 19. The deformation component 14 is located between the pressure detection unit 16 and the key body 19. Fig. 9 As shown, in this case, when the user uses the key assembly 11, the force F1a is not applied directly to the deformable component 14, but is applied to the deformable component 14 through the key body 19. In each embodiment of the present application, the influence of the force caused by the key body 19 is not considered. Alternatively, the key body 19 can also be understood as a part of the deformable component 14. In this case, the force F2 includes the force caused by the key body 19, which will not be repeated.
[0073] It is easy to obtain that when the force F1a and the force F2 exist in the key assembly at the same time, the force F1 and the force F2 acting on the pressure detection unit 16 are superimposed to obtain the pressure F0. That is:
[0074] Force F1, force F2, and pressure F0 are all vectors.
[0075] Since the directions of force F1, force F2 and pressure F0 are the same, the magnitude of pressure F0 is:
[0076] in, is the magnitude of the pressure F0, is the magnitude of force F1, is the magnitude of force F2.
[0077] The threshold calibration method is applied to and executed by the processing unit 12. In the embodiment of the present application, the processing unit 12 is preset with a first pressure threshold Z1, a second pressure threshold Z2, and a third pressure threshold Z3.
[0078] The first pressure threshold Z1 is a usage trigger threshold. Specifically, the first pressure threshold Z1 is a pressure threshold for determining whether the user uses the button assembly 11 to control the electronic device 10. In other words, when the processing unit 12 determines that the pressure F0 increases to be greater than or equal to the first pressure threshold Z1 based on the pressure information, the processing unit 12 determines that the user uses the button assembly 11, and the processing unit 12 performs a preset operation. The preset operation here is set according to the function of the button assembly 11. For example, when the function of the button assembly 11 is to increase the volume, then: when the processing unit 12 determines that the pressure F0 increases to be greater than or equal to the first pressure threshold Z1 based on the pressure information, the operation of increasing the volume is performed. Or, when the function of the button assembly 11 is to lock the screen, then: when the processing unit 12 determines that the pressure F0 increases to be greater than or equal to the first pressure threshold Z1 based on the pressure information, the operation of locking the screen is performed.
[0079] The second pressure threshold Z2 is a trigger threshold for stopping use. Specifically, the second pressure threshold Z2 is a pressure threshold for determining whether the user stops using the button assembly 11 to control the electronic device 10. In other words, when the processing unit 12 determines that the pressure F0 is reduced to less than or equal to the second pressure threshold Z2 based on the pressure information, the processing unit 12 determines that the user stops using the button assembly 11, and the processing unit 12 stops executing the preset operation. For example, when the function of the button assembly 11 is to increase the volume, then: when the processing unit 12 determines that the pressure F0 is reduced to less than or equal to the second pressure threshold Z2 based on the pressure information, the operation of increasing the volume is stopped.
[0080] The third pressure threshold Z3 is a non-pressed threshold. Specifically, the third pressure threshold Z3 is a pressure threshold for determining whether the user applies force F1a to the deformable component 14. At this time, when the processing unit 12 determines that the magnitude of the pressure F0 is greater than or equal to the third pressure threshold Z3 based on the pressure information, it is determined that the user has applied force F1a to the deformable component 14. At this time, the user may be about to use the button assembly 11, or has just used the button assembly 11 and the deformable component 14 has not fully recovered. When the processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold Z3 based on the pressure information, the processing unit 12 determines that the user has not pressed the button assembly 11, that is, it determines that the user has not applied force F1a to the deformable component 14.
[0081] The threshold calibration method provided in the embodiment of the present application is explained in detail below.
[0082] The threshold calibration method includes the following steps S110 and S210 .
[0083] S110 , the processing unit 12 executes a preset operation when it is determined according to the pressure information that the pressure F0 increases to be greater than or equal to the first pressure threshold Z1 .
[0084] S210 , when the processing unit 12 determines according to the pressure information that the pressure F0 is reduced to be less than or equal to the second pressure threshold Z2 , it stops executing the preset operation.
[0085] As mentioned above, the pressure detection unit 16 is used to detect the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16, and output pressure information to the processing unit 12. The pressure information is used to indicate the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16. In some embodiments, the pressure information can be as follows: Fig.10 As shown, it is a function curve of the magnitude of the pressure F0 with respect to time. In some other embodiments, the pressure information can also be presented in a table or other form, which is not limited here. In this way, after receiving the pressure information, the processing unit 12 can determine the magnitude of the pressure F0 according to the pressure information, that is, the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 can be obtained in real time without considering the signal transmission delay.
[0086] Fig.10 FIG. 1 shows the complete change process of the pressure F0 of the deformation component 14 on the pressure detection unit 16 over time T when the user uses the key assembly 11 once. Fig.10 As shown, the change process of pressure F0 can be divided into the following three stages.
[0087] In the first stage, i.e., from time 0 to time T1, the user applies force F1a to the deformable component 14 from one side of the deformable component 14 (i.e., the process of the user pressing the key component 11), and the force F1a gradually increases. In this process, although the magnitude of the pressure F0 may fluctuate slightly, its overall change trend is gradually increasing. When the magnitude of the pressure F0 increases to be greater than or equal to the first pressure threshold Z1, i.e., at time t1, the processing unit 12 determines that the user uses the key component 11. At this time, the processing unit 12 executes the preset operation corresponding to the key component 11.
[0088] In the second stage, i.e., from time T1 to time T2, the user gradually removes the force F1a (i.e., the process of the user's finger releasing the key assembly 11), and the force F1a gradually decreases. In this process, although the magnitude of the pressure F0 may fluctuate slightly, its overall change trend is gradually decreasing. When the magnitude of the pressure F0 decreases to less than or equal to the second pressure threshold Z2, i.e., at time t2, the processing unit 12 determines that the user stops using the key assembly 11. At this time, the processing unit 12 stops executing the preset operation corresponding to the key assembly 11.
[0089] In the third stage, that is, after time T2, the force F1a is 0 or decreases to 0 (that is, the change process of the force F1a when the user finishes using the key assembly 11 and no longer uses the key assembly 11). After the force F1a is 0, the magnitude of the pressure F0 is only affected by the force F2. In this case, the pressure F0 can remain unchanged or fluctuate slightly, but is always less than the third pressure threshold Z3. Based on this, when the magnitude of the pressure F0 is less than the third pressure threshold Z3, the processing unit 12 can determine that the user has not used the key assembly 11, that is, the user has not applied the force F1a to the deformation component 14. It can be understood that Fig.10 , the magnitude of the force F2 is not 0. In some other embodiments, if the magnitude of the force F2 is 0, then after time T2, the magnitude of the pressure F0 is 0 or decreases to 0, which will not be described in detail.
[0090] It is understandable that when the electronic device 10 is just shipped, the key assembly 11 has not been used extensively, and the deformable component 14 does not have aging phenomena such as deformation, so the magnitude of the force F2 is generally 0 or very small. Fig.11 As shown, the deformable component 14 may deform in the direction of the pressure detection unit 16. Alternatively, when the electronic device 10 is damaged by falling or dust is accumulated, the deformable component 14 may also deform in the direction of the pressure detection unit 16. In this case, the magnitude of the force F2 will be larger than that of the electronic device 10 just shipped from the factory. In this case, if the first pressure threshold Z1 is not calibrated, it will affect the accuracy of the processing unit 12 in determining whether the user uses the button assembly 11 of the electronic device 10.
[0091] For example, if the magnitude of the force F2 is 0 when the electronic device 10 is just shipped from the factory, then if the user does not use the button assembly 11 of the electronic device 10 at this time, the magnitude of the pressure F0 is 0. Assuming that the first pressure threshold Z1 is 1.5N, when the user uses the button assembly 11 of the electronic device 10, the magnitude of the force F1a applied to the deformable component 14 should be greater than or equal to 1.5N. In other words, when the magnitude of the force F1a applied by the user to the deformable component 14 is greater than or equal to 1.5N, the processing unit 12 determines that the user uses the button assembly 11. When the button assembly 11 is used for a long time, as the deformable component 14 deforms, the force F2 may increase to 0.3N. Then, if the user does not use the button assembly 11 of the electronic device 10 at this time, the magnitude of the pressure F0 is 0.3N. In this case, if the first pressure threshold Z1 is not calibrated (i.e., the first pressure threshold Z1 is still 1.5 N), when the magnitude of the force F1a applied by the user to the deformable component 14 is greater than or equal to 1.2 N, the processing unit 12 will determine that the user uses the key assembly 11. It can be seen that this will affect the accuracy of the processing unit 12 in determining whether the user uses the key assembly 11 of the electronic device 10.
[0092] Based on this, the threshold calibration method provided in the embodiment of the present application further includes a process of calibrating the first pressure threshold Z1, which is described in detail below.
[0093] Fig.12 is a flow chart of a threshold calibration method provided in an embodiment of the present application. Fig.12 As shown, in order to calibrate the first pressure threshold Z1, the threshold calibration method further includes the following steps S310 to S330.
[0094] S310, if the processing unit 12 determines according to the pressure information that the first pressure threshold Z1 needs to be calibrated, then when the processing unit 12 determines according to the pressure information that the pressure F0 is less than the third pressure threshold Z3, the processing unit 12 determines the first pressure value according to the pressure F0.
[0095] As mentioned above, the pressure information is used to indicate the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16. After receiving the pressure information output by the pressure detection unit 16, the processing unit 12 can first determine whether the first pressure threshold Z1 needs to be calibrated based on the pressure information. If the first pressure threshold Z1 needs to be calibrated, the processing unit 12 can determine the first pressure value based on the size of the pressure F0 when the size of the pressure F0 is less than the third pressure threshold Z3, that is, when the user does not press the button assembly 11. The first pressure value here refers to the size of the pressure F0 when the user does not press the button assembly 11.
[0096] In the embodiment of the present application, the method for determining the first pressure value includes the following two methods.
[0097] (1) When the processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold Z3 according to the pressure information, the processing unit 12 directly selects the magnitude of any pressure F0 and uses it as the first pressure value.
[0098] Specifically, in some embodiments, when the user does not press the button assembly 11, the pressure information can be as follows: Fig.13 In this case, the magnitude of the pressure F0 is always less than the third pressure threshold Z3. At this time, the processing unit 12 can reduce the magnitude of any pressure F0 as the first pressure value. For example, Fig.13 In the illustrated embodiment, the processing unit 12 may use the magnitude of the pressure F0 at time t3 as the first pressure value.
[0099] (2) In this embodiment, the step of "when the processing unit 12 determines according to the pressure information that the pressure F0 is less than the third pressure threshold Z3, the first pressure value is determined according to the pressure F0" in step S310 may specifically include the following steps S312 and S314.
[0100] S312, when it is determined according to the pressure information that the pressure F0 is constantly less than the third pressure threshold Z3 within a fourth preset time period, the processing unit 12 obtains m fourth pressure values from the pressure values determined within the fourth preset time period.
[0101] The fourth preset time length is a time length preset in the processing unit 12. For example, the fourth preset time length may be 1 minute, 2 minutes, 5 minutes or 10 minutes. When the processing unit 12 determines that the magnitude of the pressure F0 is always less than the third pressure threshold Z3 within the fourth preset time length according to the pressure information, it indicates that the user has not pressed the key assembly 11 within the fourth preset time length. At this time, the processing unit 12 may determine m fourth pressure values from all pressure values within the fourth preset time length. In some embodiments, the m fourth pressure values may be randomly determined from all pressure values within the fourth preset time length.
[0102] In other embodiments, the determination moments of two adjacent fourth pressure values among the m fourth pressure values are separated by a fifth preset time length. The fifth preset time length here is also a time length preset in the processing unit 12. For example, the fifth preset time length may be 10ms, 20ms, 30ms, 100ms, 1 second, 2 seconds or 3 seconds, which is not limited here. m is an integer greater than or equal to 3. In some specific embodiments, the pressure information may be as follows: Fig.14 As shown. Fig.14 In the illustrated embodiment, the duration from time T3 to time T4 is the fourth preset duration, and m is 10. The duration from time t01 to time t02 is equal to the duration from time t02 to time t03, and is equal to the duration from time t03 to time t04 ... and is equal to the duration from time t09 to time t010. The m fourth pressure values are respectively the pressure value at time t01, the pressure value at time t02, the pressure value at time t03 ... the pressure value at time t010.
[0103] S314: The processing unit 12 uses the average value of m-2 fourth pressure values excluding the maximum value and the minimum value among the m fourth pressure values as the first pressure value.
[0104] After the processing unit 12 obtains the m fourth pressure values, it may remove the maximum value and the minimum value of the m fourth pressure values, and take the average value of the remaining m-2 fourth pressure values as the first pressure value.
[0105] S320, if the absolute value of the difference between the first pressure value and the reference pressure value is less than or equal to the first preset threshold, the processing unit 12 subtracts the reference pressure value from the first pressure threshold Z1 and adds the first pressure value to obtain a calibrated first pressure threshold Z1.
[0106] S330: If the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, the processing unit 12 controls the display screen 194 of the electronic device 10 to output a reminder message.
[0107] The reference pressure value is the pressure value stored in the processing unit 12. Taking the electronic device 10 that has just left the factory as an example, the reference pressure value refers to the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the electronic device 10 leaves the factory and the user does not press the button assembly 11. In some specific embodiments, when the electronic device 10 leaves the factory, the staff can set the reference pressure value to 0. If the reference pressure value is calibrated, the calibrated reference pressure value is the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the user does not press the button assembly 11 during calibration.
[0108] The first preset threshold is a threshold preset in the processing unit 12 and is used to determine whether the deviation of the first pressure value relative to the reference pressure value is large. After obtaining the first pressure value, the processing unit 12 subtracts the reference pressure value from the first pressure value.
[0109] As a case, if the absolute value of the difference between the first pressure value and the reference pressure value is less than or equal to the first preset threshold, it indicates that the deviation of the first pressure value is small. In this case, the processing unit 12 can directly calibrate the first pressure threshold Z1. When the processing unit 12 calibrates the first pressure threshold Z1, the first pressure threshold Z1 before calibration can be subtracted from the reference pressure value and then added to the first pressure value to obtain the calibrated first pressure threshold Z1. In this case, it is easy to obtain: the difference between the calibrated first pressure threshold Z1 and the first pressure threshold Z1 before calibration is equal to the difference between the first pressure value and the reference pressure value, which is equal to the influence of the aged deformation component 14 on the size of the pressure F0 detected by the pressure detection unit 16.
[0110] For example, when the reference pressure value of the electronic device 10 is 0, the first pressure threshold Z1 is 1.5N, the first pressure value determined by the processing unit 12 according to the pressure information is 0.2N, and the first preset threshold is 0.2N, then when the magnitude of the force F1a applied by the user to the deformable component 14 when the electronic device 10 is shipped is greater than or equal to 1.5N, the processing unit 12 determines that the user uses the key assembly 11. Here, since the reference pressure value is the magnitude of the pressure F0 of the deformable component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the electronic device 10 is shipped and the user does not press the key assembly 11; and the first pressure value is the magnitude of the pressure F0 of the deformable component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the first pressure threshold Z1 needs to be calibrated and the user does not press the key assembly 11. Therefore, the difference between the first pressure value and the reference pressure value, i.e., 0.2N, is the influence of the aging deformable component 14 on the magnitude of the pressure F0 detected by the pressure detection unit 16. In this case, in order to ensure that the processing unit 12 determines that the user uses the key assembly 11 only when the magnitude of the force applied by the user to the deformable component 14 is greater than or equal to 1.5 N, the calibrated first pressure threshold Z1 should be equal to 1.7 N. In this way, the threshold calibration method can calibrate the first pressure threshold Z1, thereby improving the accuracy of the processing unit 12 in determining whether the user uses the key assembly 11 of the electronic device 10, thereby improving the user experience.
[0111] It is understandable that in the threshold calibration method provided in the embodiment of the present application, when the processing unit 12 executes step S320, i.e., calibrates the first pressure threshold Z1, it is also necessary to calibrate the reference pressure value at the same time. The calibrated reference pressure value is equal to the first pressure value, i.e., equal to the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when step S310 is executed.
[0112] Based on this, if the threshold calibration method provided in the embodiment of the present application is executed for the first time after the electronic device 10 leaves the factory, the reference pressure value in step S320 refers to the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the electronic device 10 leaves the factory and the user does not press the button assembly 11. If the threshold calibration method provided in the embodiment of the present application is executed for the Nth time after the electronic device 10 leaves the factory, the reference pressure value in step S320 refers to the reference pressure value and the first pressure threshold Z1 obtained after the N-1th calibration. Here, N is an integer greater than or equal to 2.
[0113] At the same time, when the processing unit 12 executes step S320, i.e., calibrates the first pressure threshold Z1, it can also calibrate the second pressure threshold Z2 and the third pressure threshold Z3 at the same time. The calibrated second pressure threshold Z2 is equal to the second pressure threshold Z2 before calibration minus the reference pressure value and plus the first pressure value; the calibrated third pressure threshold Z3 is equal to the third pressure threshold Z3 before calibration minus the reference pressure value and plus the first pressure value.
[0114] As another case, if the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, it indicates that the deviation of the first pressure value is large. In this case, it may be that a foreign object is stuck in the deformable component 14 of the key assembly 11. Therefore, the processing unit 12 can control the display screen 194 of the electronic device 10 to output a reminder message. The reminder message is used to remind the user to check whether there is a fault. For example, the screen where the electronic device 10 outputs the reminder message can be as follows: Fig.15 As shown, the content of the reminder message is specifically "The key is abnormal, please check whether there is any foreign object stuck in the key."
[0115] Further, in some embodiments, when the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, the processing unit 12 controls the display screen 194 to output a reminder message not only to remind the user to check whether a fault occurs, but also to remind the user whether to calibrate the first pressure threshold Z1. For example, the screen on which the electronic device 10 outputs the reminder message may be as follows: Fig.16 As shown, the content of the reminder information is specifically "the key is abnormal, please check whether there is a foreign object stuck in the key" and "please check and choose whether to calibrate the key to use the trigger threshold."
[0116] In this case, the reminder information may also include a first control and a second control. The first control is used to indicate calibration of the first pressure threshold Z1. The second control is used to indicate non-calibration of the first pressure threshold Z1. Fig.16 In the illustrated embodiment, the first control is a "yes" option, and the second control is a "no" option. The threshold calibration method may further include step S340 after step S330.
[0117] S340: If a selection instruction for the first control is received within the sixth preset time period, the processing unit 12 re-executes step S310 and subsequent steps.
[0118] The sixth preset duration is a time length preset in the processing unit 12, which is the display duration of the reminder information. That is, when the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, the processing unit 12 can control the display screen 194 of the electronic device 10 to output the reminder information within the sixth preset duration. If the processing unit 12 receives a user's selection instruction for the first control within the sixth preset duration, that is, during the display of the reminder information, the processing unit 12 can re-execute step S310 and subsequent steps to calibrate the first pressure threshold Z1. Here, the user can output the selection instruction for the first control to the processing unit 12 by touching the "Yes" option. If the processing unit 12 receives a user's selection instruction for the second control within the sixth preset duration, that is, during the display of the reminder information, the processing unit 12 can control the display screen 194 to stop outputting the reminder information. The user can output the selection instruction for the second control to the processing unit 12 by touching the "No" option. If the processing unit 12 does not receive the user's selection instruction for the first control or the second control within the sixth preset time period, that is, during the display of the reminder information, the processing unit 12 controls the display screen 194 to stop outputting the reminder information after the sixth preset time period ends.
[0119] The threshold calibration method provided in the embodiment of the present application is further expanded from three aspects as follows.
[0120] 1. Determine whether the first pressure threshold Z1 needs to be calibrated.
[0121] As mentioned above, when step S310 is executed, the processing unit 12 needs to determine that the first pressure threshold Z1 needs to be calibrated according to the pressure information. Based on this, before step S310, the threshold calibration method may further include the following step S302.
[0122] S302, the processing unit 12 determines whether the first pressure threshold Z1 needs to be calibrated according to the pressure information. Step S302 may specifically include the following steps S3022 and S3024.
[0123] S3022: When the processing unit 12 determines according to the pressure information that the magnitude of the pressure F0 meets a preset condition, the processing unit 12 determines a second pressure value according to the magnitude of the pressure F0 after a third preset time period.
[0124] The preset condition is a condition related to the size of the pressure F0 that is pre-set in the processing unit 12. In the embodiment of the present application, the preset condition specifically refers to: the size of the pressure F0 first increases to be greater than or equal to the first pressure threshold Z1, and then decreases to be less than or equal to the second pressure threshold Z2. Since the first pressure threshold Z1 is the use trigger threshold of the button assembly 11, the second pressure threshold Z2 is the stop use trigger threshold of the button assembly 11. Therefore, each time the size of the pressure F0 meets the preset condition once, it indicates that the user has used the button assembly 11 once. In other words, the processing unit 12 determines that the size of the pressure F0 meets the preset condition based on the pressure information, which means that the processing unit 12 determines that the user has used the button assembly 11 based on the pressure information.
[0125] The third preset time length is a time length preset in the processing unit 12. In step S3022, the processing unit 12 needs to first delay the third preset time length after the user uses the button assembly 11, and then obtain the size of the pressure F0. The processing unit 12 can determine the second pressure value according to the size of the obtained pressure F0. In this step, the purpose of delaying the third preset time length is to ensure that the user completely removes the force F1a after the user uses the button assembly 11, so that the deformable component 14 is restored. In some embodiments, the third preset time length is a time length in milliseconds. For example, the third preset time length can be 10 milliseconds, 20 milliseconds, or 30 milliseconds.
[0126] In the embodiment of the present application, the processing unit 12 determines the second pressure value according to the acquired pressure F0 in two ways as follows.
[0127] (1) When the processing unit 12 determines that the magnitude of the pressure F0 meets the preset condition according to the pressure information, the magnitude of the pressure F0 after the third preset time period is directly determined as the second pressure value. That is, when the user uses the key assembly 11, the processing unit 12 delays the third preset time period to obtain the magnitude of the pressure F0, and directly uses the magnitude of the pressure F0 as the second pressure value.
[0128] For example, in Fig.17 In the embodiment shown, at time t1, the magnitude of the pressure F0 first increases to be equal to the first pressure threshold Z1; at time t2, the magnitude of the pressure F0 decreases to be equal to the second pressure threshold Z2. That is, the processing unit 12 can determine that the magnitude of the pressure F0 meets the preset condition at time t2 based on the pressure information. In this case, if the duration between time t2 and time t4 is the third preset duration, the processing unit 12 can determine the magnitude of the pressure F0 at time t4 as the second pressure value.
[0129] (2) In this embodiment, the threshold calibration method further includes the following step S301 before step S302: the processing unit 12 sets M=0. M is a variable value used to count the number of third pressure values, and its implementation method can be a virtual counter in the processing unit 12. That is, before step S302 is executed, the processing unit 12 can set M to 0. The initial value of M is also 0 when the electronic device 10 leaves the factory.
[0130] Based on this, step S3022 may specifically include the following steps S3022A to S3022C.
[0131] S3022A, when the processing unit 12 determines according to the pressure information that the magnitude of the pressure F0 meets the preset condition, the magnitude of the pressure F0 after the third preset time period is taken as a third pressure value, and M=M+1.
[0132] Specifically, when the user uses the button assembly 11 once, the processing unit 12 delays the third preset time to obtain the magnitude of the pressure F0, and uses the magnitude of the pressure F0 as the third pressure value. At the same time, the processing unit 12 also adds 1 to M. Since the initial value of M is 0, it can also be said that M represents the number of times the user uses the button assembly 11 and the number of third pressure values obtained by the processing unit 12.
[0133] S3022B: If M<X, the processing unit 12 re-executes step S3022A.
[0134] S3022C, if M=X, the processing unit 12 uses the average value of X-2 third pressure values excluding the maximum value and the minimum value among the acquired X third pressure values as the second pressure value.
[0135] X is an integer greater than or equal to 3. For example, X may be equal to 4, 5, 8, or 10. In this embodiment, if M is less than X, that is, the number of third pressure values acquired by the processing unit 12 does not reach X, the processing unit 12 re-executes step S3022A and S3022B after step S3022A until M is equal to X.
[0136] When M is equal to X, it indicates that the number of times the user uses the button assembly 11 reaches X times, and the processing unit 12 obtains X third pressure values. At this time, the processing unit 12 can remove the maximum value and the minimum value of the X third pressure values, and use the average value of the remaining X-2 third pressure values as the second pressure value.
[0137] For example, taking X equal to 4, Fig.18In the illustrated embodiment, at time t11, the magnitude of pressure F0 increases for the first time to be equal to the first pressure threshold Z1; at time t12, the magnitude of pressure F0 decreases for the first time to be equal to the second pressure threshold Z2. At time t21, the magnitude of pressure F0 increases for the second time to be equal to the first pressure threshold Z1; at time t22, the magnitude of pressure F0 decreases for the second time to be equal to the second pressure threshold Z2. At time t31, the magnitude of pressure F0 increases for the third time to be equal to the first pressure threshold Z1; at time t32, the magnitude of pressure F0 decreases for the third time to be equal to the second pressure threshold Z2. At time t41, the magnitude of pressure F0 increases for the fourth time to be equal to the first pressure threshold Z1; at time t42, the magnitude of pressure F0 decreases for the fourth time to be equal to the second pressure threshold Z2.
[0138] That is, the processing unit 12 can determine, based on the pressure information, that the magnitude of the pressure F0 meets the preset condition for the first time at time t12, the second time at time t22, the third time at time t32, and the fourth time at time t42. The duration between time t12 and time t13 is the third preset duration; the duration between time t22 and time t23 is the third preset duration; the duration between time t32 and time t33 is the third preset duration; the duration between time t42 and time t43 is the third preset duration. In this case, the processing unit 12 can remove the maximum and minimum values of the magnitude of the pressure F0 at time t13, the magnitude of the pressure F0 at time t23, the magnitude of the pressure F0 at time t33, and the magnitude of the pressure F0 at time t43, and determine the average value of the remaining two magnitudes of the pressure F0 as the second pressure value.
[0139] S3024: If the absolute value of the difference between the second pressure value and the reference pressure value is greater than the second preset threshold, the processing unit 12 determines that the first pressure threshold Z1 needs to be calibrated.
[0140] The second preset threshold is a threshold preset in the processing unit 12, which is used to determine whether the deviation of the second pressure value relative to the reference pressure value is large. After the processing unit 12 obtains the second pressure value, it subtracts the reference pressure value from the second pressure value. If the difference is greater than the second preset threshold, it indicates that the deviation of the second pressure value is large, that is, the magnitude of the pressure F0 has a large deviation when the user does not use the button assembly 11. In this case, the processing unit 12 determines that the first pressure threshold Z1 needs to be calibrated. Among them, the second preset threshold can be less than or equal to the first preset threshold.
[0141] In this embodiment, when executing step S320 , the processing unit 12 may further set M equal to 0, so as to re-count the number of third pressure values when calibrating the first pressure threshold Z1 next time.
[0142] 2. Determine whether the first pressure threshold Z1 requires a start condition for calibration.
[0143] In some embodiments, the threshold calibration method of the present application may execute the above step S302 when one of the following two conditions is met.
[0144] (1) The user presses the key repeatedly within a short period of time.
[0145] Generally, when the key assembly 11 of the electronic device 10 fails, the user will repeatedly press the key for many times in a short period of time. Therefore, the threshold calibration method provided in the embodiment of the present application can start executing the above step S302 and subsequent steps after detecting that the user repeatedly presses the key for many times in a short period of time.
[0146] Based on this, the threshold calibration method provided in the embodiment of the present application may further include the following step S301A before step S302.
[0147] S301A, if the processing unit 12 determines according to the pressure information that the magnitude of the pressure F0 satisfies the preset condition for a preset number of times within the first preset time period, it determines according to the pressure information whether the first pressure threshold Z1 needs to be calibrated.
[0148] The first preset duration is a time length preset in the processing unit 12, that is, the "short time" in judging whether the user repeatedly presses the key multiple times in a short time. In some embodiments, the first preset duration may be, for example, 1 second, 2 seconds, 3 seconds, or 5 seconds. Whenever the magnitude of the pressure F0 meets the preset condition once, it indicates that the user uses the key assembly 11 once. The preset number of times may be an integer greater than or equal to 3. For example, the preset number of times may be 3, 4, or 5.
[0149] When the processing unit 12 determines based on the pressure information that the magnitude of the pressure F0 satisfies the preset condition for a preset number of times within the first preset time, it indicates that the number of times the user uses the key assembly 11 within the first preset time reaches the preset number of times. In this case, it indicates that the key assembly 11 may be faulty, and the processing unit 12 may start to execute step S302 and subsequent steps.
[0150] (2) The first pressure threshold Z1 is calibrated regularly.
[0151] In order to improve the user experience, the first pressure threshold Z1 may be calibrated regularly. Based on this, the threshold calibration method provided in the embodiment of the present application may further include the following step S301B before step S302.
[0152] S301B: If the time between the current moment and the moment when the first pressure threshold Z1 was last calibrated is greater than or equal to the second preset time, the processing unit 12 determines whether the first pressure threshold Z1 needs to be calibrated according to the pressure information.
[0153] The second preset duration is a time length preset in the processing unit 12. In this embodiment, the first pressure threshold Z1 can be calibrated once every second preset duration. The second preset duration can be, for example, 90 days, 180 days, or 365 days. When the processing unit 12 calibrates the first pressure threshold Z1, the moment of each calibration of the first pressure threshold Z1 can be synchronously recorded. When the processing unit 12 detects that the time length between the current moment and the moment of the last calibration of the first pressure threshold Z1 has reached the second preset duration, step S302 and subsequent steps can be started.
[0154] 3. Environmental requirements for calibration of the first pressure threshold Z1.
[0155] In some embodiments, the processing unit 12 may execute step S310 and subsequent steps when the electronic device 10 is in a horizontally stationary state.
[0156] Specifically, in general, the reference pressure value is equal to the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the electronic device 10 leaves the factory or the last time the threshold calibration method is performed to calibrate the reference pressure value, when the user does not press the button assembly 11 and the electronic device 10 is in a horizontally stationary state. Therefore, when the processing unit 12 performs the step S310 of "the processing unit 12 determines the first pressure value according to the magnitude of the pressure F0 when it determines that the magnitude of the pressure F0 is less than the third pressure threshold Z3 according to the pressure information", the condition of "the electronic device 10 is in a horizontally stationary state" should also be met. In this way, the difference between the first pressure value and the reference pressure value can be made equal to the influence of the aging deformation component 14 on the magnitude of the pressure F0 detected by the pressure detection unit 16.
[0157] Based on this, step S310 may specifically include the following steps S310A and S310B.
[0158] S310A, if the processing unit 12 determines that the first pressure threshold Z1 needs to be calibrated according to the pressure information, the processing unit 12 obtains the posture parameters of the electronic device 10.
[0159] When the processing unit 12 determines that the first pressure threshold Z1 needs to be calibrated according to the pressure information, the processing unit 12 can obtain the posture parameters of the electronic device 10. Here, the processing unit 12 can obtain the posture parameters of the electronic device 10 through at least one of the acceleration sensor 180E and the gyroscope 180B in the electronic device 10. When the acceleration sensor 180E is working, the acceleration parameters of the electronic device 10 can be output to the processing unit 12. When the gyroscope 180B is working, the angular velocity parameters of the electronic device 10 can be output to the processing unit 12. Based on this, the posture parameters of the electronic device 10 can be the acceleration parameters and angular velocity parameters of the electronic device 10.
[0160] S310B, if it is determined according to the posture parameters of the electronic device 10 that the electronic device 10 is in a horizontally stationary state, the processing unit 12 determines a first pressure value according to the magnitude of the pressure F0 when it is determined according to the pressure information that the magnitude of the pressure F0 is less than the third pressure threshold Z3.
[0161] After the processing unit 12 obtains the posture parameters of the electronic device 10, it can determine whether the electronic device 10 is in a horizontal resting state according to the posture parameters of the electronic device 10. For example, when the posture parameters are acceleration parameters and angular velocity parameters of the electronic device 10, the processing unit 12 can determine that the electronic device 10 is in a resting state when the acceleration parameter of the electronic device 10 is less than a preset acceleration, and determine that the electronic device 10 is in a horizontal state when the angular velocity parameter of the electronic device 10 is less than a preset angular velocity.
[0162] After the processing unit 12 determines that the electronic device 10 is in a horizontally stationary state, it executes the step of "when the processing unit 12 determines according to the pressure information that the pressure F0 is less than the third pressure threshold Z3, the first pressure value is determined according to the pressure F0", which is not repeated here.
[0163] The following is a detailed explanation of the calibration process of the first pressure threshold Z1 of the electronic device 10 after it leaves the factory with reference to the accompanying drawings.
[0164] Fig.19 FIG. 1 is a flow chart of another threshold calibration method provided by an embodiment of the present application. Fig.19 As shown, in a specific embodiment, in order to calibrate the first pressure threshold Z1, the threshold calibration method includes the following steps S1 to S17.
[0165] S1, when the electronic device 10 leaves the factory, a reference pressure value and a first pressure threshold Z1 are set, and M is set to be equal to 0.
[0166] When the electronic device 10 leaves the factory, a reference pressure value and a first pressure value are stored in the processing unit 12. The reference pressure value is equal to the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 detected by the pressure detection unit 16 when the electronic device 10 leaves the factory and the user does not press the button assembly 11 and the electronic device 10 is in a horizontally stationary state. The first pressure threshold Z1 is the use trigger threshold of the electronic device 10 when it leaves the factory (without being calibrated by the threshold calibration method provided in the embodiment of the present application). Generally, the reference pressure value can be set to 0. The first pressure threshold Z1 can be set by those skilled in the art according to needs and experience.
[0167] When the electronic device 10 leaves the factory, the difference between the first pressure threshold Z1 and the reference pressure value is the minimum value of the force F1a that the user needs to apply when using the key assembly 11. In addition, the processing unit 12 may also store a second pressure threshold Z2 and a third pressure threshold Z3.
[0168] S2, when the electronic device 10 is working normally, the processing unit 12 detects that the user repeatedly presses the key for many times in a short period of time, or the time between the current moment and the last moment of calibration of the first pressure threshold Z1 is greater than or equal to the second preset time.
[0169] When the electronic device 10 is in a normal working state, the user can use the key assembly 11 to control the electronic device 10. When the user uses the key assembly 11, the processing unit 12 can receive pressure information and determine the magnitude of the pressure F0 according to the pressure information.
[0170] When the processing unit 12 detects that the magnitude of the pressure F0 satisfies the preset condition once, it can be determined that the user has used the key assembly 11 once. The preset condition here means that the magnitude of the pressure F0 first increases to be greater than or equal to the first pressure threshold Z1, and then decreases to be less than or equal to the second pressure threshold Z2. Based on this, when the processing unit 12 determines that the magnitude of the pressure F0 satisfies the preset condition for a preset number of times within the first preset time (short time) according to the pressure information, it indicates that the number of times the user has used the key assembly 11 within the first preset time reaches the preset number, that is, the user repeatedly presses the key multiple times in a short time.
[0171] The second preset time length is a time length preset in the processing unit 12. When the processing unit 12 calibrates the first pressure threshold Z1, it can synchronously record the moment of each calibration of the first pressure threshold Z1, so as to determine whether the time length between the current moment and the moment of the last calibration of the first pressure threshold Z1 is greater than or equal to the second preset time length.
[0172] When the electronic device 10 is working normally, when any one of the two conditions is met: "the processing unit 12 detects that the user repeatedly presses the key multiple times in a short period of time" and "the time between the current moment and the last time the first pressure threshold Z1 was calibrated is greater than or equal to the second preset time", step S3 is executed.
[0173] S3, the processing unit 12 records the magnitude of the pressure F0 after each key press for a third preset time as a third pressure value, and sets M=M+1.
[0174] When the processing unit 12 detects that the magnitude of the pressure F0 meets the preset condition once, it can be determined that the user uses the key component 11 once. In step S3, when the processing unit 12 detects that the magnitude of the pressure F0 meets the preset condition once, the magnitude of the pressure F0 is obtained after a delay of a third preset time, and the magnitude of the pressure F0 is used as the third pressure value. At the same time, the processing unit 12 also adds 1 to M. Since the initial value of M is 0, it can also be said that M represents the number of times the user uses the key component 11, and the number of third pressure values obtained by the processing unit 12.
[0175] S4, determine whether M is equal to X.
[0176] The processing unit 12 determines whether M is equal to X. X is an integer greater than or equal to 3. If the determination result of step S4 is no, the process returns to step S3; if the determination result of step S4 is yes, the process continues to step S5.
[0177] S5: Taking an average value of X-2 third pressure values excluding the maximum value and the minimum value among the acquired X third pressure values as the second pressure value.
[0178] When the judgment result of step S4 is yes, the processing unit 12 can obtain X third pressure values. At this time, the processing unit 12 can remove the maximum value and the minimum value of the X third pressure values and use the average value of the remaining X-2 third pressure values as the second pressure value.
[0179] S6, determining whether the absolute value of the difference between the second pressure value and the reference pressure value is greater than a second preset threshold.
[0180] The processing unit 12 subtracts the reference pressure value from the second pressure value and determines whether the absolute value of the difference is greater than the second preset threshold. If the determination result of step S6 is yes, it indicates that the first pressure threshold Z1 needs to be calibrated, and step S7 is then executed.
[0181] If the determination result of step S6 is no, it indicates that the first pressure threshold Z1 does not need to be calibrated. At this time, the processing unit 12 may set M equal to 0 and return to re-execute step S2.
[0182] S7, determining whether the electronic device 10 is in a horizontally stationary state.
[0183] When the processing unit 12 determines that the first pressure threshold Z1 needs to be calibrated, it can be determined whether the electronic device 10 is in a horizontally stationary state. Here, the processing unit 12 can obtain the acceleration parameter output by the acceleration sensor 180E of the electronic device 10 and the angular velocity parameter output by the gyroscope 180B, and use this to determine whether the electronic device 10 is in a horizontally stationary state. When the electronic device 10 is in a horizontally stationary state, that is, when the judgment result of step S7 is yes, step S8 is executed; when the electronic device 10 is not in a horizontally stationary state, that is, when the judgment result of step S7 is no, step S9 is executed.
[0184] S8, determining whether the button assembly 11 is in a pressed state.
[0185] When the electronic device 10 is in a horizontally stationary state, the processing unit 12 can determine whether the key assembly 11 is in a pressed state. Here, the processing unit 12 can determine the magnitude of the pressure F0 based on the pressure information. When the magnitude of the pressure F0 is less than the third pressure threshold Z3, the processing unit 12 determines that the key assembly 11 is not pressed. On the contrary, when the magnitude of the pressure F0 is greater than or equal to the third pressure threshold Z3, the processing unit 12 determines that the key assembly 11 is in a pressed state.
[0186] When the electronic device 10 is in a pressed state, that is, the judgment result of step S8 is yes, step S9 is executed; when the electronic device 10 is not in a pressed state, that is, the judgment result of step S8 is no, step S10 is executed.
[0187] S9, waiting for the seventh preset time period.
[0188] The seventh preset time length is a time length preset in the electronic device 10. The seventh preset time length may be, for example, 3 minutes, 5 minutes or 10 minutes, which is not limited here. After step S9, step S7 is executed again.
[0189] S10, the processing unit 12 obtains m fourth pressure values from the pressure values determined within a fourth preset time period, and the determination moments of two adjacent fourth pressure values among the m fourth pressure values are separated by a fifth preset time period.
[0190] Since step S10 is performed after step S7 and step S8, step S10 is performed when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is not pressed. That is, within the fourth preset time period, the electronic device 10 is always in a horizontally stationary state, and the magnitude of the pressure F0 is always less than the third pressure threshold Z3.
[0191] There may be multiple pressure values within the fourth preset time length. Here, the processing unit 12 may obtain m fourth pressure values from the multiple pressure values within the fourth preset time length, and the determination moments of two adjacent fourth pressure values among the m fourth pressure values are separated by a fifth preset time length. m is an integer greater than or equal to 3.
[0192] S11, taking an average value of m-2 fourth pressure values excluding the maximum value and the minimum value among the m fourth pressure values obtained as the first pressure value.
[0193] S12, determining whether the absolute value of the difference between the first pressure value and the reference pressure value is greater than a first preset threshold.
[0194] The processing unit 12 subtracts the reference pressure value from the first pressure value, and determines whether the absolute value of the obtained difference is greater than the first preset threshold value. If the judgment result of step S12 is no, it indicates that the deviation of the first pressure value is small. In this case, the processing unit 12 can directly calibrate the first pressure threshold value Z1, and then execute step S13. If the judgment result of step S12 is yes, it indicates that the deviation of the first pressure value is large. In this case, there may be a foreign object stuck in the deformable component 14 of the key assembly 11, and then step S14 can be executed.
[0195] S13, subtracting the reference pressure value from the first pressure threshold Z1 and adding the first pressure value to obtain a calibrated first pressure threshold Z1; and using the first pressure value as the calibrated reference pressure value.
[0196] The processing unit 12 calibrates the first pressure threshold Z1 by subtracting the reference pressure value before calibration in step S1 from the first pressure threshold Z1 before calibration in step S1 and adding the first pressure value obtained in step S11 to obtain the calibrated first pressure threshold Z1.
[0197] The processing unit 12 also calibrates the reference pressure value. Specifically, the first pressure value obtained in step S11 is used as the calibrated reference pressure value. In this way, the difference between the calibrated first pressure threshold Z1 and the calibrated reference pressure value is equal to the difference between the first pressure threshold Z1 and the reference pressure value when the electronic device 10 leaves the factory, that is, equal to the minimum value of the force F1a that the user needs to apply when using the key assembly 11. In other words, the purpose of calibrating the first pressure threshold Z1 is to keep the minimum value of the force F1a that the user needs to apply when using the key assembly 11 unchanged.
[0198] Each time the processing unit 12 calibrates the first pressure threshold Z1, it is based on the pressure value determined this time, the first pressure threshold Z1 calibrated last time, and the reference pressure value calibrated last time.
[0199] It can be understood that when step S13 is executed, the processing unit 12 can also calibrate the second pressure threshold Z2 and the third pressure threshold Z3. The calibrated second pressure threshold Z2 is equal to the second pressure threshold Z2 before calibration minus the reference pressure value and plus the first pressure value. The calibrated third pressure threshold Z3 is equal to the third pressure threshold Z3 before calibration minus the reference pressure value and plus the first pressure value. The processing unit 12 can also calibrate the reference pressure value, and the calibrated reference pressure value is equal to the first pressure value.
[0200] When executing step S13 , the processing unit 12 may also set M equal to 0, so as to re-count the number of third pressure values when calibrating the first pressure threshold Z1 next time.
[0201] S14, reminding the user to check whether the key is stuck and recalibrate the first pressure threshold Z1.
[0202] The processing unit 12 controls the display screen 194 of the electronic device 10 to output a reminder message. The reminder message is used to remind the user to check whether there is a foreign object stuck in the key assembly 11. At the same time, the reminder message also reminds the user whether to recalibrate the first pressure threshold Z1. The reminder message may include a first control and a second control. The first control is used to indicate the calibration of the first pressure threshold Z1. The second control is used to indicate not to calibrate the first pressure threshold Z1.
[0203] S15, determining whether the user chooses to recalibrate the first pressure threshold Z1.
[0204] In this embodiment, the duration for which the processing unit 12 controls the display screen 194 of the electronic device 10 to output the reminder information can be the sixth preset duration. Therefore, if the processing unit 12 receives a user selection instruction for the first control within the sixth preset duration, it indicates that the user chooses to recalibrate the first pressure threshold Z1, that is, the judgment result of step S15 is yes. In this case, step S16 can be executed. If the processing unit 12 receives a user selection instruction for the second control within the sixth preset duration; or if the processing unit 12 does not receive a user selection instruction for the first control or the second control within the sixth preset duration, step S17 can be executed.
[0205] S16, recalibrating the first pressure threshold Z1.
[0206] This step may specifically include: re-executing step S7 and subsequent steps. In other embodiments, step S16 may specifically include: re-executing step S8 and subsequent steps.
[0207] After step S16 is completed, step S17 is executed.
[0208] S17, the electronic device 10 resumes normal operation.
[0209] The electronic device 10 operates normally, and the processing unit 12 may re-execute step S2 and subsequent steps.
[0210] In the above steps S1 to S17, the process of calibrating the reference pressure value and the first pressure threshold Z1 for the first time after the electronic device 10 leaves the factory is described in detail. It can be understood that when the processing unit 12 calibrates the reference pressure value and the first pressure threshold Z1 for the Nth time, the "reference pressure value" and "first pressure threshold Z1" in step S1 refer to the reference pressure value and the first pressure threshold Z1 obtained after the N-1th calibration. Here, N is an integer greater than or equal to 2.
[0211] In the embodiment of the present application, parameters such as the first pressure threshold Z1, the second pressure threshold Z2, the third pressure threshold Z3, the first preset time, the second preset time, the third preset time, the fourth preset time, the fifth preset time, the sixth preset time, the seventh preset time, the preset number of times, the first preset threshold, the second preset threshold and so on can be set by the staff according to experience or needs, and there is no limitation on this.
[0212] The embodiment of the present application has at least the following beneficial effects: the processing unit 12 can determine whether the user uses the key component 11, whether the key component 11 is stopped, and whether the key component 11 is not pressed according to the pressure information. The first pressure threshold Z1 is the trigger threshold for the use of the key component 11. When the first pressure threshold Z1 needs to be calibrated, the processing unit 12 can determine the first pressure value according to the magnitude of the pressure F0 when the user does not press the key component 11. Afterwards, the processing unit 12 can subtract the reference pressure value from the first pressure threshold Z1 and add the first pressure value to obtain the calibrated first pressure threshold Z1. In this way, the difference between the calibrated first pressure threshold Z1 and the first pressure threshold Z1 before calibration is equal to the difference between the first pressure value and the reference pressure value, which is equal to the influence of the aged deformation component 14 on the magnitude of the pressure F0 detected by the pressure detection unit 16. Therefore, the threshold calibration method can calibrate the first pressure threshold Z1, thereby improving the accuracy of the processing unit 12 in determining whether the user uses the key component 11 of the electronic device 10, and improving the user experience.
[0213] The threshold calibration method can also synchronously calibrate the second pressure threshold Z2 and the third pressure threshold Z3 while calibrating the first pressure threshold Z1, thereby improving the accuracy of the processing unit 12 in determining whether the user has stopped using or is not using the key component 11 of the electronic device 10, thereby improving the user experience.
[0214] The embodiment of the present application also provides a key assembly 11. The key assembly 11 includes a processing unit 12, a deformation component 14, and a pressure detection unit 16. The pressure detection unit 16 is connected to the processing unit 12. The pressure detection unit 16 is used to output pressure information to the processing unit 12, and the pressure information is used to indicate the size of the pressure F0 of the deformation component 14 on the pressure detection unit 16. When the processing unit 12 is working, it executes the threshold calibration method in any of the above embodiments.
[0215] The embodiment of the present application further provides an electronic device 10, comprising the key assembly 11 as described above.
[0216] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A threshold calibration method, applied to electronic equipment, characterized in that: The electronic device comprises: a deformation component, a pressure detection unit and a processing unit; the processing unit is provided with a first pressure threshold, a second pressure threshold and a third pressure threshold, the third pressure threshold is less than or equal to the second pressure threshold; the pressure detection unit is used to detect the magnitude of the pressure applied by the deformation component and output pressure information corresponding to the magnitude of the pressure to the processing unit; The method comprises: When it is determined according to the pressure information that the pressure increases to be greater than or equal to the first pressure threshold, a preset operation is performed; when it is determined according to the pressure information that the pressure decreases to be less than or equal to the second pressure threshold, the preset operation is terminated; The method further comprises: If it is determined according to the pressure information that the first pressure threshold needs to be calibrated, then when it is determined according to the pressure information that the magnitude of the pressure is less than the third pressure threshold, a first pressure value is determined according to the magnitude of the pressure, and the first pressure value is the magnitude of the pressure when the user does not press the deformable component; If the absolute value of the difference between the first pressure value and the reference pressure value is less than or equal to a first preset threshold, the reference pressure value is subtracted from the first pressure threshold and added to the first pressure value to obtain the calibrated first pressure threshold, where the reference pressure value is the magnitude of the pressure when the user does not press the deformable component; Among them, when it is determined according to the pressure information that the magnitude of the pressure meets the preset conditions, the second pressure value is determined according to the magnitude of the pressure after a third preset time period, and the preset conditions are: the magnitude of the pressure first increases to be greater than or equal to the first pressure threshold, and then decreases to be less than or equal to the second pressure threshold; if the absolute value of the difference between the second pressure value and the baseline pressure value is greater than the second preset threshold, it is determined that the first pressure threshold needs to be calibrated.
2. The method according to claim 1, characterized in that The method further comprises: If the pressure magnitude determined according to the pressure information satisfies a preset condition for a preset number of times within a first preset time period, it is determined according to the pressure information whether the first pressure threshold needs to be calibrated, and the preset condition is: the pressure magnitude first increases to greater than or equal to the first pressure threshold, and then decreases to less than or equal to the second pressure threshold.
3. The method according to claim 1, characterized in that The method further comprises: If the time between the current moment and the moment when the first pressure threshold was last calibrated is greater than or equal to a second preset time, it is determined whether the first pressure threshold needs to be calibrated according to the pressure information.
4. The method according to claim 1, characterized in that When it is determined according to the pressure information that the magnitude of the pressure meets a preset condition, before determining the second pressure value according to the magnitude of the pressure after a third preset time period, the method further includes: Let M = 0; When it is determined according to the pressure information that the magnitude of the pressure satisfies a preset condition, determining a second pressure value according to the magnitude of the pressure after a third preset time period includes: When it is determined according to the pressure information that the magnitude of the pressure meets the preset condition, the magnitude of the pressure after the third preset time period is taken as a third pressure value, and M=M+1; If M<X, then re-performing the step of taking the pressure after the third preset time as a third pressure value when it is determined according to the pressure information that the pressure satisfies the preset condition, and setting M=M+1, where X is an integer greater than or equal to 3; If M=X, the average value of X-2 third pressure values excluding the maximum value and the minimum value among the acquired X third pressure values is taken as the second pressure value.
5. The method according to claim 1, characterized in that The second preset threshold is smaller than the first preset threshold.
6. The method according to any one of claims 1 to 5, characterized in that: If it is determined according to the pressure information that the first pressure threshold needs to be calibrated, then when it is determined according to the pressure information that the pressure is less than the third pressure threshold, determining the first pressure value according to the pressure includes: If it is determined according to the pressure information that the first pressure threshold needs to be calibrated, obtaining a posture parameter of the electronic device; If it is determined according to the posture parameters of the electronic device that the electronic device is in a horizontally stationary state, then when it is determined according to the pressure information that the pressure is less than the third pressure threshold, a first pressure value is determined according to the pressure.
7. The method according to any one of claims 1 to 5, characterized in that: When it is determined according to the pressure information that the pressure is less than the third pressure threshold, determining the first pressure value according to the pressure includes: When it is determined according to the pressure information that the magnitude of the pressure is constantly less than the third pressure threshold value within a fourth preset time period, m fourth pressure values are obtained from the pressure values determined within the fourth preset time period, where the determination moments of two adjacent fourth pressure values among the m fourth pressure values are separated by a fifth preset time period, and m is an integer greater than or equal to 3; An average value of m-2 fourth pressure values excluding the maximum value and the minimum value among the m fourth pressure values is taken as the first pressure value.
8. The method according to any one of claims 1 to 5, characterized in that The method further comprises: If the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, a reminder message is output, where the reminder message is used to remind the user to check whether a fault occurs.
9. The method according to claim 8, characterized in that The reminder information is also used to remind whether to calibrate the first pressure threshold, and the reminder information includes a first control, and the first control is used to instruct to calibrate the first pressure threshold; If the absolute value of the difference between the first pressure value and the reference pressure value is greater than the first preset threshold, after outputting the reminder information, the method further includes: If a selection instruction for the first control is received within the sixth preset time period, the step of determining the first pressure value according to the pressure when it is determined according to the pressure information that the pressure is less than the third pressure threshold and subsequent steps are re-executed.
10. A key assembly, characterized in that: The device comprises a deformation component, a pressure detection unit, and a processing unit; the pressure detection unit is connected to the processing unit, and the pressure detection unit is used to output pressure information to the processing unit, and the pressure information is used to indicate the magnitude of the pressure of the deformation component on the pressure detection unit; When the processing unit is in operation, the method according to any one of claims 1 to 9 is executed.
11. An electronic device, characterized in that: Comprising the key assembly as claimed in claim 10.
