Earphone wearing monitoring method, device, computer device and storage medium
The microphone of the headphones collects real-time sound, performs sound difference processing with the preset sound signal, and obtains the sound compensation amount, solving the problem of high complexity in wearing detection of existing headphones, and achieving the effect of simplifying detection and reducing costs.
Patent Information
- Application Number
- CN202211031353.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-08-26
AI Technical Summary
The existing headphone wear detection algorithm is complex, resulting in high detection difficulty and increased cost.
By obtaining the test sound signal of the headphones, collecting real-time sound using the microphone, processing sound difference with the preset sound signal, obtaining the sound compensation amount, and adjusting the signal of the wear management system according to the compensation amount to determine the wearing status of the headphones.
It reduces the difficulty and cost of headphone wear detection, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN115361647B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of earphones, and in particular, to a method and device for monitoring earphone wearing, a computer device, and a storage medium. Background Art
[0002] With the widespread promotion of wireless over-ear headphones and the improvement of user experience, wireless over-ear headphones are increasingly recognized by users, and the shipment volume is constantly increasing, showing an explosive growth. For the convenience of users and power consumption savings, earphones can be equipped with a wearing detection function, that is, music playback is only carried out when the earphones are worn on the user's head. If the user removes the earphones, the earphones automatically stop playing. The power consumption of the earphones when stopped playing is significantly lower than that when playing. In this way, the usage duration of the earphones can be extended.
[0003] However, traditional earphones usually adopt a test software program with a relatively complex algorithm for wearing detection, that is, various earphone usage state parameters when the earphones are worn are collected, and then it can be analyzed whether they are worn. This leads to too much difficulty in wearing detection of the earphones, resulting in too high a cost for wearing detection, and further leading to an increase in the cost of the earphones. Summary of the Invention
[0004] An object of the present invention is to overcome the deficiencies in the prior art and provide a method and device for monitoring earphone wearing, a computer device, and a storage medium that can effectively reduce the difficulty of wearing detection.
[0005] The object of the present invention is achieved by the following technical solutions:
[0006] A method for monitoring earphone wearing, the method comprising:
[0007] Obtaining a test sound signal of the earphone;
[0008] Performing a sound difference process on the test sound signal and a preset sound signal to obtain a sound compensation amount;
[0009] Adjusting a wearing signal sent to an earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
[0010] In one embodiment, the performing a sound difference process on the test sound signal and a preset sound signal includes: obtaining an effective amplitude of the test sound according to the test sound signal; obtaining a difference between the effective amplitude of the test sound and a preset amplitude corresponding to the preset sound signal.
[0011] In one embodiment, the performing a sound difference process on the test sound signal and a preset sound signal includes: performing a sound difference process on the test sound signal and a closed-cavity sound signal.
[0012] In one embodiment, obtaining the test sound signal of the earphone includes: obtaining the front cavity sound signal and the rear cavity sound signal of the earphone, where the front cavity sound signal is the detection sound emitted by the speaker inside the earphone, and the rear cavity sound signal is the ambient sound outside the earphone; performing noise cancellation processing on the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal.
[0013] In one embodiment, performing noise cancellation processing on the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal includes: obtaining the differential signal between the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal.
[0014] In one embodiment, adjusting the wearing signal sent to the earphone wearing management system according to the sound compensation amount includes: detecting whether the sound compensation amount matches a preset sound compensation amount; when the sound compensation amount matches the preset sound compensation amount, sending an on-wearing signal to the earphone wearing management system.
[0015] In one embodiment, after detecting whether the sound compensation amount matches the preset sound compensation amount, it further includes: when the sound compensation amount does not match the preset sound compensation amount, sending an off-wearing signal to the earphone wearing management system.
[0016] An earphone wearing monitoring device, the device includes:
[0017] An audio sampling module, configured to obtain the test sound signal of the earphone;
[0018] An audio processing module, configured to perform sound difference processing on the test sound signal and a preset sound signal to obtain a sound compensation amount;
[0019] A wearing update module, configured to adjust the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
[0020] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0021] Obtain the test sound signal of the earphone;
[0022] Perform sound difference processing on the test sound signal and a preset sound signal to obtain a sound compensation amount;
[0023] Adjust the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
[0024] A computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0025] Obtain a test sound signal of the earphone;
[0026] Perform pitch difference processing on the test sound signal and a preset sound signal to obtain a sound compensation amount;
[0027] Adjust the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
[0028] Compared with the prior art, the present invention has at least the following advantages:
[0029] Collect a test sound signal through the microphone of the earphone, that is, collect the real-time sound inside the earphone, compare it with the preset sound, and process it to obtain the change of the sound emitted by the earphone, so as to facilitate determining the current wearing state of the earphone according to the sound compensation amount, reduce the detection state parameters required for earphone wearing, and effectively reduce the difficulty of earphone wearing detection. Description of the Drawings
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0031] Figure 1 It is a flowchart of a method for monitoring earphone wearing in an embodiment;
[0032] Figure 2 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0033] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0034] It should be noted that when an element is referred to as being "fixed to" another element, it can be directly on the other element or there can also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the description of this invention herein are for the purpose of describing specific embodiments only and are not intended to limit the invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0036] The present invention relates to a method for monitoring headphone wearing. In one embodiment, the headphone wearing monitoring method includes obtaining a test sound signal of the headphone; performing a pitch difference process on the test sound signal and a preset sound signal to obtain a sound compensation amount; and adjusting a wearing signal sent to a headphone wearing management system according to the sound compensation amount to determine the wearing state of the headphone. The test sound signal is collected by a microphone of the headphone, that is, the real-time sound inside the headphone is collected, and it is compared with a preset sound to obtain the change of the sound emitted by the headphone, so as to facilitate determining the current wearing state of the headphone according to the sound compensation amount, reducing the detection state parameters required for headphone wearing, and effectively reducing the difficulty of headphone wearing detection.
[0037] Please refer to Figure 1 , which is a flowchart of the headphone wearing monitoring method according to an embodiment of the present invention. The headphone wearing monitoring method includes some or all of the following steps.
[0038] S100: Obtain a test sound signal of the headphone.
[0039] In this embodiment, the test sound signal is the sound signal corresponding to the headphone during testing. For example, the test sound signal is the signal corresponding to the sound emitted by the built-in speaker of the headphone. The test sound signal is used as a detection signal for the current wearing situation of the headphone to detect whether the headphone is close to the user's ear, facilitating subsequent real-time monitoring of the wearing state of the headphone, and thus facilitating detection of the usage situation of the headphone at each time.
[0040] S200: Perform a pitch difference process on the test sound signal and a preset sound signal to obtain a sound compensation amount;
[0041] In this embodiment, the test sound signal is the sound signal corresponding to the earphone during testing. For example, the test sound signal is the signal corresponding to the sound emitted by the built-in speaker of the earphone. The test sound signal is used as a detection signal for the current wearing situation of the earphone to detect whether the earphone is close to the user's ear. The preset sound signal is the standard test sound signal of the earphone, that is, the preset sound signal is the sound signal corresponding to the earphone in the worn state, that is, the preset sound signal is the sound signal corresponding to the earphone when the earcup covers the user's ear. In this way, after performing pitch difference processing on the test sound signal and the preset sound signal, it is convenient to determine whether the current test sound signal of the earphone is a standard test sound signal, so as to facilitate determining the difference degree between the test sound signal and the standard sound signal of the earphone, and further facilitate determining the wearing state of the earphone.
[0042] S300: Adjust the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
[0043] In this embodiment, the sound compensation amount is the signal difference between the test sound signal and the preset sound signal, that is, the sound compensation amount is the difference degree between the test sound signal and the standard sound signal of the earphone, that is, the sound compensation amount is the detection amount for the earphone to judge the wearing situation. Based on the sound compensation amount, the wearing state of the earphone is determined. In this way, after detecting the test sound signal and the preset sound signal, the difference degree corresponding to the sound signal of the earphone can be obtained, which is convenient for accurately determining whether the earphone is currently worn after the sound compensation amount is determined. Moreover, only by collecting the test sound signal, the determination of the wearing state of the earphone can be realized, reducing the number of parameters required to be collected for the earphone wearing detection and effectively reducing the difficulty of the earphone wearing detection.
[0044] In the above embodiment, the test sound signal is collected through the microphone of the earphone, that is, the real-time sound inside the earphone is collected, and it is compared with the preset sound to obtain the change situation of the sound emitted by the earphone, which is convenient for determining the current wearing state of the earphone according to the sound compensation amount, reducing the detection state parameters required for earphone wearing and effectively reducing the difficulty of earphone wearing detection.
[0045] In one embodiment, the pitch difference processing of the test sound signal and the preset sound signal includes: obtaining the effective amplitude of the test sound according to the test sound signal; calculating the difference between the effective amplitude of the test sound and the preset amplitude corresponding to the preset sound signal. In this embodiment, the test sound signal is the sound signal corresponding to the headset during testing. For example, the test sound signal is the signal corresponding to the sound emitted by the built-in speaker of the headset. The test sound signal is used as a detection signal for the current wearing situation of the headset to detect whether the headset is close to the user's ear. The effective amplitude of the test sound is the signal quantity corresponding to the test sound signal, and the effective amplitude of the test sound is used to reflect the strength of the test sound signal, facilitating the quantification of the current volume of the test sound signal. The preset sound signal is the standard test sound signal of the headset, that is, the preset sound signal is the sound signal corresponding to the headset in the worn state, that is, the preset sound signal is the sound signal corresponding to the earcup of the headset covering the user's ear. The preset sound signal also has a corresponding effective sound amplitude. Comparing the effective amplitude of the test sound with the standard effective sound amplitude and Xining to obtain the difference between the two, facilitating the determination of the difference degree between the test sound signal and the preset sound signal, thereby facilitating the determination of whether the currently collected sound of the headset is the sound corresponding to the wearing state, and further facilitating the determination of whether the headset is in the worn state.
[0046] In one embodiment, the pitch difference processing of the test sound signal and the preset sound signal includes: performing pitch difference processing on the test sound signal and the closed-cavity sound signal. In this embodiment, the preset sound signal is the closed-cavity sound signal. Specifically, the closed-cavity sound signal is the sound signal corresponding to the earcup of the headset completely covering the user's ear. That is, when the earcup of the headset completely covers the user's ear, the sound signal collected from the headset is the preset sound signal. The test sound signal is the sound signal corresponding to the headset during testing. For example, the test sound signal is the signal corresponding to the sound emitted by the built-in speaker of the headset. The test sound signal is used as a detection signal for the current wearing situation of the headset to detect whether the headset is close to the user's ear. Performing the pitch difference processing on the test sound signal and the closed-cavity sound signal is to determine whether the earcup of the headset is completely closed, facilitating the determination of the wearing situation of the headset according to the difference degree between the test sound signal and the closed-cavity sound signal. Among them, only when the headset has been worn on the user's ear, the sound signal that the headset can collect is the closed-cavity sound signal. Using the closed-cavity sound signal as the standard detection signal facilitates the accurate determination of the wearing situation of the headset.
[0047] In one embodiment, obtaining the test sound signal of the earphone includes: obtaining the front cavity sound signal and the rear cavity sound signal of the earphone, where the front cavity sound signal is the detection sound emitted by the speaker inside the earphone, and the rear cavity sound signal is the ambient sound outside the earphone; performing noise cancellation processing on the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal. In this embodiment, the test sound signal is obtained based on the front cavity sound signal and the rear cavity sound signal. The front cavity sound signal is the detection sound emitted by the speaker inside the earphone, that is, the front cavity sound signal is the detection signal generated inside the earcup of the earphone. The rear cavity sound signal is the ambient sound outside the earphone, that is, the rear cavity sound signal is the noise of the external environment of the earcup of the earphone. The rear cavity sound signal does not belong to the detection sound signal but serves as an interference signal. Performing noise cancellation processing on the front cavity sound signal and the rear cavity sound signal is to eliminate the interference signal in the external environment of the earphone, that is, to filter out the noise signal in the external environment from the front cavity sound signal to reduce the interference to the collected test sound signal, effectively improving the sampling accuracy of the test sound signal.
[0048] In another embodiment, performing noise cancellation processing on the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal includes: obtaining the difference signal between the front cavity sound signal and the rear cavity sound signal to obtain the test sound signal. Through the differential processing of the front cavity sound signal and the rear cavity sound signal, the common noise signals in the front cavity sound signals of the left and right earcups of the earphone are eliminated, that is, the ambient noise outside the earphone is eliminated, and the rear cavity sound signal in the front cavity sound signal is also filtered out.
[0049] In one embodiment, adjusting the wearing signal sent to the headphone wearing management system according to the sound compensation amount includes: detecting whether the sound compensation amount matches a preset sound compensation amount; when the sound compensation amount matches the preset sound compensation amount, sending a donning signal to the headphone wearing management system. In this embodiment, the sound compensation amount is the signal difference between the test sound signal and the preset sound signal, that is, the sound compensation amount is the degree of difference between the test sound signal of the headphone and the standard sound signal, that is, the sound compensation amount is the detection amount for the headphone to judge the wearing situation. Based on the sound compensation amount, the wearing state of the headphone is determined. The preset sound compensation amount is the difference amount of the standard sound signal for the wearing test of the headphone, that is, the sound compensation amount corresponding to when the ear cups of the headphone completely cover the ears of the user. The matching of the sound compensation amount and the preset sound compensation amount indicates that the current test sound signal of the headphone is within a specified range, that is, it indicates that the signal difference degree between the test sound signal and the preset sound signal is small, that is, it indicates that the headphone is currently worn on the user's ears. At this time, the headphone wearing management system sends a donning signal to indicate that the ear cups of the headphone have completely covered the user's ears and the headphone is in a worn state. Among them, when the headphone is in a worn state, the headphone will play the accessed audio signal.
[0050] Further, after detecting whether the sound compensation amount matches the preset sound compensation amount, it further includes: when the sound compensation amount does not match the preset sound compensation amount, sending an undonning signal to the headphone wearing management system. In this embodiment, the sound compensation amount is the signal difference between the test sound signal and the preset sound signal, that is, the sound compensation amount is the degree of difference between the test sound signal of the headphone and the standard sound signal, that is, the sound compensation amount is the detection amount for the headphone to judge the wearing situation. Based on the sound compensation amount, the wearing state of the headphone is determined. The preset sound compensation amount is the difference amount of the standard sound signal for the wearing test of the headphone, that is, the sound compensation amount corresponding to when the ear cups of the headphone completely cover the ears of the user. The non-matching of the sound compensation amount and the preset sound compensation amount indicates that the current test sound signal of the headphone exceeds the specified range, that is, it indicates that the signal difference degree between the test sound signal and the preset sound signal is large, that is, it indicates that the headphone is currently not worn on the user's ears. At this time, the headphone wearing management system sends an undonning signal to indicate that the ear cups of the headphone have completely detached from the user's ears and the headphone is in a non-worn state. Among them, when the headphone is in a non-worn state, the headphone will pause playing the accessed audio signal.
[0051] It is understandable that after the earphone is correctly worn, the ear cups of the earphone enclose the user's ears to form a closed space, that is, a closed cavity structure. At this time, most of the detection sound emitted by the speaker inside the ear cup of the earphone will exist in the closed cavity, so that the microphone inside the earphone detects a sound signal with a relatively strong volume intensity; when the earphone is not worn, since there is no closed cavity structure formed, the detection sound emitted by the speaker inside the ear cup of the earphone diffuses outward, which is not conducive to the collection of the detection sound, so that the microphone inside the earphone detects a sound signal with a relatively weak volume intensity. By the above-mentioned degree of change in the intensity of the sound signal acquisition, the wearing state of the earphone is determined.
[0052] However, when the user is using the earphone, in addition to the test sound signal for wearing detection inside the ear cup of the earphone, it will also receive the sound signal being played in real time, that is, in addition to the sound emitted by the wearing test speaker of the earphone, there is also the sound being normally played by the earphone, and this sound often changes. Especially when the playing volume is relatively large, even if the user removes the earphone, it will still be considered to be worn and continue to play the current audio, which is likely to lead to misjudgment of the wearing state of the earphone.
[0053] In order to reduce the probability of misjudgment of the wearing state of the earphone, the wearing signal sent to the earphone wearing management system is adjusted according to the sound compensation amount to determine the wearing state of the earphone, and then the following steps are further included:
[0054] Obtain the reflected light sensing value of the earphone;
[0055] Perform optical reflection compensation processing on the reflected light sensing value and a preset light sensing value to obtain a light reflection compensation amount;
[0056] Detect whether the light reflection compensation amount is greater than 0;
[0057] When the light reflection compensation amount is greater than 0, send a near-ear signal to the earphone wearing management system.
[0058] In this embodiment, the reflected light sensing value is the brightness corresponding to the reflected light of the light emitted by the light sensor in the earcup of the earphone on the user's skin, that is, the reflected light sensing value is the light sensing amount corresponding to the light sensing signal of the earphone, that is, the reflected light sensing value is the intensity of the reflected light of the test light of the earphone. The preset light sensing value is the standard brightness corresponding to the reflected light of the light emitted by the light sensor in the earcup of the earphone on the user's skin, that is, the preset light sensing value is the reference light sensing amount corresponding to the light sensing signal of the earphone, that is, the preset light sensing value is the intensity of the reflected light of the test light when the earphone is worn on the user's ear. Performing optical reflection compensation processing on the reflected light sensing value and the preset light sensing value is to determine the light reflection situation of the light sensor of the earphone, and also to determine the degree of difference between the current reflected light intensity of the earphone and the standard reflected light intensity. The optical reflection compensation amount is used to reflect the difference in the intensity of the reflected light received by the light sensor of the earphone, which is convenient for determining whether the earcup of the earphone covers the user's ear. When the optical reflection compensation amount is greater than 0, it indicates that the intensity of the reflected light received by the light sensor of the earphone is greater than the standard reflected light intensity, that is, it indicates that the intensity of the reflected light received by the light sensor of the earphone is relatively strong, that is, it indicates that the earcup of the earphone is approaching the user's ear. In this way, at this time, a near-ear signal is sent to the earphone wearing management system, so as to facilitate determining that the earphone is about to cover the user's ear, thereby facilitating a more accurate judgment of the wearing situation of the earphone and effectively reducing the misjudgment probability of the wearing state of the earphone.
[0059] Further, the earphone judges the accuracy of earphone wearing through the light sensor. The light sensor is based on the light sensing strength of light. When the earphone is used in an environment with a relatively high light intensity, it is easy to receive the light in the external environment and perform light sensing intensity detection. Even when using light of a specific wavelength for reflection, it is also easy to receive the same light emitted by other light-emitting devices in the external environment, resulting in an increase in the misjudgment accuracy of the wearing state of the earphone.
[0060] In order to further reduce the misjudgment probability of the wearing state of the earphone, when the optical reflection compensation amount is greater than 0, the near-ear signal sent to the earphone wearing management system specifically includes the following steps:
[0061] When the optical reflection compensation amount is greater than 0, obtain the touch capacitance value of the earphone;
[0062] Detect whether the touch capacitance value is greater than the preset capacitance value;
[0063] When the touch capacitance value is greater than the preset capacitance value, send a touch-ear signal to the earphone wearing management system.
[0064] In this embodiment, the optical feedback compensation amount is greater than 0, indicating that the intensity of the reflected light received by the light sensor of the headset is greater than the standard reflected light intensity, that is, indicating that the intensity of the reflected light received by the light sensor of the headset is relatively strong, which also means that the ear cups of the headset are approaching the user's ears. After the intensity of the reflected light received by the light sensor of the headset reaches the specified intensity, in order to eliminate the influence of the light in the external environment on the wearing determination of the headset, the touch capacitance value of the headset is collected. Specifically, a touch sensor is provided on the ear cup of the headset, and the touch sensor is used to contact the skin around the user's ear to form a detection capacitance of the human body-touch sensor. With the help of the micro-current on the human body surface, it is convenient to determine the capacitance value of this detection capacitance, that is, the touch capacitance value. The preset capacitance value is the touch capacitance value corresponding to when the headset is worn on the user's ear, that is, the preset capacitance value is the capacitance value when the touch sensor of the headset contacts the skin around the user's ear, which also means that the preset capacitance value is the standard touch capacitance value corresponding to when the headset is worn. The touch capacitance value being greater than the preset capacitance value indicates that the touch sensor of the headset abuts against the skin around the user's ear, that is, indicating that the headset is fully worn on the user's ear. In this way, at this time, an ear-touch signal is sent to the headset wearing management system to facilitate further determining that the headset has been worn on the user's ear, so as to further determine that the headset is in a wearing state, and further reduce the misjudgment probability of the wearing state of the headset.
[0065] The above various preset variables are all set in the database for easy extraction in a timely manner, and different preset variables are placed in different storage units, that is, in different storage stacks.
[0066] In one embodiment, the present application further provides a headset wearing monitoring device, which is implemented by using the headset wearing monitoring method described in any of the above embodiments. In one embodiment, the headset wearing monitoring device has function modules corresponding to each step of implementing the headset wearing monitoring method. The headset wearing monitoring device includes an audio sampling module, an audio processing module, and a wearing update module; the audio sampling module is used to obtain the test sound signal of the headset; the audio processing module is used to perform a pitch difference process on the test sound signal and a preset sound signal to obtain a sound compensation amount; the wearing update module is used to adjust the wearing signal sent to the headset wearing management system according to the sound compensation amount to determine the wearing state of the headset.
[0067] In this embodiment, a test sound signal is collected by the audio sampling module of the earphone. Specifically, the test sound signal is collected by the microphone of the earphone, that is, the real-time sound inside the earphone is collected. The audio processing module compares and processes it with a preset sound to obtain the change situation of the sound emitted by the earphone, so as to facilitate the wearing update module to determine the current wearing state of the earphone according to the sound compensation amount, reducing the detection state parameters required for earphone wearing and effectively reducing the difficulty of earphone wearing detection.
[0068] For the specific limitations of the earphone wearing detection device, reference can be made to the limitations of the earphone wearing detection device in the above text, which will not be elaborated here. Each module in the above earphone wearing detection device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0069] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 2 shown. The computer device includes a processor, a memory and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as test sound signals, preset sound signals, sound compensation amounts and wearing signals. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for detecting earphone wearing.
[0070] Those skilled in the art can understand that Figure 2 the structure shown in
[0071] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0072] In one embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0073] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0074] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent should be subject to the appended claims.
Claims
1. A method for monitoring headphone wearing, characterized in that, Including: Obtain the test sound signal of the earphone; Perform pitch difference processing on the test sound signal and a preset sound signal to obtain a sound compensation amount; Adjust the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone; Among them, after adjusting the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone, the following steps are further included: Obtain the reflected light sensing value of the earphone; Perform optical reflection fusion compensation processing on the reflected light sensing value and a preset light sensing value to obtain an optical reflection compensation amount; Detect whether the optical reflection compensation amount is greater than 0; When the optical reflection compensation amount is greater than 0, send a near-ear signal to the earphone wearing management system; The near-ear signal sent to the earphone wearing management system when the optical reflection compensation amount is greater than 0 specifically includes the following steps: When the optical reflection compensation amount is greater than 0, obtain the touch capacitance value of the earphone; Detect whether the touch capacitance value is greater than a preset capacitance value; When the touch capacitance value is greater than the preset capacitance value, send a touch-ear signal to the earphone wearing management system.
2. The headphone wearing monitoring method according to claim 1, wherein The performing pitch difference processing on the test sound signal and a preset sound signal includes: Obtain the effective amplitude of the test sound according to the test sound signal; Calculate the difference between the effective amplitude of the test sound and the preset amplitude corresponding to the preset sound signal.
3. The headphone wearing monitoring method according to claim 1, characterized in that, The performing pitch difference processing on the test sound signal and a preset sound signal includes: Perform pitch difference processing on the test sound signal and a closed-cavity sound signal.
4. The headphone wearing monitoring method according to claim 1, wherein The obtaining the test sound signal of the earphone includes: Obtain the front-cavity sound signal and the rear-cavity sound signal of the earphone, where the front-cavity sound signal is the detection sound emitted by the speaker inside the earphone, and the rear-cavity sound signal is the ambient sound outside the earphone; Perform noise cancellation processing on the front-cavity sound signal and the rear-cavity sound signal to obtain the test sound signal.
5. The earphone wearing monitoring method according to claim 4, wherein, The performing noise cancellation processing on the front-cavity sound signal and the rear-cavity sound signal to obtain the test sound signal includes: Calculate the differential signal between the front-cavity sound signal and the rear-cavity sound signal to obtain the test sound signal.
6. The headphone wearing monitoring method according to claim 1, characterized in that, The adjusting the wearing signal sent to the earphone wearing management system according to the sound compensation amount includes: Detect whether the sound compensation amount matches a preset sound compensation amount; When the sound compensation amount matches the preset sound compensation amount, send a put-on signal to the earphone wearing management system.
7. The headphone wearing monitoring method according to claim 6, wherein After detecting whether the sound compensation amount matches a preset sound compensation amount, it further includes: When the sound compensation amount does not match the preset sound compensation amount, send a take-off signal to the earphone wearing management system.
8. An earphone wearing monitoring device for implementing the earphone wearing monitoring method according to any one of claims 1 to 7, characterized in that, The device includes: An audio sampling module for obtaining the test sound signal of the earphone; An audio processing module for performing pitch difference processing on the test sound signal and a preset sound signal to obtain a sound compensation amount; A wearing update module for adjusting the wearing signal sent to the earphone wearing management system according to the sound compensation amount to determine the wearing state of the earphone.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and equipment for detecting earphone wearing state and computer storage medium
CN110337054A
Earphone wearing state detection method and earphone
CN110505547A
Audio processing method and device, electronic equipment and storage medium
CN114422897A