Baseline determination method and device and electronic equipment
By obtaining the voltage value of the piezoelectric sensor during the set time period and determining the pressing characteristic information, the baseline drift problem of the piezoelectric stress sensor is solved, and the normal use of the button is achieved.
Patent Information
- Application Number
- CN202510377355.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-19
AI Technical Summary
The piezoelectric stress sensor has a baseline drift problem during continuous pressing, which causes the output voltage value to not accurately reflect the actual magnitude of the applied force, affecting the normal use of the buttons.
By obtaining multiple voltage values of the piezoelectric sensor in a set time period, the pressing characteristic information is determined, including the voltage difference value set, the maximum voltage difference value, the minimum voltage difference value, the average voltage difference value and the least squares slope, and whether the sensor is in an unpressed state. If so, the voltage value at the current moment is used as the no-load baseline value to achieve baseline following.
It effectively solves the baseline drift problem of piezoelectric stress sensors and ensures normal use in key applications.
Smart Images

Figure CN120507067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of equipment control technology, and more specifically, to a baseline determination method, device, and system. Background Art
[0002] Piezoelectric stress sensors are widely used in various smart devices because they are not limited by material and their range is not affected by preload. They are particularly suitable for metal buttons on mobile phones and tablets. The principle of piezoelectric stress sensors is that when a piezoelectric material is subjected to an external force, its internal lattice structure changes, generating an electric charge. This imbalance in charge distribution creates a potential difference on the material surface, which in turn outputs an electrical signal proportional to the applied stress.
[0003] In practical applications, the charge generated by the piezoelectric material needs to be transmitted to the measuring device through the circuit so that the measuring device can collect the voltage level or charge level of its output. However, due to factors such as parasitic capacitance (including the capacitance of the sensor itself and the input capacitance of the subsequent circuit) and amplifiers with high input impedance in the circuit, the charge is stored in the circuit. In addition, since the leakage process of the charge in the circuit is relatively slow, when the piezoelectric material is pressed continuously, each press will generate new charge, causing the new charge to be superimposed when the old charge is not completely leaked, causing the baseline of the circuit output to drift.
[0004] Baseline drift prevents the output voltage of a piezoelectric strain sensor from accurately reflecting the actual applied force. Furthermore, in keystroke scenarios where trigger thresholds are set based on force, baseline drift can render the set press and release thresholds ineffective, impacting the proper functioning of the keystroke. Summary of the Invention
[0005] One purpose of the embodiments of the present application is to provide a new technical solution for baseline determination.
[0006] According to a first aspect of the present application, a baseline determination method is provided, comprising:
[0007] Acquire multiple voltage values collected by the piezoelectric sensor within a first set time period; wherein the first set time period is a time period of a set duration with the current moment as the end moment;
[0008] Determining, based on the multiple voltage values, press characteristic information within the first set time period; wherein the press characteristic information is used to reflect information about the press state of the piezoelectric sensor within the first set time period;
[0009] The no-load baseline value of the piezoelectric sensor at the current moment is determined based on the pressing characteristic information within the first set time period; wherein the no-load baseline value is the voltage value of the piezoelectric sensor in the absence of external force.
[0010] Optionally, the pressing feature information includes at least one of a voltage difference set, a maximum voltage difference, a minimum voltage difference, an average voltage difference, and a least squares slope within the first set time period.
[0011] Optionally, the pressure characteristic information includes a voltage difference value set within the first set time period, and determining the pressure characteristic information within the first set time period based on the multiple voltage values includes:
[0012] determining a voltage difference between two voltage values at any adjacent moments within the first set time period, to obtain a plurality of voltage difference values within the first set time period;
[0013] A voltage difference value set is obtained according to the multiple voltage difference values.
[0014] Optionally, determining the no-load baseline value of the piezoelectric sensor at the current moment based on the pressing characteristic information within the first set time period includes:
[0015] determining, based on the pressing characteristic information within the first set time period, whether the pressing state within the first set time period is a non-pressed state;
[0016] When the pressed state within the first set time period is the unpressed state, the voltage value at the current moment is used as the no-load baseline value at the current moment.
[0017] Optionally, the method further includes:
[0018] When the pressed state within the first set time period is not the unpressed state, the no-load baseline value of the first set time period is used as the no-load baseline value at the current moment.
[0019] Optionally, determining whether the pressing state within the first set time period is a non-pressed state according to the pressing characteristic information within the first set time period includes:
[0020] According to the pressing feature information within the first set time period and a preset pressing recognition model, it is determined whether the pressing state within the first set time period is a non-pressed state.
[0021] Optionally, the step of determining the preset pressure recognition model includes:
[0022] Acquire a training sample set; wherein each training sample in the training sample set includes press feature information and a true press value;
[0023] Training the press recognition model using the training sample set to obtain a trained press recognition model;
[0024] The trained pressure recognition model is simplified to obtain the preset pressure recognition model.
[0025] Optionally, obtaining a training sample set includes:
[0026] Acquire voltage sample data of the sample piezoelectric sensor under different pressing sample states; wherein the voltage sample data reflects the change of the sample voltage over time;
[0027] Selecting a plurality of sample sub-data of a second set time period from the voltage sample data; wherein the duration of the second set time period is equal to the duration of the first set time period;
[0028] For any sample sub-data of the second set time period, determine the pressing feature information and the pressing true value corresponding to the sample sub-data as a sample;
[0029] The training sample set is determined according to a plurality of samples corresponding to the sample sub-data of the plurality of second set time periods.
[0030] According to a second aspect of the present disclosure, a baseline determination device is provided, comprising a memory and a processor, wherein the memory is used to store executable instructions; the processor is used to operate according to the control of the instructions to execute the method as described in the first aspect.
[0031] According to a third aspect of the present disclosure, an electronic device is provided, comprising a piezoelectric sensor and a baseline determination device as described in the second aspect, wherein the piezoelectric sensor is used to collect multiple voltage values within a first set time period and send them to the baseline determination device, wherein the first set time period is a time period of a set length before the current moment.
[0032] One beneficial effect of the present application is that by obtaining multiple voltage values collected by the piezoelectric sensor within a first set time period, determining the pressing feature information within the first set time period based on the multiple voltage values, and determining the no-load baseline value of the piezoelectric sensor at the current moment based on the pressing feature information within the first set time period, the baseline following of the piezoelectric stress sensor can be achieved, the baseline drift problem of the piezoelectric stress sensor is solved, the pain points of the piezoelectric stress sensor in button applications are effectively solved, and a guarantee is provided for the normal use of the button. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with the description, serve to explain the principles of the application.
[0034] Figure 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application;
[0035] Figure 2 is a flowchart of a baseline determination method according to one embodiment of the present application;
[0036] Figure 3 is a schematic diagram of a voltage signal output by a piezoelectric sensor under continuous pressing according to an example of the present application;
[0037] Figure 4 is a comparison diagram of a baseline obtained by a baseline determination method according to an example of the present application and a voltage signal output by a piezoelectric sensor;
[0038] Figure 5 is a principle block diagram of a baseline determination device according to one embodiment of the present application;
[0039] Figure 6 It is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application.
[0041] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0042] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0043] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0044] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0045] Stress sensors are increasingly used in smart devices, particularly in areas such as human-computer interaction, medical equipment, and industrial monitoring, because they can convert mechanical stress signals into electrical signals, enabling precise sensing of changes in the external environment. Stress sensors can be categorized as piezoelectric, capacitive, and piezoresistive, depending on their operating principles. The operating principle of piezoelectric stress sensors is that when an external force is applied to a piezoelectric material, its internal lattice structure changes, generating an electric charge. This imbalance in charge distribution creates a potential difference on the surface of the piezoelectric material, which in turn outputs an electrical signal proportional to the applied stress.
[0046] Compared to capacitive strain sensors, piezoelectric strain sensors are not restricted by material and can be applied to metal products, making them widely applicable. They are particularly well-suited for metal buttons on mobile phones and tablets. Furthermore, compared to piezoresistive strain sensors, piezoelectric strain sensors have a wider range that is unaffected by preload and offer greater assembly consistency. Therefore, piezoelectric strain sensors have broad development prospects and are increasingly being used in various smart devices.
[0047] In the actual application of piezoelectric application sensors, the charge generated by the piezoelectric material needs to be transmitted to the measuring device through the circuit so that the measuring device can detect its charge level or voltage level. However, due to factors such as parasitic capacitance in the circuit (including the capacitance of the sensor itself and the input capacitance of the subsequent circuit) and the high input impedance of the amplifier, the charge is stored in the circuit. Since the leakage process of the charge in the circuit is relatively slow, when the piezoelectric material is pressed again continuously, the new charge generated by each press will be superimposed when the old charge is not completely leaked, causing the baseline of the circuit output to drift. Among them, the phenomenon of baseline drift is mainly manifested as follows:
[0048] 1) When there is no external stress, the baseline of a piezoelectric stress sensor (i.e., the output signal level in a stress-free state) changes slowly over time.
[0049] 2) As the number of consecutive presses increases, the baseline drift amplitude increases, e.g. Figure 3 As shown, after continuous pressing, starting points 1, 2, 3, and 4 are significantly lifted.
[0050] 3) After the compression is completed, the baseline (i.e. the output signal level in the stress-free state) takes a long time to slowly return to the initial position, for example Figure 3 The baseline shown takes the time interval from t1 to t2 to return to its initial position.
[0051] Baseline drift prevents the output voltage of a piezoelectric strain sensor from accurately reflecting the actual applied force. Furthermore, in keystroke scenarios where trigger thresholds are set based on force, baseline drift can render the set press and release thresholds ineffective, impacting the proper functioning of the keystroke.
[0052] To address this issue, the inventors have developed a baseline determination method that acquires the voltage output by a piezoelectric sensor in real time. Based on multiple voltage values within a set time period starting at the current moment, the method determines whether the piezoelectric sensor is currently unpressed. If the piezoelectric sensor is currently unpressed, the voltage value at that moment is used as the no-load baseline value to achieve baseline tracking, thereby resolving the baseline drift issue in piezoelectric stress sensors.
[0053] <Hardware Configuration>
[0054] Figure 1 is a block diagram of the hardware configuration of the electronic device 100 according to one embodiment of the present application.
[0055] like Figure 1 As shown, the electronic device 100 includes a piezoelectric sensor 1000 and a baseline determination device 2000 .
[0056] The piezoelectric sensor 1000 may be, for example, a piezoelectric stress sensor, etc., which is not limited here.
[0057] The piezoelectric sensor 1000 can output a voltage value under the action of an external force.
[0058] During the first set time period, the piezoelectric sensor 1000 may collect a plurality of voltage values and send them to the baseline determination device 2000 .
[0059] The baseline determination device 2000 can determine the no-load baseline value at the current moment based on the multiple voltage values sent by the piezoelectric sensor 1000.
[0060] In some embodiments, the baseline determination apparatus 2000 may include a processor 2100 , a memory 2200 , an interface device 2300 , a communication device 2400 , a display device 2500 , an input device 2600 , a speaker 2700 , a microphone 2800 , and the like.
[0061] The processor 2100 may be a mobile processor. The memory 2200 may include, for example, ROM (read-only memory), RAM (random access memory), and non-volatile memory such as a hard disk. The interface device 2300 may include, for example, a USB interface, a headphone jack, and the like. The communication device 2400 may be capable of wired or wireless communication. The communication device 2400 may include a short-range communication device, such as any device that performs short-range wireless communication based on a short-range wireless communication protocol such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 2400 may also include a long-range communication device, such as any device that performs WLAN, GPRS, 2G / 3G / 4G / 5G long-range communication. The display device 2500 may be, for example, an LCD display, a touch screen display, etc. The input device 2600 may include, for example, a touch screen, a keyboard, etc. The user may input / output voice information through the speaker 2700 and the microphone 2800.
[0062] In this embodiment, the memory 2200 of the baseline determination apparatus 2000 is used to store instructions for controlling the processor 2100 to perform at least the baseline determination method performed by the baseline determination apparatus 2000 according to any embodiment of the present application. A skilled artisan can design instructions based on the solutions disclosed herein. How instructions control processor operations is well known in the art and will not be described in detail here.
[0063] Despite Figure 1 , multiple devices of the baseline determination apparatus 2000 are shown; however, the present application may only involve some of the devices, for example, the baseline determination apparatus 2000 only involves the memory 2200 and the processor 2100 .
[0064] It should be understood that although Figure 1 Only one piezoelectric sensor 1000 and one baseline determination device 2000 are shown, but this does not mean to limit their respective numbers. The electronic device 100 may include multiple piezoelectric sensors 1000 and / or baseline determination devices 2000.
[0065] <Method Example>
[0066] Figure 2 2 is a flow chart of a baseline determination method according to an embodiment of the present application, which can be implemented by the baseline determination device 2000.
[0067] according to Figure 2 As shown, the baseline determination method of this embodiment may include the following steps S2100 to S2300:
[0068] Step S2100: Acquire multiple voltage values collected by the piezoelectric sensor within a first set time period.
[0069] In this embodiment, the baseline determination device obtains voltage values collected by the piezoelectric sensor in real time and determines the no-load baseline value of the piezoelectric sensor at the current moment based on multiple voltage values collected by the piezoelectric sensor within a first set time period. The first set time period is a set time period with the current moment as the end time.
[0070] Exemplarily, the time length is set to 11ms. It can be understood that the baseline determination device obtains the voltage value collected by the piezoelectric sensor in real time, and determines the no-load baseline value of the piezoelectric sensor at the current moment based on multiple voltage values collected by the piezoelectric sensor within 11ms with the current moment as the cutoff moment.
[0071] Those skilled in the art should understand that the set time length may also be other set time lengths such as 20ms, which is not limited here.
[0072] Step S2200: Determine the pressing characteristic information within the first set time period according to the multiple voltage values.
[0073] In this embodiment, the pressure characteristic information is used to reflect the pressure state of the piezoelectric sensor within the first set time period, that is, information indicating whether the piezoelectric sensor is in a non-pressed state or a pressed state within the first set time period. The pressure state of the piezoelectric sensor includes both the non-pressed state and the pressed state.
[0074] In one example, the pressed state can be further divided into a continuous pressed state, a short pressed state, and a long pressed state.
[0075] Those skilled in the art should understand that the focus of this application is on determining whether the piezoelectric sensor is in an unpressed state, and not on the specific type of pressed state when in a pressed state. That is to say, this application does not focus on whether the piezoelectric sensor is in a continuous pressing state or a short pressing state when it is in a pressed state.
[0076] In one embodiment, the pressing characteristic information includes a voltage difference set within the first set time period.
[0077] The inventors have discovered that the voltage difference in the voltage difference set corresponding to the long press state is small, and the voltage value remains at a relatively high level for a certain period of time. The voltage difference in the voltage difference set corresponding to the short press state changes greatly in a short period of time, that is, it rises rapidly at the moment of pressing, and then drops rapidly at the moment of releasing, and the entire pressing process is relatively short. The voltage difference in the voltage difference set corresponding to the continuous press state will continue to change with the rhythm of continuous pressing, showing periodic fluctuations. The voltage difference in the voltage difference set corresponding to the non-pressed state is very small, close to zero.
[0078] Therefore, the voltage difference set within the first set time period can characterize the pressing state of the piezoelectric sensor to a certain extent, and the voltage difference set within the first set time period can be used as pressing feature information to reflect the pressing state of the piezoelectric sensor.
[0079] In one embodiment, the pressing characteristic information includes a maximum voltage difference.
[0080] In this embodiment, the maximum voltage difference may be the maximum voltage difference in the voltage difference set.
[0081] The inventors discovered that the maximum voltage difference corresponding to a long press occurs at the moment the press begins. After this moment, the voltage difference is relatively small, and no large voltage difference occurs within a short period of time. In other words, the voltage does not drop rapidly within a short period of time. The maximum voltage difference corresponding to a short press occurs at the moment of the press and is relatively high. The maximum voltage difference corresponding to a continuous press occurs at the moment of each press and is relatively high, but fluctuates with the rhythm of the press. The maximum voltage difference corresponding to the unpressed state is close to zero.
[0082] Therefore, the maximum voltage difference in the voltage difference set can characterize the pressing state of the piezoelectric sensor to a certain extent, and the maximum voltage difference in the voltage difference set can be used as pressing feature information to reflect the pressing state of the piezoelectric sensor.
[0083] In one embodiment, the pressing characteristic information includes a minimum voltage difference.
[0084] The inventors found that the voltage difference corresponding to the long press state fluctuates slightly, and the minimum voltage difference may be close to zero. The minimum voltage difference in the short press state is generally larger. The minimum voltage value in the continuous press state is close to zero. The minimum voltage difference in the non-pressed state is close to zero.
[0085] Therefore, the minimum voltage difference in the voltage difference set can characterize the pressing state of the piezoelectric sensor to a certain extent, and the minimum voltage difference in the voltage difference set can be used as pressing feature information to reflect the pressing state of the piezoelectric sensor.
[0086] In one embodiment, the compression characteristic information includes an average voltage difference.
[0087] The inventors found that the average voltage difference corresponding to the long press state is high, with small fluctuations and an overall stable trend. The average voltage difference corresponding to the short press state is high, but with large fluctuations and a short duration. The average voltage difference corresponding to the continuous press state is high, with large fluctuations, and shows a clear periodic change. The average voltage difference corresponding to the non-pressed state is very low, almost zero, with minimal fluctuations.
[0088] Therefore, the average voltage difference value of the voltage difference value set can characterize the pressing state of the piezoelectric sensor to a certain extent, and the average voltage difference value in the voltage difference value set can be used as pressing feature information to reflect the pressing state of the piezoelectric sensor.
[0089] In one embodiment, the press characteristic information includes a least squares slope.
[0090] In this embodiment, the least square slope can reflect the change trend of the voltage difference set.
[0091] The inventors' research found that the least squares slope corresponding to a long press is typically close to zero. In a short press, the least squares slope is also large due to the rapid voltage change, indicating a significant voltage change within a short period of time. In a continuous press, the least squares slope also varies with the rhythm of the press, exhibiting a certain degree of volatility, due to the constant change in voltage difference. The least squares slope corresponding to the unpressed state is close to zero.
[0092] Therefore, the least square slope of the voltage difference set can characterize the pressing state of the piezoelectric sensor to a certain extent, and the least square slope of the voltage difference set can be used as pressing feature information to reflect the pressing state of the piezoelectric sensor.
[0093] In order to improve the accuracy of judging the pressing state of the piezoelectric sensor, in one embodiment, the pressing feature information includes a voltage difference set within a first set time period, a maximum voltage difference, a minimum voltage difference, an average voltage difference, and a least squares slope.
[0094] In some embodiments, the press characteristic information includes a set of voltage difference values within the first set time period. Step S2200 determines the press characteristic information within the first set time period based on the multiple voltage values, including: step S2200.1 and step S2200.2.
[0095] Step S2200.1: Determine a voltage difference between two voltage values at any adjacent moments within the first set time period, to obtain a plurality of voltage difference values within the first set time period.
[0096] For example, if the set duration is 11ms, the current moment is the 12ms, and the first set time period is 2ms to 12ms, then the voltage difference between the two voltage values at any adjacent moments from 2ms to 12ms is determined, thereby obtaining 10 voltage difference values.
[0097] Step S2200.2: Obtain a voltage difference value set according to the multiple voltage difference values.
[0098] Continuing with the above example, the 10 voltage difference values constitute a voltage difference value set.
[0099] In one embodiment, the pressing feature information further includes a minimum voltage difference value. After obtaining a voltage difference value set according to the multiple voltage difference values in step S2200.2, the method further includes: step S2200.3.
[0100] Step S2200.3: Determine a minimum voltage difference value based on the voltage difference value set.
[0101] Continuing with the example of the voltage difference value set including 10 voltage difference values, the 10 voltage difference values can be represented as diff1, diff2, diff3, ..., diffn, where n = 10. Then, the minimum voltage difference value can be calculated using formula (1):
[0102] min=MIN(diff1,diff2,diff3,…,diffn), n=10 (1)
[0103] In one embodiment, the pressing feature information further includes a maximum voltage difference value. After obtaining a voltage difference value set according to the multiple voltage difference values in step S2200.2, the method further includes: step S2200.4.
[0104] Step S2200.4: Determine the maximum voltage difference value based on the voltage difference value set.
[0105] Continuing the example of the voltage difference value set including 10 voltage difference values, the 10 voltage difference values can be represented as diff1, diff2, diff3, ..., diffn, where n = 10. Then, the maximum voltage difference value can be calculated using formula (2):
[0106] max=MAX(diff1,diff2,diff3,…,diffn), n=10 (2)
[0107] In one embodiment, the pressing feature information further includes an average voltage difference value. After obtaining a voltage difference value set according to the multiple voltage difference values in step S2200.2, the method further includes: step S2200.5.
[0108] Step S2200.5: Determine an average voltage difference value based on the voltage difference value set.
[0109] Continuing with the example of the voltage difference value set including 10 voltage difference values, the 10 voltage difference values can be represented as diff1, diff2, diff3, ..., diffn, where n = 10. Then, the average voltage difference value can be calculated using formula (3):
[0110]
[0111] In one embodiment, the pressing feature information further includes a least squares slope. Then, after obtaining a voltage difference value set according to the multiple voltage difference values in step S2200.2, the method further includes: step S2200.6.
[0112] Step S2200.6: Determine a least squares slope based on the voltage difference set.
[0113] Continuing the example where the voltage difference value set includes 10 voltage difference values, the 10 voltage difference values can be represented as diff1, diff2, diff3, ..., diffn, where n = 10. Then, the least squares slope can be calculated using formula (4):
[0114]
[0115] where x i is the index value within the window, y i is the voltage difference at that moment, n=10.
[0116] Step S2300: Determine the no-load baseline value of the piezoelectric sensor at the current moment based on the pressing characteristic information within the first set time period.
[0117] In this embodiment, the no-load baseline value is the voltage value of the piezoelectric sensor when there is no external force.
[0118] In one example, the press characteristic information includes an average voltage difference. If the average voltage difference of the voltage difference set is 0 (or the difference from 0 is within a set tolerance range), the voltage value of the piezoelectric sensor at the current moment is used as the no-load baseline value of the piezoelectric sensor at the current moment. If the average voltage difference is greater than 0 (or the difference from 0 is outside the set tolerance range), the no-load baseline value within the first set time period is used as the no-load baseline value at the current moment.
[0119] In another example, the press characteristic information includes a maximum voltage difference. If the maximum voltage difference in the voltage difference set is 0 (or the difference from 0 is within a set tolerance range), the voltage value of the piezoelectric sensor at the current moment is used as the no-load baseline value of the piezoelectric sensor at the current moment. If the maximum voltage difference is greater than 0 (or the difference from 0 is outside the set tolerance range), the no-load baseline value within the first set time period is used as the no-load baseline value at the current moment.
[0120] In another example, the press feature information includes an average voltage difference and a least squares slope. If the average voltage difference of the voltage difference set is greater than 0 and the least squares slope is 0, the no-load baseline value within the first set time period is used as the no-load baseline value at the current moment. If the average voltage value of the voltage difference set is 0 and the least squares slope is 0, the voltage value of the piezoelectric sensor at the current moment is used as the no-load baseline value of the piezoelectric sensor at the current moment.
[0121] In yet another example, the press feature information includes a voltage difference set, a minimum voltage difference, a maximum voltage difference, an average voltage difference, and a least squares slope. These press feature information can be input into a preset press recognition model to determine whether the press state within the first set time period is a non-pressed state. In the case that the press state within the first set time period is a non-pressed state, the voltage value of the piezoelectric sensor at the current moment is used as the no-load baseline value of the piezoelectric sensor at the current moment. In the case that the press state within the first set time period is not a non-pressed state (i.e., the press state is a pressed state), the no-load baseline value within the first set time period is used as the no-load baseline value at the current moment.
[0122] For example, Figure 4 , which shows a comparison diagram of the baseline obtained by the baseline determination method according to an example of the present application and the voltage signal output by the piezoelectric sensor, wherein Curve 1 is the voltage value output by the piezoelectric sensor, and Curve 2 is the no-load baseline value. It can be seen from Curves 1 and 2 that when the piezoelectric sensor is in a pressed state, the voltage value output by the piezoelectric sensor changes significantly, while the no-load baseline value remains unchanged. When the piezoelectric sensor is not pressed, if the voltage value output by the pressure point sensor drifts significantly (i.e., the output voltage value differs significantly from the no-load baseline value at the previous moment), the no-load baseline value can also accurately follow.
[0123] In some embodiments, step S2300 determines the no-load baseline value of the piezoelectric sensor at the current moment based on the pressing characteristic information within the first set time period, including: step S2300.1 and step S2300.2.
[0124] Step S2300.1: Determine whether the pressing state within the first set time period is a non-pressed state based on the pressing characteristic information within the first set time period.
[0125] In one example, the press feature information includes a voltage difference set, a minimum voltage difference, a maximum voltage difference, an average voltage difference, and a least squares slope. The voltage difference set corresponding to the unpressed state has a voltage difference value close to zero, a maximum voltage difference value close to zero, a minimum voltage difference value close to zero, an average voltage difference value close to zero, and a least squares slope close to zero. The voltage difference set corresponding to the long press state has a voltage difference value that is initially large and subsequently small, a large maximum voltage difference value, a minimum voltage difference value close to zero, a small average voltage difference value (but higher than the average voltage difference value of the unpressed state), and a least squares slope close to zero. The voltage difference set corresponding to the short press state has a voltage difference value that has short-term large fluctuations, a large maximum voltage difference value, a minimum voltage difference value close to zero, a high average voltage difference value, and a large least squares slope. The voltage difference set corresponding to the continuous press state has periodic large fluctuations, a large maximum voltage difference value, a minimum voltage difference value close to zero, a high average voltage difference value, and a periodic fluctuation in the least squares slope. Therefore, the conditions corresponding to the unpressed state are: the voltage difference value in the voltage difference value set is close to zero, the maximum voltage difference value in the voltage difference value set is close to zero, the minimum voltage difference is close to zero, the average voltage difference is close to zero, and the least squares slope is close to zero. If any one of the above conditions is not met, it is determined that the pressed state during the first set time period is not the unpressed state (i.e., the pressed state is the pressed state). If all of the above conditions are met, it is determined that the pressed state during the first set time period is the unpressed state.
[0126] In another example, the press feature information includes a voltage difference set, a minimum voltage difference, a maximum voltage difference, an average voltage difference, and a least squares slope. These press feature information can be input into a preset press recognition model to determine whether the press state within a first set time period is a non-pressed state. If the output result of the preset press recognition model is yes, then it is determined that the press state within the first set time period is a non-pressed state. If the output result of the preset press recognition model is no, then it is determined that the press state within the first set time period is not a non-pressed state.
[0127] Step S2300.2: When the pressing state within the first set time period is the unpressed state, the voltage value at the current moment is used as the no-load baseline value at the current moment.
[0128] In this embodiment, since the voltage value output by the piezoelectric sensor when it is not pressed is the no-load baseline value, when it is determined that the pressed state within the first time period is the unpressed state, the voltage value of the piezoelectric sensor at the current moment is used as the no-load baseline value at the current moment, which can avoid baseline drift.
[0129] In some embodiments, after determining in step S2300.1 whether the pressing state within the first set time period is a non-pressed state based on the pressing feature information within the first set time period, the method further includes: step S2300.3.
[0130] Step S2300.3: When the pressing state within the first set time period is not the unpressed state, the no-load baseline value of the first set time period is used as the no-load baseline value at the current moment.
[0131] In this embodiment, since the voltage value output by the piezoelectric sensor in a pressed state (i.e., not an unpressed state) is caused by being pressed, at this time, the no-load baseline value of the piezoelectric sensor is kept unchanged, that is, the no-load baseline value of the piezoelectric sensor within the first set time period is used as the no-load baseline value at the current moment.
[0132] In some embodiments, determining whether the pressed state within the first set time period is a non-pressed state based on the pressing characteristic information within the first set time period in step S2300.1 includes:
[0133] According to the pressing feature information within the first set time period and a preset pressing recognition model, it is determined whether the pressing state within the first set time period is a non-pressed state.
[0134] In this embodiment, the preset press recognition model may be a model for identifying whether a state is not pressed based on press feature information.
[0135] In one example, the preset press recognition model may be a trained press recognition model.
[0136] In another example, in order to improve both the accuracy and efficiency of press recognition, the preset press recognition model may be a simplified model of the trained press recognition model.
[0137] In this example, key press recognition rules can be extracted from the trained press recognition model to simplify the trained press recognition model. A press recognition algorithm (i.e., a preset press recognition model) is determined based on the key press recognition rules and embedded into the baseline determination device for ready use.
[0138] Those skilled in the art should understand that the specific form of the preset pressure recognition model is not limited here.
[0139] In some embodiments, the step of determining the preset pressure recognition model includes: steps S3100 to S3300.
[0140] Step S3100: Obtain a training sample set.
[0141] In this embodiment, each training sample in the training sample set includes press feature information and a true press value.
[0142] The specific content of the press feature information included in each training sample in the training sample set in step S3100 is the same as the content of the press feature information in step S2200, and its content and acquisition method will not be elaborated here.
[0143] The true value of the compression may represent the actual compression state.
[0144] In one example, the actual value of the pressing button may be obtained by manual labeling, wherein "0" may represent a non-pressed state and "1" may represent a pressed state.
[0145] In some embodiments, obtaining the training sample set in step S3100 includes: steps S3100.1 to S3100.4.
[0146] Step S3100.1, obtaining voltage sample data of the sample piezoelectric sensor under different pressing sample states.
[0147] In this embodiment, a sample piezoelectric sensor is pre-tested under different pressure sample states to obtain voltage sample data output under different pressure sample states. The sample piezoelectric sensor may be the piezoelectric sensor in step S2100 or another piezoelectric sensor of the same type as the piezoelectric sensor in step S2100, and this is not limited here.
[0148] The sample states of the pressing include long pressing, short pressing, continuous pressing, and no pressing. The voltage sample data reflects the change of the sample voltage over time.
[0149] Step S3100.2: Select a plurality of sample sub-data of a second set time period from the voltage sample data.
[0150] In this embodiment, the duration of the second set time period is equal to the duration of the first set time period.
[0151] For example, the voltage sample data may be data with a duration of 110ms, and the data with a duration of 110ms includes data output under different pressing sample states (e.g., a long pressing state, a short pressing state, a continuous pressing state, and a non-pressed state). If the duration of the second set time period is 11ms, 100 sample sub-data with a duration of 11ms can be obtained.
[0152] Step S3100.3: For any sample sub-data in the second set time period, determine the pressing feature information and the pressing true value corresponding to the sample sub-data as a sample.
[0153] Continuing with the above example, for any sample sub-data among the 100 sample sub-data, the true value of the pressing of the sample sub-data is marked, and its corresponding voltage difference set, minimum voltage difference, maximum voltage difference, average voltage difference, and least squares slope are calculated as the pressing feature information of the sample sub-data to obtain a sample, thereby obtaining 100 samples corresponding to the 100 sample sub-data.
[0154] It should be noted that when labeling the true pressing values for 100 sample sub-data, there may be a problem of imbalance in the labeled true pressing values. For example, the number of sample sub-data corresponding to the unpressed state is small, and the number of sample sub-data corresponding to the pressed state is large. At this time, the number of the two types of samples is unbalanced, so the 100 sample sub-data can be subjected to category balancing processing to make the sample categories balanced.
[0155] Step S3100.4: Determine the training sample set based on the multiple training samples corresponding to the sample sub-data of the multiple second set time periods.
[0156] Continuing with the above example, 80 of the 100 samples corresponding to the 100 sample sub-data are used as training samples to obtain a training sample set, and 20 samples are used as test samples to obtain a test sample set.
[0157] Step S3200: training the press recognition model using the training sample set to obtain a trained press recognition model.
[0158] In this embodiment, the pressure recognition model may be a decision tree model or other types of models, which are not limited here.
[0159] Continuing with the above example, the press recognition model is trained using a training sample set consisting of 80 training samples to obtain the trained press recognition model. The trained press recognition model is then evaluated using 20 test samples. The evaluation metrics include precision, recall, and F1 score, resulting in the following evaluation metric values as shown in Table 1:
[0160] Table 1 Evaluation index values of the trained press recognition model on the test set
[0161] Classification Accuracy Recall F1 score Pressed state 0.94 0.96 0.95 Not pressed state 0.96 0.94 0.95
[0162] It can be seen from Table 1 above that the trained press recognition model has a high press recognition accuracy and can accurately identify the press state.
[0163] Step S3300: Simplify the trained pressure recognition model to obtain the preset pressure recognition model.
[0164] In the example where the press recognition model is a decision tree model, the trained press recognition model can be a decision tree model including multiple layers (for example, 7 layers). In order to simplify the calculation, only 3 layers of the 7-layer decision tree model can be extracted to form a new model (i.e., the preset press recognition model), which is saved in the baseline determination device for use.
[0165] According to an embodiment of the present application, by obtaining multiple voltage values collected by the piezoelectric sensor within a first set time period, determining the pressing feature information within the first set time period based on the multiple voltage values, and determining the no-load baseline value of the piezoelectric sensor at the current moment based on the pressing feature information within the first set time period, the baseline following of the piezoelectric stress sensor can be achieved, which solves the baseline drift problem of the piezoelectric stress sensor, effectively solves the pain points of the piezoelectric stress sensor in button applications, and provides a guarantee for the normal use of the button.
[0166] <Equipment Example>
[0167] Figure 5 4 is a principle block diagram of a baseline determination device 500 according to an embodiment of the present application.
[0168] In this embodiment, if Figure 5 As shown, the baseline determination device 500 includes a memory 510 and a processor 520, wherein the memory 510 is used to store executable instructions; the processor 520 is used to operate according to the control of the instructions to execute the method as described in any of the above method embodiments.
[0169] Figure 6 It is a principle block diagram of a baseline determination system according to one embodiment of the present application.
[0170] In this embodiment, if Figure 6 As shown, the electronic device 600 includes a piezoelectric sensor 610 and a baseline determination device 620, and the piezoelectric sensor 610 is used to collect multiple voltage values within a first set time period and send them to the baseline determination device 620, wherein the first set time period is a time period of a set length before the current moment.
[0171] In this embodiment, the electronic device may be a mobile phone, a tablet computer, an in-vehicle electronic device, or the like, which is not limited here.
[0172] In some embodiments, the baseline determination device 620 may be a Figure 1 or Figure 5 The baseline determination device shown.
[0173] The present application may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.
[0174] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0175] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0176] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data or source code or object code written in any combination of one or more programming languages, wherein the programming language includes object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or executed completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as by using an Internet service provider to connect to the Internet). In certain embodiments, by utilizing the state information of computer-readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer-readable program instructions, thereby realizing various aspects of the present application.
[0177] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0178] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0179] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0180] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
[0181] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, their practical applications, or technical improvements in the marketplace, or to enable other persons skilled in the art to understand the embodiments disclosed herein. The scope of this application is defined by the appended claims.
Claims
1. A baseline determination method, characterized in that: The method comprises: Acquire multiple voltage values collected by the piezoelectric sensor within a first set time period; wherein the first set time period is a time period of a set duration with the current moment as the end moment; Determining, based on the multiple voltage values, press characteristic information within the first set time period; wherein the press characteristic information is used to reflect information about the press state of the piezoelectric sensor within the first set time period; The no-load baseline value of the piezoelectric sensor at the current moment is determined based on the pressing characteristic information within the first set time period; wherein the no-load baseline value is the voltage value of the piezoelectric sensor in the absence of external force.
2. The method according to claim 1, characterized in that The pressing feature information includes at least one of a voltage difference set, a maximum voltage difference, a minimum voltage difference, an average voltage difference, and a least squares slope within the first set time period.
3. The method according to claim 1, characterized in that The pressing characteristic information includes a voltage difference value set within the first set time period, and determining the pressing characteristic information within the first set time period based on the multiple voltage values includes: determining a voltage difference between two voltage values at any adjacent moments within the first set time period, to obtain a plurality of voltage difference values within the first set time period; A voltage difference value set is obtained according to the multiple voltage difference values.
4. The method according to claim 1, wherein The determining, based on the pressing characteristic information within the first set time period, a no-load baseline value of the piezoelectric sensor at the current moment, includes: determining, based on the pressing characteristic information within the first set time period, whether the pressing state within the first set time period is a non-pressed state; When the pressed state within the first set time period is the unpressed state, the voltage value at the current moment is used as the no-load baseline value at the current moment.
5. The method according to claim 3, characterized in that The method further comprises: When the pressed state within the first set time period is not the unpressed state, the no-load baseline value of the first set time period is used as the no-load baseline value at the current moment.
6. The method according to claim 4, characterized in that The determining, based on the pressing characteristic information within the first set time period, whether the pressing state within the first set time period is a non-pressed state includes: According to the pressing feature information within the first set time period and a preset pressing recognition model, it is determined whether the pressing state within the first set time period is a non-pressed state.
7. The method according to claim 6, characterized in that The step of determining the preset pressure recognition model includes: Acquire a training sample set; wherein each training sample in the training sample set includes press feature information and a true press value; Training the press recognition model using the training sample set to obtain a trained press recognition model; The trained pressure recognition model is simplified to obtain the preset pressure recognition model.
8. The method according to claim 7, characterized in that The obtaining of the training sample set comprises: Acquire voltage sample data of the sample piezoelectric sensor under different pressing sample states; wherein the voltage sample data reflects the change of the sample voltage over time; Selecting a plurality of sample sub-data of a second set time period from the voltage sample data; wherein the duration of the second set time period is equal to the duration of the first set time period; For any sample sub-data of the second set time period, determine the pressing feature information and the pressing true value corresponding to the sample sub-data as a sample; The training sample set is determined according to a plurality of samples corresponding to the sample sub-data of the plurality of second set time periods.
9. A baseline determination device, comprising a memory and a processor, wherein the memory is configured to store executable instructions; and the processor is configured to operate under the control of the instructions to execute the method according to any one of claims 1 to 8.
10. An electronic device comprising a piezoelectric sensor and the baseline determination device according to claim 9, wherein the piezoelectric sensor is configured to collect a plurality of voltage values within a first set time period and send the values to the baseline determination device, wherein: The first set time period is a time period of a set duration before the current moment.
Citation Information
Patent Citations
Method and device for determining pressure reference value, chip and electronic equipment
CN112507994A
Baseline updating method and system, relative state detection method and system and electronic equipment
CN113566852A
Pressure baseline update processing method and device
CN115993909A
Signal baseline processing method, device and system and electronic equipment
CN118819343A
Method and apparatus for sensing target
EP4474864A1