Method for determining frequency response calibration parameters, frequency response calibration method

By acquiring and optimizing big data on frequency response, determining the target frequency response value and calibration gain value, and constructing a calibration filter, the problem of inconsistent frequency response of sound-generating devices in terminal equipment was solved, improving the accuracy of frequency response calibration and user experience.

CN120455915BActive Publication Date: 2026-03-10HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Fluctuations in the frequency response performance of sound-generating devices in terminal equipment can lead to inconsistent auditory perception and negatively impact user experience.

Method used

By acquiring large data on the frequency response of multiple candidate devices, the target frequency response value is determined, and iterative calibration is performed until the dispersion is less than the threshold. The center frequency point and calibration gain value are selected, and a calibration filter is constructed to perform frequency response calibration, thereby optimizing the frequency band division and the target response value.

Benefits of technology

This improved the accuracy of frequency response calibration, ensured the consistency of frequency response performance of sound-generating devices, and enhanced production line efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455915B_ABST
    Figure CN120455915B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of frequency response calibration parameter determination method.The method, obtain the frequency response big data of multiple candidate devices;Based on the frequency response big data, determine the target frequency response value matched with preset frequency point of interest;Select part of frequency point in frequency point of interest, to be as the center frequency point of frequency response calibration to be carried out;According to the initial frequency response value of each center frequency point and target frequency response value based on target candidate device, determine the calibration gain value matched with each center frequency point;According to calibration gain value, the initial frequency response value of target candidate device is calibrated, and the calibrated frequency response value is obtained;In the case where the dispersion of the calibrated frequency response value of multiple candidate devices is less than pre-set threshold, or the number of cyclic operations reaches pre-set number threshold, the center frequency point corresponding to the minimum dispersion, and the target frequency response value and random quality factor matched with the center frequency point are used as frequency response calibration parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method for determining frequency response calibration parameters, a frequency response calibration method, and an electronic device. Background Technology

[0002] With the development of internet technology, people's demand for terminal products is increasing. Currently, many terminal devices are equipped with sound-generating devices to enable voice communication or audio playback functions. When playing sound signals through these devices, the frequency response performance of the sound-generating devices affects the sound quality of the terminal devices.

[0003] When the frequency response performance of a sound-generating device to a sound signal fluctuates or deviates from the standard frequency response curve, inconsistent hearing can occur, affecting the user's experience. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a method for determining frequency response calibration parameters and a frequency response calibration method. In this method, large amounts of frequency response data from multiple candidate devices are acquired; based on the large amounts of frequency response data, target frequency response values ​​matching preset points of interest are determined; the following operations are performed iteratively until the dispersion of the calibrated frequency response value is less than a preset dispersion threshold, or the number of iterations reaches a preset threshold: at least some frequency points are selected from the preset points of interest as center frequency points to be calibrated; based on the initial frequency response values ​​and target frequency response values ​​of the target candidate devices at each center frequency point, calibration gain values ​​matching each center frequency point are determined; based on the calibration gain values, the initial frequency response values ​​of the target candidate devices are calibrated to obtain calibrated frequency response values; the number of iterations and the dispersion of the calibrated frequency response values ​​of multiple candidate devices are calculated; if the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or the number of iterations reaches a preset threshold, the center frequency point corresponding to the minimum dispersion, the target frequency response value matching the center frequency point, and the random quality factor are used as frequency response calibration parameters.

[0005] In a first aspect, embodiments of this application provide a method for determining frequency response calibration parameters, comprising: acquiring initial frequency response values ​​of multiple candidate devices based on preset frequency points of interest to obtain large frequency response data; determining target frequency response values ​​matching each of the frequency points of interest based on the large frequency response data; repeatedly performing the following operations until the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or the number of repeated operations reaches a preset number threshold: selecting a portion of frequency points from the frequency points of interest as center frequency points to be calibrated; determining the target frequency response values ​​matching each of the initial frequency response values ​​of the target candidate devices based on each of the center frequency points and the target frequency response values. The calibration gain value matched to each of the aforementioned center frequency points, wherein the target candidate device includes any candidate device among the plurality of candidate devices; the initial frequency response value of the target candidate device is calibrated according to the calibration gain value to obtain a calibrated frequency response value; the number of loop operations and the dispersion of the calibrated frequency response value of the plurality of candidate devices are calculated; and if the dispersion of the calibrated frequency response value is less than a preset dispersion threshold, or the number of loop operations reaches a preset number threshold, the center frequency point corresponding to the minimum dispersion, the target frequency response value matched with the center frequency point, and the random quality factor are used as the frequency response calibration parameters.

[0006] This application embodiment allows the use of the same frequency band division parameters for all devices to be calibrated. Frequency response calibration parameters can be pushed to the devices as version update parameters, while the devices only need to store their own frequency response data. Pushing frequency response calibration parameters as version update parameters effectively decouples frequency response calibration from production line production. This improves production line efficiency and ensures that all machines are simultaneously updated to the latest frequency response calibration parameters.

[0007] By continuously collecting big data on frequency response in the project, the calibration frequency band division and target frequency response value can be optimized, which is beneficial to improving the accuracy of frequency response calibration and ensuring the consistency of frequency response performance of different sound-generating devices.

[0008] According to the first aspect, determining the target frequency response value matching each of the said frequency points of interest based on the frequency response big data includes: calculating the average of the initial frequency response values ​​of the plurality of candidate devices based on each of the said frequency points of interest; and adjusting the average of the initial frequency response values ​​based on a preset calibration gain range to obtain the target frequency response value matching each of the said frequency points of interest.

[0009] According to the first aspect, or any implementation of the first aspect above, the step of selecting a subset of frequency points from the frequency points of interest as the center frequency points to be calibrated includes: setting N candidate calibration frequency bands, each of the N candidate calibration frequency bands having a corresponding preset importance level, where N is an integer greater than 1; and randomly selecting N frequency points from the frequency points of interest as the center frequency points to be calibrated according to a preset frequency point spacing threshold and the importance level corresponding to each candidate calibration frequency band.

[0010] According to the first aspect, or any implementation of the first aspect above, determining the calibration gain value matching each of the center frequency points based on the initial frequency response value and the target frequency response value of the target candidate device based on each of the center frequency points includes: calculating the difference between the initial frequency response value and the target frequency response value of the target candidate device based on each of the center frequency points, and using the difference as the calibration gain value matching the corresponding center frequency point.

[0011] According to the first aspect, or any implementation thereof, calibrating the initial frequency response value of the target candidate device based on the calibration gain value to obtain the calibrated frequency response value includes: determining N initial calibration frequency bands based on each center frequency point and a random quality factor matching each center frequency point; updating the random quality factor and / or center frequency point corresponding to the overlapping frequency bands when there are overlapping frequency bands among the N initial calibration frequency bands, and re-determining the corresponding initial calibration frequency bands based on the updated random quality factor and / or updated center frequency point, until the N initial calibration frequency bands do not overlap; generating N target calibration frequency bands based on the band cutoff frequencies of adjacent frequency bands among the N non-overlapping initial calibration frequency bands; constructing a calibration filter based on each target calibration frequency band and the calibration gain value matching each target calibration frequency band; and calibrating the initial frequency response value of the target candidate device using the calibration filter to obtain the calibrated frequency response value.

[0012] According to the first aspect, or any implementation of the first aspect above, generating N target calibration frequency bands based on the band cutoff frequencies of adjacent frequency bands among the N non-overlapping initial calibration frequency bands includes: for the i-th initial calibration frequency band and the (i+1)-th initial calibration frequency band among the N initial calibration frequency bands, taking the average of the right cutoff frequency of the i-th initial calibration frequency band and the left cutoff frequency of the (i+1)-th initial calibration frequency band as the adjusted band cutoff frequency, where i is an integer and 1≤i≤N-1; and generating the N target calibration frequency bands based on the adjusted band cutoff frequency.

[0013] According to the first aspect, or any implementation of the first aspect above, the method further includes: using a preset minimum band cutoff frequency as the left cutoff frequency of the first target calibration band among the N target calibration bands; and using a preset maximum band cutoff frequency as the right cutoff frequency of the Nth target calibration band among the N target calibration bands.

[0014] According to the first aspect, or any implementation thereof, obtaining the initial frequency response values ​​of multiple candidate devices based on a preset frequency point of interest includes: playing a test audio signal using each of the candidate devices to obtain a frequency response curve matching each of the candidate devices, the frequency response curve indicating the initial frequency response value of the candidate device based on the frequency point of interest; calibrating the initial frequency response value of the target candidate device using the calibration filter to obtain the calibrated frequency response value includes: calibrating the frequency response curve matching the target candidate device using the calibration filter, the calibrated frequency response curve indicating the calibrated frequency response value of the target candidate device.

[0015] According to the first aspect, or any implementation of the first aspect above, the test audio signal is a full-frequency domain scanning signal.

[0016] According to the first aspect, or any implementation of the first aspect above, calibrating the frequency response curve matching the target candidate device using the calibration filter includes: determining a candidate frequency point matching the frequency point of interest based on a preset mapping relationship; and calibrating the frequency response curve using the calibration filter according to the calibration gain value of the target candidate device based on the candidate frequency point to obtain the calibrated frequency response curve.

[0017] According to the first aspect, or any implementation of the first aspect above, the step of calculating the dispersion of the calibrated frequency response values ​​of the plurality of candidate devices includes: calculating the variance of the calibrated frequency response curves of the plurality of candidate devices; and performing a weighted summation of the variances corresponding to each of the frequency points of interest according to a preset attention level matched with each of the frequency points of interest, wherein the weighted summation result indicates the dispersion of the calibrated frequency response values, and wherein the attention level is a weight value assigned according to the contribution value of the corresponding frequency point of interest to the loudness in the ear.

[0018] According to the first aspect, or any implementation of the first aspect above, the method further includes: sending the frequency response calibration parameters as version update parameters to the device to be calibrated.

[0019] Secondly, embodiments of this application provide a frequency response calibration method applied to a device to be calibrated. The method includes: receiving version update parameters, the version update parameters including a center frequency point, a random quality factor based on the center frequency point, and a target frequency response value; in response to the received version update parameters, acquiring locally stored frequency response data, the frequency response data including initial frequency response values ​​of the device to be calibrated based on each of the center frequency points; determining a calibration gain value matching each of the center frequency points based on the initial frequency response values ​​and the target frequency response value based on each of the center frequency points; constructing a calibration filter based on the center frequency point, the random quality factor matching the center frequency point, and the calibration gain value; and using the calibration filter to calibrate the frequency response value of the device to be calibrated for an audio signal to be played, to obtain a calibrated audio signal.

[0020] According to the second aspect, determining the calibration gain value matching each of the center frequency points based on the initial frequency response value and the target frequency response value of each of the center frequency points includes: calculating the difference between the initial frequency response value and the target frequency response value of the device to be calibrated based on each of the center frequency points, and using the difference as the calibration gain value of the device to be calibrated based on the corresponding center frequency point.

[0021] According to the second aspect, or any implementation thereof, the step of constructing a calibration filter based on the center frequency point, the random quality factor matching the center frequency point, and the calibration gain value includes: determining N initial calibration frequency bands based on each center frequency point and the random quality factor matching each center frequency point; if there are overlapping frequency bands among the N initial calibration frequency bands, updating the random quality factor and / or center frequency point corresponding to the overlapping frequency bands, and re-determining the corresponding initial calibration frequency bands based on the updated random quality factor and / or updated center frequency point, until the N initial calibration frequency bands do not overlap; generating N target calibration frequency bands based on the band cutoff frequencies of adjacent frequency bands among the N non-overlapping initial calibration frequency bands; and constructing a calibration filter based on each target calibration frequency band and the calibration gain value matching each target calibration frequency band.

[0022] According to the second aspect, or any implementation thereof, the step of using the calibration filter to calibrate the frequency response value of the device to be calibrated for the audio signal to be played, and obtaining the calibrated audio signal, includes: performing a Fourier transform on the audio signal to be played played by the device to be calibrated to obtain a transformed frequency domain signal; and using the calibration filter to calibrate the transformed frequency domain signal to obtain the calibrated audio signal.

[0023] Thirdly, embodiments of this application provide an electronic device, including: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: acquiring initial frequency response values ​​of multiple candidate devices based on preset frequency points of interest, obtaining large frequency response data; determining target frequency response values ​​matching each of the frequency points of interest based on the large frequency response data; repeatedly performing the following operations until the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or the number of repeated operations reaches a preset number threshold: selecting a portion of frequency points from the frequency points of interest as center frequency points to be calibrated; according to The target candidate device determines a calibration gain value matching each of the center frequency points based on the initial frequency response value and the target frequency response value of each of the center frequency points. The target candidate device includes any candidate device among the plurality of candidate devices. According to the calibration gain value, the initial frequency response value of the target candidate device is calibrated to obtain a calibrated frequency response value. The number of loop operations and the dispersion of the calibrated frequency response value of the plurality of candidate devices are calculated. If the dispersion of the calibrated frequency response value is less than a preset dispersion threshold, or the number of loop operations reaches a preset number threshold, the center frequency point corresponding to the minimum dispersion, the target frequency response value matching the center frequency point, and the random quality factor are used as the frequency response calibration parameters.

[0024] Fourthly, embodiments of this application provide an electronic device, including: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: receiving version update parameters, the version update parameters including a center frequency point and a random quality factor and a target frequency response value based on the center frequency point; in response to the received version update parameters, acquiring locally stored frequency response data, the frequency response data including an initial frequency response value of the device to be calibrated based on each of the center frequency points; determining a calibration gain value matching each of the center frequency points based on the initial frequency response value and the target frequency response value based on each of the center frequency points; constructing a calibration filter based on each of the center frequency points and the calibration gain value matching each of the center frequency points; and calibrating the frequency response value of the device to be calibrated for an audio signal to be played using the calibration filter to obtain a calibrated audio signal.

[0025] Fifthly, embodiments of this application provide a computer-readable storage medium including a computer program that, when run on an electronic device, causes the electronic device to execute instructions of a method as in any possible implementation of the first aspect, or instructions of a method as in any possible implementation of the second aspect. Attached Figure Description

[0026] Figure 1 This illustration shows a user holding a mobile phone for voice communication.

[0027] Figure 2 A schematic diagram illustrating the distribution of the sound-generating components in a mobile phone is shown.

[0028] Figure 3 A schematic diagram illustrating the frequency response curves of devices of the same specifications is shown.

[0029] Figure 4 A schematic diagram of a frequency response calibration system is shown.

[0030] Figure 5 A schematic diagram illustrating a method for determining frequency response calibration parameters is shown.

[0031] Figure 6 A schematic diagram illustrating the weight distribution corresponding to the frequency points is provided.

[0032] Figure 7 A schematic diagram of the hardware structure of an electronic device as an example;

[0033] Figure 8 A software architecture block diagram of an electronic device as an example;

[0034] Figure 9 A schematic diagram illustrating a frequency response calibration process is shown.

[0035] Figure 10 The diagram illustrates the frequency response calibration process during a call. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0037] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0038] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0039] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0040] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0041] Voice communication or audio playback functions have become essential features of electronic devices (such as mobile phones). Taking voice communication as an example, in the process of providing voice communication functionality to users, the electronic device's sound-generating device converts audio electrical signals from other devices into sound signals and outputs them. For example, the sound-generating device can be the mobile phone's earpiece, which is also the speaker used for voice communication.

[0042] Figure 1 This illustration shows a user holding a mobile phone for voice communication. Figure 1 As shown, during voice communication using mobile phone 101, the sound outlet of the phone's earpiece 102 is close to the user's ear. The earpiece 102 is used to play the sound signal from the user on the other side during voice communication. If the sound outlet of the phone's earpiece 102 cannot be covered by the user's ear, the sound emitted from the outlet may be heard by other users, resulting in the leakage of voice communication content.

[0043] Figure 2The diagram illustrates the distribution of sound-producing devices in a mobile phone. Privacy calls are a highly anticipated mobile phone call function. In privacy call scenarios, the phone may have two sound-producing devices to compensate for call leakage. As shown in 2A, the two sound-producing devices can be the earpiece and a ceramic speaker. The earpiece emits sound through the earpiece's sound outlet or a small slit, while the ceramic speaker emits sound by pushing the screen. As shown in 2B, both sound-producing devices can also be earpieces. The phone has earpiece 1 and earpiece 2. Earpiece 1 emits sound through the earpiece 1 channel and a small slit, while earpiece 2 emits sound through the earpiece 2 channel and a sound outlet.

[0044] Figure 2 The sound-generating devices and structural layout shown are for illustrative purposes only and do not limit the application scenarios of the embodiments of this application.

[0045] In related technologies, to solve the problem of earpiece sound leakage, during voice communication with the user, a first sound signal is played through one sound-emitting device in the phone, and a second sound signal is played through another sound-emitting device. The second sound signal and the first sound signal are out of phase at the leakage point. Because the second sound signal and the first sound signal are out of phase, the two corresponding sound waves cancel each other out during propagation, which can effectively reduce earpiece sound leakage and reduce the leakage of voice communication content. In other words, the problem of earpiece sound leakage can be effectively alleviated by using dual-unit hardware to emit anti-phase sound waves for cancellation.

[0046] To facilitate mass production, the hardware of electronic devices is now basically produced using a modular manufacturing approach. For example, frequency response curves are obtained by testing the speakers of individual prototypes, sound field reproduction control algorithms are used to calculate speaker coefficients, and these coefficients are then applied to the speakers of all devices.

[0047] Figure 3 The diagram illustrates the frequency response curves of devices with the same specifications. However, due to batch variations in materials and individual hardware differences in end devices, the frequency response performance of devices with the same specifications manufactured by the same company may differ. For example... Figure 3 As shown, the frequency response curves of devices with the same specifications can exhibit a dispersion of up to 10 dB. This demonstrates that even devices with the same specifications may have inconsistent frequency response performance. Applying parameters obtained from testing individual prototypes to other devices in batches may result in a decrease in the frequency response performance of the sound-generating devices.

[0048] Calibrate the frequency response performance of the sound-generating device to ensure that its frequency response curve to the sound signal is consistent, which can be an effective way to improve the applicability of calibration parameters.

[0049] Electronic devices can include mobile phones, tablets, smartwatches, laptops, smart home devices, in-vehicle devices, virtual and real fusion devices, augmented reality devices, netbooks, etc.

[0050] This application proposes a scheme for determining frequency response calibration parameters, applied to a calibration device. In this scheme, the calibration device acquires initial frequency response values ​​of multiple candidate devices based on preset frequency points of interest, obtaining large-scale frequency response data. Based on this large-scale frequency response data, target frequency response values ​​matching each frequency point of interest are determined. Next, the following operations are performed iteratively until the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or the number of iterations reaches a preset threshold: A subset of frequency points are selected from the frequency points of interest as center frequencies for frequency response calibration; based on the initial and target frequency response values ​​of the target candidate devices at each center frequency point, a calibration gain value matching each center frequency point is determined. The target candidate devices include any candidate device from the multiple candidate devices. The initial frequency response values ​​of the target candidate devices are calibrated according to the calibration gain values ​​to obtain calibrated frequency response values. Next, the number of iterations and the dispersion of the calibrated frequency response values ​​of the multiple candidate devices are calculated. Then, if the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or the number of iterations reaches a preset threshold, the target frequency response values ​​based on each center frequency point are used as the frequency response calibration parameters.

[0051] The embodiments of this application can achieve frequency response calibration and optimization of devices during the production line stage, which can effectively save production line time and improve production line efficiency. In addition, it can effectively prevent errors or interim calibration results from being hardcoded into electronic devices during the production line stage, which would affect the subsequent frequency response performance of electronic devices, reduce the audio playback performance of electronic devices, and affect the user experience.

[0052] By continuously collecting big data on frequency response in the project, the calibration frequency band division and target frequency response value can be optimized, which is beneficial to improving the accuracy of frequency response calibration and ensuring the consistency of frequency response performance of different sound-generating devices.

[0053] Figure 4 A schematic diagram of a frequency response calibration system is shown. Figure 4As shown, a frequency response calibration system may include electronic equipment and a calibration parameter optimization system. The calibration parameter optimization system may include calibration equipment and multiple candidate devices. When frequency response performance calibration of a sound-generating device in an electronic device is required, the calibration equipment pushes frequency response calibration parameters as version update parameters to the electronic device. Frequency response calibration parameters may include, for example, a center frequency point, a target frequency response value matching the center frequency point, and a random quality factor. The target frequency response value can be determined based on the large amount of frequency response data acquired by the calibration equipment. After the electronic device to be calibrated obtains the frequency response calibration parameters, it can store these parameters in a local non-volatile storage device. This allows the electronic device to perform consistency verification of the frequency response performance of the sound-generating device during voice communication or audio signal playback, thereby ensuring consistent frequency response curves of the sound-generating devices in the electronic device.

[0054] The calibration equipment may include a frequency response big data acquisition module, a calibration parameter determination module, and a calibration control module. The frequency response big data acquisition module acquires the frequency response curves of multiple candidate devices for a test audio signal, obtaining frequency response big data. The calibration parameter determination module determines target frequency response values ​​matching each preset frequency point of interest, based on the initial frequency response values ​​of the multiple candidate devices indicated by the frequency response big data. The calibration parameter determination module also determines frequency response calibration parameters based on the target frequency response values ​​matching each frequency point of interest. The calibration control module establishes a communication connection with the electronic device to be calibrated. For example, the calibration control module can send version update parameters to the electronic device, or it can also be used to receive frequency response calibration requests sent by the electronic device.

[0055] Figure 5 A schematic flowchart illustrating a method for determining frequency response calibration parameters is provided. This method is applicable to calibration equipment, which may include, for example, a frequency response big data acquisition module, a calibration parameter determination module, and a calibration control module. The calibration parameter determination module may include, for example, a frequency response calibration parameter determination module, a loop control module, a filter construction module, and a filter calibration module. Figure 5 As shown, the process of determining the frequency response calibration parameters includes, for example, operations S101 to S111.

[0056] The following is a schematic illustration of the implementation process of each operation in determining the frequency response calibration parameters.

[0057] Operation S101 allows the frequency response big data acquisition module to acquire the initial frequency response values ​​of multiple candidate devices based on preset frequency points of interest, thus obtaining frequency response big data.

[0058] For example, a test audio signal is played using multiple candidate devices to obtain frequency response curves matching each candidate device. For instance, the test audio signal can be played using the speakers of multiple candidate devices; the test audio signal can be a full-frequency sweep signal. The frequency response big data acquisition module calculates the frequency response based on the test audio signal played by each candidate device, obtaining the initial frequency response value of each candidate device based on a specific frequency point.

[0059] For example, Table 1 schematically shows the initial frequency response values ​​of candidate devices based on frequency points.

[0060] Table 1

[0061] frequency 200 212 224 236 … 8500 9000 9500 10000 frequency response 51.2 52.8 54 55.5 … 101.3 102 102.2 103

[0062] Optionally, the initial frequency response values ​​of each candidate device at a frequency point can be plotted to obtain the frequency response curve.

[0063] There is no one-to-one correspondence between frequency points, but there can be a preset mapping relationship between them. For example, using Freq to represent a frequency point and FreqIdx to represent the nearest frequency point to Freq, the preset mapping relationship between FreqIdx and Freq can be expressed using equation (1):

[0064]

[0065] The round function is used to round a number to a specified number of digits. N / / 2 means the integer quotient of N divided by 2.

[0066] If a 1024-point FFT transform is used, the mapping relationship between frequency point Freq and frequency point FreqIdx can be shown in Table 2:

[0067] Table 2

[0068] frequency 200 212 224 236 … 8500 9000 9500 10000 frequency 4 5 5 5 182 192 203 214

[0069] In operation S102, the frequency response calibration parameter determination module determines the target frequency response value that matches each frequency point of interest based on the big data of frequency response.

[0070] For example, the frequency response calibration parameter determination module calculates the mean of the initial frequency response values ​​of multiple candidate devices based on each frequency point of interest, and adjusts the mean of the initial frequency response values ​​based on a preset calibration gain range to obtain a target frequency response value that matches each frequency point of interest.

[0071] The frequency response calibration parameter determination module can use the average of the initial frequency response values ​​of multiple candidate devices based on each frequency point of interest as the target frequency response value to match the corresponding frequency point of interest. The module can also adjust the average of the initial frequency response values ​​as needed within a preset calibration gain range to obtain the target frequency response value matching each frequency point of interest. For example, the average of the initial frequency response values ​​can be adjusted according to in-ear hearing requirements, resulting in a target frequency response value that better suits the user's hearing needs.

[0072] In operation S103, the loop control module determines whether the dispersion of the frequency response value after calibration is less than the preset dispersion threshold, or whether the number of loop operations has reached the preset number threshold.

[0073] If the dispersion of the frequency response value after calibration is less than a preset dispersion threshold, or if the number of cyclic operations reaches a preset number threshold, operation S108 is executed.

[0074] If the dispersion of the frequency response value after calibration is greater than or equal to the preset dispersion threshold, and the number of loop operations has not reached the preset number threshold, operation S104 is executed.

[0075] In operation S104, the filter construction module selects at least some frequency points from the preset frequency points of interest as the center frequency points to be calibrated for frequency response.

[0076] For example, the filter construction module sets N candidate calibration frequency bands, and each of the N candidate calibration frequency bands has a corresponding preset importance level, where N is an integer greater than 1. According to the importance level corresponding to each candidate calibration frequency band, the candidate calibration frequency bands can be divided into important frequency bands, unimportant frequency bands, attention frequency bands, and no attention frequency bands, etc.

[0077] Next, the filter construction module can randomly select N frequency points from the frequency points of interest based on the preset frequency point spacing threshold and the importance level corresponding to each candidate calibration frequency band, as the center frequency points to be calibrated.

[0078] For example, if the number of preset frequency points of interest is M, and the number of candidate calibration frequency bands is N, where N << M, the filter construction module randomly selects N frequency points from the M preset frequency points of interest as the center frequency point Fc to be calibrated. The search space of Fc is... To prevent the search space of Fc from becoming too large, constraints can be imposed on the search space of Fc, and search results that do not meet the constraints can be removed.

[0079] As an optional approach, the filter construction module can constrain the search space of Fc based on a preset frequency point spacing threshold and the importance level corresponding to each candidate calibration frequency band. For example, if the selected center frequency point appears in a non-interested frequency band, or if the number of points appearing in unimportant frequency bands exceeds a preset threshold, the current random selection result is discarded, and the process returns to randomly selecting at least some frequency points from the preset frequencies of interest. As another example, if the frequency point spacing of the selected center frequency points is less than a preset minimum frequency point spacing threshold (indicating that the frequency point distribution is too concentrated), or greater than a preset maximum frequency point spacing threshold (indicating that the frequency point distribution is too sparse), the current random selection result is discarded, and the process returns to randomly selecting at least some frequency points from the preset frequencies of interest.

[0080] In operation S105, the filter construction module determines the calibration gain value that matches each center frequency point based on the initial frequency response value and target frequency response value of the target candidate device at each center frequency point. The target candidate device includes any candidate device from multiple candidate devices.

[0081] For example, the filter construction module calculates the difference between the initial frequency response value of the target candidate device based on each center frequency point and the target frequency response value, and uses the difference as the calibration gain value matched with the corresponding center frequency point. The target candidate device can be any candidate device among multiple candidate devices.

[0082] For example, equation (2) can be used to represent the calibration gain value Gain that matches the center frequency point Fc. Fc :

[0083]

[0084] FR represents the target frequency response value matched with the center frequency point Fc. Fc This represents the initial frequency response value of the candidate device based on the center frequency point Fc.

[0085] In operation S106, the filter construction module constructs a calibration filter based on the center frequency point and the calibration gain value and random quality factor that match the center frequency point.

[0086] For example, the filter construction module determines N initial calibration frequency bands based on each center frequency point and a random quality factor matching each center frequency point. If there are overlapping frequency bands among the N initial calibration frequency bands, the random quality factor and / or center frequency point corresponding to the overlapping frequency bands are updated, and the corresponding initial calibration frequency bands are re-determined based on the updated random quality factor and / or updated center frequency point, until the N initial calibration frequency bands do not overlap.

[0087] With N initial calibration frequency bands that do not overlap, the filter construction module generates N target calibration frequency bands based on the cutoff frequencies of adjacent frequency bands among the N initial calibration frequency bands. Then, the filter construction module constructs a calibration filter based on each target calibration frequency band and a calibration gain value that matches each target calibration frequency band.

[0088] The filter construction module determines N initial calibration frequency bands based on the center frequency point Fc and the random quality factor Q that matches the center frequency point Fc. The center frequency point Fc corresponds to the center frequency of the initial calibration frequency band, and the ratio of the center frequency point Fc to the random quality factor Q constitutes the bandwidth of the initial calibration frequency band.

[0089] For example, Table 3 schematically illustrates the correspondence between the initial calibration frequency band, the center frequency point Fc, and the random quality factor Q:

[0090] Table 3

[0091]

[0092] The right cutoff frequency of the (N-1)th initial calibration band (7200) is greater than the left cutoff frequency of the Nth initial calibration band (7000). The (N-1)th and Nth initial calibration bands are overlapping bands. The random quality factor and / or center frequency point corresponding to the overlapping bands are updated, and the corresponding initial calibration bands are re-determined based on the updated random quality factor and / or updated center frequency point, until the N initial calibration bands no longer overlap.

[0093] For example, Table 4 schematically illustrates the relationship between the target calibration band and the initial calibration band.

[0094] Table 4

[0095]

[0096] The filter construction module updates the random quality factor corresponding to the (N-1)th and Nth initial calibration frequency bands, respectively. For example, it updates the random quality factor corresponding to the (N-1)th initial calibration frequency band from 5 to 6, and updates the random quality factor corresponding to the Nth initial calibration frequency band from 8 to 10.

[0097] When the N initial calibration frequency bands do not overlap, for the i-th initial calibration frequency band and the (i+1)-th initial calibration frequency band, the average of the right cutoff frequency of the i-th initial calibration frequency band and the left cutoff frequency of the (i+1)-th initial calibration frequency band is taken as the adjusted frequency band cutoff frequency, where i is an integer and 1≤i≤N-1.

[0098] The filter construction module generates N target calibration frequency bands based on the adjusted band cutoff frequency. For example, when generating the target calibration frequency bands, the filter construction module can use the adjusted band cutoff frequency as the band cutoff frequency of the target calibration frequency band.

[0099] Alternatively, the filter construction module can also use a preset minimum band cutoff frequency as the left cutoff frequency of the first target calibration band out of N target calibration bands, and a preset maximum band cutoff frequency as the right cutoff frequency of the Nth target calibration band.

[0100] Taking initial calibration frequency bands 1 and 2 as examples, the right cutoff frequency of initial calibration frequency band 1 is 300 Hz, and the left cutoff frequency of initial calibration frequency band 2 is 350 Hz. The average of the right cutoff frequency of initial calibration frequency band 1 and the left cutoff frequency of initial calibration frequency band 2, which is 325 Hz, is taken as the adjusted frequency band cutoff frequency. The adjusted frequency band cutoff frequency constitutes the frequency band cutoff frequency of the target calibration frequency band.

[0101] Furthermore, as shown in Table 4, the preset minimum band cutoff frequency of 0 is used as the left cutoff frequency of the first target calibration band. The preset maximum band cutoff frequency of 24000 is used as the right cutoff frequency of the Nth target calibration band.

[0102] The filter construction module constructs calibration filters based on each target calibration frequency band and the calibration gain value that matches each target calibration frequency band.

[0103] In operation S107, the filter calibration module uses a calibration filter to calibrate the initial frequency response value of the target candidate device, and obtains the calibrated frequency response value.

[0104] For example, the filter calibration module uses the constructed calibration filter to calibrate the frequency response curve that matches the target candidate device, and the calibrated frequency response curve indicates the calibrated frequency response value of the target candidate device.

[0105] While there isn't a one-to-one correspondence between frequency points, there can be a preset mapping relationship between them. The filter calibration module can calibrate the frequency response curve based on this preset mapping relationship using a calibration filter, thus obtaining the calibrated frequency response curve.

[0106] In operation S108, the loop control module sends a loop termination notification to the filter construction module.

[0107] The loop control module calculates the variance among the calibrated frequency response values ​​of multiple candidate devices. Based on a preset attention level matched to each frequency point of interest, it performs a weighted summation of the variances corresponding to each frequency point of interest. The weighted summation indicates the dispersion of the calibrated frequency response values. The attention level is a weighted value assigned based on the contribution of the corresponding frequency point of interest to the loudness in the ear.

[0108] Figure 6 A schematic diagram illustrating the weight distribution corresponding to each frequency point is provided. Figure 6 As shown in Figure 6A, curve 6A represents the equal loudness curves at 40 phon. Equal loudness curves represent curves where the subjective loudness perception (loudness level) is equal, determined through subjective measurement. Curve 6A shows that the sound pressure level in the mid-wave range is relatively low within the curve, indicating that the human ear is sensitive to mid-wave sounds. Outside the mid-wave range, the equal loudness curves curve upwards on both the shortwave and longwave sides, indicating that the human ear's sensitivity to shortwave and longwave sounds decreases.

[0109] The curve shown in Figure 6B is the weight distribution curve corresponding to the frequency points. Frequency points within the range of frequencies of interest correspond to higher weight values. The range of frequencies of interest can be the frequency range in which the human ear is most sensitive. The higher the weight value corresponding to a frequency point, the higher the level of attention it receives. The weight value can be determined based on the contribution of the corresponding frequency point to the loudness in the ear. Assigning weights according to the contribution to loudness in the ear can result in better consistency of devices in the frequency range sensitive to the human ear and better control of sound leakage in the frequency range sensitive to the human ear.

[0110] If the dispersion of the frequency response value after calibration is less than a preset dispersion threshold, or if the number of loop operations reaches a preset number threshold, the loop control module sends a loop termination notification to the filter construction module.

[0111] In operation S109, the filter construction module sends the center frequency point information corresponding to the minimum dispersion to the frequency response calibration parameter determination module.

[0112] Operation S110: The frequency response calibration parameter determination module uses the center frequency point corresponding to the minimum dispersion, as well as the random quality factor and target frequency response value matched with the center frequency point, as the frequency response calibration parameters.

[0113] In operation S111, the calibration control module generates version update parameters based on the acquired frequency response calibration parameters.

[0114] Frequency response calibration parameters can be used to calibrate and compensate when electronic devices play audio signals, thereby reducing the difference between the frequency response curve of the played audio signal and the standard frequency response curve. This helps to improve the audio playback performance of electronic devices and enhance the user's listening experience.

[0115] Based on large-scale frequency response data, the target frequency response value and calibration gain value are determined based on the center frequency point. A center frequency point is randomly selected from a preset range of frequencies of interest. The frequency band to be calibrated is divided according to each center frequency point and a random quality factor matching that center frequency point. Based on the dispersion of the calibrated frequency response value, the process of randomly selecting the center frequency point and dividing the frequency band to be calibrated is repeated cyclically until the dispersion of the calibrated frequency response value is less than a preset dispersion threshold. This effectively ensures the accuracy of the determined frequency response calibration parameters, improves frequency response calibration precision, and effectively guarantees the consistency of frequency response performance of different sound-generating components in electronic devices.

[0116] For electronic devices to be calibrated:

[0117] To better understand the embodiments of this application, the structure of the electronic device 100 of the embodiments of this application will be described below.

[0118] like Figure 7 This is a schematic diagram illustrating the structure of an electronic device 100 as an example. Figure 7 The diagram shows the structure of electronic device 100. Optionally, electronic device 100 can be referred to as a terminal or terminal device, and its specific product form can be a smart terminal, such as a mobile phone, tablet, digital video camera, smartwatch, smart wearable device, laptop computer, smart speaker, etc. Specifically, the functional modules involved in this application can be deployed on the DSP chip of the relevant device, specifically as application programs or software. A frequency response calibration function can be provided through software installation or upgrades, and through hardware calls and coordination.

[0119] It should be understood that, Figure 7 The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 7 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0120] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, accelerometers, temperature sensors, motion sensors, barometric pressure sensors, magnetic sensors, distance sensors, proximity sensors, fingerprint sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

[0121] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0122] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0123] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

[0124] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc.

[0125] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also power the electronic device via the power management module 141. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and powers the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc.

[0126] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0127] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0128] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0129] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0130] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0131] The electronic device 100 can implement audio functions, such as voice communication functions and audio playback functions, through the speaker 171, earpiece (i.e. receiver) 172, microphone 173 and application processor in the audio module 170.

[0132] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0133] The loudspeaker 171, also known as a "speaker," is used to convert audio electrical signals into sound signals. The earpiece (i.e., receiver) 172 is used to convert audio electrical signals into sound signals. The microphone 173, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0134] Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0135] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0136] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0137] The ISP is used to process data fed back from the camera. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's image sensor. The light signal is converted into an electrical signal, and the image sensor transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye.

[0138] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0139] The camera 193 can be located at the edge of the electronic device, and can be an under-display camera or a pop-up camera. The camera 193 may include a rear-facing camera, or a rear-facing camera. This application embodiment does not limit the specific location and shape of the camera 193. The electronic device 100 may include one or more cameras with different focal lengths, such as telephoto cameras, wide-angle cameras, ultra-wide-angle cameras, or panoramic cameras.

[0140] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0141] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of electronic device 100.

[0142] like Figure 8 The software architecture diagram of the illustrative electronic device 100 illustrates a layered architecture that divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime, the system layer, and the kernel layer.

[0143] The application layer may include a series of application packages, such as call, contact list, messaging, music, and gallery. In this embodiment, the application layer may also install a calibration application. In some implementations, the calibration application may receive frequency response calibration parameters from a calibration device, and after receiving the parameters, acquire frequency response data locally stored in the electronic device. The frequency response data includes the initial frequency response values ​​of the electronic device based on each center frequency point. The calibration application is also used to calibrate the frequency response value of the electronic device for a test audio signal based on the frequency response calibration parameters and the frequency response data, obtaining the calibrated device frequency response value.

[0144] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer, including various components and services to support Android development. The application framework layer includes some predefined functions. For example... Figure 8 As shown, the application framework layer may include a window manager, resource manager, content provider, notification manager, and screen management service, etc.

[0145] Window managers are used to manage windowed applications, for example. A window manager can obtain the screen size, determine if a status bar is present, lock the screen, capture screenshots, and perform other actions.

[0146] The file explorer can provide applications with various resources, such as localized strings, icons, images, layout files, video files, etc.

[0147] The system layer includes system libraries and the Android Runtime. System libraries can include multiple functional modules, such as image rendering libraries, image compositing libraries, function libraries, and media libraries. The image rendering library provides image processing functions to help meet various image processing needs.

[0148] In this embodiment of the application, the application framework layer may include some predefined functions. For example... Figure 8 As shown, an audio playback management service is set up in the application framework layer. This service can be used to initialize the audio / video player, obtain the current audio volume, adjust the audio playback volume, add sound effects, etc.

[0149] The Android runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java calls, and the other part consists of the Android core libraries. The application layer and application framework layer run in the virtual machine, which executes the Java files of the application layer and application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0150] The HAL layer provides HALs corresponding to different hardware modules of electronic devices, such as AudioHAL, CameraHAL, WiFi HAL, and smart PA control HAL and information storage HAL.

[0151] The Audio HAL, through its kernel-level audio driver, corresponds to audio output devices (such as speakers or screen sound devices). When a mobile phone has multiple audio output devices (such as multiple speakers or screen sound devices), each audio output device corresponds to a different audio driver in the kernel layer.

[0152] The smart PA control HAL corresponds to the smart PA hardware circuit through the smart PA algorithm in the DSP. For example, when the smart PA control HAL receives a calibration command from a calibration application in the application layer, it can control the smart PA algorithm to run, configuring it to play audio signals. When the smart PA control HAL receives a call command from a call application or a music playback command from a music application in the application layer, it can control the smart PA algorithm to run, configuring it to play the other party's voice signal or the corresponding audio signal. Furthermore, the smart PA control HAL can also control the smart PA hardware circuit (such as the hardware circuit of the screen sound device (smart PA0)) to open via I2C signals, allowing audio signals to be played through the screen sound device.

[0153] The Information Storage HAL corresponds to the non-volatile storage medium (such as memory) of an electronic device and is used to store frequency response calibration parameters calculated by the electronic device or calibration equipment into the non-volatile storage medium of the electronic device. For example, when the electronic device receives the frequency response calibration parameters calculated by the calibration equipment, the Information Storage HAL can store the frequency response calibration parameters into the non-volatile storage medium of the electronic device. Frequency response calibration is used to reduce the difference between the frequency response curve of the actual played audio signal and the standard frequency response curve, improving the applicability of the frequency response calibration parameters.

[0154] The kernel layer, located below the HAL, is a layer between hardware and software. Besides audio drivers, the kernel layer may also include display drivers, camera drivers, sensor drivers, etc., but this application embodiment does not impose any limitations on this.

[0155] The hardware circuit is located below the kernel layer. In this embodiment, the hardware circuit may include a digital signal processing (DSP) chip, which may run a smart PA algorithm module, an audio algorithm module, etc.

[0156] The smart PA algorithm module includes a filter calibration module. When the smart PA control HAL receives frequency response calibration parameters sent by the calibration application, the information storage HAL checks whether frequency response data is stored in the non-volatile storage device. If the information storage HAL detects frequency response data, it sends the frequency response data to the filter calibration module. The filter calibration module constructs a calibration filter based on the frequency response calibration parameters and the locally stored frequency response data. The filter calibration module is also used to calibrate the frequency response value of the electronic device for the audio signal to be played using the calibration filter, obtaining the calibrated audio signal.

[0157] Understandable Figure 8 The components included in the system framework layer, system library, and runtime layer shown do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.

[0158] Figure 9 A schematic diagram illustrating a frequency response calibration process is shown. (For example...) Figure 9 As shown, the calibration application in the application layer receives frequency response calibration parameters, including the center frequency point, target frequency response values ​​based on the center frequency point, and a random quality factor. The calibration application sends the frequency response calibration parameters to the smart PA control HAL in the HAL layer and sends a frequency response calibration command to the information storage HAL. The smart PA control HAL passes the received frequency response calibration parameters to the smart PA algorithm in the DSP chip, for example, to the filter construction module within the smart PA algorithm. Upon receiving the frequency response calibration command, the information storage HAL checks whether frequency response data is stored in the non-volatile storage device. The frequency response data includes the initial frequency response values ​​of the device to be calibrated based on each center frequency point. If locally stored frequency response data is detected, the information storage HAL sends the frequency response data to the filter construction module in the smart PA algorithm.

[0159] The filter construction module determines a calibration gain value that matches each center frequency point based on the initial frequency response value and the target frequency response value. For example, the filter construction module calculates the difference between the initial frequency response value and the target frequency response value of the device to be calibrated based on each center frequency point, and uses this difference as the calibration gain value of the device to be calibrated based on the corresponding center frequency point.

[0160] The filter construction module constructs a calibration filter based on each center frequency point and a random quality factor and calibration gain value matching each center frequency point. For example, the filter construction module determines N initial calibration frequency bands based on each center frequency point and a random quality factor matching each center frequency point. If overlapping frequency bands exist among the N initial calibration frequency bands, the filter construction module updates the random quality factor and / or center frequency point corresponding to the overlapping frequency bands, and re-determines the corresponding initial calibration frequency bands based on the updated random quality factor and / or updated center frequency point, until the N initial calibration frequency bands no longer overlap.

[0161] When the N initial calibration frequency bands do not overlap, the filter construction module generates N target calibration frequency bands based on the cutoff frequencies of adjacent frequency bands among the N initial calibration frequency bands.

[0162] As an optional approach, for the i-th initial calibration band and the (i+1)-th initial calibration band among the N initial calibration bands, the average of the right cutoff frequency of the i-th initial calibration band and the left cutoff frequency of the (i+1)-th initial calibration band is taken as the adjusted band cutoff frequency, where i is an integer and 1≤i≤N-1.

[0163] The filter construction module generates N target calibration frequency bands based on the adjusted band cutoff frequency. For example, when generating the target calibration frequency bands, the filter construction module can use the adjusted band cutoff frequency as the band cutoff frequency of the target calibration frequency band.

[0164] The filter construction module constructs calibration filters based on each target calibration frequency band and the calibration gain value matched with each target calibration frequency band, and sends the constructed calibration filters to the frequency response calibration module.

[0165] When an audio application is about to play an audio signal, the audio application sends the audio signal to be played to the smart PA control HAL, and the smart PA control HAL passes the audio signal to be played to the frequency response calibration module in the smart PA algorithm.

[0166] The frequency response calibration module uses a calibration filter to calibrate the frequency response value of the audio signal to be played. For example, the frequency response calibration module performs a Fourier transform on the audio signal to be played, obtaining a transformed frequency domain signal. The frequency response calibration module uses a calibration filter to calibrate the transformed frequency domain signal, obtaining a calibrated audio signal. The frequency response calibration module sends the calibrated audio signal to the sound-generating device so that the sound-generating device can play the calibrated audio signal.

[0167] In this embodiment, the device to be calibrated may be a sound-generating device in an electronic device, such as a speaker, earpiece, or screen sound-generating device; this embodiment does not limit this to a specific type.

[0168] The filter calibration module sends the calibrated device frequency response value to the capacitive device parameter determination module. The capacitive device parameter determination module determines the capacitive device parameters applicable to the device to be calibrated (such as a sound-generating device) based on the calibrated device frequency response value.

[0169] During normal use of an electronic device, when audio-related applications (such as call or music applications) run in response to user input, the smart PA controls the HAL to issue audio playback commands. The smart PA control HAL receives these commands and checks if frequency response calibration parameters are stored in the non-volatile storage device. If the information storage HAL detects the parameters, it retrieves them from the non-volatile storage medium and sends them to the filter calibration module. The filter calibration module, responding to the received parameters, determines the filter type, center frequency, and frequency response gain. Furthermore, the filter calibration module can convert the audio signal to be played into a frequency domain signal, calibrate the frequency domain gain using multi-segment filters, and send the calibrated audio signal to the smart PA hardware circuitry so that the electronic device's sound-emitting device can play the calibrated audio signal.

[0170] Figure 10 A schematic diagram illustrating the frequency response calibration process during a call is provided. Figure 10 As shown, during a call, the call application sends a frequency response calibration command to the smart PA control HAL by invoking the call service in the system service layer. The smart PA control HAL obtains the frequency response calibration parameters, which include the optimized center frequency point Fc, the random quality factor Q matched with the center frequency point Fc, and the target frequency response value. The smart PA control HAL can also retrieve locally stored frequency response data from non-volatile storage media. This frequency response data includes an initial frequency response value FR matched to the center frequency point Fc. The smart PA control HAL sends the initial frequency response value FR, a random quality factor Q based on the center frequency point Fc, and the target frequency response value to the privacy call algorithm in the downlink HAL.

[0171] The filter calibration module in the privacy call algorithm uses the initial frequency response value FR and the target frequency response value based on each center frequency point Fc. The calibration gain value matching each center frequency point Fc is determined. For example, the filter calibration module calculates the initial frequency response value FR based on each center frequency point Fc. Fc With target frequency response value The difference between the values ​​is used as the calibration gain value based on the corresponding center frequency point. The filter calibration module constructs a calibration filter based on the center frequency point Fc, the calibration gain value matched to the center frequency point Fc, and the random quality factor.

[0172] During a call, the call application invokes the call service in the system service layer to send a call command to the downlink HAL. The call algorithm in the downlink HAL generates the call audio signal. The call algorithm sends the call audio signal to the filter calibration module in the privacy call algorithm. The filter calibration module uses a constructed calibration filter to calibrate the frequency response value in the call audio signal to obtain the calibrated audio signal. Then, the downlink HAL drives the sound-generating devices 1 and 2 in the smart PA hardware circuit to emit sound.

[0173] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0174] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0175] This embodiment also provides an electronic device, including: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: acquiring initial frequency response values ​​of multiple candidate devices based on preset frequency points of interest, obtaining large frequency response data; determining target frequency response values ​​matching each frequency point of interest based on the large frequency response data; repeatedly performing the following operations until the dispersion of the calibrated frequency response value is less than a preset dispersion threshold, or the number of repeated operations reaches a preset number threshold; selecting a portion of frequency points from the frequency points of interest as the center frequency to be calibrated. The process involves: determining a calibration gain value matching each center frequency point based on the initial and target frequency response values ​​of the target candidate devices. The target candidate devices include any candidate device from a pool of candidates. The initial frequency response values ​​of the target candidate devices are calibrated using the calibration gain values ​​to obtain calibrated frequency response values. The number of loop operations and the dispersion of the calibrated frequency response values ​​of the multiple candidate devices are calculated. If the dispersion of the calibrated frequency response values ​​is less than a preset dispersion threshold, or if the number of loop operations reaches a preset threshold, the center frequency point corresponding to the minimum dispersion, along with the random quality factor matching the center frequency point and the target frequency response value, are used as frequency response calibration parameters.

[0176] This embodiment also provides an electronic device, including: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: receiving version update parameters, the version update parameters including a center frequency point and a random quality factor and a target frequency response value based on the center frequency point; in response to the received version update parameters, acquiring locally stored frequency response data, the frequency response data including the initial frequency response values ​​of the device to be calibrated based on each center frequency point; determining a calibration gain value matching each center frequency point based on the initial frequency response values ​​and the target frequency response values ​​based on each center frequency point; constructing a calibration filter based on the random quality factor and calibration gain value matching each center frequency point; and using the calibration filter to calibrate the frequency response value of the device to be calibrated for the audio signal to be played, to obtain a calibrated audio signal.

[0177] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the frequency response calibration parameter determination method and frequency response calibration method in the above embodiment.

[0178] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer performs the above-mentioned related steps to realize the frequency response calibration parameter determination method and frequency response calibration method in the above embodiment.

[0179] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein, the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the frequency response calibration parameter determination method and the frequency response calibration method in the above method embodiments.

[0180] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0181] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0182] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0183] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0184] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0185] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.

[0186] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0187] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0188] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. One exemplary embodiment couples a storage medium to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.

[0189] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0190] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for determining frequency response calibration parameters, characterized in that, The method comprises: obtaining initial frequency response values of a plurality of candidate devices based on preset frequency points of interest; determining target frequency response values matched with each of the frequency points of interest based on mean values of the initial frequency response values of the plurality of candidate devices based on each of the frequency points of interest; recursively performing the following operations until a dispersion of calibrated frequency response values is less than a preset dispersion threshold or a number of recursive operations reaches a preset number threshold: selecting part of the frequency points of interest as center frequency points to be subjected to frequency response calibration; determining calibration gain values matched with each of the center frequency points based on the initial frequency response values and the target frequency response values of a target candidate device based on each of the center frequency points, the target candidate device comprising any of the plurality of candidate devices; calibrating the initial frequency response values of the target candidate device based on the calibration gain values to obtain calibrated frequency response values; calculating the number of recursive operations and the dispersion of the calibrated frequency response values of the plurality of candidate devices; and in a case where the dispersion of the calibrated frequency response values is less than the preset dispersion threshold or the number of recursive operations reaches the preset number threshold, taking the center frequency point corresponding to the minimum dispersion and the target frequency response value and random quality factors matched with the center frequency point as frequency response calibration parameters. The method further comprises:

2. The method of claim 1, wherein, calculating mean values of the initial frequency response values of the plurality of candidate devices based on each of the frequency points of interest; and adjusting the mean values of the initial frequency response values based on a preset calibration gain interval to obtain the target frequency response values matched with each of the frequency points of interest. The method further comprises:

3. The method of claim 1, wherein, setting N candidate calibration frequency bands, each of the N candidate calibration frequency bands having a corresponding preset importance level, N being an integer greater than 1; and randomly selecting N frequency points from the frequency points of interest as the center frequency points to be subjected to frequency response calibration based on a preset frequency point spacing threshold and the importance levels corresponding to each of the candidate calibration frequency bands. The method further comprises:

4. The method of claim 1, wherein, calculating differences between the initial frequency response values and the target frequency response values of the target candidate device based on each of the center frequency points, and taking the differences as the calibration gain values matched with the corresponding center frequency points. The method further comprises:

5. The method of claim 1, wherein, determining N initial calibration frequency bands based on each of the center frequency points and random quality factors matched with each of the center frequency points; ​ In a case where there are overlapping frequency bands in the N initial calibration frequency bands, the random quality factor and / or the center frequency point corresponding to the overlapping frequency bands are updated, and the corresponding initial calibration frequency band is re-determined according to the updated random quality factor and / or the updated center frequency point, until the N initial calibration frequency bands do not overlap with each other; generating N target calibration frequency bands according to the band cutoff frequencies of adjacent frequency bands in the N initial calibration frequency bands that do not overlap with each other; constructing a calibration filter according to each target calibration frequency band and the calibration gain value matched with each target calibration frequency band; and calibrating the initial frequency response value of the target candidate device by using the calibration filter to obtain the calibrated frequency response value.

6. The method of claim 5, wherein, The generating N target calibration frequency bands according to the band cutoff frequencies of adjacent frequency bands in the N initial calibration frequency bands that do not overlap with each other comprises: for an i th initial calibration frequency band and an i+1 th initial calibration frequency band in the N initial calibration frequency bands, taking the average of the right cutoff frequency of the i th initial calibration frequency band and the left cutoff frequency of the i+1 th initial calibration frequency band as an adjusted band cutoff frequency, i being an integer and 1≤i≤N-1; and generating the N target calibration frequency bands according to the adjusted band cutoff frequencies.

7. The method of claim 6, wherein, The method further comprises: taking a preset minimum band cutoff frequency as the left cutoff frequency of a first target calibration frequency band in the N target calibration frequency bands; and taking a preset maximum band cutoff frequency as the right cutoff frequency of an N th target calibration frequency band in the N target calibration frequency bands.

8. The method of claim 5, wherein, The obtaining of the initial frequency response value of each candidate device based on a preset frequency point of interest comprises: playing a test audio signal by using each candidate device to obtain a frequency response curve matched with each candidate device, the frequency response curve indicating the initial frequency response value of the candidate device based on the frequency point of interest; The calibration of the initial frequency response value of the target candidate device by using the calibration filter to obtain the calibrated frequency response value comprises: calibrating the frequency response curve matched with the target candidate device by using the calibration filter, the calibrated frequency response curve indicating the calibrated frequency response value of the target candidate device.

9. The method of claim 8, wherein, The test audio signal is a full-frequency-domain scanning signal.

10. The method of claim 8, wherein, The calibration of the frequency response curve matched with the target candidate device by using the calibration filter comprises: determining a candidate frequency point matched with the frequency point of interest based on a preset mapping relationship; calibrating the frequency response curve according to the calibration gain value of the target candidate device based on the candidate frequency point by using the calibration filter to obtain the calibrated frequency response curve.

11. The method of claim 8, wherein, The calculation of the dispersion of the calibrated frequency response values of the plurality of candidate devices comprises: calculating the variance of the calibrated frequency response curves of the plurality of candidate devices; and calculating the dispersion of the calibrated frequency response values of the plurality of candidate devices. According to the preset attention level matched with each of the frequency points of interest, the variances corresponding to the frequency points of interest are weighted and summed, and a result of the weighted sum indicates a dispersion of the calibrated frequency response value, The attention level is a weight value assigned according to a contribution of an in-ear loudness to the corresponding frequency point of interest.

12. The method of claim 1, wherein, The method further includes: sending the frequency response calibration parameter as a version update parameter to the device to be calibrated.

13. A frequency response calibration method applied to a device to be calibrated, characterized in that, The method includes: receiving a version update parameter, the version update parameter including the frequency response calibration parameter of claim 1; in response to the received version update parameter, obtaining locally saved frequency response data, the frequency response data including initial frequency response values of the device to be calibrated based on each of the center frequency points; determining a calibration gain value matched with each of the center frequency points according to the initial frequency response values and the target frequency response values based on each of the center frequency points; constructing a calibration filter according to the center frequency points and the random quality factors and the calibration gain values matched with the center frequency points; calibrating, by using the calibration filter, a frequency response value of the device to be calibrated for a to-be-played audio signal to obtain a calibrated audio signal.

14. The method of claim 13, wherein, The determining a calibration gain value matched with each of the center frequency points according to the initial frequency response values and the target frequency response values based on each of the center frequency points includes: calculating a difference between the initial frequency response values and the target frequency response values of the device to be calibrated based on each of the center frequency points, and taking the difference as the calibration gain value of the device to be calibrated based on the corresponding center frequency point.

15. The method of claim 13, wherein, The constructing a calibration filter according to the center frequency points and the random quality factors and the calibration gain values matched with the center frequency points includes: determining N initial calibration frequency bands according to each of the center frequency points and the random quality factors matched with each of the center frequency points; in a case where there is an overlapping frequency band in the N initial calibration frequency bands, updating the random quality factors and / or the center frequency points corresponding to the overlapping frequency band, and re-determining the corresponding initial calibration frequency band according to the updated random quality factors and / or the updated center frequency points, until the N initial calibration frequency bands do not overlap with each other; generating N target calibration frequency bands according to frequency band cutoff frequencies of adjacent frequency bands in the N initial calibration frequency bands that do not overlap with each other; and constructing a calibration filter according to each of the target calibration frequency bands and the calibration gain values matched with each of the target calibration frequency bands.

16. The method of claim 13, wherein, The calibrating, by using the calibration filter, a frequency response value of the device to be calibrated for a to-be-played audio signal to obtain a calibrated audio signal includes: performing Fourier transform on the to-be-played audio signal played by the device to be calibrated to obtain a converted frequency domain signal; and calibrating, by using the calibration filter, the converted frequency domain signal to obtain the calibrated audio signal.

17. An electronic device, comprising: includes: One or more processors, memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory and, when executed by the one or more processors, cause the electronic device to perform the method for determining frequency response calibration parameters of any of claims 1-12.

18. An electronic device, comprising: Comprising: One or more processors, memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory and, when executed by the one or more processors, cause the electronic device to perform the method for calibrating frequency response of any of claims 13-16.

19. A computer-readable storage medium, characterized in that, Comprising a computer program that, when run on an electronic device, causes the electronic device to perform the method for determining frequency response calibration parameters of any of claims 1-12, or the method for calibrating frequency response of any of claims 13-16.

Citation Information

Patent Citations

  • Calibration method, device and equipment for sound quality effect of earphone and storage medium

    CN114760567A

  • Frequency response consistency calibration method and electronic equipment

    CN116320905A