Abnormal sound removing method, electronic device, and computer readable storage medium

By controlling the vibration module to perform frequency sweep vibration in the game controller, collecting and analyzing audio signals, and building a filter to remove resonance noise, the problem of noise caused by the vibration motor is solved, and the user experience is improved.

CN115665603BActive Publication Date: 2026-04-21GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GEER TECH CO LTD
Filing Date
2022-10-13
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the vibration motor of a game controller causes adjacent components to resonate, generating abnormal noises that affect the user experience. Furthermore, traditional cushioning materials can only reduce the volume of the abnormal noises but cannot effectively eliminate them.

Method used

By controlling the vibration module to enter the frequency sweep vibration mode, audio signals at different vibration frequencies are collected, the target resonance audio signal is determined, and a filter is constructed to filter the audio signal to be played and remove abnormal noises.

Benefits of technology

It improved the noise removal rate, reduced the number of noises heard by users, and improved the user experience, especially the echo problem during communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665603B_ABST
    Figure CN115665603B_ABST
Patent Text Reader

Abstract

The application discloses an abnormal sound removing method, an electronic device and a computer readable storage medium, and relates to the technical field of electronic devices. The method comprises the following steps: when an abnormal sound removing process is started, a vibration module of the electronic device is controlled to enter a sweep frequency vibration mode, and the vibration module vibrates at multiple different vibration frequencies respectively in the sweep frequency vibration mode; audio signals corresponding to each different vibration frequency of the electronic device in the sweep frequency vibration mode are collected; target audio signals in which the electronic device resonates are determined from each audio signal; and a filter corresponding to the target audio signals is constructed, so that a to-be-played audio signal of the electronic device is filtered based on the filter. The application aims to improve the abnormal sound removing rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of noise removal methods, and more particularly to a noise removal method, an electronic device, and a computer-readable storage medium. Background Technology

[0002] The game controller incorporates a high-powered vibration feedback motor, providing real-time vibration feedback based on different entertainment scenarios. For example, the controller vibrates when an explosion occurs in a game. When low-frequency sound energy, such as an explosion, is concentrated, the controller's speakers and motors may respond to this signal, causing the controller to resonate. Simultaneously, due to the large amplitude and strong vibration, this can cause adjacent components within the product to bump and make noise. On one hand, during communication using the game controller, the microphone also picks up this noise, and this noise becomes an echo, played back by the controller's speakers, worsening the echo effect during player communication. On the other hand, the controller's speakers may also play audio signals at the same resonant frequency (anomaly frequency), causing adjacent components within the product to bump and impact the user experience.

[0003] In related technologies, to address the abnormal noise caused by component collisions, cushioning materials such as foam and soft rubber are added between structural components that are prone to collisions to isolate vibration, or cushioning materials are used to wrap the vibration source to reduce the abnormal noise generated by the vibration source. However, this method can only reduce the volume of the abnormal noise, and the noise removal rate is not high.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this invention is to provide a method for removing abnormal noise, an electronic device, and a computer-readable storage medium, with the aim of improving the noise removal rate.

[0006] To achieve the above objectives, the present invention provides a method for removing abnormal noise, applied to electronic devices, the method comprising:

[0007] When the noise removal process is started, the vibration module of the electronic device is controlled to enter the frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies.

[0008] The audio signals corresponding to different vibration frequencies of the electronic device in the frequency sweep vibration mode are collected.

[0009] Identify the target audio signal from which the electronic device resonates among the various audio signals;

[0010] A filter corresponding to the target audio signal is constructed to filter the audio signal to be played by the electronic device based on the filter.

[0011] Optionally, the step of determining the target audio signal in which the electronic device resonates among the various audio signals includes:

[0012] Obtain the spectrogram corresponding to each of the audio signals;

[0013] Determine the energy of the harmonic components in each of the aforementioned spectra;

[0014] When the energy of the harmonic component is greater than the preset energy, the audio signal is determined to be the target audio signal.

[0015] Optionally, the step of constructing the filter corresponding to the target audio signal includes:

[0016] The filter gain is determined based on the target energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula.

[0017] The filter coefficients are determined based on the target frequency of the fundamental component in the spectrum corresponding to the target audio signal and the filter gain.

[0018] The filter is constructed based on the filter coefficients.

[0019] Optionally, the step of determining the filter gain based on the target energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula includes:

[0020] Compare the target energy with the preset energy;

[0021] The formula for calculating the filter gain is determined based on the comparison results;

[0022] The target energy and the preset energy are substituted into the filter gain calculation formula to determine the filter gain.

[0023] Optionally, the step of obtaining the spectrogram corresponding to each of the audio signals includes:

[0024] A discrete Fourier transform operation is performed on each of the audio signals by applying a Hanning window to obtain the energy corresponding to different frequencies of each audio signal;

[0025] The spectrum is generated based on the frequency and the energy corresponding to the frequency.

[0026] Optionally, after the step of constructing the filter corresponding to the target audio signal, the following steps are included:

[0027] When the audio signal to be played from the speaker of the electronic device is received, the audio signal to be played is filtered based on the filter;

[0028] The filtered audio signal to be played is played through the speaker.

[0029] Optionally, before the step of controlling the vibration module of the electronic device to enter the sweep frequency vibration mode, the method further includes:

[0030] The noise removal process is initiated when the electronic device is powered on, when the application associated with the electronic device is switched, or when a noise removal command is received.

[0031] Optionally, the step of initiating the abnormal sound removal process includes:

[0032] Obtain the running parameters of the currently associated application of the electronic device;

[0033] The preset vibration frequency of the vibration module corresponding to the application associated with the switched application is determined based on the operating parameters.

[0034] The sweep frequency range is determined based on the preset vibration frequency;

[0035] The vibration frequency of the vibration module is determined according to the sweep frequency range under the sweep frequency vibration mode.

[0036] In addition, to achieve the above objectives, the present invention also provides an electronic device, the electronic device including a memory, a processor, and an abnormal noise removal program stored in the memory and executable on the processor, wherein when the abnormal noise removal program is executed by the processor, it implements the steps of the abnormal noise removal method as described above.

[0037] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing an abnormal noise removal program, which, when executed by a processor, implements the steps of the abnormal noise removal method as described above.

[0038] This invention discloses a method, electronic device, and computer-readable storage medium for removing abnormal noise. When initiating the abnormal noise removal process, the vibration module of the electronic device is controlled to enter a frequency sweep vibration mode. In this mode, the vibration module vibrates at multiple different frequencies. The method identifies target audio signals from the audio signals in which the electronic device resonates. A filter corresponding to the target audio signal is constructed, and the audio signal to be played from the electronic device is filtered based on this filter. This method collects audio signals generated by the electronic device in its frequency sweep vibration mode, filters out target audio signals containing abnormal noise caused by internal resonance of the electronic device, and removes signals similar to the target audio signals from the audio signal to be played, reducing the playback and generation of abnormal noise. This improves the abnormal noise removal rate and enhances the user experience. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention;

[0040] Figure 2 This is a flowchart illustrating an embodiment of the abnormal sound removal method of the present invention;

[0041] Figure 3 This is a flowchart illustrating another embodiment of the abnormal sound removal method of the present invention.

[0042] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0043] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0044] In related technologies, the vibration motor of a game controller can cause contact or collision between adjacent parts, resulting in abnormal noise. To reduce the impact of this noise on players, cushioning materials such as foam or soft rubber are added between structural components that are prone to impact to isolate vibration, or the vibration source is wrapped with cushioning material to reduce the noise generated by the vibration source. However, this method can only reduce the volume of the noise, and the noise removal rate is not high.

[0045] To improve the noise removal rate, embodiments of the present invention propose a noise removal method, an electronic device, and a computer-readable storage medium, wherein the main steps of the method include:

[0046] When the noise removal process is started, the vibration module of the electronic device is controlled to enter the frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies.

[0047] The audio signals corresponding to different vibration frequencies of the electronic device in the frequency sweep vibration mode are collected.

[0048] Identify the target audio signal from which the electronic device resonates among the various audio signals;

[0049] A filter corresponding to the target audio signal is constructed to filter the audio signal to be played by the electronic device based on the filter.

[0050] By collecting audio signals corresponding to different vibration frequencies after the electronic device enters the frequency sweep vibration mode, and constructing filters for the target audio signals that may produce abnormal noises from component collisions, the electronic device can filter the audio signals to be played after processing, thereby eliminating such abnormal noises and improving the noise removal rate.

[0051] The claims of this invention will be described in detail below with reference to the accompanying drawings.

[0052] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention.

[0053] In this embodiment of the invention, the terminal can be an electronic device.

[0054] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a memory 1003, and a communication bus 1002. The communication bus 1002 is used to establish communication between these components. The memory 1003 may be high-speed RAM or stable non-volatile memory, such as disk storage. Optionally, the memory 1003 may also be a storage device independent of the aforementioned processor 1001.

[0055] Those skilled in the art will understand that Figure 1 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0056] like Figure 1 As shown, the memory 1003, which serves as a computer storage medium, may include an operating system and a noise removal program.

[0057] exist Figure 1 In the terminal shown, the processor 1001 can be used to call the noise removal program stored in the memory 1003 and perform the following operations:

[0058] When the noise removal process is started, the vibration module of the electronic device is controlled to enter the frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies.

[0059] The audio signals corresponding to different vibration frequencies of the electronic device in the frequency sweep vibration mode are collected.

[0060] Identify the target audio signal from which the electronic device resonates among the various audio signals;

[0061] A filter corresponding to the target audio signal is constructed to filter the audio signal to be played by the electronic device based on the filter.

[0062] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0063] Obtain the spectrogram corresponding to each of the audio signals;

[0064] Determine the energy of the harmonic components in each of the aforementioned spectra;

[0065] When the energy of the harmonic component is greater than the preset energy, the audio signal is determined to be the target audio signal.

[0066] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0067] The filter gain is determined based on the target energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula.

[0068] The filter coefficients are determined based on the target frequency of the fundamental component in the spectrum corresponding to the target audio signal and the filter gain.

[0069] The filter is constructed based on the filter coefficients.

[0070] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0071] Compare the target energy with the preset energy;

[0072] The formula for calculating the filter gain is determined based on the comparison results;

[0073] The target energy and the preset energy are substituted into the filter gain calculation formula to determine the filter gain.

[0074] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0075] A discrete Fourier transform operation is performed on each of the audio signals by applying a Hanning window to obtain the energy corresponding to different frequencies of each audio signal;

[0076] The spectrum is generated based on the frequency and the energy corresponding to the frequency.

[0077] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0078] When the audio signal to be played from the speaker of the electronic device is received, the audio signal to be played is filtered based on the filter;

[0079] The filtered audio signal to be played is played through the speaker.

[0080] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0081] The noise removal process is initiated when the electronic device is powered on, when the application associated with the electronic device is switched, or when a noise removal command is received.

[0082] Furthermore, the processor 1001 can call the noise removal program stored in the memory 1003 and also perform the following operations:

[0083] Obtain the running parameters of the currently associated application of the electronic device;

[0084] The preset vibration frequency of the vibration module corresponding to the application associated with the switched application is determined based on the operating parameters.

[0085] The sweep frequency range is determined based on the preset vibration frequency;

[0086] The vibration frequency of the vibration module is determined according to the sweep frequency range under the sweep frequency vibration mode.

[0087] The game controller has a built-in high-power vibration feedback motor that provides real-time vibration feedback based on different entertainment scenarios. For example, the controller will vibrate when an explosion occurs in a game. When low-frequency sound energy such as an explosion occurs, the speaker and motor inside the controller will respond to this signal, causing the controller to resonate and resulting in abnormal noises from adjacent components hitting each other.

[0088] On the one hand, when players use a game controller to communicate with other players in the game, the controller inevitably experiences some occasional resonance. This resonance causes components within the device to bump against each other, producing sudden abnormal noises. For example, resonance can occur due to the combined effect of the motor and game sounds, or resonance can occur due to the motor or game sounds acting alone, thus generating abnormal noises. During communication, these abnormal noises are picked up by the controller's microphone. Because these abnormal noises are not included in the reference signal transmitted to the speaker, they are difficult to cancel out by the echo processing algorithm when processing the speaker's echo. Therefore, the echo of these abnormal noises still exists in the speaker, and the resulting echoes severely affect the user experience.

[0089] On the other hand, even without communication, the controller may resonate due to the speaker. When the speaker plays an audio signal with the same resonant frequency (abnormal frequency), it will also cause the controller to resonate, causing adjacent parts inside the product to collide, resulting in additional abnormal noise and affecting the user experience.

[0090] In related technologies, to address noise from component impacts, cushioning materials such as foam or soft rubber are added between structural components prone to impact to isolate vibration, or the vibration source is wrapped with cushioning material to reduce the noise generated by the vibration source. However, this method can only reduce the volume of the noise and has a low noise removal rate.

[0091] The following explanation, through specific exemplary solutions, clarifies the scope of protection claimed in the claims of this invention, so that those skilled in the art can better understand the scope of protection of the claims. It is understood that the following exemplary solutions do not limit the scope of protection of this invention, but are only used to explain this invention.

[0092] For example, refer to Figure 2 In one embodiment of the abnormal noise removal method of the present invention, the abnormal noise removal method includes the following steps:

[0093] Step S10: When starting the noise removal process, control the vibration module of the electronic device to enter the frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies.

[0094] In this embodiment, the main body performing the noise removal method is an electronic device.

[0095] Electronic devices include vibration modules that vibrate when triggered. For example, an electronic device could be a gamepad with a built-in high-power vibration feedback motor. In games associated with the gamepad, there might be scenes like explosions or impacts. This would trigger the motor to vibrate, giving the user the tactile sensation of an "explosion" or "impact," thus enhancing the user's gaming experience.

[0096] Electronic devices also include speakers and microphones, which can play sound and collect sound respectively. They can be used in communication scenarios of electronic devices, such as voice calls, to facilitate communication between users of electronic devices and other devices.

[0097] In certain operating scenarios, electronic devices may experience occasional resonances, causing adjacent components to collide and produce unusual noises. This is particularly noticeable in gaming scenarios, where low-frequency sounds are frequently played. When the energy of these low-frequency sounds is concentrated and the vibration module is activated, it can cause the electronic device to resonate, leading to collisions and noises. Alternatively, if the application being used on the device has a motor with a high vibration frequency, it can also resonate, causing collisions and noises. If the electronic device is communicating during this time, such as in a multiplayer game using a controller, its microphone will pick up these noises and feed them back to the speaker as echoes, resulting in noise in the audio signal being played and degrading the user experience.

[0098] In one application scenario, the electronic device can be a gamepad. The gamepad has a built-in high-power vibration feedback motor. In practical use, especially in games that play low-frequency sounds such as car crashes or explosions while the motor vibrates, both the gamepad's speaker and motor respond to the low-frequency sound energy. Occasionally, due to the large amplitude and strong vibration of the motor, adjacent parts of the gamepad may come into contact or bump against each other, causing some degree of noise. If the gamepad is also connected to other players' gamepads, communication can be achieved through the microphone and speaker. During these calls, sudden bumps and noises are inevitable. These noises are picked up by the microphone and fed back to the speaker as echoes, causing noise in the audio being played on the electronic device. This worsens the echo effect during player communication and degrades the gaming experience.

[0099] In other operating scenarios of electronic devices, regardless of whether the electronic device is communicating, the speaker of the electronic device will play audio signals of different frequencies. If the signal is played at a resonant frequency (the frequency corresponding to an abnormal sound), it will cause adjacent parts of the electronic device to collide, producing a knocking noise and reducing the user experience.

[0100] In summary, it is necessary to remove audio signals from the audio signal to be played by the electronic device's speaker that are similar to those that resonate with the electronic device, including echoes or similar sounds, in order to reduce the number of unusual sounds heard by the user.

[0101] It should be noted that the vibration module, the speaker, or both can work together to generate sufficient energy to cause resonance in electronic devices. During resonance, adjacent components collide, producing noise that reaches the resonance frequency. Similarly, when the audio signal played by the speaker reaches the resonance frequency, this signal will also cause the electronic device to resonate, triggering a collision and generating noise. To remove the relevant audio signals (noise signals in the echo and audio signals that cause resonance) from the audio signal to be played by the electronic device, it is first necessary to determine what kind of audio signal corresponds to the resonance frequency when the electronic device resonates. Therefore, when initiating the noise removal process, the vibration module of the electronic device needs to be controlled to enter a frequency sweep vibration mode to vibrate at multiple different frequencies. This method of creating noise by causing resonance in the electronic device solely through the vibration of the vibration module also simulates the resonance of the electronic device under the combined action of a speaker and the vibration module.

[0102] Optionally, the noise removal process is initiated when the electronic device is powered on, when the application associated with the electronic device is switched, or when a noise removal command is received.

[0103] The abnormal noise removal process has triggering conditions, including the electronic device being powered on (e.g., a game controller starting up and re-pairing); or the application associated with the electronic device being switched (e.g., switching to a new game); or receiving an abnormal noise removal command, such as when a chat button is present near the microphone or speaker on a game controller. Pressing the button allows for voice chat and also triggers the abnormal noise removal command. Abnormal noise removal relies on generating a filter for the current stage. When the triggering conditions for the abnormal noise removal process are met, an abnormal noise removal process is initiated, thereby updating the filter and improving the accuracy of abnormal noise removal.

[0104] Optionally, the operating parameters of the current application associated with the electronic device are obtained; the preset vibration frequency of the vibration module corresponding to the application after switching is determined based on the operating parameters; the frequency sweep range is determined based on the preset vibration frequency; and the vibration frequency of the vibration module in the frequency sweep vibration mode is determined based on the frequency sweep range.

[0105] In sweep frequency vibration mode, the vibration module's vibration frequency has a sweep frequency range. To better create and simulate the resonance of electronic devices, the sweep frequency range should be determined based on the preset vibration frequency of the vibration module, defining an octave sweep range, and then emitting an octave sweep frequency according to this range. The associated program of the electronic device can be a program running on the device itself, such as a program running on a mobile phone or game console, or an application running on a device paired with the electronic device. For example, if the electronic device is a game controller, the associated application could be a program running on the game console. Understandably, due to the differences between different running programs, the preset vibration frequency of the vibration module will also differ during operation. Therefore, it is necessary to obtain the operating parameters of the currently running associated program to determine the preset vibration frequency.

[0106] Furthermore, the minimum value of the sweep frequency range can be a preset vibration frequency, and the maximum value can be determined based on the preset audio signal of the currently running program. The preset audio signal of the currently running program is determined based on the running parameters, and the maximum value of the sweep frequency range is determined based on the frequency of the preset audio signal. Specifically, the vibration module enters the sweep vibration mode, starts vibrating from the preset vibration frequency, gradually increases the vibration frequency, and stops vibrating when it reaches 1.5 times the frequency of the preset audio signal, thereby completing the octave sweep frequency of the vibration module.

[0107] Step S20: Collect the audio signals corresponding to different vibration frequencies of the electronic device in the sweep frequency vibration mode;

[0108] In this embodiment, the vibration module in the electronic device vibrates, causing the entire device to produce different sounds. Different vibration frequencies correspond to different audio signals. Collecting these sounds means collecting the audio signals corresponding to each different vibration frequency. To improve the accuracy of noise removal, the audio signals of the electronic device are collected using its built-in microphone.

[0109] Step S30: Determine the target audio signal in the audio signal that contains abnormal noise from component collision;

[0110] In this embodiment, after acquiring audio signals of different vibration frequencies of the electronic device in a frequency sweep vibration mode, if at a certain vibration frequency the electronic device resonates, causing abnormal noise due to contact or collision between components, then the audio signal corresponding to that vibration frequency is the target audio signal. Under this audio signal, the user can perceive the abnormal noise, i.e., the electronic device resonates. Therefore, the target audio signal can be determined based on the signal interception command given by the user. To improve the accuracy and efficiency of determining the target audio signal and reduce user operation steps, spectrum analysis can be performed on all audio signals. The harmonic components of the audio signal are determined based on the spectrum analysis results, and the target audio signal is determined based on the energy of the harmonic components.

[0111] Step S40: Construct a filter corresponding to the target audio signal, so as to filter the audio signal to be played by the electronic device based on the filter.

[0112] In this embodiment, after identifying the target audio signal that will cause resonance in the electronic device, it is necessary to remove audio signals similar to the target audio signal from the audio signal to be played by the electronic device. Audio signals similar to the target audio signal are those with frequencies close to or equal to the target audio signal. It is important to note that the audio signal is a signal collected corresponding to the vibration frequency, i.e., an audio signal collected within a single time period. The audio signal contains different frequencies, and it is necessary to determine the target frequency, which has high energy and is mainly caused by resonant abnormal sounds. A filter is then constructed based on the target frequency in the target audio signal.

[0113] Optionally, the fundamental component of the target audio signal can be determined based on the spectrogram analysis results. A target frequency is then selected from the corresponding frequency band of the fundamental component, and a filter is constructed based on the target frequency. The filter quickly processes the audio signal to be played, filtering out audio signals with frequencies close to or equal to the target frequency. That is, if there are echoes of unusual sounds in the audio signal to be played, these echoes will also be filtered out, thereby improving the noise removal rate.

[0114] Optionally, when the audio signal to be played from the speaker of the electronic device is received, the audio signal to be played is filtered based on the filter; the filtered audio signal to be played is then played based on the speaker.

[0115] Upon receiving an audio signal to be played through a speaker, a filter is applied to the signal before it is output through the speaker. This process filters out any audio signals that would cause resonance in the electronic device. The resulting filtered audio signal is free of unwanted noise or sounds that could interfere with the operation of the electronic device. In communication scenarios, the audio played through the electronic device's speaker will not contain echoes from microphones, and it will also remove noise from audio signals transmitted by other parties, thus purifying the communication environment. In ordinary scenarios, it also removes audio signals that could cause resonance in the electronic device, improving the user experience.

[0116] Furthermore, when the microphone of the electronic device picks up an audio signal, the audio signal is filtered based on the filter, and the filtered audio signal is output. This ensures that there are no abnormal sounds in the output audio signal picked up by the microphone, improving the removal rate of abnormal sounds picked up by the microphone. In communication scenarios, this also ensures that the audio heard by the other party is free of abnormal sounds, improving the user experience for both parties. In speech recognition scenarios, it can also accurately identify the information contained in the user's speech.

[0117] In the technical solution disclosed in this embodiment, when the abnormal noise removal process is initiated, the vibration module of the electronic device is controlled to enter a frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies. Audio signals corresponding to each different vibration frequency of the electronic device in the frequency sweep vibration mode are collected. Target audio signals in each audio signal that cause resonance in the electronic device are determined. A filter corresponding to the target audio signal is constructed, and the audio signal to be played by the electronic device is filtered based on the filter. This process collects the audio signals generated by the electronic device when its vibration module enters the frequency sweep vibration mode, filters out target audio signals that cause resonance within the electronic device, resulting in abnormal noise from collisions between components, constructs a filter corresponding to the target audio signal, and filters the subsequent audio signal to be played by the electronic device based on the filter. This filters out the parts that will cause abnormal noise, eliminating such audio signals played by the speaker during communication, especially abnormal noise in echoes, or audio signals that cause resonance. This achieves the effect of improving the removal rate of abnormal noise that users may hear, thus improving the user experience.

[0118] Optionally, refer to Figure 3 Based on any of the above embodiments, in another embodiment of the abnormal noise removal method of the present invention, the abnormal noise removal method further includes:

[0119] Step S31: Obtain the spectrogram corresponding to each of the audio signals;

[0120] In this embodiment, after acquiring the audio signals corresponding to different vibration frequencies of the electronic device in the frequency sweep vibration mode, it is necessary to select the target audio signal that can characterize the resonance of the electronic device from these audio signals. To electronically determine the target audio signal, each audio signal can first be converted into a spectrum, which is the energy image of the signal in the frequency domain. Analyzing the spectrum allows us to determine whether the corresponding audio signal exhibits resonance; if so, it is the target audio signal.

[0121] Optionally, a discrete Fourier transform operation is performed on each of the audio signals by applying a Hanning window to obtain the energy corresponding to different frequencies of each audio signal; the spectrum is generated based on the frequency and the energy corresponding to the frequency.

[0122] First, the audio signal is sampled at 50%. To reduce spectral leakage, a Hanning window is applied to each audio signal. The Hanning window formula is as follows:

[0123]

[0124] Where n is the data length, w is the rectangular window, N is the order of the FFT, and n belongs to

[0125] Then, FFT (a fast algorithm for Discrete Fourier Transform) is performed to calculate the FFT value corresponding to each frequency of the audio signal, that is, the energy of the audio signal at that frequency.

[0126] Step S32: Determine the energy of each harmonic component in the spectrum;

[0127] In this embodiment, the spectrum can represent multiple wave components of an audio signal, which can be divided into fundamental wave components and harmonic components. A spectrum includes one fundamental wave component, which is also the lowest frequency component of the composite wave. The remaining wave components are harmonic components, and therefore the frequencies corresponding to the harmonic components are higher than the frequencies of the fundamental wave components. The energy value corresponding to the peak of each harmonic component is determined as the energy of that harmonic component.

[0128] Step S33: When the energy of the harmonic component is greater than the preset energy, the audio signal is determined to be the target audio signal.

[0129] In this embodiment, when a harmonic component with energy H greater than a preset energy M exists in the spectrum, the electronic device resonates within the frequency band corresponding to the fundamental component of that spectrum, causing contact or collision between internal components. The preset energy can be pre-set: the magnitude of the vibration module's frequency sweep signal is adjusted until the user can just perceive the electronic device resonating and producing abnormal noise, at which point the energy of the corresponding harmonic component is recorded as the preset energy.

[0130] Optionally, the filter gain is determined based on the energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula; the filter coefficients are determined based on the frequency band of the fundamental component in the spectrum corresponding to the target audio signal and the filter gain; and the filter is constructed based on the filter coefficients.

[0131] After determining the target audio signal based on the spectrum, a filter can be constructed based on it. Since the electronic device transmits resonance within the frequency band corresponding to the fundamental component, a filter is constructed based on this frequency band. To quickly process the audio signal to be played and reduce processing delay, an IIR filter processor can be used. When designing the filter, the filter gain is first determined based on the energy of the harmonic components within the spectrum corresponding to the target audio signal, a preset energy value, and the filter gain calculation formula. Then, the filter coefficients are calculated based on the filter gain, the frequency band of the harmonic components within the spectrum corresponding to the target audio signal, and the sampling rate of the audio signal to be played. Finally, the filter is constructed based on these filter coefficients.

[0132] Further, the target energy is compared with the preset energy; the filter gain calculation formula is determined based on the comparison result; the target energy and the preset energy are substituted into the filter gain calculation formula to determine the filter gain.

[0133] Because the magnitude of harmonic energy varies and the degree of resonance in electronic devices differs, the formula for calculating the filter gain also varies. The energy of the harmonic components in the spectrum corresponding to the target audio signal is compared with a preset energy. Based on the comparison result, the formula for calculating the filter gain is determined. The target energy and the preset energy are then substituted into the formula to calculate the filter gain.

[0134] When H > 2M, A = 0.5 * sin(2M / H) / (2M / H);

[0135] When 2M>=H>M, A=H / (2M);

[0136] Where H is the target energy, M is the preset energy, and A is the filter gain.

[0137] Furthermore, the filter coefficients are determined based on the target frequency of the fundamental component in the spectrum corresponding to the target audio signal and the filter gain. Taking a second-order IIR filter as an example, the details are as follows:

[0138] w0 = 2 * pi * Fc / Fs;

[0139] alpha = sin(w0) / 4;

[0140] Furthermore,

[0141] b2=(1-alpha*A) / (1+alpha / A);

[0142] b1=-2*cos(w0) / (1+alpha / A);

[0143] b0=(1+alpha*A) / (1+alpha / A);

[0144] a2=-(1-alpha / A) / (1+alpha / A);

[0145] a1 = 2*cos(w0) / (1+alpha / A);

[0146] a0 = sin(0.1M / H) / (0.1M / H);

[0147] Among them, ai and bi are filter coefficients, FC is the target frequency, which can be the intermediate value of the corresponding frequency band of the target audio signal, FS is the sampling rate of the audio signal to be played, and w0 and alpha are intermediate calculation coefficients.

[0148] Using the filter coefficients mentioned above, but not limited to the second-order IIR filter coefficients, a filter is constructed to filter the audio signal to be played by the electronic device before playback, thereby effectively filtering out abnormal noises in the audio signal that are similar to the resonance of the electronic device. The filter is as follows:

[0149]

[0150] In the technical solution disclosed in this embodiment, the spectrum corresponding to each audio signal is obtained; the energy of the harmonic components in each spectrum is determined; when the energy of the harmonic components is greater than a preset energy, the audio signal is determined to be the target audio signal. By analyzing the spectrum corresponding to the audio signal, the target audio signal can be found more accurately, and a filter can be constructed based on the target audio signal to filter out unwanted noise in the audio signal to be played by the electronic device. In communication scenarios, this can effectively and quickly remove audio signals that reach the resonant frequency from the electronic device's speaker, eliminate unwanted noise in echoes, and reduce the occurrence of resonance in the electronic device, thus significantly reducing unwanted noise that users may experience and improving the user experience.

[0151] Furthermore, this invention also proposes an electronic device, which includes a memory, a processor, and an abnormal noise removal program stored in the memory and executable on the processor. When the abnormal noise removal program is executed by the processor, it implements the steps of the abnormal noise removal method described in the above embodiments.

[0152] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an abnormal noise removal program, wherein when the abnormal noise removal program is executed by a processor, it implements the steps of the abnormal noise removal method described in the above embodiments.

[0153] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0154] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause an electronic device to execute the methods described in the various embodiments of the present invention.

[0156] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for removing abnormal noise, characterized in that, The noise removal method, applied to electronic devices, includes: When the abnormal noise removal process is started, the vibration module of the electronic device is controlled to enter the frequency sweep vibration mode. In the frequency sweep vibration mode, the vibration module vibrates at multiple different vibration frequencies. The vibration frequency of the vibration module has a frequency sweep range. The minimum value of the frequency sweep range is a preset vibration frequency, and the maximum value is determined according to the preset audio signal of the currently running program. The audio signals corresponding to different vibration frequencies of the electronic device in the frequency sweep vibration mode are collected. Obtain the spectrogram corresponding to each of the audio signals; Determine the energy of each harmonic component in the spectrum, wherein the energy value corresponding to the peak of the harmonic component is the energy of the harmonic component; When the energy of the harmonic component is greater than the preset energy, the audio signal is determined to be the target audio signal, which is an audio signal that indicates the presence of abnormal noise from component collision. The filter gain is determined based on the target energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula. The filter coefficients are determined based on the target frequency of the fundamental component in the spectrum corresponding to the target audio signal and the filter gain. Construct a filter based on the filter coefficients; When the audio signal to be played from the speaker of the electronic device is received, the audio signal to be played is filtered based on the filter; The filtered audio signal to be played is played through the speaker.

2. The method for removing abnormal noise as described in claim 1, characterized in that, The step of determining the filter gain based on the target energy of the harmonic components in the spectrum corresponding to the target audio signal, the preset energy, and the filter gain calculation formula includes: Compare the target energy with the preset energy; The formula for calculating the filter gain is determined based on the comparison results; The target energy and the preset energy are substituted into the filter gain calculation formula to determine the filter gain.

3. The method for removing abnormal noise as described in claim 1, characterized in that, The step of obtaining the spectrograms corresponding to each of the audio signals includes: A discrete Fourier transform operation is performed on each of the audio signals by applying a Hanning window to obtain the energy corresponding to different frequencies of each audio signal; The spectrum is generated based on the frequency and the energy corresponding to the frequency.

4. The method for removing abnormal noise as described in claim 1, characterized in that, Before the step of controlling the vibration module of the electronic device to enter the frequency sweep vibration mode, the method further includes: The noise removal process is initiated when the electronic device is powered on, when the application associated with the electronic device is switched, or when a noise removal command is received.

5. The method for removing abnormal noise as described in claim 1, characterized in that, The steps for initiating the abnormal sound removal process include: Obtain the running parameters of the currently associated application of the electronic device; The preset vibration frequency of the vibration module corresponding to the application associated with the switched application is determined based on the operating parameters. The sweep frequency range is determined based on the preset vibration frequency; The vibration frequency of the vibration module is determined according to the sweep frequency range under the sweep frequency vibration mode.

6. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and an abnormal noise removal program stored in the memory and executable on the processor, wherein when the abnormal noise removal program is executed by the processor, it implements the steps of the abnormal noise removal method as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a noise removal program, which, when executed by a processor, implements the steps of the noise removal method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vibration control method and mobile terminal

    CN109951602A

  • Closed-loop automatic detection vibration reduction method and system, terminal and storage medium

    CN113068100A