Sound effect adjustment method and device, electronic equipment and storage medium
By analyzing audio data and acceleration sensor data and automatically adjusting sound effects parameters, the problem of poor sound effects settings for users in different environments and active states is solved, improving audio experience and convenience.
Patent Information
- Application Number
- CN202411194179.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-05
AI Technical Summary
In the prior art, users need to manually adjust the sound effect settings of electronic devices to adapt to different scenes and environmental noise, resulting in poor user experience and inability to respond to changes in environment and activity in a timely manner.
By acquiring the audio data of electronic devices for spectrum analysis, determining the ambient noise level, and using acceleration sensors to obtain motion characteristic data, identifying the user's motion mode, and automatically adjusting the sound effect settings to optimize the sound effect parameters.
It significantly improves the user's audio experience in different environments and active states, improves the convenience of use, and ensures that the sound effect settings can respond to environmental and motion changes in a timely manner.
Smart Images

Figure CN118899002A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a sound effect adjustment method, device, electronic device and storage medium. Background Art
[0002] Currently, when users are in different scenarios and different environmental noises, they often need to manually adjust the sound settings of electronic devices. This manual adjustment method is not only inconvenient, but also unable to respond to environmental and activity changes in a timely manner, resulting in a poor user experience. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of the present application is to propose a sound effect adjustment method to automatically optimize the sound effect settings according to changes in the environment and movement.
[0005] The second objective of the present application is to provide a sound effect adjustment device.
[0006] The third objective of the present application is to provide an electronic device.
[0007] A fourth objective of the present application is to provide a computer-readable storage medium.
[0008] A fifth object of the present application is to provide a computer program product.
[0009] To achieve the above-mentioned purpose, the first aspect embodiment of the present application proposes a sound effect adjustment method, including: obtaining first audio data of the current environment of the electronic device, and performing spectral analysis on the first audio data to determine the target noise level of the environment of the electronic device; obtaining the current first acceleration data of the electronic device, and extracting motion feature data of the first acceleration data, and determining the user's current target motion mode according to the motion feature data; based on the target noise level and the target motion mode, adjusting the sound effect of the electronic device.
[0010] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes a sound effect adjustment device, including: a first determination module, used to obtain first audio data of the current environment of the electronic device, and perform spectrum analysis on the first audio data to determine the target noise level of the environment in which the electronic device is located; a second determination module, used to obtain the current first acceleration data of the electronic device, and extract motion feature data of the first acceleration data, and determine the user's current target motion mode according to the motion feature data; an adjustment module, used to adjust the sound effect of the electronic device based on the target noise level and the target motion mode.
[0011] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor; and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor can execute the sound effect adjustment method described in the above-mentioned first aspect embodiment.
[0012] To achieve the above-mentioned purpose, the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored, and the computer instructions are used to enable the computer to execute the sound effect adjustment method described in the above-mentioned first aspect of the embodiment.
[0013] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the sound effect adjustment method described in the above-mentioned first aspect.
[0014] The sound effect adjustment method, device, electronic device and storage medium provided in the present application obtain the first audio data of the current environment of the electronic device and analyze the current target noise level based on the first audio data. By obtaining the current first acceleration data of the electronic device, the current target motion mode can be determined according to the first acceleration data, and then the sound effect of the electronic device can be adjusted according to the target noise level and the target motion mode, which can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the ease of use is greatly improved.
[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0017] Figure 1 A flowchart of a sound effect adjustment method provided in an embodiment of the present application;
[0018] Figure 2 A flowchart of another sound effect adjustment method provided in an embodiment of the present application;
[0019] Figure 3 A flowchart of another sound effect adjustment method provided in an embodiment of the present application;
[0020] Figure 4 A flowchart of another sound effect adjustment method provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a process for adjusting the sound effects of an electronic device provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of a sound effect adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0024] The following describes the sound effect adjustment method and device of the embodiments of the present application with reference to the accompanying drawings.
[0025] Figure 1 is a flow chart of a sound effect adjustment method according to an exemplary embodiment. Figure 1 As shown, the sound effect adjustment method of the embodiment of the present application includes but is not limited to the following steps:
[0026] S101, obtaining first audio data of an environment in which the electronic device is currently located, and performing spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located.
[0027] It should be noted that the execution subject of the sound effect adjustment method provided in the embodiment of the present application is an electronic device, and the electronic device can be a terminal device. Optionally, the terminal device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a personal computer (PC), a television, etc. The embodiment of the present application is not specifically limited.
[0028] In some implementations, the first audio data may be obtained based on a sound sensor of the electronic device itself. The sound sensor may be a microphone of the electronic device, and the microphone may be initialized and a sampling frequency may be set to collect audio data according to the sampling frequency. For example, audio data may be collected at a frequency of 44100 Hz to ensure audio quality.
[0029] Optionally, the collected audio data may be processed to obtain the first audio data. That is, based on the sound sensor of the electronic device, the second audio data of the environment in which the electronic device is currently located may be collected, and then the second audio data may be converted into digital audio data, and the digital audio data may be preprocessed to obtain the first audio data.
[0030] Optionally, in order to ensure data integrity, the collected second audio data may be cached, and then the second audio data may be obtained in the cache area to perform operations such as digitization and preprocessing on the second audio data to obtain the first audio data.
[0031] In some implementations, the volume values of the first audio data at different frequencies can be obtained by performing spectral analysis on the first audio data, and the volume values can be averaged to obtain an average volume value. Then, the target noise level of the environment in which the electronic device is located can be determined based on the average volume value and a preset volume threshold.
[0032] For example, assume that the candidate noise levels are noise level A, noise level B, and noise level C, and the volume thresholds are threshold 1, threshold 2, and threshold 3. If the volume average is less than or equal to threshold 1, the target noise level is determined to be noise level A; if the volume average is greater than threshold 1 and less than or equal to threshold 2, the target noise level is determined to be noise level B; if the volume average is greater than threshold 2 and less than or equal to threshold 3, the target noise level is determined to be noise level C.
[0033] S102, obtaining current first acceleration data of the electronic device, extracting motion feature data of the first acceleration data, and determining the current target motion mode of the user according to the motion feature data.
[0034] In some implementations, the first acceleration data may be acquired based on an acceleration sensor of the electronic device itself. In other words, the current second acceleration data of the electronic device may be acquired based on the acceleration sensor of the electronic device, and the second acceleration data may be filtered to obtain the first acceleration data.
[0035] Optionally, the acceleration data may be collected at a set sampling frequency, for example, the acceleration data may be collected at a sampling frequency of 100 Hz to ensure the accuracy of motion pattern recognition.
[0036] Optionally, the uniformity of the acceleration data can be ensured by presetting the data format of the acceleration sensor and collecting the second acceleration data according to the set data format. For example, the data format can be set to include acceleration values in three axes (X, Y, Z).
[0037] Optionally, in order to ensure the integrity of the data, the collected second acceleration data may be cached, and then the second acceleration data may be obtained in the cache area, so as to perform filtering processing on the second acceleration data to obtain the first acceleration data.
[0038] Furthermore, by performing feature extraction on the first acceleration data, motion feature data of the first acceleration data is obtained. Optionally, the motion feature data includes but is not limited to: cadence feature, acceleration amplitude feature, acceleration signal feature, etc. Among them, the cadence feature refers to the number of steps per minute of walking or running of the user; the acceleration amplitude feature refers to the amplitude of acceleration change of the user; and the acceleration signal feature refers to the gait cycle of the user.
[0039] In some implementations, when the motion feature data of the first acceleration data is acquired, the target motion pattern can be identified based on the motion feature data. For example, a motion pattern classifier can be used to classify the motion pattern according to the motion feature data to determine the target motion pattern.
[0040] Optionally, motion feature thresholds corresponding to different motion modes may be obtained, and the target motion mode may be determined based on the motion feature data and the motion feature threshold of the first acceleration data. For example, assuming that the motion modes are stationary mode, walking mode, and running mode, and their corresponding motion feature thresholds are respectively: motion feature threshold 1, motion feature threshold 2, and motion feature threshold 3. If the motion feature data of the first acceleration data is the same as the motion feature threshold 2, the target motion mode is determined to be the walking mode.
[0041] S103, adjusting the sound effect of the electronic device based on the target noise level and the target motion pattern.
[0042] In some implementations, the sound effect parameters that need to be adjusted can be determined based on the target noise level, and the target sound effect mode of the electronic device can be determined based on the target motion mode. The sound effect mode of the electronic device can then be adjusted to the target sound effect mode, and the sound effect parameters can be applied to the target motion mode to adjust the sound effects of the electronic device.
[0043] Optionally, the sound effect parameters include a volume parameter and a noise reduction parameter. If the target noise level is high, the volume parameter can be increased, and the noise reduction parameter can be determined to turn on the noise reduction function; if the target noise level is low, the volume parameter can be reduced, and the noise reduction parameter can be determined to turn off the noise reduction function.
[0044] Optionally, the electronic device can continuously monitor the ambient noise level to automatically adjust volume parameters and noise reduction parameters to provide the user with an optimal auditory experience.
[0045] Optionally, a mapping relationship between multiple motion modes and multiple sound effect modes may be pre-established. When the target motion mode is determined, the sound effect mode corresponding to the target motion mode may be determined as the target sound effect mode by querying the mapping relationship.
[0046] Optionally, the switching of sound effect modes is performed in real time, and the electronic device can adjust the sound effect mode instantly according to the changes in the user's target motion pattern, ensuring that the audio output always meets the user's auditory expectations and environmental requirements.
[0047] For example, the still mode: select a clear and natural sound mode to highlight the high fidelity and details of the audio; the walking mode: enhances the bass and rhythm to make the audio more suitable for walking; the running mode: further enhances the bass and rhythm while maintaining audio clarity to meet the auditory needs in high-intensity exercise environments.
[0048] In some implementations, after the electronic device adjusts the sound effects according to the current target noise level and target motion mode, the user can also adjust the sound effect parameters and sound effect mode according to the adjusted user experience. For example, a user interface can be set on the electronic device, and the user can use the interface to adjust the volume, select the sound effect mode, etc. For another example, the user can set the volume and sound effect mode settings in a specific environment through preference settings, and configure a specific motion mode. Users can manually set and save preferences according to their personal preferences to meet personalized needs.
[0049] In the sound effect adjustment method provided in the embodiment of the present application, the first audio data of the current environment of the electronic device is obtained, and the current target noise level is analyzed based on the first audio data. By obtaining the current first acceleration data of the electronic device, the current target motion mode can be determined according to the first acceleration data, and then the sound effect of the electronic device can be adjusted according to the target noise level and the target motion mode, which can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the ease of use is greatly improved.
[0050] Figure 2 is a flow chart of a sound effect adjustment method according to an exemplary embodiment. Figure 2 As shown, the sound effect adjustment method of the embodiment of the present application includes but is not limited to the following steps:
[0051] S201, obtaining first audio data of an environment in which the electronic device is currently located, and performing spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located.
[0052] In the embodiment of the present application, the implementation method of step S201 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0053] S202, obtaining current first acceleration data of the electronic device, extracting motion feature data of the first acceleration data, and determining the current target motion mode of the user according to the motion feature data.
[0054] In the embodiment of the present application, the implementation method of step S202 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0055] S203: adjusting the volume parameter and noise reduction parameter of the electronic device according to the target noise level.
[0056] In some implementations, the volume parameter and the noise reduction parameter can be dynamically adjusted according to the target noise level. Optionally, the target noise level can be determined according to the target noise value and the noise threshold corresponding to the target noise level. If the target noise value is greater than the noise threshold, the target noise level is determined to be high; if the target noise value is less than or equal to the noise threshold, the target noise level is determined to be low.
[0057] In some implementations, a target noise value and a noise threshold corresponding to a target noise level may be obtained, and it may be determined whether the target noise value is greater than the noise threshold. In response to the target noise value being greater than the noise threshold, the volume parameter is enhanced, and the noise reduction parameter is determined to be to turn on the noise reduction function; in response to the target noise value being less than or equal to the noise threshold, the volume parameter is reduced, and the noise parameter is determined to be to turn off the noise reduction function.
[0058] That is, when the target noise value is greater than the noise threshold, it is determined that the target noise level is high, the volume parameter is increased, and the noise reduction parameter is determined to turn on the noise reduction function, for example, the noise reduction parameter is 1, and the noise reduction function is determined to be turned on. When the target noise value is less than or equal to the noise threshold, it is determined that the target noise level is low, the volume parameter is reduced, and the noise reduction parameter is determined to turn off the noise reduction function, for example, the noise reduction parameter is 0, and the noise reduction function is determined to be turned off.
[0059] S204, determining a target sound effect mode corresponding to the target motion mode, and adjusting the sound effect mode of the electronic device to the target sound effect mode.
[0060] In some implementations, a pre-constructed correspondence between a plurality of candidate motion patterns and a plurality of candidate sound effect patterns is obtained, and a target sound effect pattern is determined from the candidate sound effect patterns based on the target motion pattern and the correspondence.
[0061] That is to say, based on the target motion pattern, the correspondence between multiple candidate motion patterns and multiple candidate sound effect patterns is queried to obtain the candidate sound effect pattern corresponding to the target motion pattern, and the candidate sound effect pattern is used as the target motion pattern.
[0062] In the sound effect adjustment method provided in the embodiment of the present application, the first audio data of the current environment of the electronic device is obtained, and the current target noise level is analyzed based on the first audio data. By obtaining the current first acceleration data of the electronic device, the current target motion mode can be determined according to the first acceleration data, and then the volume parameters and noise reduction parameters can be adjusted according to the target noise level, so that the sound effect parameters can be adjusted in real time and accurately, providing a stable and reliable audio experience. Furthermore, adjusting the sound effect mode of the electronic device according to the target motion mode can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the convenience of use is greatly improved.
[0063] Figure 3 is a flow chart of a sound effect adjustment method according to an exemplary embodiment. Figure 3 As shown, the sound effect adjustment method of the embodiment of the present application includes but is not limited to the following steps:
[0064] S301, obtaining first audio data of the current environment of the electronic device.
[0065] In the embodiment of the present application, the implementation method of step S301 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0066] S302: Perform spectrum analysis on the first audio data to obtain energy distribution of the first audio data.
[0067] In some implementations, the first audio data may be window segmented, the first audio data may be segmented into shorter time windows (e.g., 20 ms to 50 ms), and the first audio data may be spectrally analyzed in a window sliding manner. The audio data in each time window is regarded as a stationary signal, which facilitates spectral analysis.
[0068] Optionally, Fourier transform may be performed on the first audio data in each time window to convert the time domain signal into a frequency domain signal to obtain energy distribution of the first audio data in frequency, that is, energy distribution.
[0069] S303: Determine an average volume of the first audio data based on the energy distribution, and determine a target noise level of the environment where the electronic device is located based on the average volume.
[0070] In some implementations, the spectrum amplitude may be determined based on the energy distribution, and the volume average of the first audio data may be calculated based on the spectrum amplitude. Optionally, the volume size at each frequency may be calculated based on the spectrum amplitude, and multiple volume sizes may be averaged to obtain the volume average.
[0071] Furthermore, multiple volume ranges corresponding to the multiple candidate noise levels are obtained, and then the target noise level of the environment in which the electronic device is located can be determined according to the volume average value and the volume range.
[0072] Optionally, for any volume range, it is determined whether the volume average value is within any volume range. If it is within any volume range, the candidate noise level corresponding to any volume range is determined to be the target noise level. For example, the multiple candidate noise levels are noise level A, noise level B, and noise level C, and the volume ranges are (-∞, threshold 1], (threshold 1, threshold 2], and (threshold 2, threshold 3], respectively. If the volume average value is within (threshold 1, threshold 2], the target noise level is determined to be noise level B.
[0073] S304, obtaining current first acceleration data of the electronic device, extracting motion feature data of the first acceleration data, and determining the current target motion mode of the user according to the motion feature data.
[0074] In the embodiment of the present application, the implementation method of step S304 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0075] S305: Adjust the sound effect of the electronic device based on the target noise level and the target motion pattern.
[0076] In the embodiment of the present application, the implementation method of step S305 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0077] In some implementations, in order to save energy and optimize electronic devices, optimize the computational efficiency of algorithms, ensure fast response at low power consumption, and extend device battery life, the power consumption of electronic devices can be dynamically adjusted according to the usage of electronic devices. Optionally, by monitoring the usage of electronic devices, the running status of applications, and the remaining battery status of electronic devices, the central processing unit (CPU) usage rate, memory usage, device load, and other information are analyzed to understand the current working status and resource consumption of electronic devices.
[0078] Furthermore, based on the monitored data, the system intelligently adjusts the CPU frequency, application priority, and background task execution strategy to achieve the best balance between performance and power consumption. For example, when the system load is low or the screen is turned off, the CPU operating frequency and voltage are reduced to reduce power consumption and heat generation.
[0079] Optionally, users can also select different energy-saving modes in the user interface. Among them, energy-saving modes include smart energy saving, battery energy saving, ultra-low power consumption, etc. Users can choose to close unnecessary background processes, limit data synchronization frequency, adjust screen brightness, etc. in energy-saving mode to extend battery life.
[0080] Optionally, when an application is in the background or unused for a long time, it can be automatically put into a dormant state to reduce resource consumption. The application will be woken up when needed to ensure that the user's application running in the background can respond in a timely manner.
[0081] Optionally, by continuously monitoring the battery status and power consumption of the electronic device and the user's usage habits, the user's current battery consumption status and suggestions are fed back in real time based on the monitored data, providing tips for optimizing battery life and energy saving.
[0082] In the sound effect adjustment method provided in the embodiment of the present application, the first audio data of the current environment of the electronic device is obtained, and the volume average of the first audio data is obtained to determine the current target noise level according to the volume average. By obtaining the current first acceleration data of the electronic device, the current target motion mode can be determined according to the first acceleration data, and then the sound effect of the electronic device can be adjusted according to the target noise level and the target motion mode, which can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the ease of use is greatly improved.
[0083] Figure 4 is a flow chart of a sound effect adjustment method according to an exemplary embodiment. Figure 4 As shown, the sound effect adjustment method of the embodiment of the present application includes but is not limited to the following steps:
[0084] S401, obtaining first audio data of an environment in which the electronic device is currently located, and performing spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located.
[0085] In the embodiment of the present application, the implementation method of step S401 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0086] S402: Acquire current first acceleration data of the electronic device.
[0087] In the embodiment of the present application, the implementation method of step S402 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0088] S403: extract at least one type of motion feature data among a step frequency feature, an acceleration amplitude feature, and an acceleration signal feature from the first acceleration data.
[0089] It can be understood that the step frequency feature refers to the number of steps a user takes per minute when walking or running; the acceleration amplitude feature refers to the amplitude of the user's acceleration change; and the acceleration signal feature refers to the user's gait cycle. By performing feature recognition on the first acceleration data, at least one type of motion feature data among the step frequency feature, the acceleration amplitude feature, and the acceleration signal feature can be extracted.
[0090] S404: for any candidate motion mode, determine motion feature data corresponding to any candidate motion mode, and determine whether at least one type of motion feature data is the same as the motion feature data.
[0091] S405 : In response to at least one type of feature data being the same as the motion feature data, determining the target motion mode to be any candidate motion mode.
[0092] In some implementations, a target motion pattern is determined by acquiring multiple candidate motion patterns and determining motion feature data of the multiple candidate motion patterns, and by determining whether at least one type of motion feature data of the first acceleration data is the same as the motion feature data of the multiple candidate motion patterns.
[0093] Optionally, for any candidate motion mode, its corresponding motion feature data is determined by judging whether at least one type of motion feature data of the first acceleration data is the same as the motion feature data. If they are the same, the target motion mode can be determined to be any candidate motion mode.
[0094] For example, assume that the motion characteristic data of the static mode has a step frequency of 0, the motion characteristic data of the walking mode has a step frequency of 100, and the motion characteristic data of the running mode has a step frequency of 180. If at least one type of motion characteristic data indicates that the step frequency is 0, it is determined that the target motion mode is the static mode.
[0095] S406: Adjust the sound effect of the electronic device based on the target noise level and the target motion pattern.
[0096] In the embodiment of the present application, the implementation method of step S406 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0097] In the sound effect adjustment method provided in the embodiment of the present application, the first audio data of the current environment of the electronic device is obtained, and the current target noise level is analyzed based on the first audio data. By obtaining the current first acceleration data of the electronic device and determining the motion feature data in the first acceleration data, and then determining the current target motion mode according to the motion feature data, the sound effect of the electronic device can be adjusted according to the target noise level and the target motion mode, which can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the ease of use is greatly improved.
[0098] like Figure 5 The flowchart of adjusting the sound effect of the electronic device is shown in the figure. By obtaining the microphone permission and accelerometer permission of the electronic device, the first audio data is collected using the microphone, and the first acceleration data is collected using the accelerometer. Among them, the microphone is the sound sensor of the electronic device, and the accelerometer is the acceleration sensor of the electronic device.
[0099] Further, the first audio data is subjected to spectrum analysis, for example, Fourier transform analysis can be used to determine the target noise level of the first audio data. Feature extraction is performed on the first acceleration data to obtain motion feature data, and the target motion pattern is identified based on the motion feature data. Further, sound effect parameters, such as volume parameters and noise reduction parameters, can be adjusted according to the target noise level, and the sound effect mode of the electronic device can be adjusted to the target sound effect mode that matches the target motion pattern to adjust the sound effect of the electronic device.
[0100] In order to implement the above embodiments, the present application also proposes a sound effect adjustment device.
[0101] Figure 6 A schematic diagram of the structure of a sound effect adjustment device provided in an embodiment of the present application.
[0102] like Figure 6 As shown, the sound effect adjustment device 600 includes:
[0103] A first determination module 601 is used to obtain first audio data of the environment in which the electronic device is currently located, and perform spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located;
[0104] A second determination module 602 is used to obtain current first acceleration data of the electronic device, extract motion feature data of the first acceleration data, and determine the current target motion mode of the user according to the motion feature data;
[0105] The adjustment module 603 is used to adjust the sound effect of the electronic device based on the target noise level and the target motion pattern.
[0106] In a possible implementation of an embodiment of the present application, the adjustment module 603 is further used to: adjust the volume parameters and noise reduction parameters of the electronic device according to the target noise level; determine the target sound effect mode corresponding to the target motion mode, and adjust the sound effect mode of the electronic device to the target sound effect mode.
[0107] In a possible implementation manner of an embodiment of the present application, the adjustment module 603 is further used to: obtain a target noise value and a noise threshold corresponding to the target noise level; in response to the target noise value being greater than the noise threshold, enhance the volume parameter, and determine that the noise reduction parameter is to turn on the noise reduction function; in response to the target noise value being less than or equal to the noise threshold, reduce the volume parameter, and determine that the noise parameter is to turn off the noise reduction function.
[0108] In a possible implementation of an embodiment of the present application, the adjustment module 603 is also used to: obtain a pre-constructed correspondence between multiple candidate motion patterns and multiple candidate sound effect patterns; and determine the target sound effect pattern from the candidate sound effect patterns based on the target motion pattern and the correspondence.
[0109] In a possible implementation manner of an embodiment of the present application, the first determination module 601 is further used to: perform spectral analysis on the first audio data to obtain energy distribution of the first audio data; determine an average volume value of the first audio data based on the energy distribution, and determine a target noise level of the environment in which the electronic device is located based on the average volume value.
[0110] In a possible implementation of the embodiment of the present application, the first determination module 601 is further used to: obtain multiple volume ranges corresponding to multiple candidate noise levels; for any volume range, determine whether the volume average value is within any volume range, and if it is within any volume range, determine the candidate noise level corresponding to any volume range as the target noise level.
[0111] In a possible implementation of the embodiment of the present application, the second determination module 602 is also used to: extract at least one type of motion feature data among the cadence features, acceleration amplitude features and acceleration signal features from the first acceleration data; for any candidate motion mode, determine the motion feature data corresponding to the any candidate motion mode, and determine whether the at least one type of motion feature data is the same as the motion feature data; in response to the at least one type of feature data being the same as the motion feature data, determine that the target motion mode is any of the candidate motion modes.
[0112] In the sound effect adjustment device provided in the embodiment of the present application, the first audio data of the current environment of the electronic device is obtained, and the current target noise level is analyzed based on the first audio data. By obtaining the current first acceleration data of the electronic device, the current target motion mode can be determined according to the first acceleration data, and then the sound effect of the electronic device can be adjusted according to the target noise level and the target motion mode, which can significantly improve the user's audio experience in different environments and activity states. By automatically optimizing the sound effect settings according to changes in the environment and motion, the ease of use is greatly improved.
[0113] It should be noted that the above explanation of the embodiment of the sound effect adjustment method is also applicable to the sound effect adjustment device of this embodiment, and will not be repeated here.
[0114] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0115] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0116] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0117] The collection, storage, use, processing, transmission, provision and application of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0118] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0119] This application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, this application is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting data. In addition, when applicable, personal identifiers are removed from such personal information to protect the privacy of users.
[0120] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0121] In addition, 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 the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0122] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0123] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0124] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0125] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0126] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0127] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A sound effect adjustment method, characterized in that: The method comprises: Acquire first audio data of an environment in which the electronic device is currently located, and perform spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located; Acquire current first acceleration data of the electronic device, extract motion feature data of the first acceleration data, and determine the current target motion mode of the user according to the motion feature data; Based on the target noise level and the target motion pattern, the sound effects of the electronic device are adjusted.
2. The method according to claim 1, characterized in that: The adjusting the sound effect of the electronic device based on the target noise level and the target motion pattern includes: According to the target noise level, adjusting the volume parameter and the noise reduction parameter of the electronic device; A target sound effect mode corresponding to the target motion mode is determined, and the sound effect mode of the electronic device is adjusted to the target sound effect mode.
3. The method according to claim 2, characterized in that The step of adjusting the volume parameter and the noise reduction parameter of the electronic device according to the target noise level includes: Obtaining a target noise value and a noise threshold corresponding to the target noise level; In response to the target noise value being greater than the noise threshold, enhancing the volume parameter, and determining the noise reduction parameter to enable a noise reduction function; In response to the target noise value being less than or equal to the noise threshold, the volume parameter is reduced, and the noise parameter is determined to be for turning off the noise reduction function.
4. The method according to claim 2, characterized in that: The determining of the target sound effect mode corresponding to the target motion mode includes: Acquire a pre-built correspondence between a plurality of candidate motion modes and a plurality of candidate sound effect modes; Based on the target motion pattern and the corresponding relationship, the target sound effect pattern is determined from the candidate sound effect patterns.
5. The method according to claim 1, characterized in that The performing spectrum analysis on the first audio data to determine a target noise level of an environment where the electronic device is located includes: Performing spectrum analysis on the first audio data to obtain energy distribution of the first audio data; Based on the energy distribution, an average volume of the first audio data is determined, and based on the average volume, a target noise level of the environment in which the electronic device is located is determined.
6. The method according to claim 5, characterized in that The step of determining a target noise level of an environment in which the electronic device is located based on the volume average value includes: Obtain multiple volume ranges corresponding to multiple candidate noise levels; For any volume range, it is determined whether the volume average is within the volume range; if it is within the volume range, the candidate noise level corresponding to the volume range is determined as the target noise level.
7. The method according to claim 1, characterized in that The extracting motion feature data of the first acceleration data and determining the current target motion mode of the user according to the motion feature data includes: Extracting at least one type of motion feature data among a step frequency feature, an acceleration amplitude feature and an acceleration signal feature from the first acceleration data; For any candidate motion mode, determining motion feature data corresponding to the any candidate motion mode, and judging whether the at least one type of motion feature data is the same as the motion feature data; In response to the at least one type of feature data being the same as the motion feature data, the target motion mode is determined to be any one of the candidate motion modes.
8. A sound effect adjustment device, characterized in that: The device comprises: A first determination module, configured to obtain first audio data of an environment in which the electronic device is currently located, and perform spectrum analysis on the first audio data to determine a target noise level of the environment in which the electronic device is located; a second determination module, configured to obtain current first acceleration data of the electronic device, extract motion feature data of the first acceleration data, and determine a current target motion mode of the user according to the motion feature data; An adjustment module is used to adjust the sound effect of the electronic device based on the target noise level and the target motion mode.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
