State recognition method and device of capacitive touch sensing device and electronic equipment
By filtering the signal value of the capacitive touch sensing device and judging the state change value, the problem that the state of the capacitive touch sensing device cannot be accurately identified in the prior art, and the accuracy of state recognition is improved.
Patent Information
- Application Number
- CN202411797790.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the state recognition method of the capacitive touch sensing device cannot accurately identify the state of the device.
By obtaining a set of signal values, filtering processing is performed to obtain the filtered set of signal values, the state change value is determined, and the state of the capacitive touch sensing device is judged based on the positive and negative conditions of the preset threshold value and the state change value.
The accuracy of state recognition of capacitive touch sensing devices is improved, and the problem of inaccurate identification of state is solved.
Smart Images

Figure CN119883045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing technology, and in particular to a state recognition method, device and electronic equipment of a capacitive touch sensing device. Background Art
[0002] Touch buttons are a type of touch sensing input device that is now widely used in household appliances and medical devices. Capacitive touch buttons have attracted attention in the industry for their high light transmittance, wear resistance, resistance to ambient temperature changes, resistance to ambient humidity changes, long life, and the ability to achieve advanced and complex multi-touch functions. In the process of state recognition, the capacitive touch sensing device in the related art only recognizes its state based on the size of the signal value collected by the capacitive touch sensing device, and the recognition accuracy is low.
[0003] It can be seen that the state recognition method of the capacitive touch sensing device in the related art has a technical problem that the state of the capacitive touch sensing device cannot be accurately recognized. Summary of the invention
[0004] The present invention provides a state recognition method, device and electronic equipment of a capacitive touch sensing device, which are used to solve the technical problem that the state recognition method of the capacitive touch sensing device in the related art cannot accurately recognize the state of the capacitive touch sensing device.
[0005] The present invention provides a state recognition method for a capacitive touch sensing device, comprising the following steps: in response to the capacitive touch sensing device being triggered, obtaining a group of signal values, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in a current time period, and the interval acquisition time between adjacent signal values in the group of signal values is a target sampling period; filtering the group of signal values to obtain a group of filtered signal values; determining a group of state change values based on the filtered group of signal values, wherein the state change value is a difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in a lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in a press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, judging the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of the group of state change values.
[0006] According to a state recognition method of a capacitive touch sensing device provided by the present invention, the capacitive touch sensing device includes a capacitive touch button, when the capacitive touch button is in a pressed state, the signal value corresponding to the capacitive touch sensing device belongs to a first threshold interval, when the capacitive touch button is in a lifted state, the signal value corresponding to the capacitive touch sensing device belongs to a second threshold interval, the maximum value of the first threshold interval is less than the minimum value of the second threshold interval, before acquiring a group of signal values in response to the capacitive touch sensing device being triggered, the method further includes: acquiring a maximum sampling period, wherein the time when the signal value corresponding to the capacitive touch sensing device changes from the second threshold interval to the first threshold interval within a first duration is a first to-be-determined time, the time when the signal value corresponding to the capacitive touch sensing device changes from the first threshold interval to the second threshold interval within a second duration is a second to-be-determined time, and the maximum sampling period The first duration is the shortest time required for the capacitive touch button to change from the lifted state to the pressed state, and the second duration is the shortest time required for the capacitive touch button to change from the pressed state to the lifted state; a first shake threshold and a second shake threshold are determined based on the maximum sampling period, wherein the first shake threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device under the preset sampling period when the capacitive touch button is in the pressed state; the second shake threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device under the preset sampling period when the capacitive touch button is in the lifted state; the maximum sampling period is twice the preset sampling period; the target sampling period is determined based on the maximum sampling period, the first shake threshold and the second shake threshold.
[0007] According to a state recognition method of a capacitive touch sensing device provided by the present invention, the target sampling period is determined based on the maximum sampling period, the first shake threshold and the second shake threshold, including: obtaining a group of first adjustment signal values and a group of second adjustment signal values, wherein the interval acquisition time between adjacent signal values in the group of first adjustment signal values and the group of second adjustment signal values is the current sampling period, the group of first adjustment signal values are signal values corresponding to the capacitive touch sensing device in the process in which the capacitive touch key changes from the lifted state to the pressed state after a preset time, and the group of second adjustment signal values are signal values corresponding to the capacitive touch sensing device in the process in which the capacitive touch key changes from the pressed state to the lifted state after a preset time. The signal value corresponding to the capacitive touch sensing device during the lifting state, the preset time is greater than the third duration, the third duration is greater than the first duration, and the current sampling period is less than the maximum sampling period; a first change mean is determined based on the group of first adjustment signal values, and a second change mean is determined based on the group of second adjustment signal values, wherein the first change mean is the mean of the change values of adjacent signal values in the group of first adjustment signal values, and the second change mean is the mean of the change values of adjacent signal values in the group of second adjustment signal values; the target sampling period is determined according to the first change mean, the second change mean, the first shake threshold and the second shake threshold.
[0008] According to a state recognition method of a capacitive touch sensing device provided by the present invention, the target sampling period is determined according to the first change mean, the second change mean, the first shake threshold and the second shake threshold, including: when the first change mean is less than the first shake threshold, or the second change mean is less than the second shake threshold, adding a compensation value to the current sampling period to obtain the target sampling period, wherein the compensation value is a value obtained by dividing the difference between the maximum sampling period and the current sampling period by 2; when the ratio of the first change mean divided by the first shake threshold is greater than a preset threshold, and the ratio of the second change mean divided by the second shake threshold is greater than the preset threshold, subtracting the compensation value from the current sampling period to obtain the target sampling period.
[0009] According to a state recognition method of a capacitive touch sensing device provided by the present invention, the filtering process for the set of signal values to obtain a set of filtered signal values includes: determining a set of change values based on the set of signal values, wherein the change value is an absolute value of a difference between adjacent signal values in the set of signal values; filtering out change values in the set of change values that fall within a preset change value range to obtain a set of filtered change values; and determining the set of filtered signal values based on the set of filtered change values.
[0010] According to a state recognition method for a capacitive touch sensing device provided by the present invention, when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is judged according to the positive and negative conditions of the group of state change values, including: when the number of consecutive positive state change values in the group of state change values is greater than a preset lift trend threshold, the capacitive touch sensing device is judged to be in the lift state; when the number of consecutive negative state change values in the group of state change values is greater than a preset press trend threshold, the capacitive touch sensing device is judged to be in the press state.
[0011] The present invention further provides a state recognition device for a capacitive touch sensing device, comprising the following modules: an acquisition module, for acquiring a set of signal values in response to the capacitive touch sensing device being triggered, wherein the set of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the set of signal values is a target sampling period; a filtering module, for filtering the set of signal values to obtain a set of filtered signal values; a determination module, for determining a set of state change values based on the set of filtered signal values, wherein the state change value is a difference between adjacent signal values in the set of filtered signal values; The first judgment module is used to judge that the capacitive touch sensing device in the time period corresponding to the state change value is in the lifted state when the state change value is greater than a preset lifted threshold, wherein the preset lifted threshold is greater than 0; the second judgment module is used to judge that the capacitive touch sensing device in the time period corresponding to the state change value is in the pressed state when the state change value is less than a preset pressed threshold, wherein the preset pressed threshold is less than 0; the third judgment module is used to judge the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of the set of state change values when the state change value is less than or equal to the preset lifted threshold and greater than or equal to the preset pressed threshold.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a state recognition method of any of the above-mentioned capacitive touch sensing devices is implemented.
[0013] The present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the state recognition method of any of the above-mentioned capacitive touch sensing devices is implemented.
[0014] The present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for identifying the state of any of the above-mentioned capacitive touch sensing devices is implemented.
[0015] The state recognition method, device and electronic device of a capacitive touch sensing device provided by the present invention obtain a group of signal values in response to the capacitive touch sensing device being triggered, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in a group of signal values is a target sampling period; a group of signal values is filtered to obtain a group of filtered signal values; the filtered group of signal values are compared with multiple groups of sample signal values, and the state of the capacitive touch sensing device in the current time period is determined based on the comparison result, wherein the interval acquisition time between adjacent signal values in each group of sample signal values in the multiple groups of sample signal values is the target sampling period; the signal values are filtered and compared with the sample signal values, and the state of the capacitive touch sensing device is determined based on the comparison result, which can improve the accuracy of determining the state of the capacitive touch sensing device, thereby solving the technical problem that the state recognition method of the capacitive touch sensing device in the related art cannot accurately identify the state of the capacitive touch sensing device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a state recognition method of a capacitive touch sensing device provided by the present invention.
[0018] Figure 2 It is a circuit diagram of the capacitive touch sensing device provided by the present invention.
[0019] Figure 3 It is a structural schematic diagram of a state recognition device of a capacitive touch sensing device provided by the present invention.
[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also 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 "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0023] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0024] Touch buttons are now widely used in household appliances and medical devices. Existing touch buttons include resistive touch buttons, capacitive touch buttons, etc. Among them, capacitive touch buttons have attracted attention from the industry for their high light transmittance, wear resistance, resistance to ambient temperature changes, resistance to ambient humidity changes, long life, and advanced complex functions that can realize multi-point touch. Capacitive touch buttons can detect human finger touch actions through insulating materials (glass, plastic, etc.), and can determine effective key actions without the mechanical contacts of traditional buttons. Its working principle is: the newly added capacitance when the human finger touches the button sensing area is superimposed with the inherent capacitance of the original touch button device, and is sent to the touch detection control circuit for processing to generate corresponding control instructions to achieve the control purpose.
[0025] There are two commonly used capacitive touch recognition methods. One is to recognize by comparing with a threshold value. The threshold value is generally a maximum value, a minimum value or a set base value. Because the material and thickness of the cover panel are different, the touch capacitance will change, and the sensitivity of the touch button will also be affected. When directly contacting the conductive spring, it is equivalent to the cover panel material being air. The thickness is large when lifted and very small when pressed, which will cause a large change in the touch capacitance and a large change in the sampling value. After the outer shell is covered, the material and thickness of the cover panel are certain, and the touch capacitance hardly changes. The touch capacitance only changes by pressing and lifting, thereby changing the sampling value; the other is to recognize by judging whether the change in the current capacitive touch acquisition value (the difference between two acquisition values at a specified time interval) exceeds the set threshold. The disadvantage of this method is that when the button state changes (finger pressed / lifted) but the change does not exceed the threshold, there will be a problem of not being able to recognize; if the threshold is reduced, when the device acquisition value jitters, there will be a problem of wrong recognition.
[0026] In order to at least solve some of the above problems, the following Figure 1-Figure 4 The present invention describes a state recognition method, device and electronic device of a capacitive touch sensing device.
[0027] The state recognition method of the capacitive touch sensing device provided in this embodiment can be applied to the scenario of recognizing the state of the capacitive touch sensing device; the state recognition method of the capacitive touch sensing device in this embodiment can be executed by the capacitive touch sensing device or by a server, where the server is communicatively connected to the capacitive touch sensing device.
[0028] Figure 1 FIG. 1 is a flow chart of a method for identifying a state of a capacitive touch sensing device provided by the present invention. Figure 1 As shown, including but not limited to the following steps: Step 101, in response to the capacitive touch sensing device being triggered, a group of signal values are obtained, wherein the group of signal values are obtained based on the capacitance state of the capacitive touch sensing device in the current period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period.
[0029] In this embodiment, the capacitive touch sensing device can be a blood oximeter, and the following explanation is based on the capacitive touch sensing device being a blood oximeter. The blood oximeter has a structure composed of: from bottom to top, a lower shell, a battery, a printed circuit board (PCB), a screen base, a display screen, and an upper shell (covering panel). This structure prevents the PCB from directly contacting the covering panel. A conductive gasket / spring type sensor can be directly in contact with the covering panel to improve the sensitivity of the touch button. The touch button part of the blood oximeter includes a pad, a spring, and a covering panel; the spring is connected to the pad by solder, the spring is perpendicular to the PCB and the covering panel, the covering panel directly contacts the spring, and the contact area is printed with a key icon on the front of the covering panel. Touching the key icon on the covering panel can identify the touch action, and the current touch button can identify a long press or a short press; by touching the key icon on the blood oximeter, the capacitance value of the touch key part to the ground can be increased, and the touch detection conversion circuit converts the capacitance value into a digital value, and processes the converted data through a specific recognition method to determine whether there is a touch action.
[0030] In response to the capacitive touch sensing device being triggered, a set of signal values is obtained, wherein a set of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current period, and the circuit principle of the capacitive touch sensing device being triggered and then obtaining a set of signal values is explained. When the user touches the touch portion of the oximeter, an inductive capacitor is formed. Since there is an inductive capacitor between the touch button sensing pin and the ground (Ground, GND), when the button is pressed, it is equivalent to connecting a capacitor in parallel, so that the capacitance value between the touch pin and the ground increases. The change in capacitance value is converted into a change in digital quantity through the touch recognition module in the microcontroller unit (Microcontroller Unit, MCU). In this embodiment, the change in capacitance value is converted into a change in digital quantity as the difference between two acquisition values of the oximeter capacitance at the time interval of the target sampling period, and then the digital quantity is processed and determined. Due to the different principles of the selected chip touch recognition module, the meaning represented by the digital quantity is also different.
[0031] Figure 2 is a circuit diagram of a capacitive touch sensing device provided by the present invention, such as Figure 2As shown, the digital quantity counted by the counter represents the count value of the number of times the touch capacitor Cx is charged (i.e., the signal value in this embodiment), where Cx is the inductive capacitance between the touch pin pad and GND, Cs is the reference end capacitance, and in the initial state, K1 and K3 are in the open state, K2 and K4 are in the closed state, the comparator outputs a low level, and the counter count value is 0; when the user touches the pin pad, K2, K3, and K4 are in the open state, K1 is in the closed state, and the touch pin to ground capacitance Cx starts to charge. In this embodiment, the set time for one charge is 0.5us; when the charging time of Cx reaches the set time, K1 is in the open state, and Cx stops charging. At this time, K3 is closed, and the reference end capacitor Cs is charged by the touch capacitor Cx. When the charging time reaches the preset value, the counter count value is increased by 1. In this embodiment, the preset value is 0.5us; the comparator compares the charging comparison capacitor voltage (the negative (-) terminal voltage of the comparator) with the specified voltage (the positive (+) terminal voltage of the comparator). If it is less than the specified voltage, the above operation is repeated until it is greater than the specified voltage. At this time, the comparator outputs a high level and the counter ends counting; the count value is the sampling value (that is, the signal value in this embodiment); after the acquisition is completed, K1 and K3 are opened, and K2 and K4 are closed, so that Cs and Cx are grounded for discharge, and wait for the next acquisition to start.
[0032] It should be noted that Figure 2 Rs is a resistor, VDD is a power supply voltage, and VH is a holding voltage.
[0033] It can be understood that Cx is charged for a certain period of time and then the charging is stopped. Then Cx charges Cs for a certain period of time, and the above steps are repeated until the voltage across Cs reaches a given voltage threshold. The collected value (signal value) is the number of times the Cs capacitor is charged. When the finger is pressed, the capacitance of Cx increases, and the amount of charge in the same time increases, and the number of times Cs is charged will decrease. Then, the current key state can be determined by judging the change in the number of charging times (signal value).
[0034] The capacitive touch sensing device is triggered when it is touched by a user, and a set of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval collection time between adjacent signal values in a set of signal values is the target sampling period; when the target sampling period is set too large, the time interval between two signal value collections will be too long, skipping the entire pressing / lifting process, resulting in the signal value being unable to accurately reflect the state of the capacitive touch sensing device in the current time period; since the capacitive touch sensing device will shake slightly when stationary, affected by the air medium, the touch capacitance value will change, and the number of charging times will change, that is, the touch sensing signal will change. When the target sampling period is set too small, the time interval between two signal value collections will be too short, resulting in the inability to accurately distinguish whether the capacitive touch sensing device is in the pressing / lifting process or in a shaking state based on the signal value.
[0035] In this embodiment, a target sampling period is set, and the interval acquisition time between adjacent signal values in a group of signal values is the target sampling period, which can avoid the above problems. The specific method for obtaining the target sampling period is described in the following embodiments.
[0036] Step 102: filter a set of signal values to obtain a set of filtered signal values.
[0037] In this embodiment, in order to accurately identify the state of the touch sensing device, a set of acquired signal values are filtered to avoid noise interference; specifically, a set of signal values can be filtered by first median filtering and then mean filtering. There are many filtering methods, and the filtering method is not limited here.
[0038] Step 103: determining a set of state change values based on the set of filtered signal values, wherein the state change value is a difference between adjacent signal values in the set of filtered signal values.
[0039] The state change value is the difference between adjacent signal values in a group of filtered signal values, that is, the state change values in a group of state change values are all obtained by taking the difference between adjacent signal values in a group of signal values.
[0040] Step 104, when the state change value is greater than a preset lift threshold, determining that the capacitive touch sensing device in the time period corresponding to the state change value is in a lift state, wherein the preset lift threshold is greater than 0; Step 105, when the state change value is less than a preset pressing threshold, determining that the capacitive touch sensing device in the time period corresponding to the state change value is in a pressed state, wherein the preset pressing threshold is less than 0; Step 106 , when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, determine the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of a group of state change values.
[0041] In this embodiment, the normal lifting / pressing state, slow lifting / pressing state, and fast lifting / pressing state that have been acquired are first used to set a preset lifting threshold and a preset pressing threshold by using the fluctuation range composed of multiple groups of single changes, and then directly judge the lifting / pressing operation of a group of signal values.
[0042] Specifically taking the lift / press state as an example, multiple groups of data in this state are obtained, preferably 3 groups, each group of data includes at least 3 complete lift / press actions, and the fluctuation range composed of the single change amount of the corresponding touch sensing signal is obtained; the single change amount of the signal when lifting and pressing each group is respectively median and averaged, the average values under the three states are compared, and the smallest average value is selected as the preset lift threshold and the preset press threshold.
[0043] Furthermore, the effective touch sensing signal collected in real time is compared with the preset lifting threshold and the preset pressing threshold to directly determine whether the triggered operation of the capacitive touch sensing device in the period corresponding to the state change value is a lifting operation or a pressing operation.
[0044] It can be understood that since the signal value is the number of times the capacitor is charged, when the triggered operation of the capacitive touch sensing device is a lift operation, the Cx capacitance decreases, the amount of charge charged in the same time period decreases, and the number of times Cs is charged increases, so the signal value increases. When the state change value is greater than the preset lift threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the lifted state; when the triggered operation of the capacitive touch sensing device is a press operation, the Cx capacitance increases, the amount of charge charged in the same time period increases, and the number of times Cs is charged decreases, so the signal value decreases. When the state change value is less than the preset press threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the pressed state. If the lift / press operation cannot be directly determined, the lift trend or the press trend is determined for the effective touch sensing signal collected in real time; the meaning of the positive and negative representations of the state change value is related to the touch principle. In the touch principle of this embodiment, the number of charging times, that is, the sampling value, decreases with the increase of the sensing capacitance. A positive single change indicates a lift trend, and a negative single change indicates a press trend; therefore, the positive and negative values of the single change of the effective touch sensing signal collected in real time are determined. If the state change value is positive, it indicates a lift trend; if the state change value is negative, it indicates a press trend.
[0045] In this embodiment, the interval collection time between adjacent signal values in each group of sample signal values in multiple groups of sample signal values is the target sampling period, and a group of signal values after filtering are compared with the multiple groups of sample signal values, and the state of the capacitive touch sensing device in the current time period is determined based on the comparison result; exemplarily, the signal value corresponding to when the capacitive touch sensing device is in a pressed state, the signal value corresponding to when the capacitive touch sensing device is in an idle state, etc. are obtained, and by comparing a group of filtered signal values with the multiple groups of sample signal values, when the signal value similarity reaches a preset standard, it can be determined that the state of the capacitive touch sensing device corresponding to a group of signal values is the state of the capacitive touch sensing device corresponding to the sample signal values.
[0046] According to the embodiments provided by the present application, in response to the capacitive touch sensing device being triggered, a group of signal values is obtained, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period; a group of signal values is filtered to obtain a group of filtered signal values; a group of state change values is determined based on the group of filtered signal values, wherein the state change value is the difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is judged according to the positive and negative conditions of a group of state change values; the state recognition method of the capacitive touch sensing device in the related art solves the technical problem that the state of the capacitive touch sensing device cannot be accurately recognized, and the accuracy of the state recognition of the capacitive touch sensing device is improved.
[0047] As an optional solution, the capacitive touch sensing device includes a capacitive touch button, when the capacitive touch button is in a pressed state, the signal value corresponding to the capacitive touch sensing device belongs to a first threshold interval, when the capacitive touch button is in a lifted state, the signal value corresponding to the capacitive touch sensing device belongs to a second threshold interval, the maximum value of the first threshold interval is less than the minimum value of the second threshold interval, and before obtaining a set of signal values in response to the capacitive touch sensing device being triggered, the method further includes: S11, obtaining a maximum sampling period, wherein the time for the signal value corresponding to the capacitive touch sensing device to change from the second threshold interval to the first threshold interval within the first duration is the first to-be-determined time, the time for the signal value corresponding to the capacitive touch sensing device to change from the first threshold interval to the second threshold interval within the second duration is the second to-be-determined time, and the maximum sampling period is the smaller value of the first to-be-determined time and the second to-be-determined time; the first duration is the shortest time required for the capacitive touch key to change from the lifted state to the pressed state, and the second duration is the shortest time required for the capacitive touch key to change from the pressed state to the lifted state; S12, determining a first shake threshold and a second shake threshold based on a maximum sampling period, wherein the first shake threshold is used to reflect the fluctuation range of a signal value obtained by the capacitive touch sensing device under a preset sampling period when the capacitive touch button is in a pressed state; the second shake threshold is used to reflect the fluctuation range of a signal value obtained by the capacitive touch sensing device under a preset sampling period when the capacitive touch button is in a lifted state; and the maximum sampling period is twice the preset sampling period; S13, determining a target sampling period based on the maximum sampling period, the first shaking threshold and the second shaking threshold.
[0048] In this embodiment, since the setting of the target sampling period is also affected by the jitter of the device, in order to effectively distinguish the shaking state of the oximeter from the slow pressing / lifting state, the method in this embodiment can be used to select a suitable target sampling period: Get the maximum sampling period: first set a smaller sampling period, for example, the sampling period is 10ms; under this sampling period, collect the time for data changes during quick pressing and lifting actions. Here, the first duration is the shortest time required for the capacitive touch button to change from a lifted state to a pressed state, that is, the first duration is the time required for a quick press, and the first duration is a pre-set time. A pressing action completed within the first duration can be considered a quick pressing action; the second duration is the shortest time required for the capacitive touch button to change from a pressed state to a lifted state, that is, the second duration is the time required for a quick lift, and the second duration is a pre-set time. A lift action completed within the second duration can be considered a quick lift.
[0049] Optionally, the first duration and the second duration are the same, both being 80 ms.
[0050] The time when the signal value corresponding to the capacitive touch sensing device changes from the second threshold interval to the first threshold interval within the first duration is the first to-be-determined time, and the time when the signal value corresponding to the capacitive touch sensing device changes from the first threshold interval to the second threshold interval within the second duration is the second to-be-determined time, and the maximum sampling period is the smaller value between the first to-be-determined time and the second to-be-determined time.
[0051] Optionally, multiple first times to be determined can be collected, and the average value of the multiple first times to be determined can be used as the final first time to be determined; multiple second times to be determined can be collected, and the average value of the multiple second times to be determined can be used as the final second time to be determined; finally, the smaller value between the first time to be determined and the second time to be determined can be used as the maximum sampling period.
[0052] Determine the first shake threshold and the second shake threshold based on the maximum sampling period; set the time period threshold for pressing and lifting, that is, the preset sampling period; select the preset sampling period as 1 / 2 of the maximum sampling period, and collect data of the blood oxygen meter when it is not touched and shaken and when it is continuously touched and shaken under this sampling period, that is, the first shake threshold and the second shake threshold, wherein the first shake threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device under the preset sampling period when the capacitive touch button is in a pressed state, that is, the data during continuous touch shaking; the second shake threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device under the preset sampling period when the capacitive touch button is in a lifted state, that is, the data when it is not touched and shaken.
[0053] Optionally, obtain the fluctuation range of M groups of data under each state, M is preferably 5 groups, each group of data includes at least 5 shaking actions, the positive and negative values of a single change represent the changing trend of the data, the average value and the maximum value of the single change of each group of data are averaged, and the average value under a single state is calculated. After obtaining the corresponding average values of each group under each state, the maximum values are taken respectively according to the different types of shake thresholds to determine the first shake threshold and the second shake threshold.
[0054] Through this embodiment, the accuracy of the acquired target sampling period can be improved, thereby improving the accuracy and reliability of the state recognition method of the capacitive touch sensing device of this embodiment.
[0055] As an optional solution, determining the target sampling period based on the maximum sampling period, the first shaking threshold and the second shaking threshold includes: S21, obtaining a group of first adjustment signal values and a group of second adjustment signal values, wherein the interval collection time between adjacent signal values in the group of first adjustment signal values and the group of second adjustment signal values is the current sampling period, a group of first adjustment signal values are signal values corresponding to the capacitive touch sensing device in a process in which the capacitive touch key changes from a lifted state to a pressed state after a preset time, a group of second adjustment signal values are signal values corresponding to the capacitive touch sensing device in a process in which the capacitive touch key changes from a pressed state to a lifted state after a preset time, the preset time is greater than a third duration, the third duration is greater than the first duration, and the current sampling period is less than the maximum sampling period; S22, determining a first change mean based on a group of first adjustment signal values, and determining a second change mean based on a group of second adjustment signal values, wherein the first change mean is a mean of change values of adjacent signal values in a group of first adjustment signal values, and the second change mean is a mean of change values of adjacent signal values in a group of second adjustment signal values; S23, determining a target sampling period according to the first change mean, the second change mean, the first shaking threshold, and the second shaking threshold. Optionally, determining a target sampling period according to the first change mean, the second change mean, the first shaking threshold, and the second shaking threshold includes: S31, when the first change mean is less than the first shaking threshold, or the second change mean is less than the second shaking threshold, add the compensation value to the current sampling period to obtain a target sampling period, wherein the compensation value is a value obtained by dividing the difference between the maximum sampling period and the current sampling period by 2; S32, when the ratio of the first change mean divided by the first shake threshold is greater than the preset threshold, and the ratio of the second change mean divided by the second shake threshold is greater than the preset threshold, the current sampling period is subtracted from the compensation value to obtain the target sampling period.
[0056] Optionally, the target sampling period obtained in S31 or S32 is used as the current sampling period to repeatedly execute the above S21-S23 until the obtained first change mean and second change mean do not meet the conditions for executing S31 and S32, and the current sampling period at this time is determined as the final target sampling period.
[0057] In this embodiment, the sampling period is adjusted using the maximum sampling period, the first shaking threshold and the second shaking threshold.
[0058] It should be noted that the preset time is greater than the third duration, and the third duration is greater than the first duration. Specifically, the pressing and lifting actions in this embodiment are slow pressing actions and slow lifting actions. When the time required for the pressing action or the lifting action is greater than the third duration, it represents that the action is a slow pressing action or a slow lifting action; optionally, the third duration is 300ms.
[0059] A group of first adjustment signal values and a group of second adjustment signal values are obtained, wherein the interval collection time between adjacent signal values in the group of first adjustment signal values and the group of second adjustment signal values is the current sampling period, a group of first adjustment signal values are signal values corresponding to the capacitive touch sensing device in the process of the capacitive touch key changing from the lifted state to the pressed state after a preset time, a group of second adjustment signal values are signal values corresponding to the capacitive touch sensing device in the process of the capacitive touch key changing from the pressed state to the lifted state after a preset time, the preset time is greater than a third duration, the third duration is greater than the first duration, and the current sampling period is less than a maximum sampling period; a first change mean is determined based on a group of first adjustment signal values, and a second change mean is determined based on a group of second adjustment signal values, wherein the first change mean is the mean of the change values of adjacent signal values in the group of first adjustment signal values, and the second change mean is the mean of the change values of adjacent signal values in the group of second adjustment signal values; a target sampling period is determined according to the first change mean, the second change mean, the first shake threshold, and the second shake threshold. When the first change mean is less than the first shake threshold, or the second change mean is less than the second shake threshold, the current sampling period is added with the compensation value to obtain the target sampling period, wherein the compensation value is the difference between the maximum sampling period and the current sampling period divided by 2; when the first change mean is less than the first shake threshold, or the second change mean is less than the second shake threshold, it is considered that the current sampling period is too small to accurately distinguish the signal value corresponding to the shaking of the capacitive touch sensing device and the signal value corresponding to the pressing of the capacitive touch sensing device. In this case, the sampling period needs to be increased to obtain the target sampling period, that is, the target sampling period = (maximum sampling period - current sampling period) / 2 + current sampling period.
[0060] When the ratio of the first change mean divided by the first shake threshold is greater than the preset threshold, and the ratio of the second change mean divided by the second shake threshold is greater than the preset threshold, that is, when the first change mean is much greater than the first shake threshold and the second change mean is much greater than the second shake threshold, it is considered that the shaking state and the slow pressing state of the oximeter can be clearly distinguished at this time, so it is appropriately reduced to improve the key sensitivity, and the current sampling period is subtracted from the compensation value. At this time, the sampling period needs to be reduced to obtain the target sampling period. Specifically, the target sampling period = current sampling period - (maximum sampling period - current sampling period) / 2.
[0061] It should be noted that when the ratio of the change mean divided by the corresponding shake threshold is greater than the preset threshold, it is considered that the change mean is much greater than the corresponding shake threshold; optionally, the preset threshold is a constant greater than 1.
[0062] By selecting a suitable sampling period, the change in a set of signal values during slow movement can be effectively distinguished from the data when the capacitive touch sensing device is shaking, thereby avoiding the capacitive touch sensing device being unable to recognize the operating state of slow pressing or slow lifting after filtering out the shaking data.
[0063] Through this embodiment, the accuracy of the acquired target sampling period can be improved, thereby improving the accuracy and reliability of the state recognition method of the capacitive touch sensing device of this embodiment.
[0064] As an optional solution, a set of signal values is filtered to obtain a set of filtered signal values, including: S41, determining a set of change values based on a set of signal values, wherein the change value is an absolute value of a difference between adjacent signal values in the set of signal values; S42, filtering out the change values that fall within a preset change value range from the set of change values to obtain a set of filtered change values; S43, determining a set of filtered signal values based on the set of filtered change values.
[0065] In this embodiment, it is necessary to pre-acquire multiple groups of sample signal values of the capacitive touch sensing device in different states, that is, to pre-acquire sample signal values of the capacitive touch sensing device in different states within the target sampling period, and the different states of the capacitive touch sensing device include a stationary state of the capacitive touch sensing device, a shaking state of the capacitive touch sensing device when not touched, a shaking state of the capacitive touch sensing device when continuously touched, a touch-lifted state of the capacitive touch sensing device, a touch-pressed state of the capacitive touch sensing device, a touch-slowly lifted state of the capacitive touch sensing device, a touch-slowly pressed state of the capacitive touch sensing device, a touch-fast lifted state of the capacitive touch sensing device, and a touch-fast pressed state of the capacitive touch sensing device.
[0066] The method for obtaining the preset change value range can specifically include: obtaining the fluctuation range of M groups of data under a single state, M is preferably 5 groups, each group of data includes at least 5 shaking actions, the positive and negative single change amount represents the changing trend of the data, the minimum and maximum single change amounts of each group of data in the same state are averaged, and the average value under a single state is calculated. After obtaining the corresponding average values of each group under each state, the maximum values are taken as the thresholds for pressing and lifting according to different trends, forming the preset change value range.
[0067] A set of change values is determined based on a set of signal values, and change values in the set of change values that fall within a preset change value range are filtered out to obtain a set of filtered change values; and a set of filtered signal values is determined based on the set of filtered change values.
[0068] Exemplarily, the change value in a set of change values collected in real time is compared with a preset change value range. If it is within the preset change value range, it means that the signal value collected in real time is invalid and needs to be filtered out. It should be noted that the change value is obtained by subtracting the previous signal value from the subsequent signal value, and what is filtered out is the subsequent signal value corresponding to the change value; if it is not within the preset change value range, it means that the signal value collected this time is valid and does not need to be filtered out.
[0069] Through this embodiment, the accuracy of a group of signal values obtained after filtering can be improved, thereby improving the accuracy and reliability of the state recognition method of the capacitive touch sensing device of this embodiment.
[0070] As an optional solution, when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is determined according to the positive and negative conditions of a set of state change values, including: S51, when the number of consecutive positive state change values in a group of state change values is greater than a preset lift trend threshold, determining that the capacitive touch sensing device is in a lift state; S52: When the number of consecutive negative state change values in a group of state change values is greater than a preset pressing trend threshold, it is determined that the capacitive touch sensing device is in a pressed state.
[0071] In this embodiment, a preset lifting trend threshold and a preset pressing trend threshold are set by utilizing the fluctuation range composed of multiple groups of single changes of touch sensing signals in the normal lifting / pressing state, slow lifting / pressing state, and fast lifting / pressing state to judge the pressing or lifting state of the capacitive touch button of the capacitive touch sensing device.
[0072] Specifically, multiple groups of single change amounts are obtained in a single state when the number of changes is continuously positive or negative, preferably 3-5 groups, each group contains at least 3 complete lifting and pressing operations; the average value of the number of single change amounts corresponding to lifting and pressing in the three states is taken for comparison, and the minimum value is taken as the preset lifting trend threshold and the preset pressing trend threshold.
[0073] Specifically, a positive or negative value judgment is performed on a group of state change values collected in real time, and the statistics of the positive and negative values of the state change values are compared with the preset lifting trend threshold and the preset pressing trend threshold, so as to realize the recognition of the lifting or pressing state of the capacitive touch of the capacitive touch sensing device; specifically, if the state change value is positive, it means that there is a lifting trend, the current trend count value is increased by 1, and the pressing trend count value is cleared. If the number of lifting trend count values exceeds the lifting trend threshold, it means that the fluctuation range has reached the lifting trend, and it is identified as a lifting operation. At this time, the lifting trend count value is cleared; at the same time, if the state change value is negative, it indicates a pressing trend, the pressing trend count value is increased by 1, and the lifting trend count value is cleared. If the number of pressing trend count values exceeds the pressing trend threshold, it means that the fluctuation range has reached the pressing trend, and it is identified as a pressing operation. At this time, the pressing trend count value is cleared.
[0074] In order to improve the recognition accuracy and eliminate the error of misidentification as a trend, the method in this embodiment also includes a cumulative error elimination function to avoid the error of misidentification as a lifting trend or a pressing trend due to data fluctuations. Specifically, when the capacitive touch recognition state has two identical lifting or pressing trends, the time interval between the two identical lifting or pressing trends is calculated, and the trend count value of the latter lifting trend is determined based on the time interval, that is, whether the latter trend has timed out is determined based on the time interval. If it has timed out, the two identical trends before and after are considered to be one operation. If it has not timed out, the two identical trends before and after are considered to be two operations. Specifically, the obtained time interval is compared with a preset threshold. If the time interval is less than the preset threshold, the two identical lifting or two identical pressing operations are considered to be two operations; if the time interval is greater than the preset threshold, the two identical lifting or two identical pressing operations are considered to be one operation, the current trend is determined to have timed out, the trend count value of the current lifting or pressing trend is eliminated.
[0075] It can be understood that the present embodiment provides a state recognition method for a capacitive touch sensing device, by obtaining a set of signal values of the current state of the capacitive touch sensing device, and comparing and judging with a plurality of sets of sample signal values of the capacitive touch sensing device acquired in advance to identify the current state of the capacitive touch sensing device; this method of comparing and judging a set of signal values corresponding to the current state with a plurality of sets of sample signal values of the capacitive touch sensing device acquired in advance can avoid the situation where the capacitive touch sensing device fails to recognize the user when the user slowly presses or lifts the capacitive touch sensing device, thereby improving the recognition accuracy and facilitating user use.
[0076] Through this embodiment, the accuracy of determining the state of the capacitive touch sensing device in the current period can be improved, thereby improving the accuracy and reliability of the state recognition method of the capacitive touch sensing device of this embodiment.
[0077] Figure 3 is a schematic diagram of the structure of the state recognition device of the capacitive touch sensing device provided by the present invention, such as Figure 3 As shown, including but not limited to the following modules: An acquisition module 301 is used to acquire a set of signal values in response to the capacitive touch sensing device being triggered, wherein the set of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the set of signal values is the target sampling period; A filtering module 302 is used to filter a set of signal values to obtain a set of filtered signal values; A determination module 303, configured to determine a set of state change values based on the filtered set of signal values, wherein the state change value is a difference between adjacent signal values in the filtered set of signal values; A first judgment module 304 is used to judge that the capacitive touch sensing device in the period corresponding to the state change value is in the lifted state when the state change value is greater than a preset lift threshold, wherein the preset lift threshold is greater than 0; The second judgment module 305 is used to judge that the capacitive touch sensing device in the period corresponding to the state change value is in a pressed state when the state change value is less than a preset pressed threshold value, wherein the preset pressed threshold value is less than 0; The third judgment module 306 is used to judge the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of a group of state change values when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold.
[0078] According to the embodiments of the present application, in response to the capacitive touch sensing device being triggered, a group of signal values is obtained, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period; a group of signal values is filtered to obtain a group of filtered signal values; a group of state change values is determined based on the group of filtered signal values, wherein the state change value is the difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in the press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is judged according to the positive and negative conditions of a group of state change values; the state recognition method of the capacitive touch sensing device in the related art solves the technical problem that the state of the capacitive touch sensing device cannot be accurately identified, and the accuracy of the state recognition of the capacitive touch sensing device is improved.
[0079] It should be noted that the state recognition device of the capacitive touch sensing device provided by the present invention can execute the state recognition method of the capacitive touch sensing device of any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0080] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute the state recognition method of the capacitive touch sensing device, which includes: in response to the capacitive touch sensing device being triggered, obtaining a group of signal values, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period; filtering the group of signal values to obtain a group of filtered signal values; determining a group of state change values based on the filtered group of signal values, wherein the state change value is the difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in the lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in the press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, judging the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of a group of state change values.
[0081] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0082] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the state recognition method of the capacitive touch sensing device provided by the above embodiments, the method comprising: in response to the capacitive touch sensing device being triggered, obtaining a group of signal values, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period; filtering the group of signal values to obtain a group of filtered signal values; A group of state change values are determined based on a group of filtered signal values, wherein the state change value is the difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in a lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, the capacitive touch sensing device in the time period corresponding to the state change value is judged to be in a press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is judged according to the positive and negative conditions of a group of state change values.
[0083] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to perform the state recognition method of the capacitive touch sensing device provided by the above embodiments when the computer program is executed, the method comprising: in response to the capacitive touch sensing device being triggered, obtaining a group of signal values, wherein the group of signal values is obtained based on the capacitance state of the capacitive touch sensing device in the current time period, and the interval acquisition time between adjacent signal values in the group of signal values is the target sampling period; filtering the group of signal values to obtain a group of filtered signal values; determining a group of state change values based on the filtered group of signal values, wherein the state change value is the difference between adjacent signal values in the group of filtered signal values; when the state change value is greater than a preset lift threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in the lift state, wherein the preset lift threshold is greater than 0; when the state change value is less than a preset press threshold, judging that the capacitive touch sensing device in the time period corresponding to the state change value is in the press state, wherein the preset press threshold is less than 0; when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, judging the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of the group of state change values.
[0084] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0085] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A state recognition method for a capacitive touch sensing device, characterized in that: include: In response to the capacitive touch sensing device being triggered, a group of signal values is acquired, wherein the group of signal values is acquired based on the capacitance state of the capacitive touch sensing device in a current time period, and an interval acquisition time between adjacent signal values in the group of signal values is a target sampling period; Performing filtering on the set of signal values to obtain a set of filtered signal values; Determine a set of state change values based on the filtered set of signal values, wherein the state change values are differences between adjacent signal values in the filtered set of signal values; When the state change value is greater than a preset lift threshold, determining that the capacitive touch sensing device in the time period corresponding to the state change value is in a lift state, wherein the preset lift threshold is greater than 0; When the state change value is less than a preset pressing threshold, determining that the capacitive touch sensing device in the time period corresponding to the state change value is in a pressed state, wherein the preset pressing threshold is less than 0; When the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, the state of the capacitive touch sensing device in the current time period is determined according to the positive and negative conditions of the set of state change values.
2. The state recognition method of the capacitive touch sensing device according to claim 1, characterized in that: The capacitive touch sensing device includes a capacitive touch button, when the capacitive touch button is in a pressed state, a signal value corresponding to the capacitive touch sensing device belongs to a first threshold interval, when the capacitive touch button is in a lifted state, a signal value corresponding to the capacitive touch sensing device belongs to a second threshold interval, a maximum value of the first threshold interval is less than a minimum value of the second threshold interval, and before acquiring a set of signal values in response to the capacitive touch sensing device being triggered, the method further includes: Obtaining a maximum sampling period, wherein the time for the signal value corresponding to the capacitive touch sensing device to change from the second threshold interval to the first threshold interval within the first duration is the first to-be-determined time, and the time for the signal value corresponding to the capacitive touch sensing device to change from the first threshold interval to the second threshold interval within the second duration is the second to-be-determined time, and the maximum sampling period is the smaller value of the first to-be-determined time and the second to-be-determined time; the first duration is the shortest time required for the capacitive touch key to change from the lifted state to the pressed state, and the second duration is the shortest time required for the capacitive touch key to change from the pressed state to the lifted state; A first shaking threshold and a second shaking threshold are determined based on the maximum sampling period, wherein the first shaking threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device in the preset sampling period when the capacitive touch button is in the pressed state; the second shaking threshold is used to reflect the fluctuation range of the signal value obtained by the capacitive touch sensing device in the preset sampling period when the capacitive touch button is in the lifted state; the maximum sampling period is twice the preset sampling period; The target sampling period is determined based on the maximum sampling period, the first fluctuation threshold, and the second fluctuation threshold.
3. The state recognition method of the capacitive touch sensing device according to claim 2, characterized in that: The step of determining the target sampling period based on the maximum sampling period, the first shaking threshold and the second shaking threshold comprises: Acquire a group of first adjustment signal values and a group of second adjustment signal values, wherein the interval collection time between adjacent signal values in the group of first adjustment signal values and the group of second adjustment signal values is a current sampling period, the group of first adjustment signal values are signal values corresponding to the capacitive touch sensing device in a process in which the capacitive touch key changes from the lifted state to the pressed state after a preset time, the group of second adjustment signal values are signal values corresponding to the capacitive touch sensing device in a process in which the capacitive touch key changes from the pressed state to the lifted state after the preset time, the preset time is greater than a third duration, the third duration is greater than the first duration, and the current sampling period is less than the maximum sampling period; Determine a first change mean value based on the set of first adjustment signal values, and determine a second change mean value based on the set of second adjustment signal values, wherein the first change mean value is a mean of change values of adjacent signal values in the set of first adjustment signal values, and the second change mean value is a mean of change values of adjacent signal values in the set of second adjustment signal values; The target sampling period is determined according to the first change mean, the second change mean, the first shaking threshold, and the second shaking threshold.
4. The state recognition method of the capacitive touch sensing device according to claim 3, characterized in that: The step of determining the target sampling period according to the first change mean, the second change mean, the first shaking threshold, and the second shaking threshold includes: When the first change mean is less than the first shaking threshold, or the second change mean is less than the second shaking threshold, adding a compensation value to the current sampling period to obtain the target sampling period, wherein the compensation value is a value obtained by dividing the difference between the maximum sampling period and the current sampling period by 2; When the ratio of the first change mean divided by the first shake threshold is greater than the preset threshold, and the ratio of the second change mean divided by the second shake threshold is greater than the preset threshold, the current sampling period is subtracted from the compensation value to obtain the target sampling period.
5. The state recognition method of the capacitive touch sensing device according to claim 1, characterized in that: The filtering process is performed on the set of signal values to obtain a set of filtered signal values, including: determining a set of variation values based on the set of signal values, wherein the variation values are absolute values of differences between adjacent signal values in the set of signal values; Filtering out the change values that fall within a preset change value range from the set of change values to obtain a set of filtered change values; The filtered set of signal values is determined based on the filtered set of variation values.
6. The state recognition method of the capacitive touch sensing device according to claim 1, characterized in that: When the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold, judging the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of the set of state change values includes: When the number of consecutive positive state change values in the set of state change values is greater than a preset lifting trend threshold, determining that the capacitive touch sensing device is in the lifting state; When the number of consecutive negative state change values in the set of state change values is greater than a preset pressing trend threshold, it is determined that the capacitive touch sensing device is in the pressing state.
7. A state recognition device for a capacitive touch sensing device, characterized in that: include: an acquisition module, configured to acquire a set of signal values in response to the capacitive touch sensing device being triggered, wherein the set of signal values is obtained based on the capacitance state of the capacitive touch sensing device in a current time period, and the interval acquisition time between adjacent signal values in the set of signal values is a target sampling period; A filtering module, used for filtering the set of signal values to obtain a set of filtered signal values; a determination module, configured to determine a set of state change values based on the filtered set of signal values, wherein the state change values are differences between adjacent signal values in the filtered set of signal values; A first judgment module, configured to judge that the capacitive touch sensing device in a time period corresponding to the state change value is in a lifted state when the state change value is greater than a preset lifted threshold, wherein the preset lifted threshold is greater than 0; A second judgment module is used to judge that the capacitive touch sensing device in the time period corresponding to the state change value is in a pressed state when the state change value is less than a preset pressed threshold value, wherein the preset pressed threshold value is less than 0; The third judgment module is used to judge the state of the capacitive touch sensing device in the current time period according to the positive and negative conditions of the group of state change values when the state change value is less than or equal to the preset lift threshold and greater than or equal to the preset press threshold.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the state recognition method of the capacitive touch sensing device according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the state recognition method of the capacitive touch sensing device according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the state recognition method of the capacitive touch sensing device according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Method and system for controlling capacitive touch screen
CN121029027A