CN111083271B - Wearing detection method, system, equipment and computer readable storage medium - Google Patents
Wearing detection method, system, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111083271B CN111083271B CN201911379438.4A CN201911379438A CN111083271B CN 111083271 B CN111083271 B CN 111083271B CN 201911379438 A CN201911379438 A CN 201911379438A CN 111083271 B CN111083271 B CN 111083271B
- Authority
- CN
- China
- Prior art keywords
- state
- wearing
- value
- judged
- head
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 91
- 238000004590 computer program Methods 0.000 claims description 34
- 230000006870 function Effects 0.000 claims description 30
- 238000000034 method Methods 0.000 claims description 27
- 230000008569 process Effects 0.000 description 10
- 230000009471 action Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 230000001276 controlling effect Effects 0.000 description 5
- 230000000875 corresponding effect Effects 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 238000004088 simulation Methods 0.000 description 4
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 2
- 239000011889 copper foil Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/24—Arrangements for testing
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01V—GEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
- G01V3/00—Electric or magnetic prospecting or detecting; Measuring magnetic field characteristics of the earth, e.g. declination, deviation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/60—Substation equipment, e.g. for use by subscribers including speech amplifiers
- H04M1/6033—Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
- H04M1/6041—Portable telephones adapted for handsfree use
- H04M1/6058—Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
- H04M1/6066—Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Environmental & Geological Engineering (AREA)
- Geology (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Geophysics (AREA)
- Telephone Function (AREA)
Abstract
The application discloses a wearing detection method, a wearing detection system, wearing detection equipment and a computer readable storage medium, which are applied to a head-wearing wireless earphone, wherein the head-wearing wireless earphone realizes wearing detection through a capacitive sensor, and a group of state values of the capacitive sensor in a preset time period are obtained; selecting a preset number of state values from a group of state values as state values to be judged; judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and judging that the head-wearing type wireless earphone is in the wearing state if the state values to be judged represent that the head-wearing type wireless earphone is in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state. In the application, only when the selected state value to be judged is consistent, the head-wearing wireless earphone is judged to be in a wearing state or a non-wearing state, the influence of fluctuation of the state value on the judgment result is avoided, and the wearing detection accuracy of the head-wearing wireless earphone is improved.
Description
Technical Field
The present application relates to the field of sensing and detection technologies, and more particularly, to a wear detection method, system, device, and computer-readable storage medium.
Background
When a user uses the electronic device to listen to music or talk, wearing and taking actions are performed on the electronic device, so that the electronic device is in a wearing or non-wearing state, and the electronic device responds to the user correspondingly, such as playing and pausing music, talking transfer and other functions, which is called as a wearing detection function.
The wireless headset of wear-type also has to wear the detection function, generally adopts capacitive sensor to realize wearing the detection, adopts copper foil or PCB material to place inside the earphone, and the user can lead to the inside material capacitance value of earphone to change when wearing or not wearing the earphone, and the earphone comes the wearing state of perception earphone through the capacitance variation, but can have the problem of detection error.
In summary, how to improve the wearing detection accuracy of the wireless headset is a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a wearing detection method which can solve the technical problem of improving wearing detection accuracy of a head-wearing wireless earphone to a certain extent. The application also provides a wear detection system, a device and a computer readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
a wearing detection method is applied to a wireless headset, and the wireless headset realizes wearing detection through a capacitive sensor, and comprises the following steps:
acquiring a group of state values of the capacitive sensor within a preset time period;
selecting a preset number of state values from the group of state values as state values to be judged;
judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the wearing state;
if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state.
Preferably, the determining whether the state values to be determined all represent that the wireless headset is in the wearing state includes:
for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and a state base value, judging whether the absolute value is greater than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the moment of acquiring the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state;
the state base value is a state initial value of the capacitive sensor set under the condition that the capacitive sensor is not touched.
Preferably, the determining whether the state values to be determined all represent that the wireless headset is in a non-wearing state includes:
for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is smaller than the preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the time of acquiring the state value to be judged, judging whether the wearing state value represents a non-wearing state, and if so, judging that the state value to be judged represents that the headset is in the non-wearing state.
Preferably, before the determining whether the state values to be determined all represent that the wireless headset is in the wearing state, the method further includes:
and determining the state base value based on the temperature and the humidity of the environment where the head-mounted wireless earphone is located.
Preferably, the selecting a preset number of state values from the group of state values as state values to be determined includes:
reading data of the group of state values according to a preset frequency;
and taking the read state value as the state value to be judged.
Preferably, after determining that the wireless headset is in a wearing state, the method further includes:
executing a first preset function, wherein the type of the first preset function comprises: playing music, transferring the call to the earphone end, and controlling the indicator light to be turned off;
after the determining that the wireless headset is in the non-wearing state, the method further includes:
executing a second preset function, wherein the type of the second preset function comprises: music is paused, the conversation is transferred to the equipment end connected with the head-wearing wireless earphone, and the control indicator light is on.
Preferably, the time unit of the preset time period is in ms.
A wear detection system for a wireless headset that enables wear detection via a capacitive sensor, comprising:
the first acquisition module is used for acquiring a group of state values of the capacitive sensor within a preset time period;
the first selection module is used for selecting a preset number of state values from the group of state values as state values to be judged;
the first judging module is used for judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and if yes, the head-wearing type wireless earphone is judged to be in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state.
A wear detection device for a wireless headset that achieves wear detection via a capacitive sensor, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the wear detection method as described in any one of the above when executing the computer program.
A computer-readable storage medium for a wireless headset with a capacitive sensor for wear detection, the computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, carries out the steps of the method for wear detection as set forth in any of the above.
The wearing detection method is applied to the head-wearing wireless earphone, the wearing detection of the head-wearing wireless earphone is realized through the capacitive sensor, and a group of state values of the capacitive sensor in a preset time period are obtained; selecting a preset number of state values from a group of state values as state values to be judged; judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and judging that the head-wearing type wireless earphone is in the wearing state if the state values to be judged represent that the head-wearing type wireless earphone is in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state. In the application, whether the head-mounted wireless earphone is in a wearing state or not is judged through a group of state groups, and when the selected state value to be judged is all represented when the head-mounted wireless earphone is in the wearing state, the head-mounted wireless earphone is judged to be in the wearing state, when the selected state value to be judged is all represented when the head-mounted wireless earphone is in the non-wearing state, the head-mounted wireless earphone is judged to be in the non-wearing state, the influence of fluctuation of the state value on the judgment result is avoided, misjudgment can be avoided, and the wearing detection accuracy of the head-mounted wireless earphone is improved. The wearing detection system, the wearing detection equipment and the computer readable storage medium solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a first flowchart of a wear detection method provided in an embodiment of the present application;
fig. 2 is a second flowchart of a wear detection method provided in the embodiment of the present application;
FIG. 3 is a graph of simulation test results;
fig. 4 is a schematic structural diagram of a wear detection system according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a wear detection device provided in an embodiment of the present application;
fig. 6 is another schematic structural diagram of a wear detection device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When a user uses the electronic device to listen to music or talk, wearing and taking actions are performed on the electronic device, so that the electronic device is in a wearing or non-wearing state, and the electronic device responds to the user correspondingly, such as playing and pausing music, talking transfer and other functions, which is called as a wearing detection function. The wireless headset also has a wearing detection function, generally, a capacitive sensor is used for realizing wearing detection, a copper foil or a PCB material is placed inside the headset, when a user wears or does not wear the headset, the capacitance value of the material inside the headset changes, the headset senses the wearing state of the headset through the capacitance variation, but the problem of detection error can exist, for example, when the user wears a little shake, or when two hands of the user are close to the wireless headset, the wireless headset senses that the user has taken off the headset, or when the user wears a non-standard headset, the wireless headset senses that the user has worn the headset, and the non-standard wearing described herein includes that the headset is hung on the neck, and the like. Therefore, it is an urgent problem to be solved by those skilled in the art to improve the wearing detection accuracy of the wireless headset.
Referring to fig. 1, fig. 1 is a first flowchart of a wear detection method according to an embodiment of the present disclosure.
The wearing detection method provided by the embodiment of the application is applied to a head-wearing wireless earphone, and the head-wearing wireless earphone realizes wearing detection through a capacitive sensor, and the wearing detection method can comprise the following steps:
step S101: and acquiring a group of state values of the capacitive sensor within a preset time period.
In practical application, a group of state values of the capacitive sensor within a preset time period can be obtained first, specifically, a storage space for storing the state values of the capacitive sensor can be set, and the state values of the capacitive sensor are stored by means of the storage space, so that the state values of the capacitive sensor can be obtained only by reading the storage space; in the process, the number of the state values that can be stored in the storage space can be limited, for example, the storage space can only store 15 state values, and the storage space can only store 15 latest state values each time, so that the storage space occupied by an earlier invalid state value can be avoided. It should be noted that the preset time period in this application refers to a period of time from the current time, and the duration of the preset time period may be determined according to actual needs. In addition, the state value in this application refers to a value converted from a capacitance value of a capacitive sensor, and its definition is the same as that in the existing earphone system, and the process of obtaining the state value by the wireless headset may be as follows: the capacitive sensor receives an input signal sent by a user, wherein the input signal is generally an analog signal, is converted into a digital signal through the analog-to-digital conversion module, and then is processed by the auxiliary chip to sense the state of the capacitive sensor.
Step S102: and selecting a preset number of state values from a group of state values as state values to be judged.
In practical application, after a group of state values of the capacitive sensor within a preset time period is obtained, a preset number of state values can be selected from the group of state values as state values to be determined, the preset number of values can be determined according to actual needs, and the preset number is an integer greater than or equal to 2. In a specific application scenario, the preset number may also be all state values of the capacitive sensor within a preset time period, and at this time, the storage number of the storage space for storing the state values of the capacitive sensor may be set to the preset number.
Step S103: judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state, if so, executing the step S104; if not, go to step S105.
Step S104: and determining that the head-mounted wireless earphone is in a wearing state.
Step S105: judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, if so, executing a step S106: and determining that the wireless headset is in a non-wearing state.
In practical application, after a preset number of state values are selected from a group of state values as state values to be judged, whether the state values to be judged all represent that the wireless headset is in a wearing state can be judged, and if the state values to be judged all represent that the wireless headset is in the wearing state, the wireless headset is judged to be in the wearing state; if the state values to be judged do not represent that the wireless headset is in the wearing state, whether the state values to be judged represent that the wireless headset is in the non-wearing state or not can be judged, and if the state values to be judged represent that the wireless headset is in the non-wearing state, the wireless headset is judged to be in the non-wearing state. That is, in the present application, only when the wearing information represented by the selected state value to be determined is consistent, whether the wireless headset is worn or not can be determined, and compared with the existing technology of determining whether the wireless headset is worn or not only according to the current state value of the capacitive sensor, the misjudgment of the wearing information caused by the fluctuation of the single state value of the capacitive sensor is avoided. It should be noted that, in other cases than the above two cases, for example, when the state value to be determined represents that the wireless headset is in the wearing state and represents that the wireless headset is in the non-wearing state, the wearing information of the wireless headset may be maintained to be consistent with the previous wearing information, that is, the wearing information at the current time is not changed, for example, the wearing state is the previous wearing state, the current wearing state is the current wearing state, and the like.
The wearing detection method is applied to the head-wearing wireless earphone, the wearing detection of the head-wearing wireless earphone is realized through the capacitive sensor, and a group of state values of the capacitive sensor in a preset time period are obtained; selecting a preset number of state values from a group of state values as state values to be judged; judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and judging that the head-wearing type wireless earphone is in the wearing state if the state values to be judged represent that the head-wearing type wireless earphone is in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state. In the application, whether the head-mounted wireless earphone is in a wearing state or not is judged through a group of state groups, and when the selected state value to be judged is all represented when the head-mounted wireless earphone is in the wearing state, the head-mounted wireless earphone is judged to be in the wearing state, when the selected state value to be judged is all represented when the head-mounted wireless earphone is in the non-wearing state, the head-mounted wireless earphone is judged to be in the non-wearing state, the influence of fluctuation of the state value on the judgment result is avoided, misjudgment can be avoided, and the wearing detection accuracy of the head-mounted wireless earphone is improved.
The wearing detection method provided by the embodiment of the application is applied to a wireless headset, and is used for judging whether state values to be judged represent that the wireless headset is in a wearing state or not, because the state base values are the state values of the capacitive sensors under the condition that the state base values are not touched, and after a user touches the wireless headset, the state values of the capacitive sensors are changed, and when the wireless headset is in the wearing state or the non-wearing state, the state values of the capacitive sensors are different, whether the user touches the wireless headset can be determined according to the change situation of the state values, and whether the wireless headset is in the wearing state is further determined, namely, in order to improve the accuracy of wearing information represented by a single state value to be judged, for each state value to be judged, the absolute value of the difference value between the state value to be judged and the state base value can be calculated, judging whether the absolute value is larger than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the acquisition time of the state value to be judged, judging whether the wearing state value represents the wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state; the state base value is a set initial state value of the capacitive sensor when the capacitive sensor is not touched.
In practical application, in the process of judging whether the state values to be judged all represent that the wireless headset is in the non-wearing state, for each state value to be judged, the absolute value of the difference value between the state value to be judged and the state base value can be calculated, whether the absolute value is smaller than a preset threshold value is judged, if yes, the wearing state value given by the capacitive sensor at the time of obtaining the state value to be judged is obtained, whether the wearing state value represents the non-wearing state is judged, and if yes, the state value to be judged represents that the wireless headset is in the non-wearing state.
It should be noted that the principle of the capacitive sensor for giving the wearing state value is the same as that of the prior art, and it may be that the capacitive sensor gives the wearing state value representing the wearing state after detecting the change of the self-capacitance, gives the wearing state value representing the non-wearing state after detecting the non-change of the self-capacitance, and so on. In the case where the auxiliary chip and the main control chip are provided in the wireless headset, the wearing state value given by the capacitive sensor may be determined by the auxiliary chip, and the main control chip may perform the remaining steps.
In addition, a pre-execution condition may be set for the wearing detection method provided by the present application, for example, the wearing detection method provided by the present application may be executed after detecting a change in the wearing state value given by the capacitive sensor.
The wearing detection method provided by the embodiment of the application is applied to the wireless headset, and the state base value of the capacitive sensor is influenced by the environment temperature and humidity, so that before the condition value to be judged whether represents that the wireless headset is in a wearing state or not is judged to avoid the influence of the current environment temperature and humidity on the state base value of the capacitive sensor, the state base value can be determined based on the environment temperature and humidity where the wireless headset is located.
The wearing detection method provided by the embodiment of the application is applied to a head-wearing wireless earphone, and the process of selecting the preset number of state values from a group of state values as the state values to be judged can specifically be as follows: reading data of a group of state values according to a preset frequency; and taking the read state value as a state value to be determined. That is, only a group of state values need to be read according to the preset frequency, and the state values to be judged can be obtained quickly and randomly.
The wearing detection method provided by the embodiment of the application is applied to a head-wearing wireless earphone, and can execute a first preset function after judging that the head-wearing wireless earphone is in a wearing state in order to improve the experience of the user in applying the head-wearing wireless earphone, wherein the type of the first preset function comprises: playing music, transferring a call to an earphone end, controlling an indicator light to be turned off and the like; correspondingly, after the wireless headset is determined to be in the non-wearing state, a second preset function can be executed, wherein the type of the second preset function comprises: music is paused, the call is transferred to the equipment end connected with the head-wearing wireless earphone, and an indicator lamp is controlled to be on.
The wearing detection method provided by the embodiment of the application is applied to the head-wearing wireless earphone, and in order to improve the wearing detection accuracy, the time unit of the preset time period can be in the ms level and the like.
In order to facilitate understanding, the wearing detection method provided by the application is tested, the influence of False triggering and normal wearing on detection parameters is further understood by means of simulation testing, the simulation testing process is tested six times in total, the first three times of users do not wear earphones, each time, two hands are placed close to and far away from the outer side of the head-mounted wireless earphone, the last three times of users wear the earphones normally and take off the earphones, each time, the wearing and taking-off actions are relatively quick, for representation, in the testing process, the absolute value of the difference value between the test value to be determined and the State base value is represented by Delta, the preset Threshold value is represented by Threshold, the wearing State value given by the capacitive sensor is represented by State, the wearing State value representing the wearing State is given by the capacitive sensor representing the True value by the value of Flag, the wearing State value representing the non-wearing State is given by the capacitive sensor representing the False value by the value of Flag, referring to fig. 2, fig. 2 is a second flowchart of a wear detection method according to an embodiment of the present application.
In practical application, the wearing detection method provided by the embodiment of the present application is applied to a wireless headset, and may include the following steps:
step S201: judging whether the State value given by the capacitive sensor changes or not; if so, step S202 is executed, otherwise, step S201 is executed again.
Step S202: the values of M and N are initialized to 0.
Step S203: read 1 Delta value and Flag value.
Step S204: and judging that Delta is greater than Threshold and the Flag value is True, if so, executing step S205, and if not, executing step S207.
Step S205: the calculation M is M +1, and step S206 is performed.
Step S206: it is determined whether the number of times of reading is equal to K, if so, step S209 is performed, and if not, step S203 is performed.
Step S207: and judging that Delta is less than Threshold and Flag value is False, if so, executing step S208, and if not, executing step S206.
Step S208: n +1 is calculated, and step S206 is executed.
Step S209: judging whether M is equal to K, if so, executing step S210; if not, step S211 is executed.
Step S210: and determining that the head-mounted wireless earphone is in a wearing state.
Step S211: judging whether N is equal to K, if yes, executing step S212; if not, step S213 is executed.
Step S212: and determining that the wireless headset is in a non-wearing state.
Step S213: and (6) ending.
Referring to fig. 3, fig. 3 is a diagram of simulation test results, in which an abscissa represents time and an ordinate represents a state value of the capacitive sensor; as can be seen from fig. 3, after the first three times of error triggering of the headset occurs, the wearing state value changes, Delta is maintained for a period of time and is higher than the threshold value, and in the normal wearing process of the headset, Delta is higher than the threshold value only when the moment of wearing action is detected, and Delta is lower than the threshold value when the moment of taking off action is detected, at this time, after the wearing detection method provided by the present application is used for detection, it is determined that the head-mounted wireless headset is in the non-wearing state, so the wearing detection method provided by the present application can accurately detect the wearing state of the head-mounted wireless headset.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a wear detection system according to an embodiment of the present disclosure.
The wearing detection system provided by the embodiment of the application is applied to the head-wearing wireless earphone, and the head-wearing wireless earphone realizes wearing detection through the capacitive sensor, and can include:
the first acquisition module 101 is configured to acquire a group of state values of the capacitive sensor within a preset time period;
a first selecting module 102, configured to select a preset number of state values from a group of state values as state values to be determined;
the first judging module 103 is configured to judge whether the state values to be judged all represent that the wireless headset is in a wearing state, and if yes, judge that the wireless headset is in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state.
Specifically, the first determining module may include:
the first judgment unit is used for calculating an absolute value of a difference value between the state value to be judged and the state base value for each state value to be judged, judging whether the absolute value is larger than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the acquisition time of the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state; the state base value is a set initial state value of the capacitive sensor when the capacitive sensor is not touched.
Specifically, the first determining module may include:
and the second judging unit is used for calculating the absolute value of the difference value between the state value to be judged and the state base value for each state value to be judged, judging whether the absolute value is smaller than a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the acquisition time of the state value to be judged, judging whether the wearing state value represents a non-wearing state, and if so, judging that the state value to be judged represents that the headset is in the non-wearing state.
Specifically, the method may further include:
and the first determining module is used for determining the state base value based on the temperature and humidity of the environment where the wireless headset is located before the first judging module judges whether the state values to be judged all represent that the wireless headset is in the wearing state.
Specifically, the first selecting module may include:
the first reading unit is used for reading data of a group of state values according to a preset frequency;
and the first setting unit is used for taking the read state value as a state value to be judged.
Specifically, the method may further include:
the first execution module is used for executing a first preset function after the first judgment module judges that the head-mounted wireless earphone is in a wearing state, wherein the type of the first preset function comprises: playing music, transferring the call to the earphone end, and controlling the indicator light to be turned off;
the second execution module is used for executing a second preset function after the first judgment module judges that the head-wearing type wireless earphone is in the non-wearing state, wherein the type of the second preset function comprises: music is paused, the conversation is transferred to the equipment end connected with the head-wearing wireless earphone, and the control indicator light is on.
Specifically, the time unit of the preset time period may be in the order of ms.
The application also provides wearing detection equipment and a computer readable storage medium, which have corresponding effects of the wearing detection method provided by the embodiment of the application. Referring to fig. 5, fig. 5 is a schematic structural diagram of a wear detection device according to an embodiment of the present application.
The wearing detection device provided by the embodiment of the application is applied to a wireless headset, the wireless headset realizes wearing detection through a capacitive sensor, the wireless headset comprises a memory 201 and a processor 202, a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program:
acquiring a group of state values of the capacitive sensor within a preset time period;
selecting a preset number of state values from a group of state values as state values to be judged;
judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and judging that the head-wearing type wireless earphone is in the wearing state if the state values to be judged represent that the head-wearing type wireless earphone is in the wearing state;
if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is larger than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the moment of acquiring the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state; the state base value is a set initial state value of the capacitive sensor when the capacitive sensor is not touched.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: and for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is smaller than a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the acquisition time of the state value to be judged, judging whether the wearing state value represents a non-wearing state, and if so, judging that the state value to be judged represents that the headset is in the non-wearing state.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: and determining a state base value based on the temperature and humidity of the environment where the head-mounted wireless earphone is located before judging whether the state values to be judged represent that the head-mounted wireless earphone is in the wearing state.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: reading data of a group of state values according to a preset frequency; and taking the read state value as a state value to be determined.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: after judging that the wireless headset is in a wearing state, executing a first preset function, wherein the type of the first preset function comprises: playing music, transferring the call to the earphone end, and controlling the indicator light to be turned off; after judging that the wireless headset is in the non-wearing state, executing a second preset function, wherein the type of the second preset function comprises: music is paused, the conversation is transferred to the equipment end connected with the head-wearing wireless earphone, and the control indicator light is on.
According to the wearing detection device provided by the embodiment of the application, when the processor executes the computer program, the following steps can be realized: the time unit of the preset time period is in ms level.
Referring to fig. 6, another wear detection device provided in the embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting externally input commands to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing the communication between the wearing detection device and the outside. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication method adopted by the communication module 205 includes, but is not limited to, mobile high definition link technology (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection: wireless fidelity technology (WiFi), bluetooth communication technology, bluetooth low energy communication technology, ieee802.11s based communication technology.
The computer-readable storage medium provided in an embodiment of the present application is applied to a wireless headset, where the wireless headset implements wear detection through a capacitive sensor, and a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the following steps:
acquiring a group of state values of the capacitive sensor within a preset time period;
selecting a preset number of state values from a group of state values as state values to be judged;
judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and judging that the head-wearing type wireless earphone is in the wearing state if the state values to be judged represent that the head-wearing type wireless earphone is in the wearing state;
if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is larger than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the moment of acquiring the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state; the state base value is a set initial state value of the capacitive sensor when the capacitive sensor is not touched.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is smaller than a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the acquisition time of the state value to be judged, judging whether the wearing state value represents a non-wearing state, and if so, judging that the state value to be judged represents that the headset is in the non-wearing state.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and determining a state base value based on the temperature and humidity of the environment where the head-mounted wireless earphone is located before judging whether the state values to be judged represent that the head-mounted wireless earphone is in the wearing state.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: reading data of a group of state values according to a preset frequency; and taking the read state value as a state value to be determined.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: after judging that the wireless headset is in a wearing state, executing a first preset function, wherein the type of the first preset function comprises: playing music, transferring the call to the earphone end, and controlling the indicator light to be turned off; after judging that the wireless headset is in the non-wearing state, executing a second preset function, wherein the type of the second preset function comprises: music is paused, the conversation is transferred to the equipment end connected with the head-wearing wireless earphone, and the control indicator light is on.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: the time unit of the preset time period is in ms level.
The computer-readable storage media to which this application relates include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
For a description of a relevant part in a wear detection system, a device and a computer-readable storage medium provided in the embodiments of the present application, refer to a detailed description of a corresponding part in a wear detection method provided in the embodiments of the present application, and are not described herein again. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
It is further noted that, herein, 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. A wearing detection method is applied to a wireless headset, and the wireless headset realizes wearing detection through a capacitive sensor, and comprises the following steps:
acquiring a group of state values of the capacitive sensor within a preset time period, wherein the state values are iteratively pre-stored in a storage space of the capacitive sensor according to a preset number;
selecting a preset number of state values from the group of state values as state values to be judged;
judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the wearing state;
if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state; wherein, the judging whether the state values to be judged all represent that the head-wearing type wireless earphone is in the wearing state comprises:
for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and a state base value, judging whether the absolute value is greater than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the moment of acquiring the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state;
the state base value is a state initial value of the capacitive sensor set under the condition that the capacitive sensor is not touched.
2. The method according to claim 1, wherein the determining whether the state values to be determined both represent that the wireless headset is in a non-wearing state comprises:
for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and the state base value, judging whether the absolute value is smaller than the preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the time of acquiring the state value to be judged, judging whether the wearing state value represents a non-wearing state, and if so, judging that the state value to be judged represents that the headset is in the non-wearing state.
3. The method according to claim 2, wherein before the determining whether the state values to be determined each represent that the wireless headset is in a wearing state, the method further comprises:
and determining the state base value based on the temperature and the humidity of the environment where the head-mounted wireless earphone is located.
4. The method according to any one of claims 1 to 3, wherein the selecting a preset number of state values from the set of state values as the state values to be determined comprises:
reading data of the group of state values according to a preset frequency;
and taking the read state value as the state value to be judged.
5. The method of claim 4, wherein after determining that the wireless headset is worn, further comprising:
executing a first preset function, wherein the type of the first preset function comprises: playing music, transferring the call to the earphone end, and controlling the indicator light to be turned off;
after the determining that the wireless headset is in the non-wearing state, the method further includes:
executing a second preset function, wherein the type of the second preset function comprises: music is paused, the conversation is transferred to the equipment end connected with the head-wearing wireless earphone, and the control indicator light is on.
6. The method according to claim 4, wherein the time unit of the preset time period is in ms.
7. A wear detection system applied to a wireless headset, wherein the wireless headset realizes wear detection by a capacitive sensor, comprising:
the first acquisition module is used for acquiring a group of state values of the capacitive sensor within a preset time period, and the state values are iteratively pre-stored in a storage space of the capacitive sensor according to a preset number;
the first selection module is used for selecting a preset number of state values from the group of state values as state values to be judged;
the first judging module is used for judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a wearing state or not, and if yes, the head-wearing type wireless earphone is judged to be in the wearing state; if not, judging whether the state values to be judged represent that the head-wearing type wireless earphone is in a non-wearing state or not, and if so, judging that the head-wearing type wireless earphone is in the non-wearing state; wherein,
the determining whether the state values to be determined all represent that the wireless headset is in a wearing state includes:
for each state value to be judged, calculating an absolute value of a difference value between the state value to be judged and a state base value, judging whether the absolute value is greater than or equal to a preset threshold value, if so, acquiring a wearing state value given by the capacitive sensor at the moment of acquiring the state value to be judged, judging whether the wearing state value represents a wearing state, and if so, judging that the state value to be judged represents that the headset is in the wearing state;
the state base value is a state initial value of the capacitive sensor set under the condition that the capacitive sensor is not touched.
8. A wear detection device applied to a wireless headset, wherein the wireless headset realizes wear detection by a capacitive sensor, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the wear detection method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, for use in a wireless headset for enabling wear detection by a capacitive sensor, in which a computer program is stored which, when being executed by a processor, carries out the steps of the wear detection method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911379438.4A CN111083271B (en) | 2019-12-27 | 2019-12-27 | Wearing detection method, system, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911379438.4A CN111083271B (en) | 2019-12-27 | 2019-12-27 | Wearing detection method, system, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111083271A CN111083271A (en) | 2020-04-28 |
CN111083271B true CN111083271B (en) | 2022-03-18 |
Family
ID=70318729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911379438.4A Active CN111083271B (en) | 2019-12-27 | 2019-12-27 | Wearing detection method, system, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111083271B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022052065A1 (en) * | 2020-09-11 | 2022-03-17 | 深圳市汇顶科技股份有限公司 | Living body proximity detection apparatus and method, and electronic device |
CN112449297B (en) * | 2020-10-19 | 2022-04-29 | 安克创新科技股份有限公司 | Method for detecting wearing state of earphone |
CN112945226B (en) * | 2021-01-26 | 2023-07-14 | 歌尔科技有限公司 | Headset wearing detection method, device and computer readable storage medium |
CN113179475B (en) * | 2021-04-02 | 2022-03-25 | 歌尔股份有限公司 | Earphone wearing state detection method and device, earphone and medium |
CN119471823B (en) * | 2024-12-31 | 2025-04-08 | 雷鸟创新技术(深圳)有限公司 | Glasses wearing detection method, device, electronic device and computer-readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3141674B2 (en) * | 1994-02-25 | 2001-03-05 | ソニー株式会社 | Noise reduction headphone device |
JP5880340B2 (en) * | 2012-08-02 | 2016-03-09 | ソニー株式会社 | Headphone device, wearing state detection device, wearing state detection method |
CN106291121B (en) * | 2016-07-29 | 2023-10-13 | 歌尔股份有限公司 | Wearing state detection method of wearable device and wearable device |
CN205941703U (en) * | 2016-07-29 | 2017-02-08 | 歌尔股份有限公司 | A wearable apparatus |
CN106851455A (en) * | 2017-02-23 | 2017-06-13 | 上海与德信息技术有限公司 | A kind of music control method and device based on earphone play mode |
-
2019
- 2019-12-27 CN CN201911379438.4A patent/CN111083271B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111083271A (en) | 2020-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111083271B (en) | Wearing detection method, system, equipment and computer readable storage medium | |
EP3373383B1 (en) | Method of detecting swelling of battery using pressure sensor and electronic device using the method | |
CN106453829B (en) | Method and device for detecting drop height | |
CN108664190B (en) | Page display method, device, mobile terminal and storage medium | |
GB2580764A (en) | Battery swelling detection | |
CN106951850B (en) | A kind of method and mobile terminal controlling fingerprint recognition mould group | |
US11243639B2 (en) | Touch detection method, touch detection apparatus, and touch sensor controller | |
CN102457558A (en) | Terminal based on sensing capability and application program control method | |
CN103294583B (en) | A kind of method of control terminal screen and mobile terminal | |
CN113453122A (en) | Wearing detection method, wearing detection device, wearing detection equipment and computer-readable storage medium | |
KR20180116843A (en) | Method for detecting motion and electronic device implementing the same | |
CN106294168A (en) | A kind of method and system carrying out Application testing | |
JP2014048971A (en) | Input device, method for controlling input device, control program, and computer readable recording medium recorded with control program | |
CN105224216A (en) | A kind of user terminal control method and user terminal | |
CN111698601A (en) | Bluetooth headset, key sensitivity adjusting method and device thereof and readable storage medium | |
CN107066090B (en) | Method for controlling fingerprint identification module and mobile terminal | |
CN110377414A (en) | Method and device for adjusting capacitive touch screen, terminal and storage medium | |
CN105607784B (en) | A kind of method of adjusting sensitivity of touch screen, regulating device and terminal | |
CN105824424A (en) | Music control method and terminal | |
CN107040657B (en) | Method and device for preventing touch screen from being triggered mistakenly | |
EP3171267A1 (en) | Terminal device and charging control method | |
CN108388400A (en) | A kind of operation processing method and mobile terminal | |
CN105425958A (en) | Caller ID (Identity) prompting method, caller ID prompting device and mobile terminal | |
CN111656303A (en) | Gesture control of data processing devices | |
CN107967203B (en) | Function judgment method and device based on executable file |
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 |