Active noise reduction method and device and electronic equipment

文档序号:452668 发布日期:2021-12-28 浏览:3次 中文

阅读说明:本技术 主动降噪方法、装置和电子设备 (Active noise reduction method and device and electronic equipment ) 是由 陈一君 吴叶富 郭锐 于 2021-10-09 设计创作,主要内容包括:本发明涉及一种主动降噪方法、装置和电子设备,其中,主动降噪方法,包括:获取运动检测组件输出的运动状态信息;在所述运动状态信息为耳机未处于运动模式时,获取松紧度检测组件输出的松紧度信息;基于所述松紧度信息选择与其匹配的降噪模式,并控制所述耳机采用所述降噪模式进行主动降噪。本发明实施例能够在耳机未处于运动模式时,自动按照当前耳机佩戴的松紧度,相应的采用不同的降噪模式进行主动降噪,使得能够根据耳机佩戴的松紧自动调节降噪模式,避免耳道内漏入外界的环境噪声而降低收听效果,保证用户一直处于音频的最佳收听效果,提高用户的使用体验。(The invention relates to an active noise reduction method, an active noise reduction device and electronic equipment, wherein the active noise reduction method comprises the following steps: acquiring motion state information output by a motion detection assembly; when the motion state information is that the earphone is not in a motion mode, obtaining the tightness information output by the tightness detection assembly; and selecting a noise reduction mode matched with the tightness information based on the tightness information, and controlling the earphone to actively reduce noise by adopting the noise reduction mode. According to the embodiment of the invention, when the earphone is not in the motion mode, active noise reduction can be automatically carried out by correspondingly adopting different noise reduction modes according to the wearing tightness of the current earphone, so that the noise reduction modes can be automatically adjusted according to the wearing tightness of the earphone, the phenomenon that the listening effect is reduced due to the fact that external environmental noise leaks into the auditory canal is avoided, the user is always in the optimal listening effect of audio is ensured, and the use experience of the user is improved.)

1. An active noise reduction method, comprising:

acquiring motion state information output by a motion detection assembly;

when the motion state information is that the earphone is not in a motion mode, obtaining the tightness information output by the tightness detection assembly;

and selecting a noise reduction mode matched with the tightness information based on the tightness information, and controlling the earphone to actively reduce noise by adopting the noise reduction mode.

2. The active noise reduction method according to claim 1, wherein when the motion state information indicates that the headphone is in a motion mode, the headphone is controlled to perform active noise reduction in the motion noise reduction mode.

3. The active noise reduction method according to claim 1, wherein the obtaining motion state information output by the motion detection component comprises:

acquiring multiple groups of motion detection information in a first preset time period from the motion detection assembly;

calculating the acceleration variation corresponding to each group of motion detection information based on the motion detection information and a preset calibration reference value aiming at each group of motion detection information;

and determining the motion state information of the earphone according to the multiple groups of acceleration variation and the acceleration fluctuation information fluctuating along with the time.

4. The active noise reduction method according to claim 3, wherein the acceleration fluctuation information includes a plurality of sets of fluctuation directions and fluctuation amplitudes of the acceleration variation, and the determining the motion state information of the earphone according to the plurality of sets of the acceleration variation and the acceleration fluctuation information thereof that fluctuates with time comprises:

based on the plurality of groups of fluctuation directions and fluctuation amplitudes, determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is increased is a wave peak value, and determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is decreased is a wave trough value;

acquiring time difference information between a first time corresponding to the wave peak value and a second time corresponding to the wave valley value;

if the wave peak value is larger than the corresponding wave peak threshold value, the wave trough value is smaller than the corresponding wave trough threshold value, and the time difference information is smaller than a preset time threshold value, determining that the motion state information of the earphone is in a motion mode;

otherwise, determining that the motion state information of the earphone is not in a motion mode.

5. The active noise reduction method according to claim 1, wherein the obtaining of the tightness information output by the tightness detection component comprises:

acquiring multiple groups of tightness detection information in a second preset time period;

for each set of tightness detection information, extracting a channel value acquired by each channel in the tightness detection assembly from the tightness detection information, wherein the tightness detection assembly comprises at least two channels; respectively calculating the difference between the channel value and a preset reference value corresponding to the channel aiming at each channel to obtain the variation difference value of each channel;

calculating the average value of the variation difference values of the channels corresponding to the multiple groups of tightness detection information in the second preset time period to obtain the variation average value of each channel in the second preset time period;

comparing the variation average value of each channel in the second preset time period with the tightness threshold value of the corresponding channel to obtain the tightness of each channel;

and determining the tightness information worn by the earphone based on the tightness degree of each channel.

6. The active noise reduction method of claim 5, wherein determining the tightness information of the headset wearing based on the tightness of each channel comprises:

acquiring the arrangement sequence of the channels which are sequentially arranged along the direction from the ear-entering side to the exposed side of the earphone;

and determining the information of the tightness of the earphone according to the arrangement sequence and the tightness of each channel.

7. The active noise reduction method of claim 1, wherein selecting the noise reduction pattern matching the tightness information based on the tightness information comprises:

determining tightness gear information based on the tightness information;

searching a first noise reduction filtering parameter corresponding to the tightness gear information;

and determining the first noise reduction filtering parameter as the noise reduction parameter adopted by the selected noise reduction mode matched with the tightness information.

8. The active noise reduction method of claim 2, wherein said controlling the headphones to actively reduce noise in a motion noise reduction mode comprises:

controlling the earphone to close noise reduction;

or, denoising the earphone according to a preset second denoising filter parameter.

9. An active noise reduction device, comprising:

the acquisition module is used for acquiring the motion state information output by the motion detection assembly and acquiring the tightness information output by the tightness detection assembly when the motion state information is that the earphone is not in a motion mode;

a determining module, configured to select a noise reduction mode matching the tightness information based on the tightness information;

and the noise reduction module is used for controlling the earphone to actively reduce noise by adopting the matched noise reduction mode when the motion state information indicates that the earphone is not in the motion mode, and controlling the earphone to actively reduce noise by adopting the motion noise reduction mode when the motion state information indicates that the earphone is in the motion mode.

10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;

a memory for storing a computer program;

a processor for implementing the active noise reduction method according to any one of claims 1 to 8 when executing the computer program stored in the memory.

Technical Field

The present application relates to the field of earphone technologies, and in particular, to an active noise reduction method and apparatus, and an electronic device.

Background

At present, noise pollution is ubiquitous, more and more automobiles are arranged on roads, construction sites day and night in cities, and even public transportation such as buses and subways for green and environment-friendly trips are filled with a large amount of noisy noise. Therefore, most people choose to use Active Noise Cancellation (ANC) headphones to combat ambient Noise.

However, when a user wears the ANC earphone, the tightness of the head of the user worn by the user is loose, so that external environment sound enters the ear canal, the listening effect is reduced, and the use experience of the user is affected.

Disclosure of Invention

In order to solve the technical problem or at least partially solve the technical problem, the present application provides an active noise reduction method, an active noise reduction device and an electronic device.

In a first aspect, the present application provides an active noise reduction method, including:

acquiring motion state information output by a motion detection assembly;

when the motion state information is that the earphone is not in a motion mode, obtaining the tightness information output by the tightness detection assembly;

and selecting a noise reduction mode matched with the tightness information based on the tightness information, and controlling the earphone to actively reduce noise by adopting the noise reduction mode.

Optionally, when the motion state information indicates that the headset is in a motion mode, the headset is controlled to actively reduce noise in a motion noise reduction mode.

Optionally, the acquiring motion state information output by the motion detection component includes:

acquiring multiple groups of motion detection information in a first preset time period from the motion detection assembly;

calculating the acceleration variation corresponding to each group of motion detection information based on the motion detection information and a preset calibration reference value aiming at each group of motion detection information;

and determining the motion state information of the earphone according to the multiple groups of acceleration variation and the acceleration fluctuation information fluctuating along with the time.

Optionally, the acceleration fluctuation information includes a plurality of groups of fluctuation directions and fluctuation amplitudes of the acceleration variations, and the determining the motion state information of the headset according to the plurality of groups of acceleration variations and acceleration fluctuation information thereof that fluctuates with time includes:

based on the plurality of groups of fluctuation directions and fluctuation amplitudes, determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is increased is a wave peak value, and determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is decreased is a wave trough value;

acquiring time difference information between a first time corresponding to the wave peak value and a second time corresponding to the wave valley value;

if the wave peak value is larger than the corresponding wave peak threshold value, the wave trough value is smaller than the corresponding wave trough threshold value, and the time difference information is smaller than a preset time threshold value, determining that the motion state information of the earphone is in a motion mode;

otherwise, determining that the motion state information of the earphone is not in a motion mode.

Optionally, the acquiring the tightness information output by the tightness detecting component includes:

acquiring multiple groups of tightness detection information in a second preset time period;

for each set of tightness detection information, extracting a channel value acquired by each channel in the tightness detection assembly from the tightness detection information, wherein the tightness detection assembly comprises at least two channels; respectively calculating the difference between the channel value and a preset reference value corresponding to the channel aiming at each channel to obtain the variation difference value of each channel;

calculating the average value of the variation difference values of the channels corresponding to the multiple groups of tightness detection information in the second preset time period to obtain the variation average value of each channel in the second preset time period;

comparing the variation average value of each channel in the second preset time period with the tightness threshold value of the corresponding channel to obtain the tightness of each channel;

and determining the tightness information worn by the earphone based on the tightness degree of each channel.

Optionally, the determining the tightness information worn by the headset based on the tightness degree of each channel includes:

acquiring the arrangement sequence of the channels which are sequentially arranged along the direction from the ear-entering side to the exposed side of the earphone;

and determining the information of the tightness of the earphone according to the arrangement sequence and the tightness of each channel.

Optionally, the selecting a noise reduction mode matched with the selected noise reduction mode based on the tightness information includes:

determining tightness gear information based on the tightness information;

searching a first noise reduction filtering parameter corresponding to the tightness gear information;

and determining the first noise reduction filtering parameter as the noise reduction parameter adopted by the selected noise reduction mode matched with the tightness information.

Optionally, the controlling the headset to actively reduce noise in a motion noise reduction mode includes:

controlling the earphone to close noise reduction;

or, denoising the earphone according to a preset second denoising filter parameter.

In a second aspect, the present application provides an active noise reduction device, comprising:

the acquisition module is used for acquiring the motion state information output by the motion detection assembly and acquiring the tightness information output by the tightness detection assembly when the motion state information is that the earphone is not in a motion mode;

a determining module, configured to select a noise reduction mode matching the tightness information based on the tightness information;

and the noise reduction module is used for controlling the earphone to actively reduce noise by adopting the matched noise reduction mode when the motion state information indicates that the earphone is not in the motion mode, and controlling the earphone to actively reduce noise by adopting the motion noise reduction mode when the motion state information indicates that the earphone is in the motion mode.

In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;

a memory for storing a computer program;

a processor, configured to implement the active noise reduction method according to any of the first aspect when executing the computer program stored in the memory.

Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:

according to the embodiment of the invention, the motion state information output by the motion detection assembly is firstly obtained, then the tightness information output by the tightness detection assembly is obtained when the motion state information is that the earphone is not in a motion mode, and finally, a noise reduction mode matched with the tightness information can be selected based on the tightness information, and the earphone is controlled to actively reduce noise by adopting the noise reduction mode.

According to the embodiment of the invention, when the earphone is not in the motion mode, active noise reduction can be automatically carried out by correspondingly adopting different noise reduction modes according to the wearing tightness of the current earphone, so that the noise reduction modes can be automatically adjusted according to the wearing tightness of the earphone, the phenomenon that the listening effect is reduced due to the fact that external environmental noise leaks into the auditory canal is avoided, the user is always in the optimal listening effect of audio is ensured, and the use experience of the user is improved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

Fig. 1 is an internal structure diagram of an earphone according to an embodiment of the present disclosure;

fig. 2 is a flowchart of an active noise reduction method according to an embodiment of the present application;

fig. 3 is a structural diagram of an active noise reduction device according to an embodiment of the present disclosure;

fig. 4 is a structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Because the user is when wearing ANC earphone, can lead to external environment sound to get into the duct because the elasticity that the earphone was worn at user's head is more lax, reduced the effect of listening to, influence user's use and experience. To this end, the present application provides an active noise reduction method, an active noise reduction device, and an electronic device, where the active noise reduction method may be applied to a headphone with an active noise reduction function, such as: a True Wireless Stereo (TWS) headset, as shown in fig. 1, the headset is internally provided with a tightness detection component (corresponding to P-sensor in fig. 1), a motion detection component (corresponding to G-sensor in fig. 1), a talking microphone (corresponding to Talk MIC in fig. 1), a feedforward microphone (corresponding to FF MIC in fig. 1), a feedback microphone (corresponding to FB MIC in fig. 1), a bluetooth main control chip (corresponding to bluetooth chip SOC in fig. 1), a Speaker (corresponding to Speaker in fig. 1), and the like, wherein the tightness detection component passes through I2C0 SCL bus, I2The C0 SDA bus is respectively connected with the Bluetooth master control chip in a communication way. The tightness detection assembly is provided with four channels of CH0, CH1, CH2 and CH3, and the tightness detection assemblyGround GND and power supply VDD are connected. Motion detection assembly pass I2C1 SCL bus, I2The C1 SDA bus is respectively connected with the Bluetooth master control chip in a communication way, and the motion detection assembly is also connected with the ground GND and the power supply VDD. The Bluetooth main control chip is in communication connection with the communication microphone, the feedforward microphone, the feedback microphone and the loudspeaker respectively. In addition, the earphone is also provided with a power management module, a key, an indicator light and the like.

As shown in fig. 2, the active noise reduction method may include the steps of:

step S101, obtaining motion state information output by a motion detection assembly;

in an embodiment of the present invention, the motion detection module may include: an acceleration sensor (G-sensor), etc., a motion detection component may be provided in the headset to detect a motion state of the headset, and the motion state information may be directed to the headset being in a motion mode or the headset not being in a motion mode, etc.

In this step, the bluetooth main control chip in the earphone can acquire the motion detection information output by the motion detection component, and then obtain the motion state information according to the motion detection information. For example, when the headset is in different motion states, the motion detection component correspondingly outputs different motion detection information, a motion data threshold value may be preset, and the motion detection information is compared with the corresponding motion data threshold value to determine the motion condition of the headset, so as to obtain the motion state information.

Step S102, when the motion state information is that the earphone is not in the motion mode, obtaining the tightness information output by the tightness detection component;

in an embodiment of the present invention, the tightness detecting assembly may include: the earphone comprises a distance Sensor (P-Sensor), and is characterized in that the distance Sensor (P-Sensor) can be a capacitance type touch Sensor and the like, and a tightness detection component can be arranged at the position of the earphone, which is contacted with the human ear when the earphone is worn, so as to sense the deformation condition of the contact surface of the human ear and the earphone caused by pressure when the earphone is worn.

In this step, the bluetooth main control chip in the earphone can acquire the elasticity detection information that elasticity detecting element exported after detecting pressure variation, obtains the elasticity information according to elasticity detection information again.

For example, when the earphone is worn, the human ear may apply pressure to the surface of the earphone, and the surface of the earphone may generate small deformation, so that the small deformation may be detected by the tightness detection assembly.

And S103, selecting a noise reduction mode matched with the tightness information based on the tightness information, and controlling the earphone to actively reduce noise by adopting the noise reduction mode.

In the embodiment of the present invention, the correspondence between different tightness information and the noise reduction mode may be preset, for example: the tightness information is loose and corresponds to a noise reduction mode a; the tightness information is tight, corresponding to the noise reduction mode b, etc.

The noise reduction mode may include: a noise reduction mode for reducing noise according to the standard noise reduction parameters, a noise reduction mode for reducing noise according to a preset proportion of the standard noise reduction parameters (the preset proportion can be less than 1), a noise reduction mode for closing the noise reduction function, and the like.

In this step, a noise reduction mode matched with the tightness information may be selected in the correspondence between the tightness information and the noise reduction modes according to the different tightness information, and then the active noise reduction may be performed on the earphone according to the noise reduction parameters in the different noise reduction modes.

According to the embodiment of the invention, the motion state information output by the motion detection assembly is firstly obtained, then the tightness information output by the tightness detection assembly is obtained when the motion state information is that the earphone is not in a motion mode, and finally, a noise reduction mode matched with the tightness information can be selected based on the tightness information, and the earphone is controlled to actively reduce noise by adopting the noise reduction mode.

According to the embodiment of the invention, when the earphone is not in the motion mode, different noise reduction modes are correspondingly adopted to carry out active noise reduction automatically according to the wearing tightness of the current earphone, so that the noise reduction mode can be automatically adjusted according to the wearing tightness of the earphone, the phenomenon that the listening effect is reduced due to the fact that external environmental noise leaks into the auditory canal is avoided, the good listening effect of a user on audio is ensured, and the use experience of the user is improved.

When a user wears the ANC headset, if the user cannot hear external environmental sounds at all, in some special use environments, dangers may occur, such as when the user crosses a road, and the like; if the external environment sound can be heard, the effect of listening to the earphone playing content by the user may be affected, and the listening effect and the safety problem cannot be compatible. Therefore, in another embodiment of the present invention, when the motion state information indicates that the headset is in the motion mode, the headset is controlled to actively reduce noise in the motion noise reduction mode.

In the embodiment of the present invention, the noise reduction parameter in the motion noise reduction mode may be a parameter for turning off the noise reduction function or a parameter smaller than the noise reduction parameter when not in the motion mode.

According to the embodiment of the invention, when the earphone is in the motion mode, the motion noise reduction mode corresponding to the motion mode is used for actively reducing noise, namely, the motion noise reduction mode different from that when the earphone is not in the motion mode is used for actively reducing noise under the condition that the earphone is in the motion mode, so that different noise reduction modes are adopted for different application scenes of the earphone, the noise reduction function is turned off or the noise reduction depth is reduced when the earphone is in the motion mode, a user can completely hear or partially hear external environment noise, the listening effect and the safety problem of the noise reduction earphone can be compatible, and the safety problem caused by the fact that the user cannot hear external environment sound during motion is avoided.

In another embodiment of the present invention, the step S101 of acquiring the motion state information output by the motion detection component includes:

step 201, acquiring multiple groups of motion detection information in a first preset time period from the motion detection assembly;

in this embodiment of the present invention, the first preset time period may be a preset time length, such as: 1 second, etc.

In one embodiment of the present invention, during the first preset time period, the motion detection information may be read from the motion detection component once at preset intervals, such as: read every 50ms, etc., to obtain multiple sets of motion detection information.

In another embodiment of the present invention, the motion detection module may be configured to be triggered by an interrupt, and within a first preset time period, when the change value of the motion detection module in XYZ 3 directions exceeds a certain amount, the interrupt is output to the bluetooth main control chip, and the bluetooth main control chip receives the interrupt, that is, the start is started through I2C1 SCL and I2And the C1 SDA communication bus reads the current XYZ 3-direction values of the motion detection assembly to obtain a plurality of groups of motion detection information.

Step 202, for each group of motion detection information, calculating an acceleration variation corresponding to each group of motion detection information based on the motion detection information and a preset calibration reference value;

in the embodiment of the present invention, a plurality of calibration reference values may be preset, and specifically, the calibration reference values may be obtained in the following manner: before the earphone leaves factory, the earphone can be powered on to start working in a static wearing state, the Bluetooth main control chip and the motion detection assembly are respectively initialized in software, and after initialization is completed, the Bluetooth main control chip passes through I2C, the communication bus reads out the current motion detection data from the motion detection component, namely: acceleration data of XYZ axes can continuously read 20 sets of motion detection data. And performing software sliding filtering on the 20 groups of read motion detection data, taking the filtered motion detection data as a calibration reference value, and storing the calibration reference value in the Bluetooth main control chip, wherein the calibration reference value is read from the FLASH memory when the Bluetooth main control chip starts to work each time.

In this step, each set of motion detection information may be respectively subtracted from the calibration reference value to obtain an acceleration variation corresponding to each set of motion detection information.

In practical application, the acceleration variation corresponding to each group of motion detection information may be stored in a software BUFFER (BUFFER) of the bluetooth main control chip.

And step 203, determining the motion state information of the earphone according to the multiple groups of acceleration variation and the acceleration fluctuation information fluctuating along with the time.

Since each piece of motion detection information has a corresponding acquisition time, the acceleration variation calculated based on each piece of motion detection information also has corresponding time information, and therefore, an acceleration fluctuation curve can be drawn with time as a horizontal axis and the acceleration variation as a vertical axis, or only the variation of the acceleration variation can be analyzed to obtain acceleration fluctuation information.

In the embodiment of the present invention, the acceleration fluctuation information may include a fluctuation direction, a fluctuation amplitude, time information, and the like of the acceleration variation.

For example, assuming that there are 20 sets of acceleration variation, if the acceleration variation is a direction variation that becomes larger, the maximum value of the direction variation is determined and recorded as a peak; if the acceleration change is in a decreasing direction, the maximum value of the change in direction is determined, recorded as a trough, and the time point at which the peak and trough data appear is calculated.

In this step, after the acceleration fluctuation information is determined, it may be determined that the vehicle is in the motion mode if the acceleration fluctuation information satisfies the preset conditions of the peak threshold, the trough threshold, and the time threshold according to the preset peak threshold, trough threshold, and time threshold.

The embodiment of the invention can analyze the acceleration fluctuation information of the earphone based on the motion detection information so as to obtain the motion state of the earphone, and the method is simple and convenient.

In another embodiment of the present invention, the step 203 of determining the motion state information of the earphone according to the multiple sets of the acceleration variation and the acceleration fluctuation information thereof fluctuating with time includes:

step 301, based on a plurality of groups of fluctuation directions and fluctuation amplitudes, determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is increased is a wave peak value, and determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is decreased is a wave trough value;

in the embodiment of the present invention, the fluctuation direction may refer to a larger or smaller fluctuation direction, and the fluctuation range may refer to a corresponding fluctuation range at each time in the fluctuation curve.

Based on the fluctuation direction and the fluctuation amplitude, whether a peak and a trough exist in a corresponding fluctuation curve in a first preset time period can be determined, and only if the peak and the trough exist in the first preset time period at the same time, the fact that the variation amplitude of the acceleration variation is large and the variation speed is high indicates that the earphone may be in a motion mode.

Step 302, acquiring time difference information between a first time corresponding to the wave peak value and a second time corresponding to the wave valley value;

since each acceleration variation has corresponding time information, the peak value and the trough value have corresponding time information, and the time difference information between the first time corresponding to the peak value and the second time corresponding to the trough value can be calculated by subtracting the first time corresponding to the peak value and the second time corresponding to the trough value.

Step 303, if the peak value is greater than the corresponding peak threshold value, the trough value is less than the corresponding trough threshold value, and the time difference information is less than a preset time threshold value, determining that the motion state information of the earphone is in a motion mode;

when the wave peak value is greater than the corresponding wave peak threshold value, the wave trough value is less than the corresponding wave trough threshold value, and the time difference information is less than the preset time threshold value, it is indicated that both the change amplitude and the change speed of the acceleration change amount meet the preset motion condition, and it can be determined that the earphone is in the motion mode.

Step 304, otherwise, determining that the motion state information of the earphone is not in the motion mode.

The embodiment of the invention can automatically determine whether the earphone is in the motion mode or not based on the acceleration fluctuation information, and the method is simple, convenient and effective.

In another embodiment of the present invention, in step S102, the acquiring the tightness information output by the tightness detecting component includes:

step 401, acquiring multiple groups of tightness detection information in a second preset time period;

in the embodiment of the present invention, the second preset time period may be the same as the first preset time period, or may be different from the first preset time period.

After the earphone is worn by a person, the change values are sensed respectively by the multiple channels of the tightness detection assembly, the tighter the earphone is in contact with the touch area of each channel, the larger the change value output by the tightness detection assembly is, and the Bluetooth main control chip is arranged in the second preset time period through I2The C communication bus reads multiple sets of tightness detection information from the register of the tightness detection module, each set of tightness detection information includes the measured values of each channel, and for example, the tightness detection module has 4 channels, the measured values of each channel may be respectively denoted as CH0_ Value, CH1_ Value, CH2_ Value, and CH3_ Value.

Step 402, extracting a channel value acquired by each channel in the tightness detection assembly from the tightness detection information for each group of tightness detection information, wherein the tightness detection assembly comprises at least two channels; respectively calculating the difference between the channel value and a preset reference value corresponding to the channel aiming at each channel to obtain the variation difference value of each channel;

in the embodiment of the present invention, the preset reference value may be obtained in advance in the following manner: before the earphone leaves a factory, the tightness detection assembly needs to be calibrated, taking 4 channels as an example, the obtained preset reference values of each channel are respectively Init _ CH0, Init _ CH1, Init _ CH2 and Init _ CH3, the 4 preset reference values can be respectively stored in a FLASH of the bluetooth main control chip for storage, after the earphone is powered on, taking the tightness detection assembly with 4 channels as an example, the calibration values of the 4 channels can be read from the FLASH to serve as the preset reference values.

In this step, a difference between the current channel value of each channel and a preset reference value may be calculated to obtain a variation difference of each channel, and taking the tightness detection assembly having 4 channels as an example, the variation differences of each channel may be respectively recorded as Delta _ CH0, Delta _ CH1, Delta _ CH2, and Delta _ CH 3.

Step 403, calculating an average value of variation difference values of each channel corresponding to multiple groups of tightness detection information in the second preset time period to obtain a variation average value of each channel in the second preset time period;

because each group of tightness detection information calculates the variation difference corresponding to each channel, the average value of the variation difference of each channel corresponding to a plurality of groups of tightness detection information can be further calculated, for example: if 10 sets of tightness detection information are read in the second preset time period, the maximum Value and the minimum Value of 10 Delat _ CH difference values of each channel can be removed, and the average calculation of the remaining 8 difference values is performed to obtain the variation average Value Delta _ CH _ Value of each channel.

Step 404, comparing the variation average value of each channel in the second preset time period with the tightness threshold value of the corresponding channel to obtain the tightness of each channel;

in this step, the variation average value of each channel may be compared with a preset tightness threshold to obtain the current tightness, for example; table _ Limiter [3] - {200,600,1000}, if the current change Value Delta _ CH _ Value >200 and Delta _ CH _ Value <600, the settings are such that the current channel is loose, if Delta _ CH _ Value >600 and Delta _ CH _ Value <1000, i.e., the current channel is medium, and if Delta _ CH _ Value >1000, the status of the current channel is tight.

Step 405, determining the tightness information of the earphone based on the tightness degree of each channel.

The embodiment of the invention can analyze and obtain the tightness degree of each channel based on the tightness degree detection information, so as to obtain the tightness degree information worn by the earphone, wherein the tightness degree information comprises information of tightness, medium tightness, tightness and the like, and the method is simple and high in efficiency.

In another embodiment of the present invention, the step 405, determining the tightness information worn by the earphone based on the tightness degree of each channel, includes:

step 501, obtaining an arrangement sequence of the channels which are sequentially arranged along the direction from the ear-entering side to the exposed side of the earphone;

the arrangement sequence of the channels along the direction from the ear-entering side to the naked side of the earphone is CH0, CH1, CH2 and CH 3.

And 502, determining the wearing tightness information of the earphones according to the arrangement sequence and the tightness degree of each channel.

Illustratively, the judgment is based on the following:

(1) if CH3 is in the tight state, the current earphone wearing tightness information is in the tight state.

(2) If CH0, CH1, CH2 are in a tight state, CH3 is medium or loose, the tightness information of the current headset wearing is in a medium state.

(3) If CH0, CH1 are in loose state, or CH0, CH1 are in tight state, CH2, CH3 are in medium or loose state, the tightness information of the current earphone wearing is in loose state.

The embodiment of the invention can accurately determine the wearing tightness information of the earphone based on the arrangement sequence of the channels on the earphone.

In another embodiment of the present invention, in step S103, selecting a noise reduction pattern matching the tightness information based on the tightness information includes:

601, determining tightness gear information based on the tightness information;

step 602, searching a first noise reduction filtering parameter corresponding to the tightness gear information;

in the embodiment of the invention, the corresponding relation between different tightness gear information and the first noise reduction filtering parameter can be preset, and exemplarily, when the tightness gear information is loose, in order to ensure the listening effect of audio, the first noise reduction filtering parameter is set to be used for enabling the noise reduction degree of the earphone to be deepest, and at the moment, a user cannot hear environmental noise; when the information position of the tightness gear is tight, the first noise reduction filtering parameter can be set to be used for enabling the noise reduction degree of the earphone to be shallow, and due to the fact that less external environment noise enters the earphone, a user can still obtain a good audio listening effect at the moment;

step 603, determining the first noise reduction filtering parameter as a noise reduction parameter adopted by the selected noise reduction mode matched with the tightness information.

According to the embodiment of the invention, when the earphone is not in the motion mode, noise reduction can be normally carried out on external environment noise, and a good listening effect of a user on the earphone playing content is ensured.

In another embodiment of the present invention, in step S104, the controlling the earphone to actively reduce noise in a motion noise reduction mode includes:

controlling the earphone to close noise reduction;

or determining the noise reduction mode based on a preset second noise reduction filtering parameter according to the second noise reduction filtering parameter.

In the embodiment of the present invention, the second noise reduction filtering parameter may be obtained by reducing the first noise reduction filtering parameter according to a preset ratio, that is, the second noise reduction filtering parameter is smaller than the first noise reduction filtering parameter according to the preset ratio, so that the noise reduction depth when the earphone is in the motion mode is smaller than the noise reduction depth when the earphone is not in the motion mode.

According to the embodiment of the invention, when the earphone is in the motion mode, a user can hear a part of environmental noise or hear all the environmental noise, so that the user can know the change of the external environment in time when using the earphone, and the safety of the user is ensured while hearing the audio.

According to the embodiment of the invention, when the earphone is in the motion mode, the noise reduction function is closed or the noise reduction amplitude is reduced, so that a user can listen to the external environment noise while listening to the earphone playing content.

In another embodiment of the present invention, there is also provided an active noise reduction device, as shown in fig. 3, including:

the acquiring module 11 is configured to acquire motion state information output by the motion detection assembly, and when the motion state information is that the earphone is not in a motion mode, acquire tightness information output by the tightness detection assembly;

a determining module 12, configured to select a noise reduction mode matching the tightness information based on the tightness information;

and the noise reduction module 13 is configured to control the earphone to actively reduce noise by using the matched noise reduction mode when the motion state information indicates that the earphone is not in the motion mode, and control the earphone to actively reduce noise by using the motion noise reduction mode when the motion state information indicates that the earphone is in the motion mode.

In another embodiment of the present invention, when the motion state information indicates that the headset is in the motion mode, the headset is controlled to actively reduce noise in the motion noise reduction mode.

In another embodiment of the present invention, the obtaining module 11 includes:

the first acquisition unit is used for acquiring a plurality of groups of motion detection information in a first preset time period from the motion detection assembly;

the second calculation unit is used for calculating the acceleration variation corresponding to each group of motion detection information based on the motion detection information and a preset calibration reference value aiming at each group of motion detection information;

and the second determining unit is used for determining the motion state information of the earphone according to the multiple groups of acceleration variation and the acceleration fluctuation information fluctuating along with time.

In another embodiment of the present invention, the acceleration fluctuation information includes a plurality of sets of fluctuation directions and fluctuation amplitudes of the acceleration variation, and the determining unit is further configured to:

based on the plurality of groups of fluctuation directions and fluctuation amplitudes, determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is increased is a wave peak value, and determining that the acceleration corresponding to the maximum fluctuation amplitude when the fluctuation direction is decreased is a wave trough value;

acquiring time difference information between a first time corresponding to the wave peak value and a second time corresponding to the wave valley value;

if the wave peak value is larger than the corresponding wave peak threshold value, the wave trough value is smaller than the corresponding wave trough threshold value, and the time difference information is smaller than a preset time threshold value, determining that the motion state information of the earphone is in a motion mode;

otherwise, determining that the motion state information of the earphone is not in a motion mode.

In another embodiment of the present invention, the obtaining module 11 further includes:

the second acquisition unit is used for acquiring multiple groups of tightness detection information in a second preset time period;

the extraction and calculation unit is used for extracting a channel value acquired by each channel in the tightness detection assembly from the tightness detection information for each group of tightness detection information, wherein the tightness detection assembly comprises at least two channels; respectively calculating the difference between the channel value and a preset reference value corresponding to the channel aiming at each channel to obtain the variation difference value of each channel;

the second calculating unit is used for calculating the average value of the variation difference values of the channels corresponding to the multiple groups of tightness detection information in the second preset time period to obtain the variation average value of each channel in the second preset time period;

the comparison unit is used for comparing the variation average value of each channel in the second preset time period with the tightness threshold value of the corresponding channel to obtain the tightness of each channel;

and the second determining unit is used for determining the tightness information worn by the earphone based on the tightness of each channel.

In another embodiment of the present invention, the second determining unit is further configured to:

acquiring the arrangement sequence of the channels which are sequentially arranged along the direction from the ear-entering side to the exposed side of the earphone;

and determining the information of the tightness of the earphone according to the arrangement sequence and the tightness of each channel.

In another embodiment of the present invention, the determining module 12 includes:

a third determination unit configured to determine tightness gear information based on the tightness information;

the searching unit is used for searching a first noise reduction filtering parameter corresponding to the tightness gear information;

and the fourth determining unit is used for determining the first noise reduction filtering parameter as the noise reduction parameter adopted by the selected noise reduction mode matched with the tightness information.

In another embodiment of the present invention, the noise reduction module 13 is further configured to:

controlling the earphone to close noise reduction;

or, denoising the earphone according to a preset second denoising filter parameter.

It should be noted that, when the modules or units in the active noise reduction apparatus work, corresponding operation steps in the active noise reduction method are correspondingly executed, the same parameter settings are adopted, and the like, and the same technical effects are achieved.

In another embodiment of the present invention, an electronic device is further provided, which includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 all communicate with each other through the communication bus 1140;

a memory 1130 for storing computer programs;

a processor, configured to execute the computer program stored in the memory 1130 to implement the active noise reduction method according to any of the foregoing method embodiments.

In the electronic device provided in the embodiment of the present invention, the processor 1110 implements, by executing the program stored in the memory 1130, that the motion state information output by the motion detection component is obtained first; then when the motion state information is that the earphone is not in a motion mode, obtaining the tightness information output by the tightness detection assembly; and finally, selecting a noise reduction mode matched with the tightness information based on the tightness information, and controlling the earphone to actively reduce noise by adopting the noise reduction mode.

According to the embodiment of the invention, when the earphone is not in the motion mode, active noise reduction can be automatically carried out by correspondingly adopting different noise reduction modes according to the wearing tightness of the current earphone, so that the noise reduction modes can be automatically adjusted according to the wearing tightness of the earphone, the phenomenon that the listening effect is reduced due to the fact that external environmental noise leaks into the auditory canal is avoided, the user is always in the optimal listening effect of audio is ensured, and the use experience of the user is improved.

The communication bus 1140 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.

In practical applications, when the electronic device is a headset, the communication bus 1140 includes I2C0 SCL bus, I2C0 SDA bus, I2C1 SCL bus and I2A C1 SDA bus and the like, wherein the tightness detection component, the motion detection component, the call microphone, the feedforward microphone, the feedback microphone, the loudspeaker and the like complete the communication with the Bluetooth main control chip through the communication bus 1140.

The communication interface 1120 is used for communication between the electronic device and other devices. In practical applications, when the electronic device is a headset, the communication interface 1120 may correspond to a bluetooth communication interface of a bluetooth main control chip, and the bluetooth communication interface is used for communicating with other devices (e.g., a user terminal).

The memory 1130 may include a Random Access Memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the processor. In practical applications, when the electronic device is a headset, the memory 1130 may correspond to a memory module in the headset.

The processor 1110 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. In practical applications, when the electronic device is a headset, the processor 1110 may correspond to a bluetooth main control chip.

In a further embodiment of the present invention, a computer-readable storage medium is also provided, on which a program of an active noise reduction method is stored, which when executed by a processor implements the steps of the active noise reduction method according to any of the method embodiments described above.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种防中心胶固化结构破坏的异音消除扬声器系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类