Signal processing methods and equipment.

TH124065BActive Publication Date: 2026-08-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
TH1601004821
Authority / Receiving Office
TH · TH
Patent Type
Patents
Current Assignee / Owner
Priority Date
2014-12-01
Filing Date
2014-12-01
Publication Date
2026-08-21
Estimated Expiration
2034-11-30

AI Technical Summary

Technical Problem

In existing frequency domain coding algorithms, low-frequency subbands become performance bottlenecks in signal coding, and the bit allocation method cannot effectively adapt to the bit requirements of each subband, resulting in poor signal coding and decoding performance.

Method used

Select M subbands of the low frequency band from N subbands, perform correction operations based on their energy characteristics and spectrum characteristics, obtain the corrected envelope value, and perform bit allocation based on the corrected envelope value and the original envelope values ​​of other subbands to ensure The bit allocation is more consistent with the needs of each subband.

Benefits of technology

It improves the coding and decoding performance of signals, especially the coding performance of low-frequency subbands, and improves the overall signal processing quality through more reasonable bit allocation.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The form of this invention provides for a method and device for signal processing; the method includes: Selecting M sub-strips from N sub-strips, where the N sub-strips are obtained by dividing the coefficients of... The spectrum of the current frame of the signal and the frequency band of the sub-band M, the band below the frequency band of... Sub-bar K, sub-bar N, sub-bar M, except for sub-bar M; decision is determined based on information about... The performance of sub-band M is required to perform operations to modify the original envelope value of sub-band M, which... Performance information is used to identify energy characteristics and spectral characteristics. This belongs to the M-strip sub-band; the separation process modifies the original envelope value of the M-strip sub-band to search. Obtain the modified envelope value of sub-strip M; and perform the first bit allocation operation on the strip. Subtract N bands based on the modified envelope values ​​of sub-band M and the original envelope values ​​of sub-band K. In this invention's design, the bit allocation adequately meets the bit requirements of each subband. Therefore, the capabilities for encoding and decoding signals can be improved. climb;
Need to check novelty before this filing date? Find Prior Art

Description

This application claims priority to Chinese Patent Application No. 201410177234.3, filed on April 29, 2014, entitled “Method and Apparatus for Processing Signals”, the entire contents of which are incorporated herein by reference. This invention relates to the field of signal processing, and more specifically, to methods and apparatus for processing signals. Modern communication transmission increasingly emphasizes the quality of voice or audio signals, thus placing higher demands on signal encoding and decoding. Existing frequency domain coding algorithms typically allocate bits to each sub-band of the signal directly based on the size of the frequency domain envelope, and then encode each sub-band using the allocated bits. However, practice shows that in these existing coding algorithms, low-frequency sub-bands have a significant impact on signal encoding quality, often becoming a bottleneck in signal encoding performance. The aforementioned bit allocation methods cannot adequately meet the bit requirements of each sub-band, especially the low-frequency sub-bands, resulting in poor signal encoding quality. Consequently, the signal decoding performance is also poor. Summary of the Invention The present invention provides a method and apparatus for processing signals, which can improve the encoding and decoding performance of signals. In a first aspect, a method for processing a signal is provided, comprising: selecting M sub-bands from N sub-bands, wherein the N sub-bands are obtained by dividing the spectral coefficients of the current frame of the signal, the frequency bands of the M sub-bands are lower than the frequency bands of K sub-bands other than the M sub-bands in the N sub-bands, N is a positive integer greater than 1, M and K are both positive integers, and the sum of M and K is N; determining to perform a correction operation on the original envelope values ​​of the M sub-bands based on the performance information of the M sub-bands, wherein the performance information is used to indicate the energy characteristics and spectral characteristics of the M sub-bands; correcting the original envelope values ​​of the M sub-bands respectively to obtain corrected envelope values ​​of the M sub-bands; and performing a bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands. In conjunction with the first aspect, in a first possible implementation, determining to perform a correction operation on the original envelope values ​​of the M sub-bands based on the performance information of the M sub-bands includes: Based on the original envelope values ​​of the N sub-bands, a first parameter is determined, wherein the first parameter represents the degree of concentration of the spectral energy of the signal on the M sub-bands; Based on the original envelope values ​​of the M sub-bands, a second parameter is determined, wherein the second parameter represents the degree of spectral fluctuation of the M sub-bands; If the first parameter belongs to a first range and the second parameter belongs to a second range, it is determined that a correction operation should be performed on the original envelope values ​​of the M sub-bands. In conjunction with the first possible implementation of the first aspect, in the second possible implementation, determining the first parameter based on the original envelope values ​​of the N sub-bands includes: determining the total energy of the M sub-bands based on the original envelope values ​​of the M sub-bands; determining the total energy of the K sub-bands based on the original envelope values ​​of the K sub-bands; and determining the ratio of the total energy of the M sub-bands to the total energy of the K sub-bands as the first parameter. In a third possible implementation, combining the first or second possible implementation of the first aspect, determining the second parameter based on the original envelope values ​​of the M subbands includes: determining the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the largest among the M subbands; and determining the ratio of the energy of the first subband to the total energy of the M subbands as the second parameter. In a fourth possible implementation, in conjunction with the first aspect or any of the above implementations, the step of correcting the original envelope values ​​of the M subbands to obtain corrected envelope values ​​of the M subbands includes: determining the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the largest among the M subbands; determining a correction factor based on the total energy of the M subbands and the energy of the first subband; and using the correction factor to correct the original envelope values ​​of the M subbands to obtain corrected envelope values ​​of the M subbands. In combination with the first aspect or any of the above implementations, in the fifth possible implementation, the modified envelope value of each of the M sub-bands is greater than the original envelope value of the same sub-band. In conjunction with the first aspect or any of the above implementations, the sixth possible implementation further includes: determining the number of redundant bits in each of the N sub-bands based on the number of bits allocated to the N sub-bands during the first bit allocation, wherein the number of redundant bits in each of the N sub-bands is less than the number of bits required to encode a single information unit in the same sub-band; determining the total number of redundant bits based on the number of redundant bits in each of the N sub-bands; and performing a second bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands, the original envelope values ​​of the K sub-bands, and the total number of redundant bits. Secondly, a signal processing device is provided, comprising: a selection unit for selecting M subbands from N subbands, wherein the N subbands are obtained by dividing the spectral coefficients of the current frame of the signal, and the frequency bands of the M subbands are lower than the frequency bands of K subbands other than the M subbands in the N subbands, where N is a positive integer greater than 1, M and K are both positive integers, and the sum of M and K is N; a determination unit for determining to perform a correction operation on the original envelope values ​​of the M subbands based on the performance information of the M subbands, wherein the performance information is used to indicate the energy characteristics and spectral characteristics of the M subbands; a correction unit for correcting the original envelope values ​​of the M subbands respectively to obtain corrected envelope values ​​of the M subbands; and an allocation unit for performing a bit allocation on the N subbands based on the corrected envelope values ​​of the M subbands and the original envelope values ​​of the K subbands. In conjunction with the second aspect, in a first possible implementation, the determining unit is specifically configured to: determine a first parameter based on the original envelope values ​​of the N sub-bands, wherein the first parameter represents the concentration of the spectral energy of the signal on the M sub-bands; determine a second parameter based on the original envelope values ​​of the M sub-bands, wherein the second parameter represents the spectral fluctuation of the M sub-bands; and determine to perform a correction operation on the original envelope values ​​of the M sub-bands if the first parameter belongs to a first range and the second parameter belongs to a second range. In conjunction with the first possible implementation of the second aspect, in the second possible implementation, the determining unit is specifically used for: determining the total energy of the M sub-bands based on the original envelope values ​​of the M sub-bands; determining the total energy of the K sub-bands based on the original envelope values ​​of the K sub-bands; and determining the ratio of the total energy of the M sub-bands to the total energy of the K sub-bands as the first parameter. In a third possible implementation, in conjunction with the first or second possible implementation of the second aspect, the determining unit is specifically used to: determine the total energy of the M sub-bands and the energy of the first sub-band based on the original envelope values ​​of the M sub-bands, wherein the energy of the first sub-band is the largest among the M sub-bands; and determine the ratio of the energy of the first sub-band to the total energy of the M sub-bands as the second parameter. In a fourth possible implementation, in conjunction with the second aspect or any of the above implementations, the correction unit is specifically configured to: determine the total energy of the M sub-bands and the energy of the first sub-band based on the original envelope values ​​of the M sub-bands, wherein the energy of the first sub-band is the largest among the M sub-bands; determine a correction factor based on the total energy of the M sub-bands and the energy of the first sub-band; and use the correction factor to correct the original envelope values ​​of the M sub-bands respectively to obtain the corrected envelope values ​​of the M sub-bands. In combination with the second aspect or any of the above implementations, in the fifth possible implementation, the modified envelope value of each of the M sub-bands is greater than the original envelope value of the same sub-band. In conjunction with the second aspect or any of the above implementations, in the sixth possible implementation, the determining unit is further configured to determine the number of redundant bits in each of the N sub-bands based on the number of bits allocated to the N sub-bands during the first bit allocation, wherein the number of redundant bits in each of the N sub-bands is less than the number of bits required to encode a single information unit in the same sub-band; the determining unit is further configured to determine the total number of redundant bits based on the number of redundant bits in each of the N sub-bands; and the allocation unit is further configured to perform a second bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands, the original envelope values ​​of the K sub-bands, and the total number of redundant bits. In this embodiment of the invention, M low-frequency sub-bands are selected from N sub-bands. Based on the energy characteristics and spectral characteristics of the M sub-bands, a correction operation is performed on the original envelope values ​​of the M sub-bands. The original envelope values ​​of the M sub-bands are corrected according to their original envelope values. Then, based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands, a bit allocation is performed on the N sub-bands, instead of directly allocating bits based on the original envelope values ​​of the N sub-bands. This makes the bit allocation more in line with the bit requirements of each sub-band, thereby improving the encoding and decoding performance of the signal. To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 is a schematic flowchart of a signal processing method according to an embodiment of the present invention. Figure 2 is a schematic flowchart of a method for processing signals according to an embodiment of the present invention. Figure 3 is a schematic block diagram of a signal processing device according to an embodiment of the present invention. Figure 4 is a schematic block diagram of a signal processing device according to another embodiment of the present invention. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. Signal encoding and decoding technologies are widely used in various electronic devices, such as mobile phones, wireless devices, personal data assistants (PDAs), handheld or portable computers, Global Positioning System (GPS) receivers / navigators, cameras, audio / video players, camcorders, video recorders, and surveillance equipment. These electronic devices typically include voice or audio encoders and may also include voice or audio decoders. The voice or audio encoders and decoders can be implemented directly by digital circuits or chips, such as digital signal processing (DSP) chips, or by software code driving a processor to execute processes within the software code. Figure 1 is a schematic flowchart of a signal processing method according to an embodiment of the present invention. The method of Figure 1 is executed by an encoding end, such as the speech or audio encoder described above. The method of Figure 1 can also be executed by a decoding end, such as the speech or audio decoder described above. During the encoding process, the encoder can first transform the time-domain signal into a frequency-domain signal, for example, by using algorithms such as Fast Fourier Transform (FFT) or Modified Discrete Cosine Transform (MDCT) for time-frequency transformation. Then, the spectral coefficients of the frequency-domain signal can be normalized using global gain, and the normalized spectral coefficients can be divided into bands to obtain multiple sub-bands. During the decoding process, the decoding end can decode the bitstream received from the encoding end to obtain normalized spectral coefficients, and then divide the normalized spectral coefficients into bands to obtain multiple sub-bands. 110. Select M sub-bands from N sub-bands. The N sub-bands are obtained by dividing the spectrum coefficients of the current frame of the signal. The frequency bands of the M sub-bands are lower than the frequency bands of the K sub-bands other than the M sub-bands in the N sub-bands. N is a positive integer greater than 1, and M and K are both positive integers. The sum of M and K is N. In this embodiment of the invention, the signal can be a speech signal or an audio signal. The aforementioned K sub-bands are all the sub-bands other than the M sub-bands out of the N sub-bands. 120. Based on the performance information of the M subbands, determine the correction operation to be performed on the original envelope values ​​of the M subbands. The performance information is used to indicate the energy characteristics and spectral characteristics of the M subbands. 130. Correct the original envelope values ​​of the M subbands respectively to obtain the corrected envelope values ​​of the M subbands. 140. Based on the corrected envelope values ​​of the M subbands and the original envelope values ​​of the K subbands, perform a bit allocation on the N subbands. In this embodiment of the invention, M low-frequency sub-bands are selected from N sub-bands. Based on the energy characteristics and spectral characteristics of the M sub-bands, a correction operation is performed on the original envelope values ​​of the M sub-bands. The original envelope values ​​of the M sub-bands are corrected according to their original envelope values. Then, based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands, a bit allocation is performed on the N sub-bands, instead of directly allocating bits based on the original envelope values ​​of the N sub-bands. This makes the bit allocation more in line with the bit requirements of each sub-band, thereby improving the encoding and decoding performance of the signal. Specifically, in existing frequency domain coding algorithms, bits are directly allocated to each sub-band of the signal based on the size of the frequency domain envelope. This results in the allocated number of bits not adequately meeting the bit requirements of some low-frequency sub-bands. In this embodiment of the invention, M low-frequency sub-bands are first selected from N sub-bands. Based on the energy and spectral characteristics of the M sub-bands, a correction operation is performed on the original envelope values ​​of the M sub-bands. The original envelope values ​​of the M sub-bands are then corrected based on the original envelope values ​​of the N sub-bands. Finally, bit allocation is performed on the N sub-bands based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands. As can be seen, in this embodiment of the invention, the N sub-bands are not directly allocated bits based on their original envelope values. Instead, the energy characteristics and spectral characteristics of the M sub-bands are taken into consideration to determine the need for correction of the M sub-bands, thereby obtaining the corrected envelope values ​​of the M sub-bands. Bit allocation is then performed based on the corrected envelope values ​​of the low-frequency sub-bands and the original envelope values ​​of the other sub-bands, making the bit allocation of each sub-band more reasonable, especially for the M low-frequency sub-bands, thereby improving the encoding and decoding performance of the signal. After dividing the spectral coefficients into N sub-bands, the envelope of each sub-band can be calculated and quantized. Therefore, each sub-band has a quantized envelope value. It should be understood that the original envelope value and the corrected envelope value are relative terms. The original envelope value refers to the original envelope value of the sub-band, that is, the quantized envelope value calculated after dividing the sub-bands. The envelope value obtained after correcting the original envelope value of the sub-band is called the corrected envelope value. Therefore, in this embodiment of the invention, both the original envelope value and the corrected envelope value refer to the quantized envelope value. Optionally, as an embodiment, in step 110, M subbands can be selected from N subbands based on their harmonicity and energy. For example, for the M subbands, the harmonic intensity of each subband can be greater than a preset intensity threshold, and the proportion of the energy of that subband to the total energy of the N subbands can be greater than a preset energy threshold. As mentioned above, low-frequency subbands are often the bottleneck of signal coding performance, and among these subbands, those with strong harmonicity and energy accounting for a certain proportion of the total energy of all subbands are particularly bottlenecks in coding performance. Therefore, selecting M subbands from N subbands based on their harmonicity and energy, and thus correcting the original envelope values ​​of these M subbands, makes the bit allocation of these M subbands more reasonable, thereby more effectively improving the signal coding and decoding performance. Alternatively, as another embodiment, the N sub-bands can be arranged in ascending order of frequency band size. Thus, in step 110, the first M sub-bands can be selected from the N sub-bands. In this embodiment, selecting M sub-bands in ascending order of frequency band size simplifies the operation and improves signal processing efficiency. Optionally, as another embodiment, in step 120, a first parameter can be determined based on the original envelope values ​​of the N sub-bands, where the first parameter can represent the concentration of the signal's spectral energy in the M sub-bands. A second parameter can be determined based on the original envelope values ​​of the M sub-bands, where the second parameter represents the degree of spectral fluctuation in the M sub-bands. If the first parameter falls within a first range and the second parameter falls within a second range, a correction operation can be performed on the original envelope values ​​of the M sub-bands. Specifically, the energy characteristics of the M sub-bands can be the degree of concentration of the signal's spectral energy in the M sub-bands, and the spectral characteristics of the M sub-bands can be the degree of spectral fluctuation in the M sub-bands. The first range is related to the energy of the sub-bands and can be preset. When the concentration of the signal's spectral energy in the M sub-bands is small, it indicates that the proportion of these M sub-bands in the N sub-bands is small and will not have a significant impact on coding performance; therefore, there is no need to modify the original envelope values ​​of these M sub-bands. When the concentration of the signal's spectral energy in the M sub-bands is large, it indicates that the original envelope values ​​of these M sub-bands will also be relatively large. In this case, the number of bits allocated to these M sub-bands is sufficient for coding, and there is also no need to modify the original envelope values ​​of these M sub-bands. The first range can be predetermined through experimental simulation. For example, the first range can be preset to [1 / 6, 2 / 3]. The second range is related to the spectral fluctuation of the sub-bands and can be preset. If the spectral fluctuation of the M sub-bands is small, then even if the number of bits allocated to the M sub-bands is small, it will not have a significant impact on the coding performance, thus eliminating the need to correct the original envelope values ​​of the M sub-bands. Therefore, the second range indicates a larger spectral fluctuation of the sub-bands. The second range can be predetermined through experimental simulation. For example, the second range can be preset to or . Generally, if the coded bandwidth of the signal is 0–4 kHz, the second range can be preset to ; if the coded bandwidth of the signal is 0–8 kHz, the second range can be preset to . When the first parameter falls within a first range and the second parameter falls within a second range, it means that the concentration of the signal's spectral energy across the M subbands is neither particularly high nor low, and the spectral fluctuations of the M subbands are relatively large. Therefore, the original envelope values ​​of the M subbands can be corrected to ensure that the bits allocated to the M subbands in a single bit allocation better meet their bit requirements. For example, for each of the M subbands, the corrected envelope value is greater than the original envelope value. Therefore, compared to allocating bits based on the original envelope values, allocating bits based on the corrected envelope values ​​results in more bits being allocated to the M subbands, thus improving the coding performance of the M subbands. As can be seen, in this embodiment, the first parameter and the second parameter determined based on the original envelope values ​​of the N sub-bands can reflect the characteristics of each frequency band. Therefore, when the first parameter belongs to the first range and the second parameter belongs to the second range, the original envelope value correction operation performed on the M sub-bands is determined, so that when the bit allocation is performed according to the corrected envelope values ​​of the M sub-bands, the number of bits allocated to the M sub-bands is more in line with the bit requirements of the M sub-bands, thereby improving the encoding and decoding performance of the signal. Optionally, as another embodiment, in step 120, the total energy of the M subbands can be determined based on the original envelope values ​​of the M subbands. The total energy of the K subbands can be determined based on the original envelope values ​​of the K subbands. The ratio of the total energy of the M subbands to the total energy of the K subbands can be determined as a first parameter. Specifically, the ratio of the total energy of the M subbands to the total energy of the K subbands can be determined as the first parameter. This allows for... For example, the first parameter can be calculated according to the following equation. The first parameter can be represented by α. Here, can represent the total energy of M subbands, can represent the total energy of K subbands, band_widthi can represent the bandwidth of the i-th subband, and band_energyi can represent the energy of the i-th subband. band_energyi can represent the original envelope value of the i-th subband. For example, the original envelope value band_energyi of the i-th subband can be obtained from the spectral coefficients of the i-th subband. For example, band_energyi can be obtained according to the following equation. band_energyi=log2Ei It should be understood that those skilled in the art can obviously make various equivalent modifications or changes to obtain the first parameter based on the above equation, and such modifications or changes also fall within the scope of the embodiments of the present invention. Optionally, as another embodiment, in step 120, the total energy of the M subbands can be determined based on the original envelope values ​​of the M subbands, and the energy of the first subband can be determined, wherein the energy of the first subband is the largest among the M subbands. The ratio of the energy of the first subband to the total energy of the M subbands can be determined as a second parameter. Specifically, the spectral fluctuation of the M subbands can be represented by the fluctuation of the original envelope values ​​of the M subbands. For example, the second parameter can be calculated according to the following equation. The second parameter can be represented by β. The calculation methods for and can be referred to the equation above. It should be understood that those skilled in the art can obviously make various equivalent modifications or changes to obtain the second parameter based on the above equation, and such modifications or changes also fall within the scope of the embodiments of the present invention. Optionally, as another embodiment, in step 130, the total energy of the M subbands and the energy of the first subband can be determined based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the highest among the M subbands. A correction factor can be determined based on the total energy of the M subbands and the energy of the first subband. Then, the original envelope values ​​of the M subbands can be corrected using the correction factor to obtain the corrected envelope values ​​of the M subbands. For example, the correction factor can be determined according to the following equation. The correction factor can be represented by γ. The calculation methods for and can be referred to the equation above. Based on the correction factor γ, the original envelope value of each of the M subbands can be corrected. For example, the original envelope value of each subband can be multiplied by the correction factor to obtain the corrected envelope value of that subband. It should be understood that those skilled in the art can obviously make various equivalent modifications or changes to obtain the correction factor based on the above equation, and such modifications or changes also fall within the scope of the embodiments of the present invention. Alternatively, as another embodiment, in step 130, the modified envelope value of each of the M sub-bands can be greater than the original envelope value of that sub-band. Specifically, by correcting the original envelope value of each of the M sub-bands, a corrected envelope value is obtained for each of the M sub-bands. The corrected envelope value of each sub-band can be greater than its original envelope value. Since the corrected envelope value of each of the M sub-bands is greater than its original envelope value, in step 140, bit allocation is performed based on the corrected envelope values ​​of the M sub-bands. This increases the number of bits allocated to each of the M sub-bands, making the bit allocation more aligned with its bit requirements, thereby improving the encoding and decoding performance of the signal. Alternatively, as another embodiment, in step 130, the modified envelope value of each of the M sub-bands may be less than the original envelope value of that sub-band. Specifically, the corrected envelope value of each of the M sub-bands can be less than the original envelope value of that sub-band. In step 140, bit allocation is performed based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands. The number of bits allocated to each of the M sub-bands will be less, and the number of bits allocated to each of the K sub-bands will increase accordingly. This makes the bit allocation more in line with its bit requirements, thereby improving the encoding and decoding performance of the signal. Alternatively, as another embodiment, in step 130, the N subbands can be bit-allocated once according to the envelope values ​​in descending order. Alternatively, as another embodiment, in step 120, a correction factor can be determined based on the second parameter. Then, the original envelope values ​​of the M subbands can be corrected using the correction factor to obtain corrected envelope values ​​for the M subbands. Specifically, a correction factor can be determined based on the second parameter. Based on the correction factor, the original envelope value of each sub-band in the M sub-bands can be corrected. For example, the original envelope value of each sub-band can be multiplied by the correction factor to obtain the corrected envelope value of that sub-band. This makes the number of bits allocated to the M sub-bands more in line with the bit requirements of the M sub-bands, thereby improving the signal encoding and decoding performance. After the initial bit allocation, each sub-band typically contains redundant bits. The number of redundant bits in each sub-band is insufficient to encode a single unit of information within that sub-band. Therefore, the total number of redundant bits can be calculated by counting the redundant bits in each sub-band, and then a secondary bit allocation can be performed. Optionally, as another embodiment, after step 140, the number of redundant bits in each of the N sub-bands can be determined based on the number of bits allocated to the N sub-bands in the first bit allocation. The number of redundant bits in each of the N sub-bands is less than the number of bits required to encode a single information unit in the same sub-band. The total number of redundant bits can be determined based on the number of redundant bits in each of the N sub-bands. Then, a second bit allocation can be performed on the N sub-bands based on the total number of redundant bits. Specifically, the total redundant bits can be evenly distributed across N sub-bands. This allows for the reuse of redundant bits, avoids bit waste, and further improves the encoding and decoding performance of the signal. The above describes the process of the first and second bit allocation. If the method in Figure 1 is performed by the encoder, after the second bit allocation, the encoder can quantize the spectral coefficients of each sub-band using the bits allocated in the two bit allocation processes of each sub-band, write the index of the quantized spectral coefficients and the index of the original envelope value of each sub-band into the bitstream, and then send the bitstream to the decoder. If the method in Figure 1 is executed by the decoding end, after the second bit allocation, the decoding end can use the number of bits allocated to each subband in the two bit allocation processes to decode the quantized spectral coefficients and obtain the recovered signal. The embodiments of the present invention will now be described in detail with reference to specific examples. It should be understood that these examples are merely to help those skilled in the art better understand the embodiments of the present invention, and are not intended to limit the scope of the embodiments of the present invention. In the following example, the encoding end will be used as an example for description. Figure 2 is a schematic flowchart of a method for processing signals according to an embodiment of the present invention. 201, the encoding end performs time-frequency transformation on the time-domain signal. 202, the encoder divides the spectral coefficients of the frequency domain signal into N sub-bands, where N is a positive integer greater than 1. Specifically, the encoder can calculate the global gain, use the global gain to normalize the original spectral coefficients, and then divide the normalized spectral coefficients into bands to obtain each sub-band. 203. The encoding end obtains the original envelope values ​​of each subband through calculation and quantization operations. 204, the encoder selects M subbands from N subbands, where M is a positive integer. The frequency bands of M sub-bands are lower than the frequency bands of K sub-bands other than M sub-bands out of N sub-bands, where K is a positive integer and the sum of K and M is N. 205. The encoder determines the first parameter based on the original envelope values ​​of the M subbands and the original envelope values ​​of the K subbands. The first parameter can represent the degree of concentration of the signal's spectral energy across the M subbands. For example, the first parameter can be represented by the ratio of the total energy of the M subbands to the total energy of the K subbands. The calculation method of the first parameter can be found in the embodiment of Figure 1, and will not be repeated here. 206. The encoder determines the second parameter based on the original envelope values ​​of the M subbands. The second parameter can represent the degree of spectral fluctuation of the M subbands. For example, the second parameter can be represented by the ratio of the energy of the first subband to the total energy of the M subbands, where the energy of the first subband is the highest among the M subbands. The calculation method of the second parameter can be referred to the calculation method of the second parameter in the embodiment of Figure 1, and will not be repeated here. 207. The encoding end determines whether the first parameter belongs to the first range and the second parameter belongs to the second range. The first and second ranges can be preset. For example, the first range can be preset to [1 / 6, 2 / 3]. The second range can be preset to or 208. If the encoding end determines in step 207 that the first parameter belongs to the first range and the second parameter belongs to the second range, the original envelope values ​​of the M sub-bands are corrected according to the original envelope values ​​of the M sub-bands, so as to obtain the corrected envelope values ​​of the M sub-bands respectively. Specifically, the encoder can determine a correction factor based on the original envelope values ​​of the M subbands. The calculation method for the correction factor can be found in the embodiment shown in Figure 1, and will not be repeated here. The encoder can use the correction factor to correct the original envelope value of each of the M subbands, obtaining corrected envelope values ​​for the M subbands. For example, the corrected envelope value of each subband can be greater than its original envelope value. 209. The encoder performs a bit allocation on the N subbands based on the corrected envelope values ​​of the M subbands and the original envelope values ​​of the K subbands. For example, the encoder can allocate bits to the N subbands in descending order of envelope value. For the M subbands, since the corrected envelope value of each subband is greater than the original envelope value, the number of bits allocated to each of the M subbands increases compared to before the correction. This makes the bit allocation more in line with the bit requirements of each subband, thereby improving the encoding and decoding performance of the signal. 210, the encoding end performs secondary bit allocation on N subbands. Specifically, the encoder can determine the number of redundant bits in each of the N sub-bands based on the number of bits allocated to each sub-band after a bit allocation and the bandwidth of each sub-band. This determines the total number of redundant bits across the N sub-bands. Then, based on the total number of redundant bits, the total redundant bits are evenly distributed across the N sub-bands. 211. The encoder quantizes the spectral coefficients of each subband according to the number of bits allocated to each subband in the N subbands. 212. The encoding end writes the bitstream based on the quantized spectral coefficients from step 211 and the original envelope value of each subband. Specifically, the encoding end can write the quantized spectral coefficients and the indices of the original envelope values ​​of each sub-band into the bitstream. The specific process can be found in existing technologies and will not be elaborated here. 213. If the encoding end determines in step 207 that the first parameter does not belong to the first range or the second parameter does not belong to the second range, then the encoding end performs a bit allocation on the N sub-bands according to the original envelope values ​​of the N sub-bands. For example, the encoder can perform a bit allocation on the N subbands in descending order of envelope value. 214, the encoding end performs secondary bit allocation on N subbands. Specifically, the encoder can determine the number of redundant bits in each of the N sub-bands based on the number of bits allocated to each sub-band after a bit allocation and the bandwidth of each sub-band. This determines the total number of redundant bits across the N sub-bands. Then, based on the total number of redundant bits, the total redundant bits are evenly distributed across the N sub-bands. 215. The encoder quantizes the spectral coefficients of each sub-band according to the number of bits allocated to each sub-band in the N sub-bands. 216. The encoding end writes the bitstream based on the quantized spectral coefficients from step 215 and the original envelope value of each subband. Specifically, the encoding end can write the quantized spectral coefficients and the indices of the original envelope values ​​of each sub-band into the bitstream. The specific process can be found in existing technologies and will not be elaborated here. In this embodiment of the invention, when the first parameter belongs to the first range and the second parameter belongs to the second range, the original envelope values ​​of the M sub-bands in the low-frequency band are corrected according to the original envelope values ​​of the M sub-bands. The N sub-bands are then bit-allocated once according to the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands, so that the bit allocation is more in line with the bit requirements of each sub-band, thereby improving the encoding and decoding performance of the signal. Figure 3 is a schematic block diagram of a signal processing device according to an embodiment of the present invention. The device 300 in Figure 3 may be an encoding end or a decoding end device. The device 300 in Figure 3 includes a selection unit 310, a determination unit 320, a correction unit 330, and an allocation unit 340. Selection unit 310 selects M sub-bands from N sub-bands. The N sub-bands are obtained by dividing the spectral coefficients of the current frame of the signal. The frequency bands of the M sub-bands are lower than the frequency bands of the K sub-bands (excluding the M sub-bands) out of the N sub-bands. N is a positive integer greater than 1, and M and K are both positive integers, with the sum of M and K equal to N. Determination unit 320 determines to perform a correction operation on the original envelope values ​​of the M sub-bands based on their performance information. The performance information indicates the energy characteristics and spectral characteristics of the M sub-bands. Correction unit 330 corrects the original envelope values ​​of the M sub-bands respectively to obtain corrected envelope values ​​for the M sub-bands. Allocation unit 340 performs a bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands. In this embodiment of the invention, M low-frequency sub-bands are selected from N sub-bands. Based on the energy characteristics and spectral characteristics of the M sub-bands, a correction operation is performed on the original envelope values ​​of the M sub-bands. The original envelope values ​​of the M sub-bands are corrected according to their original envelope values. Then, based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands, a bit allocation is performed on the N sub-bands, instead of directly allocating bits based on the original envelope values ​​of the N sub-bands. This makes the bit allocation more in line with the bit requirements of each sub-band, thereby improving the encoding and decoding performance of the signal. Optionally, as an embodiment, the determining unit 320 can determine a first parameter based on the original envelope values ​​of the N sub-bands, where the first parameter represents the concentration of the signal's spectral energy across the M sub-bands. The determining unit 320 can also determine a second parameter based on the original envelope values ​​of the M sub-bands, where the second parameter represents the degree of spectral fluctuation in the M sub-bands. The determining unit 320 can determine to perform a correction operation on the original envelope values ​​of the M sub-bands if the first parameter falls within a first range and the second parameter falls within a second range. Optionally, as another embodiment, the determining unit 320 can determine the total energy of the M subbands based on the original envelope values ​​of the M subbands, and can determine the total energy of the K subbands based on the original envelope values ​​of the K subbands. The ratio of the total energy of the M subbands to the total energy of the K subbands can be determined as a first parameter. Optionally, as another embodiment, the determining unit 320 can determine the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the largest among the M subbands. The determining unit 320 can determine the ratio of the energy of the first subband to the total energy of the M subbands as a second parameter. Optionally, as another embodiment, the correction unit 330 can determine the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the highest among the M subbands. The correction unit 330 can determine a correction factor based on the total energy of the M subbands and the energy of the first subband, and can use the correction factor to correct the original envelope values ​​of the M subbands respectively to obtain the corrected envelope values ​​of the M subbands. Alternatively, as another embodiment, the modified envelope value of each of the M subbands can be greater than the original envelope value of the same subband. Optionally, as another embodiment, the determining unit 320 can also determine the number of redundant bits in each of the N sub-bands based on the number of bits allocated to the N sub-bands in a single bit allocation, wherein the number of redundant bits in each of the N sub-bands is less than the number of bits required to encode a single information unit in the same sub-band. The determining unit 320 can also determine the total number of redundant bits based on the number of redundant bits in each of the N sub-bands. The allocation unit 340 can also perform a secondary bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands, the original envelope values ​​of the K sub-bands, and the total number of redundant bits. Other functions and operations of the device 300 can be described in accordance with the process of the method embodiments of Figures 1 and 2. To avoid repetition, they will not be described again here. Figure 4 is a schematic block diagram of a signal processing device according to another embodiment of the present invention. The device 400 of Figure 4 may be an encoding end device or a decoding end device. The device 400 of Figure 4 includes a memory 410 and a processor 420. The memory 410 may include random access memory, flash memory, read-only memory, programmable read-only memory, non-volatile memory, or registers. The processor 420 may be a central processing unit (CPU). Memory 410 is used to store executable instructions. Processor 420 can execute the executable instructions stored in memory 410 for: selecting M subbands from N subbands, where N subbands are obtained by dividing the spectral coefficients of the current frame of the signal, the frequency bands of the M subbands are lower than the frequency bands of K subbands other than the M subbands in the N subbands, N is a positive integer greater than 1, M and K are both positive integers, and the sum of M and K is N; determining to perform a correction operation on the original envelope values ​​of the M subbands based on the performance information of the M subbands, where the performance information is used to indicate the energy characteristics and spectral characteristics of the M subbands; correcting the original envelope values ​​of the M subbands respectively to obtain the corrected envelope values ​​of the M subbands; and performing a bit allocation on the N subbands based on the corrected envelope values ​​of the M subbands and the original envelope values ​​of the K subbands. In this embodiment of the invention, M low-frequency sub-bands are selected from N sub-bands. Based on the energy characteristics and spectral characteristics of the M sub-bands, a correction operation is performed on the original envelope values ​​of the M sub-bands. The original envelope values ​​of the M sub-bands are corrected according to their original envelope values. Then, based on the corrected envelope values ​​of the M sub-bands and the original envelope values ​​of the K sub-bands, a bit allocation is performed on the N sub-bands, instead of directly allocating bits based on the original envelope values ​​of the N sub-bands. This makes the bit allocation more in line with the bit requirements of each sub-band, thereby improving the encoding and decoding performance of the signal. Optionally, as an embodiment, the processor 420 can determine a first parameter based on the original envelope values ​​of the N sub-bands, where the first parameter represents the concentration of the signal's spectral energy across the M sub-bands. The processor 420 can also determine a second parameter based on the original envelope values ​​of the M sub-bands, where the second parameter represents the degree of spectral fluctuation in the M sub-bands. The processor 420 can determine to perform a correction operation on the original envelope values ​​of the M sub-bands if the first parameter falls within a first range and the second parameter falls within a second range. Optionally, as another embodiment, the processor 420 can determine the total energy of the M subbands based on the original envelope values ​​of the M subbands, determine the total energy of the K subbands based on the original envelope values ​​of the K subbands, and determine the ratio of the total energy of the M subbands to the total energy of the K subbands as a first parameter. Optionally, as another embodiment, the processor 420 can determine the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the largest among the M subbands. The processor 420 can determine the ratio of the energy of the first subband to the total energy of the M subbands as a second parameter. Optionally, as another embodiment, the processor 420 can determine the total energy of the M subbands and the energy of the first subband based on the original envelope values ​​of the M subbands, wherein the energy of the first subband is the largest among the M subbands. The processor 420 can determine a correction factor based on the total energy of the M subbands and the energy of the first subband, and can use the correction factor to correct the original envelope values ​​of the M subbands respectively to obtain the corrected envelope values ​​of the M subbands. Alternatively, as another embodiment, the modified envelope value of each of the M subbands can be greater than the original envelope value of the same subband. Optionally, as another embodiment, the processor 420 can also determine the number of redundant bits in each of the N sub-bands based on the number of bits allocated to the N sub-bands in a single bit allocation, wherein the number of redundant bits in each of the N sub-bands is less than the number of bits required to encode a single information unit in the same sub-band. The processor 420 can also determine the total number of redundant bits based on the number of redundant bits in each of the N sub-bands. The processor 420 can also perform a secondary bit allocation on the N sub-bands based on the corrected envelope values ​​of the M sub-bands, the original envelope values ​​of the K sub-bands, and the total number of redundant bits. Other functions and operations of the device 400 can be described in accordance with the process of the method embodiments of Figures 1 and 2. To avoid repetition, they will not be described again here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.