Intelligent equalizer optimization method and system, storage medium and equipment

By introducing the EQ configuration protection mechanism and new parameter equalizer functions in the equalizer system, the system crashes caused by improper parameter configuration and filter application limitations are solved, and the system stability and ease of use are improved, meeting the needs of complex audio processing scenarios.

CN120066448APending Publication Date: 2025-05-30LINKPLAY TECHNOLOGY INC NANJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510187381.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing equalizer system lacks an effective protection mechanism when parameter configuration, which is prone to system crashes or audio distortion due to improper parameter settings. The filter type of traditional equalizer is single, which cannot meet the needs of complex audio processing scenarios, and the parameter adjustment experience is not good.

Method used

The EQ configuration protection mechanism is introduced to monitor and limit the combination of hazardous parameters in real time, calculate the risk coefficient through the risk assessment model and trigger the protection mechanism; develop a new parameter equalizer (PEQ) function, adopt a second-order infinite impulse response IIR filter structure for adaptive filter design, realize dynamic frequency response optimization and multi-point equalization control; integrate intelligent parameter optimization algorithm, and realize automatic parameter optimization through audio feature extraction and mapping relationship establishment.

Benefits of technology

It significantly improves the stability and ease of use of the system, prevents system crashes, enhances the application flexibility of the filter, realizes more precise frequency control, lowers the threshold for tuning operations, and improves the audio processing effect and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066448A_ABST
    Figure CN120066448A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equalizer optimization, and provides an intelligent equalizer optimization method, which comprises the following steps: S1, realizing an equalizer configuration protection mechanism, monitoring and limiting input equalizer parameters in real time, establishing a parameter combination risk assessment model to calculate a risk coefficient, and triggering the protection mechanism when the risk coefficient exceeds a preset threshold value; s2, realizing the function of an adaptive parameter equalizer, adjusting the characteristics of frequency response by adopting a second-order infinite impulse response IIR filter structure, performing dynamic frequency response optimization, and optimizing filter parameters through a minimum mean square error criterion; s3, parameter optimization is carried out, audio feature extraction is carried out, a mapping relation between the audio features and parameters is established, and automatic parameter optimization is realized by optimizing a target function; and S4, carrying out system integration and optimization, including module cooperation and user interaction function realization. An EQ configuration protection mechanism is introduced, dangerous parameter combinations can be monitored and limited, and system crash is effectively prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equalizer optimization, and in particular to an intelligent equalizer optimization method, system, storage medium and device. Background Art

[0002] In the complex and sophisticated field of professional audio processing, the equalizer plays a vital role and can be regarded as the core device in the audio processing link. In essence, the equalizer is a device or software tool that adjusts the amplitude of different frequency components of the audio signal. It changes the frequency response characteristics of the audio signal by increasing or attenuating the gain of the signal in each frequency band, thereby achieving the purpose of beautifying the timbre, optimizing the sound quality, and balancing the sound ratio.

[0003] In practical applications, whether it is music recording, sound control of live performances, or sound processing in film and television post-production, the equalizer plays an irreplaceable role. For example, when recording music, it can accurately adjust the sounds of different instruments and voices, so that each sound can be clearly distinguished and integrated with each other in the mix; in live performance scenes, the equalizer can optimize the sound according to the acoustic characteristics of the venue, so that the audience can get a good auditory experience at all positions; in film and television post-production, the equalizer helps to create a variety of unique sound effects that match the atmosphere of the plot, and enhance the appeal and immersion of the work. It can be said that the performance of the equalizer is directly related to the quality of the final presentation of audio processing, and determines whether the audio work can meet professional needs and realize its artistic and commercial value.

[0004] In the field of professional audio processing, equalizer is a key device whose performance directly affects the audio processing effect. However, both the traditional equalizer system and the intelligent equalizer system currently on the market have some common problems, which seriously restrict their application in audio processing.

[0005] (1) Lack of parameter configuration protection mechanism: Traditional equalizer systems have no protection mechanism when configuring parameters. If the operator accidentally inputs the wrong parameters, such as setting the frequency beyond the normal range or adjusting the gain unreasonably, it is very likely to cause the system to crash and directly interrupt the audio processing work; or cause the audio signal to be severely distorted, output noisy and chaotic sound, and seriously affect the reliable operation of the equipment. Although the current intelligent equalizer system has been improved, it still lacks a sufficiently effective protection mechanism when facing complex parameter combinations and some uncommon operations of users. For example, when adjusting multiple parameters at the same time, the intelligent equalizer may not be able to identify potential risks in time, and the system may still crash due to improper parameter settings, or the audio may be severely distorted, causing great trouble to users.

[0006] (2)Limitations in filter applications: The filter types of traditional equalizers are extremely single. Facing today's diverse audio processing scenarios, they seem inadequate. Take live performances as an example. It is necessary to highlight the unique timbres and spatial senses of different musical instruments, but traditional equalizers are difficult to achieve precise adjustment. In post-production of films and television, to create various realistic sound effects, the requirements for filters are more complex, and traditional equalizers simply cannot meet them. Current intelligent equalizers also have shortcomings in the application of low-pass / high-pass filters. Although the technology has been upgraded, in the face of the pursuit of fantasy sound effects in electronic music production and the need for fine shaping of character voices in radio drama production, intelligent equalizers are still difficult to quickly and flexibly adjust filter characteristics and cannot fully meet the diverse creative needs of professional audio creators.

[0007] (3)Poor experience in parameter adjustment: The parameter adjustment of traditional equalizers highly depends on the professional audio knowledge of operators. Facing complex parameters such as frequency, gain, and Q value, ordinary users or novices are often at a loss and don't know where to start, which greatly limits their application scope. Moreover, in actual operation, due to the lack of an effective parameter optimization mechanism, one can only rely on experience to repeatedly debug. After each debug, one has to listen to the sound and then adjust according to the effect. The process is cumbersome and extremely inefficient. In projects with tight schedules, it seriously affects the work progress. Although existing intelligent equalizers are developing towards intelligence, they generally lack a real-time feedback mechanism during the parameter adjustment process. After users adjust the parameters, they cannot immediately know the tuning effect and can only blindly adjust the parameters multiple times and wait for the processing result. This not only reduces work efficiency but also disrupts the coherence of audio creation, affects the inspiration of creators, and makes the audio production process more difficult and time-consuming.

[0008] In summary, the intelligent equalizer systems on the market currently lack an effective protection mechanism when configuring parameters, and are prone to system crashes or audio distortion due to improper parameter settings. At the same time, traditional equalizers are relatively single in the application of low-pass / high-pass filters and cannot meet the complex requirements in different scenarios. In addition, existing equalizers often lack a real-time feedback mechanism during the parameter adjustment process, making it difficult to verify and optimize the tuning effect in a timely manner. These problems seriously restrict the application effect and user experience of equalizers in audio processing, and there is an urgent need for an innovative solution to improve the stability, functionality, and usability of equalizers, meet the diverse and evolving needs of professional audio processing, and promote the advancement of audio processing technology to a higher level. Summary of the Invention

[0009] In view of the above problems, the purpose of the present invention is to provide an intelligent equalizer optimization method, system, storage medium and device, which innovatively introduces an EQ configuration protection mechanism, can monitor and limit dangerous parameter combinations in real time, and effectively prevent system crashes. On this basis, a new type of parametric equalizer (PEQ) function is developed to achieve a more flexible low-pass / high-pass filter configuration scheme. The system also integrates an intelligent parameter optimization algorithm, which can automatically adjust the equalizer parameters according to the actual audio characteristics, significantly improving the usability and reliability of the system.

[0010] The above object of the present invention is achieved by the following technical solutions: An intelligent equalizer optimization method, comprising the following steps: S1: Implement an equalizer configuration protection mechanism to monitor and limit the input equalizer parameters in real time, establish a parameter combination risk assessment model to calculate the risk coefficient, and trigger the protection mechanism when the risk coefficient exceeds a preset threshold; S2: Implement an adaptive parametric equalizer function, adopt a second-order infinite impulse response (IIR) filter structure to adjust the characteristics of the frequency response, perform dynamic frequency response optimization, and optimize the filter parameters by the least mean square error criterion; S3: Perform parameter optimization, extract audio features and establish a mapping relationship between the audio features and the parameters, and realize automatic parameter optimization by optimizing the objective function; S4: Perform system integration and optimization, including module collaboration and user interaction function implementation.

[0011] Further, in step S1, when monitoring and limiting the input equalizer parameters in real time, setting a preset range for the parameters and limiting the value of the equalizer parameter when the value of the equalizer parameter exceeds the preset range, includes: Monitor the input equalizer parameters including frequency, gain, and Q value in real time, set a monitoring range for each of the equalizer parameters, and the monitoring range includes a lower limit and an upper limit; When the value of the equalizer parameter is less than the lower limit of the range, take the value of the lower limit of the range as the value of the equalizer parameter; When the value of the equalizer parameter is greater than the upper limit of the range, take the value of the upper limit of the range as the value of the equalizer parameter.

[0012] Further, in step S1, when establishing a parameter combination risk assessment model to calculate the risk coefficient and triggering the protection mechanism when the risk coefficient exceeds a preset threshold, includes: Multiply the absolute value of the gain, the reciprocal of the Q value, and the absolute value of the frequency change rate by different weight coefficients respectively and then sum them to calculate the risk coefficient; Set the preset threshold of the risk coefficient, and trigger the protection mechanism when the risk coefficient exceeds the preset threshold.

[0013] Further, in step S1, the protection mechanism includes parameter soft limit that limits parameters within a safe range, gradual transition processing that smoothly adjusts parameters over a period of time, and user warning prompt that timely informs the user that there is a risk in the current parameter setting. Specifically, it includes: Perform the parameter soft limit, do not directly reject the input dangerous parameters, do not forcibly adjust the parameters to the fixed values within the parameter preset range, and limit the parameters within the safe range on the premise of ensuring that the parameters do not exceed the safe range, so that the change of the equalizer parameters is relatively smooth. Perform the gradual transition processing. On the basis of the parameter soft limit, gradually change the value of the equalizer parameters over a period of time, so that the transition of the audio signal before and after the parameter adjustment is smooth, and ensure the quality and coherence of the audio. Perform the user warning prompt to timely inform the user that there is a danger in the current parameter setting and adjustment is required.

[0014] Further, in step S2, adopt the second-order infinite impulse response (IIR) filter structure to adjust the characteristics of the frequency response, including using the second-order infinite impulse response (IIR) filter structure for adaptive filter design, and adjusting the characteristics of the frequency response according to the input center frequency and quality factor to meet different audio processing requirements. Specifically: Use the second-order infinite impulse response (IIR) filter structure for adaptive filter design and establish the transfer function of the adaptive filter. Calculate the filter coefficients, including calculating the normalized angular frequency through the center frequency and sampling frequency of the filter, mapping the actual frequency to the digital domain, and calculating the intermediate parameters of the filter through the normalized angular frequency and the quality factor. For the low-pass filter, calculate the numerator coefficients of the transfer function including the weighted coefficient of the input signal at the current moment, the weighted coefficient of the input signal at the previous moment, and the weighted coefficient of the input signal at the two previous moments, and the denominator coefficients including the weighted feedback coefficient of the output signal at the current moment, the weighted feedback coefficient of the output signal at the previous moment, and the weighted feedback coefficient of the output signal at the two previous moments according to the normalized angular frequency and the intermediate parameters. Calculate the value of the transfer function through the calculated numerator coefficients, denominator coefficients, and by combining the unit delay operator and the double unit delay operator.

[0015] Further, in step S2, perform dynamic frequency response optimization and optimize the filter parameters through the least mean square error criterion, including: Perform dynamic frequency response optimization, including real-time calculation of the current frequency response including amplitude response and phase response; Among them, the amplitude response of the current filter is calculated in real time, and the value is the modulus of the numerical value of the transfer function of the filter in the frequency domain. The amplitude response describes the gain situation of the filter for signals with different frequency components. In a low-pass filter, the amplitude response value corresponding to the low-frequency signal is larger, and the amplitude response value corresponding to the high-frequency response is smaller; The phase response of the current filter is calculated in real time, and the value is the complex argument of the numerical value of the transfer function of the filter in the frequency domain. The phase response describes the phase delay situation of the filter for signals with different frequency components; Optimize the filter parameters through the least mean square error criterion to make the frequency response of the filter as close as possible to the target frequency response.

[0016] Furthermore, after step S2, it also includes performing multi-point equalization control to implement a multi-point linkage control algorithm including determining key frequency points as control points, establishing an interpolation model for parameter estimation, and generating a smooth transition curve to achieve multi-point linkage, including: According to the specific requirements of audio processing, determine a series of key frequency points as control points, and calculate the frequency interval and frequency ratio between adjacent control points. Among them, the frequency interval reflects the distribution density of the control points on the frequency axis, and the frequency ratio reflects the relative relationship of different frequency regions; Select a preset interpolation method to establish an interpolation model, and perform interpolation between the control points to estimate the parameter values of other frequency points; Smooth the interpolated curve, remove possible high-frequency noise or sharp changes, and perform fine-tuning including adjusting the slope and curvature of the curve according to the audio characteristics and processing requirements to achieve a better audio processing effect.

[0017] Furthermore, in step S3, audio feature extraction is performed. The audio features include time-domain features such as root mean square (RMS) energy, zero-crossing rate, and envelope features, and frequency-domain features such as spectral centroid, frequency band energy distribution, and harmonic distribution. Specifically: Perform time-domain feature extraction including root mean square (RMS) energy, zero-crossing rate, and envelope features. Among them, the root mean square (RMS) energy reflects the average power of the audio signal, the zero-crossing rate represents the number of times the audio signal crosses zero in unit time, and the envelope feature reflects the change of the amplitude of the audio signal over time; Frequency-domain feature extraction including spectral centroid, frequency-band energy distribution, and harmonic distribution, where the spectral centroid represents the centroid position of the audio spectrum, the frequency-band energy distribution describes the distribution of audio energy across different frequency bands, and the harmonic distribution reflects the content and distribution of harmonic components in the audio.

[0018] Further, in step S3, establish the mapping relationship between the audio features and parameters, and realize the automatic optimization of parameters by optimizing the objective function. Specifically: Establish the mapping model between the audio features and parameters. The mapping model is a mapping function established through the vector of the audio features, and the value of the mapping function is the equalizer parameter vector, including parameters such as frequency, gain, and Q value. Establish the optimization objective function, comprehensively consider multiple audio quality metrics including frequency response flatness, phase characteristics, and time-domain distortion, and set different weight coefficients for each of the audio quality metrics and then accumulate them to obtain the value of the final optimization objective function. Calculate the current audio quality score, and perform parameter iterative optimization to achieve real-time feedback optimization.

[0019] Further, calculate the current audio quality score, and perform parameter iterative optimization to achieve real-time feedback optimization. Specifically: Obtain the current audio quality score by calculating the weighted sum of each quality metric to quantify the quality level of the current audio. Use the method of gradient ascent or gradient descent for parameter iterative optimization. In the parameter iteration, use the learning rate to control the compensation of parameter update, use the quality score gradient to represent the direction and rate of change of the quality score with respect to the parameters, and gradually improve the audio quality score by continuously iteratively updating the parameters, thereby realizing the real-time optimization of the equalizer parameters.

[0020] Further, in step S4, realize the module collaboration and user interaction functions, including executing the module collaboration working mechanism, the interaction between the protection mechanism module and the parameter equalizer module, and the cooperation between the parameter equalizer and the iterative optimization module, and perform performance optimization including calculation efficiency optimization and memory management optimization. Specifically: Perform the interaction between the protection mechanism module and the parameter equalizer module, including the protection mechanism module performing legality checks on the input parameters received by the parameter equalizer module, combining the parameter combinations of the parameter equalizer module, the protection mechanism module performing risk assessment, and when the risk assessment result shows that the parameter combination is dangerous, the protection mechanism module executes the corresponding protection strategy. Cooperate the parameter equalizer with the iterative optimization module to share feature data. The parameter equalizer module shares the feature data extracted during audio processing with the optimization module. The optimization module uses the feature data for analysis and modeling to determine more appropriate equalizer parameters and perform parameter linkage updates. The optimization module calculates the equalizer parameters based on the feature data and the preset optimization objectives, and feeds these parameters back to the parameter equalizer module. The parameter equalizer module updates its own configuration according to the new parameters to achieve parameter linkage updates. Perform real-time effect evaluation. The optimization module evaluates the effect of the parameter equalizer module in processing audio in real time. If the effect is not good, the optimization module adjusts the parameters again to form a closed-loop optimization process; Optimize the computing efficiency. Adopt a parallel processing mechanism to allocate some tasks that can be executed in parallel in the system to multiple processor cores or computing units for simultaneous processing. Implement a data caching strategy. For data that needs to be frequently used, use a caching mechanism for storage. Simplify the algorithms. Simplify and optimize the complex algorithms in the system to reduce the amount of computation while ensuring the processing effect; Optimize the memory management. Perform dynamic memory allocation to allocate and release memory according to the actual requirements during system operation. Optimize the data structure. Select appropriate data structures to store and manage the data in the system to improve the storage efficiency and access speed of the data. Optimize the caching strategy. Optimize the size and replacement strategy of the cache to ensure that the cache can effectively store and manage data.

[0021] Furthermore, in step S4, the module cooperation and user interaction functions are realized, including the implementation of a user interface including parameter visualization display and interactive control realization. Specifically: Perform parameter visualization display. Execute real-time plotting of the frequency response curve, and plot the frequency response curve of the equalizer in real time so that users can intuitively see the gain of the audio at different frequencies. Execute parameter value display to display the parameter values of the equalizer so that users can accurately understand the current parameter settings. Execute warning message prompt. When the system detects dangerous parameter settings or other abnormal situations, display warning messages on the interface in a timely manner to remind users to handle them; Perform interactive control realization. Provide an intuitive parameter adjustment interface to enable users to easily adjust the parameters of the equalizer. Execute preset management to support users to save and call preset parameter settings. Users can save corresponding parameter presets according to different audio scenarios and quickly call them when needed to improve the operation efficiency. Perform status monitoring display to display the operation status information of the system so that users can understand the working conditions of the system in real time.

[0022] On the other hand, the present invention provides an intelligent audio channel switching system for an audio device, including a processor and a memory, and the processor is used to execute the method as described above.

[0023] In addition, a computer-readable storage medium is provided, characterized in that: it stores a computer program, and when the program is executed by a processor, the method as described above is implemented.

[0024] Meanwhile, an electronic device is provided, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0025] Compared with the prior art, the present invention has at least one of the following beneficial effects: (1) The system stability is greatly enhanced: Configuring the protection mechanism is like a solid "shield", which monitors the equalizer parameters in real time. Once the parameters exceed the preset range, they are quickly restricted; for parameter combinations, the risk coefficient is accurately calculated through a risk assessment model. When the preset threshold is exceeded, the protection mechanism is immediately triggered, and parameter soft restriction, gradual transition processing, and user warning prompts are sequentially executed. In this way, the stability and reliability of the system operation are comprehensively guaranteed, completely eliminating the system crash phenomenon caused by improper parameter configuration, and ensuring that the audio processing work can be carried out stably and continuously.

[0026] (2) The application scenarios are greatly expanded: The new parametric equalizer (PEQ) function is like a "universal key", opening the door for the application of the equalizer in various complex audio processing scenarios. By using the second-order infinite impulse response (IIR) filter structure to carry out adaptive filter design, the frequency response characteristics can be flexibly and accurately adjusted according to the input center frequency and quality factor. The coordinated operation of dynamic frequency response optimization and multi-point equalization control algorithm makes the equalizer perform well in the field of professional audio processing. Whether it is the delicate carving of the timbre of each musical instrument during music recording or the precise control of sound effects in post-production of film and television, it can handle them with ease, meeting the requirements of various scenarios with high-precision frequency control.

[0027] (3) The operation threshold is significantly reduced: The intelligent parameter optimization function is like a "caring assistant", bringing unprecedented convenience to users. It comprehensively extracts the time-domain and frequency-domain characteristics of the audio, such as root mean square (RMS) energy, zero-crossing rate, spectral centroid, etc., to establish a close mapping relationship between the audio characteristics and parameters. Using the optimization objective function to automatically optimize the parameters and continuously adjust through a real-time feedback optimization mechanism, these series of operations enable ordinary users without professional audio knowledge to easily obtain audio processing effects comparable to professional levels. This intelligent design greatly reduces the threshold of tuning operations, allowing more users to enjoy the fun brought by high-quality audio processing.

[0028] (4)Comprehensive Performance and Experience Enhancement: In the system integration and optimization phase, all components work together synergistically to provide users with an all-round high-quality experience. The module collaboration mechanism is like a precise "gear set", ensuring efficient cooperation among the protection mechanism module, parameter equalizer module, and iterative optimization module, and guaranteeing smooth system operation. The optimization of computing efficiency and memory management is carried out simultaneously. By adopting parallel processing mechanisms, data caching strategies, algorithm simplification, dynamic memory allocation, data structure optimization, and cache strategy optimization, it is like injecting a powerful "power engine" into the system, improving system operation efficiency and reducing resource consumption. The carefully designed user interface, whether it is the real-time drawn frequency response curve, the intuitively displayed parameter values, the considerate warning message prompts, the convenient parameter adjustment interface, the practical preset management, or the real-time status monitoring display, is like creating an "intelligent cockpit" for users, enabling them to easily and intuitively operate and control the entire audio processing process, greatly enhancing the user experience. Brief Description of the Drawings

[0029] Figure 1 is the overall flowchart of the intelligent equalizer optimization method of the present invention; Figure 2 is the flowchart for multi-point equalization control of the present invention; Figure 3 is the schematic diagram of the module collaboration mechanism of the present invention; Figure 4 is the schematic diagram of performance optimization of the present invention; Figure 5 is the schematic diagram of the user interface implementation of the present invention; Figure 6 is the schematic diagram of the electronic device of the present invention. Detailed Embodiments

[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the scope of protection of this application.

[0031] Those skilled in the art of this technology can understand that unless specifically stated otherwise, the singular forms "a", "an", "the", and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groups.

[0032] The intelligent equalizer optimization system proposed by the present invention has significant technological innovations and advantages. First, by introducing an EQ configuration protection mechanism based on a risk coefficient model, the system can monitor and evaluate the risk of parameter combinations in real time, and prevent system crashes through soft limits and gradual transitions, significantly improving system stability. Second, the new PEQ function adopts an adaptive IIR filter structure, combined with dynamic frequency response optimization and multi-point equalization control algorithms, which not only expands the application range of low-pass / high-pass filters, but also achieves more precise frequency control. On this basis, the system innovatively introduces an intelligent parameter optimization mechanism. By extracting the time-domain and frequency-domain features of audio, a feature-parameter mapping model is established to realize automatic optimization and real-time adjustment of parameters. This optimization scheme based on multi-dimensional feature analysis greatly reduces the tuning threshold while ensuring professional-level audio processing effects. Finally, the system realizes efficient and reliable operation through a module collaborative working mechanism, performance optimization, and a user-friendly interface design. These technological innovations not only solve the stability and usability problems of traditional equalizer systems, but also provide a more comprehensive and intelligent solution for professional audio processing, with important practical value.

[0033] The technical solution of the present invention will be described in detail through specific embodiments as follows: The First Embodiment As Figure 1 shown, this embodiment provides an intelligent equalizer optimization method, including the following steps: S1: Implement an equalizer configuration protection mechanism to monitor and limit the input equalizer parameters in real time, establish a parameter combination risk assessment model to calculate the risk coefficient, and trigger the protection mechanism when the risk coefficient exceeds a preset threshold; S2: Implement an adaptive parameter equalizer function, adopt a second-order infinite impulse response (IIR) filter structure to adjust the characteristics of the frequency response, perform dynamic frequency response optimization, and optimize the filter parameters through the least mean square error criterion; S3: Perform parameter optimization, extract audio features and establish the mapping relationship between the audio features and parameters, and realize automatic parameter optimization by optimizing the objective function; S4: Perform system integration and optimization, including module collaboration and user interaction function implementation.

[0034] In step S1, the input equalizer parameters are monitored and limited in real time. A parameter preset range is set, and when the value of the equalizer parameter exceeds the parameter preset range, the value of the equalizer parameter is limited, including: The equalizer parameters including frequency, gain, and Q value in the input are monitored in real time, and a monitoring range is set for each of the equalizer parameters. The monitoring range includes a lower limit and an upper limit. When the value of the equalizer parameter is less than the lower limit of the range, the value of the lower limit of the range is taken as the value of the equalizer parameter. When the value of the equalizer parameter is greater than the upper limit of the range, the value of the upper limit of the range is taken as the value of the equalizer parameter.

[0035] For a specific example, the frequency range detection is set as f ∈ [20 Hz, 20 kHz], the gain range detection is set as g ∈ [-15 dB, +15 dB], and the Q value range detection is set as Q ∈ [0.1, 10].

[0036] Regarding the frequency range detection, the human auditory range is roughly between 20 Hz and 20 kHz. Frequencies outside this range have little impact on the human ear's perception of audio. Therefore, the system will detect whether the input frequency f is within the range of [20 Hz, 20 kHz]. If the frequency is too low or too high, it may not only be inaudible to the human ear but also cause an unnecessary burden on subsequent audio processing.

[0037] Regarding the gain range detection, the gain g represents the degree of amplification or attenuation of the audio signal amplitude. Limiting it within the range of [-15 dB, +15 dB] is to prevent audio distortion caused by over-amplifying the signal or the sound being too weak due to over-attenuating the signal.

[0038] Regarding the Q value range detection, the Q value reflects the width of the filter bandwidth. When the Q value is within the range of [0.1, 10], it can ensure that the filter has appropriate selectivity and adjustment effects in different application scenarios. A smaller Q value means a wider bandwidth, which can adjust a wider frequency range; a larger Q value corresponds to a narrower bandwidth for precise adjustment of specific frequencies.

[0039] For example, when the user inputs a frequency f = 25 kHz, which is outside the reasonable range, the system automatically limits it to 20 kHz according to the parameter validity judgment formula. The specific judgment formula used is "if f < fmin, then f = fmin; if f > fmax, then f = fmax". At the same time, this formula also applies to the detection of gain and Q value to ensure that all input parameters are within the specified range.

[0040] In step S1, a parameter combination risk assessment model is established to calculate the risk coefficient. When the risk coefficient exceeds the preset threshold, a protection mechanism is triggered, including: Multiply the absolute value of the gain, the reciprocal of the Q value, and the absolute value of the frequency change rate by different weight coefficients respectively and then sum them to calculate the risk coefficient; Set the preset threshold of the risk coefficient. When the risk coefficient exceeds the preset threshold, trigger the protection mechanism.

[0041] In this embodiment, the establishment of the parameter combination risk assessment model is further explained as follows: Merely detecting the effectiveness of a single parameter is not enough. Combinations between different parameters may pose potential risks. For example, certain parameter combinations may cause system instability, severe audio distortion, etc. Therefore, a risk assessment model needs to be established to comprehensively evaluate the risks of parameter combinations.

[0042] The parameter combination risk assessment model established by the system is R = α|g| + β / Q + γ|df / dt|.

[0043] R is the risk coefficient, which comprehensively reflects the degree of danger of the current parameter combination.

[0044] α, β, and γ are weight coefficients used to adjust the influence degree of each parameter on the risk coefficient. These coefficients can be adjusted according to the actual application scenario and system requirements.

[0045] |g| is the absolute value of the gain. A larger gain may increase the risk of audio distortion; Q is the Q value. A smaller Q value may make the selectivity of the filter worse; |df / dt| is the frequency change rate. Too fast a frequency change may cause the system to respond inadequately or generate anomalies.

[0046] When the risk coefficient R exceeds the preset threshold Rth, the system will trigger the protection mechanism.

[0047] For example, set α = 0.3, β = 0.4, γ = 0.3, and Rth = 0.8. When it is detected that g = 12dB, Q = 0.2, and df / dt = 1000Hz / s, it can be calculated that R = 0.3×12 + 0.4 / 0.2 + 0.3×1 = 3.6 + 2 + 0.3 = 5.9 > Rth. At this time, the system will trigger the protection mechanism.

[0048] In step S1, the protection mechanism includes parameter soft limits that restrict parameters within a safe range, gradual transition processing that smoothly adjusts parameters over a period of time, and user warning prompts that promptly inform the user that there are risks in the current parameter settings. Specifically: Perform parameter soft limits. Do not directly reject the input dangerous parameters, nor forcibly adjust the parameters to a fixed value within the parameter preset range. On the premise of ensuring that the parameters do not exceed the safe range, limit the parameters within the safe range, making the change of the equalizer parameters relatively smooth. Perform a gradual transition process. Based on the soft limit of the parameters, gradually change the value of the equalizer parameters over a period of time to make the transition of the audio signal before and after parameter adjustment smooth, ensuring the quality and coherence of the audio; Give a user warning prompt to promptly inform the user that the current parameter settings are dangerous and need to be adjusted.

[0049] In step S2, a second-order infinite impulse response (IIR) filter structure is used to adjust the characteristics of the frequency response, including using a second-order infinite impulse response (IIR) filter structure for adaptive filter design, and adjusting the characteristics of the frequency response according to the input center frequency and quality factor to meet different audio processing requirements. Specifically: Use a second-order infinite impulse response (IIR) filter structure for adaptive filter design to establish the transfer function of the adaptive filter; Calculate the filter coefficients, including calculating the normalized angular frequency through the center frequency and sampling frequency of the filter, mapping the actual frequency to the digital domain, and calculating the intermediate parameters of the filter through the normalized angular frequency and the quality factor; For a low-pass filter, calculate the numerator coefficients of the transfer function including the weighted coefficient of the input signal at the current moment, the weighted coefficient of the input signal at the previous moment, and the weighted coefficient of the input signal at the two previous moments, and the denominator coefficients including the weighted feedback coefficient of the output signal at the current moment, the weighted feedback coefficient of the output signal at the previous moment, and the weighted feedback coefficient of the output signal at the two previous moments, according to the normalized angular frequency and the intermediate parameters; Calculate the value of the transfer function through the calculated numerator coefficients, denominator coefficients, and by combining the unit delay operator and the double unit delay operator.

[0050] In this embodiment, further explanation is given for the adaptive filter design: In an audio processing system, to achieve a specific filtering effect, the system uses a second-order infinite impulse response (IIR) filter structure. The following will elaborate on the filter structure and the calculation of related coefficients in detail, and clarify the definition of each variable.

[0051] The transfer function of the second-order IIR filter adopted by the system is expressed in the z-transform form as: H(z)=(b0 + b1z^(-1)+b2z^(-2)) / (1 + a1z^(-1)+a2z^(-2)) where: H(z): The transfer function of the second-order IIR filter in the z-domain, which describes the relationship between the input and output signals of the filter in the z-domain. Through this function, the frequency response, stability, and other characteristics of the filter can be analyzed.

[0052] Z: A complex variable used in the z-transform. z^(-1) represents the unit delay operator, and z^(-2) represents the double unit delay operator.

[0053] b0, b1, b2: Coefficients of the numerator of the filter transfer function, which are the weighting coefficients for the input signal at the current moment, the input signal at the previous moment, and the input signal at the two previous moments, respectively.

[0054] 1, a1, a2: Coefficients of the denominator of the filter transfer function, which are the weighted feedback coefficients for the output signal at the current moment, the output signal at the previous moment, and the output signal at the two previous moments, respectively.

[0055] Filter coefficient calculation: When calculating the filter coefficients, some intermediate variables need to be introduced, and these variables are related to the key parameters of the filter.

[0056] Normalized angular frequency ω0 Definition: ω0 is the normalized angular frequency, which is used to map the actual frequency to the digital domain for convenient calculation in digital signal processing.

[0057] Calculation formula: ω0 = 2πf / fs Parameter meaning: f: The center frequency of the filter, that is, the frequency point where the filter mainly acts. Different center frequencies will cause the filter to have different responses to signals of different frequencies.

[0058] fs: Sampling frequency, which is the frequency for discretely sampling a continuous signal. According to the Nyquist sampling theorem, the sampling frequency must be greater than twice the highest frequency of the signal to ensure that the signal can be accurately recovered.

[0059] Intermediate parameter α Definition: α is an intermediate parameter that combines the information of the normalized angular frequency and the quality factor and is used for subsequent calculation of the filter coefficients.

[0060] Calculation formula: α = sin(ω0) / (2Q) Parameter meaning: Q: Quality factor of the filter, which reflects the selectivity of the filter. The larger the Q value, the narrower the bandwidth of the filter and the stronger the ability to select signals near the center frequency; the smaller the Q value, the wider the bandwidth of the filter and the weaker the selectivity for frequencies.

[0061] Low-pass filter coefficient calculation For a low-pass filter, the coefficients of the transfer function can be calculated based on the above intermediate variables.

[0062] Numerator coefficient b0 Calculation formula: b0 = (1 - cos(ω0)) / 2 Meaning: The weighting coefficient of the input signal at the current moment, which affects the contribution degree of the current input signal to the filter output.

[0063] Numerator coefficient b1 Calculation formula: b1 = 1 - cos(ω0) Meaning: The weighting coefficient of the input signal at the previous moment, reflecting the influence of the input signal at the previous moment on the current output.

[0064] Numerator coefficient b2 Calculation formula: b2 = (1 - cos(ω0)) / 2 Meaning: The weighting coefficient of the input signal at the two previous moments, enabling the filter to consider the information of more distant input signals.

[0065] Denominator coefficient a1 Calculation formula: -2cos(ω0) Meaning: The weighted feedback coefficient of the output signal at the previous moment, which determines the feedback degree of the output signal at the previous moment to the current output and affects the recursive characteristic of the filter.

[0066] Denominator coefficient a2 Calculation formula: a2 = 1 - 2αcos(ω0) Meaning: The weighted feedback coefficient of the output signal at the two previous moments, further enhancing the recursive characteristic of the filter and enabling the filter to perform operations based on the output historical information over a longer period.

[0067] Through the above steps, the coefficients of the second-order IIR low-pass filter can be calculated according to the center frequency f, sampling frequency fs, and quality factor Q of the filter, thereby determining the transfer function of the filter and realizing the filtering process of the audio signal.

[0068] In step S2, dynamic frequency response optimization is performed, and the filter parameters are optimized by the least mean square error criterion, including: Performing dynamic frequency response optimization, including real-time calculation of the current frequency response including the amplitude response and phase response; Among them, the amplitude response of the current filter is calculated in real time, and its value is the modulus of the numerical value of the transfer function of the filter in the frequency domain. The amplitude response describes the gain situation of the filter for signals with different frequency components. In a low-pass filter, the amplitude response value corresponding to low-frequency signals is larger, and the amplitude response value corresponding to high-frequency responses is smaller; Calculate the phase response of the current filter in real time, which is the complex argument of the value of the transfer function of the filter in the frequency domain. The phase response describes the phase delay of the filter for signals with different frequency components. Optimize the filter parameters according to the least mean square error criterion to make the frequency response of the filter as close as possible to the target frequency response.

[0069] In this embodiment, the following is a further explanation of the dynamic frequency response optimization: In an audio processing system, to better meet the actual requirements of the frequency response of the filter, the system will perform dynamic frequency response optimization. This process mainly includes two key steps: calculating the current frequency response in real time and optimizing the filter parameters according to the least mean square error criterion. The following will define each variable involved in detail.

[0070] The system will calculate the frequency response of the current filter in real time, including the magnitude response M(ω) and the phase response φ(ω).

[0071] Magnitude response M(ω): Definition: The magnitude response M(ω) describes the gain of the filter for signals with different frequency components, that is, the degree of amplification or attenuation of the input signal amplitude at each frequency point of the filter.

[0072] Calculation formula: M(ω) = |H(e^(jω))| Parameter meaning: ω: Digital angular frequency, which is the normalized representation of the actual frequency. Its value range is usually [0, 2π], reflecting the frequency characteristics of the signal in the digital domain.

[0073] H(e^(jω)): The transfer function of the filter in the frequency domain, which is obtained by substituting z = e^(jω) into the transfer function H(z) in the z domain. For example, for a second-order IIR filter H(z)=(b0 + b1z^(-1)+b2z^(-2)) / (1 + a1z^(-1)+a2z^(-2)), substituting z = e^(jω) can obtain H(e^(jω)).

[0074] |H(e^(jω))|: Represents taking the modulus value of H(e^(jω)), that is, the magnitude of the complex number H(e^(jω)). For example, in a low-pass filter, the M(ω) value corresponding to a low-frequency signal is larger, indicating that the amplitude of the low-frequency signal remains basically unchanged or is amplified after passing through the filter; while the M(ω) value corresponding to a high-frequency signal is smaller, indicating that the high-frequency signal is attenuated by the filter.

[0075] Phase response φ(ω): Definition: The phase response φ(ω) describes the phase delay of the filter for signals with different frequency components, that is, the filter will cause different degrees of delay in time for signals of different frequencies.

[0076] Calculation formula: φ(ω) = arg(H(e^(jω))) Parameter meaning: arg: Represents taking the argument of a complex number, that is, the angle between the complex number H(e^(jω)) and the positive direction of the real axis in the complex plane. The phase response has an important impact on aspects such as the time characteristics of audio signals and stereo effects. For example, if the phase response is unreasonable, it may lead to deviations in sound localization.

[0077] Optimizing filter parameters through the least mean square error criterion In order to make the frequency response of the filter as close as possible to the target frequency response, the system uses the least mean square error criterion to optimize the parameters of the filter.

[0078] Least mean square error E Definition: The least mean square error E is used to measure the degree of difference between the amplitude response M(ω) of the current filter and the target frequency response Md(ω). By minimizing E, the frequency response of the filter can be made closer to the ideal state.

[0079] Calculation formula: E = Σ|Md(ω) - M(ω)|² Parameter meaning: Md(ω): Target frequency response, which represents the ideal frequency response characteristics that the filter should achieve in a specific audio processing scenario. For example, in audio noise reduction processing, the target frequency response may be to make the gain of the frequencies where the noise is located zero, while keeping the gain of the frequencies where the useful signal is located unchanged.

[0080] M(ω): Amplitude response of the current filter, that is, the value calculated in real time previously.

[0081] By continuously adjusting the parameters of the filter (such as the coefficients b0, b1, b2, a1, a2, etc. in a second-order IIR filter), E is gradually reduced, thereby realizing the optimization of the filter parameters and making the frequency response of the filter better meet the actual requirements.

[0082] After step S2, it also includes, as Figure 2 shown, performing multi-point equalization control to implement a multi-point linkage control algorithm including determining key frequency points as control points, establishing an interpolation model for parameter estimation, and generating a smooth transition curve to achieve multi-point linkage, specifically: S201 determines a series of key frequency points as control points according to the specific requirements of audio processing, calculates the frequency interval and frequency ratio between adjacent control points, where the frequency interval reflects the distribution density of the control points on the frequency axis, and the frequency ratio reflects the relative relationship between different frequency regions; S202: Select a preset interpolation method to establish an interpolation model, perform interpolation between the control points, and estimate the parameter values of other frequency points; S203: Smooth the interpolated curve, remove possible high-frequency noise or sharp changes, and perform fine-tuning including adjusting the slope and curvature on the curve according to the audio characteristics and processing requirements to achieve a better audio processing effect.

[0083] In step S3, audio feature extraction is performed. The audio features include time-domain features such as root mean square (RMS) energy, zero-crossing rate, and envelope features, and frequency-domain features such as spectral centroid, frequency band energy distribution, and harmonic distribution. Specifically: Perform time-domain feature extraction including RMS energy, zero-crossing rate, and envelope features, where the RMS energy reflects the average power of the audio signal, the zero-crossing rate represents the number of times the audio signal crosses zero within a unit time, and the envelope feature reflects the change of the amplitude of the audio signal over time; Perform frequency-domain feature extraction including spectral centroid, frequency band energy distribution, and harmonic distribution. Among them, the spectral centroid represents the centroid position of the audio spectrum, the frequency band energy distribution describes the distribution of audio energy in different frequency bands, and the harmonic distribution reflects the content and distribution of harmonic components in the audio.

[0084] In this embodiment, the audio feature extraction is further explained as follows: (1) Time-domain feature extraction Time-domain features mainly reflect the characteristics of audio signals in the time dimension.

[0085] RMS energy (root mean square energy) Definition: RMS energy is used to measure the average power of an audio signal and can reflect the overall loudness of the audio.

[0086] Calculation formula: RMS = sqrt(1 / N * Σx²(n)) Parameter meaning: N: Represents the number of sampling points of the audio signal, that is, the number of discrete sampling values contained in the audio within a period of time.

[0087] x(n): represents the amplitude of the audio signal at the nth sampling moment. Square the amplitude of each sampling point, then sum and take the average, and finally take the square root to obtain the RMS energy. For example, the RMS energy of an audio in a noisy environment is usually higher than that of an audio in a quiet environment.

[0088] Zero Crossing Rate (ZCR) Definition: The zero crossing rate represents the number of times the audio signal crosses zero within a unit time, and it can be used to distinguish different types of audio signals, such as speech and music.

[0089] Calculation formula: ZCR = 1 / N * Σ|sign(x(n)) - sign(x(n - 1))| Meaning of parameters: N: Also the number of sampling points of the audio signal.

[0090] x(n): The amplitude of the audio signal at the nth sampling moment.

[0091] sign: Sign function. When x(n) is greater than 0, sign(x(n)) = 1; when x(n) is equal to 0, sign(x(n)) = 0; when x(n) is less than 0, sign(x(n)) = -1. By calculating the sum of the absolute values of the differences of the signs of adjacent sampling points and then dividing by the number of sampling points, the zero crossing rate is obtained. Generally speaking, the zero crossing rate of speech signals is relatively high.

[0092] Envelope feature Definition: The envelope feature describes how the amplitude of the audio signal changes over time. It can help identify the start, end, and intensity changes of the audio, such as reflecting the attack, sustain, and decay processes of notes in music.

[0093] (2) Frequency domain feature extraction Frequency domain features mainly reflect the characteristics of the audio signal in the frequency dimension.

[0094] Spectral Centroid (SC) Definition: The spectral centroid represents the centroid position of the audio spectrum, and it can reflect the pitch of the audio. A higher spectral centroid usually corresponds to a higher pitch.

[0095] Calculation formula: SC = Σ(f(k) * ) / Σ|X(k)| Meaning of parameters: k: Represents the index of the frequency component.

[0096] f(k): Represents the frequency value of the kth frequency component.

[0097] X(k): Is the complex representation of the audio signal at the kth frequency component after Fourier transform.

[0098] |X(k)| represents taking the modulus value of X(k), that is, the amplitude of this frequency component. By multiplying the frequency value of each frequency component by its amplitude, then summing and dividing by the sum of the amplitudes of all frequency components, the spectral centroid is obtained.

[0099] Frequency band energy distribution Definition: The frequency band energy distribution describes the distribution of audio energy in different frequency bands. By analyzing the frequency band energy distribution, the relative intensities of various frequency components in the audio can be understood. For example, in rock music, the energy of low frequencies and high frequencies may be relatively high.

[0100] Harmonic distribution Definition: The harmonic distribution reflects the content and distribution of harmonic components in the audio. In music signals, harmonics are important factors in forming timbre, and the harmonic distributions of different musical instruments have their own characteristics.

[0101] In step S3, a mapping relationship between the audio features and parameters is established, and the automatic optimization of parameters is achieved by optimizing the objective function. Specifically: Establish the mapping model between the audio features and parameters. The mapping model is a mapping function established through the vector of the audio features, and the value of the mapping function is the equalizer parameter vector, including parameters such as frequency, gain, and Q value; establish an optimization objective function, comprehensively consider multiple audio quality indicators including frequency response flatness, phase characteristics, and time-domain distortion, and set different weight coefficients for each of the audio quality indicators and then accumulate to obtain the value of the final optimization objective function; Calculate the current audio quality score and perform parameter iterative optimization to achieve real-time feedback optimization.

[0102] In this embodiment, the following is a further explanation of establishing the mapping relationship between the audio features and parameters after extracting the audio features in step S3 and achieving the automatic optimization of parameters by optimizing the objective function: (1) Establish the feature-parameter mapping model The feature-parameter mapping model is used to establish the association between audio features and equalizer parameters, and predict appropriate equalizer parameters through known audio features.

[0103] Model expression: P = F(V) Definition of each variable: Equalizer parameter vector P: It is a vector containing various parameters of the equalizer. For example, for a typical equalizer, the parameters may include frequency (such as the center frequency), gain (the degree of amplification or attenuation of signals at different frequencies), Q value (reflecting the selectivity of the filter), etc.

[0104] Audio feature vector V: It is a vector containing various features extracted from the audio signal. In the previous audio feature extraction step, we extracted time-domain features (such as RMS energy, zero-crossing rate, envelope features) and frequency-domain features (such as spectral centroid, frequency band energy distribution, harmonic distribution).

[0105] Mapping function F: It is a function that maps the audio feature vector V to the equalizer parameter vector P. This function can be trained through machine learning algorithms (such as neural networks, support vector machines, etc.). During the training process, a large number of audio samples and their corresponding optimal equalizer parameters are used as training data, allowing the model to learn the relationship between audio features and equalizer parameters, thereby determining the specific form of the mapping function F.

[0106] (2) Optimization objective function The optimization objective function is used to comprehensively consider multiple audio quality metrics. By adjusting the equalizer parameters, the value of this objective function is minimized (or maximized) to achieve the best audio processing effect.

[0107] Objective function expression: J = w1J1 + w2J2 + w3J3 Definition of each variable: Objective function J: It is an indicator that comprehensively measures the audio quality and is obtained by weighted summation of multiple audio quality metrics. Our goal is to adjust the equalizer parameters to make the value of J as small as possible (or maximize it according to specific circumstances), thereby achieving the optimization of audio quality.

[0108] Weight coefficients w1, w2, w3: These weight coefficients are used to adjust the importance of each audio quality metric in the objective function. Their value ranges are usually [0,1], and w1 + w2 + w3 = 1. For example, if we are more concerned about the flatness of the frequency response, we can set the value of w1 to be larger; if we are more sensitive to time-domain distortion, we can increase the value of w3.

[0109] Audio quality metrics J1, J2, J3: Frequency response flatness J1: It is used to measure whether the response of the audio at different frequencies is uniform. An ideal audio processing system should have a flat frequency response throughout the frequency range, that is, the gain of signals at each frequency is the same. The frequency response flatness J1 can be obtained by calculating the difference between the actual frequency response and the ideal flat frequency response. The smaller the difference, the better the frequency response flatness.

[0110] Phase characteristic J2: It reflects the change in the phase of an audio signal after processing. Good phase characteristics can ensure that the time information of the audio is not distorted and avoid problems such as inaccurate sound localization. Phase characteristic J2 can be evaluated by analyzing the phase delay and phase distortion of the audio signal at different frequencies.

[0111] Time-domain distortion degree J3: It represents the degree of distortion of an audio signal in the time domain. For example, during audio processing, if clipping, non-linear distortion, etc. occur, it will lead to an increase in the time-domain distortion degree. Time-domain distortion degree J3 can be calculated by comparing the differences between the original audio signal and the processed audio signal in the time domain.

[0112] Furthermore, calculate the current audio quality score and perform parameter iterative optimization to achieve real-time feedback optimization. Specifically: Obtain the current audio quality score by calculating the weighted sum of each quality index to quantify the quality level of the current audio; Use the method of gradient ascent or gradient descent for parameter iterative optimization. In the parameter iteration, use the learning rate to control the compensation of parameter update, use the quality score gradient to represent the direction and rate of change of the quality score with respect to the parameters, and gradually improve the audio quality score by continuously iterating and updating the parameters, so as to achieve real-time optimization of the equalizer parameters.

[0113] In this embodiment, the following is a further explanation of calculating the current audio quality score in step S3 and performing parameter iterative optimization to achieve real-time feedback optimization: (1) Calculate the current audio quality score To quantify the quality level of the current audio, it is necessary to calculate the audio quality score Q.

[0114] Score calculation formula: Q = Σwi * qi Definitions of each variable: Audio quality score Q: This is a comprehensive index used to measure the overall quality of the current audio. It is obtained by weighted summation of each specific quality index. The larger its value (or there may be different optimal value directions according to specific situations), the better the audio quality.

[0115] Weight coefficient wi: Each weight coefficient wi corresponds to a quality index qi and is used to adjust the importance of this quality index in the overall score. The value range of the weight coefficient is usually between [0,1], and the sum of all weight coefficients is 1. For example, if more attention is paid to the flatness of the audio frequency response, then the weight coefficient wi corresponding to the quality index of frequency response flatness can be set relatively large.

[0116] Each quality index qi: These quality indices are quantitative descriptions of different aspects of the audio. For example, they may include frequency response flatness, phase characteristics, time-domain distortion, etc. Each quality index qi has its specific calculation method, which reflects the quality status of the audio in a specific aspect. For example, the frequency response flatness index can be calculated by comparing the difference between the actual frequency response and the ideal frequency response. The smaller the difference, the better the value of this index.

[0117] (2)Parameter iterative optimization According to the calculated audio quality score, use an iterative method to continuously optimize the equalizer parameters to improve the audio quality.

[0118] Iterative formula: P(n + 1) = P(n) + μ∇Q Definition of each variable: Equalizer parameter vector P: P(n) represents the equalizer parameter vector at the nth iteration, and P(n + 1) represents the equalizer parameter vector at the (n + 1)th iteration. This vector contains various parameters of the equalizer, such as frequency, gain, value, etc., which are used to control the way the equalizer processes the audio signal.

[0119] Learning rate μ: The learning rate is a positive number that controls the step size of each parameter update. A larger learning rate can make the parameters change rapidly during the iteration process, but it may cause the algorithm to fail to converge or even skip the optimal solution; a smaller learning rate will make the parameter update speed slower, but it can approximate the optimal solution more precisely. In practical applications, an appropriate learning rate needs to be selected according to specific situations.

[0120] Quality score gradient ∇Q: The gradient is a vector that represents the direction and rate of change of the quality score Q with respect to the equalizer parameter vector P. Specifically, each component in ∇Q corresponds to a parameter in the equalizer parameter vector P, indicating the degree of influence of a small change in this parameter on the audio quality score Q. By updating the parameters along the direction of the gradient, the audio quality score Q can be changed in the optimal direction. For example, if the gradient of a certain parameter is positive, it means that increasing the value of this parameter can improve the audio quality score; if the gradient is negative, the value of this parameter needs to be decreased.

[0121] In step S4, the module cooperation and user interaction functions are implemented, including executing the module cooperation working mechanism, performing the interaction between the protection mechanism module and the parameter equalizer module, and the cooperation between the parameter equalizer and the iterative optimization module, and performing performance optimizations including calculation efficiency optimization and memory management optimization. Specifically: Such as Figure 3As shown in the figure, the interaction between the protection mechanism module and the parameter equalizer module is carried out, including the protection mechanism module performing a legality check on the input parameters received by the parameter equalizer module, combining the parameter combinations of the parameter equalizer module, the protection mechanism module performing a risk assessment, and when the risk assessment result shows that the parameter combination is dangerous, the protection mechanism module executes the corresponding protection strategy; The parameter equalizer cooperates with the iterative optimization module to share feature data. The parameter equalizer module shares the feature data extracted during the audio processing to the optimization module. The optimization module uses the feature data for analysis and modeling to determine more appropriate equalizer parameters and perform parameter linkage updates. The optimization module calculates the equalizer parameters based on the feature data and the preset optimization goals, and feeds these parameters back to the parameter equalizer module. The parameter equalizer module updates its own configuration according to the new parameters to achieve parameter linkage updates. The optimization module evaluates the effect of the parameter equalizer module processing audio in real time. If the effect is not good, the optimization module adjusts the parameters again to form a closed-loop optimization process; As Figure 4 shown in the figure, the computational efficiency is optimized. A parallel processing mechanism is adopted to allocate some tasks that can be executed in parallel in the system to multiple processor cores or computing units for simultaneous processing. A data caching strategy is carried out. For data that needs to be frequently used, a caching mechanism is used for storage. The complex algorithms in the system are simplified and optimized to reduce the computational amount while ensuring the processing effect; The memory management is optimized. Dynamic memory allocation is carried out to allocate and release memory according to the actual needs during the system operation. The data structure is optimized to select an appropriate data structure to store and manage the data in the system, improving the storage efficiency and access speed of the data. The caching strategy is optimized to optimize the size and replacement strategy of the cache to ensure that the cache can effectively store and manage the data.

[0122] In step S4, the module coordination and user interaction functions are realized, including the realization of the user interface including parameter visualization display and interaction control implementation. Specifically: As Figure 5 shown in the figure, the parameter visualization display is carried out. The real-time frequency response curve is drawn to draw the frequency response curve of the equalizer in real time, enabling the user to intuitively see the gain of the audio at different frequencies. The parameter values are displayed to display the parameter values of the equalizer, enabling the user to accurately understand the current parameter settings. The warning message is prompted. When the system detects that the parameter settings are dangerous or other abnormal situations occur, a warning message is timely displayed on the interface to remind the user to handle it; Implement interactive control to provide an intuitive parameter adjustment interface, enabling users to conveniently adjust the parameters of the equalizer, perform preset management, support users in saving and calling preset parameter settings. Users can save corresponding parameter presets according to different audio scenarios and quickly call them when needed to improve operation efficiency. Conduct status monitoring and display the operating status information of the system, enabling users to understand the working conditions of the system in real time.

[0123] The second embodiment This embodiment provides an intelligent channel switching system for an audio device, including a processor and a memory. It is characterized in that the processor is used to execute the method in the first embodiment.

[0124] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above audio control method. This electronic device can be a server or a terminal device.

[0125] As Figure 6 shown, the electronic device includes a processor 14 and a memory 13. The memory 13 stores machine-executable instructions that can be executed by the processor 14, and the processor 14 executes the machine-executable instructions to implement the above audio control method.

[0126] Furthermore, Figure 6 the electronic device shown also includes a bus 12 and a communication interface 11. The processor 14, the communication interface 11, and the memory 13 are connected through the bus 12.

[0127] Among them, the memory 13 may include high-speed random access memory (RAM, Random Access Memory), and may also include non-volatile memory, such as at least one disk memory. Through at least one communication interface 11 (which can be wired or wireless), a communication connection is achieved between this system network element and at least one other network element. The Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 12 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 4 only a bidirectional arrow is used in

[0128] The processor 14 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 14 or the instructions in the form of software. The above-mentioned processor 14 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in this embodiment. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with this embodiment can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 1001, and the processor 1000 reads the information in the memory 1001 and combines its hardware to complete the steps of the audio control method.

[0129] The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or the computer-readable storage medium may also be a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer is enabled to execute the steps of the audio control method.

[0130] Finally, it should be noted that the above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as the protection scope of the present invention.

[0131] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

Claims

1. An intelligent equalizer optimization method, characterized in that: The following steps are involved: S1: Implementing a protection mechanism for equalizer configuration, real-time monitoring and limiting input equalizer parameters, establishing a parameter combination risk assessment model to calculate a risk coefficient, and triggering a protection mechanism when the risk coefficient exceeds a preset threshold; S2: Implements the adaptive parameter equalizer function, uses the second-order infinite impulse response (IIR) filter structure to adjust the frequency response characteristics, performs dynamic frequency response optimization, and optimizes the filter parameters through the minimum mean square error criterion; S3: Optimize parameters, extract audio features and establish a mapping relationship between the audio features and parameters, and automatically optimize parameters by optimizing the objective function; S4: Perform system integration and optimization, including module collaboration and user interaction function implementation.

2. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S1, the inputted equalizer parameters are monitored and limited in real time, and a preset range of parameters is set. When the value of the equalizer parameter exceeds the preset range of parameters, the value of the equalizer parameter is limited, including: Performing real-time monitoring on the input equalizer parameters including frequency, gain, and Q value, and setting a monitoring range for each equalizer parameter, wherein the monitoring range includes a lower limit and an upper limit; When the value of the equalizer parameter is less than the lower limit of the range, taking the value of the lower limit of the range as the value of the equalizer parameter; When the value of the equalizer parameter is greater than the upper limit of the range, the value of the upper limit of the range is taken as the value of the equalizer parameter.

3. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S1, a parameter combination risk assessment model is established to calculate a risk coefficient. When the risk coefficient exceeds a preset threshold, a protection mechanism is triggered, including: The risk coefficient is calculated by multiplying the absolute value of the gain, the inverse of the Q value, and the absolute value of the frequency change rate by different weight coefficients and summing them up; The preset threshold of the risk coefficient is set, and when the risk coefficient exceeds the preset threshold, a protection mechanism is triggered.

4. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S1, the protection mechanism includes soft parameter limits for limiting parameters within a safe range, gradual transition processing for smoothly adjusting parameters over a period of time, and user warning prompts that promptly inform users of risks in current parameter settings, specifically: The soft limit of the parameters is performed, and the input dangerous parameters are not directly rejected, and the parameters are not forcibly adjusted to fixed values ​​in the preset range of the parameters. On the premise of ensuring that the parameters do not exceed the safe range, the parameters are limited to the inside of the safe range, so that the change of the equalizer parameters is relatively smooth; Performing the gradual transition processing, based on the soft limit of the parameter, gradually changing the value of the equalizer parameter within a period of time, so that the transition of the audio signal before and after the parameter adjustment is smooth, and ensuring the quality and coherence of the audio; The user warning prompt is performed to promptly inform the user that the current parameter settings are dangerous and need to be adjusted.

5. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S2, the frequency response characteristics are adjusted using a second-order infinite impulse response (IIR) filter structure, including using a second-order infinite impulse response (IIR) filter structure to perform adaptive filter design, and adjusting the frequency response characteristics according to the input center frequency and quality factor to adapt to different audio processing requirements, specifically: Adopting the second-order infinite impulse response (IIR) filter structure to design the adaptive filter, the transfer function of the adaptive filter is established; Calculating filter coefficients, including calculating a normalized angular frequency through a center frequency and a sampling frequency of the filter, mapping the actual frequency to a digital domain, and calculating filter intermediate parameters through the normalized angular frequency and the quality factor; For the low-pass filter, the numerator coefficients of the transfer function including the weighted coefficients of the input signal at the current moment, the weighted coefficients of the input signal at the previous moment, and the weighted coefficients of the input signal at the previous two moments are calculated according to the normalized angular frequency and the intermediate parameters, and the denominator coefficients including the weighted feedback coefficients of the output signal at the current moment, the weighted feedback coefficients of the output signal at the previous moment, and the weighted feedback coefficients of the output signal at the previous two moments are calculated; The value of the transfer function is calculated by using the calculated numerator coefficient, the denominator coefficient, and combining a unit delay operator and a double unit delay operator.

6. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S2, dynamic frequency response optimization is performed, and filter parameters are optimized by the minimum mean square error criterion, including: Perform dynamic frequency response optimization, including real-time calculation of the current frequency response including magnitude response and phase response; The amplitude response of the current filter is calculated in real time, and the value is the modulus of the numerical value of the transfer function of the filter in the frequency domain. The amplitude response describes the gain of the filter to signals with different frequency components. In a low-pass filter, the amplitude response value corresponding to the low-frequency signal is larger, and the amplitude response value corresponding to the high-frequency response is smaller. Calculate the phase response of the current filter in real time, taking the complex argument of the numerical value of the transfer function of the filter in the frequency domain, wherein the phase response describes the phase delay of the filter to signals with different frequency components; The filter parameters are optimized by the minimum mean square error criterion so that the frequency response of the filter is as close to the target frequency response as possible.

7. The intelligent equalizer optimization method according to claim 1, characterized in that: After step S2, the method further includes performing multi-point equalization control to implement a multi-point linkage control algorithm including determining key frequency points as control points, establishing an interpolation model for parameter estimation, and generating a smooth transition curve to achieve multi-point linkage, specifically: According to the specific requirements of audio processing, a series of key frequency points are determined as control points, and the frequency interval and frequency ratio between adjacent control points are calculated, wherein the frequency interval reflects the distribution density of the control points on the frequency axis, and the frequency ratio reflects the relative relationship between different frequency regions; Select a preset interpolation method to establish an interpolation model, perform interpolation between the control points, and estimate parameter values ​​of other frequency points; Smooth the interpolated curve to remove possible high-frequency noise or sharp changes. According to the audio characteristics and processing requirements, fine-tune the curve including adjusting the slope and curvature to achieve better audio processing effects.

8. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S3, audio features are extracted, and the audio features include time domain features including root mean square RMS energy, zero crossing rate, and envelope features, and frequency domain features including spectrum centroid, frequency band energy distribution, and harmonic distribution, specifically: Extracting time domain features including root mean square (RMS) energy, zero-crossing rate, and envelope features, wherein the root mean square (RMS) energy reflects the average power of the audio signal, the zero-crossing rate represents the number of times the audio signal crosses the zero point per unit time, and the envelope features reflect the change in the amplitude of the audio signal over time; Frequency domain feature extraction including spectrum centroid, frequency band energy distribution, and harmonic distribution, wherein the spectrum centroid represents the center of gravity of the audio spectrum, the frequency band energy distribution describes the distribution of audio energy in different frequency bands, and the harmonic distribution reflects the content and distribution of harmonic components in the audio.

9. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S3, a mapping relationship between the audio features and the parameters is established, and automatic parameter optimization is achieved by optimizing the objective function, specifically: Establishing the audio feature and parameter mapping model, wherein the mapping model is a mapping function established by the vector of the audio feature, and the value of the mapping function is an equalizer parameter vector, including parameters such as frequency, gain, and Q value; Establishing an optimization objective function, comprehensively considering multiple audio quality indicators including frequency response flatness, phase characteristics, and time domain distortion, and setting different weight coefficients for each of the audio quality indicators and then accumulating them to obtain the value of the final optimization objective function; Calculate the current audio quality score and perform iterative parameter optimization to achieve real-time feedback optimization.

10. The intelligent equalizer optimization method according to claim 9, characterized in that: Calculate the current audio quality score and perform iterative parameter optimization to achieve real-time feedback optimization, specifically: The current audio quality score is obtained by calculating the weighted sum of various quality indicators to quantify the quality level of the current audio; The gradient ascent or gradient descent method is used for parameter iterative optimization. The learning rate is used to control the compensation of parameter update in parameter iteration. The quality score gradient is used to represent the direction and rate of change of the quality score with the parameter. By continuously iteratively updating the parameters, the audio quality score is gradually improved, thereby achieving real-time optimization of the equalizer parameters.

11. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S4, the module collaboration and user interaction functions are implemented, including executing the module collaborative working mechanism, interacting the protection mechanism module with the parameter equalizer module, and cooperating the parameter equalizer with the iterative optimization module, and performing performance optimization including computing efficiency optimization and memory management optimization, specifically: Performing interaction between the protection mechanism module and the parameter equalizer module, including the protection mechanism module performing a validity check on the input parameters received by the parameter equalizer module, combining the parameter combination of the parameter equalizer module, the protection mechanism module performing a risk assessment, and when the risk assessment result shows that the parameter combination is dangerous, the protection mechanism module executes a corresponding protection strategy; The parametric equalizer cooperates with the iterative optimization module to share feature data. The parametric equalizer module shares the feature data extracted during audio processing with the optimization module. The optimization module uses the feature data for analysis and modeling to determine more appropriate equalizer parameters and perform parameter linkage update. The optimization module calculates the equalizer parameters based on the feature data and the preset optimization goals, and feeds these parameters back to the parametric equalizer module. The parametric equalizer module updates its own configuration based on the new parameters to achieve linkage update of parameters and perform real-time effect evaluation. The optimization module evaluates the effect of the parametric equalizer module in processing audio in real time. If the effect is not good, the optimization module adjusts the parameters again to form a closed-loop optimization process. Optimize computing efficiency, adopt parallel processing mechanism, distribute some tasks that can be executed in parallel to multiple processor cores or computing units for simultaneous processing, implement data caching strategy, use cache mechanism to store data that needs to be used frequently, simplify algorithm processing, simplify and optimize complex algorithms in the system, and reduce the amount of calculation while ensuring processing effect; Optimize memory management, perform dynamic memory allocation, allocate and release memory according to actual needs during system operation, optimize data structure, select appropriate data structure to store and manage data in the system, improve data storage efficiency and access speed, optimize cache strategy, optimize cache size and replacement strategy, and ensure that the cache can effectively store and manage data.

12. The intelligent equalizer optimization method according to claim 1, characterized in that: In step S4, module collaboration and user interaction functions are implemented, including user interface implementation including parameter visualization and interactive control implementation, specifically: Perform parameter visualization and real-time drawing of frequency response curves. Draw the frequency response curve of the equalizer in real time, so that users can intuitively see the gain of the audio at different frequencies. Perform parameter value display, display the values ​​of various parameters of the equalizer, so that users can accurately understand the current parameter settings. Perform warning information prompts. When the system detects that the parameter settings are dangerous or other abnormal situations occur, it will promptly display warning information on the interface to remind users to handle them. It implements interactive control and provides an intuitive parameter adjustment interface, allowing users to easily adjust the parameters of the equalizer. It performs preset management and supports users to save and call preset parameter settings. Users can save corresponding parameter presets according to different audio scenarios and quickly call them when needed to improve operational efficiency. It also performs status monitoring and displays the system's operating status information, allowing users to understand the system's working conditions in real time.

13. An intelligent channel switching system for audio equipment, comprising a processor and a memory, characterized in that , the processor is used to execute the method as described in any one of claims 1-12.

14. A computer-readable storage medium, characterized in that : A computer program is stored, and when the program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

15. An electronic device, characterized in that: include: one or more processors; A storage device, used for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the method according to any one of claims 1 to 12.