Method and system for optimizing noise reduction effect of earphone

By extracting and matching audio features of external music, generating and adjusting the waveform, the problem of noise reduction delay of external music in the prior art is solved, and the effective noise reduction effect of headphones in the on-site environment is achieved.

CN119277265APending Publication Date: 2025-01-07NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411569061.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When the existing technology deals with external noise as music, there is a delay problem when noise reduction is generated by recording and generating reverse waves, which cannot effectively block external music. Especially for staff in the on-site environment, it affects the noise reduction effect of the headphones. .

Method used

By recording external music, audio feature extraction and matching, the tracks in the music library generate reverse waves, and the playback time is adjusted in real time according to the reverse wave effect to ensure that the reverse waves perfectly correspond to external music and avoid delays.

Benefits of technology

It realizes effective noise reduction of external music without delay in the headset, ensuring the noise reduction effect of the headset, especially in the on-site environment, the effect of staff is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277265A_ABST
    Figure CN119277265A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for optimizing the noise reduction effect of an earphone, and belongs to the field of earphone noise reduction. The invention discloses a method and system for optimizing the noise reduction effect of an earphone. The method comprises the following steps: recording external music; the recorded music is transmitted to a music library to be recognized, and candidate tracks are obtained through recognition; judging the candidate tracks, and selecting and determining the tracks; the selected determined tracks are processed, and inverse waves of the tracks are generated; playing the reverse wave in the earphone, and adjusting the reverse wave playing time according to the reverse wave noise reduction effect; according to the invention, targeted noise reduction is carried out by calling the music file in the music library, so that the playing of the reverse wave perfectly corresponds to the external music, and the reverse wave is not limited by the delay required for generating the reverse wave after the external sound is recorded at present.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of headphone noise reduction, and in particular relates to a method and system for optimizing the noise reduction effect of a headphone. Background Art

[0002] Headphone noise reduction is divided into active noise reduction and passive noise reduction. Passive noise reduction is to reduce the spread of external noise through physical structure. This technology usually uses materials with good sound insulation performance, such as high-density sponge, pore structure, polyester fiber or sound insulation layer of special materials. When users wear noise-canceling headphones, these structures can effectively block external noise and reduce the possibility of it entering the ear canal, thereby reducing interference; active noise reduction is to generate anti-waves after recording external noise and play them in the headphones to offset external sounds.

[0003] When the external noise is music, such as the headphones worn by the staff at a concert, in order to ensure that the instructions can be heard, the external music needs to be shielded. However, if the external sound is recorded and then the anti-wave is generated, a delay will occur, resulting in the inability to effectively shield and reduce the noise of the external music. Therefore, a method for optimizing the noise reduction effect of headphones is proposed. Summary of the invention

[0004] In view of the deficiencies in the prior art, an object of the present invention is to provide a method and system for optimizing the noise reduction effect of headphones, thereby solving the problems in the prior art.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A method for optimizing the noise reduction effect of headphones comprises the following steps:

[0007] Recording outside music;

[0008] The recorded music is transmitted to the music library for identification, and candidate tracks are obtained;

[0009] Identify candidate tracks and select confirmed tracks;

[0010] Processing the selected determined music tracks to generate the music tracks' anti-waves;

[0011] Play the anti-wave in the headphones and adjust the anti-wave playing time according to the anti-wave noise reduction effect;

[0012] By calling the music files in the music library for targeted noise reduction, the playback of the anti-wave can be made to correspond perfectly with the external music, without being constrained by the delay required to generate the anti-wave after recording the external sound.

[0013] Furthermore, the steps of music recognition include:

[0014] S21, performing noise reduction and feature extraction on the recorded audio data, and extracting the frequency spectrum features and time domain features of the audio;

[0015] S22, uploading the extracted features to a music recognition server, which compares the audio with the music library through fast Fourier transform, identifies and returns a list of matching candidate tracks and their similarity scores;

[0016] S23, setting a similarity threshold to filter out tracks with lower similarity, and retaining several candidate tracks with higher similarity to the recorded audio.

[0017] Further, the audio feature matching is performed using fast Fourier transform, including the following steps:

[0018] S221, dividing the recorded audio and the audio in the database into several segments;

[0019] S222, applying fast Fourier transform to each audio segment, converting the audio signal from the time domain to the frequency domain, obtaining amplitude and phase information of each frequency component, and generating a series of spectrum data;

[0020] S223, extracting features from the spectrum data, extracting the main frequency peak, and generating a spectrum fingerprint;

[0021] S224, hashing the spectrum fingerprint data to generate a series of hash values, and comparing the hash value of the recorded audio with the hash value of each track in the music library one by one;

[0022] S225, for each database track, calculate the matching degree between its hash value sequence and the hash value sequence of the recorded audio, and use cosine similarity to calculate the similarity score between the two.

[0023] Furthermore, the cosine similarity calculation formula is:

[0024]

[0025] In the formula, and represents two vectors, Representation vector and The dot product of i and B i Representation vector and The i-th component of and Represents the magnitude of a vector; cos(θ) represents the cosine of the angle between two vectors, ranging from [-1,1].

[0026] Furthermore, the steps of selecting and determining the marked tracks are:

[0027] S31, for the identified candidate tracks, selecting the track with the highest similarity score as the target track;

[0028] S32, further checking the rhythm, pitch and time stamp information of the candidate tracks to ensure that the selected tracks match the recorded audio in terms of rhythm and pitch;

[0029] S33, after checking the information, selecting the track that is most similar to the recorded audio as the final track.

[0030] Furthermore, the process of generating the anti-wave is:

[0031] S41, using audio processing software to perform phase inversion on the selected determined music track, and shift the phase of the audio waveform by 180 degrees;

[0032] S42, comparing the inverted audio spectrum with the audio spectrum recorded by the earphone, adjusting and attenuating the frequency components that do not completely match accordingly, and generating a processed inverted audio waveform, namely, an anti-wave.

[0033] Furthermore, the steps of adjusting the back wave playing time are:

[0034] S51, playing the generated anti-wave audio in the earphone, paying attention to the time synchronization with the external noise during the playback; the initial playback delay is set to 0, and fine-tuned as needed;

[0035] S52, a feedback mechanism is introduced in the earphones, which monitors the remaining intensity of external noise through the microphone and adjusts the playback delay of the reflected wave in real time;

[0036] S53, during the playing process, dynamically adjusting the duration of the back-wave playing according to the real-time feedback; if the noise continues, the back-wave continues to be played; if the noise is interrupted, the back-wave stops playing.

[0037] A system for optimizing noise reduction effect of headphones, comprising:

[0038] Audio recording module: record external music;

[0039] Track recognition module: transfers the recorded music to the music library for recognition, and obtains candidate tracks;

[0040] Track screening module: identify candidate tracks and select the confirmed tracks;

[0041] Anti-wave generation module: processes the selected determined music tracks and generates anti-waves of the music tracks;

[0042] And, the noise reduction module: plays the anti-wave in the headphones and adjusts the anti-wave playing time according to the anti-wave noise reduction effect.

[0043] A computer storage medium stores a readable program, which can implement the above-mentioned load forecasting method when the program is running.

[0044] An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0045] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned load prediction method.

[0046] Beneficial effects of the present invention:

[0047] The method of the present invention performs targeted noise reduction by calling music files in a music library, so that the playback of the backwave can correspond perfectly to the external music, without being constrained by the delay required for generating the backwave after recording the external sound currently used. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 The present invention is a flow chart of a method for optimizing the noise reduction effect of headphones. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] Example 1

[0052] A method for optimizing the noise reduction effect of headphones comprises the following steps:

[0053] S1, recording external music;

[0054] In this embodiment, the headset needs to have an environmental recording function; after detecting external music, the headset is turned on to record the sound, and the recording time is not less than 15 seconds to ensure that sufficient information can be recorded for subsequent processing. At the same time, during the recording process, the headset can collect multi-band components of environmental noise to improve recognition accuracy.

[0055] S2, transferring the recorded music to the music library for identification, and identifying candidate tracks;

[0056] The steps of music recognition include:

[0057] S21, firstly perform noise reduction and feature extraction on the recorded audio data to extract the frequency spectrum features and time domain features of the audio;

[0058] S22, uploading the extracted features to a music recognition server (such as Shazam, ACRCloud, etc.), and the server compares the audio with the music library through fast Fourier transform (FFT), identifies and returns a list of matching candidate tracks and their similarity scores;

[0059] When using Fast Fourier Transform (FFT) for audio feature matching, the following steps are included:

[0060] S221, dividing the recorded audio and the audio in the database into small segments (usually several hundred milliseconds in length), so that the frequency characteristics of each audio segment can be calculated separately;

[0061] S222, applying a fast Fourier transform to each audio segment to convert the audio signal from the time domain to the frequency domain to obtain the amplitude and phase information of each frequency component; the output of the FFT generates a series of spectrum values ​​for describing the frequency distribution of the audio;

[0062] S223, extracting features from the spectrum data output by the FFT, usually extracting information such as the main frequency and the corresponding amplitude peak; by extracting the main frequency peak, a spectrum fingerprint can be generated to simplify and represent the core features of the audio segment;

[0063] S224, hashing the spectrum fingerprint data to generate a series of hash values; these hash values ​​are used to quickly find matching audio in the database; the hash value of the recorded audio is compared with the hash value of each track in the music library one by one;

[0064] S225, for each database track, calculate the matching degree between its hash value sequence and the hash value sequence of the recorded audio, and use cosine similarity to calculate the similarity score between the two; if the hash value matches highly, it is considered to be a candidate track; the cosine similarity calculation formula is:

[0065]

[0066] In the formula, and represents two vectors, Representation vector and The dot product of i and B i Representation vector and The i-th component of and Represents the modulus of a vector, which is calculated as the square root of the sum of the squares of the vector elements; cos(θ) represents the cosine of the angle between two vectors, ranging from [-1,1]; 1 means that the two vectors are exactly the same, 0 means that they are orthogonal (no similarity), and -1 means that they are in completely opposite directions;

[0067] S226, sorting candidate tracks with higher similarity according to the similarity scores to obtain a track list that is closest to the recorded audio;

[0068] S23, setting a similarity threshold to filter out tracks with lower similarity, and retaining several candidate tracks with higher similarity to the recorded audio.

[0069] S3, judging the candidate tracks and selecting the determined tracks;

[0070] The steps to select and confirm the track are:

[0071] S31, for the identified candidate tracks, selecting the track with the highest similarity score as the target track;

[0072] S32, further checking the rhythm, pitch and time stamp information of the candidate tracks to ensure that the selected tracks are consistent with the recorded audio in terms of rhythm and pitch;

[0073] S33, after checking the information, the track that is most similar to the recorded audio is determined as the final track.

[0074] S4, processing the selected determined music track to generate a counter wave of the music track;

[0075] The process of generating the anti-wave is:

[0076] S41, using audio processing software (such as MATLAB, NumPy library in Python, etc.) to perform phase inversion on the selected determined music track, and shift the phase of the audio waveform by 180 degrees;

[0077] S42, compare the inverted audio spectrum with the audio spectrum recorded by the headphones, and make corresponding adjustments and attenuation for the frequency components that do not completely match, so as to ensure that the spectrum of the inverted wave matches the spectrum of the recorded audio as closely as possible

[0078] S43, generating a processed inverted audio waveform, namely, an anti-wave.

[0079] S5, play the anti-wave in the headphones and adjust the anti-wave playing time according to the anti-wave noise reduction effect to achieve the best effect;

[0080] The steps to adjust the back wave playing time are:

[0081] S51, play the generated anti-wave audio in the earphones, pay attention to the time synchronization with the external noise during playback to achieve the maximum cancellation of external noise; the initial playback delay can be set to 0 and fine-tuned as needed

[0082] S52, a feedback mechanism is introduced in the earphones, which monitors the remaining intensity of external noise through the microphone and adjusts the playback delay of the anti-wave in real time;

[0083] S53, during the playing process, dynamically adjust the duration of the back-wave playing according to the real-time feedback; if the noise continues, continue to play the back-wave; if the noise is interrupted, stop playing the back-wave to avoid the conflict between the back-wave and other ambient sounds.

[0084] Based on similar inventive concepts, an embodiment of the present invention further provides a computer storage medium storing a readable program, which can execute the above-mentioned method for optimizing the noise reduction effect of headphones when the program is running.

[0085] Based on similar inventive concepts, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0086] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned method for optimizing the noise reduction effect of headphones.

[0087] Based on similar inventive concepts, an embodiment of the present invention further provides a computer program product, including computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the above-mentioned method for optimizing the noise reduction effect of headphones.

[0088] Example 2

[0089] In this embodiment, a system for optimizing the noise reduction effect of headphones is proposed, which specifically includes:

[0090] Audio recording module: record external music;

[0091] Track recognition module: transfers the recorded music to the music library for recognition, and obtains candidate tracks;

[0092] Track screening module: identify candidate tracks and select the confirmed tracks;

[0093] Anti-wave generation module: processes the selected determined music tracks and generates anti-waves of the music tracks;

[0094] And, the noise reduction module: plays the anti-wave in the headphones and adjusts the anti-wave playing time according to the anti-wave noise reduction effect.

[0095] The method of the present invention may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, processor, or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.

[0096] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A method for optimizing the noise reduction effect of headphones, characterized in that: The following steps are involved: Recording outside music; The recorded music is transmitted to the music library for identification, and candidate tracks are obtained; Identify candidate tracks and select confirmed tracks; Processing the selected determined music tracks to generate the music tracks' anti-waves; Play the anti-wave in the headphones and adjust the anti-wave playing time according to the anti-wave noise reduction effect.

2. The method for optimizing the noise reduction effect of headphones according to claim 1, characterized in that: The steps of music recognition include: S21, performing noise reduction and feature extraction on the recorded audio data, and extracting the frequency spectrum features and time domain features of the audio; S22, uploading the extracted features to a music recognition server, which compares the audio with the music library through fast Fourier transform, identifies and returns a list of matching candidate tracks and their similarity scores; S23, setting a similarity threshold to filter out tracks with lower similarity, and retaining several candidate tracks with higher similarity to the recorded audio.

3. The method for optimizing the noise reduction effect of headphones according to claim 2, characterized in that: Using fast Fourier transform to perform audio feature matching includes the following steps: S221, dividing the recorded audio and the audio in the database into several segments; S222, applying fast Fourier transform to each audio segment, converting the audio signal from the time domain to the frequency domain, obtaining amplitude and phase information of each frequency component, and generating a series of spectrum data; S223, extracting features from the spectrum data, extracting the main frequency peak, and generating a spectrum fingerprint; S224, hashing the spectrum fingerprint data to generate a series of hash values, and comparing the hash value of the recorded audio with the hash value of each track in the music library one by one; S225, for each database track, calculate the matching degree between its hash value sequence and the hash value sequence of the recorded audio, and use cosine similarity to calculate the similarity score between the two.

4. The method for optimizing the noise reduction effect of headphones according to claim 3, characterized in that: The cosine similarity calculation formula is: In the formula, and represents two vectors, Representation vector and The dot product of i and B i Representation vector and The i-th component of and Represents the magnitude of a vector; cos(θ) represents the cosine of the angle between two vectors, ranging from [-1,1].

5. The method for optimizing the noise reduction effect of headphones according to claim 1, characterized in that: The steps to select and confirm the track are: S31, for the identified candidate tracks, selecting the track with the highest similarity score as the target track; S32, further checking the rhythm, pitch and time stamp information of the candidate tracks to ensure that the selected tracks match the recorded audio in terms of rhythm and pitch; S33, after checking the information, selecting the track that is most similar to the recorded audio as the final track.

6. The method for optimizing the noise reduction effect of headphones according to claim 1, characterized in that: The process of generating the anti-wave is: S41, using audio processing software to perform phase inversion on the selected determined music track, and shift the phase of the audio waveform by 180 degrees; S42, comparing the inverted audio spectrum with the audio spectrum recorded by the earphone, adjusting and attenuating the frequency components that do not completely match accordingly, and generating a processed inverted audio waveform, namely, an anti-wave.

7. The method for optimizing the noise reduction effect of headphones according to claim 1, characterized in that: The steps to adjust the back wave playing time are: S51, playing the generated anti-wave audio in the earphone, paying attention to the time synchronization with the external noise during the playback; the initial playback delay is set to 0, and fine-tuned as needed; S52, a feedback mechanism is introduced in the earphones, which monitors the remaining intensity of external noise through the microphone and adjusts the playback delay of the anti-wave in real time; S53, during the playback process, dynamically adjusting the duration of the reverse wave playback according to the real-time feedback; If the noise continues, the counter-wave continues to play; if the noise is interrupted, the counter-wave stops playing.

8. A system for optimizing the noise reduction effect of headphones, characterized in that: include: Audio recording module: record external music; Track recognition module: transfers the recorded music to the music library for recognition, and obtains candidate tracks; Track screening module: identify candidate tracks and select the confirmed tracks; Anti-wave generation module: processes the selected determined music tracks and generates anti-waves of the music tracks; And, the noise reduction module: plays the anti-wave in the headphones and adjusts the anti-wave playing time according to the anti-wave noise reduction effect.

9. A computer storage medium storing a readable program, characterized in that: When the program is running, it can execute the load forecasting method described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the load forecasting method according to any one of claims 1-7.