CN111491249B - Method and device for detecting in-ear state of earphone, earphone and storage medium - Google Patents

Method and device for detecting in-ear state of earphone, earphone and storage medium Download PDF

Info

Publication number
CN111491249B
CN111491249B CN202010265324.3A CN202010265324A CN111491249B CN 111491249 B CN111491249 B CN 111491249B CN 202010265324 A CN202010265324 A CN 202010265324A CN 111491249 B CN111491249 B CN 111491249B
Authority
CN
China
Prior art keywords
earphone
ear
wave signal
sound wave
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010265324.3A
Other languages
Chinese (zh)
Other versions
CN111491249A (en
Inventor
张峰
张斌
蒋兆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Zimi Electronic Technology Co Ltd
Original Assignee
Jiangsu Zimi Electronic Technology 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 Jiangsu Zimi Electronic Technology Co Ltd filed Critical Jiangsu Zimi Electronic Technology Co Ltd
Priority to CN202010265324.3A priority Critical patent/CN111491249B/en
Publication of CN111491249A publication Critical patent/CN111491249A/en
Application granted granted Critical
Publication of CN111491249B publication Critical patent/CN111491249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • H04R29/004Monitoring arrangements; Testing arrangements for microphones

Landscapes

  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Headphones And Earphones (AREA)

Abstract

The embodiment of the invention discloses a method and a device for detecting an in-ear state of an earphone, the earphone and a storage medium. The method comprises the following steps: preliminarily detecting the in-ear state of the earphone to be detected in real time; when the earphone is in an in-ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear; if the initial detection result is that the earphone is in the ear, simultaneously starting a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone; and determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal. The problem that misjudgment is easy to occur in the method for detecting the in-ear state of the earphone through the sensor in the prior art is solved, and the accuracy rate of detecting the in-ear state of the earphone is improved.

Description

Earphone in-ear state detection method and device, earphone and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer control, in particular to a method and a device for detecting an in-ear state of an earphone, the earphone and a storage medium.
Background
In recent years, under the background of rapid popularization of new-generation consumer electronics devices such as global smart phones and tablet computers, earphone products, particularly wireless earphone products, have shown an explosive growth trend. The detection of the in-ear state of the earphone, i.e. in-ear detection, has also been widely studied by those skilled in the art, wherein the in-ear state of the earphone may be in-ear or not in-ear.
At present, the in-ear state of the earphone is mainly determined by a sensor (e.g., an acceleration sensor or a pressure sensor).
However, the wearing state of the earphone is determined only by the sensor, and thus, the determination may be made erroneously, and for example, when the user accidentally touches the earphone, the pressure sensor may respond to determine that the in-ear state of the earphone is in-ear.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting an in-ear state of an earphone, the earphone and a storage medium, so as to improve the detection accuracy of the wearing state of the earphone and reduce the misjudgment.
In a first aspect, an embodiment of the present invention provides a method for detecting an in-ear state of an earphone, where the method includes:
preliminarily detecting the in-ear state of the earphone to be detected in real time;
when the earphone is in an in-ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear;
if the initial detection result is that the earphone is in the ear, simultaneously starting a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone;
and determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting an in-ear state of an earphone, where the apparatus includes:
the preliminary detection module is used for preliminarily detecting the in-ear state of the earphone to be detected in real time;
when the earphone is in an in-ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear;
the feed-forward microphone and feedback microphone starting module is used for simultaneously starting the feed-forward microphone and the feedback microphone and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feed-forward microphone and the feedback microphone if the initial detection result is that the earphone is in the ear;
and the in-ear state determining module is used for determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal.
In a third aspect, an embodiment of the present invention further provides a headset, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for detecting the in-ear state of the headset according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for detecting an in-ear state of a headset according to any one of the embodiments of the present invention.
The embodiment of the invention carries out preliminary detection on the in-ear state of the earphone to be detected in real time; if the initial detection result is that the earphone is in the ear, simultaneously triggering a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone; and comparing the first sound wave signal with the second sound wave signal, and determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal. The problem that misjudgment is easy to occur in the method for detecting the in-ear state of the earphone through the sensor in the prior art is solved, and the accuracy rate of detecting the in-ear state of the earphone is improved.
Drawings
Fig. 1 is a flowchart of a method for detecting an in-ear state of an earphone according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for detecting an in-ear state of an earphone according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for detecting an in-ear state of an earphone according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for detecting an in-ear state of an earphone according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an earphone in-ear state detection apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an earphone according to a fifth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
Example one
Fig. 1 is a flowchart of a method for detecting an in-ear state of an earphone according to an embodiment of the present invention, where the method is applicable to a case of detecting an in-ear state of an earphone, and the method may be performed by an apparatus for detecting an in-ear state of an earphone, where the apparatus may be implemented by software and/or hardware and is integrated in an earphone, where the earphone may be a bluetooth earphone, a headset, an earplug earphone, or the like. Specifically, referring to fig. 1, the method specifically includes the following steps:
and S110, carrying out preliminary detection on the in-ear state of the earphone to be detected in real time.
The earphone to be detected may be a bluetooth earphone, a headset, an earplug earphone, or the like, which is not limited in the embodiment of the present invention. The in-ear state of the earphone to be detected can be that the earphone is in the ear or the earphone is not in the ear.
Specifically, the earphone related to the embodiment of the invention comprises a feedforward microphone and a feedback microphone, when the earphone is in an ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned inside the ear.
It should be noted that, in general, the feedforward microphone is used to detect the environmental noise in real time; the feedback microphone detects the noise level and the audio sound pressure in the auditory canal and feeds the noise level and the audio sound pressure back to the audio signal processor, so that the noise reduction processing of the earphone is realized.
Optionally, the in-ear state of the earphone to be detected may be preliminarily detected in real time by a distance sensor and/or a capacitance sensor.
Specifically, a distance sensor and/or a capacitance sensor may be configured in the earphone, and the in-ear state of the earphone to be detected is preliminarily detected in real time through the distance sensor and/or the capacitance sensor. For example, the in-ear state of the earphone can be preliminarily detected as the earphone is in the ear through the distance sensor and/or the capacitance sensor, and further, the preliminary detection result can be judged.
It should be noted that, in the embodiment of the present invention, the in-ear state of the earphone to be detected may also be preliminarily detected in real time by using other sensors, for example, a pressure sensor or an infrared sensor, which is not limited in this embodiment of the present invention.
And S120, if the initial detection result is that the earphone is inserted into the ear, simultaneously starting the feedforward microphone and the feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone.
Specifically, if the in-ear state of the earphone to be detected is preliminarily detected as the in-ear state of the earphone through the distance sensor and/or the capacitance sensor, the feedforward microphone and the feedback microphone can be simultaneously started, and the first sound wave signal and the second sound wave signal respectively collected by the feedforward microphone and the feedback microphone can be obtained.
For example, the feedforward microphone may be triggered to acquire the first acoustic signal, and the feedback microphone may be triggered to acquire the second acoustic signal. Wherein, the first sound wave signal and the second sound wave signal may be the same or different.
And S130, determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal.
Specifically, after the feed-forward microphone acquires the first sound wave signal and the feed-back microphone acquires the second sound wave signal, the difference between the first sound wave signal and the second sound wave signal can be further determined, and the in-ear state of the earphone can be determined according to the difference between the first sound wave signal and the second sound wave signal.
Optionally, determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal may include: respectively acquiring at least one first sound attribute parameter and at least one second sound attribute parameter corresponding to the first sound wave signal and the second sound wave signal; calculating the parameter similarity between the first sound wave signal and the second sound wave signal according to the difference value between the first sound attribute parameter and the second sound attribute parameter; if the parameter similarity is larger than a first parameter threshold value, determining that the earphone is not in the ear; and if the parameter similarity is less than or equal to a second parameter threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
The first sound attribute parameter may include: at least one of a frequency, amplitude, intensity, or energy value of the first sound; the second sound attribute parameters may include: at least one of a frequency, an amplitude, an intensity, or an energy value of the first sound.
Specifically, the frequency f1 in the first sound attribute parameter corresponding to the first sound wave signal and the frequency f2 in the second sound attribute parameter corresponding to the second sound wave signal may be obtained, a difference value between the frequency f1 and the frequency f2 may be calculated, and the difference value between the frequency f1 and the frequency f2 may be used as the parameter similarity between the first sound wave signal and the second sound wave signal. It is understood that the smaller the difference value between the frequency f1 and the frequency f2, the greater the parameter similarity between the first acoustic signal and the second acoustic signal. For example, if the difference between the frequency f1 and the frequency f2 is equal to zero, the parameter similarity between the first acoustic signal and the second acoustic signal is equal to 1, i.e. the first acoustic signal is identical to the second acoustic signal.
Further, if the parameter similarity between the first sound wave signal and the second sound wave signal is greater than a first parameter threshold value, it is determined that the earphone is not in the ear. The first parameter threshold may be a value such as 0.95 or 0.98, which is not limited in the embodiment of the present invention. It should be noted that the greater the similarity of the parameters between the first acoustic wave signal and the second acoustic wave signal, the more likely the first acoustic wave signal and the second acoustic wave signal are acoustic wave signals in the same sound field.
For example, if the first parameter threshold value is 0.98, when the parameter similarity between the first sound wave signal and the second sound wave signal is not 0.99, it may be considered that the first sound wave signal is almost the same as the second sound wave signal, and at this time, the first sound wave signal and the second sound wave signal are more likely to be sound wave signals in the same sound field, and it may be determined that the earphone is not inserted into the ear.
Further, if the parameter similarity between the first sound wave signal and the second sound wave signal is smaller than a second parameter threshold value, the in-ear state of the earphone is determined to be that the earphone is in the ear. The second parameter threshold may be a value such as 0.5 or 0.6, which is not limited in the embodiment of the present invention. It should be noted that the smaller the similarity of the parameters between the first acoustic signal and the second acoustic signal, the more likely the first acoustic signal and the second acoustic signal are acoustic signals in different sound fields.
For example, if the second parameter threshold is 0.6, when the parameter similarity between the first sound wave signal and the second sound wave signal is not 0.58, at this time, the first sound wave signal and the second sound wave signal are sound wave signals in different sound fields, and it may be determined that the in-ear state of the earphone is that the earphone is in the ear. It should be noted that, in the embodiment of the present invention, the first parameter threshold is greater than the second parameter threshold.
It should be noted that, in the embodiment of the present invention, the parameter similarity between the first sound wave signal and the second sound wave signal may also be calculated according to other sound property parameters, for example, the parameter similarity between the first sound wave signal and the second sound wave signal may be calculated through a period T1 in the first sound property parameter corresponding to the first sound wave signal and a period T2 in the second sound property parameter corresponding to the second sound wave signal; the parameter similarity between the first sound wave signal and the second sound wave signal can also be calculated through the period T1 and the intensity d1 in the first sound attribute parameter corresponding to the first sound wave signal and the period T2 and the intensity d2 in the second sound attribute parameter corresponding to the second sound wave signal, which is not described herein again in the embodiments of the present invention.
The embodiment performs preliminary detection on the in-ear state of the earphone to be detected in real time; if the initial detection result is that the earphone is in the ear, simultaneously triggering a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone; and comparing the first sound wave signal with the second sound wave signal, and determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal. The problem that misjudgment is easy to occur in the method for detecting the in-ear state of the earphone through the sensor in the prior art is solved, and the accuracy rate of detecting the in-ear state of the earphone is improved.
Example two
Fig. 2 is a flowchart of a method for detecting an in-ear state of an earphone according to a second embodiment of the present invention, which is detailed on the basis of the foregoing embodiment, in which determining the in-ear state of the earphone according to a signal difference between a first sound wave signal and a second sound wave signal may include: calculating the waveform similarity between the first sound wave signal and the second sound wave signal; if the waveform similarity is larger than a first waveform threshold value, determining that the earphone is not in the ear in the in-ear state; and if the waveform similarity is less than or equal to a second waveform threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear. Specifically, referring to fig. 2, the method specifically includes the following steps:
s210, carrying out preliminary detection on the in-ear state of the earphone to be detected in real time.
And S220, if the initial detection result is that the earphone is in the ear, simultaneously starting the feedforward microphone and the feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone.
And S230, calculating the waveform similarity between the first sound wave signal and the second sound wave signal.
Specifically, after the feedforward microphone acquires the first sound wave signal and the feedback microphone acquires the second sound wave signal, the waveform of the first sound wave signal and the waveform of the second sound wave signal can be further acquired, and the waveform similarity between the first sound wave signal and the second sound wave signal can be calculated.
Further, if the waveform similarity is greater than a first waveform threshold value, determining that the earphone is not in the ear; and if the waveform similarity is less than or equal to the second waveform threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
The first waveform threshold is greater than the second waveform threshold, the first waveform threshold may be a value such as 0.8 or 0.9, and the first waveform threshold may be a value such as 0.5 or 0.6, which is not limited in the embodiment of the present invention.
In a specific example of the embodiment of the present invention, if the first waveform threshold value is 0.9 and the second waveform threshold value is 0.65, and if the waveform similarity between the first acoustic wave signal and the second acoustic wave signal is calculated to be 0.98, it can be obviously seen that the waveform similarity is greater than the first waveform threshold value of 0.9, it can be determined that the in-ear state of the earphone is that the earphone is not in the ear; if the waveform similarity between the first sound wave signal and the second sound wave signal is calculated to be 0.6, it can be obviously seen that the waveform similarity is less than the second waveform threshold value of 0.65, and the in-ear state of the earphone can be determined to be that the earphone is in the ear.
The embodiment determines the in-ear state of the earphone according to the waveform similarity by calculating the waveform similarity of the first sound wave signal and the second sound wave signal. The problem that misjudgment is easy to occur in the method for detecting the in-ear state of the earphone through the sensor in the prior art is solved, and the accuracy rate of detecting the in-ear state of the earphone is improved.
On the basis of the above technical solutions, after determining that the in-ear state of the earphone is that the earphone is in-ear, the method may further include: and automatically establishing a communication link with the user equipment, acquiring a music play list or a video play list stored in the user equipment, and playing music or video to the user.
The user equipment can be an electronic device such as a mobile phone, a tablet personal computer or a smart watch.
Specifically, after the in-ear state of the headset is determined to be that the headset is in the ear, the communication connection between the headset and the user equipment can be automatically established, for example, the headset establishes a communication link with the user equipment through bluetooth; furthermore, the earphone can acquire a music play list stored in a music play program installed in the user equipment and start to automatically play music to the user; or the headset may acquire a video playlist stored in a video playback class program installed in the user equipment and start to automatically play a video to the user.
The earphone has the advantages that once the in-ear state of the earphone is confirmed to be in the ear of the earphone, other services can be further provided for the user, the intelligent degree of the earphone is improved, and the user operation is reduced.
EXAMPLE III
Fig. 3 is a flowchart of a method for detecting an in-ear state of an earphone according to a third embodiment of the present invention, where this embodiment refines the embodiment of the present invention on the basis of the foregoing embodiments, and specifically, the performing preliminary detection on the in-ear state of the earphone to be detected in real time by using a distance sensor may include: detecting the distance between the earphone to be detected and the approaching object in real time through a distance sensor, and if the distance is smaller than a first set threshold value, determining that the initial detection state of the earphone to be detected is that the earphone is inserted into the ear; treat going into ear state of detecting the earphone in real time through capacitive sensor and carry out preliminary detection, can include: and detecting the capacitance sensing signal in real time through the capacitance sensor, and if the fluctuation range of the capacitance sensing signal is larger than a second set threshold value, determining that the primary detection state of the earphone to be detected is that the earphone is in the ear. Specifically, referring to fig. 3, the method specifically includes the following steps:
and S310, carrying out preliminary detection on the in-ear state of the earphone to be detected in real time through a distance sensor and/or a capacitance sensor.
And S311, carrying out preliminary detection on the in-ear state of the earphone to be detected in real time through the distance sensor.
Specifically, treat the income ear state of detecting the earphone in real time through distance sensor and carry out preliminary detection, can include: and detecting the distance between the earphone to be detected and the approaching object in real time through a distance sensor, and if the distance is smaller than a first set threshold value, determining that the initial detection state of the earphone to be detected is that the earphone is inserted into the ear.
The first set threshold may be a value of 1 centimeter or 1 millimeter, which is not limited in the embodiment of the present invention.
For example, if the first set threshold is 1 mm, when the distance sensor detects that the distance between the to-be-detected earphone and the approaching object is 0, the in-ear state of the earphone can be preliminarily judged as the earphone in-ear state, whether the in-ear state of the earphone is true or not can be accurately judged through subsequent judgment, and if the in-ear state of the earphone is true, the in-ear state of the earphone is the earphone in-ear state; otherwise, the in-ear state of the earphone is that the earphone is not in the ear.
And S312, carrying out preliminary detection on the in-ear state of the earphone to be detected in real time through the capacitive sensor.
Specifically, treat the income ear state of detecting the earphone in real time through capacitive sensor and carry out preliminary detection, can include: and detecting the capacitance sensing signal in real time through the capacitance sensor, and if the fluctuation range of the capacitance sensing signal is larger than a second set threshold value, determining that the primary detection state of the earphone to be detected is that the earphone is in the ear.
The second set threshold may be a value such as 1F (farad) or 0.1F, which is not limited in the embodiment of the present invention.
Illustratively, if the first set threshold is 0.1F, when the capacitance sensor detects that the fluctuation range of the capacitance sensing signal is 2F and is greater than 0.1F in real time, the in-ear state of the earphone can be preliminarily judged as the in-ear state of the earphone, whether the in-ear state of the earphone is true can be accurately judged through subsequent judgment, and if the in-ear state of the earphone is true, the in-ear state of the earphone is the in-ear state of the earphone; otherwise, the in-ear state of the earphone is that the earphone is not in the ear.
And S320, if the initial detection result is that the earphone is in the ear, simultaneously starting the feedforward microphone and the feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone.
And S330, determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal.
The embodiment can preliminarily detect the in-ear state of the earphone to be detected in real time through the distance sensor and/or the capacitance sensor, and can provide basis for accurately determining the in-ear state of the earphone, so that the accuracy of detecting the in-ear state of the earphone is improved.
Fig. 4 is a flowchart of a method for detecting an in-ear state of an earphone according to a third embodiment of the present invention, where the method includes the following steps:
and S410, starting to use the earphone.
S420, the distance sensor or the capacitance sensor detects the trigger in-ear detection result 1.
S430, the feedforward microphone and the feedback microphone respectively grab a section of sound wave signals V1 and V2.
S440, comparing whether V1 and V2 are the same.
If yes, go to S450;
if not, go to S460.
S450, the in-ear detection result 2 is true.
S451, the headphone performs or maintains a no-in-ear operation.
S460, the in-ear detection result 2 is false.
S461, the earphone performs an in-ear operation.
In the above example, the distance sensor or the capacitance sensor detects the earphone-in-ear detection result, and triggers the feedforward microphone and the feedback microphone to capture a section of sound wave signals V1 and V2 respectively, and compares whether the sound wave signals are the same or not, and if the sound wave signals are the same, it is determined that the earphone-in-ear state is that the earphone is not in the ear; if the earphone in-ear state is different, the earphone in-ear state is determined to be the earphone in-ear state, the problem that misjudgment is easy to occur in the method for detecting the earphone in-ear state through the sensor in the prior art is solved, and the accuracy of detecting the earphone in-ear state is improved.
Example four
Fig. 5 is a schematic structural diagram of an earphone in-ear state detection apparatus according to a fourth embodiment of the present invention, which may execute an earphone in-ear state detection method according to any embodiment of the present invention, specifically, referring to fig. 5, the apparatus includes: a preliminary detection module 510, a feedforward microphone and feedback microphone turn-on module 520, and an in-ear status determination module 530.
The preliminary detection module 510 is configured to perform preliminary detection on the in-ear state of the earphone to be detected in real time;
when the earphone is in an in-ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear;
a feedforward microphone and feedback microphone turning-on module 520, configured to turn on the feedforward microphone and the feedback microphone simultaneously if the initial detection result indicates that the earphone is in the ear, and obtain a first sound wave signal and a second sound wave signal respectively collected by the feedforward microphone and the feedback microphone;
an in-ear state determining module 530, configured to determine an in-ear state of the earphone according to a signal difference between the first sound wave signal and the second sound wave signal.
According to the scheme of the embodiment, the primary detection module is used for carrying out primary detection on the in-ear state of the earphone to be detected in real time; if the initial detection result is that the earphone is in the ear, the feedforward microphone and the feedback microphone are started simultaneously through the feedforward microphone and the feedback microphone starting module, and a first sound wave signal and a second sound wave signal which are respectively collected by the feedforward microphone and the feedback microphone are obtained; the in-ear state of the earphone is determined by the in-ear state determining module according to the signal difference between the first sound wave signal and the second sound wave signal, so that the problem that misjudgment is easy to occur in the method for detecting the in-ear state of the earphone through the sensor in the prior art is solved, and the accuracy of detecting the in-ear state of the earphone is improved.
Optionally, the in-ear status determining module 530 includes: the parameter similarity determining submodule is used for respectively acquiring at least one first sound attribute parameter and at least one second sound attribute parameter corresponding to the first sound wave signal and the second sound wave signal; calculating the parameter similarity between the first sound wave signal and the second sound wave signal according to the difference value between the first sound attribute parameter and the second sound attribute parameter; if the parameter similarity is larger than a first parameter threshold value, determining that the earphone is not in the ear; and if the parameter similarity is less than or equal to the second parameter threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
Optionally, the in-ear status determining module 530 includes: a waveform similarity calculation unit for calculating a waveform similarity between the first acoustic signal and the second acoustic signal; if the waveform similarity is larger than a first waveform threshold value, determining that the earphone is not in the ear in the in-ear state; and if the waveform similarity is less than or equal to a second waveform threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
Optionally, the preliminary detecting module 510 includes: a distance sensor detection submodule and a capacitance sensor detection submodule;
and the distance sensor detection submodule is used for carrying out preliminary detection on the in-ear state of the earphone to be detected in real time through the distance sensor and/or the capacitance sensor.
And the capacitance sensor detection submodule is used for detecting the distance between the earphone to be detected and the approaching object in real time through the distance sensor, and if the distance is smaller than a first set threshold value, the preliminary detection state of the earphone to be detected is determined as that the earphone is inserted into the ear.
Optionally, the device for detecting an in-ear state of an earphone in this embodiment further includes: and the playing module is used for automatically establishing a communication link with the user equipment, acquiring a music play list or a video play list stored in the user equipment and playing music or video to the user.
The earphone in-ear state detection device provided by the embodiment of the invention can execute the earphone in-ear state detection method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a fifth embodiment of the present invention, as shown in fig. 6, the earphone includes a processor 60, a memory 61, an input device 62, and an output device 63; the number of processors 60 in the headset may be one or more, and one processor 60 is taken as an example in fig. 6; the processor 60, the memory 61, the input device 62 and the output device 63 in the headset may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The memory 61 is a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the earphone in-ear state detection method in the embodiment of the present invention (for example, the preliminary detection module 510, the feedforward microphone and feedback microphone turning-on module 520, and the in-ear state determination module 530 in the earphone in-ear state detection apparatus). The processor 60 executes various functional applications and data processing of the headset by executing software programs, instructions and modules stored in the memory 61, that is, implements the headset in-ear state detection method described above.
The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 61 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 61 may further include memory located remotely from the processor 60, which may be connected to the headset over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 62 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the headset. The output device 63 may include a display device such as a display screen.
Example six
A sixth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for detecting an in-ear state of an earphone, the method including:
preliminarily detecting the in-ear state of the earphone to be detected in real time;
when the earphone is in an in-ear state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear;
if the initial detection result is that the earphone is in the ear, simultaneously starting a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone;
and determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the method for detecting the in-ear state of the earphone provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the device for detecting an in-ear state of an earphone, the units and modules included in the device are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for detecting an in-ear state of an earphone, comprising:
preliminarily detecting the in-ear state of the earphone to be detected in real time;
the earphone comprises a feedforward microphone and a feedback microphone, when the earphone is in an ear state, the feedforward microphone is positioned outside the ear, the feedback microphone is positioned in the ear, the feedforward microphone is used for detecting environmental noise in real time, and the feedback microphone detects the noise level and the audio sound pressure in the ear canal and feeds the noise level and the audio sound pressure back to the audio signal processor;
if the initial detection result is that the earphone is in the ear, simultaneously starting a feedforward microphone and a feedback microphone, and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feedforward microphone and the feedback microphone;
determining an in-ear state of the earphone according to a signal difference between the first sound wave signal and the second sound wave signal;
the determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal comprises:
respectively acquiring at least one first sound attribute parameter and at least one second sound attribute parameter corresponding to the first sound wave signal and the second sound wave signal;
calculating parameter similarity between the first sound wave signal and the second sound wave signal according to a difference value between the first sound attribute parameter and the second sound attribute parameter;
if the parameter similarity is larger than a first parameter threshold value, determining that the earphone is not in the ear in the in-ear state;
and if the parameter similarity is smaller than or equal to a second parameter threshold value, determining that the in-ear state of the earphone is that the earphone is in-ear.
2. The method of claim 1, wherein determining the in-ear state of the headset from the signal difference between the first and second acoustic signals comprises:
calculating waveform similarity between the first sound wave signal and the second sound wave signal;
if the waveform similarity is larger than a first waveform threshold value, determining that the earphone is not in the ear-entering state;
and if the waveform similarity is smaller than or equal to a second waveform threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
3. The method according to claim 1, wherein the preliminary detection of the in-ear state of the earphone to be detected in real time comprises:
and the in-ear state of the earphone to be detected is preliminarily detected in real time through the distance sensor and/or the capacitance sensor.
4. The method according to claim 3, wherein the preliminary detection of the in-ear state of the earphone to be detected by the distance sensor in real time comprises:
and detecting the distance between the earphone to be detected and the approaching object in real time through a distance sensor, and if the distance is smaller than a first set threshold value, determining that the initial detection state of the earphone to be detected is that the earphone is inserted into the ear.
5. The method according to claim 3, wherein the preliminary detection of the in-ear state of the earphone to be detected by the capacitive sensor in real time comprises:
and detecting a capacitance sensing signal in real time through a capacitance sensor, and if the fluctuation range of the capacitance sensing signal is larger than a second set threshold value, determining that the initial detection state of the earphone to be detected is that the earphone is in the ear.
6. The method of claim 1 or 2, after determining that the in-ear state of the headset is in-ear, further comprising:
and automatically establishing a communication link with the user equipment, acquiring a music play list or a video play list stored in the user equipment, and playing music or video to the user.
7. A device for detecting an in-ear state of an earphone, comprising:
the preliminary detection module is used for preliminarily detecting the in-ear state of the earphone to be detected in real time;
when the earphone is in an ear-in state, the feedforward microphone is positioned outside the ear, and the feedback microphone is positioned in the ear;
the device comprises a feed-forward microphone and feedback microphone starting module, an audio signal processor and a feedback microphone, wherein the feed-forward microphone and the feedback microphone starting module are used for simultaneously starting the feed-forward microphone and the feedback microphone and acquiring a first sound wave signal and a second sound wave signal which are respectively acquired by the feed-forward microphone and the feedback microphone if the initial detection result is that the earphone is inserted into the ear, the feed-forward microphone is used for detecting the environmental noise in real time, and the feedback microphone detects the noise level and the audio sound pressure in the ear canal and feeds the noise level and the audio sound pressure back to the audio signal processor;
the in-ear state determining module is used for determining the in-ear state of the earphone according to the signal difference between the first sound wave signal and the second sound wave signal;
the in-ear status determination module includes: the parameter similarity determining submodule is used for respectively acquiring at least one first sound attribute parameter and at least one second sound attribute parameter which respectively correspond to the first sound wave signal and the second sound wave signal; calculating the parameter similarity between the first sound wave signal and the second sound wave signal according to the difference value between the first sound attribute parameter and the second sound attribute parameter; if the parameter similarity is larger than a first parameter threshold value, determining that the earphone is not in the ear; and if the parameter similarity is less than or equal to the second parameter threshold value, determining that the in-ear state of the earphone is that the earphone is in the ear.
8. A headset comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a method of detecting an in-ear state of a headset according to any of claims 1-6.
9. A storage medium containing computer-executable instructions for performing a method for detecting an in-ear status of a headset according to any one of claims 1-6 when executed by a computer processor.
CN202010265324.3A 2020-04-07 2020-04-07 Method and device for detecting in-ear state of earphone, earphone and storage medium Active CN111491249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010265324.3A CN111491249B (en) 2020-04-07 2020-04-07 Method and device for detecting in-ear state of earphone, earphone and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010265324.3A CN111491249B (en) 2020-04-07 2020-04-07 Method and device for detecting in-ear state of earphone, earphone and storage medium

Publications (2)

Publication Number Publication Date
CN111491249A CN111491249A (en) 2020-08-04
CN111491249B true CN111491249B (en) 2022-09-30

Family

ID=71798160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010265324.3A Active CN111491249B (en) 2020-04-07 2020-04-07 Method and device for detecting in-ear state of earphone, earphone and storage medium

Country Status (1)

Country Link
CN (1) CN111491249B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112272346B (en) * 2020-11-27 2023-01-24 歌尔科技有限公司 In-ear detection method, earphone and computer readable storage medium
CN112911487B (en) * 2021-02-09 2022-12-27 恒玄科技(上海)股份有限公司 In-ear detection method for wireless headset, wireless headset and storage medium
CN113099346A (en) * 2021-04-07 2021-07-09 南京紫牛软件科技有限公司 Earphone control method, earphone control device, wireless earphone and storage medium
CN113473286A (en) * 2021-06-23 2021-10-01 芯海科技(深圳)股份有限公司 State detection method, earphone and computer readable storage medium
CN113938782B (en) * 2021-09-30 2023-10-31 安克创新科技股份有限公司 Method for identifying in-ear state of earphone and self-adaptive adjusting mode of earphone and earphone
CN114157975A (en) * 2021-12-01 2022-03-08 思必驰科技股份有限公司 Earphone wearing detection method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8705784B2 (en) * 2009-01-23 2014-04-22 Sony Corporation Acoustic in-ear detection for earpiece
JP5880340B2 (en) * 2012-08-02 2016-03-09 ソニー株式会社 Headphone device, wearing state detection device, wearing state detection method
KR101803306B1 (en) * 2016-08-11 2017-11-30 주식회사 오르페오사운드웍스 Apparatus and method for monitoring state of wearing earphone
US9894452B1 (en) * 2017-02-24 2018-02-13 Bose Corporation Off-head detection of in-ear headset
CN109195045B (en) * 2018-08-16 2020-08-25 歌尔科技有限公司 Method and device for detecting wearing state of earphone and earphone
CN109040896B (en) * 2018-11-05 2020-02-14 厦门理工学院 Earphone and distance detection access method
CN109168102A (en) * 2018-11-22 2019-01-08 歌尔科技有限公司 A kind of earphone wearing state detection method, device and earphone
CN110505550B (en) * 2019-08-28 2021-07-06 歌尔科技有限公司 Wireless earphone in-ear detection method and device and wireless earphone
CN110536205A (en) * 2019-08-28 2019-12-03 北京希格玛和芯微电子技术有限公司 Enter ear detection method, device and earphone
CN110839190B (en) * 2019-11-15 2022-01-07 歌尔股份有限公司 Earphone wearing detection method and device, earphone and readable storage medium

Also Published As

Publication number Publication date
CN111491249A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN111491249B (en) Method and device for detecting in-ear state of earphone, earphone and storage medium
KR102575634B1 (en) Electronic device and method for operating the same
CN110677768A (en) Wireless earphone control method and device, wireless earphone and storage medium
CN106611596B (en) Time-based frequency tuning for analog information feature extraction
CN103226436A (en) Man-machine interaction method and system of intelligent terminal
US20200301650A1 (en) Audio playback control method of mobile terminal and wireless earphone
KR20200006002A (en) Systems and methods for providing automatic haptic generation for video content
US10582290B2 (en) Earpiece with tap functionality
CN106231047A (en) A kind of audio collection method based on intelligent terminal, system and intelligent terminal
US9516429B2 (en) Hearing aid and method for controlling hearing aid
CN109994111B (en) Interaction method, interaction device and mobile terminal
WO2020019858A1 (en) Microphone hole clogging detection method and related products
US11620995B2 (en) Voice interaction processing method and apparatus
CN108319886A (en) Fingerprint identification method and device
WO2021008458A1 (en) Method for voice recognition via earphone and earphone
CN105677192A (en) Control method and control device of mobile terminal
CN112258809B (en) Loss detection method and device of wireless earphone and earphone
CN106161726A (en) A kind of voice wakes up system and voice awakening method and mobile terminal up
US11069332B2 (en) Interference generation
CN107466387B (en) Method and device for detecting touch mode
CN107734121B (en) Volume control method and device, storage medium and electronic equipment
CN104182039A (en) Equipment control method and device as well as electronic equipment
WO2017215615A1 (en) Sound effect processing method and mobile terminal
CN112230779B (en) Operation response method, device, equipment and storage medium
US20200020330A1 (en) Detecting voice-based attacks against smart speakers

Legal Events

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