Signal quantization method, device, equipment and storage medium

By using codebooks and specific codewords for quantization in audio signal quantization, the problem of not considering the distribution characteristics of audio data in the prior art is solved, and a smaller quantization noise and better inverse quantization effect are achieved.

CN118401999BActive Publication Date: 2025-03-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280005227.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2025-03-25
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

In the prior art, the linear scalar quantization method fails to effectively consider the distribution characteristics of the data to be quantized during the audio signal quantization process, resulting in high quantization noise.

Method used

By determining the codebook corresponding to the data to be quantized, select a specific codeword in the codebook that is closest to the data to be quantized, and quantizes it based on the codeword, and finally generates a code stream through interval encoding and sends it to the decoding end.

Benefits of technology

This method can effectively reduce quantization noise, ensure that the inverse quantization operation can restore the original data to a large extent, and consider the data distribution characteristics before quantization, further reducing the noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118401999B_ABST
    Figure CN118401999B_ABST
Patent Text Reader

Abstract

The present disclosure proposes a signal quantization method, device, equipment and storage medium, the method comprising: determining a codebook corresponding to the data to be quantized, the codebook comprising k codewords, k being a positive integer; determining a specific codeword from the codebook, the specific codeword being the codeword in the codebook closest to the data to be quantized; determining the quantized data corresponding to the data to be quantized based on the specific codeword; performing interval coding on each quantized data based on the codebook corresponding to each data to be quantized to obtain a code stream; and sending the code stream to a decoding end. The quantization noise of the quantization method disclosed in the present disclosure is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a signal quantization method, device, equipment and storage medium. Background Art

[0002] With the development of the Internet and digital multimedia technology, audio applications have penetrated into every corner of people's work and life. In the process of audio application, it is usually necessary to transmit audio signals. In addition, in order to ensure the transmission rate of audio signals, it is usually necessary to encode the audio signals first and then transmit the encoded audio signals. In the process of encoding audio signals, it is also necessary to quantize audio data.

[0003] In the related art, a linear scalar quantization method is used to quantize audio data.

[0004] However, in the related art, the linear scalar quantization method does not take into account the distribution characteristics of the data to be quantized, resulting in large quantization noise. Summary of the invention

[0005] The signal quantization method, device, equipment and storage medium proposed in the present disclosure are used to solve the technical problem that the quantization noise of the quantization method in the related art is relatively large.

[0006] In a first aspect, an embodiment of the present disclosure provides a signal quantization method, including:

[0007] Determine a codebook corresponding to the data to be quantized, wherein the codebook includes k codewords, where k is a positive integer;

[0008] Determine a specific codeword from the codebook, where the specific codeword is a codeword in the codebook that is closest to the data to be quantized;

[0009] Determine quantized data corresponding to the data to be quantized based on the specific codeword;

[0010] Performing interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream;

[0011] The code stream is sent to a decoding end.

[0012] In the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword, and each quantized data will be interval encoded based on the codebook corresponding to each data to be quantized to obtain a code stream; the code stream is sent to the decoding end. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is actually determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0013] In a second aspect, an embodiment of the present disclosure provides a signal quantization method, including:

[0014] Receive a code stream sent by an encoding end, and perform interval decoding on the code stream to obtain decoded data;

[0015] Determine inverse quantized data based on the decoded data.

[0016] In a third aspect, an embodiment of the present disclosure provides a communication device, including:

[0017] A processing module, used to determine a codebook corresponding to the data to be quantized, wherein the codebook includes k codewords, where k is a positive integer;

[0018] The processing module is further configured to determine a specific codeword from the codebook, wherein the specific codeword is a codeword in the codebook that is closest to the data to be quantized;

[0019] The processing module is further used to determine the quantized data corresponding to the data to be quantized based on the specific codeword;

[0020] The processing module is further used to perform interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream;

[0021] The transceiver module is used to send the code stream to the decoding end.

[0022] In a fourth aspect, an embodiment of the present disclosure provides a communication device, including:

[0023] A processing module, used for receiving a code stream sent by an encoding end, and performing interval decoding on the code stream to obtain decoded data;

[0024] The processing module is further used to determine inverse quantized data based on the decoded data.

[0025] In a fifth aspect, an embodiment of the present disclosure provides a communication device, which includes a processor. When the processor calls a computer program in a memory, the method described in any one of the first to second aspects is executed.

[0026] In a sixth aspect, an embodiment of the present disclosure provides a communication device, which includes a processor and a memory, in which a computer program is stored; the processor executes the computer program stored in the memory so that the communication device executes the method described in any one of the first to second aspects above.

[0027] In a seventh aspect, an embodiment of the present disclosure provides a communication device, which includes a processor and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processor, and the processor is used to run the code instructions to enable the device to execute the method described in any one of the first to second aspects above.

[0028] In an eighth aspect, an embodiment of the present disclosure provides a communication system, the system comprising the communication device described in any one of aspects from the third to the fourth aspect, or the system comprising the communication device described in the fifth aspect, or the system comprising the communication device described in the sixth aspect, or the system comprising the communication device described in the seventh aspect.

[0029] In a ninth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing instructions used by the above-mentioned network device. When the instructions are executed, the terminal device executes the method described in any one of the first to second aspects above.

[0030] In a tenth aspect, the present disclosure further provides a computer program product comprising a computer program, which, when executed on a computer, enables the computer to execute the method described in any one of the first to second aspects above.

[0031] In the eleventh aspect, the present disclosure provides a chip system, which includes at least one processor and an interface, and is used to support a network device to implement the functions involved in the method described in any one of the first aspect to the second aspect, for example, determining or processing at least one of the data and information involved in the above method. In one possible design, the chip system also includes a memory, and the memory is used to store computer programs and data necessary for the source auxiliary node. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0032] In a twelfth aspect, the present disclosure provides a computer program, which, when executed on a computer, enables the computer to execute the method described in any one of the first to second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0034] Figure 1 A schematic diagram of the architecture of a communication system provided by an embodiment of the present disclosure;

[0035] Figure 2a-2d A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0036] Figure 3 A flowchart of a signal quantization method provided by another embodiment of the present disclosure;

[0037] Figure 4 A flowchart of a signal quantization method provided by yet another embodiment of the present disclosure;

[0038] Figure 5 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0039] Figure 6 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0040] Figure 7 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0041] Figure 8 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0042] Fig. 9 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0043] Fig.10A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0044] Fig.11 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0045] Fig.12 A flow chart of a signal quantization method provided by another embodiment of the present disclosure;

[0046] Fig.13a A flowchart of an execution method of an encoding end provided by an embodiment of the present disclosure;

[0047] Fig.13b A flowchart of an execution method of a decoding end provided by an embodiment of the present disclosure;

[0048] Fig.13c A quantization noise comparison diagram when the audio data of a song is quantized using the quantization method of the present disclosure and the quantization method of the related art respectively provided in an embodiment of the present disclosure;

[0049] Fig.13d A quantization noise comparison diagram when the audio data of speech is quantized using the quantization method of the present disclosure and the quantization method in the related art respectively provided in the embodiment of the present disclosure;

[0050] Fig.13e A comparison diagram of quantization noise when music audio data is quantized using a quantization method of the present disclosure and a quantization method in a related art, provided in an embodiment of the present disclosure;

[0051] Fig.14 A schematic diagram of the structure of a communication device provided by another embodiment of the present disclosure;

[0052] Fig.15 A schematic diagram of the structure of a communication device provided by another embodiment of the present disclosure;

[0053] Fig.16 is a structural diagram of a communication device provided in an embodiment of the present application;

[0054] Fig.17 A schematic diagram of the structure of a chip provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0056] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "an" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0057] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the disclosed embodiments, these information should not be limited to these terms. These terms are only used to distinguish signals of the same type from each other. For example, without departing from the scope of the disclosed embodiments, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at" or "when" or "in response to determination".

[0058] The embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and cannot be understood as limiting the present disclosure.

[0059] To facilitate understanding, the terms involved in this application are first introduced.

[0060] 1. Quantification

[0061] In the field of digital signal processing, quantization refers to the process of approximating the continuous value of a signal (or a large number of possible discrete values) to a finite number (or fewer) of discrete values.

[0062] In order to better understand a signal quantization method disclosed in an embodiment of the present disclosure, a communication system to which the embodiment of the present disclosure is applicable is first described below.

[0063] See also Figure 1 , Figure 1The following is a schematic diagram of the architecture of a communication system provided by an embodiment of the present disclosure. The communication system may include but is not limited to an encoding end and a decoding end, wherein the encoding end may be a terminal device or a network device, and the decoding end may also be a terminal device or a network device. And, Figure 1 The number and form of devices shown are only for example and do not constitute a limitation on the embodiments of the present disclosure. In actual applications, one or more encoding ends or one or more decoding ends may be included. Figure 1 The communication system shown is taken as an example including a network device 11 as an encoding end and a terminal device 12 as a decoding end.

[0064] It should be noted that the technical solutions of the embodiments of the present disclosure can be applied to various communication systems, such as long term evolution (LTE) system, fifth generation (5G) mobile communication system, 5G new radio (NR) system, or other future new mobile communication systems.

[0065] The network device 11 in the embodiment of the present disclosure is an entity on the network side for transmitting or receiving signals. For example, the network device 11 may be an evolved NodeB (eNB), a transmission reception point (TRP), a Radio Remote Head (RRH), a next generation NodeB (gNB) in an NR system, a base station in other future mobile communication systems, or an access node in a wireless fidelity (WiFi) system. The embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the network device. The network device provided in the embodiment of the present disclosure may be composed of a centralized unit (CU) and a distributed unit (DU), wherein the CU may also be referred to as a control unit (control unit). The CU-DU structure may be used to split the protocol layer of the network device, such as the base station, and the functions of some protocol layers are placed in the CU for centralized control, and the functions of the remaining part or all of the protocol layers are distributed in the DU, and the DU is centrally controlled by the CU.

[0066] The terminal device 12 in the embodiment of the present disclosure may be an entity on the user side for receiving or transmitting signals, such as a mobile phone. The terminal device may also be referred to as a terminal device (terminal), user equipment (UE), mobile station (MS), mobile terminal device (MT), etc. UE may be a car with communication function, a smart car, a mobile phone, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control (industrial control), a wireless terminal device in self-driving, a wireless terminal device in remote medical surgery, a wireless terminal device in smart grid (smartgrid), a wireless terminal device in transportation safety (transportation safety), a wireless terminal device in a smart city (smart city), a wireless terminal device in a smart home (smart home), etc. The embodiment of the present disclosure does not limit the specific technology and specific device form adopted by the UE.

[0067] It can be understood that the communication system described in the embodiment of the present disclosure is for the purpose of more clearly illustrating the technical solution of the embodiment of the present disclosure, and does not constitute a limitation on the technical solution provided by the embodiment of the present disclosure. A person skilled in the art can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by the embodiment of the present disclosure is also applicable to similar technical problems.

[0068] The signal quantization method, apparatus, device and storage medium provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0069] It should be noted that in the present disclosure, the signal quantization method provided in any embodiment can be executed alone, and any implementation method in the embodiment can also be executed alone, or combined with other embodiments, or possible implementation methods in other embodiments, and can also be executed together with any technical solution in the related technology.

[0070] Figure 2a A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG2 . The method is executed by an encoding end. The signal quantization method may include the following steps:

[0071] Step 201a: Determine the codebook corresponding to the data to be quantized.

[0072] In one embodiment of the present disclosure, the codebooks corresponding to different to-be-quantized data may be the same or different. Also, the codebook may include k codewords, where k is a positive integer, and the value of k may be preset, for example, k may be equal to 3. The codewords in the codebook may be integers or decimals.

[0073] Furthermore, in one embodiment of the present disclosure, the codewords in the codebook may correspond to index values, which are integers, respectively. The codewords in different codebooks may correspond to the same or different index values.

[0074] For example, codebook one may include three codewords, namely: 1, 2.3, 3, and the index values ​​corresponding to the three codewords 1, 2.3, and 3 included in codebook one may be: 0, 1, and 2; codebook two may include three codewords, namely: 2, 3, and 3.5, and the index values ​​corresponding to the three codewords 2, 3, and 3.5 included in codebook two may also be: 0, 1, and 2.

[0075] It should be noted that, in one embodiment of the present disclosure, the codebook may be pre-generated based on an audio database, and the audio database may include at least one of historically collected audio data, historically sent audio data, and historically received audio data. Also, the method for generating the codebook will be described in subsequent embodiments. Also, how to specifically determine the codebook corresponding to the data to be quantized will also be described in subsequent embodiments.

[0076] Step 202a: determine a specific codeword from the codebook, where the specific codeword is the codeword in the codebook that is closest to the data to be quantized.

[0077] In one embodiment of the present disclosure, the above-mentioned “data distance is the shortest” can be understood as: the absolute value of the difference is the smallest, or the values ​​are relatively close.

[0078] For example, assume that a data to be quantized is 3, and the codebook corresponding to the data to be quantized includes three codewords, which are 1.1, 2.3, and 2.4. Since the absolute value of the difference between codeword 2.4 and data to be quantized 3 is the smallest, codeword 2.4 can be determined as the specific codeword corresponding to data to be quantized 3.

[0079] Step 203a: Determine the quantized data corresponding to the data to be quantized based on the specific codeword.

[0080] How to determine the quantized data corresponding to the data to be quantized based on a specific codeword will be introduced in subsequent embodiments.

[0081] Step 204a: perform interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream.

[0082] Step 205a: Send the code stream to the decoding end.

[0083] In one embodiment of the present disclosure, the encoding end sends the code stream to the decoding end so that the decoding end can subsequently restore the original audio signal by decoding, inverse quantizing, and other operations on the code stream, thereby achieving transmission of the audio signal.

[0084] And, it can be known from step 203a that in one embodiment of the present disclosure, the quantized data is actually determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs the inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, thereby making the quantization noise smaller. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method of the present disclosure takes into account the distribution characteristics between the data before quantization, thereby further reducing the quantization noise.

[0085] In summary, in the signal quantization method provided by the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword, and each quantized data will be interval encoded based on the codebook corresponding to each data to be quantized to obtain a code stream; the code stream is sent to the decoding end. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0086] Figure 2b A schematic diagram of a signal quantization method provided by an embodiment of the present disclosure, the method is executed by an encoding end, wherein the Figure 2b The method shown may be a possible implementation of step 203a above. Figure 2b As shown, the method may include the following steps:

[0087] Step 201b: In response to the specific codeword being an integer, directly determine the specific codeword as quantized data.

[0088] Step 202b: In response to the specific codeword being a non-integer, determine the index value corresponding to the specific codeword as the quantized data.

[0089] In one embodiment of the present disclosure, the codewords in the codebook each correspond to an index value, and the index value is an integer.

[0090] And, it should be noted that, in one embodiment of the present disclosure, the quantized data obtained after the quantization process should all be integers so that the subsequent encoding can be successful. However, since the codewords in the codebook may be integers or decimals, the determined specific codeword may also be an integer or a decimal. Based on this, it is necessary to perform the above steps 201b to 202b to ensure that the quantized data finally obtained based on the specific codeword are all integers.

[0091] For example, in one embodiment of the present disclosure, it is assumed that the specific code word corresponding to the data to be quantized "3" is: 2, and the specific code word corresponding to the data to be quantized "4" is: 3.5; the index value corresponding to the specific code word "2" corresponding to the data to be quantized "3" is: 1; the index value corresponding to the specific code word "3.5" corresponding to the data to be quantized "4" is: 2; wherein, since the specific code word corresponding to the data to be quantized "3" is an integer, the specific code word "2" corresponding to the data to be quantized "3" can be directly determined as the quantized data of the data to be quantized "3"; and, since the specific code word corresponding to the data to be quantized "4" is a non-integer, it is necessary to determine the index value "2" corresponding to the specific code word "3.5" corresponding to the data to be quantized "4" as the quantized data of the data to be quantized.

[0092] Furthermore, in one embodiment of the present disclosure, since the specific codeword is: the codeword in the codebook corresponding to the data to be quantized that is closest to the data to be quantized. Therefore, when the encoding end directly determines the specific codeword as the quantized data, the obtained quantized data is essentially: a codeword close to the data before quantization (i.e., the aforementioned data to be quantized). Therefore, when the subsequent decoding end performs the inverse quantization process, the inverse quantization can be performed directly based on the quantized data, that is, the quantized data can be directly used as the inverse quantized data, and the obtained inverse quantized data is close to the data before quantization.

[0093] Alternatively, when the encoding end determines the index value corresponding to a specific codeword as the quantized data, the obtained quantized data is essentially: the index value corresponding to the codeword that is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs the inverse quantization process, inverse quantization can be performed based on the index value. Specifically, the codebook corresponding to the data can be determined first, and then the corresponding codeword can be determined in the codebook based on the index value, and the codeword can be used as the inverse quantized data, then the obtained inverse quantized data is also close to the data before quantization.

[0094] It can be seen from the above content that whether executing the above step 201b or executing step 202b, it can be ensured that the inverse quantized data obtained during the subsequent inverse quantization at the decoding end is close to the data before quantization, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0095] also, Figure 2b In the corresponding embodiment, it can also be ensured that the quantized data are all integers, thus ensuring the smooth execution of subsequent operations.

[0096] In summary, in the signal quantization method provided by the present disclosure, in response to a specific codeword being an integer, the encoding end will directly determine the specific codeword as the quantized data; in response to a specific codeword being a non-integer, the encoding end will determine the index value corresponding to the specific codeword as the quantized data. It can be seen that in the present disclosure, the quantized data is determined based on a specific codeword (i.e., a codeword whose value is close to the data to be quantized), and the quantization noise is small. Moreover, when quantizing using the method disclosed in the present disclosure, it can also be ensured that the quantized data are all integers, thereby ensuring the smooth execution of subsequent operations.

[0097] Figure 2c A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 2c As shown, the signal quantization method may include the following steps:

[0098] Step 201c: In response to directly determining the specific codeword as the quantized data, first indication information is determined for the quantized data, where the first indication information is used to indicate that the quantized data is a codeword.

[0099] Step 202c: in response to determining the index value corresponding to the specific codeword as the quantized data, determining second indication information for the quantized data, the second indication information being used to indicate that the quantized data is the index value.

[0100] Among them, refer to the above Figure 2b It can be seen from the embodiment that when the specific codewords corresponding to the data to be quantized are different, the quantization method for the data to be quantized will also be different, and when the quantization method is different, the inverse quantization process performed by the decoding end will also be different. Based on this, in an embodiment of the present disclosure, indication information can be determined for each quantized data, and the indication information can be used to indicate the quantization method corresponding to the quantized data, so as to ensure that when the decoding end subsequently inverse quantizes the data, the corresponding inverse quantization operation can be performed based on the indication information corresponding to each data, so as to ensure the accuracy of the subsequent inverse quantization process and reduce the quantization noise.

[0101] Specifically, in one embodiment of the present disclosure, if the encoding end directly determines a specific codeword as quantized data during quantization, a first indication information can be determined for the quantized data, and the first indication information can be used to indicate that the quantized data is a codeword, and when the subsequent decoding end performs inverse quantization on the quantized data, the corresponding inverse quantization operation can be performed based on the indication of the first indication information, that is, the quantized data is directly used as the inverse quantized data. Alternatively, if the encoding end determines the index value corresponding to the specific codeword as the quantized data during quantization, a second indication information can be determined for the quantized data, and the second indication information is used to indicate that the quantized data is an index value, and when the subsequent decoding end performs inverse quantization on the quantized data, the corresponding inverse quantization operation can be performed based on the indication of the second indication information, that is, first determine the codebook corresponding to the quantized data, and then determine the codeword in the codebook with the same index value as the quantized data as the inverse quantized data. This ensures that the inverse quantization operations performed by the decoding end correspond to the quantization operations, thereby ensuring that the decoding end can accurately inverse quantize the data.

[0102] Furthermore, in an embodiment of the present disclosure, the first indication information and the second indication information may both be bit codes. For example, the first indication information may be "0, and the second indication information may be 1.

[0103] In addition, it should be noted that in one embodiment of the present disclosure, after the encoding end determines the first indication information or the second indication information for the quantized data, when the subsequent encoding end obtains the code stream through interval coding (i.e., the above-mentioned step 204a), the first indication information or the second indication information corresponding to each quantized data can be included in the code stream, so that when the subsequent decoding end performs inverse quantization processing on the data, it can perform corresponding inverse quantization processing based on the first indication information or the second indication information corresponding to the data, thereby ensuring the accuracy of the inverse quantization processing and reducing the quantization noise.

[0104] In summary, in the signal quantization method provided by the present disclosure, in response to the encoding end directly determining a specific codeword as quantized data, the encoding end will determine first indication information for the quantized data, and the first indication information is used to indicate that the quantized data is a codeword; in response to the encoding end determining the index value corresponding to the specific codeword as the quantized data, the encoding end will determine second indication information for the quantized data, and the second indication information is used to indicate that the quantized data is an index value. It can be seen from this that in the present disclosure, the encoding end will determine indication information for each quantized data, and the indication information is used to indicate the quantization method corresponding to the quantized data, so as to ensure that when the decoding end subsequently inverse quantizes the data, the corresponding inverse quantization process can be performed based on the indication information corresponding to each data, so as to ensure the accuracy of the subsequent inverse quantization process and reduce the quantization noise.

[0105] Figure 2d A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 2d As shown, the signal quantization method may include the following steps:

[0106] Step 201d: determine the index value corresponding to the specific codeword as the quantized data.

[0107] in, Figure 2d The embodiment and the above Figure 2b The difference between the embodiments of the present invention and the embodiments of the present invention is that in the present embodiment, it is no longer determined whether a specific codeword is an integer, but the index value corresponding to the specific codeword of the data to be quantized is uniformly determined as the quantized data. Also, when the subsequent encoding end performs the inverse quantization process, the codebook corresponding to the data is uniformly determined, and the codeword corresponding to the index value in the codebook is determined as the inverse quantized data. Thus, it can not only ensure that the quantized data are all integers and the decoding end can accurately inverse quantize the data, but also omit the step of determining whether a specific codeword is an integer at the decoding end, thereby improving the quantization efficiency. At the same time, it is no longer necessary to transmit the first indication information and the second indication information, saving signaling overhead.

[0108] In summary, in the signal quantization method provided by the present disclosure, the encoding end determines the index value corresponding to the specific codeword as the quantized data. It can be seen that in the present disclosure, the quantized data is determined based on a specific codeword (i.e., a codeword whose value is close to the data to be quantized), and the quantization noise is small. Moreover, when the method of the present disclosure is used for quantization, it is also ensured that the quantized data are all integers, which ensures the smooth execution of subsequent operations and ensures that the decoding end can accurately inverse quantize the data. At the same time, the step of determining whether a specific codeword is an integer at the decoding end is omitted, which improves the quantization efficiency, and there is no need to transmit the first indication information and the second indication information, saving signaling overhead.

[0109] Figure 3 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the signal quantization method may include the following steps:

[0110] Step 301: Generate at least one codebook.

[0111] In one embodiment of the present disclosure, a method for generating a codebook may include the following steps:

[0112] Step a: select k audio data from an audio database as k initial code words.

[0113] In one embodiment of the present disclosure, the audio database may include at least one of historically collected audio data, historically sent audio data, and historically received audio data.

[0114] And, in one embodiment of the present disclosure, the above-mentioned “selecting k audio data from the audio database as k initial codewords” may include the following steps:

[0115] The first step is to randomly select an audio data from the audio database as the first initial codeword.

[0116] The second step is to select a second initial codeword from the audio database based on the first initial codeword.

[0117] Among them, in one embodiment of the present disclosure, the method of selecting the second initial codeword from the audio database based on the first initial codeword may include:

[0118] First, determine the distance D(x) between each audio data in the audio database and the first initial codeword. The distance D(x) may be the absolute value of the difference between the audio data and the first initial codeword. For example, assuming that the selected first initial codeword is: 4, if the audio data is: 5, then the distance D(x) between the audio data and the first initial codeword = |5-4| = 1.

[0119] Then, based on the distance D(x) between each audio data and the first initial codeword, a selection probability is set for each audio data. The selection probability is positively correlated with D(x). That is, when the distance D(x) between the audio data and the first initial codeword is larger, the selection probability set for the audio data should be larger.

[0120] Afterwards, a second initial codeword is selected from the audio database based on the selection probability.

[0121] Step 3: Select a third initial codeword from the audio database based on the first initial codeword and the second initial codeword.

[0122] Among them, in one embodiment of the present disclosure, the method of selecting a third initial codeword from an audio database based on the first initial codeword and the second initial codeword may include:

[0123] First, determine the distance between each audio data in the audio database and each initial codeword, and determine the shortest distance D(x) corresponding to each audio data. That is, determine the distance D1(x) between each audio data in the audio database and the first initial codeword, and the distance D2(x) between each audio data and the second initial codeword, and determine min(D1(x), D2(x)) as the shortest distance D(x) corresponding to the audio data. For example, assuming that the first initial codeword is 4 and the second initial codeword is 7, if the audio data is 5, then the distance between the audio data and the first initial codeword is D1(x)=|5-4|=1, and the distance between the audio data and the second initial codeword is D2(x)=|5-7|=2, then D(x)=min(D1(x), D2(x))=1.

[0124] Afterwards, a selection probability can be set for each audio data based on the shortest distance corresponding to each audio data (ie: D(x)). The selection probability is positively correlated with D(x). That is, when the shortest distance D(x) corresponding to the audio data is larger, the selection probability set for the audio data should be larger.

[0125] Finally, a third initial codeword is selected from the audio database based on the selection probability.

[0126] Step 4: Select a fourth initial codeword from the audio database based on the first initial codeword, the second initial codeword, and the third initial codeword.

[0127] In one embodiment of the present disclosure, the method for selecting a fourth initial codeword from an audio database based on the first initial codeword, the second initial codeword, and the third initial codeword may include:

[0128] First, determine the distance between each audio data in the audio database and each initial codeword, and determine the shortest distance D(x) corresponding to each audio data. That is, determine the distance D1(x) between each audio data in the audio database and the first initial codeword, the distance D2(x) between the second initial codeword, and the distance D3(x) between the third initial codeword, and determine min(D1(x), D2(x), D3(x)) as the shortest distance D(x) corresponding to the audio data. For example, assuming that the first initial codeword is 4, the second initial codeword is 7, and the third initial codeword is 1, if the audio data is 5, then the distance between the audio data and the first initial codeword is D1(x)=|5-4|=1, the distance between the audio data and the second initial codeword is D2(x)=|5-7|=2, and the distance between the audio data and the third initial codeword is D3(x)=|5-1|=4, then D(x)=min(D1(x), D2(x), D3(x))=1.

[0129] Afterwards, a selection probability can be set for each audio data based on the shortest distance corresponding to each audio data (ie: D(x)). The selection probability is positively correlated with D(x). That is, when the shortest distance D(x) corresponding to the audio data is larger, the selection probability set for the audio data should be larger.

[0130] Finally, a third initial codeword is selected from the audio database based on the selection probability.

[0131] And so on, until the kth initial code word is selected.

[0132] Among them, the selected first initial code word, second initial code word...kth initial code word can constitute the above-mentioned k initial code words.

[0133] Step b: Calculate the k initial code words using a specific algorithm to obtain k calculated code words, and construct a code book based on the k calculated code words.

[0134] In one embodiment of the present disclosure, the specific algorithm may include a K-Means algorithm. And, using the specific algorithm to calculate the k initial codewords may include: using the K-Means algorithm to calculate the k initial codewords until convergence, so as to obtain k calculated codewords.

[0135] In summary, in the signal quantization method provided by the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, where k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0136] Figure 4 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the signal quantization method may include the following steps:

[0137] Step 401: Select k audio data from an audio database as k initial codewords.

[0138] Step 402: Calculate the k initial codewords using a specific algorithm to obtain k calculated codewords, and construct a codebook based on the k calculated codewords; wherein the calculated codewords are all decimals.

[0139] For a detailed description of steps 401 - 402 , please refer to the above embodiment description.

[0140] In summary, in the signal quantization method provided by the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, where k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0141] Figure 5 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the signal quantization method may include the following steps:

[0142] Step 501: Determine the data to be quantified.

[0143] The above-mentioned “determining the data to be quantified” may include the following steps:

[0144] Step 1: preprocess the audio signal to be encoded to obtain a time-frequency signal, wherein the time domain signal includes m×n time domain data x(n), where m and n are both positive integers, for example, m can be 16 and n can be 64.

[0145] The preprocessing may include: transforming the audio signal to be encoded from the time domain to the frequency domain.

[0146] Step 2: Input the time domain signal into the encoding neural network to output a first transform domain signal, wherein the first transform domain signal includes m×n first transform domain data y(n).

[0147] Step 3: Perform a scale transformation on the first transform domain signal to obtain a first transformed signal, wherein the first transformed signal includes m×n scale-transformed first data z(n).

[0148] Step 4: Determine the first data z(n) as the data to be quantized.

[0149] In summary, in the signal quantization method provided by the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, where k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0150] Figure 6 A schematic diagram of a signal quantization method provided by an embodiment of the present disclosure, the method is executed by an encoding end, the Figure 6 The method shown may be a possible implementation of step 201a above, such as Figure 6 As shown, the method may include the following steps:

[0151] Step 601: Determine a second transform domain signal based on a first transform domain signal, the second transform domain signal comprising m×n second transform domain data fabs(y(n)); wherein fabs represents an absolute value.

[0152] Step 602: Perform a scale transformation on the second change domain signal to obtain a second transformed signal, where the second transformed signal includes m×n scale-transformed second data z1(n).

[0153] Step 603: Input the second transformed signal into a context coding neural network to output context information corresponding to each second data z1(n), and the context information is used to determine the codebook corresponding to the first data z(n).

[0154] In one embodiment of the present disclosure, the context information may be a numerical value.

[0155] Step 604: Determine a codebook corresponding to each first data z(n) based on the context information corresponding to each second data z1(n).

[0156] Specifically, in one embodiment of the present disclosure, determining a codebook corresponding to each first data z(n) based on context information corresponding to each second data z1(n) may include:

[0157] Step 1: first determine the corresponding codebook based on the context information corresponding to each second data z1(n).

[0158] Specifically, in an embodiment of the present disclosure, different codebooks are each correspondingly provided with a value interval. The codebook corresponding to the second data z1(n) may be: a codebook corresponding to the value interval in which the context information of the second data z1(n) is located.

[0159] For example, assuming that codebook one corresponds to the value interval [0, 1), codebook two corresponds to the value interval [1, 2), and codebook three corresponds to the value interval [2, 3). At this time, if the context information of the second data z1(n) is 1.5, the context information is in the value interval [1, 2), then it can be determined that the codebook corresponding to the second data z1(n) is: codebook two.

[0160] Step 2: Determine the codebook corresponding to the second data z1(n) as: the codebook corresponding to the first data z(n) having the same position as the second data z1(n).

[0161] For example, assuming that the codebook corresponding to a second data z1(n) is determined to be codebook two through step one above, and the second data z1(n) is located in the first column and third row of the second transformed signal, at this time, the first data z(n) having the same position as the second data z1(n) is the first data z(n) located in the first column and third row of the first transformed signal, then it can be determined that the codebook corresponding to the first data z(n) is codebook two.

[0162] In addition, it should be noted that, in an embodiment of the present disclosure, after the encoding end determines the context information corresponding to the codebook corresponding to each data to be quantized, when the subsequent encoding end obtains the code stream through interval coding (i.e., the above-mentioned step 204a), the context information corresponding to the codebook corresponding to each data to be quantized can be included in the code stream, so that the subsequent decoding end can determine the codebook corresponding to the data based on the context information when decoding and inverse quantization, and then decode and inverse quantize the data based on the codebook.

[0163] In summary, in the signal quantization method provided by the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, where k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0164] Figure 7 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the method may include the following steps:

[0165] Step 701: Receive a code stream sent by an encoding end, and perform interval decoding on the code stream to obtain decoded data.

[0166] Step 702: Determine inverse quantized data based on the decoded data.

[0167] In one embodiment of the present disclosure, the decoded data is essentially the quantized data obtained by the aforementioned encoding end, that is, the decoded data is essentially: the codeword in the codebook corresponding to the decoded data that is closest to the decoded data, or the index value corresponding to the codeword. The codebook corresponding to the decoded data is also: the codebook corresponding to the quantized data, or the codebook corresponding to the aforementioned data to be quantized.

[0168] In addition, for a detailed description of steps 701 - 702 , reference may be made to the above embodiment description.

[0169] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0170] Figure 8 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the method may include the following steps:

[0171] Step 801: parse the bitstream to determine context information corresponding to each decoded data; the context information is used to determine the codebook used when each decoded data is encoded.

[0172] In one embodiment of the present disclosure, the codebook used when the decoded data is encoded can be understood as: a codebook corresponding to the quantized data, or a codebook corresponding to the aforementioned data to be quantized.

[0173] Also, for a detailed description of step 801, reference may be made to the above embodiment description.

[0174] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0175] Fig. 9 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the method may include the following steps:

[0176] Step 901: Determine the codebook used when encoding each encoded data based on context information.

[0177] Step 902: perform interval decoding on the encoded data based on the codebook.

[0178] For a detailed description of steps 901 - 902 , please refer to the above embodiment description.

[0179] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0180] Fig.10 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Fig.10 As shown, the method may include the following steps:

[0181] Step 1001: Determine first indication information or second indication information corresponding to the decoded data from the bit stream;

[0182] Step 1002: In response to the decoded data corresponding to the first indication information, determine the decoded data as inverse quantized data;

[0183] Step 1003: In response to the decoded data corresponding to the second indication information, determine the codebook used when the decoded data is encoded based on the context information, and determine the codeword in the codebook having the same index value as the decoded data as the inverse quantized data.

[0184] For example, in one embodiment of the present disclosure, it is assumed that the decoded data includes: 3 and 4, wherein the decoded data "3" corresponds to the first indication information, and the decoded data "4" corresponds to the second indication information. At this time, when the decoded data "3" is inversely quantized, the decoded data "3" can be directly determined as the corresponding inversely quantized data. And, when the decoded data "4" is inversely quantized, the codebook used by the decoded data "4" when it is encoded can be first determined based on the context information corresponding to the decoded data "4". For example, the three codewords included in the determined codebook are: 1.1, 2.3, and 3.4, wherein the index value corresponding to codeword 1.1 is "2", the index value corresponding to codeword 2.3 is "3", and the index value corresponding to codeword 3.4 is "4". The index value corresponding to codeword 3.4 is the same as the decoded data "4", so codeword 3.4 can be determined as the inversely quantized data corresponding to the decoded data "4".

[0185] Also, for other detailed descriptions of steps 1001 - 1003 , reference may be made to the above-mentioned embodiment description.

[0186] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0187] Fig.11 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Fig.11 As shown, the method may include the following steps:

[0188] Step 1101: Determine a codebook used when encoding the decoded data based on the context information;

[0189] Step 1102: Determine a codeword in the codebook having the same index value as the decoded data as inverse quantized data.

[0190] For a detailed description of steps 1101 - 1102 , please refer to the above embodiment description.

[0191] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0192] Fig.12 A flow chart of a signal quantization method provided by an embodiment of the present disclosure is shown in FIG. Fig.12 As shown, the method may include the following steps:

[0193] Step 1201: Perform noise filling, scale transformation and neural network decoding on the inverse quantized data.

[0194] In summary, in the signal quantization method provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method disclosed in the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0195] The method of the present disclosure is introduced below by way of example.

[0196] in, Fig.13a The flowchart of the execution method of the encoding end provided by the embodiment of the present disclosure is as follows. Fig.13a As shown, firstly, the audio library data is preprocessed to obtain the time-frequency coefficient x(n), and x(n) is used as the input of the basic coding neural network to obtain the transform domain coefficient y(n) of the basic neural network. Then, y(n) and fabs(y(n)) are scaled to obtain the scaled coefficients z(n) and z1(n), respectively. z1(n) is processed by the context coding neural network to obtain the encoded context information, and under the guidance of this information, the codebook of the corresponding basic part interval coding is obtained. The number of codewords in the codebook is the same as that of the original scheme, and the value of the codeword has not been determined. After all data are assigned to the corresponding codebook, the number of codewords contained in the codebook is set to k, and the k-means++ clustering algorithm is used to determine the value of the codeword for each data set contained in the codebook:

[0197] 1. Randomly select a sample in the data set as the first initialization codeword;

[0198] 2. For each point x in the data set, calculate its distance D(x) to the nearest cluster center (referring to the selected cluster center)

[0199] 3. Select a new data point as the new cluster center. The principle of selection is: the point with larger D(x) has a higher probability of being selected as the cluster center.

[0200] 4. Repeat steps 2 and 3 until k code words are selected;

[0201] 5. Use the K-Means algorithm on k codewords until convergence to obtain the final codebook.

[0202] Finally, the codebook is used as the codebook for quantization. The specific process of quantization is:

[0203] For the data to be encoded, find the codeword closest to it in the codebook and map it to the index of the codeword.

[0204] Fig.13b The flowchart of the execution method of a decoding end provided by the embodiment of the present disclosure is as follows. Fig.13b As shown, the encoder obtains the index through interval decoding, searches for the corresponding codeword, maps the index to the value of the codeword, and completes the inverse quantization process.

[0205] The present disclosure aims to solve the problem that the related technology does not consider the distribution of the data to be quantized. The kmeans++ clustering algorithm is used on the audio data to obtain the cluster center, which replaces the original cluster center that does not consider the data distribution, to form a solution that can better reduce the quantization noise.

[0206] Further, Fig.13c A comparison diagram of quantization noise when the audio data of a song is quantized using the quantization method of the present disclosure and the quantization method in the related art, provided in an embodiment of the present disclosure, Fig.13d A quantization noise comparison diagram when the audio data of speech is quantized using the quantization method of the present disclosure and the quantization method in the related art respectively provided in the embodiment of the present disclosure, Fig.13e A quantization noise comparison diagram when the quantization method of the present disclosure and the quantization method in the related art are used to quantize the audio data of music, provided in an embodiment of the present disclosure, wherein: Fig.13c , Fig.13d , Fig.13e The upper line in the figure is the line corresponding to the quantization noise when the audio data is quantized using the quantization method in the related art (i.e., linear scalar quantization). Fig.13c , Fig.13d , Fig.13e The line at the bottom of the figure is the line corresponding to the quantization noise when the audio data is quantized using the quantization method disclosed in the present invention. Fig.13c , Fig.13d , Fig.13e It can be seen that the mean square error (MSE) value when quantizing using the quantization method disclosed in the present invention is smaller than the MSE value when quantizing using the quantization method in the related art, which indicates that the present invention reduces the quantization noise.

[0207] From the above content, it can be seen that the present disclosure determines the codeword of the codebook through the k-means++ algorithm, and encodes it into a codeword index by finding the codeword closest to the data during encoding, completing the quantization process, reducing quantization noise, and improving the encoding quality of lossy encoding.

[0208] Fig.14 A schematic diagram of the structure of a communication device provided by an embodiment of the present disclosure is shown in FIG. Fig.14 As shown, the apparatus may include:

[0209] A processing module, used to determine a codebook corresponding to the data to be quantized, wherein the codebook includes k codewords, where k is a positive integer;

[0210] The processing module is further configured to determine a specific codeword from the codebook, wherein the specific codeword is a codeword in the codebook that is closest to the data to be quantized;

[0211] The processing module is further used to determine the quantized data corresponding to the data to be quantized based on the specific codeword;

[0212] The processing module is further used to perform interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream;

[0213] The transceiver module is used to send the code stream to the decoding end.

[0214] In summary, in the communication device provided in the embodiment of the present disclosure, the encoding end will determine the codebook corresponding to the data to be quantized, and the codebook includes k codewords, k is a positive integer; then, a specific codeword will be determined from the codebook, and the specific codeword is the codeword in the codebook that is closest to the data to be quantized; finally, the quantized data corresponding to the data to be quantized will be determined based on the specific codeword, and each quantized data will be interval encoded based on the codebook corresponding to each data to be quantized to obtain a code stream; the code stream is sent to the decoding end. It can be seen that in the signal quantization method disclosed in the present disclosure, the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (that is, the aforementioned data to be quantized). Based on this, when the subsequent decoding end performs an inverse quantization process, data close to the data before quantization can be inversely quantized based on the quantized data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. Furthermore, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized. The quantized data obtained by using the above-mentioned specific codewords should also be able to reflect the distribution characteristics between the data before quantization. It can be seen that the quantization method disclosed in the present invention takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0215] Optionally, in an embodiment of the present disclosure, the processing module is further configured to:

[0216] In response to the specific codeword being an integer, directly determining the specific codeword as the quantized data;

[0217] In response to the specific codeword being a non-integer, determining an index value corresponding to the specific codeword as the quantized data; wherein the codewords in the codebook respectively correspond to index values, and the index values ​​are integers.

[0218] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0219] In response to directly determining the specific codeword as the quantized data, determining first indication information for the quantized data, the first indication information being used to indicate that the quantized data is a codeword;

[0220] In response to determining the index value corresponding to the specific codeword as the quantized data, second indication information is determined for the quantized data, where the second indication information is used to indicate that the quantized data is the index value.

[0221] Optionally, in an embodiment of the present disclosure, the codewords in the codebook respectively correspond to index values, and the index values ​​are integers;

[0222] The processing module is further used for:

[0223] The index value corresponding to the specific codeword is determined as the quantized data.

[0224] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0225] At least one codebook is generated.

[0226] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0227] Select k audio data from the audio database as k initial codewords;

[0228] The k initial code words are calculated using a specific algorithm to obtain k calculated code words, and a code book is formed based on the k calculated code words.

[0229] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0230] Randomly select an audio data from the audio database as the first initial codeword;

[0231] Selecting a second initial codeword from the audio database based on the first initial codeword;

[0232] A third initial codeword is selected from the audio database based on the first initial codeword and the second initial codeword; and so on until the kth initial codeword is selected.

[0233] Optionally, in one embodiment of the present disclosure, the specific algorithm includes a K-Means algorithm;

[0234] The device is also used for:

[0235] The k initial codewords are calculated using the K-Means algorithm until convergence to obtain k calculated codewords.

[0236] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0237] Identify the data to be quantified.

[0238] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0239] Preprocessing the audio signal to be encoded to obtain a time-frequency signal, wherein the time-domain signal includes m×n time-domain data x(n), where m and n are both positive integers;

[0240] Inputting the time domain signal into a coding neural network to output a first transform domain signal, wherein the first transform domain signal includes m×n first transform domain data y(n);

[0241] Performing a scale transformation on the first transform domain signal to obtain a first transformed signal, wherein the first transformed signal includes m×n scale-transformed first data z(n);

[0242] The first data z(n) is determined as the data to be quantized.

[0243] Optionally, in an embodiment of the present disclosure, the processing module is further configured to:

[0244] Determine a second transform domain signal based on the first transform domain signal, wherein the second transform domain signal includes m×n second transform domain data fabs(y(n)); wherein fabs represents an absolute value;

[0245] Performing a scale transformation on the second change domain signal to obtain a second transformed signal, wherein the second transformed signal includes m×n scale-transformed second data z1(n);

[0246] Inputting the second transformed signal into a context coding neural network to output context information corresponding to each second data z1(n), wherein the context information is used to determine a codebook corresponding to the first data z(n);

[0247] A codebook corresponding to each first data z(n) is determined based on the context information.

[0248] Optionally, in an embodiment of the present disclosure, the bitstream further includes context information corresponding to a codebook corresponding to each piece of data to be quantized.

[0249] Optionally, in an embodiment of the present disclosure, the code stream also includes first indication information or second indication information corresponding to each quantized data.

[0250] Fig.15 A schematic diagram of the structure of a communication device provided by an embodiment of the present disclosure is shown in FIG. Fig.15 As shown, the apparatus may include:

[0251] A processing module, used for receiving a code stream sent by an encoding end, and performing interval decoding on the code stream to obtain decoded data;

[0252] The processing module is further used to determine inverse quantized data based on the decoded data.

[0253] In summary, in the communication device provided by the present disclosure, the decoding end will receive the code stream sent by the encoding end, and will perform interval decoding on the code stream to obtain decoded data. Afterwards, the decoding end will determine the inverse quantized data based on the decoded data. Among them, the decoded data is essentially the quantized data in the above embodiment, and the quantized data is essentially determined based on a codeword whose value is close to the data before quantization (i.e., the aforementioned data to be quantized). Based on this, when the decoding end performs the inverse quantization process, the data close to the data before quantization can be inversely quantized based on the decoded data, that is, the value of the inverse quantized data is close to the data before quantization, thereby ensuring that the inverse quantization operation can restore the original data before quantization to a large extent, so that the quantization noise is small. In addition, since the codebook used for quantization is determined by the audio database, each codeword in the codebook can reflect the distribution characteristics of the data to be quantized, and the quantized data determined by the above-mentioned specific codeword should also be able to reflect the distribution characteristics between each data before quantization. It can be seen that the quantization method of the present disclosure takes into account the distribution characteristics between the data before quantization, which further reduces the quantization noise.

[0254] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0255] The code stream is parsed to determine context information corresponding to each decoded data; the context information is used to determine the codebook used when each decoded data is encoded.

[0256] Optionally, in an embodiment of the present disclosure, the processing module is further configured to:

[0257] Determine, based on the context information, a codebook used when encoding each encoded data;

[0258] The encoded data is interval-decoded based on the codebook.

[0259] Optionally, in an embodiment of the present disclosure, the processing module is further configured to:

[0260] Determine, from the bitstream, first indication information or second indication information corresponding to the decoded data;

[0261] In response to the decoded data corresponding to the first indication information, determining the decoded data as inverse quantized data;

[0262] In response to the decoded data corresponding to the second indication information, a codebook used when the decoded data was encoded is determined based on the context information, and a codeword in the codebook having the same index value as the decoded data is determined as the inverse quantized data.

[0263] Optionally, in an embodiment of the present disclosure, the processing module is further configured to:

[0264] Determining, based on the context information, a codebook used when the decoded data is encoded;

[0265] A codeword in the codebook having the same index value as the decoded data is determined as the inverse quantized data.

[0266] Optionally, in one embodiment of the present disclosure, the device is further used for:

[0267] The inverse quantized data is subjected to noise filling, scale transformation and neural network decoding.

[0268] See also Fig.16 , Fig.16 1 is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of the present application. The communication device 1600 may be a network device, or a terminal device, or a chip, a chip system, or a processor that supports the network device to implement the above method, or a chip, a chip system, or a processor that supports the terminal device to implement the above method. The device may be used to implement the method described in the above method embodiment, and the details may refer to the description in the above method embodiment.

[0269] The communication device 1600 may include one or more processors 1601. The processor 1601 may be a general-purpose processor or a dedicated processor, etc. For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process the communication protocol and communication data, and the central processing unit may be used to control the communication device (such as a base station, a baseband chip, a terminal device, a terminal device chip, a DU or a CU, etc.), execute a computer program, and process the data of the computer program.

[0270] Optionally, the communication device 1600 may further include one or more memories 1602, on which a computer program 1604 may be stored, and the processor 1601 executes the computer program 1604 so that the communication device 1600 performs the method described in the above method embodiment. Optionally, data may also be stored in the memory 1602. The communication device 1600 and the memory 1602 may be provided separately or integrated together.

[0271] Optionally, the communication device 1600 may further include a transceiver 1605 and an antenna 1606. The transceiver 1605 may be referred to as a transceiver unit, a transceiver, or a transceiver circuit, etc., for implementing a transceiver function. The transceiver 1605 may include a receiver and a transmitter, the receiver may be referred to as a receiver or a receiving circuit, etc., for implementing a receiving function; the transmitter may be referred to as a transmitter or a transmitting circuit, etc., for implementing a transmitting function.

[0272] Optionally, the communication device 1600 may further include one or more interface circuits 1607. The interface circuit 1607 is used to receive code instructions and transmit them to the processor 1601. The processor 1601 runs the code instructions to enable the communication device 1600 to perform the method described in the above method embodiment.

[0273] In one implementation, the processor 1601 may include a transceiver for implementing the receiving and sending functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and sending functions may be separate or integrated. The above-mentioned transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or the above-mentioned transceiver circuit, interface, or interface circuit may be used for transmitting or delivering signals.

[0274] In one implementation, the processor 1601 may store a computer program 1603, which runs on the processor 1601 and enables the communication device 1600 to perform the method described in the above method embodiment. The computer program 1603 may be fixed in the processor 1601, in which case the processor 1601 may be implemented by hardware.

[0275] In one implementation, the communication device 1600 may include a circuit that can implement the functions of sending or receiving or communicating in the aforementioned method embodiments. The processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit RFIC, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (nMetal-oxide-semiconductor, NMOS), P-type metal oxide semiconductor (positive channelmetal oxide semiconductor, PMOS), bipolar junction transistor (bipolar junction transistor, BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0276] The communication device described in the above embodiments may be a network device or a terminal device, but the scope of the communication device described in the present application is not limited thereto, and the structure of the communication device may not be limited thereto. Fig.16 The communication device may be an independent device or may be part of a larger device. For example, the communication device may be:

[0277] (1) Independent integrated circuit IC, or chip, or chip system or subsystem;

[0278] (2) having a set of one or more ICs, and optionally, the IC set may also include a storage component for storing data and computer programs;

[0279] (3) ASIC, such as modem;

[0280] (4) Modules that can be embedded in other devices;

[0281] (5) Receivers, terminal devices, intelligent terminal devices, cellular phones, wireless devices, handheld devices, mobile units, vehicle-mounted devices, network devices, cloud devices, artificial intelligence devices, etc.;

[0282] (6)Others

[0283] For the case where the communication device may be a chip or a chip system, see Fig.17 Schematic diagram of the chip structure shown. Fig.17 The chip shown includes a processor 1701 and an interface 1702. The number of the processor 1701 can be one or more, and the number of the interface 1702 can be multiple.

[0284] Optionally, the chip further includes a memory 1703, and the memory 1703 is used to store necessary computer programs and data.

[0285] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions described for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

[0286] The present application also provides a readable storage medium having instructions stored thereon, which implement the functions of any of the above method embodiments when executed by a computer.

[0287] The present application also provides a computer program product, which implements the functions of any of the above method embodiments when executed by a computer.

[0288] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0289] A person skilled in the art may understand that the various numerical numbers such as first and second involved in the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application, and also indicate the order of precedence.

[0290] At least one in the present application can also be described as one or more, and a plurality can be two, three, four or more, which is not limited in the present application. In the embodiments of the present application, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".

[0291] The corresponding relationships shown in each table in the present application can be configured or predefined. The values ​​of the signals in each table are only examples and can be configured as other values, which are not limited by the present application. When configuring the corresponding relationship between the information and each parameter, it is not necessarily required to configure all the corresponding relationships illustrated in each table. For example, in the table in the present application, the corresponding relationships shown in some rows may not be configured. For another example, appropriate deformation adjustments can be made based on the above table, such as splitting, merging, etc. The names of the parameters shown in the titles in the above tables can also use other names that can be understood by the communication device, and the values ​​or representations of the parameters can also be other values ​​or representations that can be understood by the communication device. When implementing the above tables, other data structures can also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables or hash tables.

[0292] The predefined in the present application may be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0293] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0294] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0295] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A signal quantization method, characterized in that: The method is executed by the encoding end, and includes: Determine a codebook corresponding to the data to be quantized, wherein the codebook includes k codewords, where k is a positive integer; Determine a specific codeword from the codebook, where the specific codeword is a codeword in the codebook that is closest to the data to be quantized; Determine quantized data corresponding to the data to be quantized based on the specific codeword; Performing interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream; Sending the code stream to a decoding end; The step of determining the quantized data corresponding to the data to be quantized based on the specific codeword includes: In response to the specific codeword being an integer, directly determining the specific codeword as the quantized data; In response to the specific codeword being a non-integer, determining an index value corresponding to the specific codeword as the quantized data; wherein the codewords in the codebook respectively correspond to index values, and the index values ​​are integers.

2. The method according to claim 1, characterized in that The method further comprises: In response to directly determining the specific codeword as the quantized data, determining first indication information for the quantized data, the first indication information being used to indicate that the quantized data is a codeword; In response to determining the index value corresponding to the specific codeword as the quantized data, second indication information is determined for the quantized data, where the second indication information is used to indicate that the quantized data is the index value.

3. The method according to claim 1, characterized in that The determining, based on the specific codeword, quantized data corresponding to the data to be quantized includes: The index value corresponding to the specific codeword is determined as the quantized data.

4. The method according to claim 1, characterized in that The method further comprises: At least one codebook is generated.

5. The method according to claim 4, characterized in that The generating at least one codebook comprises: Select k audio data from the audio database as k initial codewords; The k initial code words are calculated using a specific algorithm to obtain k calculated code words, and a code book is formed based on the k calculated code words.

6. The method according to claim 5, characterized in that The step of selecting k audio data from an audio database as k initial code words comprises: Randomly select an audio data from the audio database as the first initial codeword; Selecting a second initial codeword from the audio database based on the first initial codeword; A third initial codeword is selected from the audio database based on the first initial codeword and the second initial codeword; and so on until the kth initial codeword is selected.

7. The method according to claim 5, characterized in that The specific algorithm includes K-Means algorithm; The calculating the k initial code words by using a specific algorithm includes: The k initial codewords are calculated using the K-Means algorithm until convergence to obtain k calculated codewords.

8. The method according to claim 1, characterized in that The method further comprises: Identify the data to be quantified.

9. The method according to claim 8, characterized in that The determining of the data to be quantified includes: Preprocessing the audio signal to be encoded to obtain a time-frequency signal, wherein the time-frequency signal includes m×n time-frequency data x(n), where m and n are both positive integers; Inputting the time-frequency signal into a coding neural network to output a first transform domain signal, wherein the first transform domain signal includes m×n first transform domain data y(n); Performing a scale transformation on the first transform domain signal to obtain a first transformed signal, wherein the first transformed signal includes m×n scale-transformed first data z(n); The first data z(n) is determined as the data to be quantized.

10. The method according to claim 9, characterized in that The determining a codebook corresponding to the data to be quantized includes: Determine a second transform domain signal based on the first transform domain signal, wherein the second transform domain signal includes m×n second transform domain data fabs(y(n)); wherein fabs represents an absolute value; Performing a scale transformation on the second change domain signal to obtain a second transformed signal, wherein the second transformed signal includes m×n scale-transformed second data z1(n); Inputting the second transformed signal into a context coding neural network to output context information corresponding to each second data z1(n), wherein the context information is used to determine a codebook corresponding to the first data z(n); A codebook corresponding to each first data z(n) is determined based on the context information.

11. The method according to claim 10, characterized in that The bitstream also includes context information corresponding to the codebook corresponding to each piece of data to be quantized.

12. The method according to claim 2, characterized in that The code stream also includes first indication information or second indication information corresponding to each quantized data.

13. A signal quantization method, characterized in that: The method is executed by a decoding end, comprising: Receive a code stream sent by an encoding end, and perform interval decoding on the code stream to obtain decoded data; the code stream is obtained by the encoding end performing interval encoding on each quantized data based on a code book corresponding to each to-be-quantized data, and the quantized data is obtained based on a specific code word, and the specific code word is a code word in the code book corresponding to the to-be-quantized data that is closest to the to-be-quantized data; wherein, in response to the specific code word being an integer, the quantized data is the specific code word; in response to the specific code word being a non-integer, the quantized data is an index value corresponding to the specific code word; wherein, the code words in the code book respectively correspond to index values, and the index values ​​are integers; Determine inverse quantized data based on the decoded data.

14. The method according to claim 13, characterized in that The method further comprises: The code stream is parsed to determine context information corresponding to each decoded data; the context information is used to determine the codebook used when each decoded data is encoded.

15. The method according to claim 14, characterized in that The performing interval decoding on the code stream includes: Determine, based on the context information, a codebook used when encoding each encoded data; The encoded data is interval-decoded based on the codebook.

16. The method according to claim 14, characterized in that The determining the inverse quantized data based on the decoded data comprises: Determine, from the bitstream, first indication information or second indication information corresponding to the decoded data; In response to the decoded data corresponding to the first indication information, determining the decoded data as inverse quantized data; In response to the decoded data corresponding to the second indication information, a codebook used when the decoded data was encoded is determined based on the context information, and a codeword in the codebook having the same index value as the decoded data is determined as the inverse quantized data.

17. The method according to claim 14, characterized in that The step of determining the inverse quantized data based on the decoded data includes: Determining, based on the context information, a codebook used when the decoded data is encoded; A codeword in the codebook having the same index value as the decoded data is determined as the inverse quantized data.

18. The method according to claim 13, characterized in that The method further comprises: The inverse quantized data is subjected to noise filling, scale transformation and neural network decoding.

19. A communication device, characterized in that: include: A processing module, used to determine a codebook corresponding to the data to be quantized, wherein the codebook includes k codewords, where k is a positive integer; The processing module is further configured to determine a specific codeword from the codebook, wherein the specific codeword is a codeword in the codebook that is closest to the data to be quantized; The processing module is further used to determine the quantized data corresponding to the data to be quantized based on the specific codeword; The processing module is further used to perform interval coding on each quantized data based on the codebook corresponding to each to-be-quantized data to obtain a code stream; A transceiver module, used for sending the code stream to a decoding end; Wherein, the processing module is also used for: In response to the specific codeword being an integer, directly determining the specific codeword as the quantized data; In response to the specific codeword being a non-integer, determining an index value corresponding to the specific codeword as the quantized data; wherein the codewords in the codebook respectively correspond to index values, and the index values ​​are integers.

20. A communication device, characterized in that: include: A processing module, used for receiving a code stream sent by an encoding end, and performing interval decoding on the code stream to obtain decoded data; The code stream is obtained by the encoding end after performing interval encoding on each quantized data based on the codebook corresponding to each to-be-quantized data, the quantized data is obtained based on a specific codeword, and the specific codeword is a codeword in the codebook corresponding to the to-be-quantized data that is closest to the to-be-quantized data; wherein, in response to the specific codeword being an integer, the quantized data is the specific codeword; in response to the specific codeword being a non-integer, the quantized data is an index value corresponding to the specific codeword; wherein, the codewords in the codebook respectively correspond to index values, and the index values ​​are integers; The processing module is further used to determine inverse quantized data based on the decoded data.

21. A communication device, characterized in that: The device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program stored in the memory so that the device performs the method as claimed in any one of claims 1 to 12, or the processor executes the computer program stored in the memory so that the device performs the method as claimed in any one of claims 13 to 18.

22. A communication device, characterized in that: include: processor and interface circuitry, wherein The interface circuit is used to receive code instructions and transmit them to the processor; The processor is used to run the code instructions to execute the method according to any one of claims 1 to 12, or is used to run the code instructions to execute the method according to any one of claims 13 to 18.

23. A computer-readable storage medium storing instructions, which, when executed, enable the method according to any one of claims 1 to 12 to be implemented, or, when executed, enable the method according to any one of claims 13 to 18 to be implemented.

Citation Information

Patent Citations

  • Depth neural network based vector quantization system and method

    CN106203624A

  • Speech recognition model training method and device, electronic equipment and storage medium

    CN115050355A