Encoding method, decoding method and related device

The encoding and decoding methods using MDCT coefficients and AI restore audio quality by selectively quantizing and decoding high-frequency components, addressing the quality issues in existing audio coding algorithms while improving compression efficiency.

WO2026160988A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-01-27
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

Existing audio coding algorithms often compromise audio quality by suppressing high-frequency components, leading to blurred sounds or loss of details, especially when not handled properly.

Method used

An encoding method using modified discrete cosine transform (MDCT) to determine and quantize MDCT coefficients based on energy thresholds, combined with entropy encoding and artificial intelligence (AI) for decoding to restore coefficients, ensuring improved audio quality and compression efficiency.

Benefits of technology

The method enhances audio quality by selectively quantizing and restoring MDCT coefficients, reducing compression loss and maintaining objective quality while optimizing transmission resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure RU2025000013_30072026_PF_FP_ABST
    Figure RU2025000013_30072026_PF_FP_ABST
Patent Text Reader

Abstract

In a first aspect, the present application provides an encoding method: The method includes the following steps: determining a spectrum corresponding to an audio signal by using a modified discrete cosine transform, MDCT; dividing the spectrum into N subband(s); determining at least one first MDCT coefficient in an ith subband among the N subband(s), where an energy of the first MDCT coefficient is greater than or equal to a target energy, the target energy is determined according to a threshold and a full energy of the ith subband, i = 1,..., N; quantizing the at least one first MDCT coefficient; performing entropy encoding on the at least one quantized first MDCT coefficient. In a second aspect, the present application provides a decoding method for decoding an encoded audio signal by restoring at least one zero-quantized MDCT coefficient with an artificial intelligence model, determining an adjusted MDCT coefficient using a further dequantized MDCT coefficient prior to reconstruct the audio signal based on the adjusted MDCT coefficient and the further dequantized MDCT coefficient. The embodiments provided by the present application can provide a improve the objective quality of an audio signal.
Need to check novelty before this filing date? Find Prior Art

Description

ENCODING METHOD, DECODING METHOD AND RELATED DEVICETECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of signal processing, more specifically, related to an encoding method, a decoding method and related deviceBACKGROUND

[0002] Audio coding is a technology that digitally processes audio signals to reduce data redundancy and lower the data volume. Its main purpose is to enable audio data to be stored and transmitted more efficiently while maintaining audio quality as much as possible. For example, the original audio signal may contain a large amount of details and redundant information that are difficult for the human ear to perceive. Audio coding can remove these unnecessary parts through certain algorithms and compress the audio data into smaller files.

[0003] In some audio coding algorithms, for high-frequency components that have a relatively small impact on the overall audio quality (because the human ear is relatively less sensitive to high frequencies, especially at lower volumes), their amplitudes can be reduced or directly removed through techniques such as filtering, thereby making the audio data easier to compress and transmit. However, if this suppression operation is not handled properly, it may lead to a decrease in audio quality, such as the sound sounding blurred or losing details.SUMMARY

[0004] Embodiments of the present application provide an encoding method, a decoding method and related device, which can provide a improve the objective quality of an audio signal.

[0005] According to a first aspect, an embodiment of the present application provides aniencoding method. The method includes the following steps: determining a spectrum corresponding to an audio signal by using a modified discrete cosine transform (MDCT); dividing the spectrum into N subband(s), N is a positive integer greater than or equal to one; determining at least one first MDCT coefficient in an ithsubband among the N subband(s), where an energy of the first MDCT coefficient is greater than or equal to a target energy, the target energy is determined according to a threshold and a full energy of the ithsubband, i = 1, ..., N; quantizing the at least one first MDCT coefficient; performing entropy encoding on the at least one quantized first MDCT coefficient.

[0006] According to the aforementioned technical solution, MDCT coefficients that should be quantize are determined based on the energy of each MDCT coefficient and a threshold. Therefore, the above scheme provides a new method for judging the MDCT coefficients that need to be quantized, which can effectively improve the objective quality of the audio signal.

[0007] In a possible design of the first aspect, before the performing entropy encoding on the at least one quantized first MDCT coefficient, the method further including: when the ithsubband includes at least one second MDCT coefficient, setting the at least one second MDCT coefficient to zero, where an energy of the second MDCT coefficient is less than the target energy, the performing entropy encoding on the at least one quantized first MDCT coefficient, includes: the performing entropy encoding on the at least one quantized first MDCT coefficient and the at least one zeroed second MDCT coefficient.

[0008] All MDCT coefficients whose energy is less than the target energy are set to zero. Therefore, a compression rate of the audio may be improved.

[0009] In a possible design of the first aspect, before the determining at least one first MDCT coefficient in an 1thsubband among the N subbands, the method further including: determining the threshold according to a target bitrate.

[0010] Since the threshold is determined according to the bitrate, an electronic device that obtains the encoded audio signal can determine the threshold according to the bitrate. In other words, the threshold does not need to transmit to the electronic device with the encoded audio signal. As a result, transmission resource may be solved.

[0011] In a possible design of the first aspect, a scale used for quantizing the at least onefirst MDCT coefficient is a preset scale, the at least one quantized first MDCT coefficient excludes a zero value.

[0012] In a possible design of the first aspect, the dividing the spectrum into multiple subbands, includes: the dividing the spectrum into multiple subbands by a Bark scale.

[0013] The Bark scale is a frequency scale based on the auditory characteristics of the human ear. The Bark scale better reflects the way the human ear perceives different frequencies of sound. Based on Bark scale, the frequencies within each subband exhibit a certain similarity in terms of human auditory perception.

[0014] According to a second aspect, an embodiment of the present application provides a decoding method. The method includes the following steps: obtaining MDCT coefficients in a subband, where the MDCT coefficients in the subband includes at least one third MDCT coefficient and at least one fourth MDCT coefficient, a third MDCT coefficient is a quantized MDCT coefficient, a value of each of the fourth MDCT coefficients is zero; dequantizing the at least one third MDCT coefficient; restoring the at least one fourth MDCT coefficient by using an artificial intelligence (Al) model; determining at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient; determining a reconstructed audio signal according to the at least one adjusted fourth MDCT coefficient and the at least one dequantized third MDCT coefficient.

[0015] According to the aforementioned technical solution, the zeroed MDCT coefficients can be restored by using the Al model. Therefore, a compression loss may be reduced and an objective quanlity may be guaranteed.

[0016] In a possible design of the second aspect, the determining at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient, includes: determining a target energy of the subband according to a full energy of the subband and a threshold, where the full energy of the subband is determined according to a first energy, the first energy is a total energy of the at least one dequantized third MDCT coefficients; determining a normalization coefficient as a ratio between the target energy and a second energy, where the second energy is a total energy of the at least one restored fourth MDCT coefficient; multiplying each of theat least one restored fourth MDCT coefficient by the normalization coefficient to obtain the at least one adjusted fourth MDCT coefficient.

[0017] By calculating the normalization coefficient, the adjusted fourth MDCT coefficient can be closer to the original MDCT coefficient, thereby further improving the objective quanlity.

[0018] In a possible design of the second aspect, the threshold determined according to a target bitrate.

[0019] Since the threshold is determined according to the bitrate, an electronic device that obtains the encoded audio signal can determine the threshold according to the bitrate. In other words, the threshold does not need to transmit to the electronic device with the encoded audio signal. As a result, transmission resource may be solved.

[0020] In a possible design of the second aspect, a scale used for dequantizing the at least one third MDCT coefficient is a preset scale, the at least one third MDCT coefficient excludes a zero value.

[0021] According to a third aspect, an embodiment of the present application provides an electronic device, and the electronic device has a function of implementing the method in the first aspect. The function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware of the software includes one or more modules corresponding to the function.

[0022] According to a fourth aspect, an embodiment of the present application provides an electronic device, and the electronic device has a function of implementing the method in the second aspect. The function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware of the software includes one or more modules corresponding to the function.

[0023] According to a fifth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory. The processor is connected to the memory. The memory is configured to store instructions, and the processor is configured to execute the instructions. When the processor executes the instructions stored in the memory, the processor is enabled to perform the method in the first aspect or any possible design of the first aspect.

[0024] According to a sixth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory. The processor is connected to the memory. The memory is configured to store instructions, and the processor is configured to execute the instructions. When the processor executes the instructions stored in the memory, the processor is enabled to perform the method in the second aspect or any possible design of the second aspect.

[0025] According to a seventh aspect, an embodiment of the present application provides a computer readable storage medium, including instructions. When the instructions run on an electronic device, the electronic device is enabled to perform the method in the first aspect or any possible design of the first aspect.

[0026] According to an eighth aspect, an embodiment of the present application provides a computer readable storage medium, including instructions. When the instructions run on an electronic device, the electronic device is enabled to perform the method in the second aspect or any possible design of the second aspect.

[0027] According to a ninth aspect, an embodiment of the present application provides a chip system, where the chip system includes a communication interface and a processing circuit, the communication interface is configured to obtain to-be-processed data, and the processing circuit is configured to process the to-be-processed data according to the method in the first aspect or any possible design of the first aspect.

[0028] According to a tenth aspect, an embodiment of the present application provides a chip system, where the chip system includes a communication interface and a processing circuit, the communication interface is configured to obtain to-be-processed data, and the processing circuit is configured to process the to-be-processed data according to the method in the second aspect or any possible design of the second aspect.

[0029] According to an eleventh aspect, an embodiment of the present application provides a computer program product, where when the computer program product runs on an electronic device, the electronic device is enabled to perform the method in the first aspect or any possible design of the first aspect.

[0030] According to a twelfth aspect, an embodiment of the present application provides a computer program product, where when the computer program product runs on anelectronic device, the electronic device is enabled to perform the method in the second aspect or any possible design of the second aspect.

[0031] According to a thirteenth aspect, an embodiment of the present application provides a computer readable storage medium, including a data structure, the data structure includes the encoded audio signal obtained according to the method in the first aspect or any possible design of the first aspect.DESCRIPTION OF DRAWINGS

[0032] FIG. 1 illustrates an audio signal processing system according to some embodiments of the present application.

[0033] FIG. 2 is a schematic structural diagram of an electronic device.

[0034] FIG. 3 illustrates an audio signal processing method provided by some embodiments of the present application.

[0035] FIG. 4 illustrates an audio signal processing method according to some embodiments of the present application.

[0036] FIG. 5 is a schematic block diagram of a system architecture 500.

[0037] FIG. 6 is a hardware structure of a chip according to an embodiment of the present application.

[0038] FIG. 7 is a schematic block diagram of an electronic device 700 according to some embodiments of the present application.

[0039] FIG. 8 is a schematic block diagram of an electronic device 800 according to some embodiments of the present application.DESCRIPTION OF EMBODIMENTS

[0040] The following describes the technical solutions in the present application with reference to the accompanying drawings.

[0041] The terms such as "first" and "second" below are merely for a descriptive purpose, and cannot be understood as indicating or implying relative importance, or implicitly indicating a quantity of indicated technical features. Therefore, the features defined by "first"and "second" can explicitly or implicitly include one or more features.

[0042] As used herein, "at least one" means one or more, and "a plurality of' means two or more, "and / or" describes an association relationship of associated objects, and indicates that there may be three relationships. For example, A and / or B may indicate cases includes “only A”, “both A and B”, and “only B”, where A and B may be singular or plural. The character " / " generally indicates that the associated objects are in an OR relationship. "At least one of the following items" or a similar expression thereof refers to any combination of these items, including any combination of a single item or a plurality of items. For example, “at least one of a, b, or c” may represent a, b, c, “a and b”, “a and c”, “b and c”, or “a, b and c”, where a, b, and c may be a single or multiple form.

[0043] FIG. 1 illustrates an audio signal processing system according to some embodiments of the present application.

[0044] Referring to FIG. 1, a system 10 includes a first electronic device 100 and a second electronic device 200.

[0045] The first electronic device 100 may obtain an audio signal. For example, the first electronic device 100 may include a microphone and obtain the audio signal via the microphone. For another example, the electronic device 100 may obtain a multimedia file (e.g., a music file, a video file, or the like) and obtain the audio signal from the obtained multimedia file.

[0046] After obtaining the audio signal, the electronic device 100 may encode the obtained audio signal and transmit the encoded audio signal to the electronic device 200.

[0047] The electronic device 200 may receive the encoded audio signal. Then, the electronic device 200 may decode the encoded audio signal to obtain the decoded audio signal. The decoded audio signal may be played through output devices such as a speaker of the electronic device 200 or a headphone connected to the electronic device 200.

[0048] For example, FIG. 2 is a schematic structural diagram of an electronic device. The electronic device may be the electronic device 100 or the electronic device 200 in the system 10.

[0049] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a chargingmanagement module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communications module 150, a wireless communications module 160, an audio module 170, a loudspeaker 170A, a telephone receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, and the like. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, an optical proximity sensor, a fingerprint sensor, a touch sensor, and the like.

[0050] It may be understood that the schematic structure in this embodiment of this application constitutes no specific limitation on the electronic device. In some other embodiments of this application, the electronic device may include more or fewer components than those shown in the figure, or some components may be combined, or some components may be split, or components are arranged in different manners. The components shown in the figure may be implemented by using hardware, software, or a combination of software and hardware.

[0051] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Different processing units may be separate components, or may be integrated into one or more processors.

[0052] The controller may be a nerve center and a command center of the electronic device. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to complete control of instruction reading and instruction execution.

[0053] The memory may be further disposed in the processor 110, to store an instruction and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store an instruction or data that is used or cyclically used by the processor 110. If the processor 110 needs to use the instruction or the data again, the processor 110 may directly invoke the instruction or the data from the memory, so as to avoid repeated access, and reduce a waiting time of the processor 110, thereby improving system efficiency.

[0054] In some embodiments, the processor 110 may include one or more interfaces. Theinterface may be an inter- integrated circuit (I2C) interface, an inter- integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, an USB interface, and / or the like.

[0055] The I2S interface may be configured to perform audio communication. In some embodiments, the processor 110 may include a plurality of groups of I2S buses. The processor 110 may be coupled to the audio module 170 over an I2S bus, to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communications module 160 over an I2S interface, to implement a function of answering a call over a wireless headset.

[0056] The PCM interface may be also configured to perform audio communication, to perform sampling, quantization, and encoding on an analog signal. In some embodiments, the audio module 170 may be coupled to the wireless communications module 160 over a PCM bus interface. In some embodiments, the audio module 170 may also transmit an audio signal to the wireless communications module 160 over a PCM interface, to implement a function of answering a call over a wireless headset. Both the I2S interface and the PCM interface may be configured to perform audio communication.

[0057] The UART interface is a universal serial data line, and is configured to perform asynchronous communication. The bus may be a two-way communications bus. The UART interface switches to-be-transmitted data between serial communication and parallel communication. In some embodiments, the UART interface is usually configured to connect the processor 110 to the wireless communications module 160. For example, the processor 110 communicates with a short-range wireless communication module in the wireless communications module 160 over the UART interface, to implement a short-range wireless communication function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communications module 160 over the UART interface, to implement a function of playing music over a wireless headset.

[0058] The GPIO interface may be configured by using software. The GPIO interfacemay be configured as a control signal, or may be configured as a data signal. In some embodiments, the GPIO interface may be configured to connect the processor 110 to the wireless communications module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may be further configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, or the like.

[0059] The USB interface 130 is an interface that meets a USB standard specification, and may be specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be configured to connect to the charger to charge the electronic device, or may be configured to transmit data between the electronic device and a peripheral device, or may be configured to connect to a headset, to play audio over the headset. The interface may be further configured to connect to another electronic device such as an AR device.

[0060] It may be understood that a schematic interface connection relationship between the modules in this embodiment of this application is merely an example for description, and constitutes no limitation on the structure of the electronic device. In some other embodiments of this application, the electronic device may alternatively use an interface connection manner different from that in the foregoing embodiment, or use a combination of a plurality of interface connection manners.

[0061] The charging management module 140 is configured to receive a charging input from the charger. The charger may be a wireless charger, or may be a wired charger. When charging the battery 142, the charging management module 140 may further supply power to the electronic device over the power management module 141.

[0062] The power management module 141 is configured to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives an input of the battery 142 and / or the charging management module 140, to supply power to the processor 110, the internal memory 121, an external memory, the wireless communications module 160, and the like. The power management module 141 may be further configured to monitor parameters such as a battery capacity, a battery cycle count, and a battery state of health (electric leakage and impedance). In some other embodiments, the power management module 141 may be alternatively disposed in the processor 110. Insome other embodiments, the power management module 141 and the charging management module 140 may be alternatively disposed in a same component.

[0063] A wireless communication function of the electronic device may be implemented by using the antenna 1, the antenna 2, the mobile communications module 150, the wireless communications module 160, the modem processor, the baseband processor, and the like.

[0064] The antenna 1 and the antenna 2 are configured to transmit and receive an electromagnetic wave signal. Each antenna of the electronic device may be configured to cover one or more communication frequency bands. Different antennas may be multiplexed to improve utilization of the antennas. For example, the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.

[0065] The mobile communications module 150 may provide a solution to wireless communication such as 2G / 3G / 4G / 5G applied to the electronic device. The mobile communications module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LN A), and the like. The mobile communications module 150 may receive an electromagnetic wave over the antenna 1, perform processing such as filtering and amplification on the received electromagnetic wave, and transmit a processed electromagnetic wave to the modem processor for demodulation. The mobile communications module 150 may further amplify a signal modulated by the modem processor, and convert the signal into an electromagnetic wave for radiation over the antenna 1. In some embodiments, at least some function modules of the mobile communications module 150 may be disposed in the processor 110. In some embodiments, at least some function modules of the mobile communications module 150 and at least some modules of the processor 110 may be disposed in a same component.

[0066] The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into an intermediate-and-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. After being processed by the baseband processor, theiilow-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal over an audio device (which is not limited to the loudspeaker 170A, the telephone receiver 170B, and the like), or displays an image or a video over a display screen. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be separate from the processor 110, and the modem processor and the mobile communications module 150 or another function module may be disposed in a same component.

[0067] The wireless communications module 160 may provide a solution to wireless communication applied to the electronic device, for example, a wireless local area network (WLAN) (for example, a Wi-Fi network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, Nearlink and an infrared (IR) technology. The wireless communications module 160 may be one or more components into which at least one communication processing module is integrated. The wireless communications module 160 receives an electromagnetic wave over the antenna 2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communications module 160 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into an electromagnetic wave for radiation over the antenna 2.

[0068] In some embodiments, the antenna 1 and the mobile communications module 150 of the electronic device are coupled, and the antenna 2 and the wireless communications module 160 of the electronic device are coupled, so that the electronic device can communicate with a network and another device by using a wireless communications technology. The wireless communications technology may include a global system for mobile communications (GSM), a general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, a GNSS, a WLAN, NFC, FM, an IR technology, and / or the like. The GNSS may include a global positioning system (GPS), the GLONASS, the Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation system (SBAS).

[0069] The electronic device implements a display function over the GPU, the display screen 194, the application processor, and the like. The display screen 194 is configured to display an image, a video, and the like. The display screen 194 includes a display panel. The display panel may use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLed, a MicroLED, a Micro-OLED, a quantum dot light emitting diode (QLED), and the like.

[0070] The electronic device may implement a photographing function over the ISP, the camera lens 193, the video codec, the GPU, the display screen 194, the application processor, and the like.

[0071] The digital signal processor is configured to process a digital signal, and in addition to a digital image signal, may further process another digital signal. For example, when the electronic device performs frequency selection, the digital signal processor is configured to perform Fourier transform and the like on frequency energy.

[0072] The external memory interface 120 may be configured to connect to an external storage card such as a micro SD card, to extend a storage capability of the electronic device. The external storage card communicates with the processor 110 over the external memory interface 120, to implement a data storage function, for example, to store files such as music and videos in the external storage card.

[0073] The internal memory 121 may be configured to store computer executable program code, and the executable program code includes an instruction. The processor 110 runs the instruction stored in the internal memory 121, to perform various function applications and data processing of the electronic device. The internal memory 121 may include a program storage region and a data storage region. The program storage region may store an operating system, an application required by at least one function (for example, a voice playing function or an image playing function), and the like. The data storage region may store data (for example, audio data and an address book) and the like created when the electronic device is used. In addition, the internal memory 121 may include a high-speed random access memory, or may include a non-volatile memory such as at least one magnetic disk memory, a flash memory, or a universal flash storage (UFS).

[0074] The electronic device may implement an audio function such as music playing or recording over the audio module 170, the loudspeaker 170A, the telephone receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like.

[0075] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and is further configured to convert an analog audio input into a digital audio signal. The audio module 170 may be further configured to encode and decode an audio signal. In some embodiments, the audio module 170 may be disposed in the processor 110, or some function modules of the audio module 170 are disposed in the processor 110.

[0076] The loudspeaker 170A is configured to convert an audio electrical signal into a sound signal. The electronic device may be used to listen to music or answer a call in a hands-free mode over the loudspeaker 170A.

[0077] The telephone receiver 170B is configured to convert an audio electrical signal into a voice signal. When the electronic device is used to answer a call or receive voice information, the telephone receiver 170B may be put close to a human ear, to receive the voice information.

[0078] The microphone 170C is configured to convert a sound signal into an electrical signal. When making a call or sending voice information, a user may speak with the mouth approaching the microphone 170C, to input a sound signal to the microphone 170C. At least one microphone 170C may be disposed in the electronic device. In some other embodiments, two microphones 170C may be disposed in the electronic device, to collect a sound signal and implement a noise reduction function. In some other embodiments, three, four, or more microphones 170C may be alternatively disposed in the electronic device, to collect a sound signal, implement noise reduction, recognize a sound source, implement a directional recording function, and the like.

[0079] The headset jack 170D is configured to connect to a wired headset. The headset jack 170D may be a USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or cellular telecommunications industry association of the USA (CTIA) standard interface.

[0080] FIG. 3 illustrates an audio signal processing method provided by someembodiments of the present application. The method illustrated in FIG. 3 may be performed by the electronic device 100 and the electronic device 200, or, may be performed by components in the electronic device 100 and the electronic device 200 (e.g., a processor, a chip, a processing circuit, or the like). For convenience, in the following embodiments, it is assumed that the method illustrated in FIG. 3 is performed by the electronic device 100 and the electronic device 200. For convenience, the electronic device 100 may be referred to as a first electronic device, while the second electronic device 200 may be referred to as a second electronic device.

[0081] 301, The first electronic device obtains an audio signal.

[0082] As aforementioned, the audio signal may be obtained via an input device of the first electronic device or an input device connected to the first electronic device, or, the audio signal may be obtained from a multimedia file, and no limitation is imposed thereon.

[0083] 302, The first electronic device determines a spectrum corresponding the audio signal by using a modified discrete cosine transform (MDCT).

[0084] 303, The first electronic device divides the spectrum into N subband(s).

[0085] N is a positive integer greater than or equal to one. However, for convenience, in following embodiments, it is assumed that N is a positive integer greater than one.

[0086] In some embodiments, the first electronic device may divide the spectrum by a Bark scale.

[0087] The Bark scale is a frequency scale based on the auditory characteristics of the human ear. The Bark scale better reflects the way the human ear perceives different frequencies of sound. Based on Bark scale, the frequencies within each subband exhibit a certain similarity in terms of human auditory perception.

[0088] In some other embodiments, the first electronic device may divide the spectrum by using a Mel scale, a wavelet transform, or the like.

[0089] 304, For each subband among the N subbands, the first electronic device determines a target energy and determines a MDCT coefficient, whose energy is greater than or equal to the target energy.

[0090] For convenience, the MDCT coefficient with the energy greater than or equal to the target energy may be referred to as a first MDCT coefficient, while a MDCT coefficientwith the energy less than the target energy may be referred to as a second MDCT coefficient.

[0091] Take the ithsubband among the N subbands as an example, the first electronic device determines the first MDCT coefficient in the ithsubband, where i is an integer greater than or equal to one, and i is less than or equal to N, in other words, i = 1, 2, ..., N.

[0092] For example, it is assumed that the ithsubband includes Ki first MDCT coefficient(s), Ki is a positive integer greater than or equal to one. In other words, the ithsubband includes at least one first MDCT coefficient, and the first electronic device determines the at least one MDCT coefficients in the i* subband.

[0093] The target energy for determining the first MDCT coefficient in the ithsubband may be determined according to a threshold and a full energy of the ithsubband. The full energy of the ithsubband is a sum of energy values of all MDCT coefficients in the ithsubband.

[0094] In some embodiments, the threshold may be determined according to a bitrate. The bitrate is a bitrate of an audio file or a bitstream including an encoded audio signal corresponding to the audio signal. Different bitrates corresponds to different thresholds. A higher the bitrate, the lower threshold. Table one illustrates a relationship between the bitrate and the threshold.Table 1

[0095] Referring to Table 1, when the bitrate is 8 kilobits per second (kbps), the threshold is THRi; when the bitrate is 16 kbps, the threshold is THR2. THRi to THR5 satisfy: THR1<THR2<THR3<THR4<THR5 o

[0096] The target energy of the ithsubband may be the full energy of the ithsubband multiplied by the threshold determined according to the bitrate. In other words, the target energy of the ithsubband, the full energy of the ithsubband and the threshold satisfy:

[0097] Egtgtj = Eg&UJx THR, (1.1)

[0098] where Egtgt_i represents the target energy of the i,hsubband, Egfun j represents the full energy of the ithsubband, and THR represents the threshold determined according to the

[0099] 305, The first electronic device quantizes the first MDCT coefficients in each subbands.

[0100] In some embodiments, the first electronic device may use a preset scale to quantize the first MDCT coefficients. Meanwhile, the quantized first MDCT coefficients determined based on the preset scale exclude a zero value. In some embodiments, both the first electronic device and the second electronic device know the preset scale. The second electronic device may use the preset scale to dequantized received MDCT coefficients.

[0101] In some other embodiments, the scale for quantizing the first MDCT coefficients may be determined by the first electronic device. Then, the scale may be encoded into the audio file or the bitstream carrying the encoded audio signal. The second electronic device may obtain the scale from the audio file or the bitstream.

[0102] 306, The first electronic device performs an entropy encoding on the quantized first MDCT coefficients.

[0103] Still taking the ithsubband as an example, the first electronic device quantize the K, first MDCT coefficient(s) to obtain the Ki quantized first MDCT coefficient(s). Further, it is assumed that the ithsubband include Ki MDCT coefficients. In some embodiments, when Kj = Ki (that is, all MDCT coefficients in the ithsubband are the first MDCT coefficient), the first electronic device may perform the entropy encoding on the quantized Ki first MDCT coefficient. When the i* subband includes at least one second MDCT coefficient (that is, Ki < Ki), the first electronic device may set the at least one second MDCT coefficient to zero. Then, the first electronic device may perform the entropy encoding on the quantized first MDCT coefficients and the zeroed second MDCT coefficients. For example, it is assumed that the ithsubband includes Kj second MDCT coefficient(s), Kj is a positive integer greater than or equal to one. For convenience, in the following embodiments, it is assumed that Kj is greater than one. In other words, the ithsubband includes Ki MDCT coefficients, the Ki MDCT coefficients include Kj first MDCT coefficients and Kj second MDCT coefficients, where Ki = Kj + Kj. The first electronic device may set a value of each of the Kj second MDCTcoefficients to zero and quantized the Kj first MDCT coefficients. The aforementioned steps (that is, setting the value of the second MDCT coefficient and quantizing the first MDCT coefficient) do not change locations of the MDCT coefficients of the i* subband.

[0104] For example, it is assumed that the 1thsubband include 5 MDCT coefficients, the 5 MDCT coefficients are denoted Ci to C5. It is assumed that the MDCT coefficient Ci, the MDCT coefficient C3 and the MDCT coefficient C5 are the first MDCT coefficient, while the MDCT coefficient C2 and the MDCT coefficient C4 are the second MDCT coefficient. Values of the MDCT coefficients Ci to C5 may be denoted as Vci to Vcs. The first electronic device quantizes the MDCT coefficients Ci, C3 and C5 to obtain the quantized MDCT coefficients QCi, QC3 and QC5, where the quantized MDCT coefficient QCi corresponds to the MDCT coefficient Ci, the quantized MDCT coefficient QC3 corresponds to the MDCT coefficient C3, and the quantized MDCT coefficient QC5 corresponds to the MDCT coefficient C5. Values of quantized MDCT coefficients QCi, QC3 and QC5 may be denoted as VQCI, VQC3 and VQCS. Values of the second MDCT coefficients Vc2 and Vc4 may be set to zero. Therefore, the first electronic device may determine a sequence: VQCI, 0, VQC3, 0, V CS. Then the first electronic device perform the entropy encoding on the sequence. None of the values of the quantized first MDCT coefficients QCi, QC3 and QC5 is equal to 0.

[0105] There are no limitations on an entropy encoding method in the embodiments of the present application. For example, the first electronic device may use any one of the following method to perform the entropy encoding: Huffman coding, arithmetic coding, run-length coding, or the like.

[0106] 307, The first electronic device transmits the encoded audio signal to the second electronic device. Correspondingly, the second electronic device receives the encoded audio signal from the first electronic device.

[0107] As previously mentioned, the encoded audio signal may be carried by the audio file, the bitstream, or the like. In addition to the encoded audio signal, the audio file or the bitstream may carry additional information. In some embodiments, the additional information may include the bitrate. In some other embodiments, the additional information may include a sampling rate, the number of channels, a bit-depth, or the like.

[0108] The second electronic device may determine reconstructed audio signal based onthe received audio signal.

[0109] The second electronic device may perform an entropy decoding operation on the received audio signal to obtain decoded audio signal.

[0110] The second electronic device may process the decoded audio signal at a subband level. In other words, the second electronic device may process the decoded audio signal subband by subband.

[0111] The subband received by the second electronic device may include two types of subband, which may be referred to as a first subband and a second subband. The first subband does not include an MDCT coefficients with a value of 0, while the second subband include at least one MDCT coefficient with a value of 0.

[0112] For the first subband, the second electronic device may dequantize the MDCT coefficients of the first subband. In other words, the second electronic device may perform an inverse quantization operation on the MDCT coefficients of the subband to obtain the dequantized MDCT coefficients. Then, the second electronic device may perform an inverse MDCT on the dequantized MDCT coefficients to obtain a reconstructed audio signal.

[0113] For the second subband, the second device may restore the MDCT coefficients with the value of 0, and determine the reconstructed audio signal based on the restored MDCT coefficients.

[0114] In other words, the second electronic device may determine whether a subband includes a MDCT coefficient with the value of zero. When the subband does not includes the MDCT coefficient with the value of zero, the second electronic device may dequantize the MDCT coefficients in the subband and perform an inverse MDCT on the dequantized MDCT coefficients to obtain the reconstructed. When the subband include at least one MDCT coefficient with the value of zero, the second electronic device may restore the MDCT coefficients with the value of zero, dequantize the MDCT coefficients with the value of nonzero, and perform the inverse MDCT on the restored MDCT coefficients and the dequantized MDCt coefficients.

[0115] For details about how to reconstruct the audio signal of the second subband, please refer to FIG. 4.

[0116] FIG. 4 illustrates an audio signal processing method according to someembodiments of the present application. The method illustrated in FIG. 4 may be performed by the second electronic device or a component of the second electronic device (e.g., a chip, a processor, a processing circuit, or the like). For convenience, it is assumed that the method illustrated is performed by the second electronic device.

[0117] 401, The second electronic device obtains MDCT coefficients in a subband, the MDCT coefficients may include at least one third MDCT coefficient and at least one fourth MDCT coefficients.

[0118] The second electronic device may perform an entropy decoding to obtain the MDCT coefficients in the subband.

[0119] The third MDCT coefficient is a quantized MDCT coefficient, and a value of each of the fourth MDCT coefficient is zero.

[0120] Still taking the ithsubband as an example, the second electronic device may obtain Ki MDCT coefficients, the KtMDCT coefficients include K, third MDCT coefficients and Kj fourth MDCT coefficients. The K third MDCT coefficients are the Kj quantized first MDCT coefficients, while, the Kj fourth MDCT coefficients are the Kj second MDCT coefficients.

[0121] 402, The second electronic device dequantizes the at least one third MDCT coefficient.

[0122] The second electronic device may use a scale to dequantize the at least one third MDCT coefficient. For convenience, a scale used for quantizing the at least one first MDCT coefficient may be referred to as a first scale, while a scale used for dequantizing the at least one third MDCT coefficient may be referred to as a second scale. The first scale and the second scale may be the same. Therefore, the second scale may be a preset scale.

[0123] 403, The second electronic device restores the at least one fourth MDCT coefficient by using an artificial intelligence (Al) model.

[0124] There are no limitations on the Al model in the embodiments of the present application. For example, the Al model may be a neural network (e.g., a convolutional neural network (CNN), a recurrent neural network (RNN), or the like), a deep learning model, or the like.

[0125] 404, The second electronic device determines at least one adjusted fourth MDCT coefficient according to the at least one third MDCT coefficient and the at least one restoredfourth MDCT coefficients.

[0126] For example, in some embodiments, the second electronic device may determine a target energy of the subband according to a foil energy of the subband and a threshold. The foil energy of the subband may be determined according to a total energy of the at least one third MDCT coefficient. For convenience, it is assumed that the total energy of the at least one third MDCT coefficient is a first energy.

[0127] The first energy, the target energy, the threshold, and the foil energy of the subband may satisfy:

[0128] Eglgt= Egfcu x THR, (2.1)

[0129] Egtuu = Egtat + Egfet, (2.2)

[0130] where Egtgtrepresents the target energy of the subband, Egfuu represents the foil energy of the subband, Egfstrepresents the first energy of the subband, and THR represents the threshold.

[0131] Based on the equation 2.1 and 2.2, the target energy of the subband may satisfy:

[0132] Egtgt = Eg^ x THRZ(l-THR), (2.3).

[0133] In other words, the second device may determine the target energy of the subband according to the threshold and the first energy.

[0134] After determining the target energy, the second electronic device may determine a normalization coefficient based on the target energy and a second energy. The second energy is a total energy of the at least one restored fourth MDCT coefficients. The normalization coefficient may be a ratio between the target energy and the second energy. For example, the normalization coefficient may satisfy:

[0135] Norm=Ngtgt / Ngsc, (2.4)

[0136] where Norm represents the normalization coefficient, Ngtgtrepresents the target energy of the subband, and Ngscrepresents the second energy.

[0137] The second electronic device multiplies each of the at least one restored fourth MDCT coefficient by the normalization coefficient to obtain the at least one adjusted fourth MDCT coefficient.

[0138] For convenience, the target energy used for determining the first MDCT coefficient and the second MDCT coefficient may be referred to as a first target energy, andthe threshold used for determining the first target energy may be referred to as a first threshold. The target energy used for determining the normalization coefficient may be referred to as a second target energy, and the threshold used for determining the second target energy may be referred to as a second threshold.

[0139] The first threshold is equal to the second threshold. Consequently, in some embodiments, the second threshold may be determined according to the bitrate of the audio file or the bitstream.

[0140] In some embodiments, the normalization coefficient may be equal to one. In this case, the at least one restored fourth MDCT coefficient are the at least one adjusted fourth MDCT coefficient. In other words, the second electronic device do not need to use the normalization coefficient to determine the adjusted fourth MDCT coefficient.

[0141] 405, The second electronic device performs the inverse MDCT on the at least one dequantized third MDCT coefficient and the at least one adjusted fourth MDCT coefficient to obtain a reconstructed audio signal.

[0142] As previously mentioned, the at least one fourth MDCT coefficient may be restored by using the Al model. The Al model may be trained by using a system illustrated in FIG. 5.

[0143] Referring to FIG. 5, an embodiment of the present application provides a system architecture 500. As shown in the system architecture 500, a data collection device 560 is configured to collect training data. In this embodiment of this application, the training data includes one or more MDCT coefficients with a value of zero (namely, training samples) and real results corresponding to the one or more MDCT coefficients, namely, ideal results expected to be obtained by processing the one or more zeroed MDCT coefficients by using an Al model (e.g., a neural network). The training data may be stored into a database 530. A training device 120 may obtain a target model / rule 501 through training based on the training data maintained in the database 530. The target model / rule 501 can be used to restore the at least one fourth MDCT coefficient, that is, the at least one fourth MDCT coefficient is input into the target model / rule 501, to obtain at least one restored fourth MDCT coefficient. The target model / rule 501 in this embodiment of this application may specifically be a neural network obtained through training. In this embodiment provided in this application, theneural network is obtained by training an initialized neural network. It should be noted that, in actual application, the training data maintained in the database 530 is not necessarily all collected by the data collection device 560, and may be received from another device. In addition, it should be noted that the training device 520 does not necessarily perform training completely based on the training data maintained in the database 530 to obtain the target model / rule 501, and may obtain training data from a cloud or another place to perform model training. The foregoing description shall not be construed as a limitation on this embodiment of this application.

[0144] The target model / rule 501 obtained by the training device 520 through training may be applied to different systems or devices, for example, applied to an execution device 510 shown in FIG. 5. The execution device 510 may be a terminal, such as a mobile phone terminal, a tablet computer, a notebook computer, an augmented reality (AR) device, a virtual reality (VR) device, or a vehicle-mounted terminal, or may be a server or the like. In FIG. 5, an I / O interface 512 is configured on the execution device 510 and is configured to exchange data with an external device. A user may input data into the I / O interface 512 by using a customer device 540. In this embodiment of this application, the input data may include a MDCT coefficient with a value of 0. The input MDCT coefficient may be a MDCT coefficient collected by the execution device 510 by using the data collection device 560, may be a MDCT coefficient in the database 530, or may be an MDCT coefficient from the customer device 540.

[0145] In a related processing procedure in which a calculation module 511 of the execution device 510 performs calculation, the execution device 510 may invoke data, code, and the like in a data storage system 550 to implement corresponding processing, and may also store, into the data storage system 550, data, an instruction, and the like obtained through corresponding processing.

[0146] Finally, the I / O interface 512 returns a processing result, for example, the foregoing obtained MDCT coefficients processing result (that is, the restored fourth MDCT coefficient), to the customer device 540, to provide the processing result for the user.

[0147] It should be noted that FIG. 5 is merely a schematic diagram of a system architecture provided in an embodiment of the present application. A location relationshipbetween a device, a component, a module, and the like shown in the figure constitutes no limitation. For example, in FIG. 5, the data storage system 550 is an external memory relative to the execution device 510. In another case, the data storage system 550 may be alternatively disposed in the execution device 510.

[0148] FIG. 6 is a hardware structure of a chip according to an embodiment of the present application. The chip includes a neural network processor 60. The chip may be disposed in the execution device 510 shown in FIG. 5, to complete calculation work of the calculation module 511. The chip may be alternatively disposed in the training device 520 shown in FIG.5, to complete training work of the training device 520 and output the target model / rule 501. All algorithms of the layers in the neural network may be implemented in the chip shown in FIG. 6.

[0149] The neural network processor 60 may be any processor suitable for large-scale exclusive OR operation processing, for example, a convolutional neural-network processing unit (NPU), a tensor processing unit (TPU), or a graphics processing unit (GPU). The NPU is used as an example. The NPU may be mounted, as a coprocessor, onto a central processing unit (CPU), namely, a host CPU, and the host CPU allocates a task, such as an image processing task, to the NPU. A core part of the NPU is an operation circuit 603. The operation circuit 603 is controlled by a controller 604 to extract matrix data from memories (601 and 602) and perform multiplication and addition.

[0150] In some implementations, the operation circuit 603 internally includes a plurality of processing engines (PE). In some implementations, the operation circuit 603 is a two-dimensional systolic array. The operation circuit 603 may alternatively be a one-dimensional systolic array or another electronic circuit that can perform mathematical operations such as multiplication and addition. In some implementations, the operation circuit 603 is a general-purpose matrix processor.

[0151] For example, it is assumed that there are an input matrix A, a weight matrix B, and an output matrix C. The operation circuit 603 obtains a weight value of the matrix B from the weight memory 602, and buffers the weight value of the matrix B on each PE in the operation circuit 603. The operation circuit 603 obtains input data of the matrix A from the input memory 601, and performs a matrix operation based on the input data of the matrix A and theweight value of the matrix B, and an obtained partial result or final result of the matrix is stored into an accumulator 608. The input data may be an input image, and the weight matrix is a convolution kernel. Weight data may also be referred to as a weight matrix.

[0152] A unified memory 606 is configured to store the input data and output data. The weight matrix is directly transferred to the weight memory 602 by using a storage unit access controller (direct memory access controller, DMAC) 605. The input data is also transferred to the unified memory 606 by using the DMAC. The output data is an image segmentation result.

[0153] A bus interface unit (BIU) 610 is used for interaction between the DMAC and an instruction fetch buffer 609. The bus interface unit 601 is further used by the instruction fetch buffer 609 to obtain an instruction from an external memory. The bus interface unit 601 is further used by the storage unit access controller 605 to obtain original data of the input matrix A or the weight matrix B from the external memory.

[0154] The DMAC is mainly configured to transfer input data in an external memory DDR to the unified memory 606, or transfer the weight data to the weight memory 602, or transfer the input data to the input memory 601.

[0155] A vector calculation unit 607 may include a plurality of operation processing engines. If required, further processing is performed on an output of the operation circuit 603, such as vector multiplication, vector addition, an exponential operation, a logarithmic operation, and size comparison. The vector calculation unit 607 is mainly used for calculation at a non-convolutional layer or a frilly connected layer (FC) of the convolutional neural network, and may specifically perform calculation in pooling, normalization, and the like. For example, the vector calculation unit 607 may apply a non-linear function to the output of the operation circuit 603, for example, a vector of an accumulated value, to generate an active value. In some implementations, the vector calculation unit 607 generates a normalized value, a combined value, or both a normalized value and a combined value.

[0156] In some implementations, the vector calculation unit 607 stores a processed vector into the unified memory 606. In some implementations, the vector processed by the vector calculation unit 607 can be used as an active input of the operation circuit 603, for example, for use at a subsequent layer in the convolutional neural network. For example, if a currentprocessing layer is a hidden layer 1, the vector processed by the vector calculation unit 307 can also be used for calculation at a hidden layer 2.

[0157] The instruction fetch buffer 609 connected to the controller 604 is configured to store an instruction used by the controller 604.

[0158] The unified memory 606, the input memory 601, the weight memory 602, and the instruction fetch buffer 609 are all on-chip memories. The external memory may be independent of the NPU hardware architecture.

[0159] Operations at the layers in the neural network may be performed by the operation circuit 603 or the vector calculation unit 607.

[0160] FIG. 7 is a schematic block diagram of an electronic device 700 according to some embodiments of the present application. Referring to FIG. 7, the electronic device 700 includes a processing module 701, a quantizing module, and an encoding module 703. The electronic device 700 may be aforementioned first electronic device.

[0161] The processing module 701 is configured to determine a spectrum corresponding to an audio signal by using a modified discrete cosine transform (MDCT), divide the spectrum into N subband(s), and determine at least one first MDCT coefficient in an i* subband among the N subband(s), where an energy of the first MDCT coefficient is greater than or equal to a target energy, the target energy is determined according to a threshold and a full energy of the ithsubband, N is a positive integer greater than or equal to one, and i = 1 , ... , N.

[0162] The quantizing module 702 is configured to quantize the at least one first MDCT coefficient;

[0163] The encoding module 703 is configured to perform entropy encoding on the at least one quantized first MDCT coefficient.

[0164] Details on how to process the spectrum corresponding to the audio signal may refer to the above-mentioned embodiments and will not be described here.

[0165] FIG. 8 is a schematic block diagram of an electronic device 800 according to some embodiments of the present application. Referring to FIG. 8, the electronic device 800 includes an obtaining module 801, a dequantizing module 802, and a processing module 803. The electronic device 800 may be aforementioned second electronic device.

[0166] The obtaining module 801 is configured to obtain MDCT coefficients in a subband, where the MDCT coefficients in the subband comprises at least one third MDCT coefficient and at least one fourth MDCT coefficient, a third MDCT coefficient is a quantized MDCT coefficient, a value of each of the fourth MDCT coefficients is zero.

[0167] The dequantizing module 802 is configured to dequantize the at least one third MDCT coefficient.

[0168] The processing module 803 is configured to restore the at least one fourth MDCT coefficient by using an artificial intelligence (Al) model, determine at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient, and determine a reconstructed audio signal according to the at least one adjusted fourth MDCT coefficient and the at least one dequantized third MDCT coefficient.

[0169] Details on how to obtain the reconstructed audio signal may refer to the above-mentioned embodiments and will not be described here.

[0170] The present application provides a computer readable storage medium including instructions. When the instructions run on an electronic device, the electronic device is enabled to perform the aforementioned method.

[0171] The present application provides a computer readable storage medium including a data structure. The data structure includes the encoded audio signal obtained according to the aforementioned method. The data structure may be a file, a bitstream, or the like.

[0172] The present application provides a chip system. The chip system includes a communication interface and a processing circuit, and the communication interface is configured to obtain to-be-processed data, and the processing circuit is configured to process the to-be-processed data according to the aforementioned method.

[0173] The present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to perform the aforementioned method.

[0174] A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps can be implemented by electronic hardware or a combination of computer software andelectronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.

[0175] It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiment. Details are not described herein again.

[0176] In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

[0177] The units described as separate parts may be or may not be physically separate, and parts displayed as units may be or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0178] In addition, functional units in the embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

[0179] When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer readable storage medium. Based on such an understanding, the technical solutions in this applicationessentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

[0180] The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims

CLAIMSWhat is claimed is:

1. An encoding method, wherein comprising:determining a spectrum corresponding to an audio signal by using a modified discrete cosine transform (MDCT);dividing the spectrum into N subband(s), N is a positive integer greater than or equal to one;determining at least one first MDCT coefficient in an ithsubband among the N subband(s), wherein an energy of the first MDCT coefficient is greater than or equal to a target energy, the target energy is determined according to a threshold and a full energy of the ithsubband, i = 1, ..., N;quantizing the at least one first MDCT coefficient;performing entropy encoding on the at least one quantized first MDCT coefficient.

2. The method according to claim 1, wherein before the performing entropy encoding on the at least one quantized first MDCT coefficient, the method further comprising:when the ithsubband comprises at least one second MDCT coefficient, setting the at least one second MDCT coefficient to zero, wherein an energy of the second MDCT coefficient is less than the target energy,the performing entropy encoding on the at least one quantized first MDCT coefficient, comprises:the performing entropy encoding on the at least one quantized first MDCT coefficient and the at least one zeroed second MDCT coefficient.

3. The method according to claim 1 or claim 2, wherein before the determining at least one first MDCT coefficient in an ithsubband among the N subbands, the method further comprising:determining the threshold according to a target bitrate.

4. The method according to any one of claims 1 to 3, wherein a scale used for quantizing the at least one first MDCT coefficient is a preset scale,the at least one quantized first MDCT coefficient excludes a zero value.

5. The method according to any one of claims 1 to 4, wherein the dividing the spectrum into multiple subbands, comprises:the dividing the spectrum into multiple subbands by a Bark scale.

6. A decoding method, wherein comprising:obtaining MDCT coefficients in a subband, wherein the MDCT coefficients in the subband comprises at least one third MDCT coefficient and at least one fourth MDCT coefficient, a third MDCT coefficient is a quantized MDCT coefficient, a value of each of the fourth MDCT coefficients is zero;dequantizing the at least one third MDCT coefficient;restoring the at least one fourth MDCT coefficient by using an artificial intelligence (Al) model;determining at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient;determining a reconstructed audio signal according to the at least one adjusted fourth MDCT coefficient and the at least one dequantized third MDCT coefficient.

7. The method according to claim 6, wherein the determining at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient, comprises:determining a target energy of the subband according to a full energy of the subband and a threshold, wherein the full energy of the subband is determined according to a first energy, the first energy is a total energy of the at least one dequantized third MDCT coefficients; determining a normalization coefficient as a ratio between the target energy and a second energy, wherein the second energy is a total energy of the at least one restored fourth MDCT coefficient;multiplying each of the at least one restored fourth MDCT coefficient by the normalization coefficient to obtain the at least one adjusted fourth MDCT coefficient.

8. The method according to claim 7, wherein the threshold determined according to a target bitrate.

9. The method according any one of claims 6 to 8, wherein a scale used for dequantizingthe at least one third MDCT coefficient is a preset scale,the at least one third MDCT coefficient excludes a zero value.

10. An electronic device, wherein comprising:a processing module, configured to determine a spectrum corresponding to an audio signal by using a modified discrete cosine transform (MDCT);the processing module, further configured to divide the spectrum into N subband(s), N is a positive integer greater than or equal to one;the processing module, further configured to determine at least one first MDCT coefficient in an ithsubband among the N subband(s), wherein an energy of the first MDCT coefficient is greater than or equal to a target energy, the target energy is determined according to a threshold and a full energy of the ithsubband, i = 1, ..., N;a quantizing module, configured to quantize the at least one first MDCT coefficient; an encoding module, configured to perform entropy encoding on the at least one quantized first MDCT coefficient.

11. The electronic device according to claim 10, wherein the processing module is further configured to set at least one second MDCT coefficient to zero, wherein an energy of the second MDCT coefficient is less than the target energy when the ithsubband comprises the at least one second MDCT coefficient;the encoding module is specifically configured to perform entropy encoding on the at least one quantized first MDCT coefficient and the at least one zeroed second MDCT coefficient.

12. The electronic device according to claim 10 or claim 11, wherein the processing module is further configured to determine the threshold according to a target bitrate.

13. The electronic device according to any one of claims 10 to 12, wherein a scale used for quantizing the at least one first MDCT coefficient is a preset scale,the at least one quantized first MDCT coefficient excludes a zero value.

14. The electronic device according to any one of claims 10 to 13, wherein the processing module is specifically configured to the divide the spectrum into multiple subbands by a Bark scale.

15. An electronic device method, wherein comprising:an obtaining module, configured to obtain MDCT coefficients in a subband, wherein the MDCT coefficients in the subband comprises at least one third MDCT coefficient and at least one fourth MDCT coefficient, a third MDCT coefficient is a quantized MDCT coefficient, a value of each of the fourth MDCT coefficients is zero;a dequantizing module, configured to dequantize the at least one third MDCT coefficient;a processing module, configured to restore the at least one fourth MDCT coefficient by using an artificial intelligence (Al) model;the processing module, further configured to determine at least one adjusted fourth MDCT coefficient according to the at least one dequantized third MDCT coefficient and the at least one restored fourth MDCT coefficient;the processing module, further configured to determine a reconstructed audio signal according to the at least one adjusted fourth MDCT coefficient and the at least one dequantized third MDCT coefficient.

16. The electronic device according to claim 15, wherein the processing module is specifically configured to determine a target energy of the subband according to a foil energy of the subband and a threshold, wherein the foil energy of the subband is determined according to a first energy, the first energy is a total energy of the at least one dequantized third MDCT coefficients;determine a normalization coefficient as a ratio between the target energy and a second energy, wherein the second energy is a total energy of the at least one restored fourth MDCT coefficient;multiply each of the at least one restored fourth MDCT coefficient by the normalization coefficient to obtain the at least one adjusted fourth MDCT coefficient.

17. The electronic device according to claim 16, wherein the threshold determined according to a target bitrate18. The electronic device according any one of claims 15 to 17, wherein a scale used for dequantizing the at least one third MDCT coefficient is a preset scale,the at least one third MDCT coefficient excludes a zero value.

19. An electronic device, comprising a memory and a processor, wherein the memory isconfigured to store instructions, and the processor is configured to invoke the instructions from the memory and run the instructions, so that the electronic device performs the method according to any one of claims 1 to 5, or, any one of claims 6 to 9.

20. A chip system, comprising a communication interface and a processing circuit, wherein the communication interface is configured to obtain to-be-processed data, and the processing circuit is configured to process the to-be-processed data according to the method according to any one of claims 1 to 5, or, any one of claims 6 to 9.

21. A computer readable storage medium, wherein the computer readable storage medium stores instructions, and when the instructions run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 5, or, any one of claims 6 to 9.

22. A computer program product, wherein when the computer program product runs on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 5, or, any one of claims 6 to 9.

23. A computer readable storage medium, wherein the computer readable storage medium stores a data structure comprising the encoded audio signal obtained according to any one of claims 1 to 5.