Adaptive active noise reduction method, earphone and storage medium

By detecting the headphone position information and ambient audio spectrum, and determining the target scene type to obtain noise reduction parameters, the existing adaptive noise reduction methods are solved, and the accuracy of noise recognition and user experience are improved.

CN119172683APending Publication Date: 2024-12-20JIANGXI RUISHENG ELECTRONIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411159055.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing adaptive noise reduction methods are low in efficiency and accuracy when identifying noise scenarios, and have high power consumption, which affects the user experience.

Method used

By detecting the headphone position information, combining the first environmental audio spectrum and the second environmental audio spectrum, the target scene type is determined, thereby obtaining the target noise reduction parameters, optimizing the acquisition method of noise reduction parameters, improving identification efficiency and accuracy, and reducing power consumption.

Benefits of technology

The recognition mode of adaptive noise reduction is improved, the acquisition efficiency and accuracy of noise reduction parameters are improved, the power consumption of the headphones is reduced, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172683A_ABST
    Figure CN119172683A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive active noise reduction method, an earphone and a storage medium. The method comprises the following steps: detecting whether current position information of the earphone can be obtained or not; if yes, obtaining current position information of the earphone and a first environment audio frequency spectrum; determining a judgment scene type from preset scene types according to the position information; determining a target scene type based on the first environment audio frequency spectrum and the judgment scene type; if not, acquiring a first environment audio frequency spectrum and a second environment audio frequency spectrum; determining a target scene type according to the first environment audio frequency spectrum and the second environment audio frequency spectrum; and obtaining a noise reduction parameter corresponding to the target scene type as a target noise reduction parameter. According to the method, the mode of obtaining the target noise reduction parameter based on different parameter information is divided, the obtaining mode of the target noise reduction parameter is optimized, the single recognition mode of adaptive noise reduction is improved, the efficiency and accuracy of obtaining the noise reduction parameter are improved, 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 method for adaptive active noise reduction, 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 an adaptive active noise reduction method, earphones and storage medium to solve the above problems. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a method, headphones and storage medium for adaptive active noise reduction, which aims to solve the technical problems that the recognition and analysis method of headphone adaptive noise reduction is single, the scene recognition efficiency and accuracy are low, and the power consumption is too high.

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

[0007] Check whether the current location information of the headset can be obtained;

[0008] If yes, obtaining the current position information of the headset and the first ambient audio spectrum;

[0009] Determine the scene type from preset scene types according to the location information;

[0010] Determining a target scene type based on the first ambient audio spectrum and the determined scene type;

[0011] If not, obtaining the first ambient audio spectrum and the second ambient audio spectrum;

[0012] Determining a target scene type according to the first ambient audio spectrum and the second ambient audio spectrum;

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

[0014] In a preferred embodiment, the determination scene type includes an initial scene type and an associated scene type, and the step of determining the determination scene type from preset scene types according to the location information includes:

[0015] Obtain key location information from the location information;

[0016] Obtaining the adaptation value of key location information and preset scene type;

[0017] Based on the adaptation value, determining an initial scene type from preset scene types;

[0018] Get the associated values ​​of the initial scene type and the remaining scene types;

[0019] Based on the association value and a preset first threshold, an associated scene type is obtained from the remaining scene types.

[0020] In a preferred embodiment, the step of obtaining the associated scene type from the remaining scene types based on the associated value and the preset first threshold comprises:

[0021] Get the maximum value among the adaptation values ​​as the maximum adaptation value;

[0022] Obtaining a preset adaptation value interval in which the maximum adaptation value falls, and using it as a target adaptation value interval;

[0023] Obtaining a preset first threshold corresponding to the target adaptation value interval;

[0024] Determining whether the correlation value is less than a first threshold;

[0025] If not, the scene type corresponding to the associated value is marked as the associated scene type.

[0026] In a preferred embodiment, the step of determining the target scene type based on the first ambient audio spectrum and the determined scene type includes:

[0027] Obtaining a plurality of energy characteristic values ​​according to the first ambient audio spectrum and a preset first extraction mode;

[0028] Obtaining a preset energy range for determining a scene type;

[0029] Obtain the number of energy characteristic values ​​falling into the energy interval;

[0030] Based on the number of falls, a target scene type is determined from the determined scene types.

[0031] In a preferred embodiment, the step of determining the target scene type according to the first ambient audio spectrum and the second ambient audio spectrum includes:

[0032] Based on the first ambient audio spectrum and the preset first extraction mode, a plurality of energy characteristic values ​​are obtained;

[0033] Based on the second ambient audio spectrum and the preset second extraction mode, an amplitude feature matrix is ​​obtained;

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

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

[0036] The target scene type is determined based on the energy eigenvalue, similarity coefficient and specific scene type.

[0037] In a preferred embodiment, the step of obtaining the amplitude feature matrix based on the second ambient audio spectrum and the preset second extraction mode includes:

[0038] Obtaining a preset interception time width, a second interception frequency width and an initial matrix;

[0039] Based on the second ambient audio spectrum, the interception time width and the second interception frequency bandwidth, a plurality of second target spectra are obtained;

[0040] sequentially associating the second target spectrum with the elements of the initial matrix in a one-to-one correspondence;

[0041] respectively calculating the amplitude characteristic parameters of the second target spectrum;

[0042] 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.

[0043] 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:

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

[0045] 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;

[0046] The average value of the initial similarity coefficients is calculated to obtain the similarity coefficients between the amplitude feature matrix and the comparison matrix.

[0047] 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:

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

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

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

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

[0052] 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 of adaptive active noise reduction are implemented.

[0053] 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 of the above-mentioned methods for adaptive active noise reduction are implemented.

[0054] The beneficial effects of the present invention are as follows: it divides the modes of obtaining target noise reduction parameters based on different parameter information by obtaining the current position information of the earphone; when the current position information of the earphone can be obtained, the position information is combined with the first ambient audio spectrum to filter out the target scene type in a manner of combining multi-source information, and then obtain the target noise reduction parameters; when the current position information of the earphone cannot be obtained, the first ambient audio spectrum and the second ambient audio spectrum are used to filter out the target scene type in a dual-spectrum manner, and then obtain the target noise reduction parameters, thereby optimizing the method of obtaining the target noise reduction parameters, improving the single recognition mode of adaptive noise reduction, improving the efficiency and accuracy of obtaining the noise reduction parameters, reducing the power consumption of the earphone, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A first flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

[0056] Figure 2 A second flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

[0057] Figure 3 A third flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

[0058] Figure 4 A fourth flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

[0059] Figure 5 A fifth flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

[0060] Figure 6A sixth flow chart of the method for adaptive active noise reduction disclosed in an embodiment of the present invention;

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

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

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

[0067] Please refer to Figure 1 In this embodiment, the steps of the method for adaptive active noise reduction include:

[0068] S1. Detect whether the current location information of the headset can be obtained.

[0069] Among them, the earphones mentioned in this embodiment are earphones with active noise reduction function. The earphones can be wireless earphones or wired earphones. They include a processor and an audio output unit. The processor can generate an audio signal with a phase opposite to the ambient noise through the acquired noise reduction parameters, thereby offsetting the external ambient noise.

[0070] The location information of the headset can be location information with the headset as the positioning center, or it can be location information of the positioning center of a terminal device connected to the headset. Accordingly, the location information of the headset can be obtained directly or indirectly. Specifically, a positioning module can be set inside the headset, and the location information of the current headset can be directly obtained through the positioning module; it can also be indirectly obtained through a terminal device (such as a mobile phone, smart watch, etc.) with a positioning module set inside, and the location information of the terminal device is approximately equivalent to the location information of the headset. In the daily use of the headset, the headset is mostly connected to a terminal device for use. Preferably, the location information of the terminal device can be used to indirectly obtain the location information of the headset.

[0071] Specifically, by detecting the output of the positioning module inside the headset or the output of the terminal to which the headset is connected, the acquisition status of the current location information of the headset can be determined, thereby preparing for the subsequent selection of the acquisition mode of the target scene type.

[0072] S2. If the current position information of the headset can be obtained through the detection, the current position information of the headset and the first ambient audio spectrum are obtained;

[0073] S3. Determine a judgment scene type from preset scene types according to the location information;

[0074] S4. Determine a target scene type based on the first ambient audio spectrum and the determined scene type.

[0075] Among them, the first ambient audio spectrum is a spectrum diagram obtained by processing and transforming the ambient audio signal, which can be used to reflect the sound characteristics of the scene where the headset is currently located. The ambient audio signal can be obtained in real time through the acquisition microphone set on the headset, or it can be periodically acquired through the acquisition microphone set on the headset. Specifically, the first ambient audio spectrum can be a spectrum obtained by short-time Fourier transform of the ambient audio signal, or it can be a Mel spectrum obtained by converting the ambient audio signal. Preferably, the first ambient audio spectrum is a Mel spectrum. It can be understood that the Mel spectrum can better reflect the characteristic information of the ambient audio signal in the frequency band sensitive to the human ear, and then can better combine the location information to screen the preset scene type.

[0076] The determined scene type is a scene type preliminarily screened from the preset scene types and having a matching degree with the location information that meets the requirements, and is used for further scene type screening in combination with the first ambient audio spectrum. The target scene type is a scene type that matches the scene currently in which the headset is located.

[0077] After determining that the current position information of the earphone can be obtained, the current position information of the earphone is obtained, and the collected ambient audio signal of the scene where the earphone is currently located is converted into a first ambient audio spectrum. After obtaining the position information and the first ambient audio spectrum, the judgment scene type can be determined from the preset scene types based on the position information. Specifically, the required key parameter information can be extracted from the position information, and then based on the degree of matching between the key parameter information and the scene type, the required judgment scene type can be determined. The judgment scene type can be a scene type that only matches the key parameter information in the position information, or it can include an initial scene type that matches the key parameter information in the position information and an associated scene type associated with the initial scene type. It can be selected according to actual design requirements.

[0078] After determining the judgment scene type, audio features are extracted from the first ambient audio spectrum, and the audio features include but are not limited to energy features, frequency features, etc., which can be selected according to actual design requirements. After obtaining the audio features extracted from the first ambient audio spectrum, the audio features are compared with the comparison features preset in the judgment scene type to determine the target scene type, and then obtain the target noise reduction parameters corresponding to the target scene type.

[0079] It can be understood that by utilizing the current position information of the headset to determine the scene type, the scene types can be preliminarily screened relatively quickly, reducing the number of scene types that need to be identified. Combined with the audio feature information in the first ambient audio spectrum, the determined scene type can be further re-screened with more focus to obtain the target scene type, thereby optimizing the method of obtaining the target noise reduction parameters, reducing the amount of calculation for scene recognition, and improving the efficiency and accuracy of adaptive noise reduction. This reduces the power consumption of the headset to a certain extent, thereby improving the user experience.

[0080] S5. If the current position information of the earphone is not obtained, obtaining the first ambient audio spectrum and the second ambient audio spectrum;

[0081] S6. Determine a target scene type according to the first ambient audio spectrum and the second ambient audio spectrum;

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

[0083] The second ambient audio spectrum is a spectrum obtained by processing and transforming the ambient audio signal and can be used to reflect the sound characteristics of the scene the headset is currently in, and the type of the second ambient audio spectrum is different from the type of the first ambient audio. Specifically, the second ambient audio spectrum can be a spectrum obtained by short-time Fourier transform, or a Mel spectrum, etc.

[0084] After determining that the current position information of the headset has not been obtained, the collected ambient audio signal is converted into a first ambient audio spectrum and a second ambient audio spectrum, and then the required audio feature information is extracted from the first ambient audio spectrum and the second ambient audio spectrum respectively. It is easy to understand that the spectrum types of the first ambient audio spectrum and the second ambient audio spectrum are different, that is, the first ambient audio spectrum and the second ambient audio spectrum also have a difference in the emphasis of audio feature representation. Selecting different types of spectra can focus on the feature information of the ambient audio of the current scene of the headset at different levels, and then different audio features can be extracted to improve the accuracy of the extracted features, thereby improving the efficiency and accuracy of subsequent scene recognition.

[0085] Specifically, when extracting audio features from the first ambient audio spectrum and the second ambient audio spectrum, the feature extraction method can be to extract different audio feature information from the same level, or to extract different audio feature information from different levels, which can be selected according to the type of spectrum in the actual design. Preferably, the audio features can be extracted from the overall level and the local level. It is easy to understand that by combining the overall level and the local level, while ensuring the accuracy of scene type screening, the amount of audio features extracted can be effectively reduced, thereby improving the efficiency of feature extraction.

[0086] Furthermore, after obtaining the audio features extracted from the first ambient audio spectrum and the second ambient audio spectrum respectively, the preset scene types can be screened using the two types of audio features obtained above. Specifically, the method of screening scene types using two types of audio features can be a hierarchical screening of successive comparisons, or a screening method of adding weights after simultaneous comparisons, which can be selected according to actual design requirements. After determining the target scene type from the preset scene types, the target noise reduction parameters corresponding to the target scene type can be obtained, thereby realizing the adaptive noise reduction function of the headphones.

[0087] It can be understood that by obtaining the current position information of the headset, a mode for obtaining the target noise reduction parameters based on different parameter information is divided. When the current position information of the headset can be obtained, the position information is combined with the first ambient audio spectrum to filter out the target scene type in a multi-source information manner, and then obtain the target noise reduction parameters; when the current position information of the headset cannot be obtained, the first ambient audio spectrum and the second ambient audio spectrum are used to filter out the target scene type in a dual-spectrum manner, and then obtain the target noise reduction parameters. This optimizes the method for obtaining the target noise reduction parameters, improves the single recognition mode of adaptive noise reduction, improves the efficiency and accuracy of obtaining noise reduction parameters, reduces the power consumption of the headset, and improves the user experience.

[0088] For further information, please refer to Figure 2In one embodiment, the determined scene type includes an initial scene type and an associated scene type, and the step S3 of determining the determined scene type from preset scene types according to the location information includes:

[0089] S31, obtaining key location information from the location information;

[0090] S32, obtaining an adaptation value between key location information and a preset scene type;

[0091] S33, determining an initial scene type from preset scene types based on the adaptation value;

[0092] S34, obtaining the association value between the initial scene type and the remaining scene types;

[0093] S35 . Obtain an associated scene type from the remaining scene types based on the associated value and a preset first threshold.

[0094] Among them, the key position information is the marking parameter information used to reflect the position of the scene the headset is currently in. The initial scene type is the scene type used for subsequent recognition and determination obtained from the preset scene types through the key position information. The associated scene type is a scene type that has a certain degree of similarity between the sound features of the determined initial scene type.

[0095] The adaptation value is the adaptation degree value between the key position information and each scene type, which can be used to quantify the adaptation degree between each scene type and the key position information. The association value reflects the similarity of the characteristics of each scene type on the spectrum. The association value is a parameter generated by pre-training and analyzing each scene type. Each scene type generates a corresponding association value for the other scene types. The first threshold is a value used for association value screening. The association value can be screened to obtain the associated scene type that meets the requirements.

[0096] A geographic information database that can preliminarily determine the scene type based on key location information is pre-set in the headset system or the headset's accompanying App. The corresponding scene type can be determined by comparing the extracted key location information. Similar to the method of obtaining location information, the key location information can be extracted through the headset or through a terminal device connected to the headset.

[0097] Specifically, when obtaining the adaptation value of the key position information and the scene type, a weight relationship can be assigned to specific parameters in the key position information to determine the adaptation degree value of the key position information and each scene type, and then determine the initial scene type that meets the requirements. It is easy to understand that the number of initial scene types that can be determined by the key position information can be one or more, and can be set according to the actual design requirements to control the number of initial scene types obtained.

[0098] It can be understood that the method of using adaptation values ​​to filter the initial scene types can achieve quantitative filtering of the initial scene types, which can better control the number of initial scene types obtained. At the same time, the method of adaptation values ​​can also better control the number of subsequent associated scene types obtained.

[0099] After obtaining the adaptation value, the method of determining the initial scene type from the scene type according to the adaptation value can be to set a comparison value for screening, thereby screening out the initial scene type that meets the requirements; or it can be to screen out the scene type with the highest degree of adaptation among the adaptation values ​​as the initial scene type, which can be selected according to the actual design requirements. Preferably, the screening method of using the scene type with the highest degree of adaptation as the initial scene type is adopted. It is easy to understand that the method of determining the initial scene type by the maximum adaptation value ensures the accuracy of the initial scene type obtained by screening. At the same time, the number of the initial scene types obtained can be effectively controlled, and the number of the associated scene types obtained subsequently can be reduced to a certain extent, thereby reducing the calculation amount of the subsequent scene type identification to a certain extent.

[0100] After the initial scene type is determined, the association value between the initial scene type and the remaining scene types can be obtained. After the association value is obtained, the association value is combined with the comparison result of the first threshold value to determine the associated scene type. It is easy to understand that the method of determining the associated scene type by the association value of the initial scene type can ensure the accuracy of the scene type used for subsequent scene recognition.

[0101] In the process of screening associated scene types, the setting of the first threshold will affect the screening results of the associated scene types. Specifically, the setting method of the first threshold can be to set a fixed value, or to establish a database of the first threshold, and then call the corresponding first threshold based on the specific situation of the associated value.

[0102] It can be understood that through the adaptation value of key position information and scene type, the preset scene types can be preliminarily screened to determine the initial scene type, and then according to the association value between the initial scene type and the remaining scene types, the associated scene types that meet the similarity requirements with the initial scene type can be determined, thereby ensuring the efficiency and accuracy of subsequent scene recognition, reducing the number of scene types for subsequent scene recognition, reducing the computational complexity of subsequent scene type recognition, and reducing the power consumption of the headphones.

[0103] For further information, please refer to Figure 3 In a preferred embodiment, the step S35 of obtaining the associated scene type from the remaining scene types based on the associated value and the preset first threshold value includes:

[0104] S351. Obtain the maximum value among the adaptation values ​​as the maximum adaptation value;

[0105] S352, obtaining a preset adaptation value interval in which the maximum adaptation value falls, and using it as a target adaptation value interval;

[0106] S353, obtaining a preset first threshold corresponding to the target adaptation value interval;

[0107] S354, determining whether the correlation value is less than a first threshold;

[0108] S355: If not, mark the scene type corresponding to the associated value as an associated scene type.

[0109] Among them, the adaptation value interval is a pre-set comparison interval for determining the first threshold corresponding to the maximum adaptation value. Each adaptation value interval corresponds to a first threshold. The larger the endpoint of the adaptation value interval, the larger the corresponding first threshold. The number and interval size of the adaptation value interval can be set according to actual design requirements.

[0110] Specifically, after obtaining the maximum adaptation value, the adaptation value interval in which the maximum adaptation value falls can be determined first, and then the corresponding first threshold value can be obtained according to the adaptation value interval in which it falls. When the maximum adaptation value is relatively high, a first threshold value with a relatively large value can be obtained, and when the maximum adaptation value is relatively low, a first threshold value with a relatively small value can be obtained.

[0111] It is easy to understand that by obtaining the corresponding first threshold based on the maximum adaptation value, it is possible to dynamically adjust the difficulty of obtaining associated scene types according to the degree of adaptation of the key position information and the scene type, thereby controlling the number of associated scene types obtained according to the adaptation value. That is, when the maximum adaptation value is relatively high, the size of the first threshold can be appropriately increased, which can effectively reduce the amount of associated scene models obtained, thereby improving the efficiency of subsequent scene recognition; when the maximum adaptation value is relatively low, the size of the first threshold can be appropriately reduced, and relatively more associated scene models can be obtained, thereby ensuring the accuracy of subsequent scene recognition.

[0112] For further information, please refer to Figure 4 In one embodiment, step S4 of determining the target scene type based on the first ambient audio spectrum and the determined scene type includes:

[0113] S41, obtaining a plurality of energy characteristic values ​​according to a first ambient audio spectrum and a preset first extraction mode;

[0114] S42, obtaining a preset energy range for determining a scene type;

[0115] S43, obtaining the number of energy characteristic values ​​falling into the energy interval;

[0116] S44: Determine the target scene type from the determined scene types based on the number of falls.

[0117] Among them, the first extraction mode is an extraction logic method for extracting features set according to the characteristics of the first ambient audio spectrum. The energy characteristic value is the energy parameter information corresponding to the frequency band in the first ambient audio spectrum, which can be used to represent the energy situation of the frequency band. 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.

[0118] Since the sensitivity of the human ear to different frequencies is different, when extracting features from the first ambient audio spectrum, the feature information of the frequency bands to which the human ear is highly sensitive can be extracted to reduce the amount of calculation required for feature extraction. After obtaining the first ambient audio spectrum, the first extraction mode is started to segment the first ambient audio spectrum based on a preset human ear relatively sensitive frequency band range and a preset first interception bandwidth to obtain a plurality of first target spectra.

[0119] After obtaining a number of first target spectra, the energy characteristic values ​​corresponding to the first target spectra are calculated respectively. The energy characteristic value may be the maximum energy value in the first target spectrum, or may be the energy average value of the first 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 first target spectrum.

[0120] After obtaining the energy characteristic value, the energy interval of the determined scene type is obtained, and then the energy characteristic value is compared with the energy interval of the determined scene type item by item, so as to obtain the number of energy characteristic values ​​falling into the corresponding energy interval.

[0121] After obtaining the number of falls corresponding to the determined scene type, the target scene type can be screened according to the specific situation of the number of falls. Specifically, the scene type corresponding to the maximum number of falls can be used as the target scene type by comparing the number of falls; the corresponding situation can be divided according to the number of the maximum number of falls, and the target scene type can be obtained; or the target scene type can be obtained by comprehensive screening based on the adaptability of key position information and scene type.

[0122] In a preferred embodiment, step S44 of obtaining the target scene type based on the number of falls includes:

[0123] S441, obtaining the value of the maximum number of falling numbers among the falling numbers;

[0124] S442: If the value is 1, the scene type corresponding to the maximum number of falls is marked as the target scene type;

[0125] S443: If the number is greater than 1, obtain the adaptation value between the scene type corresponding to the maximum number of falls and the key position information;

[0126] S444: Mark the scene type corresponding to the maximum value of the adaptation values ​​as the target scene type.

[0127] After obtaining the number of falls, the numbers of falls are compared with each other to obtain the maximum number of falls, and then the number of the maximum number of falls can be obtained. When the number of the maximum number of falls is only one, it means that in the determined scene type, there is a scene type with a relatively prominent degree of compliance with the energy characteristic value of the human ear's high-sensitivity frequency band. Therefore, the scene type corresponding to the maximum number of falls can be directly used as the target scene type. When the number of the maximum number of falls is greater than one, the target scene type can be comprehensively determined in combination with the adaptation value of the key position information. By comparing the adaptation values ​​between the scene types corresponding to the maximum number of falls, the maximum adaptation value is determined, and the scene type corresponding to the maximum number of falls and the maximum adaptation value is used as the target scene type.

[0128] It can be understood that by comparing the energy characteristic value with the energy interval and based on the number of energy characteristic values ​​falling into the energy interval, the target scene type can be determined, and then further re-screening of the determined scene type can be achieved, thereby optimizing the method of obtaining the target scene type and improving the efficiency and accuracy of scene type re-screening.

[0129] For further information, please refer to Figure 5 In one embodiment, step S6 of determining the target scene type according to the first ambient audio spectrum and the second ambient audio spectrum includes:

[0130] S61, obtaining a plurality of energy characteristic values ​​based on a first ambient audio spectrum and a preset first extraction mode;

[0131] S62, obtaining an amplitude feature matrix based on the second ambient audio spectrum and a preset second extraction mode;

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

[0133] S64, filtering out a specific scene type from the scene types based on the similarity coefficient;

[0134] S65. Determine the target scene type according to the energy characteristic value, the similarity coefficient and the specific scene type.

[0135] Among them, the second extraction mode is an extraction logic method for extracting features set according to the characteristics of the second ambient audio spectrum. The amplitude feature matrix is ​​a matrix obtained from the second ambient audio spectrum based on the second extraction mode, which can represent the characteristics of the amplitude intensity changes of the ambient audio signal in each frequency band to a certain extent. The comparison matrix is ​​a matrix extracted from the pre-trained scene type and can be used for matching and comparison 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.

[0136] Specifically, the method of obtaining a plurality of energy characteristic values ​​based on the first ambient audio spectrum and the preset first extraction mode in step S61 is the same as the method of obtaining the energy characteristic values ​​in the aforementioned step S41, which will not be described in detail here.

[0137] After obtaining the second ambient audio spectrum, the second extraction mode is started, and the second ambient audio spectrum is segmented based on the two dimensions of time and frequency, thereby obtaining a number of second target spectra, and then the amplitude parameters of each second target spectrum are calculated respectively. Specifically, the amplitude can be the maximum value of the amplitude in the corresponding second target spectrum, or the average value of the amplitude in the corresponding second target spectrum, or the variance of the amplitude in the corresponding second target spectrum. Preferably, the amplitude is the average value of the amplitude in the second target spectrum. It can be understood that the selection of the average value can better represent the overall situation of the amplitude in the second target spectrum, and can effectively reduce the interference of sudden signal.

[0138] After obtaining the second target spectrum and the corresponding amplitude parameters, the amplitude characteristic matrix can be obtained by marking the second target spectrum with a serial number, and arranging the aforementioned serial numbers based on the position arrangement of the second target spectrum in the second ambient audio 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 second ambient audio spectrum uses the time dimension as the row (or horizontal axis) and the frequency dimension as the column (or vertical axis), and arranges the serial numbers of the second target spectrum based on the arrangement of the time dimension and the frequency dimension of the second ambient audio 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.

[0139] 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 second target spectrum, the position arrangement method of the elements in the initial matrix is ​​the same as the position arrangement method of the second target spectrum in the second ambient audio spectrum, and the second 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 second 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.

[0140] 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.

[0141] 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.

[0142] 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.

[0143] 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.

[0144] It can be understood that by combining the energy eigenvalue and the similarity coefficient, further focused screening of specific scene types can be achieved, and then the required target scene type can be determined, thereby 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.

[0145] Further, in a preferred embodiment, the step S62 of obtaining the amplitude feature matrix based on the second ambient audio spectrum and the preset second extraction mode includes:

[0146] S621, obtaining a preset interception time width, a second interception frequency bandwidth and an initial matrix;

[0147] S622, obtaining a plurality of second target spectra based on the second ambient audio spectrum, the interception time width and the second interception frequency bandwidth;

[0148] S623, sequentially associating the second target spectrum with the elements of the initial matrix in a one-to-one correspondence;

[0149] S624, respectively calculating the amplitude characteristic parameters of the second target spectrum;

[0150] S625. 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.

[0151] After obtaining the second ambient audio spectrum, the second extraction mode is activated, and the second ambient audio spectrum is divided into a plurality of second target spectra according to the preset interception time width and the second interception frequency width. After obtaining a plurality of second target spectra, the second target spectra are sequentially associated with the elements of the initial matrix in a one-to-one correspondence according to the position arrangement of the second target spectra in the second ambient audio spectrum, that is, after intercepting the time dimension and the frequency dimension, the arrangement of the second target spectra in the second ambient audio spectrum can be regarded as a specific matrix, and the specific matrix is ​​associated with the elements in the same position in the initial matrix in a one-to-one manner. For example, in the second ambient audio spectrum, the second target spectra in the first column are A1, A2, and A3, respectively; the second target spectra in the second column are B1, B2, and B3, respectively; and the second target spectra in the third column are C1, C2, and C3, respectively; 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, respectively; and the elements in the third column are Z1, Z2, and Z3, respectively. 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.

[0152] Calculate the amplitude characteristic parameters of the second target spectrum respectively. The amplitude characteristic parameters can be the average amplitude of the second target spectrum, the maximum amplitude of the second target spectrum, or the amplitude variance of the second target spectrum, which can be selected according to the actual design requirements. After calculating the amplitude characteristic parameters of each second 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 second ambient audio spectrum, the target dimension is the column dimension; if the time dimension is the column dimension in the second ambient audio 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.

[0153] 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 second 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.

[0154] Further, in a preferred embodiment, the step S63 of obtaining the similarity coefficient between the amplitude feature matrix and the comparison matrix of the preset scene type includes:

[0155] S631, obtaining a comparison matrix of preset scene types;

[0156] S632. According to the cosine similarity formula, a number of initial similarity coefficients between the amplitude feature matrix and the comparison matrix in a preset target dimension are obtained;

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

[0158] 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 is located in the second environment audio spectrum. Specifically, if the time dimension is a row dimension in the second environment audio spectrum, the target dimension is a column dimension; if the time dimension is a column dimension in the second environment audio spectrum, the target dimension is a row dimension.

[0159] 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 second environment audio 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 to obtain the similarity coefficients between the amplitude feature matrix and the comparison matrix. Then, according to the same calculation method, the similarity coefficients between the amplitude feature matrix and each comparison matrix can be obtained in turn.

[0160] 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.

[0161] Further, in one embodiment, the step S64 of selecting a specific scene type from the scene types based on the similarity coefficient includes:

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

[0163] S642: Filter out a specific scene type from the scene types according to the target similarity coefficient.

[0164] 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.

[0165] 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.

[0166] Furthermore, in a preferred embodiment, according to the size of the similarity coefficient, the step S641 of obtaining a similarity coefficient that meets the preset requirements as the target similarity coefficient includes:

[0167] S6411. Obtain the maximum value among the similarity coefficients as the maximum similarity coefficient;

[0168] S6412. Obtain a corresponding comparison value according to the maximum similarity coefficient;

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

[0170] S6414. If not, mark the similarity coefficient as the target similarity coefficient.

[0171] 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.

[0172] 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.

[0173] 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.

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

[0175] S651, obtaining a preset energy range for a specific scene type;

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

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

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

[0179] 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.

[0180] 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.

[0181] 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.

[0182] 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.

[0183] Furthermore, in a preferred embodiment, the step S654 of determining the target scene type from the specific scene types based on the number of falls and the similarity coefficient includes:

[0184] S6541. Obtain the maximum number of falls in the numbers of falls and the maximum similarity coefficient in the similarity coefficients;

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

[0186] S6543: If yes, mark the specific scene type as the target scene type;

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

[0188] S6545. Mark the specific scene type corresponding to the maximum reference value among the reference values ​​as the target scene type.

[0189] 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.

[0190] 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.

[0191] 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.

[0192] 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.

[0193] 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.

[0194] 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.

[0195] 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.

[0196] 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.

[0197] To summarize, the present application divides the modes of obtaining target noise reduction parameters based on different parameter information by obtaining the current position information of the earphone. When the current position information of the earphone can be obtained, the position information is combined with the first ambient audio spectrum to filter out the target scene type in a manner of combining multi-source information, and then obtain the target noise reduction parameters. When the current position information of the earphone cannot be obtained, the first ambient audio spectrum and the second ambient audio spectrum are used to filter out the target scene type in a dual-spectrum manner to obtain the target noise reduction parameters. This optimizes the method of obtaining the target noise reduction parameters, improves the single recognition mode of adaptive noise reduction, improves the efficiency and accuracy of obtaining noise reduction parameters, reduces the power consumption of the earphone, and improves the user experience.

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

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

[0200] 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.

[0201] 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.

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

[0203] 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 adaptive active noise reduction method are implemented.

[0204] 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 adaptive active noise reduction, characterized in that: include: Check whether the current location information of the headset can be obtained; If yes, obtaining the current position information of the headset and the first ambient audio spectrum; Determining a judgment scene type from preset scene types according to the location information; Determining a target scene type based on the first ambient audio spectrum and the determined scene type; If not, obtaining the first ambient audio spectrum and the second ambient audio spectrum; Determining a target scene type according to the first ambient audio spectrum and the second ambient audio spectrum; A noise reduction parameter corresponding to the target scene type is obtained as a target noise reduction parameter.

2. The method of adaptive active noise reduction according to claim 1, characterized in that: The determined scene type includes an initial scene type and an associated scene type, and the step of determining the determined scene type from preset scene types according to the location information includes: Obtaining key location information from the location information; Obtaining an adaptation value between the key location information and a preset scene type; Based on the adaptation value, determining an initial scene type from preset scene types; Obtaining association values ​​between the initial scene type and the remaining scene types; Based on the association value and a preset first threshold, an associated scene type is obtained from the remaining scene types.

3. The method of adaptive active noise reduction according to claim 2, characterized in that: The step of obtaining the associated scene type from the remaining scene types based on the associated value and the preset first threshold comprises: Obtaining a maximum value among the adaptation values ​​as a maximum adaptation value; Obtaining a preset adaptation value interval within which the maximum adaptation value falls, and using the preset adaptation value interval as a target adaptation value interval; Obtaining a preset first threshold corresponding to the target adaptation value interval; Determining whether the correlation value is less than the first threshold; If not, the scene type corresponding to the associated value is marked as an associated scene type.

4. The method for adaptive active noise reduction according to claim 1, characterized in that: The step of determining the target scene type based on the first ambient audio spectrum and the determined scene type comprises: Obtaining a plurality of energy characteristic values ​​according to the first ambient audio spectrum and a preset first extraction mode; Obtaining a preset energy interval for determining the scene type; Obtaining the number of energy characteristic values ​​falling into the energy interval; Based on the falling number, a target scene type is determined from the determined scene types.

5. The method of adaptive active noise reduction according to claim 1, characterized in that: The step of determining the target scene type according to the first ambient audio spectrum and the second ambient audio spectrum comprises: Based on the first ambient audio spectrum and a preset first extraction mode, a plurality of energy characteristic values ​​are obtained; Based on the second ambient audio spectrum and the preset second extraction mode, an amplitude feature matrix is ​​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; The target scene type is determined according to the energy characteristic value, the similarity coefficient and the specific scene type.

6. The method for adaptive active noise reduction according to claim 5, characterized in that: The step of obtaining the amplitude feature matrix based on the second ambient audio spectrum and the preset second extraction mode includes: Obtaining a preset interception time width, a second interception frequency width and an initial matrix; Based on the second ambient audio spectrum, the interception time width and the second interception frequency width, a plurality of second target spectra are obtained; Associating the second target spectrum with the elements of the initial matrix in sequence in a one-to-one correspondence; respectively calculating the amplitude characteristic parameters of the second 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.

7. The method of adaptive active noise reduction according to claim 5, 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.

8. The method for adaptive active noise reduction according to claim 5, 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.

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 method for adaptive active noise reduction 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 method for adaptive active noise reduction according to any one of claims 1 to 8 are implemented.