CN113703659A - State detection method and device, wearable device and readable storage medium - Google Patents

State detection method and device, wearable device and readable storage medium Download PDF

Info

Publication number
CN113703659A
CN113703659A CN202111020057.4A CN202111020057A CN113703659A CN 113703659 A CN113703659 A CN 113703659A CN 202111020057 A CN202111020057 A CN 202111020057A CN 113703659 A CN113703659 A CN 113703659A
Authority
CN
China
Prior art keywords
state
value
wearable device
detected
comparison value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111020057.4A
Other languages
Chinese (zh)
Other versions
CN113703659B (en
Inventor
童伟峰
张亮
方飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bestechnic Shanghai Co Ltd
Original Assignee
Bestechnic Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bestechnic Shanghai Co Ltd filed Critical Bestechnic Shanghai Co Ltd
Priority to CN202111020057.4A priority Critical patent/CN113703659B/en
Publication of CN113703659A publication Critical patent/CN113703659A/en
Application granted granted Critical
Publication of CN113703659B publication Critical patent/CN113703659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/05Digital input using the sampling of an analogue quantity at regular intervals of time, input from a/d converter or output to d/a converter
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/124Sampling or signal conditioning arrangements specially adapted for A/D converters
    • H03M1/1245Details of sampling arrangements or methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Electronic Switches (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a state detection method and device, wearable equipment and a readable storage medium. The state detection method is applied to wearable equipment, the wearable equipment comprises a plurality of to-be-detected paths and ADC modules connected with the to-be-detected paths, the to-be-detected paths respectively comprise to-be-detected capacitors, and the to-be-detected capacitors are located at a touch part or a pressing part of the wearable equipment; the detection method comprises the following steps: acquiring a sampling value output by the ADC module; the sampling values are sampling values respectively corresponding to the capacitors to be detected; determining a state of the wearable device according to the sampling value; the state of the wearable device includes: a first state and a second state; the first state is: not touched or pressed by the user, the second state being: touched or pressed by a user. The detection method is used for improving the efficiency of state detection and reducing the power consumption of state detection.

Description

State detection method and device, wearable device and readable storage medium
Technical Field
The application relates to the technical field of intelligent equipment, in particular to a state detection method and device, wearable equipment and a readable storage medium.
Background
In order to respond to the operation or interaction of the user in time, the wearable device needs to detect the state of the wearable device in real time, so as to respond according to the detected state.
In the prior art, in order to implement state detection of a wearable device, a plurality of processing modules are generally provided, and the plurality of processing modules respectively detect capacitance changes of corresponding state detection points (for example, contacts) to determine state changes.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for detecting a state, a wearable device, and a readable storage medium, so as to improve efficiency of state detection and reduce power consumption of state detection.
In a first aspect, an embodiment of the present application provides a state detection method, which is applied to a wearable device, where the wearable device includes a plurality of paths to be detected and an ADC module connected to the plurality of paths to be detected, each of the plurality of paths to be detected includes a capacitor to be detected, and the capacitor to be detected is located at a touch component or a press component of the wearable device; the detection method comprises the following steps: acquiring a sampling value output by the ADC module; the sampling values are sampling values corresponding to the capacitors to be detected respectively; determining a state of the wearable device according to the sampling value; the state of the wearable device includes: a first state and a second state; the first state is: not touched or pressed by the user, the second state being: touched or pressed by a user.
In the embodiment of the present application, compared with the prior art, instead of using a plurality of processing modules to detect capacitance changes of corresponding detection points, an ADC (Analog-to-Digital Converter) module is used to sample a plurality of capacitors to be detected, so as to reduce power consumption of state detection; furthermore, based on the sampling value that the electric capacity that waits to detect of ADC module output corresponds, can effectively and determine wearable equipment's state fast, improve the efficiency that the state detected.
As a possible implementation manner, for each path to be detected, the detection method further includes: acquiring a comparison value of a previous moment; the previous time is one or more times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected; determining a comparison value at the current moment according to the comparison value at the previous moment based on the state of the wearable device; and determining the update state of the wearable device according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device.
In the embodiment of the application, each capacitor to be detected corresponds to a comparison value in addition to a sampling value, and the state of the wearable device can be updated through the comparison value; the corresponding sampling value of the capacitor can track the slow change caused by the change of temperature, humidity and the like, so that the final state detection result can eliminate the change of the measured capacitor caused by temperature drift and other drifts, and the accuracy of state detection is improved.
As a possible implementation manner, the determining, based on the state of the wearable device, the comparison value at the current time according to the comparison value at the previous time includes: if the state of the wearable equipment is the first state; determining a comparison value of the current moment according to the sampling value of the current moment and the comparison value of the previous moment; and if the state of the wearable device is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In the embodiment of the application, if the state of the wearable device is an unused state (i.e. not touched or pressed), the comparison value at the current moment is effectively determined according to the sampling value at the current moment and the comparison value at the previous moment; if the state of the wearable device is the used state (namely, the wearable device is touched or pressed), the comparison value at the previous moment is kept, and effective determination of the comparison value is achieved.
As a possible implementation manner, if the state of the wearable device is the first state, the previous time is a time before the current time; the comparison value at the current time is represented as: s2 ═ S1 (1-Q) + R ═ Q; wherein, S1 is a comparison value of a previous time of the current time, R is a sampling value of the current time, and Q is a preset value.
In the embodiment of the present application, the comparison value at the current time is effectively determined through the correspondence.
As a possible implementation manner, for each path to be detected, the detection method further includes: acquiring a sampling value of a previous moment and a comparison value of a previous moment of a current moment; the previous time is a plurality of times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected; determining a comparison value of the current moment according to the sampling value of the previous moment and the comparison value of the previous moment of the current moment based on the state of the wearable device; and determining the update state of the wearable device according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device.
In the embodiment of the application, each capacitor to be detected corresponds to a comparison value in addition to a sampling value, and the state of the wearable device can be updated through the comparison value; the sampling value of the capacitor can track the slow change caused by the change of temperature, humidity and the like, so that the final state detection result can eliminate the change of the measured capacitor caused by temperature drift and other drifts, and the accuracy of state detection is improved.
As a possible implementation manner, the determining, based on the state of the wearable device, the comparison value at the current time according to the sampling value at the previous time and the comparison value at the previous time of the current time includes: if the state of the wearable device is a first state, filtering sampling values at a plurality of moments before the current moment to obtain a comparison value at the current moment; the filtering processing is averaging processing or weighted averaging processing; and if the state of the wearable device is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In the embodiment of the application, the comparison value at the current moment is effectively determined by filtering the sampling values at a plurality of moments before the current moment.
As a possible implementation manner, the determining, based on the state of the wearable device, an updated state of the wearable device according to the sampled value at the current time and the comparison value at the current time includes: if the state of the wearable device is the first state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is larger than a first preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is larger than a first preset difference value, determining that the updating state of the wearable equipment is the second state; if the state of the wearable device is the second state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value; and if the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value, determining that the updating state of the wearable device is the first state.
In the embodiment of the application, based on different states of the wearable device, the difference between the sampling value and the comparison value at the current moment is judged, and effective determination of the update state is achieved.
As a possible implementation manner, the detection method further includes: and if the time for keeping the state of the wearable equipment in the second state exceeds the preset time, updating the state of the wearable equipment to the first state.
In the embodiment of the application, if the time for keeping the state of the wearable device in the second state exceeds the preset time, which indicates that there may be a situation of false detection or failure, the state can be actively updated at this time, so that the accuracy of state detection is improved.
As a possible implementation, the wearable device is: wireless earphone, intelligent wrist-watch, or intelligent bracelet.
In a second aspect, an embodiment of the present application provides a state detection apparatus, which is applied to a wearable device, where the wearable device includes a plurality of paths to be detected and an ADC module connected to the plurality of paths to be detected, each of the plurality of paths to be detected includes a capacitor to be detected, and the capacitor to be detected is located at a touch component or a pressing component of the wearable device; the detection device includes: functional modules for implementing the method for detecting a state in the first aspect and any one of the possible implementations of the first aspect.
In a third aspect, an embodiment of the present application provides a wearable device, including: a plurality of pathways to be detected; the plurality of to-be-detected channels comprise to-be-detected capacitors, and the to-be-detected capacitors are located at a touch part or a pressing part of the wearable equipment; the ADC module is connected with the plurality of to-be-detected channels; a processor connected to the ADC module; the processor is configured to perform the method for detecting a state as described in the first aspect and any one of the possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a computer, the method for detecting a state as described in the first aspect and any one of the possible implementation manners of the first aspect is performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is an external structural schematic diagram of a wearable device provided in an embodiment of the present application;
fig. 2 is a schematic internal structural diagram of a wearable device provided in an embodiment of the present application;
fig. 3 is a circuit diagram of a capacitance detection circuit according to an embodiment of the present application;
fig. 4 is a flowchart of a method for detecting a status according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a state detection device according to an embodiment of the present application.
Icon: 100-a wearable device; 110-an apparatus body; 120-a pathway to be detected; 130-ADC module; 140-a processor; 150-a memory; 500-means for detecting a state; 510-an obtaining module; 520-processing module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The state detection method provided by the embodiment of the application can be applied to wearable equipment, and is particularly applied to detection of the capacitance of the wearable equipment. Wearable devices, for example: wireless earphones, smart watches, or smart bracelets, and the like.
Taking a smart watch as an example, please refer to fig. 1, which is an external structural schematic diagram of a wearable device 100 provided in the embodiment of the present application, where the wearable device 100 includes a device body 110.
The device body 110, may have different embodiments in combination with different wearable devices 100, for example: the device body 110 of the smart watch may employ the embodiment shown in fig. 1. If be wireless earphone or intelligent bracelet, then adopt general wireless earphone body or intelligent bracelet body's implementation can, do not do the restriction in this application embodiment.
Referring to fig. 2, which is a schematic diagram of an internal structure of the wearable device 100 according to the embodiment of the present application, the wearable device 100 further includes: a plurality of vias to be detected 120, each via to be detected 120 of the plurality of vias to be detected 120 comprising a capacitor to be detected.
Wherein the plurality of vias to be detected 120 may include: a plurality of to-be-detected pathways 120 for detecting different use states of the wearable device 100. Examples include: a to-be-detected path 120 for detecting a wearing state of the wearable device 100; a to-be-detected path 120 for detecting a touch state of the wearable device 100; and a to-be-detected pathway 120 for detecting key operations of the wearable device 100.
In an embodiment of the present application, the detected states include: a touch state and a press state, the touch state including being not touched and being touched; the pressed state includes not pressed and pressed. Further, the state of the final wearable device 100 may include: the touch screen comprises a first state and a second state, wherein the first state is not touched or pressed by a user, and the second state is touched or pressed by the user.
The capacitance to be detected may be located at a touch part or a pressing part of the wearable device 100. For example: the touch component or the pressing component can be a shell position of a wireless earphone or a smart watch, and the capacitor to be detected can be close to or close to the shell position. The touch part or the pressing part can be a wireless earphone handle, and the capacitor to be detected can be arranged in the earphone handle.
The wearable device 100 further includes: and the ADC module 130 is connected to the plurality of paths to be detected 120, and the ADC module 130 is configured to sample the capacitances to be detected of the plurality of paths to be detected 120. The sampling value corresponding to the capacitor to be detected can be a direct capacitance value or a voltage value sampled by an additionally arranged capacitor detection circuit, and is not limited in the embodiment of the application.
Referring to fig. 3, a schematic circuit structure diagram of a capacitance detection circuit according to an embodiment of the present application is shown in fig. 3, where a capacitance to be detected is C0, and the capacitance detection circuit includes: a reference capacitor C1, a positive sampling capacitor C2, a negative sampling capacitor C3, a first switch S1, a second switch S2, and a third switch S3.
The reference capacitor C1 is connected in parallel with the first switch S1, and the reference capacitor C1 is connected with the capacitor C0 to be detected; one end of a second switch S2 is connected with the capacitor C0 to be detected, and the other end of the second switch S2 is connected with the positive sampling capacitor C2; one end of a third switch S3 is connected with a capacitor C0 to be detected, and the other end of the third switch S3 is connected with a negative sampling capacitor C3; and the ADC module 130 is connected to the positive sampling capacitor C2 and the negative sampling capacitor C3, respectively, and is configured to sample a voltage value of the positive sampling capacitor C2 and/or a voltage value of the negative sampling capacitor C3.
In addition, one end of the capacitor to be detected C0, the positive sampling capacitor C2 and the negative sampling capacitor C3 are respectively grounded. And, at one end of the reference capacitor C1, 0 may represent ground, 1 may represent a ground voltage, and a state of 0 or 1 may be switched by switching control.
And, the voltage value of the positive sampling capacitor C2 can be represented as Vp, and the voltage value of the negative sampling capacitor C3 can be represented as Vn.
On the basis of adding the capacitance detection circuit, the ADC module 130 does not directly sample each path to be detected 120, but determines the sampling value corresponding to the capacitance to be detected C0 by sampling the voltage value of the capacitance detection circuit.
In order to realize effective detection of capacitance, as an optional implementation manner, a detection flow of the capacitance detection circuit includes:
phase1 first switch S1 is closed and reference capacitor C1 is discharged.
Phase2 the first switch S1 is opened and the charge on the capacitor C0 to be detected is partially transferred to the reference capacitor C1.
Phase3 the first switch S1 is closed and the second switch S2 is open, keeping the charge on the positive sampling capacitor C2 constant, and thus Vp (i.e., the voltage of the positive sampling capacitor C2) constant.
Phase4 first switch S1 is closed and reference capacitor C1 is discharged.
Phase5 the first switch S1 is opened and the charge on the capacitor C0 to be detected is partially transferred to the reference capacitor C1.
Phase6 the first switch S1 is closed and the third switch S3 is open, keeping the charge on the negative sampling capacitor C3 constant, and thus Vn (i.e., the voltage of the negative sampling capacitor C3) constant.
After Phase6, the ADC block 130 may quantize the voltage on the positive sampling capacitor C2/negative sampling capacitor C3. According to the voltage measured by the ADC module 130, the corresponding capacitance sampling value may be further determined, or the usage status may be determined directly according to the voltage.
In the above detection flow, all steps may be performed; only the first three steps or only the last three steps may be performed, and the ADC module 130 may implement corresponding sampling, which is not limited in the embodiment of the present application.
As can be seen from the above detection process, for the capacitance detection circuit, the current supplied by the power supply (Vref) in the Phase1 to Phase3 stage does not directly flow to the ground, but is stored in the capacitor C0 to be detected and the reference capacitor C1; finally, the current of the capacitor C0 to be detected is charged to the power supply at Phase3, and the reference capacitor C1 has no charge, so that the power consumption can be effectively reduced.
Similarly, the current on the power supply does not flow to the ground directly in the Phase4 to Phase6 stages, but discharges the charges stored on the capacitor C0 to be detected and the reference capacitor C1 to the ground; finally, the charge on the capacitor C0 to be detected is discharged at Phase6, and the reference capacitor C1 has no charge, so that the power consumption can be effectively reduced.
Therefore, a complete conversion process can be understood as a process of charging and discharging the capacitor C0 to be detected, assuming that the Phase switching frequency is 60KHz, and then the frequency of a complete process is 10KHz, the current consumed by final charging and discharging is: i ═ Cs × Vref × 10K. Assuming that Cs is 50pF and Vref is 1.5V, the current consumed for charging and discharging is 0.75 uA. It can be seen that power consumption can be effectively reduced by the capacitance detection circuit described above.
Further, the voltage value at Vp can be expressed as:
Figure BDA0003241555620000081
the voltage value at Vn can be expressed as:
Figure BDA0003241555620000091
assuming that Vp and Vn are sampled by the final ADC module 130, the voltage value finally sampled by the ADC module 130 is expressed as:
Figure BDA0003241555620000092
for the plurality of paths 120 to be detected, the ADC module 130 may sample each capacitor to be detected in a time-sharing sampling manner. For example: and sampling according to a preset time-sharing sampling period. In this way, the ADC module 130 can more efficiently sample the capacitance to be detected.
In order to realize time-sharing sampling, a switch module may be further disposed between the ADC module 130 and the to-be-detected path 120, and the switch module may control on/off between each to-be-detected path 120 and the ADC module 130, so as to realize time-sharing sampling.
The wearable device 100 further includes: a processor 140 coupled to the ADC module 130, the processor 140 configured to process the sampled values output by the ADC module 130 to determine a status of the wearable device 100. Therefore, the execution subject of the state detection method provided by the embodiment of the present application is the processor 140.
The Processor 140 may be a general-purpose Processor 140, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor 140 may be any conventional processor or the like.
In addition to the processor 140, a memory 150 may be included within the wearable device 100, and the memory 150 may be connected to the processor 140 and the ADC module 130, respectively. In one aspect, the memory 150 may store the sampled values output by the ADC module 130; on the other hand, the memory 150 may also store the processing result output by the processor 140; and the memory 150 may further store a program corresponding to the state detection method or apparatus provided in the embodiment of the present application, and the processor 140 executes the program stored in the memory 150 to perform the state detection method provided in the embodiment of the present application.
The Memory 150 may include, but is not limited to, a RAM (Random Access Memory), a ROM (Read Only Memory), a PROM (Programmable Read-Only Memory), an EPROM (Erasable Read-Only Memory), an EEPROM (electrically Erasable Read-Only Memory), and the like.
Based on the above description of the wearable device 100, please refer to fig. 4, which is a flowchart of a state detection method provided in an embodiment of the present application, the state detection method includes:
step 410: the sampled value output by the ADC block 130 is obtained. The sampling values are sampling values corresponding to the capacitors to be detected respectively.
Step 420: determining a state of the wearable device 100 from the sampled values. The states of wearable device 100 include: a first state and a second state; the first state is: the second state is that the user does not touch or press the touch screen, and the second state is that: touched or pressed by a user.
In the embodiment of the present application, compared with the prior art, instead of using a plurality of processing modules to detect capacitance changes of corresponding detection points, the ADC module 130 is used to sample a plurality of capacitors to be detected, so as to reduce power consumption of state detection; furthermore, based on the sampling value corresponding to the to-be-detected capacitor output by the ADC module 130, the state of the wearable device 100 can be effectively and quickly determined, and the efficiency of state detection is improved.
Next, a detailed embodiment of the method for detecting this state will be described.
In conjunction with the foregoing description of the embodiment, in step 410, the sampling value output by the ADC module 130 is a sampling value corresponding to each capacitor to be detected, where the sampling value may be a voltage sampling value or a capacitance sampling value.
Furthermore, in step 410, the output sample value may be a real-time sample value, such as: sampling value of the current moment; also non-real time sampled values are possible, for example: the sampling value at any time is not limited in the embodiment of the present application.
With the introduction of the foregoing time-sharing sampling, the sampling value output in step 410 may be the sampling value corresponding to the currently detected capacitor; or may be a sampled value corresponding to the detected capacitance corresponding to any one or more time instants.
In step 420, the state of the wearable device 100 is determined from the sampled values. Among them, the wearable device 100 is divided into a first state (not touched or pressed by the user) and a second state (touched or pressed by the user). It is understood that wearable device 100 is generally in the first state for a greater time than in the second state.
Assuming that the sampled value in step 410 is a sampled value corresponding to a detected capacitor at any time, as an alternative embodiment, step 420 includes: comparing the sampling value corresponding to the detected capacitor with a preset sampling value, and if the sampling value corresponding to the detected capacitor is greater than the preset sampling value, determining that the state of the wearable device 100 is a second state; and if the sampling value corresponding to the detected capacitance is smaller than the preset sampling value, determining that the state of the wearable device 100 is the first state.
The preset sampling value can be set by combining with a specific application scene, the preset sampling values corresponding to different detected capacitors can be the same or different, and the specific value is not limited in the embodiment of the application.
Assuming that the sampling value in step 410 is a sampling value corresponding to a plurality of detected capacitances at any time, as an alternative embodiment, step 420 includes: comparing sampling values corresponding to specific detected capacitors in the plurality of detected capacitors; the specific detected capacitance may be a capacitance in the preset to-be-detected path 120, and the number of the preset to-be-detected paths 120 may be 2. For example: specific detected capacitances include: the detection circuit comprises a capacitor 1 to be detected and a capacitor 2 to be detected, wherein the capacitor 1 to be detected is a capacitor in a first path to be detected, and the capacitor 2 to be detected is a capacitor in a second path to be detected.
Furthermore, if the difference between the sampling values corresponding to the specific detected capacitance is greater than the preset difference value, it is determined that the wearable device 100 is in the second state; if the difference value between the sampling values corresponding to the specific detected capacitance is smaller than the preset difference value, the wearable device 100 is determined to be in the first state.
The preset difference value can be set by combining with a specific application scene, and the specific value is not limited in the embodiment of the application.
The state of the wearable device 100 determined in step 420 may be understood as a temporary state, and in practical applications, since the sampled value corresponding to the capacitance to be detected may drift along with changes of temperature, humidity, and the like, in order to improve accuracy of state detection, in the embodiment of the present application, the reference value is introduced, and may also be understood as a reference value, or the state quantity is updated, so as to update the state determined in step 420.
The comparison value, which is also the comparison value corresponding to each capacitance to be detected, is the same as the definition or type of the sampling value, and may also be a capacitance value or a voltage value, etc., and of course, it should be consistent with the sampling value, for example: if the sampled value is a capacitance value, the comparison value is also a capacitance value.
For each capacitor to be detected, the initial comparison value may be an initial sampling value output by the ADC module 130, and during the subsequent state updating process, the comparison value is also updated.
In the present example, two alternative implementations are provided to enable updating of the state of the wearable device 100, the main difference between the two implementations being the implementation of determining the comparison value. Regardless of the implementation mode, each capacitor to be detected corresponds to a comparison value in addition to a sampling value, and the state of the wearable device 100 can be updated through the comparison value; the sampling value of the capacitor can track the slow change caused by the change of temperature, humidity and the like, so that the final state detection result can eliminate the change of the measured capacitor caused by temperature drift and other drifts, and the accuracy of state detection is improved.
As a first optional implementation, the detection method further includes: acquiring a comparison value of a previous moment; the previous time is one or more times before the current time; the comparison values are respectively corresponding to the capacitors to be detected; determining a comparison value at the current moment according to a comparison value at a previous moment based on the state of the wearable device 100; based on the state of the wearable device 100, an updated state of the wearable device 100 is determined according to the sampled value at the current time and the compared value at the current time.
The current time is only one of the situations, and in actual application, the current time may also be any one time, and correspondingly, the previous time is one or more times before the any time, which is not limited in the embodiment of the present application.
The comparison value at the previous time, the detected capacitance corresponding to the sampled value at the current time should be identical, for example: if the sampling value at the current time is the sampling value corresponding to the detected capacitor 1, the comparison value at the previous time is the comparison value corresponding to the detected capacitor 1 at the time before the current time.
As an optional embodiment, determining the comparison value at the current time from the comparison value at the previous time based on the state of the wearable device 100 includes: if the state of the wearable device 100 is the first state; determining a comparison value at the current moment according to the sampling value at the current moment and the comparison value at the previous moment; if the state of the wearable device 100 is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In this embodiment, if the state of the wearable device 100 is the unused state, the effective determination of the comparison value at the current time is realized according to the sampling value at the current time and the comparison value at the previous time; if the state of the wearable device 100 is the used state, the comparison value at the previous moment is maintained, and effective determination of the comparison value is realized.
Wherein, if the previous time is a time before the current time, the comparison value of the current time may be represented as: s2 ═ S1 (1-Q) + R ═ Q; wherein, S1 is a comparison value of a previous time of the current time, R is a sampling value of the current time, and Q is a preset value.
If the previous time is a plurality of times before the current time, the comparison value at the current time may be a comparison value at a specific time in the previous times, or an average or a weighted average of the comparison values at the previous times, which is not limited in the embodiment of the present application.
If the state of the wearable device 100 is the second state, the comparison value at the current time does not need to be updated.
After determining the comparison value at the current time, based on the state of the wearable device 100, an updated state of the wearable device 100 is determined according to the sampling value at the current time and the comparison value at the current time. As an optional implementation manner, the determination manner of the update status is: if the state of the wearable device 100 is the first state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is greater than a first preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is greater than a first preset difference value, determining that the update state of the wearable device 100 is a second state; if the state of the wearable device 100 is the second state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value, it is determined that the update state of the wearable device 100 is the first state.
In such an embodiment, based on different states of the wearable device 100, a difference between the sampling value and the comparison value at the current time is determined, and an effective determination of the update state is achieved.
The first preset difference value and the second preset difference value may be set in combination with a specific application scenario, and the specific values are not limited in this embodiment of the application.
If the final judgment result does not belong to the above judgment results, it is determined that the updated state of the wearable device 100 is consistent with the state of the wearable device 100, and it can be understood that the state is not changed.
As a second optional implementation, the detection method further includes: acquiring a sampling value of a previous moment and a comparison value of a previous moment of a current moment; the previous time is a plurality of times before the current time; determining a comparison value at the current moment according to the sampling value at the previous moment and the comparison value at the previous moment of the current moment based on the state of the wearable device 100; based on the state of the wearable device 100, an updated state of the wearable device 100 is determined according to the sampled value at the current time and the compared value at the current time.
In this embodiment, the determination of the comparison value at the current time can be achieved without acquiring comparison values at a plurality of times. Wherein the detected capacitance corresponding to the sample value at the previous time instant should coincide with that in step 410.
As an alternative embodiment, determining the comparison value at the current time according to the sampling value at the previous time and the comparison value at the previous time at the current time includes: if the state of the wearable device 100 is the first state, filtering the sampling values at a plurality of moments before the current moment to obtain a comparison value at the current moment; the filtering processing is averaging processing or weighted averaging processing; if the state of the wearable device 100 is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In this embodiment, if the state of the wearable device 100 is the first state, the comparison value at the current time may be obtained by performing an averaging process or a weighted averaging process on the sampled values at a plurality of times before the current time. If the state of the wearable device 100 is the second state, the comparison value at the previous moment of the current moment is directly used as the comparison value at the current moment.
Further, after determining the comparison value at the current time, the embodiment of determining the update state of the wearable device 100 is the same as that in the first embodiment, and the description is not repeated here.
As described in the foregoing embodiments, the wearable device 100 should remain in the first state most of the time, and therefore, as an optional implementation, the detection method further includes: if the time that the state of the wearable device 100 is maintained in the second state exceeds the preset time, the state of the wearable device 100 is updated to the first state.
In this embodiment, if the time that the state of the wearable device 100 is maintained in the second state exceeds the preset time, which indicates that there may be a false detection or a failure, the state may be actively updated, so as to improve the accuracy of state detection, so as to avoid that the wearable device 100 enters the second state by mistake and cannot jump out of the false state, which seriously affects the user.
The preset time may be set in combination with a specific application scenario, for example: setting is made in conjunction with the pressing or touching frequency of the wearable device 100, for example: 5S, 10S, etc., and specific values thereof are not limited in the examples of the present application.
Based on the same inventive concept, please refer to fig. 5, an embodiment of the present application further provides a status detecting apparatus 500, including: an obtaining module 510 and a processing module 520, wherein the detecting device of the state corresponds to the detecting method of the state in the foregoing embodiments, and can also be applied to the processor 140.
An obtaining module 510, configured to obtain a sampling value output by the ADC module 130; the sampling values are sampling values respectively corresponding to the capacitors to be detected; a processing module 520 for determining a state of the wearable device 100 from the sampled values; the states of wearable device 100 include: a first state and a second state; the first state is: not touched or pressed by the user, the second state being: touched or pressed by a user.
In this embodiment of the application, for each to-be-detected path 120, the obtaining module 510 is further configured to: acquiring a comparison value of a previous moment; the previous time is one or more times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected; the processing module 520 is further configured to: determining a comparison value at the current moment according to the comparison value at the previous moment based on the state of the wearable device 100; and determining the update state of the wearable device 100 according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device 100.
In this embodiment, the processing module 520 is specifically configured to: if the state of the wearable device 100 is the first state; determining a comparison value of the current moment according to the sampling value of the current moment and the comparison value of the previous moment; if the state of the wearable device 100 is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In this embodiment of the present application, the obtaining module 510 is further configured to: for each path 120 to be detected, acquiring a sampling value at a previous moment and a comparison value at a previous moment of the current moment; the previous time is a plurality of times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected; the processing module 520 is further configured to: determining a comparison value of the current moment according to the sampling value of the previous moment and a comparison value of the previous moment of the current moment based on the state of the wearable device 100; and determining the update state of the wearable device 100 according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device 100.
In this embodiment, the processing module 520 is further configured to: if the state of the wearable device 100 is the first state, filtering the sampling values at a plurality of moments before the current moment to obtain a comparison value at the current moment; the filtering processing is averaging processing or weighted averaging processing; if the state of the wearable device 100 is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
In this embodiment, the processing module 520 is specifically configured to: if the state of the wearable device 100 is the first state, determining whether a difference between the sampling value at the current moment and the comparison value at the current moment is greater than a first preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is greater than a first preset difference value, determining that the update state of the wearable device 100 is the second state; if the state of the wearable device 100 is the second state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value, determining that the update state of the wearable device 100 is the first state.
In this embodiment, the processing module 520 is further configured to: if the time for maintaining the state of the wearable device 100 in the second state exceeds the preset time, the state of the wearable device 100 is updated to the first state.
The state detection device 500 corresponds to a state detection method, and each functional module corresponds to each step, so that the embodiments of each functional module refer to the embodiments of each step, and are not described again here.
Based on the same inventive concept, an embodiment of the present application further provides a computer program stored on the readable storage medium, where the computer program is executed by a computer to perform the method for detecting the state described in the foregoing embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. The state detection method is characterized by being applied to wearable equipment, wherein the wearable equipment comprises a plurality of to-be-detected paths and an ADC (analog-to-digital converter) module connected with the to-be-detected paths, the to-be-detected paths comprise to-be-detected capacitors, and the to-be-detected capacitors are located at a touch part or a pressing part of the wearable equipment; the detection method comprises the following steps:
acquiring a sampling value output by the ADC module; the sampling values are sampling values corresponding to the capacitors to be detected respectively;
determining a state of the wearable device according to the sampling value; the state of the wearable device includes: a first state and a second state; the first state is: not touched or pressed by the user, the second state being: touched or pressed by a user.
2. The detection method according to claim 1, wherein for each pathway to be detected, the detection method further comprises:
acquiring a comparison value of a previous moment; the previous time is one or more times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected;
determining a comparison value at the current moment according to the comparison value at the previous moment based on the state of the wearable device;
and determining the update state of the wearable device according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device.
3. The detection method according to claim 2, wherein the determining the comparison value at the current time from the comparison value at the previous time based on the state of the wearable device comprises:
if the state of the wearable equipment is the first state; determining a comparison value of the current moment according to the sampling value of the current moment and the comparison value of the previous moment;
and if the state of the wearable device is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
4. The detection method according to claim 3, wherein if the state of the wearable device is the first state, the previous time is a time previous to the current time; the comparison value at the current time is represented as:
s2 ═ S1 (1-Q) + R ═ Q; wherein, S1 is a comparison value of a previous time of the current time, R is a sampling value of the current time, and Q is a preset value.
5. The detection method according to claim 1, wherein for each pathway to be detected, the detection method further comprises:
acquiring a sampling value of a previous moment and a comparison value of a previous moment of a current moment; the previous time is a plurality of times before the current time; the comparison value is a comparison value corresponding to the capacitor to be detected;
determining a comparison value of the current moment according to the sampling value of the previous moment and the comparison value of the previous moment of the current moment based on the state of the wearable device;
and determining the update state of the wearable device according to the sampling value at the current moment and the comparison value at the current moment based on the state of the wearable device.
6. The detection method according to claim 5, wherein determining the comparison value at the current time from the sampled value at the previous time and the comparison value at the previous time based on the state of the wearable device comprises:
if the state of the wearable device is a first state, filtering sampling values at a plurality of moments before the current moment to obtain a comparison value at the current moment; the filtering processing is averaging processing or weighted averaging processing;
and if the state of the wearable device is the second state, determining that the comparison value at the previous moment of the current moment is the comparison value at the current moment.
7. The detection method according to claim 2 or 5, wherein the determining the updated state of the wearable device according to the sampled value at the current time and the comparison value at the current time based on the state of the wearable device comprises:
if the state of the wearable device is the first state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is larger than a first preset difference value; if the difference between the sampling value at the current moment and the comparison value at the current moment is larger than a first preset difference value, determining that the updating state of the wearable equipment is the second state;
if the state of the wearable device is the second state, determining whether the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value; and if the difference between the sampling value at the current moment and the comparison value at the current moment is smaller than a second preset difference value, determining that the updating state of the wearable device is the first state.
8. The detection method according to claim 1, further comprising:
and if the time for keeping the state of the wearable equipment in the second state exceeds the preset time, updating the state of the wearable equipment to the first state.
9. The detection method according to claim 1, wherein the wearable device is: wireless earphone, intelligent wrist-watch, or intelligent bracelet.
10. The state detection device is characterized by being applied to wearable equipment, wherein the wearable equipment comprises a plurality of passages to be detected and ADC modules connected with the passages to be detected, the passages to be detected comprise capacitors to be detected, and the capacitors to be detected are located at a touch part or a pressing part of the wearable equipment; the detection device includes:
the acquisition module is used for acquiring the sampling value output by the ADC module; the sampling values are sampling values corresponding to the capacitors to be detected respectively;
the processing module is used for determining the state of the wearable device according to the sampling value; the state of the wearable device includes: a first state and a second state; the first state is: not touched or pressed by the user, the second state being: touched or pressed by a user.
11. A wearable device, comprising:
a plurality of pathways to be detected; the plurality of to-be-detected channels comprise to-be-detected capacitors, and the to-be-detected capacitors are located at a touch part or a pressing part of the wearable equipment;
the ADC module is connected with the plurality of to-be-detected channels;
a processor connected to the ADC module;
the processor is adapted to perform a method of detecting a condition according to any one of claims 1-9.
12. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed by a computer, performs the method of detecting a status according to any one of claims 1 to 9.
CN202111020057.4A 2021-09-01 2021-09-01 State detection method and device, wearable device and readable storage medium Active CN113703659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111020057.4A CN113703659B (en) 2021-09-01 2021-09-01 State detection method and device, wearable device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111020057.4A CN113703659B (en) 2021-09-01 2021-09-01 State detection method and device, wearable device and readable storage medium

Publications (2)

Publication Number Publication Date
CN113703659A true CN113703659A (en) 2021-11-26
CN113703659B CN113703659B (en) 2024-06-11

Family

ID=78658652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111020057.4A Active CN113703659B (en) 2021-09-01 2021-09-01 State detection method and device, wearable device and readable storage medium

Country Status (1)

Country Link
CN (1) CN113703659B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109709613A (en) * 2018-12-24 2019-05-03 福建联迪商用设备有限公司 A kind of method, terminal and circuit whether detection wearable device is dressed
CN209134600U (en) * 2018-09-25 2019-07-19 深圳市汇顶科技股份有限公司 A kind of earphone
CN110603815A (en) * 2018-09-25 2019-12-20 深圳市汇顶科技股份有限公司 Earphone and method for realizing wearing detection and touch operation
CN110737026A (en) * 2019-10-31 2020-01-31 歌尔科技有限公司 equipment wearing detection method, device, equipment and readable storage medium
CN111190509A (en) * 2019-12-27 2020-05-22 歌尔股份有限公司 Touch detection method and device, wireless earphone and storage medium
CN111865289A (en) * 2020-06-18 2020-10-30 深圳市周立功单片机有限公司 Touch key detection device and method
CN112187244A (en) * 2019-07-03 2021-01-05 三星电机株式会社 Switch operation sensing apparatus and detection apparatus
CN113038320A (en) * 2021-02-26 2021-06-25 隔空(上海)智能科技有限公司 Capacitance detection method and device and earphone
CN113076029A (en) * 2021-03-31 2021-07-06 安徽华米信息科技有限公司 Wearable device and control method thereof

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN209134600U (en) * 2018-09-25 2019-07-19 深圳市汇顶科技股份有限公司 A kind of earphone
CN110603815A (en) * 2018-09-25 2019-12-20 深圳市汇顶科技股份有限公司 Earphone and method for realizing wearing detection and touch operation
CN109709613A (en) * 2018-12-24 2019-05-03 福建联迪商用设备有限公司 A kind of method, terminal and circuit whether detection wearable device is dressed
CN112187244A (en) * 2019-07-03 2021-01-05 三星电机株式会社 Switch operation sensing apparatus and detection apparatus
CN110737026A (en) * 2019-10-31 2020-01-31 歌尔科技有限公司 equipment wearing detection method, device, equipment and readable storage medium
CN111190509A (en) * 2019-12-27 2020-05-22 歌尔股份有限公司 Touch detection method and device, wireless earphone and storage medium
CN111865289A (en) * 2020-06-18 2020-10-30 深圳市周立功单片机有限公司 Touch key detection device and method
CN113038320A (en) * 2021-02-26 2021-06-25 隔空(上海)智能科技有限公司 Capacitance detection method and device and earphone
CN113076029A (en) * 2021-03-31 2021-07-06 安徽华米信息科技有限公司 Wearable device and control method thereof

Also Published As

Publication number Publication date
CN113703659B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
CN110300897B (en) Capacitance detection circuit, touch device and terminal equipment
CN105531654B (en) Injection touch noise analysis
CN102667690B (en) Methods and apparatus for performing capacitive touch sensing and proximity detection
CN110856448B (en) Capacitance detection circuit, touch device and terminal equipment
US8179380B2 (en) Method and apparatus for implementing a capacitive touch slider
CN208013309U (en) Capacitive detection circuit, touch device and terminal device
CN101799734A (en) Key detection method of capacitive touch screen
JP6538864B2 (en) Fingerprint detection circuit and electronic device
US11119603B2 (en) Touch control chip, electronic device having the same and touch detection method therefor
EP3971694A1 (en) Noise measurement circuit, self-capacitance measurement method, touch chip and electronic device
CN114355056A (en) Capacitance measuring circuit, capacitance measuring system, touch device and electronic equipment
CN109564481A (en) Update method, device, touch screen and the electric terminal of touch screen present reference value
CN110084082B (en) Electronic equipment, fingerprint identification device and finger touch detection circuit thereof
CN108777574A (en) A kind of capacitance touch button circuit
WO2021213194A1 (en) Touch sensing method and circuit, and electronic device
CN103823598A (en) Touch sensing circuit and touch sensing method
WO2017197574A1 (en) Capacitance detection device
CN205003650U (en) Capacitive discharge circuit
CN102147448A (en) Keying operation detecting system and method
CN113703659B (en) State detection method and device, wearable device and readable storage medium
CN114003147B (en) Signal detection device, touch pad and electronic equipment
EP3798807A1 (en) Capacitance measurement method
KR20210012132A (en) High sensitivity touch sensor
CN114487784A (en) Capacitance detection circuit, touch chip and electronic equipment
CN113031081A (en) Proximity sensing detection circuit, capacitance calibration method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant