Earphone noise reduction switching method, earphone and storage medium
By determining the correlation value between the current and target scene types in the headset, dividing the noise reduction switching mode, and gradually adjusting it using the transition scene types and parameters, the abrupt problem of the existing headset noise reduction switching method is solved, and the noise reduction effect and user experience are improved.
Patent Information
- Application Number
- CN202411982506.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-30
AI Technical Summary
The existing headphone noise reduction switching method is relatively abrupt, resulting in poor overall noise reduction effect and affecting the user's user experience.
By determining the correlation value between the current scene type and the target scene type, determine whether the target scene type is the associated scene type of the current scene type, and divide different noise reduction switching modes. If the target scene type is not an associated scene type, determine the transition scene type and transition noise reduction parameters, and gradually adjust the current noise reduction parameters to the target noise reduction parameters.
It reduces the abruptness of noise reduction switching, improves the overall effect of headphone noise reduction, avoids the hearing discomfort of human ears caused by noise reduction switching, and improves the user experience.
Smart Images

Figure CN120075678A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of headphone noise reduction, and particularly to a method for switching headphone noise reduction, a headphone and a storage medium. Background Art
[0002] With the rapid development of electronic technology, headphones have become an essential item for people's daily travel. When facing various relatively noisy environments, people usually choose to wear headphones to reduce the impact of environmental noise. When dealing with different usage scenarios, headphones are usually configured with corresponding noise reduction parameters to obtain a relatively good noise reduction effect. However, due to the complex diversity of headphone usage scenarios, during the actual use of headphones, there may be a large change in the headphone usage scenario, which may lead to a large change in the noise reduction parameters. The existing noise reduction switching method directly changes the noise reduction parameters. Such a switching method is relatively abrupt, causing discomfort in the human ear's hearing, and the overall noise reduction effect is also relatively poor, thus affecting the user experience.
[0003] In view of this, it is necessary to provide a method for switching headphone noise reduction, a headphone and a storage medium to solve the above problems. Summary of the Invention
[0004] In view of the deficiencies of the existing technology, the present invention provides a method for switching headphone noise reduction, a headphone and a storage medium, aiming to solve the technical problems that the headphone noise reduction switching method is relatively abrupt, the overall noise reduction effect is poor, causing discomfort in the human ear's hearing, and affecting the user experience.
[0005] To achieve the above object, the first aspect of the present invention provides a method for switching headphone noise reduction, and its steps include:
[0006] Determine the target scene type and obtain the target noise reduction parameters corresponding to the target scene type;
[0007] Obtain the current scene type of the headphone and the current noise reduction parameters corresponding to the current scene type;
[0008] Determine whether the target scene type is an associated scene type of the current scene type;
[0009] If so, adjust the current noise reduction parameters to the target noise reduction parameters in a preset first mode;
[0010] If not, determine the transition scene type between the current scene type and the target scene type;
[0011] Obtain the transition noise reduction parameters of the transition scene type;
[0012] Adjust the current noise reduction parameters to the transition noise reduction parameters in a preset second mode, and then adjust them to the target noise reduction parameters.
[0013] In a preferred embodiment, the step of determining whether the target scene type is an associated scene type of the current scene type includes:
[0014] Obtain the associated value data set of the current scene type, and determine the specific associated value between the current scene type and the target scene type;
[0015] Determine whether the specific associated value is the maximum value in the associated value data set;
[0016] If so, the target scene type is the associated scene type;
[0017] If not, the target scene type is not the associated scene type.
[0018] In a preferred embodiment, the step of adjusting the current noise reduction parameter to the target noise reduction parameter in a preset first mode includes:
[0019] Obtain the first adjustment rate corresponding to the first mode;
[0020] Adjust the current noise reduction parameter to the target noise reduction parameter at the first adjustment rate.
[0021] In a preferred embodiment, the step of determining the transition scene type between the current scene type and the target scene type includes:
[0022] Obtain a number of first associated values of the current scene type and a number of second associated values of the target scene type;
[0023] According to the first associated value and the second associated value, obtain a number of third associated values;
[0024] Determine the transition scene type according to the third associated value.
[0025] In a preferred embodiment, the step of adjusting the current noise reduction parameter to the transition noise reduction parameter in a preset second mode and then to the target noise reduction parameter includes:
[0026] Obtain the second adjustment rate and the third adjustment rate corresponding to the second mode;
[0027] Adjust the current noise reduction parameter to the transition noise reduction parameter at the second adjustment rate;
[0028] Adjust the transition noise reduction parameter to the target noise reduction parameter at the third adjustment rate.
[0029] In a preferred embodiment, before the step of determining the target scene type and obtaining the target noise reduction parameter corresponding to the target scene type, it further includes:
[0030] Obtain the energy fluctuation value of the environmental audio signal of the scene where the earphone is currently located;
[0031] Determine whether the energy fluctuation value is less than a preset trigger value;
[0032] If the energy fluctuation value is not less than the trigger value, determine the target scene type and obtain the target noise reduction parameter corresponding to the target scene type.
[0033] In a preferred embodiment, after the step of determining that the energy fluctuation value is not less than the trigger value, it further includes:
[0034] Determine whether the energy fluctuation value is less than the deviation value;
[0035] If not, obtain the preliminary noise reduction parameter based on the energy fluctuation value;
[0036] Adjust the current noise reduction parameter corresponding to the current scene of the earphone to the preliminary noise reduction parameter;
[0037] Determine the target scene type and obtain the target noise reduction parameter corresponding to the target scene type;
[0038] Adjust the preliminary noise reduction parameter to the target noise reduction parameter.
[0039] In a preferred embodiment, the step of obtaining the preliminary noise reduction parameter based on the energy fluctuation value includes:
[0040] Obtain the preset preliminary interval corresponding to the current scene type of the earphone;
[0041] Determine the preliminary interval in which the energy fluctuation value falls, and obtain the preliminary noise reduction parameter corresponding to the preliminary interval in which the energy fluctuation value falls.
[0042] The second aspect of the present invention provides an earphone, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the earphone noise reduction switching method described in any one of the above.
[0043] The third aspect of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the earphone noise reduction switching method described in any one of the above.
[0044] The beneficial effects of the present invention are as follows: By using the correlation value between the current scene type and the target scene type to determine whether the target scene type is a correlated scene type of the current scene type, different noise reduction switching modes are divided accordingly; when it is determined that the fluctuation of the noise reduction switching is large, the correlation value is used to determine the transition scene type and the transition noise reduction parameters between the current scene type and the target scene type, and then the current noise reduction parameters are gradually switched to the target noise reduction parameters. By dividing different noise reduction switching modes, the abruptness of the noise reduction switching can be reduced, the overall effect of the headphone noise reduction can be improved, and the discomfort of the human ear caused by the noise reduction switching can be avoided, thus preventing the situation that affects the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 FIG. 1 is a first flowchart of the method for headphone noise reduction switching disclosed in an embodiment of the present invention.
[0046] Figure 2 FIG. 2 is a second flowchart of the method for headphone noise reduction switching disclosed in an embodiment of the present invention.
[0047] Figure 3 FIG. 3 is a third flowchart of the method for headphone noise reduction switching disclosed in an embodiment of the present invention.
[0048] Figure 4 FIG. 4 is a fourth flowchart of the method for headphone noise reduction switching disclosed in an embodiment of the present invention.
[0049] Figure 5 FIG. 5 is a fifth flowchart of the method for headphone noise reduction switching disclosed in an embodiment of the present invention.
[0050] Figure 6 FIG. 6 is a schematic diagram of the module structure of the headphone disclosed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] In the present invention, the terms "arranged", "provided with", and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be directly connected, or indirectly connected through an intermediate medium, or there may be internal communication between two devices, components, or parts. 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.
[0052] The terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.
[0053] Moreover, in addition to being used to represent orientation or positional relationships, some of the above terms may also be used to represent other meanings. For example, the term "upper" may also be used to represent a certain attachment relationship or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.
[0054] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to 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.
[0055] The following is the content of the first aspect of the present invention:
[0056] Please refer to Figure 1 , in this embodiment, the steps of the method for switching the noise reduction of the earphone include:
[0057] S1. Determine the target scene type and obtain the target noise reduction parameter corresponding to the target scene type;
[0058] S2. Obtain the current scene type of the earphone and the current noise reduction parameter corresponding to the current scene type;
[0059] Among them, the target scene type is the scene type determined by the earphone after analysis and recognition, that is, the newly changed scene type determined by the earphone after the scene changes; the current scene type is the scene type determined by the earphone before the scene changes. The target noise reduction parameter is the noise reduction parameter that needs to be adjusted to cope with the change of the usage scene, and the current noise reduction parameter is the noise reduction parameter used by the earphone before the scene changes.
[0060] Specifically, the scene types are preset in the earphone, and the noise reduction parameters are also preset in the earphone corresponding to the relevant scene types one by one. The determination of the target scene type can be determined by a single information parameter or by several information parameters. For example, the scene type can be determined only by analyzing a single environmental audio signal, or by analyzing the environmental audio signal and the position information. It can be selected according to the actual design requirements and is not limited here.
[0061] S3. Determine whether the target scene type is an associated scene type of the current scene type;
[0062] Among them, the associated scene type is the scene type with the smallest degree of fluctuation change from the current scene type. Specifically, the degree of association between scene types can be obtained through model training and testing, and the data of the degree of association between each scene type are preset in the earphone.
[0063] When it is determined that the target scene type is the associated scene type of the current scene type, it indicates that the change fluctuation between the target scene type and the current scene type is relatively small, and the switching of the noise reduction parameters can be realized relatively smoothly; when the target scene type is not the associated scene type of the current scene type, it indicates that the change fluctuation between the target scene type and the current scene type is relatively large, and relatively abrupt situations may occur during the corresponding switching of the noise reduction parameters, and corresponding optimizations are required.
[0064] It can be understood that by determining whether the target scene type is the associated scene type, the abruptness during the noise reduction switching process can be determined, and then the corresponding noise reduction switching method can be divided to specifically solve the abrupt feeling during the noise reduction switching process and improve the overall effect of noise reduction.
[0065] S4. If so, adjust the current noise reduction parameter to the target noise reduction parameter in a preset first mode;
[0066] Among them, the first mode is a switching method preset for adjusting the current noise reduction parameter to the target noise reduction parameter.
[0067] Specifically, the first mode can be to adjust the current noise reduction parameter equally to the target noise reduction parameter, or to adjust it to the target noise reduction parameter by gradually increasing the value, or to adjust it to the target noise reduction parameter by gradually decreasing the value, which can be selected according to the actual design requirements.
[0068] It can be understood that after it is determined that the target scene type is the associated scene type, it indicates that the change fluctuation between the target scene type and the current scene type is small, and the switching of the noise reduction parameters can be relatively gentle, so the current noise reduction parameter can be directly adjusted to the target noise reduction parameter in the first mode to improve the efficiency of noise reduction switching.
[0069] S5. If not, determine the transitional scene type between the current scene type and the target scene type;
[0070] S6. Obtain the transitional noise reduction parameter of the transitional scene type;
[0071] S7. Adjust the current noise reduction parameter to the transitional noise reduction parameter in a preset second mode, and then adjust it to the target noise reduction parameter.
[0072] Among them, the transitional scene type is a scene type that has a relatively high degree of association with both the current scene type and the target scene type. The transitional noise reduction parameter is the noise reduction parameter corresponding to the transitional scene type, which plays the role of an intermediate node during the noise reduction switching process. The second mode is a switching method preset for sequentially adjusting the current noise reduction parameter to the transitional noise reduction parameter and the target noise reduction parameter.
[0073] After determining that the target scene type is not the associated scene type, it indicates that the change fluctuation between the target scene type and the current scene type may be relatively large, and the switching of the noise reduction parameter may be relatively abrupt. Therefore, the transition noise reduction parameter of the transition scene type is used as an intermediate node to make the process of switching the noise reduction parameter smooth. Specifically, the transition scene type can be determined by using the association values between the current scene type and the target scene type and other scene types respectively. Determining the transition scene type by using the association value includes, but is not limited to, being based on the average value of the association values corresponding to the current scene type and the target scene type of the same scene type, or being based on the weighted average value of the association values corresponding to the current scene type and the target scene type of the same scene type, which can be selected according to the actual design requirements.
[0074] After determining the transition scene type, the transition noise reduction parameter corresponding to the transition scene type can be obtained. Further, after obtaining the transition noise reduction parameter, the current noise reduction parameter is adjusted in the second mode. Specifically, the progression rate at which the current noise reduction parameter is adjusted to the transition noise reduction parameter and the progression rate at which the transition noise reduction parameter is adjusted to the target noise reduction parameter can be equal or not equal, which can be selected according to the actual design requirements. In a preferred embodiment, the progression rate at which the current noise reduction parameter is adjusted to the transition noise reduction parameter is less than the progression rate at which the transition noise reduction parameter is adjusted to the target noise reduction parameter. It is easy to understand that it can effectively reduce the abruptness when the noise reduction parameter switching is started and reduce the instantaneous discomfort of the human ear.
[0075] It can be understood that by using the association value between the current scene type and the target scene type to determine whether the target scene type is the associated scene type of the current scene type, different noise reduction switching modes are divided; when it is determined that the fluctuation of the noise reduction switching is large, the association value is used to determine the transition scene type and the transition noise reduction parameter between the current scene type and the target scene type, and then the current noise reduction parameter is transitionally switched to the target noise reduction parameter. By dividing different noise reduction switching modes, the abruptness of the noise reduction switching can be reduced, the overall effect of the headphone noise reduction can be improved, and the situation that the noise reduction switching causes discomfort in the human ear listening feeling and affects the user experience can be avoided.
[0076] Further, please refer to Figure 2 , in an embodiment, the steps of determining whether the target scene type is the associated scene type S3 of the current scene type include:
[0077] S31. Obtain the association value dataset of the current scene type and determine the specific association value between the current scene type and the target scene type;
[0078] S32. Determine whether the specific association value is the maximum value in the association value dataset;
[0079] S34. If so, the target scene type is the associated scene type;
[0080] S35. If not, the target scene type is not the associated scene type.
[0081] Among them, the associated value data set is a data set of the associated values between the current scene type and other scene types built in the earphone, and this associated value data set is preset. The specific associated value is the degree of association value between the current scene type and the target scene type.
[0082] Specifically, after calling the associated value data set corresponding to the current scene type and determining the specific associated value between the current scene type and the target scene type, the associated values in the associated value data set can be compared pairwise first to determine the maximum value in the associated value data set, and then compare the maximum value in the associated value data set with the specific associated value. If it is determined that the specific associated value is the maximum value, the target scene type is the associated scene type; if the specific associated value is not the maximum value, the target scene type is not the associated scene type.
[0083] It can be understood that by calling the associated value data set of the current scene type, the maximum associated value of the current scene type can be filtered out from the associated value data set, and then according to whether the specific associated value is the maximum associated value, it can be determined whether the target scene type is the associated scene type, thereby realizing the classification of the noise reduction switching method.
[0084] Further, in a preferred embodiment, after determining that the target scene type is the associated scene type, the steps S4 of adjusting the current noise reduction parameter to the target noise reduction parameter in a preset first mode include:
[0085] S41. Obtain the first adjustment rate corresponding to the first mode;
[0086] S42. Adjust the current noise reduction parameter to the target noise reduction parameter at the first adjustment rate.
[0087] Among them, the first adjustment rate is the progressive value of the current noise reduction parameter adjusting to the target noise reduction parameter in the first mode.
[0088] Specifically, the first adjustment rate can increase or decrease with the change of time, or can remain unchanged with the change of time, and the first adjustment rate can be determined according to the actual design requirements. Preferably, after determining that the target scene type is the associated scene type, obtain the first adjustment rate corresponding to the first mode, and then adjust the current noise reduction parameter to the target noise reduction parameter at a fixed first adjustment rate. It can be understood that since the target scene type is the associated scene type, the change fluctuation between the target scene type and the current scene type is relatively small, so adjusting the current noise reduction parameter to the target noise reduction parameter at a fixed adjustment rate can obtain a better smooth effect of noise reduction switching.
[0089] Furthermore, please refer to Figure 3 , in one embodiment, step S5 of determining the transition scene type between the current scene type and the target scene type includes:
[0090] S51. Obtain a number of first correlation values of the current scene type and a number of second correlation values of the target scene type;
[0091] S52. Obtain a number of third correlation values according to the first correlation values and the second correlation values;
[0092] S53. Determine the transition scene type according to the third correlation values.
[0093] Among them, the number of first correlation values represents the degree of association between the current scene type and scene types other than the target scene type; the number of second correlation values represents the degree of association between the target scene type and scene types other than the current scene type. The third correlation value represents the comprehensive degree of association between the scene type and the current scene type and the target scene type.
[0094] Specifically, the method of obtaining a number of third correlation values according to the first correlation values and the second correlation values can be to calculate the average value between the first correlation value and the second correlation value corresponding to each scene type as the third correlation value; it can also be to calculate the weighted values of the first correlation value and the second correlation value corresponding to each scene type respectively by weighting. The methods of calculating the third correlation value include but are not limited to the foregoing two methods, and can be selected according to the actual design situation.
[0095] Preferably, the method of calculating the average value between the first correlation value and the second correlation value corresponding to each scene type is used to obtain the third correlation value. It can be understood that by using the method of calculating the average value, the degree of association of each scene type between the current scene type and the target scene type can be reflected relatively more balancedly, so as to improve the accuracy of determining the transition scene type subsequently.
[0096] After determining a number of third correlation values, the maximum correlation value can be selected from the number of third correlation values, and the scene type corresponding to the maximum third correlation value is the transition scene type between the current scene type and the target scene type.
[0097] It can be understood that by using the first correlation value and the second correlation value to determine the transition scene type between the current scene type and the target scene type, and then using the transition noise reduction parameter corresponding to the transition scene type as the intermediate node of the noise reduction switch, the abruptness of the noise reduction switch can be effectively reduced, the overall effect of the headphone noise reduction can be improved, and the situation that the noise reduction switch causes discomfort in the human ear hearing and affects the user experience can be avoided.
[0098] Further, in a preferred embodiment, after determining the type of transition scenario and obtaining the transition noise reduction parameter, the step S7 of adjusting the current noise reduction parameter to the transition noise reduction parameter in a preset second mode and then to the target noise reduction parameter includes:
[0099] S71. Obtain a second adjustment rate and a third adjustment rate corresponding to the second mode;
[0100] S72. Adjust the current noise reduction parameter to the transition noise reduction parameter at the second adjustment rate;
[0101] S73. Adjust the transition noise reduction parameter to the target noise reduction parameter at the third adjustment rate.
[0102] Wherein, the second adjustment rate is the progressive value at which the current noise reduction parameter is adjusted to the transition noise reduction parameter in the second mode. The third adjustment rate is the progressive value at which the transition noise reduction parameter is adjusted to the target noise reduction parameter in the second mode.
[0103] Specifically, both the second adjustment rate and the third adjustment rate can increase or decrease with the change of time, or can remain unchanged with the change of time. The relationship between the second adjustment rate and the third adjustment rate can be equal or unequal, and is selected according to the actual design requirements. Preferably, the second adjustment rate is a progressively increasing value, and the third adjustment rate is a progressively decreasing value. It can be understood that by setting the second adjustment rate and the third adjustment rate to increase and decrease respectively, the smoothness of noise reduction switching can be better ensured, avoiding discomfort to the human ear and affecting the user experience.
[0104] Furthermore, please refer to Figure 4 , before step S1 of determining the target scenario type and obtaining the target noise reduction parameter corresponding to the target scenario type, in a preferred embodiment, it further includes:
[0105] S10. Obtain the energy fluctuation value of the environmental audio signal of the scene where the earphone is currently located;
[0106] S20. Determine whether the energy fluctuation value is less than a preset trigger value;
[0107] S30. If the energy fluctuation value is not less than the trigger value, determine the target scenario type and obtain the target noise reduction parameter corresponding to the target scenario type.
[0108] Wherein, the energy fluctuation value is the energy feature difference between the environmental audio signal at the current moment of the earphone and the environmental audio signal at the previous moment. The trigger value is the trigger parameter value for determining whether to trigger noise reduction detection.
[0109] The energy fluctuation value can be the change value of a single feature information in the ambient audio signal, or the change value of a combination of multiple feature information in the ambient audio signal. Preferably, the change value of the amplitude feature information in the ambient audio signal can be used as the energy fluctuation value. Specifically, after collecting the ambient audio signal of the earphone, the ambient audio signal can be converted to obtain the corresponding spectral feature map, the required amplitude feature information can be extracted from the spectral feature map, and the obtained amplitude feature information can be compared with the amplitude feature information at the previous moment, so as to obtain the energy fluctuation value, and then it is determined whether the energy fluctuation value is less than the trigger value. If so, it means that the change of the ambient audio signal is relatively small and there is no need to trigger the acquisition of new noise reduction parameters; if not, it means that the change of the ambient audio signal is relatively large and it is necessary to trigger the acquisition of new noise reduction parameters.
[0110] It can be understood that by using the energy fluctuation value and the trigger value, the triggering of obtaining new noise reduction parameters can be effectively reduced, the power consumption of the earphone can be effectively reduced, the battery life of the earphone can be improved, and the use experience of the earphone can be improved.
[0111] Furthermore, please refer to Figure 5 , in a preferred embodiment, after step S30 where the energy fluctuation value is not less than the trigger value, it further includes:
[0112] S301. Determine whether the energy fluctuation value is less than the deviation value;
[0113] S302. If not, obtain the preliminary noise reduction parameter based on the energy fluctuation value;
[0114] S303. Adjust the current noise reduction parameter corresponding to the current scene of the earphone to the preliminary noise reduction parameter;
[0115] S304. Determine the target scene type and obtain the target noise reduction parameter corresponding to the target scene type;
[0116] S305. Adjust the preliminary noise reduction parameter to the target noise reduction parameter.
[0117] Among them, the deviation value is the numerical information used to determine whether the energy fluctuation value triggers the acquisition of the preliminary noise reduction parameter. The preliminary noise reduction parameter is the intermediate parameter value for adjusting the current target noise reduction parameter to the target noise reduction parameter.
[0118] Specifically, after determining that the energy fluctuation value is not less than the trigger value, it indicates that new noise reduction parameters need to be triggered. At this time, the energy fluctuation value is compared with the deviation value to preliminarily determine the change degree of the environmental audio signal. When it is determined that the energy fluctuation value is not less than the deviation value, it can be preliminarily determined that the change of the environmental audio signal is relatively large. It can be understood that considering the efficiency of noise reduction switching, when it is determined that the environmental audio signal changes greatly and new noise reduction parameters need to be obtained, in order to improve the efficiency of noise reduction switching, during the process of obtaining new noise reduction parameters, corresponding preliminary noise reduction parameters can be obtained based on the situation of the energy fluctuation value. That is, during the process of obtaining the target noise reduction parameters, the current noise reduction parameters can be first adjusted to the preliminary noise reduction parameters, and after determining the target noise reduction parameters, the preliminary noise reduction parameters are adjusted to the target noise reduction parameters, which can better adapt to the process of headphone adaptive noise reduction. When dealing with the situation where the environmental audio signal changes too much, while ensuring the efficiency of noise reduction switching, it can better ensure the smoothness of noise reduction switching to avoid causing discomfort to the human ear and affecting the user experience.
[0119] Furthermore, in a preferred embodiment, the step S302 of obtaining preliminary noise reduction parameters based on the energy fluctuation value includes:
[0120] S3021. Obtain the preset preliminary interval corresponding to the current scene type of the headphone;
[0121] S3022. Determine the preliminary interval into which the energy fluctuation value falls, and obtain the preliminary noise reduction parameters corresponding to the preliminary interval into which the energy fluctuation value falls.
[0122] Among them, the preliminary interval is an energy value interval preset according to the energy fluctuation value of the current scene type, and each preliminary interval corresponds to a set of preliminary noise reduction parameters.
[0123] Specifically, after determining that the energy fluctuation value is not less than the deviation value, the preliminary interval of the current scene type is called, and the energy fluctuation value is compared with the endpoint values of the preliminary interval in turn to determine the preliminary interval into which the energy fluctuation value falls, and then the preliminary noise reduction parameters corresponding to the preliminary interval into which the energy fluctuation value falls are obtained.
[0124] In summary, the present invention determines whether the target scene type is an associated scene type of the current scene type by using the association value between the current scene type and the target scene type to divide corresponding different noise reduction switching modes; when it is determined that the fluctuation of the noise reduction switching is large, the association value is used to determine the transition scene type and transition noise reduction parameters between the current scene type and the target scene type, and then the current noise reduction parameters are transitionally switched to the target noise reduction parameters. By dividing different noise reduction switching modes, the abruptness of the noise reduction switching can be reduced, the overall effect of the headphone noise reduction can be improved, and the situation that the noise reduction switching causes discomfort to the human ear and affects the user experience can be avoided.
[0125] The following is the content of the second aspect of the present invention:
[0126] The present invention provides a pair of headphones. As shown in the figure, the headphones include a memory 10, a processor 20, and method program instructions 30 for headphone noise reduction switching stored on the memory 10 and executable on the processor 20. When the method program instructions 30 for headphone noise reduction switching are executed by the processor 20, the foregoing method for headphone noise reduction switching is implemented.
[0127] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor is generally used to control the overall operation of the headphones. In this embodiment, the processor is used to run the program code stored in the readable storage medium or process data.
[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of the various embodiments of the present invention.
[0129] The following is the content of the third aspect of the present invention:
[0130] 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 foregoing method for headphone noise reduction switching are implemented.
[0131] The above are only the specific implementation manners of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. A method for switching headphone noise reduction, characterized in that: include: Determine a target scene type, and obtain a target noise reduction parameter corresponding to the target scene type; Obtaining a current scene type of the headset and a current noise reduction parameter corresponding to the current scene type; Determining whether the target scene type is an associated scene type of the current scene type; If yes, adjusting the current noise reduction parameter to the target noise reduction parameter in a preset first mode; If not, determining a transition scene type between the current scene type and the target scene type; Obtaining a transition noise reduction parameter of the transition scene type; In a preset second mode, the current noise reduction parameter is adjusted to the transition noise reduction parameter, and then adjusted to the target noise reduction parameter.
2. The headphone noise reduction switching method according to claim 1, characterized in that: The step of determining whether the target scene type is an associated scene type of the current scene type comprises: Acquire a data set of association values of the current scene type, and determine a specific association value between the current scene type and the target scene type; Determining whether the specific association value is a maximum value in the association value data set; If yes, the target scene type is a related scene type; If not, the target scene type is a non-associated scene type.
3. The headphone noise reduction switching method according to claim 1, characterized in that: The step of adjusting the current noise reduction parameter to the target noise reduction parameter in a preset first mode comprises: Obtaining a first adjustment rate corresponding to the first mode; The current noise reduction parameter is adjusted to the target noise reduction parameter at the first adjustment rate.
4. The headphone noise reduction switching method according to claim 1, characterized in that: The step of determining the transition scene type between the current scene type and the target scene type comprises: Acquire a plurality of first association values of the current scene type and a plurality of second association values of the target scene type; Obtaining a plurality of third association values according to the first association value and the second association value; A transition scene type is determined according to the third association value.
5. The headphone noise reduction switching method according to claim 1, characterized in that: The step of adjusting the current noise reduction parameter to the transition noise reduction parameter and then adjusting it to the target noise reduction parameter in the preset second mode comprises: Obtaining a second adjustment rate and a third adjustment rate corresponding to the second mode; The current noise reduction parameter is adjusted to the transition noise reduction parameter at the second adjustment rate; The transition noise reduction parameter is adjusted to the target noise reduction parameter at the third adjustment rate.
6. The headphone noise reduction switching method according to claim 1, characterized in that: Before the step of determining the target scene type and obtaining the target noise reduction parameter corresponding to the target scene type, the following step further includes: Obtain the energy fluctuation value of the ambient audio signal of the current scene where the headset is located; Determining whether the energy fluctuation value is less than a preset trigger value; If the energy fluctuation value is not less than the trigger value, a target scene type is determined, and a target noise reduction parameter corresponding to the target scene type is obtained.
7. The headphone noise reduction switching method according to claim 6, characterized in that: After the step of if the energy fluctuation value is not less than the trigger value, the following step further includes: Determining whether the energy fluctuation value is less than the deviation value; If not, obtaining preliminary noise reduction parameters based on the energy fluctuation value; Adjusting the current noise reduction parameters corresponding to the current scene of the headset to the preliminary noise reduction parameters; Determine a target scene type, and obtain a target noise reduction parameter corresponding to the target scene type; The preliminary noise reduction parameter is adjusted to the target noise reduction parameter.
8. The headphone noise reduction switching method according to claim 7, characterized in that: The step of obtaining preliminary noise reduction parameters based on the energy fluctuation value comprises: Obtain the preset preliminary interval corresponding to the current scene type of the headset; Determine the preliminary interval that the energy fluctuation value falls into, and obtain preliminary noise reduction parameters corresponding to the preliminary interval that the energy fluctuation value falls into.
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 switching 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 switching method according to any one of claims 1 to 8 are implemented.