A kind of control earphone noise-reduction method and device
Technical field
The invention belongs to earphone noise reduction technology field more particularly to a kind of control earphone noise-reduction methods and device.
Background technology
Noise pollution is as one of internationally recognized four big pollutions, with the development of urbanization and the progress of technology, noise
Pollution also becomes more serious.It, can be by controlling earphone noise-reduction method, drop when user plays audio by terminal peripheral earphone
Low environment noise protects the hearing of user.
Earphone noise-reduction method used at present, there are two types of realization method, first way be by earphone physically every
Disconnected noise, makes it cannot be introduced into human ear;The second way is that earphone collects noise, inside earphone into the reverse phase of Row noise with
Superposition offsets the noise into earphone, makes human ear that can not perceive.
However, existing earphone noise-reduction method, needs the hardware switch of the setting adjusting noise reduction on earphone, is unfavorable for earphone
It is highly integrated, and can not achieve automatic noise reduction.The reason is that existing earphone noise-reduction method, is all directly to be carried out using earphone
Adjust noise reduction.Using first way, user can adjust partition journey of the earphone to noise by adjusting the elastic of head wire
Degree and the comfort level worn, using the second way, user can open or close ear by switch on earphone or button
The decrease of noise functions of machine.Therefore, both modes are needed for by the hardware switch on earphone, opening or closing manually
The decrease of noise functions of earphone, it is cumbersome, noise reduction efficacy is reduced, automatic noise reduction is can not achieve.Meanwhile both modes, it needs
The hardware for adjusting noise reduction is arranged in manufacturer on earphone, therefore reduces the degree of integration of earphone.
Invention content
The embodiment of the present invention is designed to provide a kind of control earphone noise-reduction method, it is intended to solve existing earphone noise reduction side
Method needs the hardware switch of the setting adjusting noise reduction on earphone, is unfavorable for the highly integrated of earphone, and can not achieve automatic noise reduction
The problem of.
The embodiment of the present invention is achieved in that a kind of control earphone noise-reduction method, including:
Using terminal microphone, the noise signal of local environment is acquired;
The noise signal of acquisition is handled, judging result is generated;
According to the judging result, the earphone for controlling connection opens decrease of noise functions or closes decrease of noise functions.
The another object of the embodiment of the present invention is to provide a kind of control noise reduction device of earphone, including:
Noise signal acquisition module acquires the noise signal of local environment for utilizing terminal microphone;
Judging result generation module is handled for the noise signal to acquisition, generates judging result;
Earphone noise reduction control module, the earphone for according to the judging result, controlling connection open decrease of noise functions or
Close decrease of noise functions.
In embodiments of the present invention, according to the judging result, the earphone for controlling connection opens decrease of noise functions or closing
Decrease of noise functions solves existing earphone noise-reduction method, needs the hardware switch of the setting adjusting noise reduction on earphone, is unfavorable for earphone
It is highly integrated, and the problem of can not achieve automatic noise reduction.Advantageous effect is two aspects, on the one hand, manufacturer need not be in ear
On the other hand setting, which adjusts the hardware of noise reduction, on machine realizes automatic noise reduction, the premise of the hardware switch on not needing earphone
Under, it can be automatically opened or closed the decrease of noise functions of earphone, to both improve the degree of integration of earphone, also improve earphone
Noise reduction efficacy.
Description of the drawings
Fig. 1 is the implementation flow chart of control earphone noise-reduction method provided in an embodiment of the present invention;
Fig. 2 is the first implementing procedure figure of control earphone noise-reduction method S102 provided in an embodiment of the present invention;
Fig. 3 is the second implementing procedure figure of control earphone noise-reduction method S102 provided in an embodiment of the present invention;
Fig. 4 is the first structure block diagram of control noise reduction device of earphone provided in an embodiment of the present invention;
Fig. 5 is the second structure diagram of control noise reduction device of earphone provided in an embodiment of the present invention;
Fig. 6 is the third structure diagram of control noise reduction device of earphone provided in an embodiment of the present invention;
Fig. 7 is the 4th structure diagram of control noise reduction device of earphone provided in an embodiment of the present invention.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Embodiment one
Fig. 1 is the implementation flow chart of control earphone noise-reduction method provided in an embodiment of the present invention, and details are as follows:
In step S101, using terminal microphone, the noise signal of local environment is acquired;
Wherein, using terminal microphone, the noise signal of local environment is acquired, there are three types of embodiments, and details are as follows:
The first embodiment:
Every preset assay intervals the noise signal of local environment is acquired using terminal microphone.
It should be noted that too big variation can't usually occur whithin a period of time for the noise signal due to environment, because
This, carries out one-time detection to the noise signal of environment every preset assay intervals, can further save the electricity of terminal
Consumption.
Second of embodiment:
When the distance for leaving the geographical location of noise signal of last acquisition local environment is not less than pre-determined distance, profit
With terminal microphone, the noise signal of local environment is acquired.
It should be noted that since the distance that terminal leaves the geographical location of the noise signal detection of last local environment is super
After crossing pre-determined distance, it is possible to which, because of the distance on geographical location, local environment is also changed, at this time again to local environment
Noise signal carry out one-time detection, can inform the situation of change of the noise signal intensity of user's local environment in time.
It should be noted that it is less than pre-determined distance, but the longer situation of traveling time due to being possible to occur terminal movement,
It, but can not be real-time in order to avoid the noise signal intensity of the local environment in this longer traveling time has changed a lot
Acquisition, at this point, further, step S101 is specially:
When the distance that terminal leaves the geographical location of the noise signal detection of last local environment is less than pre-determined distance
When, if the time of the noise signal detection at this time apart from terminal last time local environment has been more than preset assay intervals, eventually
End also obtains the noise signal detection for carrying out local environment,
Thus the accuracy and real-time of the noise signal detection of local environment are further improved.
Similarly, it should be noted that, the GPS functions that can be carried by terminal obtain the progress of terminal current distance last time
The distance in the geographical location of the noise signal detection of local environment, to judge whether the terminal leaves ring residing for last carry out
The distance in the geographical location of the noise signal detection in border is less than pre-determined distance.
The third embodiment:
When terminal is located at preset location, using terminal microphone, the noise signal of local environment is acquired.
Wherein, preset location can be one or be multiple simultaneously, if preset location is multiple, when described mobile whole
When end is located at least one of multiple preset locations, obtains and utilize terminal microphone, acquire the noise signal of local environment.
It should be noted that preset location can be a specific band of position, such as Futian Area of Shenzhen City, Guangdong Province, Shenzhen grand theater
Etc., in this case, mobile terminal can obtain preset location by detecting user's input, can also be moved by reading
The acquiescence preset location of terminal built-in obtains preset location.Meanwhile preset location may be according to inquiry input by user
The preset location that condition coupling goes out.
In step s 102, the noise signal of acquisition is handled, generates judging result;
Wherein, before step S102 or S101, model is handled using the noise signal of pre-configuration, the noise of acquisition is believed
It number is handled, generates judging result, the noise signal processing model includes decibel processing model and signal-to-noise ratio processing mould
At least one of type.
In step s 103, according to the judging result, the earphone for controlling connection opens decrease of noise functions or closes noise reduction
Function.
Terminal sends to the earphone being connected with the terminal according to the judging result and opens noise reduction order or pass
Noise reduction order is closed, decrease of noise functions is opened with the earphone of control connection or closes decrease of noise functions.
Wherein, the terminal is the equipment for carrying out order or data interaction by wired or wireless way and earphone.
The terminal includes but not limited to smart mobile phone, tablet computer, laptop, desktop computer, smart television.
It should be noted that between terminal and earphone, connection can be established by any one wired mode, or by appointing
Meaning is a kind of wirelessly to establish connection.Include but not limited to wirelessly bluetooth, WIFI, 3G, 4G, 5G.
It should be noted that judging result can be shown on the display screen of terminal.
In embodiments of the present invention, according to the judging result, the earphone for controlling connection opens decrease of noise functions or closing
Decrease of noise functions solves existing earphone noise-reduction method, needs the hardware switch of the setting adjusting noise reduction on earphone, is unfavorable for earphone
It is highly integrated, and the problem of can not achieve automatic noise reduction.By traditional manual noise reduction, it is changed to automatic noise reduction so that earphone is not
Only more hommization and intelligence, while also can more meet the needs of user is to health ear.
Embodiment two
Present embodiment describes the implementation processes that configuration noise signal handles model, and details are as follows:
Using pre-configuration noise signal handle model, the noise signal of acquisition is handled, generate judging result it
Before, including:
It configures noise signal and handles model, the noise signal processing model includes at decibel processing model and signal-to-noise ratio
Manage at least one of model;
Wherein, the decibel processing model is:
The dBvalueFor the decibel of noise signal, the τ is the default decibel threshold for opening noise reduction;
The wherein value of τ can be that user sets certainly, or system default.
It should be noted that according to physiology and medical research, the hearing of people will be produced when environmental noise reaches 40dB
Raw significantly damage.Therefore τ can be with value for 40.
Wherein, the signal-to-noise ratio processing model is:
The dBSNRFor signal-to-noise ratio, the σ is the default snr threshold for opening noise reduction, and the signal-to-noise ratio enters for current
The ratio of ear signal and the noise signal.
It should be noted that when using earphone, source of sound enters human ear by a series of processing, this part signal is pleasant letter
Number.Terminal can obtain the size of pleasant signal by the power amplifier of earphone.
It should be noted that the external environment noise that microphone is collected into is noise signal, the original due to design is not implied that
Because of the noise signal of generation.
It should be noted that the generation of signal-to-noise ratio, there are three types of realization methods, and details are as follows:
The first realization method:
Wherein, dBsignalFor the decibel of pleasant signal, dBsignalFor the decibel of noise signal,
Second of realization method:
Wherein, dBsignalFor the decibel of pleasant signal, dBsignalFor the decibel of noise signal.
The third realization method:
Wherein, dBsignalFor the decibel of pleasant signal, dBsignalFor the decibel of noise signal, μ and ρ are parameter ,+ρ=1 μ,
By this design, designer can be according to different earphones and different terminals software and hardware configuration, adjusting parameter, so that earphone noise reduction
Reach best use state.
The wherein value of σ can be that user sets certainly, or system default.
In embodiments of the present invention, configuration noise signal handles model, convenient for being subsequently called.
Embodiment three
Fig. 2 is the first implementing procedure figure of control earphone noise-reduction method S102 provided in an embodiment of the present invention, and details are as follows:
In step s 201, model is handled using the decibel of pre-configuration, whether the decibel for detecting the noise signal of acquisition is big
In the default decibel threshold for opening noise reduction;
In step S202, when the decibel for the noise signal for detecting acquisition is more than the default decibel threshold of unlatching noise reduction
When, the judging result for opening noise reduction is generated, when the decibel for the noise signal for detecting acquisition is not more than default point of unlatching noise reduction
When shellfish threshold value, the judging result for closing noise reduction is generated.
In embodiments of the present invention, when terminal generates the judging result for opening noise reduction, to the earphone being connected with terminal, hair
It send and opens noise reduction order, decrease of noise functions is opened with the earphone of control connection.Terminal generate start or stop noise reduction judging result when, to
The earphone that terminal is connected sends start or stop noise reduction order, with the earphone start or stop decrease of noise functions of control connection.
Example IV
Fig. 3 is the second implementing procedure figure of control earphone noise-reduction method S102 provided in an embodiment of the present invention, and details are as follows:
In step S301, signal-to-noise ratio is obtained, the signal-to-noise ratio is the ratio of current pleasant signal and the noise signal
Value;
In step s 302, model is handled using the signal-to-noise ratio of pre-configuration, detecting the signal-to-noise ratio of the noise signal of acquisition is
It is no to be more than the default snr threshold for opening noise reduction;
In step S303, when the signal-to-noise ratio for the noise signal for detecting acquisition is more than the default signal-to-noise ratio threshold of unlatching noise reduction
When value, the judging result for opening noise reduction is generated, when the signal-to-noise ratio for the noise signal for detecting acquisition is pre- no more than unlatching noise reduction
If when snr threshold, generating the judging result for closing noise reduction.
In embodiments of the present invention, when terminal generates the judging result for opening noise reduction, to the earphone being connected with terminal, hair
It send and opens noise reduction order, decrease of noise functions is opened with the earphone of control connection.Terminal generate start or stop noise reduction judging result when, to
The earphone that terminal is connected sends start or stop noise reduction order, with the earphone start or stop decrease of noise functions of control connection.
Embodiment five
The embodiment of the present invention essentially describes present invention implementing procedure preferable in three different scenes, and details are as follows:
First scene, by smart mobile phone real-time control earphone noise reduction, details are as follows:
It calls the microphone of smart mobile phone to acquire environmental noise, and is inputted inside smart mobile phone;
On smart mobile phone, installation realizes the APP of expectation function;
This APP carries out analyzing processing to the noise signal of mobile phone microphone input, obtains judging result;
APP is according to judging result, by bluetooth, is sent to earphone and opens noise reduction order or closing noise reduction order;
After earphone receives unlatching noise reduction order or closes noise reduction order, change the current shape of current earphone decrease of noise functions
State is turned on or off decrease of noise functions.
Second scene, by laptop real-time control earphone noise reduction, details are as follows:
It calls the microphone of laptop to acquire environmental noise, and is inputted inside smart mobile phone;
On laptop, installation realizes the software of expectation function;
This software carries out analyzing processing to the noise signal of laptop microphone input, obtains judging result;
Software judges that the state of current environment noise needs to open the decrease of noise functions of earphone, this judging result is passed through
WIFI is sent to earphone;
After earphone receives this order, it is open state to read current earphone decrease of noise functions, is judged not after comparison
Need the current state of change earphone decrease of noise functions.
Third scene, by desktop computer real-time control earphone noise reduction, details are as follows:
It calls the microphone of desktop computer to acquire environmental noise, and is inputted inside smart mobile phone;
On desktop computer, installation realizes the software of expectation function;
This software carries out analyzing processing to the noise signal of laptop microphone input, obtains judging result;
Software judges that the state of current environment noise needs to open the decrease of noise functions of earphone, this judging result is passed through
USB lines are sent to earphone.
It after earphone receives this order, reads current earphone decrease of noise functions and is in off state, judge to need after comparison
The current state for changing earphone decrease of noise functions, decrease of noise functions is opened.
Embodiment six
Fig. 4 is the first structure block diagram of control noise reduction device of earphone provided in an embodiment of the present invention, the control earphone noise reduction
Device can be run in terminal.The terminal includes but not limited to smart mobile phone, tablet computer, laptop, desktop
Brain, smart television.For convenience of description, only the parts related to this embodiment are shown.
Reference Fig. 4, the control noise reduction device of earphone, including:
Noise signal acquisition module 41 acquires the noise signal of local environment for utilizing terminal microphone;
Judging result generation module 42 is handled for the noise signal to acquisition, generates judging result;
Earphone noise reduction control module 43, the earphone for according to the judging result, controlling connection open decrease of noise functions or
Person closes decrease of noise functions.
In a kind of realization method of the present embodiment, in the control noise reduction device of earphone, the judging result generates mould
Block is specifically used for handling model using the noise signal being pre-configured, handle the noise signal of acquisition, generates and judge knot
Fruit, the noise signal processing model include at least one of decibel processing model and signal-to-noise ratio processing model.
In a kind of realization method of the present embodiment, with reference to figure 5, Fig. 5 is control earphone drop provided in an embodiment of the present invention
The second structure diagram of device of making an uproar further includes in the control noise reduction device of earphone:
Noise signal handles model configuration module 44, and model, the noise signal processing are handled for configuring noise signal
Model includes at least one of decibel processing model and signal-to-noise ratio processing model;
Wherein, the decibel processing model is:
The dBvalueFor the decibel of noise signal, the τ is the default decibel threshold for opening noise reduction;
Wherein, the signal-to-noise ratio processing model is:
The dBSNRFor signal-to-noise ratio, the σ is the default snr threshold for opening noise reduction, and the signal-to-noise ratio enters for current
The ratio of ear signal and the noise signal.
In a kind of realization method of the present embodiment, with reference to figure 6, Fig. 6 is control earphone drop provided in an embodiment of the present invention
It makes an uproar the third structure diagram of device, in the control noise reduction device of earphone, the judging result generation module 42, including:
Decibel detection unit 421 detects the decibel of the noise signal of acquisition for handling model using the decibel being pre-configured
Whether the default decibel threshold for opening noise reduction is more than;
First judging result generation unit 422, for opening noise reduction when the decibel for the noise signal for detecting acquisition is more than
Default decibel threshold when, the judging result for opening noise reduction is generated, when the decibel for the noise signal for detecting acquisition is no more than opening
When opening the default decibel threshold of noise reduction, the judging result for closing noise reduction is generated.
In a kind of realization method of the present embodiment, with reference to figure 7, Fig. 7 is control earphone drop provided in an embodiment of the present invention
It makes an uproar the 4th structure diagram of device, in the control noise reduction device of earphone, the judging result generation module 42, including:
Signal-to-noise ratio acquiring unit 423, for obtaining signal-to-noise ratio, the signal-to-noise ratio is current pleasant signal and the noise
The ratio of signal;
Signal-to-noise ratio detection unit 424 detects the noise signal of acquisition for handling model using the signal-to-noise ratio being pre-configured
Whether signal-to-noise ratio is more than the default snr threshold for opening noise reduction;
Second judging result generation unit 425, for being dropped when the signal-to-noise ratio for the noise signal for detecting acquisition is more than to open
When the default snr threshold made an uproar, generate open noise reduction judging result, when the noise signal for detecting acquisition signal-to-noise ratio not
When more than the default snr threshold for opening noise reduction, the judging result for closing noise reduction is generated.
Device provided in an embodiment of the present invention can be applied in aforementioned corresponding embodiment of the method, and details are referring to above-mentioned reality
The description of example is applied, details are not described herein.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow
Help software that the mode of required common hardware is added to realize.The program can be stored in read/write memory medium, described
Storage medium, as random access memory, flash memory, read-only memory, programmable read only memory, electrically erasable programmable storage
Device, register etc..The storage medium is located at memory, and processor reads the information in memory, this hair is executed in conjunction with its hardware
Method described in bright each embodiment.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, all answer by the change or replacement that can be readily occurred in
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.