Earphone noise reduction processing method, earphone and storage medium

Through the recognition and screening method of dual spectrum and dual extraction mode, the noise scene is layered and the acquisition of wireless headphone noise reduction parameters is optimized, which solves the problems of low efficiency and high power consumption of noise scene recognition in the existing technology, and improves headphone noise reduction accuracy and user experience.

CN119155582APending Publication Date: 2024-12-17JIANGXI RUISHENG ELECTRONIC CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411108209.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing wireless headphone adaptive noise reduction technology cannot accurately identify noise scenarios, resulting in low matching degree of noise reduction and high power consumption, affecting the user experience.

Method used

The dual spectrum and dual extraction mode are adopted to filter the similarity coefficients of the amplitude feature matrix and energy feature values, and the scene type is layered to identify the scene type, optimize the acquisition of noise reduction parameters, improve the scene recognition efficiency and accuracy, and reduce power consumption.

Benefits of technology

It improves the accuracy and efficiency of headphone noise reduction processing, reduces calculation amount, reduces headphone power consumption, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155582A_ABST
    Figure CN119155582A_ABST
Patent Text Reader

Abstract

The invention discloses an earphone noise reduction processing method, an earphone and a storage medium, and the method comprises the steps: obtaining a first frequency spectrum and a second frequency spectrum according to an environment audio signal of a current scene of the earphone; obtaining an amplitude feature matrix based on the first frequency spectrum and a preset first extraction mode; obtaining a plurality of energy characteristic values based on the second frequency spectrum and a preset second extraction mode; obtaining a similarity coefficient of the amplitude characteristic matrix and a comparison matrix of a preset scene type; screening out a specific scene type from the scene types based on the similarity coefficient; determining a target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type; and obtaining a noise reduction parameter corresponding to the target scene type as a target noise reduction parameter. According to the method and the device, the acquisition mode of the noise reduction parameters of the earphone is optimized by utilizing a recognition screening mode of double frequency spectrums and double extraction, the efficiency and the accuracy of scene recognition are improved, the calculation amount of scene recognition is reduced, the power consumption of the earphone is reduced, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of headphone noise reduction, and in particular to a headphone noise reduction processing method, a headphone and a storage medium. Background Art

[0002] With the rapid development of electronic technology, wireless headphones have become an indispensable item for people's daily travel. When facing various relatively noisy environments, people usually choose to wear wireless headphones to reduce the impact of environmental noise.

[0003] Different noise environments have different requirements for noise reduction. To better cope with the changing noise environment, some existing wireless headphones use adaptive noise reduction to reduce the impact of environmental noise. However, the existing adaptive noise reduction method cannot identify the noise scene relatively accurately and efficiently, which leads to a low matching degree of noise reduction requirements, and the existing adaptive noise reduction has high power consumption, which in turn affects the user experience.

[0004] In view of this, it is necessary to provide a method for headphone noise reduction processing, a headphone and a storage medium to solve the above-mentioned problems. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a method for headphone noise reduction processing, headphones and a storage medium, which optimize the method for obtaining noise reduction parameters, improve the efficiency and accuracy of scene recognition, reduce the calculation amount of scene recognition, reduce the power consumption of the headphones, and improve the user experience.

[0006] To achieve the above-mentioned purpose, a first aspect of the present invention provides a method for headphone noise reduction processing, which comprises:

[0007] Obtaining a first spectrum and a second spectrum according to an ambient audio signal of a scene currently located by the headset;

[0008] Based on the first spectrum and the preset first extraction mode, an amplitude feature matrix is ​​obtained;

[0009] Based on the second spectrum and the preset second extraction mode, a plurality of energy characteristic values ​​are obtained;

[0010] Obtaining a similarity coefficient between the amplitude feature matrix and a comparison matrix of a preset scene type;

[0011] Based on the similarity coefficient, a specific scene type is selected from the scene types;

[0012] Determine the target scene type based on the energy characteristic value, similarity coefficient and specific scene type;

[0013] Get the noise reduction parameters corresponding to the target scene type as the target noise reduction parameters.

[0014] In a preferred embodiment, the step of obtaining the amplitude characteristic matrix based on the first spectrum and the preset first extraction mode includes:

[0015] Obtaining a preset interception time width, a first interception frequency width and an initial matrix;

[0016] Based on the first spectrum, the interception time width and the first interception frequency width, a plurality of first target spectrums are obtained;

[0017] sequentially associating the first target spectrum with the elements of the initial matrix one by one;

[0018] respectively calculating the amplitude characteristic parameters of the first target spectrum;

[0019] According to the size of the amplitude characteristic parameter, the position of the corresponding element on the same preset target dimension in the initial matrix is ​​adjusted to obtain the amplitude characteristic matrix.

[0020] In a preferred embodiment, the step of obtaining a plurality of energy characteristic values ​​based on the second spectrum and the preset second extraction mode includes:

[0021] Obtaining a preset sensitive frequency range and a second interception bandwidth;

[0022] Based on the second spectrum, the sensitive frequency range and the second cut-off bandwidth, a plurality of second target spectrums are obtained;

[0023] The energy characteristic parameters of the second target spectrum are calculated respectively to obtain energy characteristic values.

[0024] In a preferred embodiment, the step of obtaining the similarity coefficient between the amplitude feature matrix and the comparison matrix of the preset scene type includes:

[0025] Get the comparison matrix of the preset scene types;

[0026] According to the cosine similarity formula, several initial similarity coefficients between the amplitude feature matrix and the comparison matrix on the preset target dimension are obtained;

[0027] The average value of the initial similarity coefficient is calculated to obtain the similarity coefficient between the amplitude feature matrix and the comparison matrix. In a preferred embodiment, based on the similarity coefficient, the step of selecting a specific scene type from the scene types includes:

[0028] According to the size of the similarity coefficient, a similarity coefficient that meets the preset requirements is obtained as the target similarity coefficient;

[0029] According to the target similarity coefficient, a specific scene type is filtered out from the scene types.

[0030] In a preferred embodiment, the step of obtaining a similarity coefficient that meets preset requirements as a target similarity coefficient according to the size of the similarity coefficient includes:

[0031] Get the maximum value among the similarity coefficients as the maximum similarity coefficient;

[0032] According to the maximum similarity coefficient, obtain the corresponding comparison value;

[0033] Determine one by one whether the similarity coefficient is less than the comparison value;

[0034] If not, the similarity coefficient is marked as the target similarity coefficient.

[0035] In a preferred embodiment, the step of determining the target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type includes:

[0036] Get the preset energy range for a specific scene type;

[0037] Determine in turn whether the energy characteristic value falls into the corresponding energy interval;

[0038] Obtaining the number of energy characteristic values ​​falling into the energy interval of each specific scene type;

[0039] Based on the number of falls and the similarity coefficient, the target scene type is determined from the specific scene types.

[0040] In a preferred embodiment, the step of determining the target scene type from the specific scene type based on the number of falls and the similarity coefficient includes:

[0041] Obtain the maximum number of numbers that fall into the numbers and the maximum similarity coefficient of similarity coefficients;

[0042] Determine whether the maximum number of falls and the maximum similarity coefficient correspond to the same specific scene type;

[0043] If so, mark the specific scene type as the target scene type;

[0044] If not, then based on the number of falls, the similarity coefficient and the preset weight coefficient, a reference value corresponding to the specific scene type is obtained;

[0045] A specific scene type corresponding to the maximum reference value among the reference values ​​is marked as a target scene type.

[0046] A second aspect of the present invention provides a headset, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned methods for headset noise reduction processing are implemented.

[0047] A third aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned headphone noise reduction processing methods are implemented.

[0048] The beneficial effects of the present invention are as follows: it utilizes the dual-spectrum and dual-extraction recognition and screening method to carry out hierarchical recognition and screening of scene types from different feature angles, utilizes the similarity coefficient of the amplitude feature matrix and the comparative amplitude feature matrix to preliminarily screen the scene types from the overall level, and then combines the energy eigenvalue and the similarity coefficient to perform a side-by-side re-screening of specific scene types from the local level of the sensitive frequency band to determine the target scene type, optimizes the method for obtaining headphone noise reduction parameters, improves the efficiency and accuracy of scene recognition, reduces the calculation amount of scene recognition, reduces the power consumption of headphones, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A first flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0050] Figure 2 A second flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0051] Figure 3 A third flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0052] Figure 4 A fourth flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0053] Figure 5 A fifth flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0054] Figure 6 A sixth flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0055] Figure 7 A seventh flow chart of the method for headphone noise reduction processing disclosed in an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the module structure of the earphone disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In the present invention, the terms "disposed", "provided with" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0058] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0059] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those skilled in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.

[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0061] With the rapid development of electronic technology, wireless headphones have become an indispensable item for people's daily travel. When faced with various relatively noisy environments, people usually choose to wear wireless headphones to reduce the impact of environmental noise. Different noise scenes have different requirements for the degree of noise reduction of headphones. Some existing wireless headphones use adaptive noise reduction to reduce environmental noise, but their scene recognition efficiency and accuracy are relatively low, the output noise reduction parameters cannot be well adapted to the current scene type, and the power consumption of the headphones is relatively high, which affects the user experience. The present invention provides a method for headphone noise reduction processing, headphones and a storage medium, which solve the technical problems of low scene recognition efficiency and accuracy of headphone noise reduction and excessive power consumption.

[0062] The following is the content of the first aspect of the present invention:

[0063] Please refer to Figure 1 In this embodiment, the method for headphone noise reduction processing includes:

[0064] S1. Obtain a first spectrum and a second spectrum according to an ambient audio signal of a scene in which the headset is currently located.

[0065] Among them, the ambient audio signal can be obtained by a collection microphone set on the headset. Specifically, the collection microphone on the headset can obtain the sound signal of the scene where the headset is located in real time, or can collect the sound signal of the scene where the headset is located within a preset period of time.

[0066] The first spectrum is the ambient audio spectrum obtained by short-time Fourier transform of the ambient audio signal. Specifically, after obtaining the ambient audio signal, the ambient audio signal is first framed and windowed, and then each frame of the windowed signal is Fourier transformed to obtain the amplitude and phase information of each frame of the signal in the frequency domain, and then the spectrum images of each frame are superimposed to obtain the ambient audio spectrum obtained after the short-time Fourier transform of the entire ambient audio signal.

[0067] The second spectrum is a Mel spectrum obtained by the ambient audio signal. Specifically, after obtaining the ambient audio signal, the ambient audio signal is first framed and windowed, and each frame after windowing is Fourier transformed, and the obtained spectrum is passed through a preset Mel filter group, the power spectrum is mapped to the Mel frequency, and then the logarithm is taken to obtain the logarithmic power spectrum, and then the discrete cosine transform is performed to obtain the Mel spectrum.

[0068] It can be understood that by acquiring the first spectrum and the second spectrum, different feature information of the ambient audio of the scene in which the headset is currently located can be focused on, and then different features can be extracted to improve the accuracy of the extracted features, thereby improving the efficiency and accuracy of subsequent scene recognition.

[0069] S2. Obtain an amplitude feature matrix based on the first spectrum and a preset first extraction mode.

[0070] The first extraction mode is an extraction logic method for extracting features set according to the characteristics of the first spectrum. The amplitude feature matrix is ​​a matrix obtained from the first spectrum based on the first extraction mode, which can, to a certain extent, represent the characteristics of the amplitude intensity changes of the ambient audio signal in each frequency band at the overall level.

[0071] After obtaining the first spectrum, the first spectrum can be intercepted based on the two dimensions of time and frequency to obtain the desired first target spectrum. Specifically, the first spectrum can be intercepted from the time dimension first and then from the frequency dimension to obtain the first target spectrum; or the first spectrum can be intercepted from the frequency dimension first and then from the time dimension to obtain the first target spectrum.

[0072] After obtaining the required first target spectrum, the amplitude parameters corresponding to each first target spectrum are calculated respectively. Specifically, the amplitude can be the maximum value of the amplitude in the corresponding first target spectrum, or the average value of the amplitude in the corresponding first target spectrum, or the variance of the amplitude in the corresponding first target spectrum. Preferably, the amplitude is the average value of the amplitude in the first target spectrum. It can be understood that the selection of the average value can better represent the overall situation of the amplitude in the first target spectrum, and can effectively reduce the interference of the mutation signal.

[0073] After obtaining the first target spectrum and the corresponding amplitude parameters, the amplitude characteristic matrix can be obtained by marking the first target spectrum with a serial number, and arranging the aforementioned serial numbers based on the arrangement of the positions of the first target spectrum in the first spectrum to obtain an initial matrix, and adjusting the positions of the elements under the same target dimension in the initial matrix according to the amplitude and the preset target dimension, thereby obtaining the amplitude characteristic matrix. For example, the first spectrum has the time dimension as the row (or horizontal axis) and the frequency dimension as the column (or vertical axis), and the serial numbers of the first target spectrum are arranged based on the arrangement of the time dimension and the frequency dimension of the first spectrum to obtain the initial matrix, then the column dimension of the initial matrix is ​​the target dimension, and the elements in the same column are sorted according to the amplitude corresponding to each serial number to obtain the amplitude characteristic matrix.

[0074] The method for obtaining the amplitude characteristic matrix can also be to pre-set an initial matrix, the number of elements in the initial matrix is ​​the same as the number of the first target spectrum, the position arrangement method of the elements in the initial matrix is ​​the same as the position arrangement method of the first target spectrum in the first spectrum, and the first target spectrum is sequentially associated with the elements in the preset initial matrix one-to-one, and then according to the amplitude corresponding to the first target spectrum, the arrangement position of the elements under the same target dimension in the initial matrix is ​​adjusted to obtain the amplitude characteristic matrix.

[0075] It can be understood that the amplitude feature matrix obtained by the first spectrum and the first weighting mode can relatively quickly and accurately extract the amplitude feature information in the first spectrum, which to a certain extent reflects the characteristics of the changes in the amplitude intensity of the ambient audio signal at the overall level, and prepares for the subsequent preliminary identification and screening of the scene type.

[0076] S3. Obtaining a plurality of energy characteristic values ​​based on the second spectrum and a preset second extraction mode.

[0077] The second extraction mode is an extraction logic method for extracting features set according to the characteristics of the second spectrum. The energy characteristic value is energy parameter information corresponding to the frequency band in the second spectrum, which can be used to represent the energy situation of the frequency band.

[0078] Since the human ear has different perception sensitivities to different frequencies, when extracting features from the second spectrum, the feature information of the frequency bands to which the human ear is highly sensitive can be extracted to reduce the amount of calculations required to extract features. Specifically, after obtaining the second spectrum, the frequency band to which the human ear is relatively sensitive can be intercepted, and then the intercepted spectrum can be intercepted again according to a preset bandwidth to obtain a number of second target spectra. It is also possible to first intercept with a preset bandwidth, and then obtain a spectrum in the frequency band to which the human ear is relatively sensitive to obtain a number of second target spectra.

[0079] After obtaining a number of second target spectra, the energy characteristic values ​​corresponding to the second target spectra are calculated respectively. The energy characteristic value can be the maximum energy value in the second target spectrum, or it can be the energy average value of the second target spectrum. Preferably, the energy characteristic value is the energy average value, which can better reflect the energy distribution of a specific frequency band of the second target spectrum.

[0080] It can be understood that the energy characteristic values ​​obtained through the second spectrum and the second extraction mode can relatively quickly and accurately extract the energy characteristic information in the second spectrum, and then more specifically reflect the energy distribution of the ambient audio signal in the frequency band that is relatively sensitive to the human ear, thereby preparing for the subsequent recognition and screening of scene types.

[0081] S4, obtaining a similarity coefficient between the amplitude feature matrix and a comparison matrix of a preset scene type;

[0082] S5. Based on the similarity coefficient, a specific scene type is filtered out from the scene types.

[0083] The comparison matrix is ​​a matrix extracted from the pre-trained scene types and can be used for matching and comparing with the amplitude feature matrix. The similarity coefficient is a reflection value of the similarity between the amplitude feature matrix and the comparison matrix. The specific scene type is a scene type in which the matching degree between the comparison matrix and the amplitude feature matrix meets the requirements.

[0084] The arrangement of elements in the amplitude feature matrix reflects, to a certain extent, the changes in amplitude intensity between frequency bands in the same time dimension. Therefore, the characteristics of the amplitude intensity changes of the ambient audio signal of the scene in which the headphones are currently located at the overall level can be determined. Furthermore, based on the similarity between the amplitude feature matrix and the comparison matrix, the degree of match between the current scene in which the headphones are located and the scene type can be determined.

[0085] After obtaining the amplitude feature matrix, the preset comparison matrix of each scene type can be obtained, and then the similarity coefficient between the amplitude feature matrix and the comparison matrix can be calculated item by item based on the calculation formula of the similarity coefficient. Specifically, the dimensional similarity coefficient values ​​between the amplitude feature matrix and the comparison matrix on the same preset target dimension can be calculated respectively, and then the similarity coefficient between the amplitude feature matrix and the comparison matrix can be obtained based on the dimensional similarity coefficient. The calculation formula of the similarity coefficient can be a cosine similarity calculation formula, or a Euclidean distance calculation formula, etc., which can be selected according to the actual design requirements. After obtaining the dimensional similarity coefficient, the average value of the similarity coefficient of each dimension can be calculated as the similarity coefficient between the amplitude feature matrix and the comparison matrix, or the similarity coefficient of each dimension can be weighted to obtain the similarity coefficient between the amplitude feature matrix and the comparison matrix, which can be selected according to the actual design requirements.

[0086] After obtaining the similarity coefficients of the amplitude feature matrix and each comparison matrix, the matching degree between the current scene of the headset and each preset scene type can be determined, and then the required specific scene type can be screened out from the preset scene types by whether the similarity coefficient meets the preset requirements. It is easy to understand that specific scene types can be screened out from the preset scene types based on the size of the similarity coefficient, and a preset number of specific scene types can be screened out from the preset scene types by obtaining the required number of similarity coefficients.

[0087] It can be understood that by obtaining the similarity coefficient between the amplitude feature matrix and the comparison matrix, the degree of matching between the current scene of the headset and the preset scene type can be obtained relatively quickly, and then the specific scene type can be preliminarily screened out from the scene types, which can effectively reduce the amount of calculation for scene recognition and comparison, improve the efficiency and accuracy of scene type recognition and screening, optimize the method of obtaining noise reduction parameters, and reduce the power consumption of the headset.

[0088] S6. Determine the target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type;

[0089] S7. Obtain a noise reduction parameter corresponding to the target scene type as a target noise reduction parameter.

[0090] The target scene type is the scene type that best matches the scene the headset is currently in. The target noise reduction parameter is a preset noise reduction parameter corresponding to the target scene type.

[0091] The energy eigenvalue indicates the energy situation in the corresponding frequency band. Several energy eigenvalues ​​can reflect the energy distribution of the corresponding frequency band. Combining the specific situation of the energy eigenvalue and the similarity coefficient, the target scene type can be determined from the specific scene type. After determining the target scene type, the noise reduction parameters corresponding to the target scene type can be obtained, thereby realizing the adaptive noise reduction function of the headphones.

[0092] Specifically, after obtaining the energy characteristic value, similarity coefficient and specific scene type, the energy interval corresponding to the preset frequency band of each specific scene type can be obtained, and then it can be determined whether the energy characteristic value is within the corresponding energy interval. After obtaining the situation where the energy characteristic value falls into the energy interval, the target scene type can be progressively screened from the specific scene type according to the falling situation of the energy characteristic value and the size of the similarity coefficient; the target scene type can also be screened out from the specific scene type by combining the falling situation of the energy characteristic value, the similarity coefficient and the preset weight coefficient; or the above two methods can be combined to screen out the target scene type from the specific scene type, and the selection can be made according to the actual design requirements.

[0093] It is easy to understand that by combining the energy eigenvalue and the similarity coefficient, it is possible to further focus on and screen specific scene types, thereby determining the required target scene type, improving the efficiency and accuracy of scene type recognition, optimizing the method of obtaining noise reduction parameters, reducing the amount of calculation for scene recognition, and reducing the power consumption of headphones.

[0094] It can be understood that the present application uses a dual-spectrum and dual-extraction recognition and screening method to carry out hierarchical recognition and screening of scene types from different feature angles, and uses the similarity coefficient of the amplitude feature matrix and the comparative amplitude feature matrix to preliminarily screen the scene types from an overall level. Then, combined with the energy eigenvalue and the similarity coefficient, a side-by-side re-screening of specific scene types is performed from the local level of the sensitive frequency band to determine the target scene type, thereby optimizing the method of obtaining headphone noise reduction parameters, improving the efficiency and accuracy of scene recognition, reducing the computational complexity of scene recognition, reducing the power consumption of headphones, and improving the user experience.

[0095] For further information, please refer to Figure 2 In one embodiment, step S2 of obtaining an amplitude feature matrix based on the first spectrum and a preset first extraction mode includes:

[0096] S21, obtaining a preset interception time width, a first interception frequency bandwidth and an initial matrix;

[0097] S22, obtaining a plurality of first target spectra based on the first spectrum, the interception time width and the first interception frequency width;

[0098] S23, sequentially associating the first target spectrum with the elements of the initial matrix in a one-to-one correspondence;

[0099] S24, respectively calculating the amplitude characteristic parameters of the first target spectrum;

[0100] S25. According to the magnitude of the amplitude characteristic parameter, the positions of the corresponding elements on the same preset target dimension in the initial matrix are adjusted to obtain the amplitude characteristic matrix.

[0101] Among them, the interception time width is the frame number interception unit for segmenting the first spectrum from the time dimension. The first interception bandwidth is the frequency interception unit for segmenting the first spectrum from the frequency dimension. The parameter sizes of the interception time width and the first interception bandwidth can be set according to the actual design requirements. The first target spectrum is the spectrum obtained after the first spectrum is intercepted in both time and frequency dimensions. The initial matrix is ​​a pre-set matrix that can be used to associate several first target spectra. The target dimension is a row dimension or a column dimension, and the type of the target dimension depends on the dimension where the time dimension in the first spectrum is located.

[0102] After obtaining the first spectrum, the corresponding first extraction mode is triggered to obtain the preset interception time width, the first interception frequency bandwidth and the initial matrix. According to the interception time width and the first interception frequency bandwidth, the first spectrum is processed from the time dimension and the frequency dimension to obtain a number of first target spectra. Specifically, the first spectrum can be processed using the interception time width to obtain a number of first time spectra, and then the first interception frequency bandwidth can be used to process the first time spectra respectively to obtain a number of first target spectra. The first spectrum can also be processed using the first interception frequency bandwidth to obtain a number of first sub-spectra, and then the interception time width can be used to process the first sub-spectra respectively to obtain a number of first target spectra.

[0103] After obtaining a number of first target spectra, the first target spectra are sequentially associated with the elements of the initial matrix one-to-one according to the position arrangement of the first target spectra in the first spectrum. That is, after intercepting the time dimension and the frequency dimension, the arrangement of the first target spectra in the first spectrum can be regarded as a specific matrix, and the specific matrix can be associated one-to-one with the elements in the same position in the initial matrix. For example, in the first spectrum, the first target spectra in the first column are A1, A2, and A3, the first target spectra in the second column are B1, B2, and B3, and the first target spectra in the third column are C1, C2, and C3, while in the initial matrix, the elements in the first column are X1, X2, and X3, the elements in the second column are Y1, Y2, and Y3, and the elements in the third column are Z1, Z2, and Z3, then A1, A2, and A3 can be associated one-to-one with X1, X2, and X3, B1, B2, and B3 can be associated one-to-one with Y1, Y2, and Y3, and C1, C2, and C3 can be associated one-to-one with Z1, Z2, and Z3.

[0104] Calculate the amplitude characteristic parameters of the first target spectrum respectively. The amplitude characteristic parameters can be the average amplitude of the first target spectrum, the maximum amplitude of the first target spectrum, or the amplitude variance of the first target spectrum, which can be selected according to the actual design requirements. After calculating the amplitude characteristic parameters of each first target spectrum, adjust the position of the corresponding elements on the same preset target dimension in the initial matrix according to the size of the amplitude characteristic parameters. Specifically, if the time dimension is the row dimension in the first spectrum, the target dimension is the column dimension; if the time dimension is the column dimension in the first spectrum, the target dimension is the row dimension. After adjusting the position of the elements in the initial matrix, the amplitude characteristic matrix can be obtained.

[0105] It can be understood that by adjusting the position of the elements in the initial matrix according to the size of the amplitude characteristic parameters of the first target spectrum to obtain the amplitude characteristic matrix, the characteristics of the amplitude intensity changes in different frequency bands of the ambient audio signal under the same time dimension can be relatively clearly reflected, thereby reflecting the characteristics of the amplitude intensity changes on the overall level, thereby improving the efficiency of feature information extraction and the efficiency of subsequent scene recognition and screening.

[0106] For further information, please refer to Figure 3 In one embodiment, step S3 of obtaining a plurality of energy characteristic values ​​based on the second spectrum and the preset second extraction mode includes:

[0107] S31, obtaining a preset sensitive frequency range and a second interception bandwidth;

[0108] S32, obtaining a plurality of second target spectra based on the second spectrum, the sensitive frequency range and the second interception bandwidth;

[0109] S33. Calculate energy characteristic parameters of the second target spectrum respectively to obtain energy characteristic values.

[0110] Among them, the sensitive frequency range is a specific frequency range for feature extraction pre-set according to the auditory characteristics of the human ear. Preferably, the sensitive frequency range is 1000Hz to 4000Hz. The second interception bandwidth is the interception unit for intercepting the spectrum within the sensitive frequency range from the frequency dimension. The second target spectrum is the spectrum obtained after the second spectrum is intercepted twice. The energy characteristic parameter is the energy characteristic information extracted from the second target spectrum.

[0111] After obtaining the second spectrum, the corresponding second extraction mode is triggered to obtain the preset sensitive frequency range and the second interception bandwidth, and then the second spectrum is intercepted according to the sensitive frequency range and the second interception bandwidth. Specifically, the second spectrum can be processed according to the sensitive frequency range to obtain the sensitive spectrum, and then the sensitive spectrum can be processed using the second interception bandwidth to obtain several second target spectra. It can also be that the second spectrum is first processed according to the second interception bandwidth to obtain several second sub-spectra, and then the second sub-spectra within the sensitive frequency range are obtained from the several second sub-spectra as the second target spectrum. It is easy to understand that since the human ear has different perceptual sensitivities to different frequencies, based on the difference in frequency sensitivity, the spectrum of the frequency range to which the human ear is relatively sensitive is obtained from the second spectrum as the second target spectrum, which can obtain a feature extraction range that is more in line with the auditory characteristics of the human ear and has a more obvious impact on the noise reduction effect, reducing the amount of required feature extraction, improving the efficiency of subsequent feature extraction, and at the same time reducing the calculation of subsequent scene recognition, improving the efficiency and accuracy of scene recognition.

[0112] After obtaining a number of second target spectra, the energy characteristic parameters in the second target spectrum are extracted, and then the energy characteristic value is calculated. The energy characteristic value can be the energy average value in the second target spectrum, or the energy maximum value in the second target spectrum, or the energy variance value in the second target spectrum, which can be selected according to actual design requirements. Preferably, the energy characteristic value is the energy average value in the second target spectrum. It is easy to understand that the energy characteristic value is the energy average value in the second target spectrum, which can better reflect the overall energy situation of the second target spectrum and effectively reduce the impact of energy mutation.

[0113] It can be understood that by setting the sensitive frequency range and the second cutoff bandwidth, a second target spectrum that is more in line with the auditory characteristics of the human ear can be obtained, and then an energy eigenvalue that is more in line with the auditory characteristics of the human ear and has a more obvious impact on the noise reduction effect can be obtained, thereby reducing the amount of computational cost of feature extraction, improving the efficiency and accuracy of feature extraction, and thus improving the efficiency and accuracy of subsequent scene recognition.

[0114] For further information, please refer to Figure 4 In a preferred embodiment, step S4 of obtaining the similarity coefficient between the amplitude feature matrix and the comparison matrix of the preset scene type includes:

[0115] S41, obtaining a comparison matrix of preset scene types;

[0116] S42, according to the cosine similarity formula, obtaining a number of initial similarity coefficients between the amplitude feature matrix and the comparison matrix in a preset target dimension;

[0117] S43. Calculate the average value of the initial similarity coefficients to obtain the similarity coefficients between the amplitude feature matrix and the comparison matrix.

[0118] Among them, the target dimension is a row dimension or a column dimension, and the type of the target dimension depends on the dimension where the time dimension in the first spectrum is located. Specifically, if the time dimension in the first spectrum is a row dimension, the target dimension is a column dimension; if the time dimension in the first spectrum is a column dimension, the target dimension is a row dimension.

[0119] After obtaining the amplitude feature matrix, the comparison matrix of the preset scene type can be obtained, and the similarity coefficients between the amplitude feature matrix and each comparison matrix can be calculated respectively. Take the time dimension as the row dimension in the first spectrum and the target dimension as the column dimension as an example for explanation. Specifically, according to the cosine similarity formula, the initial similarity coefficients between the amplitude feature matrix and the comparison matrix in the column dimension are calculated respectively, that is, the similarity degree of the corresponding column vectors between the amplitude feature matrix and the comparison matrix is ​​calculated. After obtaining the initial similarity coefficients of each column vector, the average value of the initial similarity coefficients is calculated respectively, and the similarity coefficients between the amplitude feature matrix and the comparison matrix can be obtained. Then, according to the same calculation method, the similarity coefficients between the amplitude feature matrix and each comparison matrix can be obtained in turn.

[0120] It can be understood that by calculating the initial similarity coefficients between the amplitude feature matrix and the comparison matrix, and then using the average value of the initial similarity coefficients as the similarity coefficients between the amplitude feature matrix and the comparison matrix, the similarity between the amplitude feature matrix and the comparison matrix can be relatively better reflected, thereby improving the efficiency and accuracy of the subsequent preliminary screening of scene recognition.

[0121] Furthermore, in one embodiment, the step S5 of selecting a specific scene type from the scene types based on the similarity coefficient includes:

[0122] S51. According to the size of the similarity coefficient, a similarity coefficient that meets the preset requirements is obtained as a target similarity coefficient;

[0123] S52. Filter out a specific scene type from the scene types according to the target similarity coefficient.

[0124] After calculating the similarity coefficients between the amplitude feature matrix and the comparison matrix, the target similarity coefficient is obtained according to the size of the similarity coefficient, and then a specific scene type is screened out from the scene types. Specifically, the target similarity coefficient can be obtained by comparing the obtained similarity coefficient with a preset comparison value, and then screening out a target similarity coefficient that meets the requirements; or a preset number of similarity coefficients can be obtained from the obtained similarity coefficients in order of size starting from the largest similarity coefficient as the target similarity coefficient; or the corresponding comparison value for similarity coefficient screening can be obtained according to the largest similarity coefficient in the similarity coefficients, and then the similarity coefficient is compared with the comparison value item by item to obtain the target similarity coefficient. The method of obtaining a similarity coefficient that meets the target can be selected according to the actual design requirements.

[0125] It can be understood that by screening the similarity coefficients, it is possible to determine the degree of match between the scene in which the headphones are located and the preset scene type, and then the required specific scene type can be screened out from the scene type, thereby achieving a preliminary screening of scene types at the overall level, thereby improving the efficiency and accuracy of the preliminary screening of scene types.

[0126] For further information, please refer to Figure 5 In a preferred embodiment, according to the size of the similarity coefficient, the step S51 of obtaining a similarity coefficient that meets the preset requirements as the target similarity coefficient includes:

[0127] S511, obtaining the maximum value among the similarity coefficients as the maximum similarity coefficient;

[0128] S512, obtaining a corresponding comparison value according to the maximum similarity coefficient;

[0129] S513, determining whether the similarity coefficient is less than the comparison value one by one;

[0130] S514: If not, mark the similarity coefficient as the target similarity coefficient.

[0131] Among them, the comparison value is used to compare with the similarity coefficient to screen out the parameters of the target similarity coefficient that meets the requirements.

[0132] Specifically, after obtaining the similarity coefficients, the similarity coefficients can be compared with each other to determine the maximum value among the similarity coefficients, and then the maximum similarity coefficient is obtained. After obtaining the maximum similarity coefficient, the maximum similarity coefficient is compared with a plurality of preset comparison intervals, each comparison interval is preset with a corresponding comparison value, and the larger the endpoint value of the comparison interval, the larger the corresponding comparison value. After determining the comparison interval in which the maximum similarity coefficient falls, the comparison value corresponding to the comparison interval can be obtained, and then the similarity coefficient is compared with the obtained comparison value, and then the target similarity coefficient that meets the requirements can be determined.

[0133] It is easy to understand that when the value of the maximum similarity coefficient is relatively large, the value of the comparison value obtained is also relatively large, which can reduce the number of target similarity coefficients obtained subsequently to a certain extent, thereby reducing the number of specific scene types and improving the efficiency of subsequent scene recognition. When the value of the maximum similarity coefficient is relatively small, the value of the comparison value obtained is also relatively small, thereby increasing the target similarity coefficients obtained to a certain extent, thereby increasing the number of specific scene types and improving the accuracy of subsequent scene recognition.

[0134] It can be understood that by obtaining the corresponding comparison value based on the maximum similarity coefficient, it is possible to dynamically adjust the number of target similarity coefficients obtained, and then control the number of specific scene types obtained subsequently according to the numerical value of the maximum similarity coefficient, so as to improve the efficiency and accuracy of subsequent scene type recognition to a certain extent.

[0135] For further information, please refer to Figure 6 In one embodiment, step S6 of determining the target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type includes:

[0136] S61, obtaining a preset energy range for a specific scene type;

[0137] S62, determining in sequence whether the energy characteristic values ​​fall into the corresponding energy interval;

[0138] S63, obtaining the number of energy characteristic values ​​falling into the energy interval of each specific scene type;

[0139] S64: Determine a target scene type from the specific scene types based on the number of falls and the similarity coefficient.

[0140] The energy interval is the energy fluctuation interval of the corresponding frequency band in the scene type, which represents the acceptable range of energy fluctuation of the scene type in the corresponding frequency band. The falling number is the number of energy characteristic values ​​falling into the corresponding energy interval.

[0141] Each scene type has a preset energy range for comparison. After obtaining a number of energy characteristic values ​​and specific scene types, the energy range corresponding to the specific scene type can be obtained. The obtained energy characteristic values ​​are then compared item by item with the energy range corresponding to each specific scene type, and the number of energy characteristic values ​​that fall into the corresponding energy range is obtained.

[0142] Since the energy characteristic value is extracted based on a specific frequency band to which the human ear is relatively sensitive, there may be a situation where similar scene types have the same number of falls. Therefore, the number of falls and the similarity coefficient can be combined to determine the target scene type from the specific scene type. Specifically, the target scene type can be determined by weighting the number of falls and the similarity coefficient, and then determining the target scene type from the specific scene type; or the number of falls and the similarity coefficient can be used for conditional screening to determine the target scene type from the specific scene type; or the above two methods can be combined to determine the target scene type from the specific scene type.

[0143] It can be understood that by obtaining the number of energy characteristic values ​​that fall into the energy interval of a specific scene type, the degree of match between the current scene of the headset and the specific scene type in the sensitive frequency band can be obtained relatively quickly. Combined with the number of falls and the similarity coefficient, the specific scene type can be re-screened from the local and overall levels to obtain the target scene type, thereby optimizing the method of obtaining the target scene type and improving the efficiency and accuracy of scene type re-screening.

[0144] Please refer to Figure 7 In a preferred embodiment, the step S64 of determining the target scene type from the specific scene types based on the number of falls and the similarity coefficient includes:

[0145] S641, obtaining the maximum number of falling-in numbers and the maximum similarity coefficient among the similarity coefficients;

[0146] S642, determining whether the maximum number of falls and the maximum similarity coefficient correspond to the same specific scene type;

[0147] S643: If yes, mark the specific scene type as the target scene type;

[0148] S644: If not, obtaining a reference value corresponding to the specific scene type based on the number of falls, the similarity coefficient and the preset weight coefficient;

[0149] S645: Mark the specific scene type corresponding to the maximum reference value among the reference values ​​as the target scene type.

[0150] Among them, the reference value is the adaptation degree value between the specific scene type and the current scene type of the headset calculated based on the weight coefficient according to the number of falls and the similarity coefficient, which can be used to filter out the target scene type from the specific scene type.

[0151] After obtaining the number of falls and the similarity coefficient, the numbers of falls are compared with each other to obtain the maximum number of falls, and the similarity coefficients are compared with each other to obtain the maximum similarity coefficient. After obtaining the maximum number of falls and the maximum similarity coefficient, the specific scene type corresponding to the maximum number of falls and the specific scene type corresponding to the maximum similarity coefficient can be obtained, and then it is determined whether the maximum number of falls and the maximum similarity coefficient correspond to the same specific scene type.

[0152] If the maximum number of falls and the maximum similarity coefficient both correspond to the same specific scene type, the specific scene type is marked as the target scene type. It is easy to understand that when the maximum number of falls and the maximum similarity coefficient both correspond to the same specific scene type, it means that the matching degree of the specific scene type at the local level and the overall level is the highest, so the specific scene type can be marked as the target scene type.

[0153] If the maximum number of falls and the maximum similarity coefficient do not correspond to the same specific scene type, it is necessary to determine the reference value of the specific scene type based on the weight coefficient, the number of falls and the similarity coefficient. Specifically, the weight coefficient can be obtained by directly obtaining a preset weight coefficient, or by combining the maximum number of falls and the maximum similarity coefficient to obtain the corresponding weight coefficient. Preferably, the corresponding weight coefficient is obtained by combining the maximum number of falls and the maximum similarity coefficient to ensure the accuracy of the reference value obtained.

[0154] In a preferred embodiment, three groups of weight coefficients are pre-set. The weight coefficients of the corresponding groups can be obtained according to the maximum number of falls and the maximum similarity coefficient. The weight coefficients of each group include a weight coefficient X of the number of falls and a weight coefficient Y of the similarity coefficient. The specific values ​​of X and Y can be set according to the actual design requirements.

[0155] The maximum number of falls and the maximum similarity coefficient are compared with the preset corresponding judgment values, and the weight coefficient of the corresponding group is determined based on the comparison results. Specifically, if the maximum number of falls and the maximum similarity coefficient are both greater than or less than or equal to the preset judgment value, then X and Y are equal. If the maximum number of falls is greater than or equal to the corresponding judgment value, and the maximum similarity coefficient is less than the corresponding judgment value, then X>Y. If the maximum number of falls is less than the corresponding judgment value, and the maximum similarity coefficient is greater than the corresponding judgment value, then X<Y.

[0156] After determining the corresponding weight coefficient, the reference value corresponding to the specific scene type can be calculated according to the number of falls, the similarity coefficient and the weight coefficient. After obtaining the reference value of the specific scene type, the maximum reference value is selected from the reference values, and the specific scene type corresponding to the maximum reference value is marked as the target scene type.

[0157] It can be understood that the method of first screening based on the correspondence between the maximum number of falls and the maximum similarity coefficient, and then screening according to the specific circumstances of the reference value, can relatively well re-screen the specific scene type from the local level and the overall level, and then obtain the target scene type, thereby optimizing the method of obtaining the target scene type and improving the efficiency and accuracy of scene type re-screening.

[0158] To summarize, the present application utilizes a dual-spectrum and dual-extraction recognition and screening method to perform a hierarchical recognition and screening of scene types from different feature angles, and utilizes the similarity coefficient of the amplitude feature matrix and the comparative amplitude feature matrix to perform a preliminary screening of scene types from an overall level. Then, combined with the energy eigenvalue and the similarity coefficient, a side-by-side screening of specific scene types is performed from a local level of the sensitive frequency band to determine the target scene type, thereby optimizing the method of acquiring headphone noise reduction parameters, improving the efficiency and accuracy of scene recognition, reducing the computational complexity of scene recognition, reducing the power consumption of headphones, and improving the user experience.

[0159] The following is the content of the second aspect of the present invention:

[0160] The present invention provides an earphone, such as Figure 8 As shown, the headset includes a memory 10, a processor 20, and a method program instruction 30 for headset noise reduction processing stored in the memory 10 and executable on the processor 20. When the method program instruction 30 for headset noise reduction processing is executed by the processor 20, the aforementioned method for headset noise reduction processing is implemented.

[0161] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is generally used to control the overall operation of the headset. In this embodiment, the processor is used to run program codes stored in a readable storage medium or process data.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of various embodiments of the present invention.

[0163] The following is the content of the third aspect of the present invention:

[0164] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned headphone noise reduction processing method are implemented.

[0165] The above is only a specific implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for headphone noise reduction processing, characterized in that: include: Obtaining a first spectrum and a second spectrum according to an ambient audio signal of a scene currently located by the headset; Based on the first spectrum and a preset first extraction mode, an amplitude feature matrix is ​​obtained; Based on the second spectrum and a preset second extraction mode, a plurality of energy characteristic values ​​are obtained; Obtaining a similarity coefficient between the amplitude feature matrix and a comparison matrix of a preset scene type; Based on the similarity coefficient, selecting a specific scene type from the scene types; Determining a target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type; A noise reduction parameter corresponding to the target scene type is obtained as a target noise reduction parameter.

2. The method for headphone noise reduction processing according to claim 1, characterized in that: The step of obtaining an amplitude characteristic matrix based on the first spectrum and a preset first extraction mode comprises: Obtaining a preset interception time width, a first interception frequency width and an initial matrix; Based on the first spectrum, the interception time width and the first interception frequency width, a plurality of first target spectrums are obtained; Associating the first target spectrum with the elements of the initial matrix in a one-to-one correspondence in sequence; respectively calculating the amplitude characteristic parameters of the first target spectrum; According to the magnitude of the amplitude characteristic parameter, the position of the corresponding element on the same preset target dimension in the initial matrix is ​​adjusted to obtain the amplitude characteristic matrix.

3. The method for headphone noise reduction processing according to claim 1, characterized in that: The step of obtaining a plurality of energy characteristic values ​​based on the second spectrum and the preset second extraction mode comprises: Obtaining a preset sensitive frequency range and a second interception bandwidth; Based on the second spectrum, the sensitive frequency range and the second cut-off bandwidth, a plurality of second target spectrums are obtained; The energy characteristic parameters of the second target spectrum are calculated respectively to obtain energy characteristic values.

4. The method for headphone noise reduction processing according to claim 1, characterized in that: The step of obtaining the similarity coefficient between the amplitude feature matrix and the comparison matrix of the preset scene type includes: Get the comparison matrix of the preset scene types; According to the cosine similarity formula, a number of initial similarity coefficients between the amplitude feature matrix and the comparison matrix on a preset target dimension are obtained; The average value of the initial similarity coefficients is calculated to obtain the similarity coefficients between the amplitude feature matrix and the comparison matrix.

5. The method for headphone noise reduction processing according to claim 1, characterized in that: The step of filtering out a specific scene type from the scene types based on the similarity coefficient comprises: According to the size of the similarity coefficient, a similarity coefficient that meets the preset requirements is obtained as a target similarity coefficient; According to the target similarity coefficient, a specific scene type is screened out from the scene types.

6. The method for headphone noise reduction processing according to claim 5, characterized in that: The step of obtaining a similarity coefficient that meets preset requirements as a target similarity coefficient according to the size of the similarity coefficient includes: Obtaining the maximum value among the similarity coefficients as the maximum similarity coefficient; According to the maximum similarity coefficient, obtaining a corresponding comparison value; Determining one by one whether the similarity coefficient is less than the comparison value; If not, the similarity coefficient is marked as the target similarity coefficient.

7. The method for headphone noise reduction according to claim 1, characterized in that: The step of determining the target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type comprises: Obtaining a preset energy range for the specific scene type; Determining in turn whether the energy characteristic values ​​fall into corresponding energy intervals; Obtaining the number of energy intervals in which the energy characteristic value falls into each specific scene type; Based on the falling quantity and the similarity coefficient, a target scene type is determined from the specific scene types.

8. The method for headphone noise reduction according to claim 7, characterized in that: The step of determining the target scene type from the specific scene type based on the falling number and the similarity coefficient includes: Obtaining a maximum number of the numbers ... Determining whether the maximum number of falls and the maximum similarity coefficient correspond to the same specific scene type; If yes, marking the specific scene type as the target scene type; If not, obtaining a reference value corresponding to the specific scene type based on the number of falls, the similarity coefficient and the preset weight coefficient; The specific scene type corresponding to the maximum reference value among the reference values ​​is marked as the target scene type.

9. A headset comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the headphone noise reduction processing method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the headphone noise reduction processing method according to any one of claims 1 to 8 are implemented.