Loudspeaker control method and device, electronic equipment and medium

By obtaining the environment-related masking sound frequency and the audio signal to be played, combined with the temperature and power consumption optimization information, the filter coefficient is adjusted to process the audio signal, which solves the problem of high audio power consumption of speakers in electronic equipment and achieves the goal of reducing power consumption and temperature. effect while ensuring an excellent experience of sound effects.

CN118540630APending Publication Date: 2024-08-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310189324.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The increased audio power consumption of speakers in electronic devices leads to reduced battery life and heat generation of the device, which affects the user experience. Existing technologies reduce power consumption by reducing the volume or cutting sound effects but fail to provide a good audio experience.

Method used

By obtaining the environment-related masking sound frequency and the audio signal to be played, combined with the temperature and power consumption optimization information, the filter coefficient is adjusted to process the audio signal, and the audio signal is optimized to reduce power consumption and temperature while ensuring sound effects.

Benefits of technology

On the premise of ensuring sound effects, it weakens or removes unnecessary masked sound signals, reduces the power consumption and temperature of electronic devices, improves user experience, and extends the battery life of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540630A
    Figure CN118540630A
Patent Text Reader

Abstract

The invention relates to a loudspeaker control method and device, electronic equipment and a medium, and the method comprises the steps: obtaining a first masked sound frequency, and enabling the first masked sound frequency to be related to an environment where the electronic equipment is located; acquiring a second masked sound frequency based on the to-be-played audio signal; obtaining temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency and the audio signal to be played; obtaining a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal; and processing the to-be-played audio signal based on the filter coefficient to obtain an optimized audio signal, and playing the optimized audio signal. The filtering coefficient is adjusted based on the temperature optimization information, the power consumption optimization information and the feedback signal, the to-be-played audio signal is optimized by using the filtering coefficient, and some masked sound signals are removed or weakened according to the environment where a user is located on the premise of ensuring the sound effect, so that the power consumption of the electronic equipment is reduced, and the temperature of the electronic equipment is prevented from being too high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of audio signal control, and in particular to a control method, device, electronic device and medium for a speaker. Background Art

[0002] With the rapid development of electronic technology, electronic devices such as smart phones, tablets, and laptops are widely used in daily life, and users' audio experience requirements for electronic devices have also increased. The use of audio devices such as speakers, stereo multi-speakers, and large-volume high-power speakers has become more and more common, resulting in increasing audio power consumption of electronic devices. The increase in audio power consumption reduces the battery life of electronic devices and may even cause serious heating of electronic devices, affecting the user experience.

[0003] The existing technology mainly reduces the output power by lowering the volume and reducing the sound effects to achieve the purpose of reducing power consumption, but this method cannot provide users with a good audio experience.

[0004] Therefore, in order to ensure that users have a good audio experience when using electronic devices, measures need to be taken to control the high power consumption and heat generation of audio devices. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides a control method, device, electronic device and medium for a speaker.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for controlling a speaker is provided, which is applied to an electronic device having a speaker. The method includes:

[0007] Acquire a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located;

[0008] Based on the audio signal to be played, obtaining a second masked sound frequency;

[0009] Obtaining a feedback signal from the speaker;

[0010] Based on the first masked sound frequency, the second masked sound frequency and the audio signal to be played, obtaining temperature optimization information and power consumption optimization information;

[0011] Obtaining a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal;

[0012] The audio signal to be played is processed based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

[0013] In some exemplary embodiments of the present disclosure, obtaining temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency, and the audio signal to be played includes:

[0014] Obtaining a masked sound frequency set based on the first masked sound frequency and the second masked sound frequency;

[0015] Processing the audio signal to be played based on the masked sound frequency set, adjusting the sound signal related to the masked sound frequency set in the audio signal to be played, and obtaining a reference sound signal;

[0016] The temperature optimization information and the power consumption optimization information are obtained based on the reference sound signal and the audio signal to be played.

[0017] In some exemplary embodiments of the present disclosure, obtaining the temperature optimization information based on the reference sound signal and the audio signal to be played includes:

[0018] Obtain a pre-stored temperature optimization model;

[0019] Inputting the reference sound signal and the audio signal to be played into the temperature optimization model to obtain the temperature optimization information;

[0020] and / or,

[0021] The step of obtaining the power consumption optimization information based on the reference sound signal and the audio signal to be played includes:

[0022] Obtain a pre-stored power consumption optimization model;

[0023] The reference sound signal and the audio signal to be played are input into the power consumption optimization model to obtain the power consumption optimization information.

[0024] In some exemplary embodiments of the present disclosure, obtaining a second masked sound frequency based on the audio signal to be played includes:

[0025] Performing time-frequency conversion on the audio signal to be played to obtain harmonic information in the frequency domain;

[0026] Analyzing the harmonic information to obtain timbre difference information in the audio signal to be played;

[0027] Based on the timbre difference information, a second masked sound frequency is obtained.

[0028] In some exemplary embodiments of the present disclosure, obtaining the second masked sound frequency based on the timbre difference information includes:

[0029] Based on the timbre difference information, obtaining a second masked sound frequency to be determined;

[0030] Acquire pre-stored user habit information, where the user habit information is related to frequency;

[0031] The undetermined second masked sound frequency is compensated based on the user habit information to obtain the second masked sound frequency.

[0032] In some exemplary embodiments of the present disclosure, obtaining a first masked sound frequency includes:

[0033] Acquiring location information of the electronic device;

[0034] Based on the location information, obtaining environment information of the electronic device;

[0035] Based on the pre-stored configuration information and the environmental information, the first masked sound frequency corresponding to the environmental information is obtained.

[0036] In some exemplary embodiments of the present disclosure, the to-be-played audio signal is processed based on the filter coefficient to obtain an optimized audio signal, including:

[0037] Performing sound effect processing on the audio signal to be played to obtain an intermediate audio signal;

[0038] The intermediate audio signal is filtered based on the filter coefficient to obtain the optimized audio signal.

[0039] According to a second aspect of an embodiment of the present disclosure, a control device for a speaker is provided, which is applied to an electronic device having a speaker, and the control device includes:

[0040] A first acquisition module, configured to acquire a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located;

[0041] The first acquisition module is further used to acquire a second masked sound frequency based on the audio signal to be played;

[0042] The first acquisition module is further used to acquire a feedback signal from the speaker;

[0043] an optimization module, configured to obtain temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency, and the audio signal to be played;

[0044] A second acquisition module, configured to obtain a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal;

[0045] The processing module is used to process the audio signal to be played based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

[0046] In some exemplary embodiments of the present disclosure, the optimization module is further configured to:

[0047] Obtaining a masked sound frequency set based on the first masked sound frequency and the second masked sound frequency;

[0048] Processing the audio signal to be played based on the masked sound frequency set, adjusting the sound signal related to the masked sound frequency set in the audio signal to be played, and obtaining a reference sound signal;

[0049] The temperature optimization information and the power consumption optimization information are obtained based on the reference sound signal and the audio signal to be played.

[0050] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:

[0051] Display screen;

[0052] speaker;

[0053] processor;

[0054] a memory for storing processor-executable instructions;

[0055] The processor is configured to execute the executable instructions in the memory to implement the steps of the speaker control method provided in the first aspect of the present disclosure.

[0056] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the speaker control method provided by the first aspect of the present disclosure is implemented.

[0057] The above method disclosed in the present invention has the following beneficial effects: the present invention adjusts the filter coefficient based on temperature optimization information, power consumption optimization information and feedback signal, and uses the filter coefficient to optimize the audio signal to be played, thereby removing or weakening certain masked sound signals according to the user's environment while ensuring the sound effect, so as to reduce the power consumption of electronic equipment and avoid excessive temperature of electronic equipment.

[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0060] Figure 1 The figure is a flowchart of a method for controlling a speaker according to an exemplary embodiment.

[0061] Figure 2 The figure is a flowchart of a method for controlling a speaker according to an exemplary embodiment.

[0062] Figure 3 is a block diagram of a device for controlling a speaker according to an exemplary embodiment.

[0063] Figure 4 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0064] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0065] With the rapid development of electronic technology, electronic devices such as smart phones, tablets, and laptops are widely used in daily life, and users' audio experience requirements for electronic devices have also increased. The use of audio devices such as speakers, stereo multi-speakers, and large-volume high-power speakers has become more and more common, resulting in increasing audio power consumption of electronic devices. The increase in audio power consumption reduces the battery life of electronic devices and may even cause serious heating of electronic devices, affecting the user experience.

[0066] The existing technology mainly reduces the output power by lowering the volume and reducing the sound effects to achieve the purpose of reducing power consumption, but this method cannot provide users with a good audio experience.

[0067] In order to solve the above problems, the present disclosure provides a speaker control method, which is applied to an electronic device with a speaker. The filter coefficient is adjusted based on temperature optimization information, power consumption optimization information and feedback signal, and the filter coefficient is used to optimize the audio signal to be played. Under the premise of ensuring the sound effect, certain masked sound signals are removed or weakened according to the user's environment, so as to reduce the power consumption of the electronic device and avoid excessive temperature of the electronic device.

[0068] The exemplary embodiments of the present disclosure provide a method for controlling a speaker, which is applied to an electronic device having a speaker, and the electronic device may be a smart device such as a smart phone, a tablet computer, a smart watch, and a speaker. Figure 1 As shown, the control method of the speaker shown in the present disclosure includes:

[0069] S101, obtaining a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located;

[0070] S102, obtaining a second masked sound frequency based on the audio signal to be played;

[0071] S103, obtaining a feedback signal from a speaker;

[0072] S104, obtaining temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency, and the audio signal to be played;

[0073] S105, obtaining a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal;

[0074] S106: Process the audio signal to be played based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

[0075] Before describing the method in the present disclosure, the related technologies involved are described first. The masking effect of the human ear is a psychoacoustic phenomenon, that is, the phenomenon that the hearing threshold of the second sound signal is increased due to the presence of the first sound signal. For example, the first and third signal sounds with larger amplitudes are called masking sounds, and the second signal sound with smaller amplitudes between the first and third signals is called masked sound. This psychoacoustic phenomenon can be used to reduce some unimportant frequency sound signals heard by the human ear. Through the masking effect of the sound time domain and frequency domain, a masking effect model of different frequency bands can be established, and then the audio signal to be processed is subjected to spectral analysis and mapped to the critical frequency band of psychoacoustics. The masking threshold is obtained through the masking effect model, and the unnecessary spectral signals are automatically filtered out to reduce the output audio signal energy, thereby achieving the purpose of reducing power consumption and reducing heat. However, if the output signal is not adjusted based on the user's actual environment and listening habits, it is easy to perceive the difference in sound effects when the user changes the environment, affecting the user's audio experience.

[0076] In step S101, the electronic device with a speaker includes a control device, which is mainly used to implement a control function. The control device of the electronic device is also a control chip of the electronic device, which has a data processing function, as well as a function of sending and receiving information and instructions, etc. For example, the control device may include a processing module, which is used to optimize the audio signal to be played, etc.

[0077] The control device first obtains the environmental information of the electronic device, and then determines the masked sound frequency that is compatible with the environment. The control device uses the masked sound frequency related to the environment in which the electronic device is located as the first masked sound frequency. Based on the masking effect of the human ear, it is known that low-frequency sound signals are easy to mask high-frequency sound signals, and high-amplitude sound signals of similar frequencies are easy to mask low-amplitude sound signals. Therefore, when the electronic device is in a noisy environment, the frequency of the high-amplitude sound signal can be used as the first masked sound frequency; when the electronic device is in a quiet environment, the frequency of the low-amplitude sound signal can be used as the first masked sound frequency. Among them, the way in which the control device obtains environmental information is not specifically limited. For example, the control device can maintain a communication connection with the positioning device in the electronic device to obtain the current environment of the electronic device; the user can also set the environment independently, and the control device obtains the environmental information set by the user.

[0078] In addition, there is no specific limitation on the method for obtaining the first masked sound frequency. For example, a model of environmental information that may appear in various places can be pre-stored in the electronic device, and the user's environment can be determined based on the automatic positioning of the electronic device or the positioning input by the user, and then the model corresponding to the environmental information of the user's environment can be found, and the model includes the first masked sound frequency of the user's environment. For another example, a microphone can be set on the electronic device, so that the sound signal in the user's environment can be collected through the microphone, and then the first masked sound frequency of the user's environment can be separated from the sound signal.

[0079] In step S102, the audio to be played may include various contents such as songs, stories, and broadcasts. The control device extracts the characteristics of the audio signal to be played for analysis, and determines the second masked sound frequency based on the timbre, musical instrument, and other information of the audio to be played. For example, the audio signal to be played is a performance. After the control device extracts the characteristics of the performance, it is found that the performance is played by the guqin, and its timbre is relatively smooth, so the control device can set the second masked sound frequency to a high-frequency signal above 6k. In addition, the first masked sound frequency and the second masked sound frequency will not affect each other, and their numerical ranges may overlap or be independent of each other.

[0080] In step S103, the control device always maintains a communication connection with the speaker to obtain a feedback signal from the speaker. If the feedback signal indicates that the audio signal played by the speaker is significantly different from the audio signal to be played, the control device can set the output property of the speaker based on the feedback signal, or adjust the audio signal to be played based on the feedback signal. If the feedback signal indicates that the audio signal played by the speaker is not significantly different from the audio signal to be played, and the difference is within the error tolerance range, the control device does not need to readjust the speaker or the audio signal to be played. For example, the speaker is playing an audio signal in the optimal state, but the feedback signal obtained by the control device indicates that the audio played by the speaker is distorted, that is, it is significantly different from the audio signal to be played. The control device can adjust the speaker based on the feedback signal and adjust the speaker to play the audio signal in a standard state. If the feedback signal obtained after the adjustment indicates that the audio signal played by the speaker is almost the same as the audio signal to be played, no further adjustment is required, and the speaker can be kept in a standard state.

[0081] In step S104, the control device analyzes the first masked sound frequency, the second masked sound frequency and the audio signal to be played, and determines which frequency ranges of signals in each frequency band of the audio to be played can be used as masked sounds through the first masked sound frequency and the second masked sound frequency. The control device inputs the audio signal to be played into the temperature optimization model and the power consumption optimization model, and then the output temperature optimization information and power consumption optimization information can be obtained. The temperature optimization model and the power consumption optimization model are used to determine the temperature reduction ratio and the power consumption optimization information reduction ratio after deleting the masked sound or weakening the masked sound.

[0082] The control device can maintain connection with the temperature sensor in the electronic device to obtain the temperature of the electronic device. When the temperature of the electronic device is high, the control device can determine that the output power consumption of the electronic device is high, which means that even after processing the audio signal to be played by the speaker, the power consumption and temperature cannot be reduced. The control device can adjust the working state of the speaker to stop the speaker from working in the optimal playback state to quickly reduce the power consumption and temperature of the electronic device.

[0083] In step S105, the control device performs integral transformation and calculation on the acquired temperature optimization information, power consumption optimization information and feedback signal to obtain a filter coefficient. The filter coefficient exists in the form of a matrix, and the values ​​in the matrix correspond to the frequency points of the audio signal to be played. For example, the obtained filter coefficient is a 3*3 matrix, in which the value corresponding to the signal with a frequency of 1kHz is 0.8, the value corresponding to the signal with a frequency of 6kHz is 0.3, the value corresponding to the signal with a frequency of 4kHz is 0.5, etc.

[0084] In step S106, the control device filters the audio signal to be played based on the filter coefficient. After the filter coefficient is determined, the frequency point in the audio signal to be played is multiplied by the corresponding value in the matrix to obtain the filtered audio signal to be played. The control device uses the filtered audio signal to be played as the optimized audio signal. The control device transmits the optimized audio signal to the speaker, and the speaker plays the optimized audio signal.

[0085] When filtering the audio signal to be played based on the filter coefficient, the sound signal that can be used as a masked sound can be reduced or deleted. Since the weakened or deleted sound signal is a masked sound, it has almost no effect on the user's auditory experience. However, since the amount of signals that need to be processed and played during the speaker playback process is reduced, it is possible to reduce the temperature and power consumption of the electronic device while ensuring that the user has a good auditory experience, thereby improving the user's usage experience.

[0086] According to an exemplary embodiment, Figure 2 As shown, the control method of the speaker in this embodiment includes:

[0087] S201, obtaining a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located;

[0088] S202, obtaining a second masked sound frequency based on the audio signal to be played;

[0089] S203, obtaining a feedback signal from the speaker;

[0090] S204, obtaining a masked sound frequency set based on the first masked sound frequency and the second masked sound frequency;

[0091] S205, processing the audio signal to be played based on the masked sound frequency set, adjusting the sound signal related to the masked sound frequency set in the audio signal to be played, and obtaining a reference sound signal;

[0092] S206, obtaining temperature optimization information and power consumption optimization information based on the reference sound signal and the audio signal to be played;

[0093] S207, obtaining a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal;

[0094] S208: Process the audio signal to be played based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

[0095] Among them, steps S201, S202, S203, S207 and S208 are the same as those in the above embodiment and will not be repeated here.

[0096] In some embodiments, step S201 of obtaining a first masked sound frequency includes:

[0097] Obtaining location information of electronic devices;

[0098] Based on the location information, obtain the environment information where the electronic device is located;

[0099] Based on the pre-stored configuration information and environmental information, a first masked sound frequency corresponding to the environmental information is obtained.

[0100] The control device can set the positioning device of the electronic device to a normally open state, or set it to automatically turn on the positioning device when it detects that the user needs to play an audio signal. The control device always maintains a communication connection with the positioning device to obtain the location information of the electronic device, wherein the location information may include the longitude and latitude of the location, or a specific street number, etc. The control device uses the acquired location information to determine the environmental information of the electronic device through a network map or a map provided in the electronic device, and the environmental information includes places such as cafes, restaurants, subways, train stations, and airplanes. For example, the control device obtains the location information of the electronic device as No. 32 Zhongshan Road, and learns through an offline map that the location is a cafe, then the environmental information of the electronic device can be determined as a cafe; for another example, the control device obtains the location information of the electronic device as longitude 113.26 and latitude 22.98, and learns through a network map that the location is Guangzhou South Station, then the environmental information of the electronic device can be determined as a train station.

[0101] The electronic device stores configuration information including the correspondence between environmental information and masked sound frequency. After the control device obtains the environmental information of the electronic device, it can find the masked sound frequency corresponding to the environmental information based on the configuration information, and then the control device uses the masked sound frequency as the first masked sound frequency. For example, if the control device determines that the environmental information of the electronic device is a coffee shop, which is a relatively quiet environment, the corresponding masked sound frequency in the configuration information is 2k-2.2kHz, and the control device uses 2k-2.2kHz as the first masked sound frequency; if the control device determines that the environmental information of the electronic device is a railway station, which is a relatively noisy environment, the corresponding masked sound frequency in the configuration information is 0.7kHz-1kHz, and the control device uses 0.7kHz-1kHz as the first masked sound frequency.

[0102] In addition, if the environmental information acquired by the control device is time domain information, the control device may acquire the first masked sound frequency based on the following formula:

[0103] FNoiset=N(Hz)

[0104] Among them, Noise(t) represents environmental information, t represents time domain, F represents Fourier transform, F[Noise(t)] means time-frequency conversion of environmental information, N(Hz) represents the first masked sound frequency, and Hz represents frequency domain.

[0105] In some embodiments, step S202 obtains a second masked sound frequency based on the audio signal to be played, including:

[0106] Perform time-frequency conversion on the audio signal to be played to obtain harmonic information in the frequency domain;

[0107] Analyze the harmonic information to obtain the timbre difference information in the audio signal to be played;

[0108] Based on the timbre difference information, a second masked sound frequency is obtained.

[0109] The Fourier transform is used to perform time-frequency conversion on the audio signal to be played to obtain the harmonic information in the frequency domain of the audio signal to be played. Based on the harmonic information, the timbre difference information in the audio signal to be played can be obtained, and the control device can set the masked sound frequency according to the timbre difference information and use it as the second masked sound frequency. For example, the audio signal to be played is a rock music, which is synthesized by a variety of instruments such as guitar, bass, drums and human voice. The rock music is converted into time and frequency, and the amplitude of different harmonics can be obtained through the harmonic information. It can be known from the harmonic information that the audio signal with a frequency of 80-250Hz is emitted by the bass, the audio signal with a frequency of 750-1000Hz is emitted by the guitar, the audio signal with a frequency of 1500-2500Hz is emitted by the drums, and the audio signals of the remaining frequencies are emitted by the human voice. In order to highlight the timbre of the instrument, the control device can use 0-80Hz and 3000-5000Hz as the second masked sound frequency.

[0110] Wherein, obtaining the second masked sound frequency based on the timbre difference information includes:

[0111] Based on the timbre difference information, obtaining a second masked sound frequency to be determined;

[0112] Obtaining pre-stored user habit information, which is related to frequency;

[0113] The predetermined second masked sound frequency is compensated based on the user habit information to obtain the second masked sound frequency.

[0114] The control device uses the masked sound frequency obtained based on the timbre difference information as the to-be-determined second masked sound frequency. Since the timbre difference information contains a variety of information contents, in order to make the played sound effects closer to the user's personal habits, the user habit information is pre-stored in the control device, wherein the pre-stored user habit information is related to the frequency. The control device uses the user habit information to compensate for the to-be-determined second masked sound frequency, and uses the compensated masked sound frequency as the second masked sound frequency. For example, the user personally likes rock music, especially the low-frequency information in rock music, so the user can pre-store the low-frequency range of personal preference 20-1000Hz in the electronic device as user habit information, and the control device compensates the second masked sound frequency to be determined based on the low-frequency information. If the second masked sound frequency to be determined is 10-80Hz and 3000-5000Hz, the user's personal preference indicates that the user is more sensitive to low-frequency signals. If the low-frequency signal is weakened or deleted, it will have a negative impact on the user's auditory experience. If the sound signal in the low-frequency range is used as a masked sound, it needs to be compensated. The compensation method may be, for example, not deleting the sound signal in the low-frequency range, or adjusting the filter coefficient of the masked sound in the low-frequency range, such as increasing the corresponding filter coefficient. For example, still referring to the example above, the second masked sound frequency after compensation only retains 3000-5000Hz, and the sound signal in the range of 10-80Hz is no longer used as a masked sound.

[0115] In addition, the control device can obtain the second masked sound frequency based on the following formula:

[0116] Ys*FAudiot=R(Hz)

[0117] Among them, Y(s) represents the pre-stored user habit information, Audio(t) represents the audio signal to be played, t represents the time domain, F represents Fourier transform, F[Audio(t)] means time-frequency conversion of the audio signal to be played, R(Hz) represents the second masked sound frequency, and Hz represents the frequency domain.

[0118] In step S204, the control device performs an AND process on the first masked sound frequency and the second masked sound frequency to obtain a masked sound frequency set, that is, the masked sound frequency set is RHz+NHz. For example, if the first masked sound frequency is 20-1000Hz and the second masked sound frequency is 4000-5000Hz, then the masked sound frequency set obtained by the control device is 20-1000Hz and 4000-5000Hz.

[0119] In step S205, the control device processes the audio signal to be played, adjusts the sound signal related to the masked sound frequency set in the audio signal to be played, and uses the processed audio signal as a reference sound signal. The adjustment method may be, for example, to remove the sound signal in the audio signal to be played that belongs to the masked sound frequency set; for another example, the amplitude of the sound signal in the audio signal to be played that belongs to the masked sound frequency set may be reduced. For example, the audio signal to be played includes a sound signal of 20-8000Hz, and the masked sound frequency set is 20-1000Hz and 4000-5000Hz, then the audio signal after removing the sound signal related to the masked sound frequency set, that is, the reference sound signal includes 1000-4000Hz and 5000-8000Hz. The control device can obtain the reference sound signal by the following formula:

[0120] NewAudiot=RHz+NHz*Audiot

[0121] Wherein, NewAudio(t) represents the reference sound signal, N(Hz) represents the first masked sound frequency, R(Hz) represents the second masked sound frequency, and Audio(t) represents the audio signal to be played.

[0122] In step S206, temperature optimization information is obtained based on the reference sound signal and the audio signal to be played, including:

[0123] Obtain a pre-stored temperature optimization model;

[0124] Input a reference sound signal and an audio signal to be played into a temperature optimization model to obtain temperature optimization information;

[0125] and / or,

[0126] Based on the reference sound signal and the audio signal to be played, power consumption optimization information is obtained, including:

[0127] Obtain a pre-stored power consumption optimization model;

[0128] A reference sound signal and an audio signal to be played are input into the power consumption optimization model to obtain power consumption optimization information.

[0129] The electronic device has a temperature optimization model and a power consumption optimization model pre-stored therein. The control device removes or weakens the reference sound signal and the audio signal to be played from the sound signal related to the masked sound frequency set and inputs them into the temperature optimization model and the power consumption optimization model to obtain temperature optimization information and power consumption optimization information. The control device can obtain the temperature optimization information and the power consumption optimization information through the following formula:

[0130]

[0131]

[0132] Among them, Audio(t) represents the audio signal to be played, NewAudio(t) represents the optimized audio signal, L represents Laplace transform, T(s) represents temperature optimization information, and P(s) represents power consumption optimization information.

[0133] Here, it should be noted that although Laplace transform is performed in the above two formulas, when obtaining temperature optimization information, a Laplace transform model related to temperature is used; when obtaining power consumption optimization information, a Laplace transform model related to power consumption is used.

[0134] When the control device learns from the temperature sensor that the electronic device is not overheated, the control device may not perform temperature optimization and / or power consumption optimization on the audio information to be played. The control device may also set a temperature threshold for the electronic device. When the temperature of the electronic device exceeds the threshold, the temperature optimization and / or power consumption optimization is performed on the audio signal to be played when the speaker plays the audio signal.

[0135] In step S207, the control device obtains the filter coefficient according to the following formula:

[0136] Mt=Ps*Ts*C

[0137] Among them, M(t) represents the filter coefficient, P(s) represents the power consumption optimization information, T(s) represents the temperature optimization information, and C represents the feedback signal.

[0138] In some embodiments, step S208 processes the audio signal to be played based on the filter coefficient to obtain an optimized audio signal, including:

[0139] Performing sound effect processing on the audio signal to be played to obtain an intermediate audio signal;

[0140] The intermediate audio signal is filtered based on the filter coefficient to obtain an optimized audio signal.

[0141] In order to provide users with a richer audio experience, the control device performs sound effect processing on the audio signal to be played, such as Dolby sound effect processing, Xiaomi sound effect processing, etc. The control device uses the audio signal to be played after sound effect processing as an intermediate audio signal, and filters the intermediate audio signal according to the filter coefficient to obtain an optimized audio signal.

[0142] In the present disclosure, the control device can optimize the input audio signal in real time according to the user's environment and personal habits, so that the optimized audio signal after filtering played by the speaker will not change due to changes in the user's environment, giving the user a stable audio usage experience, and effectively improving the high power consumption problem of external speakers of electronic devices, thereby achieving the effect of reducing power consumption and avoiding the phenomenon of heating of electronic devices due to external speakers.

[0143] An exemplary embodiment of the present disclosure provides a control device for a speaker. Figure 3 As shown, a block diagram of a speaker control device shown in the present disclosure.

[0144] The block diagram includes: a first acquisition module 31, an optimization module 32, a second acquisition module 33, and a processing module 34. The first acquisition module 31 is used to acquire a first masked sound frequency, which is related to the environment in which the electronic device is located; the first acquisition module 31 is also used to acquire a second masked sound frequency based on the audio signal to be played; the first acquisition module 31 is also used to acquire a feedback signal of a speaker; the optimization module 32 is used to acquire temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency and the audio signal to be played; the second acquisition module 33 is used to acquire a filter coefficient based on the temperature optimization information, the power consumption optimization information and the feedback signal; the processing module 34 is used to process the audio signal to be played based on the filter coefficient, acquire an optimized audio signal and play the optimized audio signal.

[0145] In an exemplary embodiment of the present disclosure, the optimization module 32 is also used to: obtain a masked sound frequency set based on a first masked sound frequency and a second masked sound frequency; process an audio signal to be played based on the masked sound frequency set, adjust a sound signal related to the masked sound frequency set in the audio signal to be played, and obtain a reference sound signal; obtain temperature optimization information and power consumption optimization information based on the reference sound signal and the audio signal to be played.

[0146] In an exemplary embodiment of the present disclosure, the optimization module 32 is also used to: obtain a pre-stored temperature optimization model; input a reference sound signal and an audio signal to be played into the temperature optimization model to obtain temperature optimization information; and / or obtain a pre-stored power consumption optimization model; input a reference sound signal and an audio signal to be played into the power consumption optimization model to obtain power consumption optimization information.

[0147] In an exemplary embodiment of the present disclosure, the first acquisition module 31 is also used to: perform time-frequency conversion on the audio signal to be played to obtain harmonic information in the frequency domain; analyze the harmonic information to obtain timbre difference information in the audio signal to be played; and obtain the second masked sound frequency based on the timbre difference information.

[0148] In an exemplary embodiment of the present disclosure, the first acquisition module 31 is also used to: obtain a pending second masked sound frequency based on timbre difference information; obtain pre-stored user habit information, which is related to frequency; compensate for the pending second masked sound frequency based on the user habit information to obtain the second masked sound frequency.

[0149] In an exemplary embodiment of the present disclosure, the first acquisition module 31 is further used to: acquire location information of the electronic device; acquire environment information of the electronic device based on the location information; and acquire a first masked sound frequency corresponding to the environment information based on pre-stored configuration information and environment information.

[0150] In an exemplary embodiment of the present disclosure, the processing module 34 is further used to: perform sound effect processing on the audio signal to be played to obtain an intermediate audio signal; and filter the intermediate audio signal based on a filter coefficient to obtain an optimized audio signal.

[0151] Regarding the control device for the speaker in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0152] Figure 4 4 is a block diagram of an electronic device 400 according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

[0153] Reference Figure 4 , the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0154] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.

[0155] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0156] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.

[0157] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0158] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0159] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0160] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0161] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0162] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0163] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of an electronic device 400 to complete the above-mentioned speaker control method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0164] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables a processing device of the electronic device to execute a speaker control method provided by an exemplary embodiment of the present disclosure.

[0165] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0166] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for controlling a speaker, It is characterized in that Applied to an electronic device having a speaker, the control method comprises: Acquire a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located; Based on the audio signal to be played, obtaining a second masked sound frequency; Obtaining a feedback signal from the speaker; Based on the first masked sound frequency, the second masked sound frequency and the audio signal to be played, obtaining temperature optimization information and power consumption optimization information; Obtaining a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal; The audio signal to be played is processed based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

2. The method for controlling a speaker according to claim 1, It is characterized in that The method of obtaining temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency, and the audio signal to be played includes: Obtaining a masked sound frequency set based on the first masked sound frequency and the second masked sound frequency; Processing the audio signal to be played based on the masked sound frequency set, adjusting the sound signal related to the masked sound frequency set in the audio signal to be played, and obtaining a reference sound signal; The temperature optimization information and the power consumption optimization information are obtained based on the reference sound signal and the audio signal to be played.

3. The method for controlling a speaker according to claim 2, It is characterized in that The step of obtaining the temperature optimization information based on the reference sound signal and the audio signal to be played includes: Obtain a pre-stored temperature optimization model; Inputting the reference sound signal and the audio signal to be played into the temperature optimization model to obtain the temperature optimization information; and / or, The step of obtaining the power consumption optimization information based on the reference sound signal and the audio signal to be played includes: Obtain a pre-stored power consumption optimization model; The reference sound signal and the audio signal to be played are input into the power consumption optimization model to obtain the power consumption optimization information.

4. The method for controlling a speaker according to claim 1, It is characterized in that Acquiring a second masked sound frequency based on the audio signal to be played, comprising: Performing time-frequency conversion on the audio signal to be played to obtain harmonic information in the frequency domain; Analyzing the harmonic information to obtain timbre difference information in the audio signal to be played; Based on the timbre difference information, a second masked sound frequency is obtained.

5. The method for controlling a speaker according to claim 4, It is characterized in that Based on the timbre difference information, obtaining a second masked sound frequency includes: Based on the timbre difference information, obtaining a second masked sound frequency to be determined; Acquire pre-stored user habit information, where the user habit information is related to frequency; The undetermined second masked sound frequency is compensated based on the user habit information to obtain the second masked sound frequency.

6. The method for controlling a speaker according to claim 1, It is characterized in that Obtaining the first masked sound frequency, including: Acquiring location information of the electronic device; Based on the location information, obtaining environment information of the electronic device; Based on the pre-stored configuration information and the environmental information, the first masked sound frequency corresponding to the environmental information is obtained.

7. The method for controlling a speaker according to claim 1, It is characterized in that Processing the audio signal to be played based on the filter coefficient to obtain an optimized audio signal includes: Performing sound effect processing on the audio signal to be played to obtain an intermediate audio signal; The intermediate audio signal is filtered based on the filter coefficient to obtain the optimized audio signal.

8. A control device for a loudspeaker, It is characterized in that Applied to an electronic device having a speaker, the control device comprises: A first acquisition module, configured to acquire a first masked sound frequency, where the first masked sound frequency is related to an environment where the electronic device is located; The first acquisition module is further used to acquire a second masked sound frequency based on the audio signal to be played; The first acquisition module is further used to acquire a feedback signal from the speaker; an optimization module, configured to obtain temperature optimization information and power consumption optimization information based on the first masked sound frequency, the second masked sound frequency, and the audio signal to be played; A second acquisition module, configured to obtain a filter coefficient according to the temperature optimization information, the power consumption optimization information and the feedback signal; The processing module is used to process the audio signal to be played based on the filter coefficient to obtain an optimized audio signal and play the optimized audio signal.

9. The speaker control device according to claim 8, It is characterized in that The optimization module is also used to: Obtaining a masked sound frequency set based on the first masked sound frequency and the second masked sound frequency; Processing the audio signal to be played based on the masked sound frequency set, adjusting the sound signal related to the masked sound frequency set in the audio signal to be played, and obtaining a reference sound signal; The temperature optimization information and the power consumption optimization information are obtained based on the reference sound signal and the audio signal to be played.

10. An electronic device, It is characterized in that The electronic device comprises: Display screen; speaker; processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions in the memory to implement the steps of the speaker control method according to any one of claims 1 to 7.

11. A non-transitory computer-readable storage medium having executable instructions stored thereon, It is characterized in that When the executable instruction is executed by the processor, the control method of the speaker as claimed in any one of claims 1 to 7 is implemented.