Pressure detection method and device
By multiplexing capacitive sensors of electronic devices, the distance change of touch screen is calculated using the temperature compensation channel, and the detection of touch screen pressure is realized, solving the problem of high impedance detection cost in the prior art and reducing the detection cost And improve efficiency.
Patent Information
- Application Number
- CN202411579791.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, it is costly to detect the pressure of a user pressing the screen through impedance detection, and it is necessary to find a more economical detection method.
By multiplexing the capacitive sensor of the electronic device, the pre-stored measurement value and real-time measurement value are obtained using the temperature compensation channel, and the distance change between the touch screen and the flexible circuit board is calculated, thereby determining the pressure on the touch screen.
This method does not need to rely on impedance detection methods, which reduces the cost of pressure detection, and realizes pressure detection by multiplexing existing sensors, improving detection efficiency.
Smart Images

Figure CN119512400A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a pressure detection method and device. Background Art
[0002] Pressure touch technology applied to terminal screens has become one of the most important technological innovations in the field of terminal technology in recent years. This pressure touch technology means that the terminal performs different operations according to the different pressures applied by the user on the screen, so as to simplify user operations.
[0003] In the related art, the pressure of the user pressing the screen is usually detected by impedance detection, that is, the pressure of the user pressing the screen is determined by the change in the resistance of the pressure sensitive resistor. However, detecting the pressure of the user pressing the screen by impedance detection is costly. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a pressure detection method and device that can reduce the cost of pressure detection.
[0005] In a first aspect, an embodiment of the present application provides a pressure detection method, comprising:
[0006] Acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor of an electronic device, and the temperature compensation channel is disposed in a flexible circuit board of the electronic device;
[0007] Obtaining a second measurement value obtained by measuring the temperature compensation channel;
[0008] Determine a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value;
[0009] The pressure applied to the touch screen is determined based on the distance change.
[0010] In a second aspect, an embodiment of the present application provides a pressure detection device, including:
[0011] A first acquisition module, used to acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor of an electronic device, and the temperature compensation channel is provided in a flexible circuit board of the electronic device;
[0012] A second acquisition module, used for obtaining a second measurement value obtained by measuring the temperature compensation channel;
[0013] A first determination module, configured to determine a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value;
[0014] The second determination module is used to determine the pressure applied to the touch screen according to the distance change.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the pressure detection method provided in the embodiment of the present application are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the pressure detection method provided in the embodiment of the present application are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the pressure detection method provided in the embodiment of the present application.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the pressure detection method provided in the embodiment of the present application.
[0019] In the embodiment of the present application, a first measurement value of a pre-stored temperature compensation channel is obtained, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor of an electronic device, and the temperature compensation channel is arranged in a flexible circuit board of the electronic device; a second measurement value obtained by measuring the temperature compensation channel is obtained; based on the first measurement value and the second measurement value, a distance change from the touch screen of the electronic device to the flexible circuit board is determined; based on the distance change, the pressure on the touch screen is determined. In this way, there is no need to detect the pressure of the user pressing the touch screen by impedance detection, and the pressure of the user pressing the touch screen can be detected by reusing the capacitive sensor of the electronic device, which can reduce the cost of pressure detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of the structure of a capacitive sensor provided in an embodiment of the present application;
[0021] Figure 2 is a connection diagram of a capacitive sensor provided in an embodiment of the present application;
[0022] Figure 3 is a cross-sectional view of an electronic device provided with a capacitive sensor provided in an embodiment of the present application;
[0023] Figure 4 is a flow chart of a pressure detection method provided in an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a pressure detection process provided by an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of a pressure detection process in an underwater photography mode provided in an embodiment of the present application;
[0026] Figure 7 is a schematic diagram of the structure of a pressure detection device provided in an embodiment of the present application;
[0027] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0028] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] The pressure detection method and device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0032] The pressure detection method and device provided in the embodiments of the present application are applied to an electronic device, which includes a capacitive sensor, which includes a sensor body, a measurement channel and a temperature compensation channel. The portion of the measurement channel other than the sensing metal sheet and the temperature compensation channel are arranged in a flexible printed circuit (FPC), and the sensor body is connected to the sensing metal sheet of the measurement channel through the FPC.
[0033] The electronic device in the embodiment of the present application may be a terminal, or may be other devices other than a terminal. For example, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0034] The electronic device in the embodiment of the present application may be an electronic device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0035] A capacitive sensor is a sensor that measures the capacitance value to obtain the distance of a human body approaching. The measurement channel of a capacitive sensor is very sensitive to temperature. Usually, a temperature compensation channel that does not sense the human body approaching is required to obtain temperature information to compensate for the change in capacitance on the measurement channel caused by temperature changes. In order to sense the approach of a human body, the measurement channel needs to be connected to a sensing metal sheet at the end. The sensing metal sheet can use a metal middle frame antenna or an FPC antenna. The measurement channel and the temperature compensation channel work in different phases within a cycle in a time-sharing manner. Figure 1 As shown, Figure 1 Schematic diagram of the structure of the capacitive sensor provided in the embodiment of the present application.
[0036] The capacitive sensor 100 includes a sensor body 101, a measurement channel 102 and a temperature compensation channel 103, wherein the measurement channel 102 includes a first resistor R1, a first trace Trace1, a first inductor L1, a first capacitor C1 and a sensing metal sheet 1021, and the temperature compensation channel 103 includes a second resistor R2, a second trace Trace2, a second inductor L2 and a second capacitor C2. The measurement channel 102 and the temperature compensation channel 103 are completely identical except for the sensing metal sheet 1021. The sensing metal sheet can sense the approach of a human body (conductive material) because it is exposed or on the outside of the electronic device (not surrounded by the ground), while other parts (resistors, traces, inductors, capacitors) except the sensing metal sheet cannot sense the approach of a human body because they are surrounded by the ground.
[0037] Figure 2 is a connection diagram of a capacitive sensor provided in an embodiment of the present application, Figure 3 is a cross-sectional view of an electronic device provided with a capacitive sensor according to an embodiment of the present application. Figure 2 and Figure 3 In the embodiment, the sensor body 101 of the capacitive sensor is arranged in the main board 201, and the sensor body 101 is connected to the sub-board 203 through the flexible circuit board 202. The other side of the sub-board 203 is provided with the sensing metal sheet 1021 (i.e. Figure 2 and Figure 3 The flexible circuit board 202 is provided with a portion of the measurement channel 102 other than the sensing metal sheet 1021 and a temperature compensation channel 103. When the touch screen 205 of the electronic device is not pressed, the distance between the touch screen 205 and the flexible circuit board 202 is d1. When the touch screen 205 is pressed, the distance between the touch screen 205 and the flexible circuit board 202 changes to d2.
[0038] Figure 4 : is a flow chart of a pressure detection method provided in an embodiment of the present application. The pressure detection method may include:
[0039] Step 401: Acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor, and the temperature compensation channel is disposed in a flexible circuit board of an electronic device;
[0040] In some possible implementations of the embodiments of the present application, the first measurement value of the temperature compensation channel when the touch screen is not touched can be stored in a memory in advance, and when it is detected that the touch screen is touched, the first measurement value of the temperature compensation channel when the touch screen is not touched is read from the memory.
[0041] The embodiment of the present application does not limit the method used to detect whether the touch screen is touched, and any available method can be applied to the embodiment of the present application. The process of detecting whether the touch screen is touched can refer to the process of detecting whether the touch screen is touched in the related art.
[0042] Step 402: Acquire a second measurement value obtained by measuring the temperature compensation channel;
[0043] In some possible implementations of the embodiments of the present application, the measurement result of the temperature compensation channel when the touch screen is touched is the second measurement value.
[0044] When the touch screen of the electronic device is not touched, the touch screen cannot recognize the touch signal. When the touch screen of the electronic device is touched, the touch screen recognizes the touch signal. At this time, the measurement value of the temperature compensation channel before and after the touch screen is touched is obtained. The measurement value of the temperature compensation channel before the touch screen is touched is the first measurement value, and the maximum measurement value of the temperature compensation channel after the touch screen is touched is the second measurement value.
[0045] It can be understood that the first measurement value in the embodiment of the present application is the measurement value of the temperature compensation channel before the touch screen is touched, and the second measurement value is the measurement value of the temperature compensation channel after the touch screen is touched.
[0046] Step 403: determining a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value;
[0047] In some possible implementations of the embodiments of the present application, the capacitance in the temperature compensation channel will normally change with temperature. Considering that the touch screen is touched for a very short time, the capacitance change caused by temperature during the touch process can be ignored, and the capacitance change is only affected by the touch force. Based on this, the distance change can be derived according to the capacitance formula, the first measurement value and the second measurement value.
[0048] In some possible implementations of the embodiments of the present application, the capacitance formula is shown in the following formula (1):
[0049]
[0050] Wherein, in formula (1), C is the capacitance value, ε is the dielectric constant of the medium between the capacitor plates, S is the area directly opposite the capacitor plates, π is the circumference, k is the electrostatic force constant, and d is the distance between the capacitor plates.
[0051] In some possible implementations of the embodiments of the present application, the actual capacitance value and the measured value of the temperature compensation channel have a corresponding relationship as shown in the following formula (2):
[0052] C=αK (2)
[0053] In formula (2), C is the capacitance value, α is a constant, and K is the measured value.
[0054] According to formula (1) and formula (2), the distance between the capacitor plates can be derived as shown in formula (3):
[0055]
[0056] Then the distance change from the touch screen to the flexible circuit board is as shown in the following formula (4):
[0057]
[0058] In formula (4), Δd is the change in the distance from the touch screen to the flexible circuit board, ε is the dielectric constant of the medium between the capacitor plates, S is the area facing the capacitor plates, π is the circumference of a circle, k is the electrostatic force constant, α is a constant, K1 is the first measurement value, and K2 is the second measurement value.
[0059] For electronic devices, is a fixed constant, so the above formula (4) can be simplified to:
[0060]
[0061] In formula (5), That is to say, there is a corresponding relationship between the change in the distance from the touch screen to the flexible circuit board and the first measurement value and the second measurement as shown in formula (5).
[0062] Based on the above, step 403 in the embodiment of the present application may include: calculating the difference between the first measurement value and the second measurement value to obtain the first difference; calculating the product of the first measurement value and the second measurement value to obtain the first product; calculating the first ratio of the first difference and the first product; and determining the distance change according to the first ratio. Accordingly, determining the distance change according to the first ratio may include: determining the distance change corresponding to the first ratio according to the corresponding relationship between the distance change and the ratio; and determining the distance change corresponding to the first ratio as the distance change.
[0063] The ratio in the corresponding relationship between the distance variation and the ratio represents: the ratio of the difference between two measurement values of the temperature compensation channel before and after the touch screen is touched to the product of the two measurement values.
[0064] In some possible implementations of the embodiments of the present application, the difference between the second measurement value and the first measurement value may be calculated first, and when the difference is greater than a first threshold, the change in the distance from the touch screen to the flexible circuit board is determined based on the first measurement value and the second measurement value. Based on this, step 403 may include: when the difference between the second measurement value and the first measurement value is greater than the first threshold, determining the change in the distance from the touch screen to the flexible circuit board based on the first measurement value and the second measurement value.
[0065] Step 404: Determine the pressure applied to the touch screen according to the distance change.
[0066] In some possible implementations of the embodiments of the present application, step 104 may include: determining a first pressure corresponding to the distance change according to a correspondence between the distance change and the pressure; and determining the first pressure as the pressure exerted on the touch screen.
[0067] In some possible implementations of the embodiments of the present application, multiple groups of distance changes and the pressures corresponding to the multiple groups of distance changes can be recorded in advance through experiments or the like, and the multiple groups of distance changes and the pressures corresponding to the multiple groups of distance changes can be fitted to obtain the corresponding relationship between the distance changes and the pressures.
[0068] After the distance variation from the touch screen to the flexible circuit board is calculated in step 403, the first pressure corresponding to the distance variation is determined as the pressure on the touch screen according to the corresponding relationship between the distance variation and the pressure.
[0069] In the embodiment of the present application, a first measurement value of a pre-stored temperature compensation channel is obtained, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor, and the temperature compensation channel is arranged in a flexible circuit board of an electronic device; a second measurement value obtained by measuring the temperature compensation channel is obtained; based on the first measurement value and the second measurement value, a distance change from the touch screen of the electronic device to the flexible circuit board is determined; based on the distance change, the pressure on the touch screen is determined. In this way, there is no need to detect the pressure of the user pressing the touch screen by impedance detection, and the pressure of the user pressing the touch screen can be detected by reusing the capacitive sensor of the electronic device, which can reduce the cost of pressure detection.
[0070] In some possible implementations of the embodiments of the present application, since there is a corresponding relationship between the distance change and the pressure, there is also a corresponding relationship between the distance change and the ratio. Therefore, the corresponding relationship between the ratio and the pressure can be directly established in advance. After obtaining the first measurement value of the temperature compensation channel pre-stored when the touch screen is not touched and the second measurement value of the temperature compensation channel when the touch screen is touched, the difference between the first measurement value and the second measurement value and the product of the first measurement value and the second measurement value can be calculated, and then the ratio of the difference to the product is calculated. Then, according to the corresponding relationship between the ratio and the pressure, the pressure corresponding to the calculated ratio can be determined, and the pressure is the pressure applied to the touch screen when it is touched.
[0071] In some possible implementations of the embodiments of the present application, the pressure detection method provided in the embodiments of the present application may further include: executing an operation corresponding to the pressure exerted on the touch screen.
[0072] In some possible implementations of the embodiments of the present application, the touch screen is subjected to different pressures, and the corresponding operations are also different.
[0073] In some possible implementations of the embodiments of the present application, the operation corresponding to the pressure applied to the touch screen can be determined based on the correspondence between the pressure and the operation, and then the operation can be performed. The correspondence between the pressure and the operation can be set according to actual needs, for example, the operation corresponding to pressure 1 is a copy operation, the operation corresponding to pressure 2 is a paste operation, the operation corresponding to pressure 3 is a select all operation, and so on.
[0074] Figure 5 Schematic diagram of the pressure detection process provided by the embodiment of the present application. The pressure detection process includes the following steps:
[0075] Step 501: Determine whether the touch screen recognizes a touch signal, if yes, execute step 502, if no, end;
[0076] The embodiments of the present application do not limit the method used by the touch screen to recognize touch signals. Any available method can be applied to the embodiments of the present application. When the touch screen recognizes a touch signal, it indicates that the touch screen is pressed. When the touch screen does not recognize a touch signal, it indicates that the touch screen is not pressed.
[0077] Step 502: Obtaining the measurement value of the temperature compensation channel before and after the touch screen is pressed;
[0078] Step 503: Calculate the difference between the measured value of the temperature compensation channel after the touch screen is pressed and the measured value of the temperature compensation channel before the touch screen is pressed;
[0079] Step 504: determine whether the difference is greater than a first threshold, if yes, execute step 505, if no, end;
[0080] Step 505: determining a change in the distance between the touch screen and the flexible circuit board according to the measured values of the temperature compensation channel before and after the touch screen is pressed;
[0081] Step 506: Determine the pressure applied to the touch screen according to the distance change;
[0082] Step 507: Execute an operation corresponding to the pressure applied to the touch screen.
[0083] In some possible implementations of the embodiments of the present application, in underwater photography scenes, due to the influence of water fluctuations and underwater pressure, if the touch screen is detected to be touched and a corresponding action is performed, it is easy to cause a false touch. In order to avoid the occurrence of false touches, when the touch screen is detected to be touched, the pressure on the touch screen can be detected, and then a corresponding action can be performed to avoid the occurrence of false touches. Step 401 may include: when the electronic device is in underwater photography mode and the touch screen is detected to be touched, a first measurement value is obtained.
[0084] In some possible implementations of the embodiments of the present application, the camera of the electronic device may be configured with multiple photography modes, such as night scene mode, portrait mode, underwater photography mode, etc. The user may switch the photography mode of the camera through operation.
[0085] In some possible implementations of the embodiments of the present application, when taking underwater photos, the touch screen is subjected to different pressures, and the corresponding photography operations are also different. According to the correspondence between pressure and photography operation, the photography operation corresponding to the pressure on the touch screen can be determined, and then the photography operation is executed. Among them, the correspondence between pressure and photography operation can be set according to actual needs. For example, the photography operation corresponding to pressure 1 is continuous shooting, the photography operation corresponding to pressure 2 is starting autofocus, the operation corresponding to pressure 3 is starting delayed photography, and so on.
[0086] Figure 6 : is a schematic diagram of the pressure detection process in the underwater photography mode provided by an embodiment of the present application. The pressure detection process in the underwater photography mode includes the following steps:
[0087] Step 601: Determine whether to start the underwater photography mode, if yes, execute step 602, if no, end;
[0088] Step 602: Determine whether the touch screen recognizes a touch signal, if yes, execute step 603, if no, end;
[0089] The embodiments of the present application do not limit the method used by the touch screen to recognize touch signals. Any available method can be applied to the embodiments of the present application. When the touch screen recognizes a touch signal, it indicates that the touch screen is pressed. When the touch screen does not recognize a touch signal, it indicates that the touch screen is not pressed.
[0090] Step 603: Obtaining the measurement value of the temperature compensation channel before and after the touch screen is pressed;
[0091] Step 604: Calculate the difference between the measured value of the temperature compensation channel after the touch screen is pressed and the measured value of the temperature compensation channel before the touch screen is pressed;
[0092] Step 605: determine whether the difference is greater than a first threshold, if yes, execute step 606, if no, end;
[0093] Step 606: determining a change in the distance from the touch screen to the flexible circuit board according to the measured values of the temperature compensation channel before and after the touch screen is pressed;
[0094] Step 607: Determine the pressure applied to the touch screen according to the distance change;
[0095] Step 608: Execute a camera operation corresponding to the pressure applied to the touch screen.
[0096] In the embodiments of the present application, accidental touches during underwater photography can be avoided, thereby improving the interactive experience of the screen during underwater photography.
[0097] The pressure detection method provided in the embodiment of the present application can be executed by a pressure detection device. In the embodiment of the present application, the pressure detection device provided in the embodiment of the present application is described by taking the pressure detection method executed by the pressure detection device as an example.
[0098] Figure 7 700 is a schematic diagram of the structure of a pressure detection device provided in an embodiment of the present application. The pressure detection device 700 may include:
[0099] A first acquisition module 701 is used to acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in the capacitive sensor, and the temperature compensation channel is provided in a flexible circuit board of the electronic device;
[0100] A second acquisition module 702 is used to acquire a second measurement value obtained by measuring the temperature compensation channel;
[0101] A first determination module 703, configured to determine a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value;
[0102] The second determination module 704 is used to determine the pressure applied to the touch screen according to the distance variation.
[0103] In the embodiment of the present application, a first measurement value of a pre-stored temperature compensation channel is obtained, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor, and the temperature compensation channel is arranged in a flexible circuit board of an electronic device; a second measurement value obtained by measuring the temperature compensation channel is obtained; based on the first measurement value and the second measurement value, a distance change from the touch screen of the electronic device to the flexible circuit board is determined; based on the distance change, the pressure on the touch screen is determined. In this way, there is no need to detect the pressure of the user pressing the touch screen by impedance detection, and the pressure of the user pressing the touch screen can be detected by reusing the capacitive sensor of the electronic device, which can reduce the cost of pressure detection.
[0104] In some possible implementations of the embodiment of the present application, the second determining module 704 is specifically configured to:
[0105] Determine a first pressure corresponding to the distance change according to the corresponding relationship between the distance change and the pressure;
[0106] The first pressure is determined as the pressure exerted on the touch screen.
[0107] In some possible implementations of the embodiment of the present application, the first determining module 703 includes:
[0108] A first calculation submodule, used for calculating the difference between the first measurement value and the second measurement value to obtain a first difference;
[0109] A second calculation submodule, used to calculate the product of the first measurement value and the second measurement value to obtain a first product;
[0110] A third calculation submodule, used for calculating a first ratio of the first difference and the first product;
[0111] The determination submodule is used to determine the distance change according to the first ratio.
[0112] In some possible implementations of the embodiments of the present application, the determination submodule is specifically used for:
[0113] Determine the distance change corresponding to the first ratio according to the corresponding relationship between the distance change and the ratio;
[0114] The distance change amount corresponding to the first ratio is determined as the distance change amount.
[0115] In some possible implementations of the embodiments of the present application, the pressure detection device 700 provided in the embodiments of the present application may further include:
[0116] The execution module is used to execute the operation corresponding to the pressure.
[0117] The pressure detection device provided in the embodiment of the present application can implement each process implemented by the pressure detection method embodiment provided in the embodiment of the present application. To avoid repetition, they will not be described here.
[0118] Alternatively, if Figure 8 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the pressure detection method embodiment provided in the embodiment of the present application are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0119] Among them, the electronic device 800 also includes a capacitive sensor and a flexible circuit board; the capacitive sensor includes a sensor body, a measurement channel and a temperature compensation channel, and the part of the measurement channel except the sensing metal sheet and the temperature compensation channel are arranged in the flexible circuit board, and the sensor body is connected to the sensing metal sheet of the measurement channel through the flexible circuit board.
[0120] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0121] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
[0122] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0123] The electronic device 900 also includes: a capacitive sensor and a flexible circuit board; the capacitive sensor includes a sensor body, a measurement channel and a temperature compensation channel, and the part of the measurement channel except the sensing metal sheet and the temperature compensation channel are arranged in the flexible circuit board, and the sensor body is connected to the sensing metal sheet of the measurement channel through the flexible circuit board.
[0124] Among them, the processor 910 is used to: obtain a first measurement value of a pre-stored temperature compensation channel; obtain a second measurement value obtained by measuring the temperature compensation channel; determine a change in the distance from the touch screen of the electronic device to the flexible circuit board based on the first measurement value and the second measurement value; and determine the pressure exerted on the touch screen based on the distance change.
[0125] In the embodiment of the present application, a first measurement value of a pre-stored temperature compensation channel is obtained; a second measurement value obtained by measuring the temperature compensation channel is obtained; a change in the distance between the touch screen of the electronic device and the flexible circuit board is determined based on the first measurement value and the second measurement value; and the pressure on the touch screen is determined based on the change in the distance. In this way, the pressure of the user pressing the touch screen does not need to be detected by impedance detection. The pressure of the user pressing the touch screen can be detected by reusing the capacitive sensor of the electronic device, which can reduce the cost of pressure detection.
[0126] In some possible implementations of the embodiments of the present application, the processor 910 is specifically configured to:
[0127] Determine a first pressure corresponding to the distance change according to the corresponding relationship between the distance change and the pressure;
[0128] The first pressure is determined as the pressure exerted on the touch screen.
[0129] In some possible implementations of the embodiments of the present application, the processor 910 may be specifically configured to:
[0130] Calculate the difference between the first measurement value and the second measurement value to obtain a first difference;
[0131] Calculate the product of the first measurement value and the second measurement value to obtain a first product;
[0132] calculating a first ratio of the first difference to the first product;
[0133] The distance change is determined based on the first ratio.
[0134] In some possible implementations of the embodiments of the present application, the processor 910 may be specifically configured to:
[0135] Determine the distance change corresponding to the first ratio according to the corresponding relationship between the distance change and the ratio;
[0136] The distance change amount corresponding to the first ratio is determined as the distance change amount.
[0137] In some possible implementations of the embodiments of the present application, the processor 910 may also be configured to:
[0138] Perform the action corresponding to the pressure.
[0139] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0140] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0141] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0142] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the pressure detection method embodiment provided in the embodiment of the present application are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0143] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, and examples of computer-readable storage media include non-transitory computer-readable media, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0144] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the pressure detection method embodiment provided in the embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0145] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0146] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the pressure detection method embodiment provided in the embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0147] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0149] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A pressure detection method, characterized in that: The method comprises: Acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor of an electronic device, and the temperature compensation channel is disposed in a flexible circuit board of the electronic device; Acquire a second measurement value obtained by measuring the temperature compensation channel; Determine a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value; The pressure applied to the touch screen is determined according to the distance change.
2. The method according to claim 1, characterized in that Determining the pressure applied to the touch screen according to the distance change includes: Determining a first pressure corresponding to the distance change according to a corresponding relationship between the distance change and the pressure; The first pressure is determined as the pressure applied to the touch screen.
3. The method according to claim 1, characterized in that The determining, according to the first measurement value and the second measurement value, a change in the distance from the touch screen of the electronic device to the flexible circuit board includes: Calculating a difference between the first measurement value and the second measurement value to obtain a first difference; Calculating the product of the first measurement value and the second measurement value to obtain a first product; calculating a first ratio of the first difference to the first product; The distance change is determined according to the first ratio.
4. The method according to claim 3, characterized in that Determining the distance change according to the first ratio includes: Determine the distance change amount corresponding to the first ratio according to the corresponding relationship between the distance change amount and the ratio; The distance change amount corresponding to the first ratio is determined as the distance change amount.
5. The method according to claim 1, characterized in that After determining the pressure applied to the touch screen when it is pressed according to the distance change, the method further includes: An operation corresponding to the pressure is performed.
6. A pressure detection device, characterized in that: The device comprises: A first acquisition module, used to acquire a first measurement value of a pre-stored temperature compensation channel, wherein the temperature compensation channel is a temperature compensation channel included in a capacitive sensor of an electronic device, and the temperature compensation channel is provided in a flexible circuit board of the electronic device; A second acquisition module, used to acquire a second measurement value obtained by measuring the temperature compensation channel; A first determining module, configured to determine a change in the distance from the touch screen of the electronic device to the flexible circuit board according to the first measurement value and the second measurement value; The second determination module is used to determine the pressure applied to the touch screen according to the distance change.
7. The device according to claim 6, characterized in that The second determining module is specifically used for: Determining a first pressure corresponding to the distance change according to a corresponding relationship between the distance change and the pressure; The first pressure is determined as the pressure applied to the touch screen.
8. The device according to claim 6, characterized in that The first determining module comprises: A first calculation submodule, used for calculating the difference between the first measurement value and the second measurement value to obtain a first difference; A second calculation submodule, configured to calculate the product of the first measurement value and the second measurement value to obtain a first product; A third calculation submodule, configured to calculate a first ratio of the first difference to the first product; A determination submodule is used to determine the distance change according to the first ratio.
9. The device according to claim 8, characterized in that The determination submodule is specifically used for: Determine the distance change amount corresponding to the first ratio according to the corresponding relationship between the distance change amount and the ratio; The distance change amount corresponding to the first ratio is determined as the distance change amount.
10. The device according to claim 6, characterized in that The device also includes: An execution module is used to execute the operation corresponding to the pressure.