CN115243145A - Earphone control method, earphone control device, earphone and computer readable storage medium - Google Patents

Earphone control method, earphone control device, earphone and computer readable storage medium Download PDF

Info

Publication number
CN115243145A
CN115243145A CN202210858109.3A CN202210858109A CN115243145A CN 115243145 A CN115243145 A CN 115243145A CN 202210858109 A CN202210858109 A CN 202210858109A CN 115243145 A CN115243145 A CN 115243145A
Authority
CN
China
Prior art keywords
earphone
value
capacitance difference
capacitance
preset
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.)
Pending
Application number
CN202210858109.3A
Other languages
Chinese (zh)
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 CN202210858109.3A priority Critical patent/CN115243145A/en
Publication of CN115243145A publication Critical patent/CN115243145A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Electronic Switches (AREA)

Abstract

The application provides an earphone control method, an earphone control device, an earphone and a computer readable storage medium. The method comprises the following steps: when the earphone is detected to be outside the box, monitoring a capacitance difference value in real time, wherein the capacitance difference value is the difference value of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment; and if the capacitance difference value continuously fluctuates within a first preset time period, determining the self state as the in-ear state. Through this mode, can take place the earphone mistake and touch the problem (promptly the earphone does not go into the ear or the earphone mistake goes out the ear) after, adjust the earphone state to user's demand state rapidly to can improve the user experience of user when the problem is touched in the earphone mistake taking place.

Description

Earphone control method, earphone control device, earphone and computer readable storage medium
Technical Field
The present application relates to the field of earphones, and in particular, to an earphone control method, an earphone control device, an earphone, and a computer-readable storage medium.
Background
At present, the wearing condition of the earphone is generally determined by detecting the capacitance difference of the capacitive sensor. Specifically, the channel 1 for detecting capacitance of the capacitive sensor is close to the inner casing of the earphone, and the area of the channel 1 may be larger, so that when the earphone is put into the ear, close to the ear or other objects, the channel 1 is closer to the ear or other objects. Then, the capacitance of the channel 1 has a larger jump than the capacitance of the earphone in the suspension state. The channel 2 for detecting capacitance of the capacitive sensor is far away from the inner shell of the earphone, and the area of the channel may be small, so that when the earphone is put into the ear, close to the ear or other objects, the jump of the capacitance value is relatively small or hardly jumps. Therefore, whether the earphone is out of the ear or in the ear can be detected through the capacitance difference of the channel 1 and the channel 2.
However, there is a drift due to the capacitance difference. Therefore, a problem of erroneous touch of the earphone may occur, thereby degrading the user experience.
Disclosure of Invention
An object of the embodiments of the present application is to provide an earphone control method, an earphone control device, an earphone, and a computer-readable storage medium, so as to improve user experience when a user has a problem of mistakenly touching the earphone.
The invention is realized in the following way:
in a first aspect, an embodiment of the present application provides an earphone control method, which is applied to an earphone, and the method includes: when the earphone is detected to be outside the box, monitoring a capacitance difference value in real time, wherein the capacitance difference value is the difference value of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment; and if the capacitance difference value continuously fluctuates within a first preset time period, determining the self state as the in-ear state.
In this embodiment, if the capacitance difference value continuously fluctuates in the first preset time period, it may be that the capacitance difference value fluctuates up and down in a certain time period due to frequent wearing and taking of the headset by the user. The reason why the user frequently takes off the earphone is that the capacitance difference of the earphone has a problem of earphone mistaken touch caused by a drift condition (i.e. the earphone does not enter the ear or the earphone mistakenly goes out of the ear), that is, when the user wears the earphone, the earphone is not updated to the ear-entering state, so that the user cannot use the earphone, or when the user uses the earphone, the earphone state is changed to the ear-exiting state instead of the ear-entering state, and the user often frequently takes off the earphone, so that the earphone returns to normal. Therefore, when the situation occurs, the self state of the earphone is determined to be the in-ear state, and the earphone state can be rapidly adjusted to the requirement state of the user after the problem of mistaken touch of the earphone occurs (namely, the earphone does not enter the ear or the earphone mistakenly goes out of the ear), so that the user experience of the earphone when the problem of mistaken touch occurs can be improved.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, after the changing the self state to the in-ear state, the method further includes: continuously acquiring the average value of the capacitance difference values corresponding to the time intervals, wherein the time lengths of the time intervals are the same; and when the fact that the average value obtained latest is smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the average value obtained latest and the average value corresponding to the first time interval is larger than a preset value is detected, changing the self state into the out-of-ear state.
In the embodiment of the present application, the situation that the earphone does not enter the ear or mistakenly goes out of the ear is often caused by capacitance difference value drift. Then, when the capacitance difference value continuously fluctuates within the first preset duration, after the self state is changed to the in-ear state, the capacitance difference value drifts, and when the preset threshold value is used as the standard value for judging the in-ear state, the capacitance difference value after drifting may be far greater than the preset threshold value, so that the earphone cannot be taken by the user when the user takes the earphone, the user has taken the earphone by the change of the capacitance difference value is detected, and correspondingly, the self state cannot be changed to the out-ear state under the condition. Aiming at the situation, continuously acquiring the average value of each capacitance difference value corresponding to each time interval; the average value corresponding to the first time interval is used as a standard value for judging whether the user has the ears, when the newly acquired average value is detected to be smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the newly acquired average value and the average value corresponding to the first time interval is larger than a preset value, the self state is changed into the ear exit state, and a corresponding ear exit judging method can be set for the forced ear entry condition under the condition of false touch, so that the situation that the user cannot pick off the earphone and cannot change the self state into the ear exit state can be avoided, inconvenience is brought to the user, and user experience is reduced.
With reference to the technical solution provided by the first aspect, in some possible implementations, the first preset time period is between 2 seconds and 3 minutes.
With reference to the technical solution provided by the first aspect, in some possible implementations, the method further includes: after the self box entering is detected, acquiring each capacitance difference value within a second preset time length before the box entering; screening out the minimum capacitance difference value within the second preset time period; and setting the minimum capacitance difference value as a capacitance tolerance threshold value, wherein the capacitance tolerance threshold value is a threshold value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state.
In this embodiment of the application, before the earphone is placed in the box, the earphone may be in a suspended state for a period of time, and therefore, when the earphone detects that the earphone is placed in the charging box, the capacitance difference value of the earphone in the suspended state before the earphone is placed in the box can be obtained by obtaining the capacitance difference values of the earphone in the suspended state before the earphone is placed in the box in a second preset time period. At the moment, the minimum value in the acquired capacitance difference values is set as the capacitance difference threshold value, the capacitance difference threshold value of the earphone can be recalibrated, and the problem that the earphone is touched by mistake when the user uses the earphone again can be avoided.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the method further includes: when the capacitor is detected to be in the box, acquiring the capacitance difference in real time; if the capacitance difference is not detected to be the preset threshold, taking the moment when the capacitance difference appears as an initial moment, and detecting whether the newly acquired capacitance difference is the preset threshold or not after a third preset time period; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period; setting the average value as the preset threshold value.
In the embodiment of the present application, when a capacitance difference value that is not a preset threshold value is detected, it is characterized that a drift occurs in the capacitance difference value at this time. After a third preset time, detecting whether the newly acquired capacitance difference value is a preset threshold value again, and judging whether the drift is recoverable drift or unrecoverable drift. If the capacitance difference is not the preset threshold, the unrecoverable drift is indicated. At the moment, the average value of the capacitance difference value in the fourth preset time is obtained, the average value is set to be the preset threshold value, the preset threshold value can be changed into the range after the drift occurs, when the user uses the earphone, whether the earphone is out of the ear or not can be judged based on the preset threshold value after the drift, whether the earphone is out of the ear or not is judged based on the preset threshold value before the drift, the user's ear in and out operation cannot be accurately judged, and the problem that the earphone is mistakenly touched due to the fact that the ear in and out operation is determined based on the preset threshold value before the drift can be avoided.
In a second aspect, an embodiment of the present application provides a method for controlling an earphone, where the method is applied to an earphone, and the method includes: when the earphone is detected to be in the box, monitoring a capacitance difference value in real time, wherein the capacitance difference value is the difference value of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment; if the capacitance difference value is not detected to be the preset threshold value, the moment when the capacitance difference value appears is used as the starting moment, and after a third preset time period, whether the newly acquired capacitance difference value is the preset threshold value is detected; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period; setting the average value as the preset threshold value.
In a third aspect, an embodiment of the present application provides an earphone control device, which is applied to an earphone, and the device includes: the first monitoring module is used for monitoring a capacitance difference value in real time when the first monitoring module detects that the first monitoring module is outside the earphone, wherein the capacitance difference value is a difference value of capacitance values respectively collected from two sampling channels of a capacitive sensor of the earphone at the same moment; and the first control module is used for determining the self state as the in-ear state if the capacitance difference value continuously fluctuates within a first preset time length.
In a fourth aspect, an embodiment of the present application provides an earphone control device, which is applied to an earphone, and the device includes: the second monitoring module is used for monitoring capacitance difference values in real time when the second monitoring module detects that the second monitoring module is in the box, wherein the capacitance difference values are the difference values of capacitance values respectively collected from two sampling channels of a capacitive sensor of the earphone at the same moment; the second control module is used for detecting whether the newly acquired capacitance difference value is the preset threshold value or not by taking the moment when the capacitance difference value appears as the starting moment and after a third preset time period; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period; setting the average value as the preset threshold value.
In a fifth aspect, an embodiment of the present application provides a headset, including: the method comprises the following steps: the system comprises a processor and a capacitive sensor, wherein the processor is electrically connected with the capacitive sensor; the processor is configured to run a program stored in the memory, to perform a method as provided in the above-described first aspect embodiment and/or in combination with some possible implementations of the above-described first aspect embodiment, or to perform a method as provided in the above-described second aspect embodiment.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the method as provided in the above first aspect embodiment and/or in connection with some possible implementations of the above first aspect embodiment, or performs the method as provided in the above second aspect embodiment.
Drawings
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 a flowchart illustrating steps of a method for controlling an earphone according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating steps of another earphone control method according to an embodiment of the present disclosure.
Fig. 3 is a block diagram of an earphone control device according to an embodiment of the present application.
Fig. 4 is a block diagram of another earphone control device according to an embodiment of the present application.
Fig. 5 is a block diagram of a module of an earphone according to an embodiment of the present application.
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.
In view of the problem that the earphone is touched by mistake, a user is not good in experience, and through research and exploration, the inventor of the application provides the following embodiment to improve the user experience when the earphone is touched by mistake.
The following describes a specific process and steps of a headphone control method with reference to fig. 1. The embodiment of the application provides an earphone control method which can be applied to control of a capacitive in-ear detection earphone.
It should be noted that, the earphone control method provided in the embodiment of the present application is not limited to the sequence shown in fig. 1 and the following sequence.
Step S101: and when the situation that the capacitor is outside the box is detected, the capacitance difference value is monitored in real time.
The outside of the charging box refers to the condition that the earphone is outside the charging box. The earphone can judge that the earphone is in the box or out of the box through the communication condition with the charging box. The capacitance difference is the difference of capacitance values respectively collected from two sampling channels of the capacitive sensor of the earphone at the same time.
In addition, because the capacitance sensor can collect capacitance values in the two sampling channels in real time, after the capacitance values in the two sampling channels are collected, the capacitance values of the two sampling channels at the same moment can be subtracted to obtain a capacitance difference value at the moment. Therefore, the capacitance values in the two sampling channels are collected in real time, and the two capacitance values are subtracted after collection, so that the capacitance difference value of the earphone can be monitored in real time.
It should be noted that before calculating the capacitance difference, it is necessary to set in advance whether the capacitance value acquired by the first sampling channel is subtracted from the capacitance value acquired by the second sampling channel or the capacitance value acquired by the first sampling channel is subtracted from the capacitance value acquired by the second sampling channel, that is, the capacitance difference can be calculated in both of the two ways, but only one way can be set in the whole monitoring process, but the two ways cannot be mixed.
Step S102: and if the capacitance difference value continuously fluctuates in the first preset time period, determining the self state as the in-ear state.
Wherein, the first preset time period may be between 2 seconds and 3 minutes, such as: the first predetermined period of time is 1 minute, or 1 minute 30 seconds, or 2 minutes.
For a capacitive in-ear detection earphone, a preset threshold is usually preset in advance, the preset threshold is a sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold for determining whether the earphone needs to be changed into an out-of-ear state or an in-ear state. Specifically, by comparing the collected capacitance difference value with a preset threshold value, when the collected capacitance difference value is greater than the preset threshold value, it can be determined that the in-ear state is required at the moment; when the acquired capacitance difference value is smaller than a preset threshold value, the ear emergence state can be judged; when the collected capacitance value is equal to the preset threshold value, the state is judged to be unchanged.
It should be noted that the above-mentioned threshold of the capacitance difference may be a value of the earphone suspension. The suspension value of the earphone refers to a capacitance difference value of the earphone in a suspension state, and the suspension state refers to an earphone state when no other object or other object with a large dielectric constant exists nearby a capacitive sensor of the earphone. The fixed value can be set according to actual conditions, for example, the fixed value can be set to 0, or 5, or 10, or 20.
If the capacitance difference continuously fluctuates within the first preset time period, it may be that the capacitance difference fluctuates up and down within a certain time period due to the user frequently wearing or taking off the earphone. The reason why the user frequently takes off and wears the earphones is often that the capacitance difference value of the earphones has the problem of mistaken touch of the earphones (namely, the earphones do not enter the ears or the earphones mistakenly go out of the ears) caused by the drift condition, namely, when the user wears the earphones, the earphones are not updated to be in the ear state, so that the user cannot use the earphones, or when the user uses the earphones, the earphone state is changed to be in the ear state instead of the ear state, the user often frequently takes off and wears the earphones, and the earphones are enabled to be recovered to be normal. Therefore, when the situation occurs, the state of the earphone is changed into the in-ear state, the earphone state can be rapidly adjusted to the requirement state of the user after the problem that the earphone is touched by mistake (namely the earphone is not touched by the ear or the earphone is touched by mistake) occurs, and therefore the user experience of the earphone when the problem is touched by mistake can be improved.
It should be noted that, the continuous fluctuation of the capacitance difference value in the first preset time period may be continuous fluctuation of the capacitance difference value in the first preset time period, which is continuous and multiple times of upward or downward fluctuation with the preset threshold value as a standard value. Illustratively, the first preset time period is 1 minute, and in 1 minute, the capacitance difference value is greater than the preset threshold value for 8 times, and the capacitance difference value is less than the preset threshold value for 6 times, it may be determined that the capacitance difference value continuously fluctuates in the first preset time period.
Moreover, the continuous fluctuation of the capacitance difference value in the first preset time period may also be in the first preset time period, and the variance of the capacitance difference value continuously and repeatedly fluctuates upwards or downwards with the preset threshold value as a standard value.
In addition, the continuous wave of the capacitance difference value in the first preset time period may also be continuously and repeatedly fluctuated upwards or downwards within the first preset time period by taking the preset threshold as a standard value.
It should be noted that when there are multiple capacitive sensors in the headset, the headset has multiple sampling channels. At this time, the capacitance difference value of two channels corresponding to each capacitive sensor can be obtained; and then obtaining an average value of the capacitance difference according to each obtained capacitance difference value. And when the capacitance difference average value continuously fluctuates within a first preset time period, determining the state of the earphone as the in-ear state. The continuous fluctuation of the capacitance difference average value may be continuous and multiple times of upward or downward fluctuation of the capacitance difference value with the preset threshold value as a standard value within a first preset time period.
In addition, when a plurality of capacitive sensors of the earphone are provided, a certain capacitive sensor can be used as a reference, namely, if the capacitance difference value of the capacitive sensor continuously fluctuates within a first preset time period, the state of the earphone is determined as the in-ear state.
Further, after the capacitance difference value continuously fluctuates within the first preset time period and the self state is determined as the in-ear state, if the capacitance difference value continuously fluctuates, the in-ear state is maintained.
Optionally, after changing the self state to the in-ear state, the method for controlling an earphone may further include: continuously acquiring the average value of each capacitance difference value corresponding to each time interval, wherein the time length of each time interval is the same; and when the fact that the latest acquired average value is smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the latest acquired average value and the average value corresponding to the first time interval is larger than a preset value is detected, the self state is changed into the out-of-ear state.
The duration of each time interval may be 2 seconds to 1 minute, for example: the duration of each time interval may be 20 seconds, or 30 seconds, or 40 seconds, or 50 seconds. The preset value may be set according to a difference between the capacitance difference in the out-of-ear state and the capacitance difference in the in-ear state, which is not limited herein.
The above-mentioned continuously obtaining the average value of the capacitance difference values corresponding to the time intervals means that the average value of the capacitance difference values of the time intervals is continuously obtained in time sequence, for example: the duration of each time interval is 20 seconds, after the self state is changed into the in-ear state, the average value of each capacitance difference value corresponding to the 1 st to 20 th seconds is obtained, then the average value of each capacitance difference value corresponding to the 21 st to 40 th seconds is obtained, and then the average value of each capacitance difference value corresponding to the 41 st to 60 th seconds is obtained, namely the average value of each capacitance difference value of each time interval is obtained in sequence according to the time sequence.
In the embodiment of the present application, the situations that the earphone does not enter the ear or the earphone mistakenly goes out of the ear are often caused by the capacitance difference drift. Then, when the capacitance difference value continuously fluctuates within the first preset duration, after the self state is changed to the in-ear state, the capacitance difference value drifts, and when the preset threshold value is used as the standard value for judging the in-ear state, the capacitance difference value after drifting may be far greater than the preset threshold value, so that the earphone cannot be taken by the user when the user takes the earphone, the user has taken the earphone by the change of the capacitance difference value is detected, and correspondingly, the self state cannot be changed to the out-ear state under the condition.
Aiming at the situation, the average value of each capacitance difference value corresponding to each time interval is continuously obtained; the average value corresponding to the first time interval is used as a standard value for judging whether the user has the ears, when the newly acquired average value is detected to be smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the newly acquired average value and the average value corresponding to the first time interval is larger than a preset value, the self state is changed into the ear exit state, and a corresponding ear exit judging method can be set for the forced ear entry condition under the condition of false touch, so that the situation that the user cannot pick off the earphone and cannot change the self state into the ear exit state can be avoided, inconvenience is brought to the user, and user experience is reduced.
Further, obtaining the average value of the capacitance difference values corresponding to the time intervals may specifically include: collecting capacitance values in the two sampling channels in real time; acquiring a capacitance difference value of two capacitance values at the same time; and obtaining the average value of all capacitance difference values corresponding to the time interval according to all capacitance difference values belonging to the same time interval.
In the embodiment of the application, by the above manner, the average value of the capacitance difference values corresponding to the time intervals can be accurately and quickly obtained, so that the rate of judging whether the earphone is out of the ear or not can be increased.
As another optional implementation, after the self state is determined as the in-ear state, and after the capacitance difference stops fluctuating, whether the earphone is out of ear is determined according to the magnitude relationship between the acquired capacitance difference and the preset threshold. Specifically, after the capacitance difference value stops fluctuating, if the acquired capacitance difference value is smaller than a preset threshold value, the state of the earphone is determined as the ear outlet state.
When the earphone is in the problem of earphone mistaken touch (namely the earphone does not enter the ear or the earphone mistakenly goes out of the ear), the user frequently takes off the earphone and puts the earphone into the charging box corresponding to the earphone, and the earphone is taken out again for use after waiting for a short time.
Aiming at the situation that a user puts the earphone into the charging box corresponding to the user after the earphone is touched by mistake, the earphone control method can also perform the following treatment on the operation of putting the earphone into the box:
specifically, after the self box entering is detected, acquiring each capacitance difference value within a second preset time length before the box entering; screening out a minimum capacitance difference value within a second preset time length; and setting the minimum capacitance difference value as a capacitance tolerance threshold value, wherein the capacitance tolerance threshold value is a threshold value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state. Wherein the second predetermined period of time is between 20 seconds and 2 minutes.
In the embodiment of the application, the earphone is in a suspended state for a period of time before being placed in the box. Therefore, when the earphone is detected to be placed in the charging box, the capacitance difference value of the earphone in the suspended state before the earphone is placed in the charging box can be obtained by obtaining the capacitance difference values in the second preset time period before the earphone is placed in the charging box. At the moment, the minimum value in the acquired capacitance difference values is set as the capacitance difference threshold value, the capacitance difference threshold value of the earphone can be recalibrated, and the problem that the earphone is touched by mistake when the user uses the earphone again can be avoided.
It should be noted that, when the earphone is touched by mistake, the capacitance difference threshold of the earphone placed in the box can be calibrated by using the method.
In addition, it should be noted that the aforementioned control method when the capacitance difference value continuously fluctuates in the first preset time period and the aforementioned method for updating the threshold of the capacitance difference value when the earphone is placed in the box may be performed simultaneously, or the control method when the capacitance difference value continuously fluctuates in the first preset time period may be performed separately, and the method for updating the threshold of the capacitance difference value when the earphone is placed in the box may be performed separately, which is not limited herein.
Referring to fig. 2, in order to avoid the problem of false touch when the user uses the earphone, the preset threshold of the earphone may be calibrated when the earphone is in the box, and the specific calibration method is as follows:
step S201: and when the capacitor is detected to be in the box, the capacitance difference value is monitored in real time.
Wherein, the condition that the earphone is in the charging box is indicated in the box; the capacitance difference is the difference of capacitance values respectively collected from two sampling channels of the capacitance sensor of the earphone at the same time.
It should be noted that, the specific manner of monitoring the capacitance difference in real time in this step may refer to the specific manner of monitoring the capacitance difference in real time in step S101, which is avoided to be described herein for further explanation.
Step S202: and if the capacitance difference is not detected to be the preset threshold, detecting whether the newly acquired capacitance difference is the preset threshold or not by taking the moment when the capacitance difference appears as the starting moment and after the third preset time period.
The preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state. The third predetermined period of time may be between 20 minutes and 40 minutes, such as: the third predetermined period of time may be 25 minutes, or 30 minutes, or 35 minutes.
Illustratively, the third predetermined time period is 30 minutes, the capacitance difference detected at 10. At this time, with 10.
Step S203: and if the capacitance difference value is not the preset threshold value, acquiring the average value of the capacitance difference values within a fourth preset time period.
Wherein, the fourth preset time period may be between 20 seconds and 2 minutes, such as: the fourth preset time period may be 30 seconds, or 1 minute and 30 seconds.
Further, the taking of the average value of the capacitance difference values within the fourth preset time period may specifically include: collecting capacitance values in the two sampling channels in real time; acquiring a capacitance difference value of two capacitance values at the same time; and obtaining the average value of all capacitance difference values corresponding to the fourth preset time period according to all capacitance difference values in the fourth preset time period.
After obtaining the average value of the capacitance difference values within the fourth preset time period, the method may continue to step S204.
Step S204: the average value is set as a preset threshold.
It should be noted that the preset threshold is the sum of the capacitance difference threshold and a preset fixed value, so that after the average value is set as the preset threshold, the fixed value may be subtracted from the average value to obtain the capacitance difference threshold at that time.
In the embodiment of the present application, when a capacitance difference value that is not a preset threshold value is detected, it is characterized that a drift occurs in the capacitance difference value at this time. And detecting whether the newly acquired capacitance difference value is a preset threshold value again through a third preset time length, and judging whether the drift is recoverable drift or unrecoverable drift. If the capacitance difference is not the preset threshold, the unrecoverable drift is indicated. At the moment, the average value of the capacitance difference value in the fourth preset time is obtained, the average value is set as the preset threshold value, the preset threshold value can be changed into the range after the excursion occurs, when the user uses the earphone, whether the earphone goes out of the ear or not can be judged based on the preset threshold value after the excursion, whether the earphone goes out of the ear or not is judged based on the preset threshold value before the excursion, the ear in and out operation of the user can not be accurately judged, and the problem that the earphone is mistakenly touched due to the fact that the ear in operation is determined based on the preset threshold value before the excursion can be avoided.
The method for calibrating the earphone in the box may be used simultaneously with the method for controlling the earphone outside the box, or may be used alone, and is not limited herein.
Referring to fig. 3, based on the same inventive concept, an embodiment of the present invention further provides an earphone control device 100, where the earphone control device 100 includes: a first monitoring module 101 and a first control module 102.
The first monitoring module 101 is configured to monitor a capacitance difference value in real time when detecting that the first monitoring module is outside the box, where the capacitance difference value is a difference value of capacitance values respectively collected from two sampling channels of a capacitive sensor of the earphone at the same time.
The first control module 102 is configured to determine the self state as an in-ear state if the capacitance difference continuously fluctuates within a first preset time period.
Optionally, after changing the self state into the in-ear state, the first control module 102 is further configured to continuously obtain an average value of each capacitance difference value corresponding to each time interval, where the durations of the time intervals are the same; and when the fact that the latest acquired average value is smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the latest acquired average value and the average value corresponding to the first time interval is larger than a preset value is detected, changing the self state into the out-of-ear state.
Optionally, the first control module 102 is specifically configured to acquire capacitance values in two sampling channels in real time; acquiring a capacitance difference value of two capacitance values at the same time; and obtaining the average value of all capacitance difference values corresponding to the time interval according to all capacitance difference values belonging to the same time interval.
Optionally, the first control module 102 is further configured to, after detecting that the first control module enters the box, obtain each capacitance difference value within a second preset time period before entering the box; screening out a minimum capacitance difference value within a second preset time length; and setting the minimum capacitance difference value as a capacitance difference threshold value, wherein the capacitance difference threshold value is a preset value for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state.
Optionally, the first control module 102 is further configured to obtain a capacitance difference in real time when detecting that the first control module is located in the cassette; if the capacitance difference value is not detected to be the preset threshold value, the moment when the capacitance difference value appears is used as the starting moment, and after a third preset time period, whether the newly acquired capacitance difference value is the preset threshold value is detected; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining the average value of the capacitance difference values in a fourth preset time period; the average value is set as a preset threshold.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present application further provides an earphone control device 200, where the earphone control device 200 includes: a second monitoring module 201 and a second control module 202.
The second monitoring module 201 is configured to monitor a capacitance difference in real time when detecting that the second monitoring module is located in the box, where the capacitance difference is a difference between capacitance values respectively collected from two sampling channels of the capacitive sensor of the earphone at the same time.
The second control module 202 is configured to, if it is detected that the capacitance difference is not the preset threshold, take a moment when the capacitance difference appears as an initial moment, and detect whether the newly obtained capacitance difference is the preset threshold after a third preset time period elapses; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining the average value of the capacitance difference values within a fourth preset time period; the average value is set to a preset threshold value.
Referring to fig. 5, based on the same inventive concept, a schematic block diagram of an earphone 300 according to an embodiment of the present application is provided, and the earphone 300 may be used to implement the earphone control method described above. In the embodiment of the present application, the headset 300 includes a processor 310 and a capacitive sensor 320.
The processor 310 is electrically connected to the capacitive sensor 320, either directly or indirectly, to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processor 310 may be an integrated circuit chip having signal processing capabilities. The Processor 310 may also be a general-purpose Processor, for example, a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
It should be understood that the configuration shown in fig. 5 is merely illustrative, and that embodiments of the present application may provide an earphone 300 having fewer or more components than shown in fig. 5, or having a different configuration than that shown in fig. 5. Further, the components shown in fig. 5 may be implemented by software, hardware, or a combination thereof.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the computer program performs the methods provided in the above embodiments.
The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
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 apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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 (10)

1. A headset control method, applied to a headset, the method comprising:
when the earphone is detected to be outside the box, monitoring a capacitance difference value in real time, wherein the capacitance difference value is the difference value of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment;
and if the capacitance difference value continuously fluctuates within a first preset time period, determining the self state as the in-ear state.
2. The method of claim 1, wherein after the determining the self status as an in-ear status, the method further comprises:
continuously acquiring an average value of the capacitance difference values corresponding to each time interval, wherein the time lengths of the time intervals are the same;
and when the fact that the average value obtained latest is smaller than the average value corresponding to the first time interval and the absolute value of the difference value between the average value obtained latest and the average value corresponding to the first time interval is larger than a preset value is detected, changing the self state into the out-of-ear state.
3. The method of claim 1, wherein the first predetermined period of time is between 2 seconds and 3 minutes.
4. The method of claim 1, further comprising:
after the self box entering is detected, acquiring each capacitance difference value within a second preset time length before the box entering;
screening out the minimum capacitance difference value within the second preset time length;
and setting the minimum capacitance difference value as a capacitance tolerance threshold value, wherein the capacitance tolerance threshold value is a threshold value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state.
5. The method of claim 1, further comprising:
when the capacitor is detected to be in the box, acquiring the capacitance difference in real time;
if the capacitance difference is not detected to be the preset threshold, taking the moment when the capacitance difference appears as an initial moment, and detecting whether the newly acquired capacitance difference is the preset threshold or not after a third preset time period; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state;
if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period;
setting the average value as the preset threshold value.
6. A headset control method, applied to a headset, the method comprising:
when the earphone is detected to be in the box, monitoring a capacitance difference value in real time, wherein the capacitance difference value is the difference value of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment;
if the capacitance difference is not detected to be the preset threshold, taking the moment when the capacitance difference appears as an initial moment, and detecting whether the newly acquired capacitance difference is the preset threshold or not after a third preset time period; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state;
if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period;
setting the average value as the preset threshold value.
7. An earphone control device, applied to an earphone, the device comprising:
the first monitoring module is used for monitoring capacitance difference values in real time when the first monitoring module detects that the first monitoring module is outside the earphone, wherein the capacitance difference values are the difference values of capacitance values respectively collected from two sampling channels of a capacitive sensor of the earphone at the same moment;
and the first control module is used for determining the self state as the in-ear state if the capacitance difference value continuously fluctuates within a first preset time period.
8. An earphone control device, which is applied to an earphone, the device comprising:
the second monitoring module is used for monitoring capacitance difference values in real time when the second monitoring module detects that the second monitoring module is in the box, wherein the capacitance difference values are the difference values of capacitance values respectively collected from two sampling channels of a capacitance sensor of the earphone at the same moment;
the second control module is used for detecting whether the newly acquired capacitance difference value is the preset threshold value or not by taking the moment when the capacitance difference value appears as the starting moment and after a third preset time period; the preset threshold is the sum of a capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a threshold used for judging whether the earphone needs to be changed into an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, obtaining an average value of the capacitance difference values within a fourth preset time period; setting the average value as the preset threshold value.
9. An earphone, comprising: the system comprises a processor and a capacitive sensor, wherein the processor is electrically connected with the capacitive sensor;
the processor is configured to execute a program stored in the memory, to perform the method of any of claims 1-5, or to perform the method of claim 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a computer, performs the method of any one of claims 1-5 or the method of claim 6.
CN202210858109.3A 2022-07-20 2022-07-20 Earphone control method, earphone control device, earphone and computer readable storage medium Pending CN115243145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210858109.3A CN115243145A (en) 2022-07-20 2022-07-20 Earphone control method, earphone control device, earphone and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210858109.3A CN115243145A (en) 2022-07-20 2022-07-20 Earphone control method, earphone control device, earphone and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115243145A true CN115243145A (en) 2022-10-25

Family

ID=83673960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210858109.3A Pending CN115243145A (en) 2022-07-20 2022-07-20 Earphone control method, earphone control device, earphone and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115243145A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696129A (en) * 2023-01-05 2023-02-03 荣耀终端有限公司 Method and device for recognizing mixed loading of earphones

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696129A (en) * 2023-01-05 2023-02-03 荣耀终端有限公司 Method and device for recognizing mixed loading of earphones
CN115696129B (en) * 2023-01-05 2023-07-07 荣耀终端有限公司 Method and equipment for identifying mixed loading of earphone

Similar Documents

Publication Publication Date Title
CN108541363B (en) Method for managing sensor abnormality and computer system
CN110447242B (en) Wearing detection device and method and earphone
EP3435216A1 (en) Method, mobile terminal and non-transitory computer-readable storage medium for response control of damaged touch screen
WO2020019858A1 (en) Microphone hole clogging detection method and related products
CN107526638B (en) Application processing method and device, mobile terminal and storage medium
WO2014180444A1 (en) Sensitivity adjustment method and device
CN110737026A (en) equipment wearing detection method, device, equipment and readable storage medium
CN115243145A (en) Earphone control method, earphone control device, earphone and computer readable storage medium
WO2022161305A1 (en) Earphone state detection method and apparatus
WO2021103261A1 (en) Method for detecting retrieval or replacement of headphones in case, electronic device, and headphone assembly
CN112468924A (en) Earphone noise reduction method and device
WO2023072007A1 (en) Earphone control method and apparatus, and earphone and storage medium
CN106101402B (en) Method and system for adjusting sensing threshold of proximity sensor
US10761655B2 (en) Display device, management device, management system, and control program
CN113453122A (en) Wearing detection method, wearing detection device, wearing detection equipment and computer-readable storage medium
CN111083271A (en) Wearing detection method, system, equipment and computer readable storage medium
CN107526637B (en) Application processing method and device, mobile terminal and storage medium
CN114630242B (en) Earphone wearing detection method, earphone and storage medium
CN111462454A (en) Reminding method, device, equipment and storage medium
CN111464906A (en) Headset and left and right sound channel switching device and method thereof
KR20220116383A (en) Capacitance reference value determination method, capacitance reference value determination apparatus and equipment
CN110784797A (en) Wireless earphone control method and device, wireless earphone and storage medium
CN111787444A (en) Bluetooth headset pairing method and device, Bluetooth headset and storage medium
CN105791576A (en) Method and device for processing long-press physical key
US20150046128A1 (en) Filtration method for abnormal sensing data of monitoring chip

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