Earphone control method, earphone and storage medium
By setting the volume pre-adjustment mode in the headset, the volume is automatically adjusted using the energy intensity characteristics of the ambient audio, which solves the problem that the headset cannot quickly deal with environmental noise interference, and improves the noise reduction effect and user experience.
Patent Information
- Application Number
- CN202411985031.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
AI Technical Summary
The headset cannot quickly deal with environmental noise interference while obtaining new noise reduction parameters, and the user needs to manually adjust the volume to deal with environmental noise interference.
By detecting the energy intensity characteristics of the ambient audio, determine whether the volume pre-adjustment mode is triggered, and determine the preliminary volume based on the current noise reduction parameters, current volume and energy intensity characteristics, and then adjust to the target volume to cope with the ambient noise.
It effectively reduces the impact of environmental noise on noise reduction effect when environmental changes and noise increases, improves the noise reduction effect of the headphones, and reduces the frequency of manually adjusting the volume by users, improving the user experience.
Smart Images

Figure CN119996885A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of earphone control technology, and in particular to an earphone control method, an earphone and a storage medium. Background Art
[0002] With the rapid development of electronic technology, headphones have become an indispensable item for people's daily travel, and users have higher and higher requirements for headphones. When faced with various relatively noisy environments, users usually use the noise reduction mode of headphones and increase the playback volume to reduce environmental noise interference. In the process of using headphones, there is a situation where the scene in which the headphones are located changes and the environmental noise increases. In this case, the headphones need to respond to obtain new noise reduction parameters, but the current noise reduction parameters of the headphones cannot quickly respond to the changed scene and cannot cope with the interference of environmental noise. After obtaining the new noise reduction parameters, there is a problem that users may need to manually adjust the volume of the headphones to better cope with environmental noise interference.
[0003] In view of this, it is necessary to provide a headset control method, a headset and a storage medium to solve the above problems. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method for controlling headphones, headphones and a storage medium, which aim to solve the problem that the headphones cannot quickly respond to environmental noise interference during the process of acquiring new noise reduction parameters, and the user needs to manually adjust the headphone volume.
[0005] To achieve the above-mentioned purpose, a first aspect of the present invention provides a method for controlling an earphone, the steps of which include:
[0006] Detect whether to trigger the acquisition of the target noise reduction parameters of the current environment of the headset;
[0007] If yes, then obtain the energy intensity characteristics of the current ambient audio;
[0008] According to the energy intensity characteristics, determine whether to trigger the volume pre-adjustment mode;
[0009] If yes, get the current noise reduction parameters and current volume;
[0010] Determine the preliminary volume according to the current noise reduction parameters, the current volume and the energy intensity characteristics;
[0011] Adjust the current volume to the preliminary volume;
[0012] Get the target volume corresponding to the target noise reduction parameter, and adjust the preliminary volume to the target volume.
[0013] In one embodiment, the step of obtaining the energy intensity characteristics of the current ambient noise includes:
[0014] Obtain the ambient noise signal of the current environment and convert it into an ambient audio spectrum;
[0015] According to the preset specific frequency band, the average value of the energy intensity of the specific frequency band on the ambient audio spectrum is calculated as the energy intensity feature.
[0016] In one embodiment, the step of determining whether to trigger the volume pre-adjustment mode according to the energy intensity characteristics includes:
[0017] Get the comparative strength characteristics corresponding to the current noise reduction parameters of the headset;
[0018] Determine whether the energy intensity characteristic is not less than the comparison intensity characteristic;
[0019] If yes, the volume pre-adjustment mode is triggered.
[0020] In one embodiment, the step of determining the preliminary volume according to the current noise reduction parameters, the current volume and the energy intensity characteristics includes:
[0021] Get the mapping data set corresponding to the current noise reduction parameters;
[0022] Obtaining a first volume from the mapping data set according to the energy intensity feature;
[0023] The current volume is compared with the first volume, and the larger one of the current volume and the first volume is used as the preliminary volume.
[0024] In one embodiment, the step of obtaining a target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume includes:
[0025] Detect whether the target noise reduction parameter is preset with a specific volume;
[0026] If so, the specific volume is used as the target volume;
[0027] If not, obtaining a second volume corresponding to the target noise reduction parameter, and using the second volume as the target volume;
[0028] Adjust the preliminary volume to the target volume.
[0029] In one embodiment, after obtaining a target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume, the following steps are further included:
[0030] Get the user's call status and exercise status;
[0031] Determine the adjustment coefficient according to the user's call status and the user's exercise status;
[0032] Determine the optimized volume according to the target volume and the adjustment coefficient;
[0033] Adjust the target volume to the optimized volume.
[0034] In one embodiment, the step of determining the adjustment coefficient according to the user's call status and the user's motion status includes:
[0035] According to the call status of the user and the movement status of the user, respectively obtain a first coefficient and a second coefficient;
[0036] The product of the first coefficient and the second coefficient is calculated to obtain the adjustment coefficient.
[0037] In one embodiment, the step of detecting whether to trigger acquisition of target noise reduction parameters of the current environment of the headset includes:
[0038] Get the energy fluctuation value of the current ambient audio of the headset;
[0039] Determine whether the energy fluctuation value is greater than a preset trigger value;
[0040] If yes, it triggers the acquisition of the target noise reduction parameters of the current environment of the headset.
[0041] A second aspect of the present invention provides an earphone, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the steps of the above-mentioned earphone control method when executing the computer program.
[0042] 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 earphone control methods are implemented.
[0043] The beneficial effects of the present invention are as follows: by setting the volume pre-adjustment mode, when the ambient noise increases and the target noise reduction parameters are triggered, the current noise reduction parameters, energy intensity characteristics and current volume of the headphones can be used to quickly respond and determine the preliminary volume, which can effectively reduce the impact of ambient noise on the noise reduction effect when the environment changes and the noise increases, thereby improving the overall noise reduction effect of the headphones. At the same time, it can reduce the frequency of users manually adjusting the volume of the headphones, reduce the discomfort caused by subsequent volume changes, and thus improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 The first flowchart of the method for controlling earphones disclosed in the embodiment of the present invention is shown in FIG.
[0045] Figure 2 This is a second flow chart of the earphone control method disclosed in an embodiment of the present invention.
[0046] Figure 3 This is a schematic diagram of a third flow chart of the earphone control method disclosed in an embodiment of the present invention.
[0047] Figure 4 This is a schematic diagram of a fourth flow chart of the earphone control method disclosed in an embodiment of the present invention.
[0048] Figure 5 This is a schematic diagram of the module structure of the earphone disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] The following is the content of the first aspect of the present invention:
[0054] During the use of headphones, the noise reduction parameters of the headphones and the playback volume of the headphones will affect the overall noise reduction effect of the headphones. If the sound characteristics of the environment in which the headphones are located change beyond the preset range, it is necessary to obtain new noise reduction parameters corresponding to the current environment. In the process of the headphones responding to changes in the ambient audio and obtaining new noise reduction parameters for the current environment, the current noise reduction parameters of the headphones cannot cope with the increased ambient noise well, and the noise reduction effect of the headphones will be affected, which in turn affects the user experience.
[0055] Please refer to Figure 1In this embodiment, the steps of the headset control method include:
[0056] S1, detecting whether to trigger obtaining the target noise reduction parameters of the current environment of the headset;
[0057] S2. If yes, obtain the energy intensity characteristics of the current ambient audio;
[0058] S3, determining whether to trigger the volume pre-adjustment mode according to the energy intensity characteristics;
[0059] S4. If yes, obtain the current noise reduction parameters and the current volume.
[0060] Among them, the target noise reduction parameters are the noise reduction parameters used to deal with new environmental noise after the environment in which the headphones are located is switched. The current noise reduction parameters are the noise reduction parameters used to deal with environmental noise before the environment in which the headphones are located has not changed. The energy intensity feature is the energy level of the ambient audio, which can reflect the loudness of the current ambient audio to a certain extent. The volume pre-adjustment mode is a volume control mode pre-set in the headphones to deal with changes in ambient audio characteristics and when the ambient noise is too loud, in order to ensure the noise reduction effect of the headphones.
[0061] Specifically, the ambient audio signal of the current environment of the headset is collected through the microphone array set in the headset, the ambient audio signal is preprocessed and feature information is extracted, and then the characteristic fluctuation of the extracted ambient audio signal is determined. The change of the ambient audio characteristics of the current environment of the headset can be determined, and then it can be determined whether to trigger the acquisition of the target noise reduction parameters of the current environment of the headset.
[0062] After determining the trigger to obtain the target noise reduction parameters of the current environment of the headphones, the energy intensity characteristics of the current environment audio are obtained to determine the loudness of the current environment audio. Specifically, it can be to obtain the energy intensity characteristics of the entire frequency band of the ambient audio signal, or it can be to obtain the energy intensity characteristics of a specific frequency band of the ambient audio signal, which can be selected according to the actual design needs. After obtaining the energy intensity characteristics, the energy intensity characteristics can be compared with the comparison value to determine whether to trigger the volume pre-adjustment mode. Specifically, the comparison values of different scene types can be set to a single fixed value, or corresponding comparison values can be set for different scene types, which can be selected according to the actual design needs. After determining that the energy intensity characteristic is greater than the comparison value, the volume pre-adjustment mode is triggered.
[0063] It can be understood that by setting a dual trigger mechanism for obtaining the target noise reduction parameters and starting the volume pre-adjustment mode, it is possible to trigger a quick response to obtain the volume to cope with the increase in ambient noise when the characteristics of the ambient audio signal change and the ambient noise increases. This can effectively avoid frequent triggering changes in volume adjustment and affect the user experience.
[0064] S5. determining a preliminary volume according to current noise reduction parameters, current volume and energy intensity characteristics;
[0065] S6, adjusting the current volume to the preliminary volume;
[0066] S7. Obtain a target volume corresponding to the target noise reduction parameter, and adjust the preliminary volume to the target volume.
[0067] The initial volume is the volume value generated to quickly respond to increased ambient noise after the volume pre-adjustment mode is triggered. The target volume is the volume value set based on the scene type corresponding to the target noise reduction parameter.
[0068] After obtaining the current noise reduction parameters, the current volume and the energy intensity characteristics, the first volume can be determined by using the current noise reduction parameters and the energy intensity characteristics, and then the preliminary volume can be determined by combining the first volume and the current volume. Specifically, the volume data corresponding to the combination of each noise reduction parameter and each energy intensity characteristic can be determined in advance through testing, and the relevant corresponding data set can be generated and then preset in the headset. After obtaining the first volume, the preliminary volume can be determined according to the first volume and the current volume by selecting one of the first volume and the current volume as the preliminary volume, or by using the first volume and the current volume to perform weight calculation to obtain the preliminary volume.
[0069] After determining the preliminary volume, the current volume of the headset is adjusted to the preliminary volume. After the headset determines the target noise reduction parameters corresponding to the current environment, the corresponding pre-set target volume is obtained according to the target noise reduction parameters, and the preliminary volume is adjusted to the target volume. Specifically, the current volume is adjusted to the preliminary volume and the preliminary volume is adjusted to the target volume gradually at a preset adjustment rate. It is easy to understand that the abruptness of volume adjustment can be effectively avoided by gradually adjusting.
[0070] It can be understood that by setting the volume pre-adjustment mode, when the ambient noise increases and the target noise reduction parameters are triggered, the current noise reduction parameters, energy intensity characteristics and current volume of the headphones can be used to quickly respond and determine the initial volume, which can effectively reduce the impact of ambient noise on the noise reduction effect when the environment changes and the noise increases, thereby improving the overall noise reduction effect of the headphones. At the same time, it can reduce the frequency of users manually adjusting the volume of the headphones, reduce the discomfort caused by subsequent volume changes, and thus improve the user experience.
[0071] Further, in a preferred embodiment, the step S1 of detecting whether to trigger the acquisition of the target noise reduction parameters of the current environment of the headset includes:
[0072] S11, obtaining the energy fluctuation value of the current ambient audio of the headset;
[0073] S12, determining whether the energy fluctuation value is greater than a preset trigger value;
[0074] S13: If yes, trigger to obtain the target noise reduction parameters of the current environment of the headset.
[0075] The energy fluctuation value is the difference in energy intensity before and after the current ambient audio changes, and the trigger value is a preset comparison value compared with the energy fluctuation value.
[0076] Specifically, after calculating the energy intensity difference before and after the current ambient audio changes, the energy fluctuation value can be obtained. By determining the size relationship between the energy fluctuation value and the trigger value, it can be determined whether the characteristic change of the ambient audio signal is relatively large, and then determine whether it is necessary to obtain the target noise reduction parameters.
[0077] Furthermore, in one embodiment, step S2 of acquiring the energy intensity characteristic of the current ambient noise includes:
[0078] S21, obtaining the ambient noise signal of the current environment and converting it into an ambient audio spectrum;
[0079] S22. According to a preset specific frequency band, an average value of energy intensity of a specific frequency band on the ambient audio spectrum is calculated as an energy intensity feature.
[0080] The specific frequency band is a frequency band determined based on the auditory sensitivity characteristics of the human ear and used to extract the required energy intensity.
[0081] Specifically, the ambient audio signal of the current environment of the headset is collected by the microphone array provided on the headset, and then the ambient audio signal is preprocessed and converted into an ambient audio spectrum. The types of ambient audio spectrum include, but are not limited to, the ambient audio spectrum obtained by short-time Fourier transform of the preprocessed ambient audio signal, the Mel spectrum obtained by Mel scale transform, etc., which are not limited here. Preferably, the ambient audio spectrum is a Mel spectrum. After obtaining the ambient audio spectrum, according to the preset specific frequency band to which the human ear is relatively more sensitive, the spectrum corresponding to the specific frequency band on the ambient audio spectrum is intercepted, and then the energy intensity of each frequency on the specific frequency band is extracted respectively, and then the average value of the aforementioned several energy intensities is calculated as the energy intensity feature of the ambient audio signal.
[0082] It can be understood that by using a specific frequency band to which the human ear is more sensitive as a calculation benchmark, while ensuring the accuracy of the obtained energy intensity characteristics, it can effectively reduce the amount of energy intensity extraction and calculation, reduce the use of computing power, and improve the efficiency of obtaining energy intensity characteristics, thereby improving the efficiency of obtaining the preliminary volume.
[0083] Further, in one embodiment, step S3 of determining whether to trigger the volume pre-adjustment mode according to the energy intensity characteristics includes:
[0084] S31, obtaining a comparative strength feature corresponding to the current noise reduction parameter of the headset;
[0085] S32, determining whether the energy intensity characteristic is not less than the comparison intensity characteristic;
[0086] S33: If yes, trigger the volume pre-adjustment mode.
[0087] The comparative intensity feature is an energy intensity feature corresponding to each scene type obtained through pre-testing.
[0088] Specifically, after obtaining the energy intensity feature of the current environment, the comparative intensity feature corresponding to the current noise reduction parameter is obtained according to the current noise reduction parameter of the headset. After determining that the energy intensity feature is greater than the comparative intensity feature, it means that the loudness of the current environment audio is relatively large. In the process of obtaining the target noise reduction parameter, the current noise reduction parameter of the headset is used for noise reduction, which may have a greater impact on the noise reduction effect of the headset.
[0089] It can be understood that after determining the trigger to obtain the target noise reduction parameters, by comparing the energy intensity characteristics with the comparative intensity characteristics corresponding to the current noise reduction parameters, it can be more accurately determined whether to trigger the volume pre-adjustment mode, thereby avoiding frequent adjustment of the volume and affecting the user experience.
[0090] For further information, please refer to Figure 2 In one embodiment, according to the current noise reduction parameters, the current volume and the energy intensity characteristics, the step S5 of determining the preliminary volume includes:
[0091] S51, obtaining a mapping data set corresponding to the current noise reduction parameter;
[0092] S52, acquiring a first volume from a mapping data set according to the energy intensity feature;
[0093] S53: Compare the current volume with the first volume, and use the larger one between the current volume and the first volume as the preliminary volume.
[0094] The mapping data set is a data collection of the first volume corresponding to the noise reduction parameters preset in the headphones, each noise reduction parameter corresponds to a mapping data set, and each noise reduction parameter corresponds to a first volume for each energy intensity feature.
[0095] Specifically, after obtaining the current noise reduction parameters and the current volume, a mapping data set corresponding to the current noise reduction parameters is obtained according to the current noise reduction parameters. The mapping data set is provided with a number of energy intensity intervals, each of which corresponds to a first volume. The energy intensity interval into which the energy intensity feature falls is then determined, and the first volume corresponding to the energy intensity interval is obtained. After determining the first volume, the first volume is compared with the current volume, and the larger of the current volume and the first volume is used as the preliminary volume. If the current volume is greater than the first volume, it means that the volume currently used by the user is sufficient to cope with the increase in ambient noise. Using the current volume as the preliminary volume can reduce the frequent adjustment of the volume and avoid affecting the user's experience.
[0096] It can be understood that by setting the mapping data set, the accuracy of the obtained first volume can be improved, and by taking the larger item of the current volume and the first volume as the preliminary volume, the calculation amount of determining the preliminary volume can be simplified and the efficiency of determining the preliminary volume can be improved.
[0097] For further information, please refer to Figure 3 In one embodiment, the step S7 of obtaining a target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume includes:
[0098] S71, detecting whether a target noise reduction parameter is preset with a specific volume;
[0099] S72: If yes, use the specific volume as the target volume;
[0100] S73: If not, obtain a second volume corresponding to the target noise reduction parameter, and use the second volume as the target volume;
[0101] S74, adjusting the preliminary volume to the target volume.
[0102] The specific volume is the volume pre-set by the user for the scene type corresponding to the target noise reduction parameter according to the user's own usage requirements. The second volume is the volume obtained through pre-testing and used to match the target noise reduction parameter to obtain a relatively comfortable noise reduction effect.
[0103] Specifically, after determining the target noise reduction parameter, it is possible to first detect whether the user has set a specific volume for the scene type corresponding to the target noise reduction parameter. If so, the specific volume is used as the target volume. If not, the corresponding second volume preset by the target noise reduction parameter is obtained, and the second volume is used as the target volume.
[0104] It is understandable that by detecting whether a specific volume exists, personalized control of volume adjustment can be achieved, which is more in line with the user's usage needs and can better improve the user's usage experience.
[0105] For further information, please refer to Figure 4 In a preferred embodiment, after obtaining the target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume in step S7, the method further includes:
[0106] S10, obtaining the user's call status and the user's exercise status;
[0107] S20, determining an adjustment coefficient according to the user's call status and the user's motion status;
[0108] S30, determining an optimized volume according to the target volume and the adjustment coefficient;
[0109] S40, adjusting the target volume to the optimized volume.
[0110] The adjustment coefficient is used to modify the target volume to adapt to various scenarios in which the user uses the headset. The optimized volume is the volume obtained by adjusting the target volume based on the target volume to adapt to the user's specific state.
[0111] During the use of the headset, the user's call status and the user's motion status will affect the volume control of the headset. When the user is in a call state, the volume needs to be appropriately increased to obtain clearer voice information. When the user is in motion, the volume needs to be appropriately lowered to ensure the safety of the user's motion. Specifically, according to the user's call status and the user's motion status, the adjustment coefficient can be determined by directly determining the preset adjustment coefficient based on the types of the call status and the motion status after determining the user's call status and the user's motion status, or by respectively obtaining the coefficients corresponding to the call status and the motion status, and then calculating the required adjustment coefficient.
[0112] In a preferred embodiment, the step S20 of determining the adjustment coefficient according to the user's call status and the user's motion status includes:
[0113] S201, obtaining a first coefficient and a second coefficient respectively according to a call state and a motion state of a user;
[0114] S202: Calculate the product of the first coefficient and the second coefficient to obtain an adjustment coefficient.
[0115] The first coefficient and the second coefficient are obtained by pre-testing. It is understandable that by respectively obtaining the first coefficient and the second coefficient corresponding to the call state and the motion state, and then obtaining the adjustment coefficient by multiplying the first coefficient and the second coefficient, the accuracy of the obtained adjustment coefficient can be improved.
[0116] After determining the adjustment coefficient, the optimized volume can be determined by multiplying the target volume by the adjustment coefficient, and then the target volume is adjusted to the optimized volume. Specifically, the target volume is adjusted to the optimized volume gradually at a preset adjustment rate.
[0117] It can be understood that by utilizing the user's call status and exercise status to determine the adjustment coefficient, and then combining the target volume and the adjustment coefficient to obtain the optimized volume, it can better cope with various usage scenarios when the user uses headphones, provide adaptability of volume adaptive control, and reduce the frequency of users manually adjusting the volume.
[0118] To summarize, the present invention sets a volume pre-adjustment mode. When the ambient noise increases and the target noise reduction parameters are triggered, the current noise reduction parameters, energy intensity characteristics and current volume of the headphones are used to quickly respond and determine the preliminary volume. This can effectively reduce the impact of ambient noise on the noise reduction effect when the environment changes and the noise increases, thereby improving the overall noise reduction effect of the headphones. At the same time, it can reduce the frequency of users manually adjusting the volume of the headphones, reduce the discomfort caused by subsequent volume changes, and thus improve the user experience.
[0119] The following is the content of the second aspect of the present invention:
[0120] The present invention provides an earphone, as shown in the figure, the earphone includes a memory 10, a processor 20 and an earphone control method program instruction 30 stored in the memory 10 and executable on the processor 20, and the earphone control method program instruction 30 implements the aforementioned earphone control method when executed by the processor 20.
[0121] 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.
[0122] 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.
[0123] The following is the content of the third aspect of the present invention:
[0124] 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 method for controlling headphones are implemented.
[0125] 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 controlling a headset, characterized in that: include: Detect whether to trigger the acquisition of the target noise reduction parameters of the current environment of the headset; If yes, then obtain the energy intensity characteristics of the current ambient audio; Determining whether to trigger a volume pre-adjustment mode according to the energy intensity characteristics; If yes, get the current noise reduction parameters and current volume; Determining a preliminary volume according to the current noise reduction parameter, the current volume and the energy intensity characteristics; adjusting the current volume to the preliminary volume; A target volume corresponding to the target noise reduction parameter is obtained, and the preliminary volume is adjusted to the target volume.
2. The method for controlling the earphone according to claim 1, characterized in that: The step of obtaining the energy intensity characteristic of the current environmental noise comprises: Obtain the ambient noise signal of the current environment and convert it into an ambient audio spectrum; According to the preset specific frequency band, an average value of energy intensity of the specific frequency band on the ambient audio spectrum is calculated as an energy intensity feature.
3. The earphone control method according to claim 1, characterized in that: The step of determining whether to trigger the volume pre-adjustment mode according to the energy intensity characteristic comprises: Get the comparative strength characteristics corresponding to the current noise reduction parameters of the headset; Determine whether the energy intensity characteristic is not less than the comparison intensity characteristic; If yes, the volume pre-adjustment mode is triggered.
4. The method for controlling the earphone according to claim 1, characterized in that: The step of determining a preliminary volume according to the current noise reduction parameter, the current volume and the energy intensity characteristics comprises: Get the mapping data set corresponding to the current noise reduction parameters; acquiring a first volume from the mapping data set according to the energy intensity feature; The current volume is compared with the first volume, and the larger one of the current volume and the first volume is used as a preliminary volume.
5. The method for controlling earphones according to claim 1, characterized in that: The step of obtaining a target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume comprises: Detecting whether the target noise reduction parameter is preset with a specific volume; If yes, taking the specific volume as the target volume; If not, obtaining a second volume corresponding to the target noise reduction parameter, and using the second volume as the target volume; The preliminary volume is adjusted to the target volume.
6. The method for controlling earphones according to claim 1, characterized in that: After the step of obtaining the target volume corresponding to the target noise reduction parameter and adjusting the preliminary volume to the target volume, the following step further includes: Get the user's call status and exercise status; Determining an adjustment coefficient according to the call status of the user and the movement status of the user; Determining an optimized volume according to the target volume and the adjustment coefficient; The target volume is adjusted to the optimized volume.
7. The method for controlling earphones according to claim 6, characterized in that: The step of determining the adjustment coefficient according to the call status of the user and the movement status of the user comprises: Obtaining a first coefficient and a second coefficient respectively according to the call state and the movement state of the user; The product of the first coefficient and the second coefficient is calculated to obtain an adjustment coefficient.
8. The method for controlling earphones according to claim 1, characterized in that: The step of detecting whether to trigger obtaining the target noise reduction parameters of the current environment of the headset includes: Get the energy fluctuation value of the current ambient audio of the headset; Determining whether the energy fluctuation value is greater than a preset trigger value; If yes, it triggers the acquisition of the target noise reduction parameters of the current environment of the headset.
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 controlling the earphone 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 controlling the earphone according to any one of claims 1 to 8 are implemented.