Headphone control method, device, headphone and computer readable storage medium

By monitoring the tolerance value of the headphone capacitive sensor in real time and adjusting the status judgment based on continuous fluctuations and average values, the problem of headphones accidentally touching is solved and the user experience is improved.

CN115243145BActive Publication Date: 2025-05-16BESTECHNIC SHANGHAI CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210858109.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-05-16
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

Existing headphones determine the wear status by detecting the capacitive difference value of the capacitive sensor, but due to the drift problem of the capacitive difference value, it is easy to cause the headphone to touch accidentally, reducing the user experience.

Method used

By monitoring the capacitance difference values ​​of the two sampling channels of the headphone capacitance sensor in real time, if the capacitance difference fluctuates continuously within the preset time period, it is determined as the in-ear state; and by continuously obtaining the average value of the capacitance difference value in each time interval, adjusting the out-ear state judgment to cope with the drift of the capacitance difference.

Benefits of technology

It effectively solves the problem of headphones accidentally touching, improves the user experience, and ensures that the headphone status accurately reflects the user's wearing status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115243145B_ABST
    Figure CN115243145B_ABST
Patent Text Reader

Abstract

The present application provides a headphone control method, device, headphone and computer-readable storage medium. The method includes: when detecting that the headphone is outside the box, real-time monitoring of the capacitance difference, the capacitance difference is the difference in capacitance values ​​collected from two sampling channels of the capacitive sensor of the headphone at the same time; if the capacitance difference fluctuates continuously within a first preset time, the state of the headphone is determined to be in-ear state. In this way, after the headphone is accidentally touched (i.e., the headphone is not in the ear or the headphone is accidentally out of the ear), the headphone state can be quickly adjusted to the user's required state, thereby improving the user experience when the headphone is accidentally touched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of headphones, and in particular, to a headphone control method, a headphone control device, a headphone, and a computer-readable storage medium. Background Art

[0002] At present, the wearing condition of the earphone is usually determined by detecting the capacitance difference of the capacitive sensor. Specifically, the channel 1 of the capacitive sensor used to detect the capacitance is close to the inner shell of the earphone, and its area may be large, so when the earphone is in the ear, close to the ear or other objects, the channel 1 will be closer to the ear or other objects. Then, compared with the capacitance value when the earphone is suspended, the capacitance value of channel 1 will have a larger jump at this time. And the channel 2 of the capacitive sensor used to detect the capacitance is far away from the inner shell of the earphone, and its area may be small, so when the earphone is in the ear, close to the ear or other objects, the jump of its capacitance value is relatively small or almost no jump. Therefore, the capacitance difference between the above-mentioned channel 1 and channel 2 can be used to detect whether the earphone is out of the ear or in the ear.

[0003] However, since the capacitance difference has drift, it may cause the earphones to touch by mistake, thus reducing the user experience. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an earphone control method, device, earphone and computer-readable storage medium to improve the user experience when the earphone has an accidental touch problem.

[0005] The present invention is achieved in that:

[0006] In a first aspect, an embodiment of the present application provides an earphone control method, which is applied to earphones, and the method includes: when detecting that the earphone is outside the box, real-time monitoring of the capacitance difference is the difference in capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the earphone at the same time; if the capacitance difference fluctuates continuously within a first preset time length, the earphone's own state is determined to be an in-ear state.

[0007] In an embodiment of the present application, if the capacitance difference fluctuates continuously within the first preset time, it may be that the capacitance difference fluctuates up and down within a certain time due to the user frequently taking off and putting on the earphones. The reason for the user to frequently take off and put on the earphones is often the problem of earphone mis-touch (i.e., the earphones are not in the ears or the earphones are mistakenly out of the ears) caused by the drift of the capacitance difference of the earphones, that is, when the user puts on the earphones, the earphones are not updated to the in-ear state, making the user unable to use the earphones, or when the user is using the earphones, the earphone state is changed to the out-of-ear state instead of the in-ear state, and the user often takes off and puts on the earphones frequently to make the earphones return to normal. Therefore, when the above situation occurs, the earphone's own state is determined to be the in-ear state, and after the earphone mis-touch problem (i.e., the earphones are not in the ears or the earphones are mistakenly out of the ears) occurs, the earphone state can be quickly adjusted to the user's required state, thereby improving the user experience of the earphones when the mis-touch problem occurs.

[0008] In combination with the technical solution provided in the first aspect above, in some possible implementation methods, after changing the state of the device itself to the in-ear state, the method further includes: continuously obtaining the average value of each capacitance difference corresponding to each time interval, wherein the duration of each time interval is the same; when it is detected that the latest obtained average value is less than the average value corresponding to the first time interval, and the absolute value of the difference between the latest obtained average value and the average value corresponding to the first time interval is greater than a preset value, changing the state of the device itself to the out-of-ear state.

[0009] In the embodiment of the present application, the situation that the earphone is not in the ear or is mistakenly out of the ear is often caused by the drift of the capacitance difference. Then, when the capacitance difference fluctuates continuously within the first preset time, after changing its own state to the in-ear state, due to the drift of the capacitance difference, when using the preset threshold as the standard value for judging whether it is in the ear, the capacitance difference after drift may be much larger than the preset threshold, so that the earphone cannot detect that the user has taken off the earphone through the change of the capacitance difference when the user takes off the earphone, and accordingly, it cannot change its own state to the out-of-ear state in this case. To address this situation, the average values ​​of the capacitance differences corresponding to each time interval are continuously obtained; the average value corresponding to the first time interval is used as the standard value for judging whether the ears are out of the ears. When it is detected that the latest average value obtained is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest average value obtained and the average value corresponding to the first time interval is greater than a preset value, the state of the earphones is changed to the out of the ears state. In response to the forced in-ear situation caused by accidental touch, a corresponding out-of-ear judgment method can be set, thereby avoiding the situation in which the earphones cannot be detected when the user takes off the earphones, and the state of the earphones cannot be changed to the out-of-ear state, thereby causing inconvenience to the user and reducing the user experience.

[0010] In combination with the technical solution provided in the first aspect above, in some possible implementations, the first preset time length is between 2 seconds and 3 minutes.

[0011] In combination with the technical solution provided in the first aspect above, in some possible implementations, the method further includes: after detecting that the earphone itself has entered the box, obtaining the capacitance difference values ​​within a second preset time period before entering the box; screening out the minimum capacitance difference value within the second preset time period; setting the minimum capacitance difference value as a capacitance difference threshold, and the capacitance difference threshold value is a threshold value for determining whether the earphone needs to be changed to an out-of-ear state or an in-ear state.

[0012] In the embodiment of the present application, before the earphone is placed in the case, it will be in a suspended state for a period of time. Therefore, by obtaining each capacitance difference within the second preset time period before entering the case when the earphone detects that it is placed in the charging case, the capacitance difference of the earphone in the suspended state before entering the case can be obtained. At this time, the minimum value of each capacitance difference obtained is set as the capacitance difference threshold, and the capacitance difference threshold of the earphone can be recalibrated, which can avoid the problem of accidental touch of the earphone when the user uses the earphone again.

[0013] In combination with the technical solution provided in the first aspect above, in some possible implementations, the method further includes: when detecting that the method itself is in the box, obtaining the capacitance difference in real time; if it is detected that the capacitance difference is not a preset threshold, taking the moment when the capacitance difference appears as the starting moment, after a third preset time period, detecting whether the latest obtained capacitance difference is the preset threshold; wherein the preset threshold is the sum of the capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used to determine whether the earphone needs to be changed to an out-of-ear state or an in-ear state; if the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period; and setting the average value to the preset threshold.

[0014] In an embodiment of the present application, when a capacitance difference that is not a preset threshold is detected, it is characterized that a drift has occurred in the capacitance difference at this time. After the third preset time period, the newly obtained capacitance difference is detected again to see if it is the preset threshold, and it can be determined whether the drift is a recoverable drift or an irrecoverable drift. If the capacitance difference is not the preset threshold, it indicates that an irrecoverable drift has occurred. At this time, the average value of the capacitance difference within the fourth preset time period is obtained, and the average value is set to the preset threshold, and the preset threshold can be changed to the range after the drift has occurred, so that when the user uses the earphone, it can judge whether the earphone is in and out of the ear based on the preset threshold after the drift, and avoid judging whether the earphone is in and out of the ear based on the preset threshold before the drift, so that the user's in and out of the ear operation cannot be accurately judged, and then the problem of false touch of the earphone caused by determining the in and out of the ear operation based on the preset threshold before the drift can be avoided.

[0015] In a second aspect, an embodiment of the present application provides an earphone control method, which is applied to earphones, and the method includes: when detecting that the earphone itself is in a box, real-time monitoring of the capacitance difference, the capacitance difference is the difference in capacitance values ​​collected from two sampling channels of the capacitive sensor of the earphone at the same time; if it is detected that the capacitance difference is not a preset threshold, then taking the moment when the capacitance difference appears as the starting moment, after a third preset time period, detecting whether the latest acquired capacitance difference is the preset threshold; wherein the preset threshold is the sum of the 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 to an out-of-ear state or an in-ear state; if the capacitance difference is not the preset threshold, obtaining the average value of the capacitance difference within a fourth preset time period; and setting the average value to the preset threshold.

[0016] In a third aspect, an embodiment of the present application provides an earphone control device, which is applied to earphones, and the device includes: a first monitoring module, which is used to monitor the capacitance difference in real time when it detects that the earphone is outside the box, and the capacitance difference is the difference between the capacitance values ​​collected from two sampling channels of the capacitive sensor of the earphone at the same time; a first control module, which is used to determine its own state as an in-ear state if the capacitance difference fluctuates continuously within a first preset time length.

[0017] In a fourth aspect, an embodiment of the present application provides an earphone control device, which is applied to earphones, and the device includes: a second monitoring module, which is used to monitor the capacitance difference in real time when it detects that the device is in a box, and the capacitance difference is the difference in capacitance values ​​collected from two sampling channels of the capacitive sensor of the earphone at the same time; a second control module, which is used to detect whether the latest acquired capacitance difference is the preset threshold value after a third preset time period, taking the time when the capacitance difference appears as the starting time if it is detected that the capacitance difference is not a preset threshold; wherein the preset threshold value is the sum of the capacitance difference threshold value and a preset fixed value, and the capacitance difference threshold value is a threshold value for judging whether the earphone needs to be changed to an out-of-ear state or an in-ear state; if the capacitance difference value is not the preset threshold value, then obtaining the average value of the capacitance difference value within a fourth preset time period; and setting the average value as the preset threshold value.

[0018] In a fifth aspect, an embodiment of the present application provides an earphone, comprising: a processor and a capacitive sensor, the processor and the capacitive sensor being electrically connected; the processor is used to run a program stored in the memory, execute a method provided in the above-mentioned first aspect embodiment and / or in combination with some possible implementation methods of the above-mentioned first aspect embodiment, or execute a method provided in the above-mentioned second aspect embodiment.

[0019] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided in the embodiment of the first aspect and / or in combination with some possible implementation methods of the embodiment of the first aspect, or the method provided in the embodiment of the second aspect is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flowchart of the steps of a headphone control method provided in an embodiment of the present application.

[0022] Figure 2 A flowchart of the steps of another headphone control method provided in an embodiment of the present application.

[0023] Figure 3 A module block diagram of an earphone control device provided in an embodiment of the present application.

[0024] Figure 4 A module block diagram of another earphone control device provided in an embodiment of the present application.

[0025] Figure 5 A module block diagram of an earphone provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0027] In view of the fact that accidental touch of the earphones may cause a bad experience to the users, the inventors of the present application, after research and exploration, propose the following embodiments to improve the user experience when accidental touch of the earphones occurs.

[0028] The following combination Figure 1 The specific process and steps of an earphone control method are described. The embodiment of the present application provides an earphone control method, which can be applied to control a capacitive in-ear detection earphone.

[0029] It should be noted that the headset control method provided in the embodiment of the present application is not based on Figure 1 The order shown below is a limitation.

[0030] Step S101: When the device detects that it is outside the box, the capacitance difference is monitored in real time.

[0031] The above-mentioned "outside the box" refers to the situation where the earphone is outside the charging box. The earphone can determine whether it is inside or outside the box by the communication with the charging box. The capacitance difference is the difference in capacitance values ​​collected from the two sampling channels of the capacitive sensor of the earphone at the same time.

[0032] In addition, since the capacitive sensor collects the capacitance values ​​in its two sampling channels in real time, after collecting the capacitance values ​​in the two sampling channels, the capacitance values ​​of the two sampling channels at the same time can be subtracted to obtain the capacitance difference at that time. Therefore, by collecting the capacitance values ​​in the above two sampling channels in real time and subtracting the two capacitance values ​​after collection, the capacitance difference of the earphone can be monitored in real time.

[0033] It should be noted that before calculating the capacitance difference, it is necessary to set in advance whether the headset uses the capacitance value collected by the first sampling channel minus the capacitance value collected by the second sampling channel, or uses the capacitance value collected by the second sampling channel minus the capacitance value collected by the first sampling channel. That is, both methods can calculate the capacitance difference, but only one of the methods can be set during the entire monitoring process, and the two methods cannot be mixed.

[0034] Step S102: If the capacitance difference fluctuates continuously within the first preset time period, the state of the earphone is determined to be in-ear state.

[0035] The first preset time length may be between 2 seconds and 3 minutes, for example, the first preset time length may be 1 minute, or 1 minute and 30 seconds, or 2 minutes.

[0036] For capacitive in-ear detection headphones, a preset threshold is usually preset in advance, and the preset threshold is the sum of the capacitance difference threshold and the preset fixed value. The capacitance difference threshold is the threshold used to determine whether the headphones need to be changed to the out-of-ear state or the in-ear state. Specifically, by comparing the collected capacitance difference with the preset threshold, when the collected capacitance difference is greater than the preset threshold, it can be determined that it should be in the in-ear state at this time; when the collected capacitance difference is less than the preset threshold, it can be determined that it should be in the out-of-ear state at this time; when the collected capacitance value is equal to the preset threshold, it can be determined that the state has not changed at this time.

[0037] It should be noted that the above capacitance difference threshold may be a headphone suspension value. The headphone suspension value refers to the capacitance difference of the headphone in a suspended state, and the suspended state refers to the headphone state when there are no other objects or other objects with a large dielectric constant near the capacitive sensor of the headphone. The above fixed value may be set according to actual conditions, for example, the fixed value may be set to 0, or 5, or 10, or 20.

[0038] If the capacitance difference fluctuates continuously within the first preset time, it may be that the capacitance difference fluctuates up and down within a certain time due to the user frequently taking off and putting on the headphones. The reason for the user to frequently take off and put on the headphones is often the problem of false touch of the headphones (i.e., the headphones are not in the ears or the headphones are mistakenly out of the ears) caused by the drift of the capacitance difference of the headphones, that is, when the user puts on the headphones, the headphones are not updated to the in-ear state, making it impossible for the user to use the headphones, or when the user is using the headphones, the headphone state is changed to the out-of-ear state instead of the in-ear state, and the user often takes off and puts on the headphones frequently to make the headphones return to normal. Therefore, when the above situation occurs, the state of the headphones is changed to the in-ear state, and the headphone state can be quickly adjusted to the user's required state after the headphone false touch problem (i.e., the headphones are not in the ears or the headphones are mistakenly out of the ears) occurs, thereby improving the user experience of the headphones when the false touch problem occurs.

[0039] It should be noted that the continuous fluctuation of the capacitance difference within the first preset time period may be that within the first preset time period, the capacitance difference takes the preset threshold as the standard value and fluctuates upward or downward continuously and multiple times. For example, the first preset time period is 1 minute. Within 1 minute, there are 8 times when the capacitance difference is greater than the preset threshold, and 6 times when the capacitance difference is less than the preset threshold. This situation can be determined as a continuous fluctuation of the capacitance difference within the first preset time period.

[0040] Furthermore, the continuous fluctuation of the capacitance difference within the first preset time period may also be that within the first preset time period, the variance of the capacitance difference takes the preset threshold as a standard value and fluctuates upward or downward continuously and multiple times.

[0041] In addition, the continuous wave of the capacitance difference within the first preset time period may also be that within the first preset time period, the absolute value of the capacitance difference takes the preset threshold as the standard value and fluctuates upward or downward continuously and multiple times.

[0042] It should also be noted that when the headset has multiple capacitive sensors, the headset has multiple sampling channels. At this time, the capacitance difference between the two channels corresponding to each capacitive sensor can be obtained; and then the capacitance difference average value is obtained based on each capacitance difference obtained. When the capacitance difference average value fluctuates continuously within the first preset time length, the headset itself is determined to be in-ear. The continuous fluctuation of the capacitance difference average value can be that within the first preset time length, the capacitance difference value takes the above-mentioned preset threshold as the standard value, and fluctuates upward or downward continuously and multiple times.

[0043] In addition, when the headset has multiple capacitive sensors, a certain capacitive sensor can be used as the standard, that is, if the capacitance difference of the capacitive sensor fluctuates continuously within a first preset time period, the headset itself is determined to be in-ear.

[0044] Further, when the capacitance difference fluctuates continuously within the first preset time period and the state of the earphone is determined to be the in-ear state, if the capacitance difference still fluctuates continuously, the in-ear state is maintained.

[0045] Optionally, after changing its own state to the in-ear state, the above-mentioned headphone control method may also include: continuously obtaining the average value of each capacitance difference corresponding to each time interval, wherein the duration of each time interval is the same; when it is detected that the latest obtained average value is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest obtained average value and the average value corresponding to the first time interval is greater than a preset value, changing its own state to the out-of-ear state.

[0046] The duration of each time interval may be from 2 seconds to 1 minute, for example, the duration of each time interval may be 20 seconds, 30 seconds, 40 seconds, or 50 seconds. The preset value may be set according to the difference between the capacitance difference when the ear is out of the ear and the capacitance difference when the ear is in the ear, and is not limited here.

[0047] In addition, the above-mentioned continuous acquisition of the average value of each capacitance difference corresponding to each time interval refers to continuously acquiring the average value of each capacitance difference of each time interval in chronological order. For example, the duration of each time interval is 20 seconds. After changing the own state to the in-ear state, first obtain the average value of each capacitance difference corresponding to the 1st to 20th seconds, then obtain the average value of each capacitance difference corresponding to the 21st to 40th seconds, and then obtain the average value of each capacitance difference corresponding to the 41st to 60th seconds, that is, the average value of each capacitance difference of each time interval is obtained in chronological order.

[0048] In the embodiment of the present application, the above-mentioned situation that the earphone is not in the ear or the earphone is mistakenly out of the ear is often caused by the drift of the capacitance difference. Then, when the capacitance difference fluctuates continuously within the first preset time, after changing its own state to the in-ear state, due to the drift of the capacitance difference, when using the preset threshold as the standard value for judging whether it is in the ear, the capacitance difference after drift may be much larger than the preset threshold, so that the earphone cannot detect that the user has taken off the earphone through the change of the capacitance difference when the user takes off the earphone, and accordingly, it cannot change its own state to the out-of-ear state in this case.

[0049] In response to the above situation, the average value of each capacitance difference corresponding to each time interval is continuously obtained; the average value corresponding to the first time interval is used as the standard value for judging whether the ears are out of the ears. When it is detected that the latest average value obtained is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest average value obtained and the average value corresponding to the first time interval is greater than the preset value, the state of the earphones is changed to the out of the ears state. For the forced in-ear situation in the case of accidental touch, the corresponding out-of-ear judgment method can be set, thereby avoiding the situation where the user cannot be detected when taking off the earphones, and the state of the earphones cannot be changed to the out-of-ear state, which causes inconvenience to the user and reduces the user experience.

[0050] Furthermore, obtaining the average value of each capacitance difference corresponding to each time interval may specifically include: collecting the capacitance values ​​in two sampling channels in real time; obtaining the capacitance difference of two capacitance values ​​at the same moment; and obtaining the average value of each capacitance difference corresponding to the time interval based on all capacitance differences belonging to the same time interval.

[0051] In the embodiment of the present application, the above method can accurately and quickly obtain the average value of each capacitance difference corresponding to each time interval, thereby improving the rate at which the earphone determines whether it is out of the ear.

[0052] As another optional implementation, after determining the earphone state as in-ear state, it is also possible to determine whether the earphone is out-of-ear according to the relationship between the acquired capacitance difference and a preset threshold value after the capacitance difference stops fluctuating. Specifically, after the capacitance difference stops fluctuating, if the acquired capacitance difference is less than the preset threshold value, the earphone state is determined as out-of-ear state.

[0053] When the earphones have the problem of accidental touch (i.e. the earphones are not in the ears or the earphones are accidentally out of the ears), in addition to frequently taking off and putting on the earphones, the user will also put the earphones into the corresponding charging box, wait for a short period of time, and then take them out for use again.

[0054] In view of the situation that the user puts the earphone into the corresponding charging box after the earphone has the problem of accidental touch, the above earphone control method can also perform the following processing on the above operation of putting the earphone into the box:

[0055] Specifically, after detecting that the headset is inserted into the box, each capacitance difference within the second preset time before the headset is inserted into the box is obtained; the minimum capacitance difference within the second preset time is screened out; the minimum capacitance difference is set as the capacitance difference threshold, and the capacitance difference threshold is a threshold for determining whether the headset needs to be changed to the out-of-ear state or the in-ear state. The second preset time is between 20 seconds and 2 minutes.

[0056] In the embodiment of the present application, before the earphone is placed in the case, it will be in a suspended state for a period of time. Therefore, by obtaining the capacitance difference values ​​within the second preset time period before the earphone is placed in the charging box when the earphone detects that it 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. At this time, the minimum value of the obtained capacitance difference values ​​is set as the capacitance difference threshold, and the capacitance difference threshold of the earphone can be recalibrated, which can avoid the problem of accidental touch of the earphone when the user uses the earphone again.

[0057] It should be noted that when the earphones do not come out of the ears due to accidental touch, the above method can also be used to calibrate the capacitance difference threshold of the earphones placed in the box.

[0058] In addition, it should be noted that the aforementioned control method when the capacitance difference fluctuates continuously within the first preset time period and the aforementioned method of updating the capacitance difference threshold when the earphone is placed in the box can be performed simultaneously, or the control method when the capacitance difference fluctuates continuously within the first preset time period and the method of updating the capacitance difference threshold when the earphone is placed in the box can be performed separately, and there is no limitation here.

[0059] See also Figure 2 In order to avoid accidental touches when the user is using the headset, the preset threshold of the headset can also be calibrated when the headset is in the box. The specific calibration method is as follows:

[0060] Step S201: When the device detects that it is inside the box, the capacitance difference is monitored in real time.

[0061] The above-mentioned "inside the box" refers to the situation where the earphone is in the charging box; the capacitance difference is the difference in capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the earphone at the same time.

[0062] It should be noted that the specific method of real-time monitoring of the capacitance difference in this step can refer to the specific method of real-time monitoring of the capacitance difference in step S101, and will not be described again here to avoid redundancy.

[0063] Step S202: if it is detected that the capacitance difference is not the preset threshold, then taking the time when the capacitance difference appears as the starting time, after a third preset time period, detecting whether the most recently acquired capacitance difference is the preset threshold.

[0064] The preset threshold is the sum of the capacitance difference threshold and the preset fixed value, and the capacitance difference threshold is a threshold used to determine whether the earphone needs to be changed to the out-of-ear state or the in-ear state. The third preset time length may be between 20 minutes and 40 minutes, for example, the third preset time length may be 25 minutes, or 30 minutes, or 35 minutes.

[0065] For example, the third preset time is 30 minutes, and the capacitance difference detected at 10:00 is 15, while the preset threshold is 10, that is, the capacitance difference is not the preset threshold. At this time, 10:00 is taken as the starting time, and whether the capacitance difference after 30 minutes (i.e., 10:30) is the preset threshold is detected.

[0066] Step S203: if the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period.

[0067] The fourth preset time length may be between 20 seconds and 2 minutes. For example, the fourth preset time length may be 30 seconds, or 1 minute, or 1 minute and 30 seconds.

[0068] Furthermore, taking the average value of the capacitance difference within the fourth preset time length may specifically include: collecting the capacitance values ​​in two sampling channels in real time; obtaining the capacitance difference of two capacitance values ​​at the same moment; and obtaining the average value of each capacitance difference corresponding to the fourth preset time length based on all capacitance differences within the fourth preset time length.

[0069] After obtaining the average value of the capacitance difference within the fourth preset time period, the method may proceed to step S204.

[0070] Step S204: setting the average value as a preset threshold.

[0071] It should be noted that the preset threshold is the sum of the capacitance difference threshold and the preset fixed value, so after the average value is set as the preset threshold, the capacitance difference threshold at this time can be obtained by subtracting the fixed value from the average value.

[0072] In an embodiment of the present application, when a capacitance difference that is not a preset threshold is detected, it is characterized that a drift has occurred in the capacitance difference at this time. After the third preset time length, the newly obtained capacitance difference is detected again to see if it is the preset threshold, and it can be determined whether the drift is a recoverable drift or an irrecoverable drift. If the capacitance difference is not the preset threshold, it means that an irrecoverable drift has occurred. At this time, the average value of the capacitance difference within the fourth preset time length is obtained, and the average value is set to the preset threshold. The preset threshold can be changed to the range after the drift has occurred, so that when the user uses the earphone, it can judge whether the earphone is in and out of the ear based on the preset threshold after the drift, and avoid judging whether the earphone is in and out of the ear based on the preset threshold before the drift, so that the user's in and out of the ear operation cannot be accurately judged, and then the problem of false touch of the earphone caused by determining the in and out of the ear operation based on the preset threshold before the drift can be avoided.

[0073] It should be noted that the above method for calibrating the earphones in the box can be used simultaneously with the above method for controlling the earphones outside the box, or the method for calibrating the earphones in the box can be used alone, which is not limited here.

[0074] See also Figure 3 Based on the same inventive concept, an embodiment of the present application further provides an earphone control device 100 , which includes: a first monitoring module 101 and a first control module 102 .

[0075] The first monitoring module 101 is used to monitor the capacitance difference in real time when it is detected that the first monitoring module 101 is outside the box. The capacitance difference is the difference between the capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the earphone at the same time.

[0076] The first control module 102 is configured to determine the state of the earphone as being in-ear if the capacitance difference fluctuates continuously within a first preset time period.

[0077] Optionally, after changing its own state to the in-ear state, the first control module 102 is also used to continuously obtain the average value of each capacitance difference corresponding to each time interval, wherein the duration of each time interval is the same; when it is detected that the latest obtained average value is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest obtained average value and the average value corresponding to the first time interval is greater than a preset value, the own state is changed to the out-of-ear state.

[0078] Optionally, the first control module 102 is specifically used to collect capacitance values ​​in two sampling channels in real time; obtain the capacitance difference between two capacitance values ​​at the same moment; and obtain the average value of each capacitance difference corresponding to the time interval based on all capacitance differences belonging to the same time interval.

[0079] Optionally, the first control module 102 is also used to obtain the capacitance difference values ​​within a second preset time period before entering the box after detecting that the earphone itself has entered the box; filter out the minimum capacitance difference value within the second preset time period; set the minimum capacitance difference value as a capacitance difference threshold, and the capacitance difference threshold value is a preset value for determining whether the earphone needs to be changed to an out-of-ear state or an in-ear state.

[0080] Optionally, the first control module 102 is also used to obtain the capacitance difference in real time when it detects that it is in the box; if it is detected that the capacitance difference is not a preset threshold, then the moment when the capacitance difference appears is taken as the starting moment, and after a third preset time period, it is detected whether the latest obtained capacitance difference is the preset threshold; wherein the preset threshold is the sum of the capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used to determine whether the earphone needs to be changed to the out-of-ear state or the in-ear state; if the capacitance difference is not the preset threshold, then the average value of the capacitance difference within the fourth preset time period is obtained; and the average value is set to the preset threshold.

[0081] See also Figure 4Based on the same inventive concept, an embodiment of the present application further provides an earphone control device 200 , which includes: a second monitoring module 201 and a second control module 202 .

[0082] The second monitoring module 201 is used to monitor the capacitance difference in real time when it is detected that the module is in the box. The capacitance difference is the difference between the capacitance values ​​collected from two sampling channels of the capacitive sensor of the earphone at the same time.

[0083] The second control module 202 is used for, if it is detected that the capacitance difference is not a preset threshold, then taking the moment when the capacitance difference appears as the starting moment, and after a third preset time period, detecting whether the latest acquired capacitance difference is the preset threshold; wherein the preset threshold is the sum of the capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used to determine whether the earphone needs to be changed to an out-of-ear state or an in-ear state; if the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period; and setting the average value as the preset threshold.

[0084] See also Figure 5 Based on the same inventive concept, the present application provides a schematic structural block diagram of an earphone 300 , which can be used to implement the above-mentioned earphone control method. In the present application embodiment, the earphone 300 includes a processor 310 and a capacitive sensor 320 .

[0085] The processor 310 is electrically connected to the capacitive sensor 320 directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. Among them, the processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 310 can also be a general-purpose processor, for example, it can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. In addition, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0086] It should be understood that Figure 5 The structure shown is for illustration only. The earphone 300 provided in the embodiment of the present application may also have Figure 5 Fewer or more components, or with Figure 5 In addition, Figure 5The components shown may be implemented by software, hardware or a combination thereof.

[0087] It should be noted that, since technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0088] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the method provided in the above embodiment is executed.

[0089] The storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)).

[0090] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0091] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0092] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0093] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0094] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for controlling a headset, characterized in that: Applied to headphones, the method comprises: When the headset is detected to be outside the box, a capacitance difference is monitored in real time, where the capacitance difference is the difference between capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the headset at the same time; If the capacitance difference fluctuates continuously within the first preset time period, the state of the earphone is determined to be in-ear state; After determining the state of the self as the in-ear state, the method further includes: Continuously obtaining an average value of each of the capacitance differences corresponding to each time interval, wherein the duration of each of the time intervals is the same; When it is detected that the latest average value obtained is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest average value obtained and the average value corresponding to the first time interval is greater than a preset value, the state of the device is changed to the out-of-ear state.

2. The method according to claim 1, characterized in that The first preset time length is between 2 seconds and 3 minutes.

3. The method according to claim 1, characterized in that The method further comprises: After detecting that the device has entered the box, obtaining each of the capacitance differences within a second preset time period before the device has entered the box; Screening out the minimum capacitance difference within the second preset time period; The minimum capacitance difference is set as a capacitance difference threshold, where the capacitance difference threshold is a threshold used to determine whether the earphone needs to be changed to an out-of-ear state or an in-ear state.

4. The method according to claim 1, characterized in that The method further comprises: When the device detects that it is in the box, the capacitance difference is acquired in real time; If it is detected that the capacitance difference is not the preset threshold, then taking the moment when the capacitance difference appears as the starting moment, after a third preset time, detecting whether the newly acquired capacitance difference is the preset threshold; wherein the preset threshold is the sum of the capacitance difference threshold and a preset fixed value, and the capacitance difference threshold is a value used to determine whether the earphone needs to be changed to the out-of-ear state or the in-ear state; If the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period; The average value is set as the preset threshold.

5. A method for controlling an earphone, characterized in that: Applied to headphones, the method comprises: When the headset detects that it is in the box, the capacitance difference is monitored in real time, where the capacitance difference is the difference between the capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the headset at the same time; If it is detected that the capacitance difference is not the preset threshold, then taking the moment when the capacitance difference appears as the starting moment, after a third preset time, detecting whether the newly acquired capacitance difference is the preset threshold; wherein the preset threshold is the sum of the 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 to the out-of-ear state or the in-ear state; If the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period; The average value is set as the preset threshold.

6. An earphone control device, characterized in that: Applied to headphones, the device comprises: A first monitoring module is used to monitor the capacitance difference in real time when it is detected that the headset is outside the box, wherein the capacitance difference is the difference between the capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the headset at the same time; A first control module, configured to determine the state of the earphone as an in-ear state if the capacitance difference fluctuates continuously within a first preset time period; The first control module is also used to: continuously obtain the average value of each capacitance difference corresponding to each time interval, wherein the duration of each time interval is the same; when it is detected that the latest obtained average value is smaller than the average value corresponding to the first time interval, and the absolute value of the difference between the latest obtained average value and the average value corresponding to the first time interval is greater than a preset value, change its own state to the out-of-ear state.

7. An earphone control device, characterized in that: Applied to headphones, the device comprises: A second monitoring module is used to monitor the capacitance difference in real time when detecting that the headset is in the box, wherein the capacitance difference is the difference between the capacitance values ​​respectively collected from two sampling channels of the capacitive sensor of the headset at the same time; The second control module is used for, if it is detected that the capacitance difference is not a preset threshold, then taking the moment when the capacitance difference appears as the starting moment, and after a third preset time period, detecting whether the latest acquired capacitance difference is the preset threshold; wherein the preset threshold is the sum of the 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 to an out-of-ear state or an in-ear state; if the capacitance difference is not the preset threshold, obtaining an average value of the capacitance difference within a fourth preset time period; and setting the average value as the preset threshold.

8. A headset, characterized in that: include: A processor and a capacitive sensor, wherein the processor and the capacitive sensor are electrically connected; The processor is used to run the program stored in the memory, execute the method according to any one of claims 1 to 4, or execute the method according to claim 5.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the method according to any one of claims 1 to 4 or the method according to claim 5 is executed.

Citation Information

Patent Citations

  • Wearing detection method and device for headphone, and headphone

    CN107065016A

  • Equipment wearing detection method and device, equipment and readable storage medium

    CN110737026A

  • Earphone control method and device, earphone and storage medium

    CN113709623A