Earphone wearing state detection method and device, equipment and storage medium
By using bone conduction sensor and microphone signals to calculate correlation coefficients, the method accurately determines the wear state of bone conduction headphones, improving user experience and battery efficiency.
Patent Information
- Application Number
- CN202410050107.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2025-07-15
AI Technical Summary
In the prior art, the accuracy of headphone wear status detection through sensors is low, which affects the user experience.
The bone sensor signal and microphone signal of the headphone speaker are collected, and the wearing state of the headphone is judged based on the signal correlation coefficient. The wearing state is determined by whether the signal correlation coefficient is within the preset threshold range, and filtering is performed when necessary to extract human bone information for auxiliary detection.
It improves the accuracy of headphone wear status detection, improves user experience, and saves power consumption in the ear-out state, and extends the time of headphone standby.
Smart Images

Figure CN120321538A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of headphone control, and particularly to a method, device, equipment and storage medium for detecting the wearing state of headphones. Background Art
[0002] Bone conduction is a sound conduction method. When receiving sound using bone conduction technology and pressing closely against the bone, sound waves can directly reach the auditory nerve through the bone. Among them, bone conduction headphones applying bone conduction technology can achieve binaural openness during wearing and will not damage the eardrum, so they are widely loved by consumers.
[0003] Currently, traditional bone conduction headphones usually use sensors such as capacitive sensors and light sensors to detect the wearing state. This not only increases the cost of the product, but also may not be able to accurately judge the wearing state of the headphones in an environment with insufficient light or inconsistent light sources, or when there are obstacles (such as hair, hats, etc.) blocking or intervening, affecting the user experience.
[0004] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main object of the present invention is to provide a method, device, equipment and storage medium for detecting the wearing state of headphones, aiming to solve the technical problem in the prior art that the accuracy of detecting the wearing state of headphones through sensors is low and affects the user experience.
[0006] To achieve the above object, the present invention provides a method for detecting the wearing state of headphones, and the method for detecting the wearing state of headphones includes:
[0007] Collect the bone sensor signal and microphone signal of the headphone speaker;
[0008] Obtain the signal correlation coefficient based on the bone sensor signal and the microphone signal;
[0009] Judge whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient;
[0010] Determine the wearing state of the headphones according to the judgment result.
[0011] Optionally, the microphone signal includes: a feedforward audio signal and / or a feedback audio signal; the step of collecting the bone sensor signal and microphone signal of the headphone speaker includes:
[0012] Collect the bone sensor signal of the headphone speaker, the feedforward audio signal and / or the feedback audio signal;
[0013] The step of obtaining the signal correlation coefficient based on the bone sensor signal and the microphone signal includes:
[0014] Obtaining the signal correlation coefficient based on the bone sensor signal, the feedforward audio signal, and / or the feedback audio signal.
[0015] Optionally, the signal correlation coefficient includes: a first signal correlation coefficient, a second signal correlation coefficient, and / or a third signal correlation coefficient; the step of obtaining the signal correlation coefficient based on the bone sensor signal, the feedforward audio signal, and / or the feedback audio signal includes:
[0016] Performing a correlation analysis on the bone sensor signal and the feedforward audio signal to obtain the first signal correlation coefficient;
[0017] Performing a correlation analysis on the bone sensor signal and the feedback audio signal to obtain the second signal correlation coefficient;
[0018] And / or, performing a correlation analysis on the feedforward audio signal and the feedback audio signal to obtain the third signal correlation coefficient.
[0019] Optionally, the preset correlation coefficient threshold range includes: a first signal correlation coefficient threshold range, a second signal correlation coefficient threshold range, and / or a third signal correlation coefficient threshold range; the step of determining whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient includes:
[0020] Determining whether the first signal correlation coefficient is within the first signal correlation coefficient threshold range;
[0021] Determining whether the second signal correlation coefficient is within the second signal correlation coefficient threshold range;
[0022] And / or, determining whether the third signal correlation coefficient is within the third signal correlation coefficient threshold range.
[0023] Optionally, the step of determining the wearing state of the earphone according to the judgment result includes:
[0024] If not, then performing a filtering process on the bone sensor signal to extract the human bone information in the bone sensor signal;
[0025] Determining whether the human bone information is within a preset human bone information threshold range;
[0026] If so, then determining the wearing state of the earphone as the in-ear state;
[0027] Or, if not, then determining the wearing state of the earphone as the out-of-ear state.
[0028] Optionally, before the step of collecting the bone sensor signal and the microphone signal of the earphone speaker, the method further includes:
[0029] Obtaining the out-ear data and in-ear data corresponding to a plurality of sample users;
[0030] Determining a preset correlation coefficient threshold range and a preset human bone information threshold range based on the out-ear data and the in-ear data.
[0031] Optionally, after the step of determining the wearing state of the earphone according to the judgment result, the method further includes:
[0032] If the wearing state is the in-ear state, controlling the earphone to play audio;
[0033] Or, if the wearing state is the out-ear state, obtaining the duration of the state;
[0034] When the duration of the state exceeds a preset state duration threshold, switching the working mode of the earphone to the standby mode.
[0035] In addition, to achieve the above object, the present invention further provides an earphone wearing state detection device, the device includes:
[0036] A signal acquisition module, configured to collect the bone sensor signal and the microphone signal of the earphone speaker;
[0037] A coefficient determination module, configured to obtain a signal correlation coefficient based on the bone sensor signal and the microphone signal;
[0038] A coefficient judgment module, configured to judge whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient;
[0039] A state determination module, configured to determine the wearing state of the earphone according to the judgment result.
[0040] In addition, to achieve the above object, the present invention further provides an earphone wearing state detection device, the device includes: a memory, a processor, and an earphone wearing state detection program stored on the memory and executable on the processor, and the earphone wearing state detection program is configured to implement the steps of the earphone wearing state detection method as described above.
[0041] In addition, to achieve the above object, the present invention further provides a storage medium, on which an earphone wearing state detection program is stored, and when the earphone wearing state detection program is executed by a processor, the steps of the earphone wearing state detection method as described above are implemented.
[0042] In the present invention, a bone sensor signal and a microphone signal of a headphone speaker are collected; a signal correlation coefficient is obtained based on the bone sensor signal and the microphone signal; it is determined whether the signal correlation coefficient is within a preset correlation coefficient threshold range corresponding to the signal correlation coefficient; the wearing state of the headphone is determined according to the determination result; compared with the prior art, in which it is easy to have false detections in detecting the wearing state of the headphone through a sensor, since the present invention obtains the signal correlation coefficient based on the bone sensor signal and the microphone signal of the headphone speaker, and determines the wearing state of the headphone according to whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient, thereby solving the technical problem in the prior art that the accuracy of detecting the wearing state of the headphone through a sensor is low, which affects the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 FIG. is a schematic structural diagram of a headphone wearing state detection device for a hardware operating environment related to the solution of an embodiment of the present invention;
[0044] Figure 2 FIG. is a flowchart of a first embodiment of a method for detecting the wearing state of a headphone according to the present invention;
[0045] Figure 3 FIG. is a flowchart of a second embodiment of a method for detecting the wearing state of a headphone according to the present invention;
[0046] Figure 4 FIG. is a flowchart of detecting the wearing state of a bone conduction headphone in a method for detecting the wearing state of a headphone according to the present invention;
[0047] Figure 5 FIG. is a flowchart of a third embodiment of a method for detecting the wearing state of a headphone according to the present invention;
[0048] Figure 6 FIG. is a flowchart of bone sensor assisted detection in a third embodiment of a method for detecting the wearing state of a headphone according to the present invention;
[0049] Figure 7 FIG. is a structural block diagram of a first embodiment of a device for detecting the wearing state of a headphone according to the present invention.
[0050] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0052] Refer to Figure 1 , Figure 1 is a schematic structural diagram of a headphone wearing state detection device for a hardware operating environment related to the solution of an embodiment of the present invention.
[0053] As shown Figure 1 in the figure, the earphone wearing state detection device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0054] Those skilled in the art can understand that Figure 1 the structure shown in the figure does not constitute a limitation on the earphone wearing state detection device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0055] As shown Figure 1 in the figure, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and an earphone wearing state detection program.
[0056] In Figure 1 the earphone wearing state detection device shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the earphone wearing state detection device of the present invention may be arranged in the earphone wearing state detection device. The earphone wearing state detection device calls the earphone wearing state detection program stored in the memory 1005 through the processor 1001 and executes the earphone wearing state detection method provided by the embodiment of the present invention.
[0057] The embodiment of the present invention provides an earphone wearing state detection method. Referring to Figure 2 , Figure 2 it is a schematic flowchart of the first embodiment of the earphone wearing state detection method of the present invention.
[0058] In this embodiment, the earphone wearing state detection method includes the following steps:
[0059] Step S10: Collect the bone sensor signal and the microphone signal of the earphone speaker.
[0060] It should be noted that the execution subject of the method in this embodiment can be an earphone wearing state detection device for detecting the wearing state of a bone conduction earphone, or other devices that can achieve the same or similar functions and include this earphone wearing state detection device, namely an earphone wearing state detection system. Here, the earphone wearing state detection system (hereinafter referred to as the system) is used to specifically illustrate the earphone wearing state detection method provided in this embodiment and the following embodiments.
[0061] It should be understood that the earphone in this embodiment can be any bone conduction earphone that needs to detect the earphone wearing state.
[0062] It should be noted that the above bone sensor signal can be the signal collected by the bone sensor in the earphone. In this embodiment, the bone sensor signal can include but is not limited to the vibration signal of the human body and the specific sound played by the earphone speaker. Among them, the specific sound is infrasound, which cannot be heard by the human ear, so that the user will not feel discomfort, ensuring the user experience.
[0063] It can be understood that the above microphone signal can be the specific sound played by the earphone speaker collected by the microphone in the earphone. In this embodiment, the microphones in the earphone can include a feedforward microphone and a feedback microphone. Among them, both the feedforward microphone and the feedback microphone can collect the specific sound played by the earphone speaker.
[0064] In practical applications, the earphone speaker will play a specific sound. When the user wears the bone conduction earphone, the bone sensor in the bone conduction earphone can collect both the vibration signal of the human body and the specific sound played by the earphone speaker to obtain the bone sensor signal. At the same time, the microphone in the earphone can also collect the specific sound played by the earphone speaker to obtain the microphone signal.
[0065] Step S20: Obtain a signal correlation coefficient based on the bone sensor signal and the microphone signal.
[0066] It should be noted that the above signal correlation coefficient can be a coefficient used to characterize the correlation between the bone sensor signal and the microphone signal. In this embodiment, the time series correlation analysis can be performed on the bone sensor signal and the microphone signal to obtain the signal correlation coefficient between the bone sensor signal and the microphone signal.
[0067] Step S30: Determine whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient.
[0068] It should be noted that the above preset correlation coefficient threshold range can be a range used to characterize the correlation coefficient when the earphone is in the in-ear state.
[0069] Step S40: Determine the wearing state of the earphone according to the judgment result.
[0070] It should be noted that the wearing state of the earphone in this embodiment includes but is not limited to the in-ear state and the out-of-ear state. Among them, the in-ear state means that the earphone is worn and is in a proper position in the user's ear. The out-of-ear state means that the earphone is not worn by the user. For example, the earphone is on the table, in the user's hand, in the user's pocket, etc. This embodiment does not limit this.
[0071] In this embodiment, the system can compare the target signal correlation coefficient with the preset correlation coefficient threshold range to determine whether the target signal correlation coefficient is within the preset correlation coefficient threshold range. If it is, the wearing state of the earphone can be determined as the in-ear state; if not, the wearing state of the earphone can be initially determined as the out-of-ear state at this time. Among them, in order to improve the detection accuracy of the earphone wearing state, when the target signal correlation coefficient is not within the preset correlation coefficient threshold range, the auxiliary detection of the bone sensor can be continued, so as to reduce the false detection rate and improve the detection accuracy of the earphone wearing state.
[0072] Further, after the step S40, the method further includes: if the wearing state is the in-ear state, control the earphone to play audio.
[0073] It can be understood that after determining that the wearing state of the earphone is the in-ear state, the earphone can be controlled to play or pause the audio, that is, the play and pause operations of the music in the earphone can be realized, so as to improve the user experience.
[0074] Or, if the wearing state is the out-of-ear state, obtain the duration of the state; when the duration of the state exceeds the preset state duration threshold, switch the working mode of the earphone to the standby mode.
[0075] It should be noted that the above-mentioned duration of the state can be the duration of the earphone in the out-of-ear state; correspondingly, the above-mentioned preset state duration threshold can be the maximum duration of the out-of-ear state that needs to switch the working mode of the earphone in advance, that is, when the duration of the earphone in the out-of-ear state exceeds the preset state duration threshold, the working mode of the earphone can be switched.
[0076] In practical applications, the system can determine whether the earphone is currently in the in-ear state or the out-of-ear state based on the detection result of the earphone wearing state. If the earphone is currently in the out-of-ear state, the continuous duration of the out-of-ear state can be obtained in real time. If the continuous duration of the earphone's out-of-ear state exceeds the preset state continuous duration threshold, it means that the earphone has not been worn for a long time. At this time, the working mode of the earphone can be switched to the standby mode, thereby saving the power consumption of the earphone and increasing the standby time of the earphone.
[0077] This embodiment discloses collecting the bone sensor signal and the microphone signal of the earphone speaker; obtaining the signal correlation coefficient based on the bone sensor signal and the microphone signal; determining whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient; determining the wearing state of the earphone according to the judgment result. Compared with the prior art, it is easy to have false detection when detecting the earphone wearing state through sensors. Since this embodiment obtains the signal correlation coefficient based on the bone sensor signal and the microphone signal of the earphone speaker, and determines the wearing state of the earphone according to whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient, the technical problem of low accuracy of detecting the earphone wearing state through sensors in the prior art and affecting the user experience is solved. At the same time, in this embodiment, when the wearing state of the earphone is the in-ear state, the earphone can be controlled to play audio, improving the user experience. And when the wearing state of the earphone is the out-of-ear state and the continuous duration of the out-of-ear state exceeds the preset state continuous duration threshold, the working mode of the earphone is switched to the standby mode, thereby saving the power consumption of the earphone and increasing the standby time of the earphone.
[0078] Reference Figure 3 , Figure 3 is a schematic flowchart of the second embodiment of the earphone wearing state detection method of the present invention.
[0079] Based on the above first embodiment, in order to improve the detection accuracy of the earphone wearing state, in this embodiment, the microphone signal includes: a feedforward audio signal and / or a feedback audio signal; the step S10 includes:
[0080] Step S10': Collect the bone sensor signal of the earphone speaker, the feedforward audio signal and / or the feedback audio signal.
[0081] In this embodiment, the above feedforward audio signal can be an audio signal of the external environment of the earphone collected by a feedforward microphone in the earphone. For example: when the actual wearing state of the earphone is the in-ear state, the audio collected by the feedforward microphone is mainly the specific sound played by the earphone speaker; when the actual wearing state of the earphone is the out-of-ear state, the audio collected by the feedforward microphone is the external environmental sound. Among them, the feedforward microphone in this embodiment can be set at a position of the earphone housing close to the outside of the ear.
[0082] In this embodiment, the above feedback audio signal may be an audio signal in the current environment collected by a feedback microphone in the earphone, such as: a prompt tone, an external ambient sound, etc., and this embodiment does not limit this. Among them, the feedback microphone in this embodiment may be arranged at the front end of the earphone speaker.
[0083] Correspondingly, step S20 includes:
[0084] Step S20': Obtain a signal correlation coefficient based on the bone sensor signal, the feedforward audio signal, and / or the feedback audio signal.
[0085] In this embodiment, the system can perform a correlation analysis on the bone sensor signal and the feedforward audio signal to obtain a correlation coefficient between the bone sensor signal and the feedforward audio signal, and determine whether the earphone is currently in the ear according to this correlation coefficient; or, the system can perform a correlation analysis on the bone sensor signal and the feedback audio signal to obtain a correlation coefficient between the bone sensor signal and the feedback audio signal, and determine whether the earphone is currently in the ear according to this correlation coefficient; in addition, in order to improve the detection accuracy of the earphone wearing state, the system can perform a pairwise correlation analysis on the bone sensor information, the feedforward audio signal, and the feedback audio signal. At this time, three correlation coefficients can be obtained, and then the system can determine whether the earphone is currently in the ear according to these three correlation coefficients.
[0086] Specifically, the signal correlation coefficient includes: a first signal correlation coefficient, a second signal correlation coefficient, and / or a third signal correlation coefficient; step S20' includes: performing a correlation analysis on the bone sensor signal and the feedforward audio signal to obtain the first signal correlation coefficient; performing a correlation analysis on the bone sensor signal and the feedback audio signal to obtain the second signal correlation coefficient; and / or, performing a correlation analysis on the feedforward audio signal and the feedback audio signal to obtain the third signal correlation coefficient.
[0087] It should be understood that the above first signal correlation coefficient may be a coefficient used to characterize the correlation between the bone sensor signal and the feedforward audio signal; the second signal correlation coefficient may be a coefficient used to characterize the correlation between the bone sensor signal and the feedback audio signal; the third signal correlation coefficient may be a coefficient used to characterize the correlation between the feedforward audio signal and the feedback audio signal.
[0088] In practical applications, in this embodiment, correlation analysis can be performed on two signals to calculate the correlation of these two signals in the time domain, so as to obtain the correlation coefficient between these two signals. Specifically, the system can perform correlation analysis on the bone sensor signal and the feedforward audio signal, calculate the correlation of the bone sensor signal and the feedforward audio signal in the time domain, and obtain the first signal correlation coefficient; at the same time, correlation analysis can also be performed on the bone sensor signal and the feedback audio signal, calculate the correlation of the bone sensor signal and the feedback audio signal in the time domain, and obtain the second signal correlation coefficient; and perform correlation analysis on the feedforward audio signal and the feedback audio signal, calculate the correlation of the feedforward audio signal and the feedback audio signal in the time domain, and obtain the third signal correlation coefficient.
[0089] Further, the preset correlation coefficient threshold range includes: the first signal correlation coefficient threshold range, the second signal correlation coefficient threshold range, and / or the third signal correlation coefficient threshold range; the step S30 includes: determining whether the first signal correlation coefficient is within the first signal correlation coefficient threshold range; determining whether the second signal correlation coefficient is within the second signal correlation coefficient threshold range; and / or, determining whether the third signal correlation coefficient is within the third signal correlation coefficient threshold range.
[0090] It can be understood that the above-mentioned first signal correlation coefficient threshold range, second signal correlation coefficient threshold range, and third signal correlation coefficient threshold range are all ranges of the correlation coefficient when the earphone is in the in-ear state.
[0091] In this embodiment, in order to improve the detection accuracy of the earphone wearing state, the wearing state of the earphone can be determined jointly by the bone sensor signal, the feedforward audio signal, and the feedback audio signal. Specifically, correlation calculations can be performed pairwise on the bone sensor signal, the feedforward audio signal, and the feedback audio signal respectively to obtain the first signal correlation coefficient, the second signal correlation coefficient, and the third signal correlation coefficient. Then, the system can determine whether the first signal correlation coefficient is within the first signal correlation coefficient threshold range, and at the same time determine whether the second signal correlation coefficient is within the second signal correlation coefficient threshold range, and determine whether the third signal correlation coefficient is within the third signal correlation coefficient threshold range. If the signal correlation coefficients are all within their corresponding signal correlation coefficient threshold ranges, it can be determined at this time that the earphone is currently in the in-ear state.
[0092] In a specific implementation, refer to Figure 4 , Figure 4 is the flowchart of the bone conduction earphone wearing state detection in the earphone wearing state detection method of the present invention. As Figure 4As shown in the figure, first, the system can collect the bone sensor signal of the headphone speaker through the bone sensor, collect the feedback audio signal through the feedback microphone, and collect the feedforward audio signal through the feedforward microphone. After obtaining the bone sensor signal, the feedback audio signal, and the feedforward audio signal, these signals can be preprocessed respectively to filter out the interference information in these signals. Then, the correlation can be calculated pairwise between the bone sensor signal, the feedforward audio signal, and the feedback audio signal to obtain the first signal correlation coefficient, the second signal correlation coefficient, and the third signal correlation coefficient, and it is judged whether these signal correlation coefficients fall within the range of the signal correlation coefficients used to characterize the in-ear state of the headphones. If so, the wearing state of the headphones can be determined as the in-ear state; if not, the bone sensor can be used for auxiliary detection to further judge the wearing state of the headphones.
[0093] In this embodiment, by collecting the bone sensor signal, the feedforward audio signal, and / or the feedback audio signal of the headphone speaker, and performing correlation analysis pairwise on the bone sensor signal, the feedforward audio signal, and the feedback audio signal respectively to obtain the first signal correlation coefficient, the second signal correlation coefficient, and the third signal correlation coefficient, then judging whether these signal correlation coefficients are within the corresponding signal correlation coefficient threshold range, and determining the wearing state of the headphones according to the judgment result, thereby improving the detection accuracy of the wearing state of the headphones.
[0094] Reference Figure 5 , Figure 5 is a schematic flowchart of the third embodiment of the method for detecting the wearing state of the headphones of the present invention.
[0095] Based on the above embodiments, in order to improve the detection accuracy of the wearing state of the headphones, in this embodiment, the step S40 includes:
[0096] Step S401: If not, perform filtering processing on the bone sensor signal to extract the human bone information in the bone sensor signal.
[0097] It should be noted that the above human bone information is the vibration information of the human bone collected by the bone sensor and the specific sound information played by the headphone speaker.
[0098] In this embodiment, when using the bone sensor for auxiliary detection, the bone sensor signal collected by the bone sensor can be preprocessed and filtered first, so as to filter out the useless information in the bone sensor and extract the human bone information in the bone sensor signal.
[0099] Step S402: Judge whether the human bone information is within the preset human bone information threshold range.
[0100] It should be noted that the above preset human bone information threshold range can be the human bone information range used to characterize the earphone in the in-ear state.
[0101] In this embodiment, if the human bone information is within the preset human bone information threshold range, then step S403a is executed: If so, the wearing state of the earphone is determined to be the in-ear state.
[0102] Alternatively, if the human bone information is not within the preset human bone information threshold range, then step S403b is executed: If not, the wearing state of the earphone is determined to be the out-of-ear state.
[0103] In a specific implementation, referring to Figure 6 , Figure 6 is the flowchart of the bone sensor-assisted detection in the third embodiment of the earphone wearing state detection method of the present invention. As Figure 6 shown, when the signal correlation coefficient between signals is not within the preset correlation coefficient threshold range, it is necessary to use the bone sensor for assisted detection. At this time, data preprocessing and filtering processing can be performed on the bone sensor signals collected by the bone sensor, the human bone information in the bone sensor signals is extracted, and it is determined whether the human bone information is within the preset human bone information threshold range, that is, it is determined whether the earphone is currently in the ear. If so, the wearing state of the earphone can be determined to be the in-ear state; if not, the wearing state of the earphone can be determined to be the out-of-ear state.
[0104] Furthermore, before the step S10, the method further includes: obtaining out-of-ear data and in-ear data corresponding to a plurality of sample users; determining a preset correlation coefficient threshold range and a preset human bone information threshold range based on the out-of-ear data and the in-ear data.
[0105] It should be noted that the above sample users can be any users who conduct earphone out-of-ear and in-ear tests. Among them, the number of sample users in this embodiment is not limited. For example, 100 sample users can be selected in this embodiment.
[0106] It should be noted that the above out-of-ear data can be the bone sensor signals, feedforward audio signals, and feedback audio signals collected by the system when the earphone is in the out-of-ear state; correspondingly, the above in-ear data can be the bone sensor signals, feedforward audio signals, and feedback audio signals collected by the system when the sample user wears the earphone (that is, when the earphone is in the in-ear state).
[0107] In this embodiment, 100 sample users can be selected, and 100 pieces of data on the ear-out and ear-in states can be collected for each person. At this time, 20,000 pieces of data including bone sensor signals, feedforward audio signals, and feedback audio signals can be obtained. Then, the system can perform multiple rounds of simulations based on this data to determine the preset correlation coefficient threshold range and the preset human bone information threshold range. Specifically, the system can calculate the signal correlation coefficients between the bone sensor signal, the feedforward audio signal, and the feedback audio signal pairwise when the earphone is in the ear-out state and the ear-in state, so as to obtain the first signal correlation coefficient threshold range, the second signal correlation coefficient threshold range, and the third signal correlation coefficient threshold range according to these signal correlation coefficients. In addition, the human bone information when the earphone is in the ear-out state and the ear-in state can be obtained, and the preset human bone information threshold range can be determined according to this human bone information, so that the wearing state of the earphone can be directly determined according to the first signal correlation coefficient threshold range, the second signal correlation coefficient threshold range, the third signal correlation coefficient threshold range, and the preset human bone information threshold range in the subsequent process, improving the state detection efficiency.
[0108] In this embodiment, when the signal correlation coefficient is not within the preset correlation coefficient threshold range, the human bone information in the bone sensor signal is extracted, and it is determined whether the human bone information is within the preset human bone information threshold range. If so, the wearing state of the earphone is determined to be the ear-in state; if not, the wearing state of the earphone is determined to be the ear-out state, thereby realizing the auxiliary detection of the earphone wearing state by the bone sensor and improving the detection accuracy of the earphone wearing state.
[0109] In addition, an embodiment of the present invention also provides a storage medium, on which a program for detecting the earphone wearing state is stored. When the program for detecting the earphone wearing state is executed by a processor, the steps of the method for detecting the earphone wearing state as described above are implemented.
[0110] Referring to Figure 7 , Figure 7 This is the structural block diagram of the first embodiment of the earphone wearing state detection device of the present invention.
[0111] As Figure 7 shown, the earphone wearing state detection device proposed by the embodiment of the present invention includes:
[0112] A signal acquisition module 701, configured to acquire the bone sensor signal and the microphone signal of the earphone speaker;
[0113] A coefficient determination module 702, configured to obtain a signal correlation coefficient based on the bone sensor signal and the microphone signal;
[0114] A coefficient judgment module 703, configured to judge whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient;
[0115] A state determination module 704 is configured to determine the wearing state of the earphone according to the judgment result.
[0116] Further, the state determination module 704 is further configured to, if the wearing state is the in-ear state, control the earphone to play audio; or, if the wearing state is the out-ear state, obtain the state duration; when the state duration exceeds a preset state duration threshold, switch the working mode of the earphone to the standby mode.
[0117] The earphone wearing state detection device of this embodiment discloses collecting the bone sensor signal and the microphone signal of the earphone speaker; obtaining the signal correlation coefficient based on the bone sensor signal and the microphone signal; judging whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient; determining the wearing state of the earphone according to the judgment result; compared with the prior art that the earphone wearing state detection by the sensor is prone to false detection, since this embodiment obtains the signal correlation coefficient based on the bone sensor signal and the microphone signal of the earphone speaker, and determines the wearing state of the earphone according to whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient, thereby solving the technical problem that the accuracy of the earphone wearing state detection by the sensor in the prior art is low and affects the user experience. At the same time, in this embodiment, when the wearing state of the earphone is the in-ear state, the earphone can be controlled to play audio, improving the user experience, and when the wearing state of the earphone is the out-ear state and the state duration of the out-ear state exceeds the preset state duration threshold, the working mode of the earphone is switched to the standby mode, so that the power consumption of the earphone can be saved, and thus the standby time of the earphone can be increased.
[0118] Based on the first embodiment of the earphone wearing state detection device of the present invention, a second embodiment of the earphone wearing state detection device of the present invention is proposed.
[0119] In this embodiment, the microphone signal includes: a feedforward audio signal and / or a feedback audio signal; the signal acquisition module 701 is further configured to collect the bone sensor signal of the earphone speaker, the feedforward audio signal and / or the feedback audio signal;
[0120] The coefficient determination module 702 is further configured to obtain a signal correlation coefficient based on the bone sensor signal, the feedforward audio signal and / or the feedback audio signal.
[0121] Further, the signal correlation coefficient includes: a first signal correlation coefficient, a second signal correlation coefficient, and / or a third signal correlation coefficient; the coefficient determination module 702 is further configured to perform a correlation analysis on the bone sensor signal and the feedforward audio signal to obtain the first signal correlation coefficient; perform a correlation analysis on the bone sensor signal and the feedback audio signal to obtain the second signal correlation coefficient; and / or perform a correlation analysis on the feedforward audio signal and the feedback audio signal to obtain the third signal correlation coefficient.
[0122] Further, the preset correlation coefficient threshold range includes: a first signal correlation coefficient threshold range, a second signal correlation coefficient threshold range, and / or a third signal correlation coefficient threshold range; the coefficient judgment module 703 is further configured to judge whether the first signal correlation coefficient is within the first signal correlation coefficient threshold range; judge whether the second signal correlation coefficient is within the second signal correlation coefficient threshold range; and / or judge whether the third signal correlation coefficient is within the third signal correlation coefficient threshold range.
[0123] In this embodiment, by collecting the bone sensor signal, the feedforward audio signal, and / or the feedback audio signal of the headphone speaker, and performing a pairwise correlation analysis on the bone sensor signal, the feedforward audio signal, and the feedback audio signal respectively to obtain the first signal correlation coefficient, the second signal correlation coefficient, and the third signal correlation coefficient, then judging whether these signal correlation coefficients are within their corresponding signal correlation coefficient threshold ranges, and determining the wearing state of the headphone according to the judgment result, the detection accuracy of the headphone wearing state is improved.
[0124] Based on the above device embodiments, a third embodiment of the headphone wearing state detection device of the present invention is proposed.
[0125] In this embodiment, the state determination module 704 is further configured to, if not, perform a filtering process on the bone sensor signal to extract the human bone information in the bone sensor signal; judge whether the human bone information is within a preset human bone information threshold range; if so, determine the wearing state of the headphone as the in-ear state; or, if not, determine the wearing state of the headphone as the out-ear state.
[0126] Further, the signal acquisition module 701 is further configured to obtain the out-ear data and the in-ear data corresponding to a plurality of sample users; determine a preset correlation coefficient threshold range and a preset human bone information threshold range based on the out-ear data and the in-ear data.
[0127] When the signal correlation coefficient is not within the preset correlation coefficient threshold range, this embodiment extracts the human bone information in the bone sensor signal and determines whether the human bone information is within the preset human bone information threshold range. If so, the wearing state of the earphone is determined to be the in-ear state; if not, the wearing state of the earphone is determined to be the out-of-ear state, thereby realizing the auxiliary detection of the earphone wearing state by the bone sensor and improving the detection accuracy of the earphone wearing state.
[0128] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.
[0129] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0130] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disc), including several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0131] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for detecting the wearing state of earphones, characterized in that, The method for detecting the wearing state of the earphone includes: Collecting the bone sensor signal and the microphone signal of the earphone speaker; Obtaining a signal correlation coefficient based on the bone sensor signal and the microphone signal; Judging whether the signal correlation coefficient is within a preset correlation coefficient threshold range corresponding to the signal correlation coefficient; Determining the wearing state of the earphone according to the judgment result.
2. The headphone wearing state detection method according to claim 1, characterized in that, The microphone signal includes: a feedforward audio signal and / or a feedback audio signal; the step of collecting the bone sensor signal and the microphone signal of the earphone speaker includes: Collecting the bone sensor signal of the earphone speaker, the feedforward audio signal and / or the feedback audio signal; The step of obtaining a signal correlation coefficient based on the bone sensor signal and the microphone signal includes: Obtaining a signal correlation coefficient based on the bone sensor signal, the feedforward audio signal and / or the feedback audio signal.
3. The earphone wearing state detection method according to claim 2, wherein, The signal correlation coefficient includes: a first signal correlation coefficient, a second signal correlation coefficient and / or a third signal correlation coefficient; the step of obtaining a signal correlation coefficient based on the bone sensor signal, the feedforward audio signal and / or the feedback audio signal includes: Performing a correlation analysis on the bone sensor signal and the feedforward audio signal to obtain the first signal correlation coefficient; Performing a correlation analysis on the bone sensor signal and the feedback audio signal to obtain the second signal correlation coefficient; And / or, performing a correlation analysis on the feedforward audio signal and the feedback audio signal to obtain the third signal correlation coefficient.
4. The earphone wearing state detection method according to claim 3, characterized in that, The preset correlation coefficient threshold range includes: a first signal correlation coefficient threshold range, a second signal correlation coefficient threshold range and / or a third signal correlation coefficient threshold range; the step of judging whether the signal correlation coefficient is within the preset correlation coefficient threshold range corresponding to the signal correlation coefficient includes: Judging whether the first signal correlation coefficient is within the first signal correlation coefficient threshold range; Judging whether the second signal correlation coefficient is within the second signal correlation coefficient threshold range; And / or, judging whether the third signal correlation coefficient is within the third signal correlation coefficient threshold range.
5. The earphone wearing state detection method according to claim 1, characterized in that, The step of determining the wearing state of the earphone according to the judgment result includes: If not, filtering the bone sensor signal to extract the human bone information in the bone sensor signal; Judging whether the human bone information is within a preset human bone information threshold range; If so, determining the wearing state of the earphone as the in-ear state; Or, if not, determining the wearing state of the earphone as the out-ear state.
6. The earphone wearing state detection method according to any one of claims 1 to 5, characterized in that, Before the step of collecting the bone sensor signal and the microphone signal of the earphone speaker, it further includes: Obtaining the out-ear data and the in-ear data corresponding to a plurality of sample users; Determining a preset correlation coefficient threshold range and a preset human bone information threshold range based on the out-ear data and the in-ear data.
7. The earphone wearing state detection method according to claim 1, characterized in that After the step of determining the wearing state of the earphone according to the judgment result, it further includes: If the wearing state is the in-ear state, controlling the earphone to play audio; Alternatively, if the wearing state is the out-of-ear state, obtain the duration of the state persistence; When the duration of the state persistence exceeds a preset state persistence duration threshold, switch the working mode of the earphone to the standby mode.
8. An earphone wearing state detection device, characterized in that The device includes: A signal acquisition module, configured to acquire the bone sensor signal and the microphone signal of the earphone speaker; A coefficient determination module, configured to obtain a signal correlation coefficient based on the bone sensor signal and the microphone signal; A coefficient judgment module, configured to judge whether the signal correlation coefficient is within a preset correlation coefficient threshold range corresponding to the signal correlation coefficient; A state determination module, configured to determine the wearing state of the earphone according to the judgment result.
9. A headphone wearing state detection device, characterized in that The device includes: a memory, a processor, and an earphone wearing state detection program stored on the memory and executable on the processor, where the earphone wearing state detection program is configured to implement the steps of the earphone wearing state detection method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, An earphone wearing state detection program is stored on the storage medium, and when the earphone wearing state detection program is executed by a processor, the steps of the earphone wearing state detection method according to any one of claims 1 to 7 are implemented.