Key feedback unit driving method, key assembly and electronic device

By introducing a key feedback unit driving method in the electronic device, the feedback force of the key component is detected and calibrated, the problem of inaccurate feedback force after long-term use is solved, and the user experience and component stability are improved.

CN117707331BActive Publication Date: 2024-11-01HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311075694.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2024-11-01
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

After a long period of use of the button components in existing electronic devices, the feedback force is inaccurate, affecting the user experience.

Method used

Provide a key feedback unit driving method, by detecting and calibrating the feedback force magnitude during the operation of the key assembly, to ensure that the feedback force is basically unchanged, including using a pressure detection unit and a key feedback unit in the processing unit to adjust the feedback force according to the pressure information, to keep the difference between the feedback force and the preset threshold within an acceptable range.

Benefits of technology

It effectively improves the user experience, ensures the stability and accuracy of the feedback force of the key component over a long period of time, and extends the service life of the component.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707331B_ABST
    Figure CN117707331B_ABST
Patent Text Reader

Abstract

The present application discloses a key feedback unit driving method, a key assembly and an electronic device, and relates to the technical field of electronic products. When the processing unit executes the method, it can drive the key feedback unit to generate a first feedback force acting on the deformation component. In addition, the processing unit can also determine the magnitude of the first feedback force, that is, the first feedback force value, based on the pressure information output by the pressure detection unit. When the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit can also adjust the magnitude of the first feedback force by setting the waveform information of the first signal, so that the magnitude of the first feedback force is equal to the first reference feedback force value when the key feedback unit is working. In this way, the key feedback unit driving method can keep the magnitude of the first feedback force basically unchanged, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic products, and in particular to a key feedback unit driving 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 assemblies to replace physical keys. Such key assemblies do not need to be pressed and popped up like physical keys. Instead, when a user presses the surface of the key assembly with a finger, for example, the user senses the force applied by the user and provides a feedback force that can be felt by the user's finger. When the user's finger feels the feedback force, it knows that the key assembly has started to work, just like pressing a physical key.

[0003] However, the button assembly may age after long-term use, which may cause the feedback force provided by the button assembly to be inaccurate, affecting the user experience. Summary of the invention

[0004] The present application provides a key feedback unit driving method, a key assembly and an electronic device, which can detect and calibrate the magnitude of the feedback force provided by the key assembly when it is working, so that the magnitude of the feedback force remains basically unchanged, thereby improving the user experience. The technical solution is as follows:

[0005] In a first aspect, a key feedback unit driving method is provided, and the key feedback unit driving method is applied to a processing unit in an electronic device.

[0006] An electronic device has a key assembly. The key assembly includes a processing unit, a deformation component, a pressure detection unit, and a key feedback unit. Among them, the pressure detection unit and the key feedback unit are located on the same side of the deformation component. The pressure detection unit is connected to the input end of the processing unit, and the output end of the processing unit is connected to the key feedback 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 to the processing unit. In other words, the pressure information is used to indicate the magnitude of the pressure of the deformation component on the pressure detection unit. The processing unit is used to drive the key feedback unit. The key feedback unit is used to provide feedback force to the deformation component when working. Here, the processing unit uses the key feedback unit driving method of the present application to drive the key feedback unit, and the method is described below.

[0007] The method includes: when it is determined according to the pressure information that the pressure increases to be greater than or equal to the first pressure threshold, the processing unit outputs a first signal to the key feedback unit within a first preset time period to drive the key feedback unit to generate a first feedback force acting on the deformation component. The first feedback force is used to provide feedback on the user's behavior of using the key assembly. The direction of the first feedback force is opposite to the direction of the pressure.

[0008] The method also includes: after a first preset time, the processing unit determines a first feedback force value according to the pressure information; if the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, the processing unit sets the waveform information of the first signal so that the magnitude of the first feedback force corresponding to the first signal is equal to the first reference feedback force value. The first feedback force value refers to the magnitude of the first feedback force acting on the deformation component. The magnitude of the first feedback force corresponding to the first signal refers to the magnitude of the first feedback force generated by the key feedback unit on the deformation component when the processing unit outputs the first signal to the key feedback unit.

[0009] In the present application, the processing unit can drive the key feedback unit to generate a first feedback force acting on the deformation component to provide feedback on the user's behavior of using the key component. In addition, the processing unit can also determine the magnitude of the first feedback force, that is, the first feedback force value, based on the pressure information output by the pressure detection unit. When the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, that is, when the first feedback force value deviation is large, the processing unit can also adjust the magnitude of the first feedback force by setting the waveform information of the first signal, so that the magnitude of the first feedback force is equal to the first reference feedback force value when the key feedback unit works again. In this way, the key feedback unit driving method can detect and calibrate the magnitude of the first feedback force generated when the key component is working, so that the difference between the first reference feedback force value and the magnitude of the first feedback force is always maintained within the first preset threshold, that is, the magnitude of the first feedback force remains basically unchanged, thereby improving the user experience.

[0010] In some embodiments, the step of determining the first feedback force value according to the pressure information by the processing unit specifically includes: the processing unit obtains the first pressure value and the second pressure value; the processing unit subtracts the second pressure value from the first pressure value to obtain the first feedback force value. The first pressure value is the pressure value when the pressure value increases to be greater than or equal to the first pressure threshold, and the second pressure value is the minimum value of the pressure value within the first preset time period.

[0011] In some embodiments, if the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, before the step of the processing unit setting the waveform information of the first signal, the method further includes: the processing unit setting M=0.

[0012] In this case, if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal. This step specifically includes: if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets M=M+1; if M is greater than or equal to the first preset value, the processing unit sets the waveform information of the first signal and sets M=0.

[0013] Optionally, if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets M=M+1. After this step, the processing unit also includes: if M is less than the first preset value, the processing unit re-executes the step of determining the first feedback force value according to the pressure information after the first preset time period.

[0014] Optionally, the method further includes: if the difference between the first reference feedback force value and the first feedback force value is less than or equal to a first preset threshold, the processing unit sets M=0.

[0015] In some embodiments, if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal. The step specifically includes: if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit obtains the posture parameters of the electronic device; if it is determined that the electronic device is in a horizontally stationary state according to the posture parameters of the electronic device, the processing unit sets the waveform information of the first signal.

[0016] Among them, the posture parameters of the electronic device may include acceleration parameters output when the acceleration sensor of the electronic device is working and angular velocity parameters output when the gyroscope of the electronic device is working.

[0017] In some embodiments, if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal. The step specifically includes: if the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal after determining that the pressure is less than the third pressure threshold based on the pressure information.

[0018] In some embodiments, if the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal. Specifically, the processing unit obtains the posture parameters of the electronic device if the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold; if the electronic device is determined to be in a horizontally stationary state according to the posture parameters of the electronic device, the processing unit outputs a first signal to the key feedback unit within a second preset time after determining that the pressure is less than the third pressure threshold according to the pressure information, so as to drive the key feedback unit to generate a second feedback force acting on the deformation component; the processing unit determines the second feedback force value according to the pressure information; if the difference between the first reference feedback force value and the second feedback force value is greater than the first preset threshold, the processing unit sets the waveform information of the first signal. Wherein, the second feedback force value is the magnitude of the second feedback force acting on the deformation component.

[0019] Optionally, the step of determining the second feedback force value according to the pressure information by the processing unit specifically includes: the processing unit obtains a third pressure value and a fourth pressure value; the processing unit subtracts the fourth pressure value from the third pressure value to obtain the second feedback force value. The third pressure value is the pressure value when the pressure value is always less than the third pressure threshold, and the fourth pressure value is the minimum value of the pressure value within the second preset time period.

[0020] In some embodiments, the method further includes: when it is determined according to the pressure information that the pressure is reduced to less than or equal to the second pressure threshold, the processing unit outputs a second signal to the key feedback unit within a third preset time period to drive the key feedback unit to generate a third feedback force acting on the deformation component. The third feedback force is used to provide feedback to the user's behavior of stopping using the key assembly. The direction of the third feedback force is opposite to the direction of the pressure.

[0021] The method further includes: after a third preset time, the processing unit determines a third feedback force value according to the pressure information; if the difference between the second reference feedback force value and the third feedback force value is greater than a second preset threshold, the processing unit sets the waveform information of the second signal so that the magnitude of the third feedback force corresponding to the second signal is equal to the second reference feedback force value. The third feedback force value is the magnitude of the third feedback force acting on the deformation component. The magnitude of the third feedback force corresponding to the second signal refers to the magnitude of the third feedback force generated by the key feedback unit on the deformation component when the processing unit outputs the second signal to the key feedback unit.

[0022] In some embodiments, the step of determining the third feedback force value according to the pressure information by the processing unit specifically includes: the processing unit obtains the fifth pressure value and the sixth pressure value; the processing unit subtracts the sixth pressure value from the fifth pressure value to obtain the third feedback force value. The fifth pressure value is the pressure value when the pressure value decreases to less than or equal to the second pressure threshold, and the sixth pressure value is the minimum value of the pressure value within the third preset time period.

[0023] In some embodiments, if the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, before the step of the processing unit setting the waveform information of the second signal, the method further includes: the processing unit sets P=0.

[0024] In this case, if the difference between the second baseline feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit sets the waveform information of the second signal, which specifically includes: if the difference between the second baseline feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit sets P=P+1; if P is greater than or equal to the second preset value, the processing unit sets the waveform information of the second signal, and sets P=0.

[0025] In the second aspect, a key assembly is also provided. The key assembly includes a processing unit, a deformation component, a pressure detection unit, and a key feedback unit. Among them, the pressure detection unit and the key feedback unit are located on the same side of the deformation component. The pressure detection unit is connected to the input end of the processing unit, and the output end of the processing unit is connected to the key feedback 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. The processing unit is used to drive the key feedback unit. When the processing unit is working, it executes any method as described in the first aspect.

[0026] In a third aspect, an electronic device is also provided, comprising the key assembly as in the second aspect.

[0027] 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

[0028] Figure 1 is a schematic diagram of the appearance of a first electronic device provided in an embodiment of the present application;

[0029] Figure 2 is a schematic diagram of the appearance of a second electronic device provided in an embodiment of the present application;

[0030] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0031] Figure 4 It is a structural schematic diagram of the first key assembly provided in an embodiment of the present application;

[0032] Figure 5 This is a schematic diagram of the use of the first key assembly provided in an embodiment of the present application;

[0033] 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;

[0034] 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;

[0035] Figure 8 is a directional diagram of a feedback force provided in an embodiment of the present application;

[0036] Fig. 9 is a structural schematic diagram of a second key assembly provided in an embodiment of the present application;

[0037] Fig.10 is a schematic diagram of the use of the second key assembly provided in an embodiment of the present application;

[0038] Fig.11 is a schematic diagram of the first type of pressure information provided in an embodiment of the present application;

[0039] Fig.12 is a schematic diagram of the second type of pressure information provided in an embodiment of the present application;

[0040] Fig.13 yes Fig.12 A magnified view of position A1 in the middle;

[0041] Fig.14 yes Fig.12 A magnified view of position A2 in the middle;

[0042] Fig.15 is a structural schematic diagram of a third key assembly provided in an embodiment of the present application;

[0043] Fig.16 is a flow chart of a first key feedback unit driving method provided in an embodiment of the present application;

[0044] Fig.17 is a schematic diagram of the third type of pressure information provided in an embodiment of the present application;

[0045] Fig.18 yes Fig.17 A magnified view of position A3;

[0046] Fig.19 is a flow chart of a second key feedback unit driving method provided in an embodiment of the present application;

[0047] Fig. 20 is a flow chart of a third key feedback unit driving method provided in an embodiment of the present application;

[0048] Fig.21 is a schematic diagram of the fourth type of pressure information provided in an embodiment of the present application;

[0049] Fig. 22 yes Fig.21 A magnified view of position A4 in the middle;

[0050] Fig.23 This is a flow chart of the fourth key feedback unit driving method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] 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.

[0052] 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.

[0053] Before explaining in detail the key feedback unit driving method provided in the embodiment of the present application, the application scenario of the key feedback unit driving method is first explained.

[0054] The key feedback unit driving 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 notebook 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.

[0055] Figure 3 1 is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of the present application. Figure 3 As 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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).

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] The structure of the key assembly 11 of the electronic device 10 is described below.

[0071] 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 key assembly 11 includes a deformation component 14 , a pressure detection unit 16 , a processing unit 12 and a key feedback unit 18 .

[0072] 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, or a plastic deformation sheet. 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 follows: Figure 6 As shown in Figure (a).

[0073] 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).

[0074] 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.

[0075] 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.

[0076] 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 it can be one or more processing devices in the processing module 110. The processing unit 12 has an input end and an output 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. The output end of the processing unit 12 is connected to the key feedback unit 18 to drive the key feedback unit 18 to work. Here, the processing unit 12 uses the key feedback unit 18 driving method of the embodiment of the present application to drive the key feedback unit 18.

[0077] The pressure detection unit 16 and the key feedback unit 18 are located on the same side of the deformable component 14. When the processing unit 12 drives the key feedback unit 18 to work, the key feedback unit 18 can generate a feedback force F3a acting on the deformable component 14. At this time, the direction of the feedback force F3a received by the deformable component 14 is as follows: Figure 8 As shown in (a) of FIG. That is, the direction of the feedback force F3a is opposite to the direction of the pressure F0 of the deformation component 14 on the pressure detection unit 16 when the user applies the force F1a, and is also opposite to the direction of the force F1a applied by the user to the deformation component 14. It can be understood that when the user applies the force F1a to the deformation component 14, that is, when the deformation component 14 generates the force F1 on the pressure detection unit 16, if the deformation component 14 is subjected to the feedback force F3a, the magnitude of the pressure F0 of the deformation component 14 on the pressure detection unit 16 will reduce the magnitude of the feedback force F3a. At this time, Figure 8 As shown in FIG. 1(b), under the action of the feedback force F3a, the pressure F0 of the deformation component 14 on the pressure detection unit 16 also includes a force F3. The magnitude of the force F3 is the same as the magnitude of the feedback force F3a, and the direction of the force F3 is the same as the direction of the feedback force F3a. In some embodiments, the key feedback unit 18 can be a motor 191 in the electronic device 10.

[0078] 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.

[0079] Fig. 9 1 is a schematic diagram of the structure of another key assembly 11 provided in an embodiment of the present application. Fig. 9 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.10As 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.

[0080] It is easy to obtain that when force F1a, force F2, and feedback force F3a exist simultaneously in the key assembly, the force F1, force F2, and force F3 acting on the pressure detection unit 16 are superimposed to obtain pressure F0. That is:

[0081] Force F1, force F2, force F3, and pressure F0 are all vectors.

[0082] Since the direction of force F3 is opposite to the direction of force F1, force F2, and pressure F0, the magnitude of pressure F0 is:

[0083]

[0084] The key feedback unit driving method is applied to the processing unit 12 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, a second pressure threshold and a third pressure threshold.

[0085] The first pressure threshold is a usage trigger threshold. Specifically, the first pressure threshold 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 based on the pressure information, the preset operation is performed. 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 based on the pressure information, the operation of increasing the volume is performed. Alternatively, 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 based on the pressure information, the operation of locking the screen is performed.

[0086] The second pressure threshold is a stop-use trigger threshold. Specifically, the second pressure threshold 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 based on the pressure information, the preset operation is stopped. 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 based on the pressure information, the operation of increasing the volume is stopped.

[0087] The third pressure threshold is a non-pressing threshold. Specifically, the third pressure threshold 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 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 been fully restored. When the processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold based on the pressure information, it is determined that the user has not applied force F1a to the deformable component 14.

[0088] The key feedback unit driving method provided in the embodiment of the present application is explained in detail below.

[0089] The key feedback unit driving method includes the following steps S110 and S210.

[0090] S110, when it is determined based on the pressure information that the pressure F0 increases to be greater than or equal to the first pressure threshold, the processing unit 12 executes a preset operation and outputs a first signal to the key feedback unit 18 within a first preset time period to drive the key feedback unit 18 to generate a first feedback force F31 acting on the deformation component 14.

[0091] S210, when it is determined based on the pressure information that the magnitude of the pressure F0 is reduced to less than or equal to the second pressure threshold, the processing unit 12 stops executing the preset operation and outputs a second signal to the key feedback unit 18 within a third preset time period to drive the key feedback unit 18 to generate a third feedback force F33 acting on the deformation component 14.

[0092] If in the above steps S110 and S210, the processing unit 12 does not output the first signal and the second signal to the key feedback unit 18, that is, the processing unit 12 does not drive the key feedback unit 18 to work, in this case, the first feedback force F31 and the third feedback force F33 are always 0, then the pressure information can be as follows Fig.11If the processing unit 12 outputs the first signal and the second signal to the key feedback unit 18 according to the above steps S110 and S210, that is, the processing unit 12 drives the key feedback unit 18 to work, in this case, the first feedback force F31 and the third feedback force F33 are not 0, then the pressure information can be as follows Fig.12 For ease of viewing, Fig.13 Shows Fig.12 The enlarged view of position A1 in the figure, Fig.14 Shows Fig.12 Enlarged view of position A2 in the middle.

[0093] 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.11 and Fig.12 As shown, it is a function curve of the magnitude of the pressure F0 with respect to time T. 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.

[0094] Fig.11 and Fig.12 The figure shows the complete change process of the pressure F0 of the deformation component 14 on the pressure detection unit 16 over time when the user uses the key assembly 11. The change process of the pressure F0 can be divided into the following three stages.

[0095] 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 assembly 11). In this process, if the processing unit 12 does not output the first signal to the key feedback unit 18, i.e., the first feedback force F31 is 0, then Fig.11 As shown, although the magnitude of the pressure F0 may fluctuate slightly, its overall change trend is gradually increasing. In this process, when the magnitude of the pressure F0 increases to be greater than or equal to the first pressure threshold, that is, 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.

[0096] If the processing unit 12 outputs the first signal to the key feedback unit 18, that is, the first feedback force F31 is not zero, then Fig.12 and Fig.13As shown, when the magnitude of the pressure F0 increases to be greater than or equal to the first pressure threshold, that is, 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. At the same time, the processing unit 12 also outputs a first signal to the key feedback unit 18 to drive the key feedback unit 18 to generate a feedback force F3a acting on the deformation component 14. For ease of distinction, the feedback force F3a generated in this stage is referred to as the first feedback force F31. The first preset duration is the duration of the processing unit 12 outputting the first signal to the key feedback unit 18, that is, the working duration of the key feedback unit 18 in this stage. As shown Fig.13 As shown, when the processing unit 12 outputs the first signal, that is, at the moment t1, the magnitude of the first feedback force F31 begins to increase. As the magnitude of the first feedback force F31 increases, the pressure F0 decreases. When the processing unit 12 stops outputting the first signal, that is, at the moment t2, the magnitude of the first feedback force F31 begins to decrease. As the magnitude of the first feedback force F31 decreases, the pressure F0 increases. When the magnitude of the first feedback force F31 decreases to 0, the magnitude of the pressure F0 is no longer affected by the magnitude of the first feedback force F31. In this process, the first preset duration is the duration from the moment t1 to the moment t2.

[0097] Since the first feedback force F31 acts on the deformable component 14, and the user needs to directly or indirectly contact the deformable component 14 when using the key assembly 11, the first feedback force F31 generated in this stage can provide feedback on the user's behavior of using the key assembly 11. In other words, when the user feels the first feedback force F31, it can be known that the user's behavior of using the key assembly 11 is effective.

[0098] 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). In this process, if the processing unit 12 does not output the second signal to the key feedback unit 18, i.e., the third feedback force F33 is 0, then Fig.11 As shown, although the magnitude of the pressure F0 may fluctuate slightly, its overall trend is to gradually decrease. In this process, when the magnitude of the pressure F0 decreases to less than or equal to the second pressure threshold, that is, at time t3, 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.

[0099] If the processing unit 12 outputs the second signal to the key feedback unit 18, that is, the third feedback force F33 is not zero, then Fig.12 and Fig.14As shown, when the magnitude of the pressure F0 decreases to less than or equal to the second pressure threshold, that is, at time t3, the processing unit 12 determines that the user stops using the button assembly 11. At this time, the processing unit 12 stops executing the preset operation corresponding to the button assembly 11. At the same time, the processing unit 12 also outputs a second signal to the button feedback unit 18 to drive the button feedback unit 18 to generate a feedback force F3a acting on the deformation component 14. For ease of distinction, the feedback force F3a generated in this stage is referred to as the third feedback force F33. The third preset duration is the duration for which the processing unit 12 outputs the second signal to the button feedback unit 18, that is, the working duration of the button feedback unit 18 in this stage. As shown Fig.14 As shown, when the processing unit 12 outputs the second signal, that is, at the moment t3, the magnitude of the third feedback force F33 begins to increase. As the magnitude of the third feedback force F33 increases, the pressure F0 decreases. When the processing unit 12 stops outputting the second signal, that is, at the moment t4, the magnitude of the third feedback force F33 begins to decrease. As the magnitude of the third feedback force F33 decreases, the pressure F0 increases. When the magnitude of the third feedback force F33 decreases to 0, the magnitude of the pressure F0 is no longer affected by the magnitude of the third feedback force F33. In this process, the third preset duration is the duration from the moment t3 to the moment t4.

[0100] Since the third feedback force F33 acts on the deformable component 14, the user may also directly or indirectly contact the deformable component 14 when the user stops using the key assembly 11. Therefore, the third feedback force F33 generated in this stage can provide feedback to the user's behavior of stopping using the key assembly 11. In other words, when the user feels the third feedback force F33, it can be known that the user's behavior of stopping using the key assembly 11 is effective.

[0101] 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 no longer uses the button assembly 11 after using it). In this process, the feedback force F3a is also 0, so 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 it is always less than the third pressure threshold. Based on this, when the magnitude of the pressure F0 is less than the third pressure threshold, the processing unit 12 can determine that the user has not used the button assembly 11, that is, the user has not applied the force F1a to the deformation component 14. It can be understood that Fig.11 and Fig.12 , 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.

[0102] 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. Fig.15 As shown, the deformable component 14 may deform in the direction of the key feedback unit 18. In this case, since the deformation direction of the deformable component 14 is opposite to the direction of the feedback force F3a (including the first feedback force F31 and the third feedback force F33), when the key feedback unit 18 works to generate the feedback force F3a, the deformation of the deformable component 14 will offset part of the feedback force F3a, which will cause the feedback perceived by the user to become weaker, affecting the user experience. Based on this, the key feedback unit driving method provided in the embodiment of the present application also includes a process of calibrating the feedback force F3a.

[0103] According to the above description, the feedback force F3a during the use of the key assembly 11 includes a first feedback force F31 and a third feedback force F33. The following describes the calibration process of the first feedback force F31 and the calibration process of the third feedback force F33 respectively.

[0104] 1. Calibration process of the first feedback force F31.

[0105] Fig.16 : is a flow chart of a key feedback unit driving method provided in an embodiment of the present application. Fig.16 As shown, in order to calibrate the first feedback force F31, the key feedback unit driving method further includes the following steps S120 and S130.

[0106] S120, after a first preset time period, the processing unit 12 determines a first feedback force value according to the pressure information.

[0107] In the embodiment of the present application, the first preset duration refers to the duration of outputting the first signal to the key feedback unit 18 when the processing unit 12 determines, based on the pressure information, that the pressure F0 increases to be greater than or equal to the first pressure threshold. Fig.12 and Fig.13 In the illustrated embodiment, the first preset duration refers to the duration from time t1 to time t2.

[0108] The first feedback force value refers to the magnitude of the first feedback force F31 acting on the deformable component 14. In other words, the first feedback force value refers to the maximum value of the first feedback force F31 acting on the deformable component 14 within the first preset time period. Fig.12 and Fig.13In the embodiment shown, it is known from the above description that the magnitude of the first feedback force F31 increases from time t1 to time t2; and the magnitude of the first feedback force F31 decreases from time t2. In this case, the first feedback force value refers to the magnitude of the first feedback force F31 at time t2, that is, the magnitude of the first feedback force F31 at the end of the first preset time. In some other embodiments, considering that the magnitude of the first feedback force F31 will fluctuate during the process of the first signal driving the key feedback unit 18 to work, the first feedback force value may not be the magnitude of the first feedback force F31 at the end of the first preset time.

[0109] Based on this, in order to determine the first feedback force value, step S120 may specifically include the following steps S122 and S124.

[0110] S122, the processing unit 12 obtains a first pressure value and a second pressure value.

[0111] After receiving the pressure information, the processing unit 12 can obtain the first pressure value and the second pressure value according to the pressure information.

[0112] The first pressure value is the pressure F0 when the pressure F0 increases to be greater than or equal to the first pressure threshold, that is, the pressure F0 when the processing unit 12 outputs the first signal to the key feedback unit 18. Fig.13 In the illustrated embodiment, the first pressure value is the magnitude of the pressure F0 at time t1, that is, Z1.

[0113] The pressure detection unit 16 has an operating frequency and a minimum scale value when it is working. The operating frequency of the pressure detection unit 16 is the number of times the pressure detection unit 16 detects the size of the pressure F0 per second. For example, when the pressure detection unit 16 is working, it can detect the size of the pressure F0 50 times per second. In this case, the pressure detection unit 16 works once every 0.02 seconds. The minimum scale value of the pressure detection unit 16 refers to the minimum value that can be measured when the pressure detection unit 16 is working. It can be understood that, affected by the operating frequency and the minimum scale value of the pressure detection unit 16, the first pressure value is not necessarily equal to the first pressure threshold. For example, in some embodiments, if the pressure detection unit 16 detects the size of the pressure F0 once every 0.02 seconds, the first pressure threshold is 1.5N (Newton), and the minimum scale value of the pressure detection unit 16 is 0.1N. Then it is possible that the pressure detection unit 16 detects the size of the pressure F0 for the Yth time as 1.4N, and the size of the pressure F0 for the Y+1th time as 1.5N, then the first pressure value is equal to the first pressure threshold equal to 1.5N. In other embodiments, if the pressure detection unit 16 detects the magnitude of the pressure F0 once every 0.02 seconds, the first pressure threshold is 1.5N (Newton), and the minimum graduation value of the pressure detection unit 16 is 0.1N. Then it is possible that the magnitude of the pressure F0 detected by the pressure detection unit 16 for the Yth time is 1.4N, and the magnitude of the pressure F0 detected for the Y+1th time is 1.6N. In this case, since 1.4N is less than 1.5N and 1.6N is greater than 1.5N, the first pressure value is 1.6N, which is greater than the first pressure threshold. In some other embodiments, if the pressure detection unit 16 detects the magnitude of the pressure F0 once every 0.02 seconds, the first pressure threshold is 1.55N (Newton), and the minimum graduation value of the pressure detection unit 16 is 0.1N. Then it is possible that the magnitude of the pressure F0 detected by the pressure detection unit 16 for the Yth time is 1.5N, and the magnitude of the pressure F0 detected for the Y+1th time is 1.6N. In this case, since 1.5N is less than 1.55N and 1.6N is greater than 1.55N, the first pressure value is 1.6N, which is greater than the first pressure threshold.

[0114] The second pressure value is the minimum value of the pressure F0 within the first preset time period, that is, the minimum value of the pressure F0 when the processing unit 12 outputs the first signal to the key feedback unit 18 in step S110. Fig.13 In the illustrated embodiment, the second pressure value is the magnitude of the pressure F0 at time t2, that is, Z2.

[0115] S124: The processing unit 12 subtracts the second pressure value from the first pressure value to obtain a first feedback force value.

[0116] Generally, the first preset duration is relatively short, for example, the first preset duration can be a duration of milliseconds. Therefore, in the first preset duration, the force F1a can be regarded as a constant value. In this case, the change in the magnitude of the pressure F0 is completely caused by the action of the first feedback force F31. Based on this, the processing unit 12 subtracts the second pressure value from the first pressure value to obtain the first feedback force value. Fig.13 In the implemented embodiment, the first feedback force value is It means that the first feedback force value is equal to Z1-Z2.

[0117] S130, if the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit 12 sets the waveform information of the first signal so that the magnitude of the first feedback force F31 corresponding to the first signal is equal to the first reference feedback force value.

[0118] The first reference feedback force value is a reference value of the first feedback force F31 preset in the processing unit 12, that is, the magnitude of the first feedback force F31 when the electronic device 10 leaves the factory. The first preset threshold is a pressure threshold preset in the processing unit 12. The waveform information of the first signal may be the frequency, amplitude, etc. of the first signal. The magnitude of the first feedback force F31 corresponding to the first signal refers to the magnitude of the first feedback force F31 generated by the key feedback unit 18 on the deformation component 14 when the processing unit 12 outputs the first signal to the key feedback unit 18.

[0119] After the processing unit 12 obtains the first feedback force value, it subtracts the first feedback force value from the first reference feedback force value. If the obtained difference is greater than the first preset threshold, it indicates that the magnitude error of the first feedback force F31 is large, that is, the first feedback force F31 is small. At this time, the processing unit 12 can adjust the waveform information of the first signal used to drive the key feedback unit 18, thereby changing the magnitude of the first feedback force F31 generated by the key feedback unit 18 on the deformable component 14 when the first signal drives the key feedback unit 18 to work. For example, in some embodiments, if the first reference feedback force value is 1.8N, the first feedback force value is 1.5N, and the first preset threshold is 0.2N. Then the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold. In this case, the processing unit 12 can increase the amplitude of the first signal so that when the first signal drives the key feedback unit 18 to work, the magnitude of the first feedback force F31 generated by the key feedback unit 18 on the deformable component 14 is 1.8N. In this way, when the user uses the key assembly 11 again, the magnitude of the first feedback force F31 generated when the user presses the key assembly 11 is 1.8N, thereby achieving calibration of the first feedback force F31.

[0120] In the embodiment of the present application, the processing unit 12 can drive the key feedback unit 18 to generate a first feedback force F31 acting on the deformable component 14 to provide feedback on the user's behavior of using the key assembly 11. In addition, the processing unit 12 can also determine the magnitude of the first feedback force F31, that is, the first feedback force value, according to the pressure information output by the pressure detection unit 16. When the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, that is, when the first feedback force value deviation is large, the processing unit 12 can also adjust the magnitude of the first feedback force F31 by setting the waveform information of the first signal, so that the magnitude of the first feedback force F31 is equal to the first reference feedback force value when the key feedback unit 18 works again. In this way, the key feedback unit driving method can detect and calibrate the magnitude of the first feedback force F31 generated when the key assembly 11 works, so that the difference between the first reference feedback force value and the magnitude of the first feedback force F31 is always maintained within the first preset threshold, that is, the magnitude of the first feedback force F31 remains substantially unchanged, thereby improving the user experience.

[0121] The specific implementation process of step S130 is described below.

[0122] (1) In some embodiments, when the processing unit 12 executes step S130, after the situation that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" occurs once, the processing unit 12 may directly execute the step of "the processing unit 12 sets the waveform information of the first signal".

[0123] In other embodiments, to reduce misoperation, when the processing unit 12 executes step S130, the processing unit 12 may also execute the step of "the processing unit 12 sets the waveform information of the first signal" after the number of occurrences of "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" reaches the first preset number of times. This embodiment is described in detail below.

[0124] In this embodiment, the processing unit 12 is further provided with a variable value M for counting. M is used to count the number of occurrences of the situation that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value". M can be implemented by a virtual counter in the processing unit 12, etc.

[0125] Based on this, before step S130, the following step S101 is also included: the processing unit 12 sets M=0. That is, before the first execution of step S130, the processing unit 12 can set M to 0. That is, when the electronic device 10 leaves the factory, the initial value of M is 0.

[0126] Based on this, step S130 may specifically include the following steps S1312 to S1318.

[0127] S1312: If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, the processing unit 12 sets M=M+1.

[0128] Specifically, each time the user uses the button assembly 11, the processing unit 12 can obtain a first feedback force value by executing step S120, and use it in step S1312 to determine the magnitude relationship between the "difference between the first reference feedback force value and the first feedback force value" and the "first preset threshold value". Among them, every time the situation "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" occurs once, M can be accumulated and added by 1. Since the initial value of M is 0, M represents the number of times the situation "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" occurs.

[0129] S1314, if M is greater than or equal to the first preset value, the processing unit 12 sets the waveform information of the first signal and sets M=0.

[0130] S1316, if M is less than the first preset value, the processing unit 12 re-executes step S120.

[0131] The first preset value is an integer value preset in the processing unit 12. For example, the first preset value may be 3, 5 or 8, which is not limited herein.

[0132] In this embodiment, if M is less than the first preset value, that is, the number of times that "the difference between the first baseline feedback force value and the first feedback force value is greater than the first preset threshold value" occurs does not reach the number of times represented by the first preset value, the processing unit 12 re-executes step S120 and S1312 located after step S120 until M is greater than or equal to the first preset value.

[0133] When M is greater than or equal to the first preset value, it indicates that the number of occurrences of "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" reaches the number of times represented by the first preset value, and at this time, the processing unit 12 can execute the step of "the processing unit 12 sets the waveform information of the first signal". At the same time, the processing unit 12 also sets M equal to 0, so that when the first feedback force F31 is calibrated next time, the initial value of M is 0.

[0134] S1318 , if the difference between the first reference feedback force value and the first feedback force value is less than or equal to the first preset threshold, the processing unit 12 sets M=0.

[0135] As can be seen from the above description, in this embodiment, step S120 and step S1312 after step S120 need to be repeatedly executed multiple times. In the process of multiple repetitions, the situation of "the difference between the first reference feedback force value and the first feedback force value is less than or equal to the first preset threshold value" may occur. When the situation of "the difference between the first reference feedback force value and the first feedback force value is less than or equal to the first preset threshold value" occurs, it indicates that there is an error in the determination process of the first feedback force value. In this case, the processing unit 12 sets M equal to 0, that is, M is reset to zero. That is to say, in this embodiment, the first feedback force F31 will be calibrated only when the number of consecutive occurrences of "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value" reaches the first preset number. In this way, it is possible to avoid calibrating the first feedback force F31 when the obtained first feedback force value has an error, saving the power of the electronic device 10.

[0136] (2) In some embodiments, when the processing unit 12 executes step S130, after determining that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value", it is necessary to first determine that the electronic device 10 is in a horizontally stationary state, and then execute the step of "the processing unit 12 sets the waveform information of the first signal". In this case, step S130 may include the following steps S1322 and S1324.

[0137] S1322: If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, the processing unit 12 obtains a posture parameter of the electronic device 10.

[0138] The processing unit 12 can obtain the posture parameter of the electronic device 10 through at least one of the acceleration sensor 180E and the gyroscope 180B. When the acceleration sensor 180E is working, it can output the acceleration parameter of the electronic device 10 to the processing unit 12. When the gyroscope 180B is working, it can output the angular velocity parameter of the electronic device 10 to the processing unit 12. Based on this, the posture parameter of the electronic device 10 can be the acceleration parameter and the angular velocity parameter of the electronic device 10.

[0139] S1324: 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 sets the waveform information of the first signal.

[0140] 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.

[0141] After the processing unit 12 determines that the electronic device 10 is in a horizontally stationary state, the step of “the processing unit 12 sets the waveform information of the first signal” is executed, which will not be described in detail.

[0142] (3) In some embodiments, when the processing unit 12 executes step S130, after determining that the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value, it is necessary to first determine that the key assembly 11 is not pressed, and then execute the step of "the processing unit 12 sets the waveform information of the first signal". In this case, step S130 may be: if the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value, the processing unit 12 sets the waveform information of the first signal after determining that the magnitude of the pressure F0 is less than the third pressure threshold value according to the pressure information.

[0143] The button assembly 11 is in a state of not being pressed, which means that the user has not applied force F1a to the deformable component 14. As mentioned above, the third pressure threshold is a non-pressed threshold. When the processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold based on the pressure information, it is determined that the user has not applied force F1a to the deformable component 14. In this way, the processing unit 12 can determine that the button assembly 11 is in a state of not being pressed when it is determined that the magnitude of the pressure F0 is less than the third pressure threshold based on the pressure information. In this case, the processing unit 12 executes the step of "the processing unit 12 sets the waveform information of the first signal".

[0144] (4) In some embodiments, when the processing unit 12 executes step S130, after determining that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value", it is also necessary to first determine that when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is in a non-pressed state, the magnitude deviation of the feedback force F3a generated by the key feedback unit 18 driven by the first signal is large, and then execute the step of "the processing unit 12 sets the waveform information of the first signal". In this case, step S130 may include the following steps S1342 to S1348.

[0145] S1342: If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, the processing unit 12 obtains a posture parameter of the electronic device 10.

[0146] Step S1342 is the same as the above-mentioned step S1322 and will not be repeated here.

[0147] S1344, 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 outputs a first signal to the key feedback unit 18 within a second preset time length after determining according to the pressure information that the pressure F0 is less than the third pressure threshold, so as to drive the key feedback unit 18 to generate a second feedback force F32 acting on the deformation component 14.

[0148] The processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold value according to the pressure information, which indicates that the key component 11 is in a state of not being pressed. That is to say, if the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value, the processing unit 12 outputs the first signal to the key feedback unit 18 within the second preset time length after determining that the electronic device 10 is in a horizontally stationary state and the key component 11 is in a state of not being pressed. In the embodiment of the present application, the duration of the second preset time length is the same as the duration of the first preset time length. The second preset time length is different from the first preset time length in that: the first preset time length refers to the duration of outputting the first signal to the key feedback unit 18 when the processing unit 12 determines that the magnitude of the pressure F0 increases to be greater than or equal to the first pressure threshold value according to the pressure information; the second preset time length refers to the duration of outputting the first signal to the key feedback unit 18 when the processing unit 12 determines that the electronic device 10 is in a horizontally stationary state and the key component 11 is in a state of not being pressed.

[0149] For the sake of distinction, in step S1344, i.e., when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is not pressed, the first signal drives the key feedback unit 18 to generate a feedback force F3a acting on the deformation component 14, which is called the second feedback force F32.

[0150] Fig.17 is a schematic diagram of another type of pressure information provided in an embodiment of the present application. Fig.18 yes Fig.17 Enlarged view of position A3 in the middle. Fig.17 and Fig.18 FIG. 4 shows the pressure information in the process of generating the second feedback force F32 when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is in a non-pressed state. Fig.17 and Fig.18As shown, at time t5, the processing unit 12 outputs a first signal to the key feedback unit 18 to drive the key feedback unit 18 to generate a second feedback force F32 acting on the deformable component 14. At this time, the magnitude of the second feedback force F32 begins to increase. As the magnitude of the second feedback force F32 increases, the pressure F0 decreases. When the processing unit 12 stops outputting the first signal, that is, at time t6, the magnitude of the second feedback force F32 begins to decrease. As the magnitude of the second feedback force F32 decreases, the pressure F0 increases. In this process, the second preset duration is the duration from time t5 to time t6.

[0151] S1346: The processing unit 12 determines a second feedback force value according to the pressure information.

[0152] The second feedback force value refers to the magnitude of the second feedback force F32 acting on the deformable component 14. In other words, the second feedback force value refers to the maximum value of the second feedback force F32 acting on the deformable component 14 within the second preset time period. Fig.17 and Fig.18 In the embodiment shown, as known from the above description, the magnitude of the second feedback force F32 increases from time t5 to time t6; and the magnitude of the second feedback force F32 decreases from time t6. In this case, the second feedback force value refers to the magnitude of the second feedback force F32 at time t6, that is, the magnitude of the second feedback force F32 at the end of the second preset time length.

[0153] Based on this, in order to determine the second feedback force value, step S1346 may specifically include the following steps S13462 and S13464.

[0154] S13462, the processing unit 12 obtains a third pressure value and a fourth pressure value.

[0155] The processing unit 12 can obtain the third pressure value and the fourth pressure value according to the pressure information. The third pressure value is the value of the pressure F0 when the value of the pressure F0 is always less than the third pressure threshold. Fig.18 In the illustrated embodiment, the third pressure value is Z5.

[0156] Understandably, in Fig.18 In the illustrated embodiment, when the magnitude of the pressure F0 is always less than the third pressure threshold, the magnitude of the pressure F0 is fixed. In other embodiments, if the magnitude of the pressure F0 is always less than the third pressure threshold, and the magnitude of the pressure F0 fluctuates slightly, the processing unit 12 may use the magnitude of the pressure F0 at the start time of the second preset duration as the third pressure value.

[0157] The fourth pressure value is the minimum value of the pressure F0 within the second preset time period, that is, the minimum value of the pressure F0 when the processing unit 12 outputs the first signal to the key feedback unit 18 in step S1344. Fig.18 In the illustrated embodiment, the fourth pressure value is the magnitude of the pressure F0 at time t6, ie, Z6.

[0158] S13464: The processing unit 12 subtracts the fourth pressure value from the third pressure value to obtain a second feedback force value.

[0159] exist Fig.18 In the embodiment shown, the second feedback force value is Indicates that the second feedback force value is equal to Z5-Z6.

[0160] S1348: If the difference between the first reference feedback force value and the second feedback force value is greater than the first preset threshold, the processing unit 12 sets the waveform information of the first signal.

[0161] After the processing unit 12 obtains the second feedback force value, it subtracts the second feedback force value from the first reference feedback force value. If the obtained difference is greater than the first preset threshold value, it indicates that when the electronic device 10 is in a horizontally stationary state and the button assembly 11 is not pressed, the magnitude deviation of the second feedback force F32 is large, that is, the second feedback force F32 is small. At this time, the processing unit 12 executes the step of "the processing unit 12 sets the waveform information of the first signal", thereby realizing the calibration of the first feedback force F31.

[0162] In this embodiment, if the difference between the first reference feedback force value and the second feedback force value is less than or equal to the first preset threshold, the processing unit 12 may re-execute step S120 and subsequent steps without setting M equal to 0. In other words, after the user uses the button assembly 11 next time, step S120 and subsequent steps are executed again.

[0163] The calibration process of the first feedback force F31 is explained in detail below with reference to the accompanying drawings.

[0164] Fig.19 FIG. 1 is a flow chart of another method for driving a key feedback unit provided in an embodiment of the present application. Fig.19 As shown, in a specific embodiment, in order to calibrate the first feedback force F31, the key feedback unit driving method includes the following steps S1 to S14.

[0165] S1, when the electronic device 10 leaves the factory, a first reference feedback force value is set, and M is set to be equal to 0.

[0166] The first reference feedback force value is a reference value of the first feedback force F31 preset in the processing unit 12. Generally, the magnitude of the first feedback force F31 can be set to the first reference feedback force value when the electronic device 10 leaves the factory. The first reference feedback force value can be preset in the processing unit 12 by the staff.

[0167] S2, the electronic device 10 works normally, and the user uses the key assembly 11. When the pressure F0 increases to be greater than or equal to the first pressure threshold, the processing unit 12 drives the key feedback unit 18 to generate a first feedback force F31.

[0168] When the electronic device 10 is in a normal working state, the user can use the button assembly 11 to control the electronic device 10. When the user uses the button assembly 11, the processing unit 12 can receive pressure information and determine the magnitude of the pressure F0 according to the pressure information. When the processing unit 12 determines that the magnitude of the pressure F0 increases to be greater than or equal to the first pressure threshold according to the pressure information, the processing unit 12 performs a preset operation and outputs a first signal to the button feedback unit 18 within a first preset time length to drive the button feedback unit 18 to generate a first feedback force F31 acting on the deformation component 14.

[0169] S3: Determine a first feedback force value according to the pressure information.

[0170] The first feedback force value refers to the magnitude of the first feedback force F31 acting on the deformable component 14. As described above, the processing unit 12 outputs a first signal to the key feedback unit 18 within the first preset time length to drive the key feedback unit 18 to generate the first feedback force F31 acting on the deformable component 14. In this case, the processing unit 12 can determine the first feedback force value according to the pressure information after the first preset time length.

[0171] When the processing unit 12 determines the first feedback force value, the first pressure value and the second pressure value can be obtained respectively. The first pressure value is the size of the pressure F0 when the size of the pressure F0 increases to be greater than or equal to the first pressure threshold, that is, the size of the pressure F0 when the processing unit 12 outputs the first signal to the key feedback unit 18. The second pressure value is the minimum value of the size of the pressure F0 within the first preset time length. The processing unit 12 subtracts the second pressure value from the first pressure value to obtain the first feedback force value.

[0172] S4, determining whether a difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold.

[0173] The processing unit 12 subtracts the first feedback force value from the first reference feedback force value and determines whether the difference is greater than a first preset threshold value. If the determination result of step S4 is yes, step S5 is executed; if the determination result of step S4 is no, step S6 is executed.

[0174] S5, let M=M+1.

[0175] If the judgment result of step S4 is yes, then M=M+1. That is, M represents the number of occurrences of the situation that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value".

[0176] Step S7 is executed after step S5.

[0177] S6, let M=0.

[0178] If the judgment result of step S4 is no, it indicates that the difference between the first reference feedback force value and the first feedback force value is less than or equal to the first preset threshold value. In this case, the processing unit 12 resets M to zero and recalculates the number of occurrences of the situation that "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold value".

[0179] After step S6, the process returns to step S2.

[0180] S7, determining whether M is greater than or equal to a first preset value.

[0181] The first preset value is an integer value preset in the processing unit 12. The processing unit 12 determines whether M is greater than or equal to the first preset value. If the determination result of step S7 is yes, step S8 is executed. If the determination result of step S7 is no, the process returns to step S2.

[0182] S8, determining whether the electronic device 10 is in a horizontally stationary state.

[0183] When M is greater than or equal to the first preset value, the processing unit 12 can determine 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 S8 is yes, step S9 is executed; when the electronic device 10 is not in a horizontally stationary state, that is, when the judgment result of step S8 is no, step S10 is executed.

[0184] S9, 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, 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, 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 S9 is yes, step S10 is executed; when the electronic device 10 is not pressed, that is, the judgment result of step S9 is no, step S11 is executed.

[0187] S10, waiting for a fourth preset time period.

[0188] The fourth preset time length is a time length preset in the electronic device 10. The fourth preset time length may be, for example, 3 minutes, 5 minutes or 10 minutes, which is not limited here.

[0189] After step S10, step S8 is executed again.

[0190] S11, driving the button feedback unit 18 to generate a second feedback force F32, and determining a second feedback force value according to the pressure information.

[0191] When the judgment results of step S8 and step S9 are both yes, that is, the electronic device 10 is in a horizontally stationary state and the button assembly 11 is in a non-pressed state, the processing unit 12 again outputs the first signal to the button feedback unit 18 to drive the button feedback unit 18 to generate a second feedback force F32 acting on the deformation component 14.

[0192] The second feedback force value refers to the magnitude of the second feedback force F32 acting on the deformation component 14. In this step, the duration of the first signal output by the processing unit 12 to the key feedback unit 18 is the second preset duration. The second preset duration is equal to the first preset duration to ensure that the difference between the second feedback force value and the first feedback force value is not caused by the different working durations of the key feedback unit 18.

[0193] When the processing unit 12 determines the second feedback force value, the third pressure value and the fourth pressure value can be obtained respectively. The third pressure value is the magnitude of the pressure F0 when the magnitude of the pressure F0 is always less than the third pressure threshold. The fourth pressure value is the minimum value of the magnitude of the pressure F0 within the second preset time length. The processing unit 12 subtracts the fourth pressure value from the third pressure value to obtain the second feedback force value.

[0194] S12, determining whether a difference between the first reference feedback force value and the second feedback force value is greater than a first preset threshold.

[0195] The processing unit 12 subtracts the second feedback force value from the first reference feedback force value and determines whether the difference is greater than a first preset threshold value. If the determination result of step S12 is yes, step S13 is executed; if the determination result of step S12 is no, step S14 is executed.

[0196] S13, setting the waveform information of the first signal so that the magnitude of the first feedback force F31 corresponding to the first signal is equal to the first reference feedback force value, and setting M equal to 0.

[0197] The processing unit 12 can change the magnitude of the first feedback force F31 generated by the key feedback unit 18 on the deformable component 14 when the first signal drives the key feedback unit 18 to work by adjusting the waveform information of the first signal used to drive the key feedback unit 18. After the processing unit 12 sets the waveform information of the first signal, when the first signal drives the key feedback unit 18 to work, the magnitude of the first feedback force F31 should be equal to the first reference feedback force value.

[0198] After setting the waveform information of the first signal, the processing unit 12 also sets M equal to 0, so as to re-count the number of occurrences of "the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold" next time.

[0199] After step S13, step S14 is executed.

[0200] S14, the electronic device 10 resumes normal operation.

[0201] The electronic device 10 operates normally, and the processing unit 12 may re-execute step S2 and subsequent steps.

[0202] 2. Calibration process of the third feedback force F33.

[0203] Fig. 20 FIG. 1 is a flowchart of another method for driving a key feedback unit provided in an embodiment of the present application. Fig. 20 As shown, in order to calibrate the third feedback force F33, the key feedback unit driving method further includes the following steps S220 and S230.

[0204] S220: After a third preset time period, the processing unit determines a third feedback force value according to the pressure information.

[0205] In the embodiment of the present application, the third preset duration refers to the duration of outputting the second signal to the key feedback unit 18 when the processing unit 12 determines, based on the pressure information, that the pressure F0 is reduced to be less than or equal to the second pressure threshold. Fig.12 and Fig.14In the illustrated embodiment, the third preset duration refers to the duration from time t3 to time t4.

[0206] The third feedback force value refers to the magnitude of the third feedback force F33 acting on the deformable component 14. In other words, the third feedback force value refers to the maximum value of the third feedback force F33 acting on the deformable component 14 within the third preset time period. Fig.12 and Fig.14 In the embodiment shown, it is known from the above description that the magnitude of the third feedback force F33 increases from time t3 to time t4; and the magnitude of the third feedback force F33 decreases from time t4. In this case, the third feedback force value refers to the magnitude of the third feedback force F33 at time t4, that is, the magnitude of the third feedback force F33 at the end of the third preset time. In some other embodiments, considering that the magnitude of the third feedback force F33 may fluctuate during the process of the second signal driving the key feedback unit 18 to work, the third feedback force value may not be the magnitude of the third feedback force F33 at the end of the third preset time.

[0207] Based on this, in order to determine the third feedback force value, step S120 may specifically include the following steps S222 and S224.

[0208] S222, the processing unit 12 obtains a fifth pressure value and a sixth pressure value.

[0209] After receiving the pressure information, the processing unit 12 can obtain the fifth pressure value and the sixth pressure value according to the pressure information.

[0210] The fifth pressure value is the pressure F0 when the pressure F0 decreases to less than or equal to the second pressure threshold, that is, the pressure F0 when the processing unit 12 outputs the second signal to the key feedback unit 18. Fig.14 In the illustrated embodiment, the fifth pressure value is the magnitude of the pressure F0 at time t3, ie, Z3.

[0211] The sixth pressure value is the minimum value of the pressure F0 within the third preset time period, that is, the minimum value of the pressure F0 when the processing unit 12 outputs the second signal to the key feedback unit 18 in step S120. Fig.14 In the illustrated embodiment, the sixth pressure value is the magnitude of the pressure F0 at time t4, ie, Z4.

[0212] S224: The processing unit 12 subtracts the sixth pressure value from the fifth pressure value to obtain a third feedback force value.

[0213] Generally, the third preset duration is relatively short, for example, the third preset duration can be a duration of milliseconds. Therefore, in the third preset duration, the force F1a can be regarded as a constant value. In this case, the change in the magnitude of the pressure F0 is completely caused by the action of the third feedback force F33. Based on this, the processing unit 12 subtracts the sixth pressure value from the fifth pressure value to obtain the third feedback force value. Fig.14 In the implemented embodiment, the third feedback force value is It means that the third feedback force value is equal to Z3-Z4.

[0214] S230, if the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit 12 sets the waveform information of the second signal so that the magnitude of the third feedback force F33 corresponding to the second signal is equal to the second reference feedback force value.

[0215] The second reference feedback force value is a reference value of the third feedback force F33 preset in the processing unit 12, that is, the magnitude of the third feedback force F33 when the electronic device 10 leaves the factory. The second preset threshold is a pressure threshold preset in the processing unit 12. The waveform information of the second signal may be the frequency, amplitude, etc. of the second signal. The magnitude of the third feedback force F33 corresponding to the second signal refers to the magnitude of the third feedback force F33 generated by the key feedback unit 18 on the deformation component 14 when the processing unit 12 outputs the second signal to the key feedback unit 18. In some embodiments, the second reference feedback force value may be equal to the first reference feedback force value, and the second preset threshold may be equal to the first preset threshold.

[0216] After the processing unit 12 obtains the third feedback force value, it subtracts the third feedback force value from the second baseline feedback force value. If the obtained difference is greater than the second preset threshold, it indicates that the magnitude error of the third feedback force F33 is large, that is, the third feedback force F33 is small. At this time, the processing unit 12 can adjust the waveform information of the second signal used to drive the key feedback unit 18, thereby changing the magnitude of the third feedback force F33 generated by the key feedback unit 18 on the deformation component 14 when the second signal drives the key feedback unit 18 to work.

[0217] In the embodiment of the present application, the processing unit 12 can drive the key feedback unit 18 to generate a third feedback force F33 acting on the deformation component 14 to provide feedback to the user's behavior of stopping using the key assembly 11. In addition, the processing unit 12 can also determine the magnitude of the third feedback force F33, that is, the third feedback force value, according to the pressure information output by the pressure detection unit 16. When the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, that is, when the third feedback force value deviation is large, the processing unit 12 can also adjust the magnitude of the third feedback force F33 by setting the waveform information of the second signal, so that the magnitude of the third feedback force F33 is equal to the second reference feedback force value when the key feedback unit 18 works again. In this way, the key feedback unit driving method can detect and calibrate the magnitude of the third feedback force F33 generated when the key assembly 11 works, so that the difference between the second reference feedback force value and the magnitude of the third feedback force F33 is always kept within the second preset threshold, that is, the magnitude of the third feedback force F33 remains basically unchanged, thereby improving the user experience.

[0218] The specific implementation process of step S230 is described below.

[0219] (1) In some embodiments, when the processing unit 12 executes step S230, after the situation that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value" occurs once, the processing unit 12 may directly execute the step of "the processing unit 12 sets the waveform information of the second signal".

[0220] In other embodiments, to reduce misoperation, when the processing unit 12 executes step S230, the processing unit 12 may also execute the step of "the processing unit 12 sets the waveform information of the second signal" after the number of occurrences of "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value" reaches the second preset number of times. This embodiment is described in detail below.

[0221] In this embodiment, the processing unit 12 is further provided with a variable value P for counting. P is used to count the number of occurrences of the situation that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value". P can be implemented by a virtual counter in the processing unit 12, etc.

[0222] Based on this, before step S230, the following step S201 is also included: the processing unit 12 sets P=0. That is, before step S230 is executed for the first time, the processing unit 12 can set P to 0. That is, when the electronic device 10 leaves the factory, the initial value of P is 0.

[0223] Based on this, step S230 may specifically include the following steps S2312 to S2318.

[0224] S2312: If the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit 12 sets P=P+1.

[0225] Specifically, each time the user uses the button assembly 11, the processing unit 12 can obtain a third feedback force value by executing step S220, and use it to determine the magnitude relationship between the "difference between the second reference feedback force value and the third feedback force value" and the "second preset threshold" in step S2312. Wherein, whenever the situation "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold" occurs once, P can be accumulated and added by 1. Since the initial value of P is 0, P represents the number of times the situation "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold" occurs.

[0226] S2314, if P is greater than or equal to the second preset value, the processing unit 12 sets the waveform information of the second signal and sets P=0.

[0227] S2316, if P is less than the second preset value, the processing unit 12 re-executes step S220.

[0228] The second preset value is an integer value preset in the processing unit 12. For example, the second preset value may be 3, 5 or 8, which is not limited herein.

[0229] In this embodiment, if P is less than the second preset value, that is, the number of times that "the difference between the second baseline feedback force value and the third feedback force value is greater than the second preset threshold value" occurs does not reach the number of times represented by the second preset value, the processing unit 12 re-executes step S220 and S2312 located after step S220 until P is greater than or equal to the second preset value.

[0230] When P is greater than or equal to the second preset value, it indicates that the number of occurrences of "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value" reaches the number of times represented by the second preset value, and at this time, the processing unit 12 can execute the step of "the processing unit 12 sets the waveform information of the second signal". At the same time, the processing unit 12 also sets P equal to 0, so that when the third feedback force F33 is calibrated next time, the initial value of P is 0.

[0231] S2318: If the difference between the second reference feedback force value and the third feedback force value is less than or equal to the second preset threshold, the processing unit 12 sets P=0.

[0232] As can be seen from the above description, in this embodiment, step S220 and step S2312 after step S220 need to be repeatedly executed multiple times. In the process of repeated execution, the situation of "the difference between the second reference feedback force value and the third feedback force value is less than or equal to the second preset threshold value" may occur. When the situation of "the difference between the second reference feedback force value and the third feedback force value is less than or equal to the second preset threshold value" occurs, it indicates that there is an error in the determination process of the third feedback force value. In this case, the processing unit 12 sets P equal to 0, that is, P is reset to zero. That is to say, in this embodiment, the third feedback force F33 will be calibrated only when the number of consecutive occurrences of "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value" reaches the second preset number. In this way, it is possible to avoid calibrating the third feedback force F33 when the obtained third feedback force value has an error, saving the power of the electronic device 10.

[0233] (2) In some embodiments, when the processing unit 12 executes step S230, after determining that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value", it is necessary to first determine that the electronic device 10 is in a horizontally stationary state, and then execute the step of "the processing unit 12 sets the waveform information of the second signal". In this case, step S230 may include the following steps S2322 and S2324.

[0234] S2322: If the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit 12 obtains the posture parameter of the electronic device 10.

[0235] S2324: 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 sets the waveform information of the second signal.

[0236] After the processing unit 12 determines that the electronic device 10 is in a horizontally stationary state, the step of “the processing unit 12 sets the waveform information of the second signal” is executed, which will not be described in detail.

[0237] (3) In some embodiments, when the processing unit 12 executes step S230, after determining that the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value, it is necessary to first determine that the key assembly 11 is not pressed, and then execute the step of "the processing unit 12 sets the waveform information of the second signal". In this case, step S230 may be: if the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value, the processing unit 12 sets the waveform information of the second signal after determining that the magnitude of the pressure F0 is less than the third pressure threshold value according to the pressure information.

[0238] The button assembly 11 is in a state of not being pressed, which means that the user has not applied force F1a to the deformable component 14. As mentioned above, the third pressure threshold is a non-pressed threshold. When the processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold based on the pressure information, it is determined that the user has not applied force F1a to the deformable component 14. In this way, the processing unit 12 can determine that the button assembly 11 is in a state of not being pressed when it is determined that the magnitude of the pressure F0 is less than the third pressure threshold based on the pressure information. In this case, the processing unit 12 executes the step of "the processing unit 12 sets the waveform information of the second signal".

[0239] (4) In some embodiments, when the processing unit 12 executes step S230, after determining that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value", it is also necessary to first determine that when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is in a non-pressed state, the magnitude deviation of the feedback force F3a generated by the key feedback unit 18 driven by the second signal is large, and then execute the step of "the processing unit 12 sets the waveform information of the second signal". In this case, step S230 may include the following steps S2342 to S2348.

[0240] S2342: If the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, the processing unit 12 obtains the posture parameter of the electronic device 10.

[0241] S2344, 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 outputs a second signal to the key feedback unit 18 within the fifth preset time length after determining according to the pressure information that the pressure F0 is less than the third pressure threshold, so as to drive the key feedback unit 18 to generate a fourth feedback force F34 acting on the deformation component 14.

[0242] The processing unit 12 determines that the magnitude of the pressure F0 is less than the third pressure threshold value according to the pressure information, which indicates that the key component 11 is in a state of not being pressed. That is to say, if the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value, the processing unit 12 outputs a second signal to the key feedback unit 18 within the fifth preset time length after determining that the electronic device 10 is in a horizontally stationary state and the key component 11 is in a state of not being pressed. In the embodiment of the present application, the duration of the fifth preset time length is the same as the duration of the third preset time length. The fifth preset time length is different from the third preset time length in that: the third preset time length refers to the duration of outputting the second signal to the key feedback unit 18 when the processing unit 12 determines that the magnitude of the pressure F0 is reduced to less than or equal to the second pressure threshold value according to the pressure information; the fifth preset time length refers to the duration of outputting the second signal to the key feedback unit 18 when the processing unit 12 determines that the electronic device 10 is in a horizontally stationary state and the key component 11 is in a state of not being pressed.

[0243] For ease of distinction, in step S2344, that is, when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is not pressed, the second signal drives the key feedback unit 18 to generate a feedback force F3a acting on the deformation component 14 is called the fourth feedback force F34.

[0244] Fig.21 is a schematic diagram of another type of pressure information provided in an embodiment of the present application. Fig. 22 yes Fig.21 Enlarged view of position A4 in the middle. Fig.21 and Fig. 22 FIG. 4 shows the pressure information in the process of generating the fourth feedback force F34 when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is in a non-pressed state. Fig.21 and Fig. 22 As shown, at time t7, the processing unit 12 outputs a second signal to the key feedback unit 18 to drive the key feedback unit 18 to generate a fourth feedback force F34 acting on the deformable component 14. At this time, the magnitude of the fourth feedback force F34 begins to increase. As the magnitude of the fourth feedback force F34 increases, the pressure F0 decreases. When the processing unit 12 stops outputting the second signal, that is, at time t8, the magnitude of the fourth feedback force F34 begins to decrease. As the magnitude of the fourth feedback force F34 decreases, the pressure F0 increases. In this process, the fifth preset duration is the duration from time t7 to time t8.

[0245] S2346: The processing unit 12 determines a fourth feedback force value according to the pressure information.

[0246] The fourth feedback force value refers to the magnitude of the fourth feedback force F34 acting on the deformable component 14. In other words, the fourth feedback force value refers to the maximum value of the fourth feedback force F34 acting on the deformable component 14 within the fifth preset time length. Fig.21 and Fig. 22 In the embodiment shown, as known from the above description, the magnitude of the fourth feedback force F34 increases from time t7 to time t8, and the magnitude of the fourth feedback force F34 decreases from time t8. In this case, the fourth feedback force value refers to the magnitude of the fourth feedback force F34 at time t8, that is, the magnitude of the fourth feedback force F34 at the end of the fifth preset time length.

[0247] Based on this, in order to determine the fourth feedback force value, step S2346 may specifically include the following steps S23462 and S23464.

[0248] S23462, the processing unit 12 obtains the seventh pressure value and the eighth pressure value.

[0249] The processing unit 12 can obtain the seventh pressure value and the eighth pressure value according to the pressure information. The seventh pressure value is the magnitude of the pressure F0 when the magnitude of the pressure F0 is always less than the third pressure threshold. Fig. 22 In the illustrated embodiment, the seventh pressure value is Z7.

[0250] Understandably, in Fig. 22 In the illustrated embodiment, when the magnitude of the pressure F0 is always less than the third pressure threshold, the magnitude of the pressure F0 is fixed. In other embodiments, if the magnitude of the pressure F0 is always less than the third pressure threshold, and the magnitude of the pressure F0 fluctuates slightly, the processing unit 12 may use the magnitude of the pressure F0 at the start time of the fifth preset duration as the seventh pressure value.

[0251] The eighth pressure value is the minimum value of the pressure F0 within the fifth preset time period, that is, the minimum value of the pressure F0 when the processing unit 12 outputs the second signal to the key feedback unit 18 in step S2344. Fig. 22 In the illustrated embodiment, the eighth pressure value is the magnitude of the pressure F0 at time t8, that is, Z8.

[0252] S23464: The processing unit 12 subtracts the eighth pressure value from the seventh pressure value to obtain a fourth feedback force value.

[0253] exist Fig. 22 In the embodiment shown, the fourth feedback force value is Indicates that the fourth feedback force value is equal to Z7-Z8.

[0254] S2348: If the difference between the second reference feedback force value and the fourth feedback force value is greater than the second preset threshold, the processing unit 12 sets the waveform information of the second signal.

[0255] After the processing unit 12 obtains the fourth feedback force value, it subtracts the fourth feedback force value from the second baseline feedback force value. If the obtained difference is greater than the second preset threshold value, it indicates that when the electronic device 10 is in a horizontally stationary state and the key assembly 11 is not pressed, the magnitude deviation of the fourth feedback force F34 is large, that is, the fourth feedback force F34 is small. At this time, the processing unit 12 executes the step of "the processing unit 12 sets the waveform information of the second signal", thereby realizing the calibration of the third feedback force F33.

[0256] In this embodiment, if the difference between the second reference feedback force value and the fourth feedback force value is less than or equal to the second preset threshold, the processing unit 12 may re-execute step S220 and subsequent steps without setting M equal to 0. In other words, after the user uses the button assembly 11 next time, step S220 and subsequent steps are executed again.

[0257] The calibration process of the third feedback force F33 is explained in detail below with reference to the accompanying drawings.

[0258] Fig.23 FIG. 1 is a flowchart of another method for driving a key feedback unit provided in an embodiment of the present application. Fig.23 As shown, in a specific embodiment, in order to calibrate the third feedback force F33, the key feedback unit driving method includes the following steps SA1 to SA14.

[0259] SA1, when the electronic device 10 leaves the factory, the second reference feedback force value is set, and P is set to be equal to 0.

[0260] The second reference feedback force value is a reference value of the third feedback force F33 preset in the processing unit 12. Generally, the magnitude of the third feedback force F33 can be set to the second reference feedback force value when the electronic device 10 leaves the factory. The second reference feedback force value can be preset in the processing unit 12 by the staff.

[0261] SA2, the electronic device 10 works normally, and the user uses the key assembly 11. When the pressure F0 decreases to be less than or equal to the second pressure threshold, the processing unit 12 drives the key feedback unit 18 to generate a third feedback force F33.

[0262] 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. When the processing unit 12 determines that the magnitude of the pressure F0 is reduced to less than or equal to the second pressure threshold according to the pressure information, the processing unit 12 stops executing the preset operation and outputs a second signal to the key feedback unit 18 within a third preset time length to drive the key feedback unit 18 to generate a third feedback force F33 acting on the deformation component 14.

[0263] SA3, determining a third feedback force value according to the pressure information.

[0264] The third feedback force value refers to the magnitude of the third feedback force F33 acting on the deformable component 14. As described above, the processing unit 12 outputs a second signal to the key feedback unit 18 within the third preset time length to drive the key feedback unit 18 to generate the third feedback force F33 acting on the deformable component 14. In this case, the processing unit 12 can determine the third feedback force value according to the pressure information after the third preset time length.

[0265] When the processing unit 12 determines the third feedback force value, the fifth pressure value and the sixth pressure value can be obtained respectively. The fifth pressure value is the size of the pressure F0 when the size of the pressure F0 is reduced to less than or equal to the second pressure threshold, that is, the size of the pressure F0 when the processing unit 12 outputs the second signal to the key feedback unit 18. The sixth pressure value is the minimum value of the size of the pressure F0 within the third preset time length. The processing unit 12 subtracts the sixth pressure value from the fifth pressure value to obtain the third feedback force value.

[0266] SA4: Determine whether the difference between the second reference feedback force value and the third feedback force value is greater than a second preset threshold.

[0267] The processing unit 12 subtracts the third feedback force value from the second reference feedback force value and determines whether the difference is greater than a second preset threshold. If the determination result of step SA4 is yes, step SA5 is executed; if the determination result of step SA4 is no, step SA6 is executed.

[0268] SA5, let P=P+1.

[0269] If the judgment result of step SA4 is yes, then P=P+1. That is, P represents the number of occurrences of the situation that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value".

[0270] After step SA5, step SA7 is executed.

[0271] SA6, let P=0.

[0272] If the judgment result of step SA4 is no, it indicates that the difference between the second reference feedback force value and the third feedback force value is less than or equal to the second preset threshold value. In this case, the processing unit 12 resets P to zero and recalculates the number of occurrences of the situation that "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold value".

[0273] After step SA6, the process returns to step SA2.

[0274] SA7, determine whether P is greater than or equal to a second preset value.

[0275] The second preset value is an integer value preset in the processing unit 12. The processing unit 12 determines whether P is greater than or equal to the second preset value. If the determination result of step SA7 is yes, step SA8 is executed. If the determination result of step SA7 is no, the process returns to step SA2.

[0276] SA8, determining whether the electronic device 10 is in a horizontally stationary state.

[0277] When P is greater than or equal to the second preset value, the processing unit 12 can determine 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 SA8 is yes, step SA9 is executed; when the electronic device 10 is not in a horizontally stationary state, that is, when the judgment result of step SA8 is no, step SA10 is executed.

[0278] SA9, determining whether the key assembly 11 is in a pressed state.

[0279] 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, 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, the processing unit 12 determines that the key assembly 11 is in a pressed state.

[0280] When the electronic device 10 is in a pressed state, that is, the judgment result of step SA9 is yes, step SA10 is executed; when the electronic device 10 is not pressed, that is, the judgment result of step SA9 is no, step SA11 is executed.

[0281] SA10, wait for a fourth preset time period.

[0282] After step SA10, step SA8 is executed again.

[0283] SA11, driving the key feedback unit 18 to generate a fourth feedback force F34, and determining a fourth feedback force value according to the pressure information.

[0284] When the judgment results of step SA8 and step SA9 are both yes, that is, the electronic device 10 is in a horizontally stationary state and the key component 11 is in a non-pressed state, the processing unit 12 again outputs a second signal to the key feedback unit 18 to drive the key feedback unit 18 to generate a fourth feedback force F34 acting on the deformation component 14.

[0285] The fourth feedback force value refers to the magnitude of the fourth feedback force F34 acting on the deformation component 14. In this step, the processing unit 12 outputs the second signal to the key feedback unit 18 for a fifth preset time period. The fifth preset time period is equal to the third preset time period to ensure that the difference between the fourth feedback force value and the third feedback force value is not caused by the different working time of the key feedback unit 18.

[0286] When the processing unit 12 determines the fourth feedback force value, the seventh pressure value and the eighth pressure value can be obtained respectively. The seventh pressure value is the magnitude of the pressure F0 when the magnitude of the pressure F0 is always less than the third pressure threshold. The eighth pressure value is the minimum value of the magnitude of the pressure F0 within the fifth preset time length. The processing unit 12 subtracts the eighth pressure value from the seventh pressure value to obtain the fourth feedback force value.

[0287] SA12, determining whether the difference between the second reference feedback force value and the fourth feedback force value is greater than a second preset threshold.

[0288] The processing unit 12 subtracts the fourth feedback force value from the second reference feedback force value and determines whether the difference is greater than a second preset threshold. If the determination result of step SA12 is yes, step SA13 is executed; if the determination result of step SA12 is no, step SA14 is executed.

[0289] SA13, setting the waveform information of the second signal so that the magnitude of the third feedback force F33 corresponding to the second signal is equal to the second reference feedback force value, and setting P equal to 0.

[0290] The processing unit 12 can change the magnitude of the third feedback force F33 generated by the key feedback unit 18 on the deformable component 14 when the second signal drives the key feedback unit 18 to work by adjusting the waveform information of the second signal used to drive the key feedback unit 18. After the processing unit 12 sets the waveform information of the second signal, when the second signal drives the key feedback unit 18 to work, the magnitude of the third feedback force F33 should be equal to the second reference feedback force value.

[0291] After setting the waveform information of the second signal, the processing unit 12 also sets P to 0, so as to re-count the number of occurrences of "the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold" next time.

[0292] After step SA13, step SA14 is executed.

[0293] SA14, the electronic device 10 resumes normal operation.

[0294] The electronic device 10 operates normally, and the processing unit 12 may re-execute step SA2 and subsequent steps.

[0295] In an embodiment of the present application, parameters such as the first pressure threshold, the second pressure threshold, the third pressure threshold, the first preset time length, the second preset time length, the third preset time length, the fourth preset time length, the fifth preset time length, the first baseline feedback force value, the first preset threshold, the second baseline feedback force value, the second preset threshold, the first preset value, the second preset value can all be set by the staff based on experience or needs, and there is no limitation on this.

[0296] The embodiments of the present application have at least the following beneficial effects:

[0297] When the user uses the key assembly 11, the processing unit 12 can drive the key feedback unit 18 to generate a first feedback force F31 acting on the deformable component 14 to provide feedback on the user's behavior of using the key assembly 11. In addition, the processing unit 12 can also determine the magnitude of the first feedback force F31, that is, the first feedback force value, according to the pressure information output by the pressure detection unit 16. When the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, that is, when the first feedback force value deviation is large, the processing unit 12 can also adjust the magnitude of the first feedback force F31 by setting the waveform information of the first signal, so that the magnitude of the first feedback force F31 is equal to the first reference feedback force value when the key feedback unit 18 works again. In this way, the key feedback unit driving method can detect and calibrate the magnitude of the first feedback force F31 generated when the key assembly 11 works, so that the difference between the first reference feedback force value and the magnitude of the first feedback force F31 is always maintained within the first preset threshold, that is, the magnitude of the first feedback force F31 remains substantially unchanged, thereby improving the user experience.

[0298] When the user stops using the key assembly 11, the processing unit 12 can drive the key feedback unit 18 to generate a third feedback force F33 acting on the deformable component 14 to provide feedback on the user's behavior of stopping using the key assembly 11. In addition, the processing unit 12 can also determine the magnitude of the third feedback force F33, that is, the third feedback force value, according to the pressure information output by the pressure detection unit 16. When the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, that is, when the third feedback force value deviation is large, the processing unit 12 can also adjust the magnitude of the third feedback force F33 by setting the waveform information of the second signal, so that the magnitude of the third feedback force F33 is equal to the second reference feedback force value when the key feedback unit 18 works again. In this way, the key feedback unit driving method can detect and calibrate the magnitude of the third feedback force F33 generated when the key assembly 11 is working, so that the difference between the second reference feedback force value and the magnitude of the third feedback force F33 is always kept within the second preset threshold, that is, the magnitude of the third feedback force F33 remains basically unchanged, thereby improving the user experience.

[0299] The embodiment of the present application also provides a button assembly 11. The button assembly 11 includes a processing unit 12, a deformation component 14, a pressure detection unit 16, and a button feedback unit 18. Among them, the pressure detection unit 16 and the button feedback unit 18 are located on the same side of the deformation component 14. The pressure detection unit 16 is connected to the input end of the processing unit 12, and the output end of the processing unit 12 is connected to the button feedback unit 18. 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 pressure of the deformation component 14 on the pressure detection unit 16. The processing unit 12 is used to drive the button feedback unit 18. When working, the processing unit 12 executes the button feedback unit 18 driving method in any of the above embodiments.

[0300] 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.

[0301] The embodiment of the present application further provides an electronic device 10, comprising the key assembly 11 as described above.

[0302] 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 key feedback unit driving method, applied to electronic equipment, characterized in that: The electronic device comprises: a deformation component, a pressure detection unit, a key feedback unit and a processing unit, wherein 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, and the key feedback unit is used to provide feedback force to the deformation component; The method comprises: When it is determined according to the pressure information that the magnitude of the pressure increases to be greater than or equal to a first pressure threshold, a first signal is output to the key feedback unit within a first preset time period to drive the key feedback unit to generate a first feedback force acting on the deformation component, wherein the direction of the first feedback force is opposite to the direction of the pressure; After the first preset time, determining a first feedback force value according to the pressure information, the first feedback force value being the magnitude of the first feedback force acting on the deformable component; if the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, setting the waveform information of the first signal so that the magnitude of the first feedback force corresponding to the first signal is equal to the first reference feedback force value; Wherein, determining the first feedback force value according to the pressure information includes: Obtain a first pressure value and a second pressure value, wherein the first pressure value is the pressure value when the pressure value increases to be greater than or equal to the first pressure threshold, and the second pressure value is the minimum value of the pressure value within the first preset time period; subtract the second pressure value from the first pressure value to obtain the first feedback force value.

2. The method according to claim 1, characterized in that If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, before setting the waveform information of the first signal, the method further includes: Let M = 0; If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, setting the waveform information of the first signal includes: If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, then M=M+1; If the M is greater than or equal to a first preset value, the waveform information of the first signal is set, and M=0.

3. The method according to claim 2, characterized in that If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, then M=M+1, the method further includes: If the M is less than the first preset value, the step of determining the first feedback force value according to the pressure information after the first preset time period is performed again.

4. The method according to claim 2, characterized in that The method further comprises: If the difference between the first reference feedback force value and the first feedback force value is less than or equal to the first preset threshold, M=0.

5. The method according to any one of claims 1 to 4, characterized in that: If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, setting the waveform information of the first signal includes: If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, obtaining the 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, the waveform information of the first signal is set.

6. The method according to any one of claims 1 to 4, characterized in that: If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, setting the waveform information of the first signal includes: If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, after determining according to the pressure information that the pressure is less than a third pressure threshold, the waveform information of the first signal is set.

7. The method according to any one of claims 1 to 4, characterized in that: If the difference between the first reference feedback force value and the first feedback force value is greater than a first preset threshold, setting the waveform information of the first signal includes: If the difference between the first reference feedback force value and the first feedback force value is greater than the first preset threshold, obtaining the 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 horizontal resting state, after determining according to the pressure information that the pressure is less than a third pressure threshold, outputting the first signal to the key feedback unit within a second preset time period to drive the key feedback unit to generate a second feedback force acting on the deformation component; determining a second feedback force value according to the pressure information, wherein the second feedback force value is a magnitude of the second feedback force acting on the deformable component; If the difference between the first reference feedback force value and the second feedback force value is greater than the first preset threshold, the waveform information of the first signal is set.

8. The method according to claim 7, characterized in that The determining the second feedback force value according to the pressure information includes: Acquire a third pressure value and a fourth pressure value, wherein the third pressure value is the pressure value when the pressure value is always less than the third pressure threshold, and the fourth pressure value is the minimum value of the pressure value within the second preset time period; The second feedback force value is obtained by subtracting the fourth pressure value from the third pressure value.

9. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When it is determined based on the pressure information that the pressure is reduced to less than or equal to a second pressure threshold, a second signal is output to the key feedback unit within a third preset time period to drive the key feedback unit to generate a third feedback force acting on the deformation component, and the direction of the third feedback force is opposite to the direction of the pressure.

10. The method according to claim 9, characterized in that The method further comprises: After the third preset time period, determining a third feedback force value according to the pressure information, the third feedback force value being the magnitude of the third feedback force acting on the deformable component; If the difference between the second reference feedback force value and the third feedback force value is greater than a second preset threshold, the waveform information of the second signal is set so that the magnitude of the third feedback force corresponding to the second signal is equal to the second reference feedback force value.

11. The method according to claim 10, characterized in that The determining the third feedback force value according to the pressure information includes: Acquire a fifth pressure value and a sixth pressure value, wherein the fifth pressure value is the pressure value when the pressure value decreases to be less than or equal to the second pressure threshold, and the sixth pressure value is the minimum value of the pressure value within the third preset time period; The third feedback force value is obtained by subtracting the sixth pressure value from the fifth pressure value.

12. The method according to claim 10, characterized in that If the difference between the second reference feedback force value and the third feedback force value is greater than a second preset threshold, before setting the waveform information of the second signal, the method further includes: Let P = 0; If the difference between the second reference feedback force value and the third feedback force value is greater than a second preset threshold, setting the waveform information of the second signal includes: If the difference between the second reference feedback force value and the third feedback force value is greater than the second preset threshold, then P=P+1; If the P is greater than or equal to a second preset value, the waveform information of the second signal is set, and P=0.

13. A key assembly, characterized in that: It includes a deformation component, a pressure detection unit, a key feedback unit and a processing unit; The pressure detection unit and the key feedback unit are located on the same side of the deformable component, the pressure detection unit is connected to the input end of the processing unit, and the output end of the processing unit is connected to the key feedback unit; the pressure detection unit is used to detect the magnitude of the pressure applied by the deformable component and output pressure information corresponding to the magnitude of the pressure to the processing unit, and the key feedback unit is used to provide feedback force to the deformable component; When the processing unit is in operation, the method according to any one of claims 1 to 12 is executed.

14. An electronic device, characterized in that: Comprising the key assembly as described in claim 13.