WO2024108449A1 - 一种信号量化方法、装置、设备及存储介质 - Google Patents

一种信号量化方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024108449A1
WO2024108449A1 PCT/CN2022/133839 CN2022133839W WO2024108449A1 WO 2024108449 A1 WO2024108449 A1 WO 2024108449A1 CN 2022133839 W CN2022133839 W CN 2022133839W WO 2024108449 A1 WO2024108449 A1 WO 2024108449A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
quantized
codebook
codeword
quantization
Prior art date
Application number
PCT/CN2022/133839
Other languages
English (en)
French (fr)
Inventor
王宾
李奕呈
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to CN202280005227.8A priority Critical patent/CN118401999A/zh
Priority to PCT/CN2022/133839 priority patent/WO2024108449A1/zh
Publication of WO2024108449A1 publication Critical patent/WO2024108449A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present disclosure relates to the field of communication technology, and in particular to a signal quantization method, device, equipment and storage medium.
  • audio applications have penetrated into every corner of people's work and life.
  • the linear scalar quantization method does not take into account the distribution characteristics of the data to be quantized, resulting in large quantization noise.
  • 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.
  • an embodiment of the present disclosure provides a signal quantization method, including:
  • the code stream is sent to a decoding end.
  • 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, 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.
  • 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.
  • an embodiment of the present disclosure provides a signal quantization method, including:
  • an embodiment of the present disclosure provides a communication device, including:
  • 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;
  • the transceiver module is used to send the code stream to the decoding end.
  • an embodiment of the present disclosure provides a communication device, including:
  • 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 processing module is further used to determine inverse quantized data based on the decoded data.
  • an embodiment of the present disclosure provides a communication device, which includes a processor.
  • the processor calls a computer program in a memory, the method described in any one of the first to second aspects is executed.
  • 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.
  • 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.
  • 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.
  • an embodiment of the present disclosure provides a computer-readable storage medium for storing instructions used by the above-mentioned network device.
  • the terminal device executes the method described in any one of the first to second aspects above.
  • 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.
  • 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.
  • 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.
  • 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.
  • FIG1 is a schematic diagram of the architecture of a communication system provided by an embodiment of the present disclosure.
  • FIGS. 2a-2d are schematic flow charts of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG3 is a schematic flow chart of a signal quantization method provided by yet another embodiment of the present disclosure.
  • FIG4 is a schematic flow chart of a signal quantization method provided by yet another embodiment of the present disclosure.
  • FIG5 is a schematic diagram of a flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG6 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG7 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG8 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG9 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG10 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG11 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG12 is a schematic flow chart of a signal quantization method provided by another embodiment of the present disclosure.
  • FIG13a is a flowchart of an execution method of an encoding end provided by an embodiment of the present disclosure
  • FIG13b is a flowchart of an execution method of a decoding end provided by an embodiment of the present disclosure
  • FIG. 13c is a comparison diagram of quantization noise when the audio data of a song is quantized using a quantization method of the present disclosure and a quantization method in the related art respectively, provided by an embodiment of the present disclosure;
  • FIG. 13d is a comparison diagram of quantization noise when the audio data of speech is quantized by using a quantization method of the present disclosure and a quantization method in the related art respectively provided by an embodiment of the present disclosure;
  • FIG13e is 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 related art, respectively, provided by an embodiment of the present disclosure;
  • FIG14 is a schematic diagram of the structure of a communication device provided by yet another embodiment of the present disclosure.
  • FIG15 is a schematic diagram of the structure of a communication device provided by yet another embodiment of the present disclosure.
  • FIG16 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
  • FIG. 17 is a schematic diagram of the structure of a chip provided by an embodiment of the present disclosure.
  • 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.
  • 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.
  • the words "if” and “if” as used herein may be interpreted as “at” or "when” or "in response to determination”.
  • 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.
  • Figure 1 is a schematic diagram of the architecture of a communication system provided in 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.
  • the number and form of devices shown in Figure 1 are only used 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.
  • the communication system shown in Figure 1 takes a network device 11 as an encoding end and a terminal device 12 as a decoding end as an example.
  • LTE long term evolution
  • 5G fifth generation
  • NR 5G new radio
  • the network device 11 in the embodiment of the present disclosure is an entity on the network side for transmitting or receiving signals.
  • 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.
  • eNB evolved NodeB
  • TRP transmission reception point
  • RRH Radio Remote Head
  • gNB next generation NodeB
  • the network device provided in the embodiment of the present disclosure may be composed of a central unit (CU) and a distributed unit (DU), wherein the CU may also be referred to as a control unit.
  • CU central unit
  • DU distributed unit
  • the CU-DU structure may be used to split the protocol layer of the network device, such as a 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.
  • the terminal device 12 in the disclosed embodiment 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), a user equipment (UE), a mobile station (MS), a mobile terminal device (MT), etc.
  • the UE may be a car with communication function, a smart car, a mobile phone (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 (smart grid), 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 embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the UE.
  • 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.
  • 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.
  • FIG2a is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG2 , the signal quantization method may include the following steps:
  • Step 201a Determine the codebook corresponding to the data to be quantized.
  • the codebooks corresponding to different to-be-quantized data may be the same or different.
  • 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.
  • the codewords in the codebook may correspond to index values respectively, and the index values are integers.
  • the codewords in different codebooks may correspond to the same or different index values.
  • 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.
  • 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.
  • 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.
  • 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.
  • codeword 2.4 can be determined as the specific codeword corresponding to data to be quantized 3.
  • Step 203a Determine the quantized data corresponding to the data to be quantized based on the specific codeword.
  • 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.
  • Step 205a Send the code stream to the decoding end.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 determined 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.
  • FIG2b is a flow chart of a signal quantization method provided by an embodiment of the present disclosure, and the method is executed by an encoding end.
  • the method shown in FIG2b may be a possible implementation of the above step 203a.
  • the method may include the following steps:
  • Step 201b In response to the specific codeword being an integer, directly determine the specific codeword as quantized data.
  • 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.
  • the codewords in the codebook each correspond to an index value, and the index value is an integer.
  • the quantized data obtained after the quantization process should all be integers so that subsequent encoding can be successful.
  • 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.
  • 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.
  • 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.
  • 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).
  • the subsequent decoding end performs the inverse quantization process, inverse quantization can be performed based on the index value.
  • the codebook corresponding to the data can be determined first, and then the corresponding codeword can be determined based on the index value in the codebook, 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.
  • 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.
  • the quantized data are all integers, thus ensuring the smooth execution of subsequent operations.
  • the encoding end 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.
  • 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.
  • the quantized data are all integers, thereby ensuring the smooth execution of subsequent operations.
  • FIG2c is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG2c, the signal quantization method may include the following steps:
  • 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.
  • 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.
  • 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.
  • 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.
  • 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
  • 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.
  • the first indication information and the second indication information may both be bit codes.
  • the first indication information may be "0, and the second indication information may be 1.
  • 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.
  • the encoding end 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.
  • 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.
  • FIG2d is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG2d , the signal quantization method may include the following steps:
  • Step 201d determine the index value corresponding to the specific codeword as the quantized data.
  • the difference between the embodiment of FIG. 2d and the embodiment of FIG. 2b above is that: in this 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. And, 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.
  • the encoding end will determine the index value corresponding to the specific codeword as the quantized data.
  • 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.
  • 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.
  • 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.
  • FIG3 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG3 , the signal quantization method may include the following steps:
  • Step 301 Generate at least one codebook.
  • a method for generating a codebook may include the following steps:
  • Step a select k audio data from an audio database as k initial code words.
  • the audio database may include at least one of historically collected audio data, historically sent audio data, and historically received audio data.
  • the above-mentioned “selecting k audio data from the audio database as k initial codewords” may include the following steps:
  • the first step is to randomly select an audio data from the audio database as the first initial codeword.
  • the second step is to select a second initial codeword from the audio database based on the first initial codeword.
  • the method of selecting the second initial codeword from the audio database based on the first initial codeword may include:
  • 1.
  • 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.
  • a second initial codeword is selected from the audio database based on the selection probability.
  • Step 3 Select a third initial codeword from the audio database based on the first initial codeword and the second initial codeword.
  • 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:
  • a selection probability can be set for each audio data based on the shortest distance corresponding to each audio data (i.e., 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.
  • a third initial codeword is selected from the audio database based on the selection probability.
  • 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.
  • 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:
  • the distance between each audio data in the audio database and each initial codeword is determined, and the shortest distance D(x) corresponding to each audio data is determined. That is, the distance D 1 (x) between each audio data in the audio database and the first initial codeword, the distance D 2 (x) between each audio data and the second initial codeword, and the distance D 3 (x) between each audio data in the audio database and the third initial codeword are determined, and min(D 1 (x), D 2 (x), D 3 (x)) is determined as the shortest distance D(x) corresponding to the audio data.
  • 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.
  • a third initial codeword is selected from the audio database based on the selection probability.
  • the selected first initial code word, second initial code word...kth initial code word can constitute the above-mentioned k initial code words.
  • 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.
  • the specific algorithm may include a K-Means algorithm.
  • 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.
  • 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.
  • 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).
  • FIG4 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG4 , the signal quantization method may include the following steps:
  • Step 401 Select k audio data from an audio database as k initial codewords.
  • 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.
  • steps 401 - 402 please refer to the above embodiment description.
  • 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.
  • 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).
  • FIG5 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. As shown in FIG5 , the signal quantization method may include the following steps:
  • Step 501 Determine the data to be quantified.
  • determining the data to be quantified may include the following steps:
  • 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.
  • the preprocessing may include: transforming the audio signal to be encoded from the time domain to the frequency domain.
  • 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).
  • 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).
  • Step 4 Determine the first data z(n) as the data to be quantized.
  • 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.
  • 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).
  • FIG6 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by an encoding end. The method shown in FIG6 may be a possible implementation of the above step 201a. As shown in FIG6, the method may include the following steps:
  • 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.
  • 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 z 1 (n).
  • Step 603 Input the second transformed signal into a context coding neural network to output context information corresponding to each second data z 1 (n), where the context information is used to determine a codebook corresponding to the first data z(n).
  • the context information may be a numerical value.
  • Step 604 Determine a codebook corresponding to each first data z(n) based on context information corresponding to each second data z 1 (n).
  • determining the codebook corresponding to each first data z(n) based on the context information corresponding to each second data z 1 (n) may include:
  • Step 1 first determine the corresponding codebook based on the context information corresponding to each second data z 1 (n).
  • different codebooks are each correspondingly provided with a value interval.
  • the codebook corresponding to the second data z 1 (n) may be: a codebook corresponding to the value interval in which the context information of the second data z 1 (n) is located.
  • codebook one corresponds to the value interval [0, 1)
  • codebook two corresponds to the value interval [1, 2)
  • codebook three corresponds to the value interval [2, 3
  • the context information of the second data z 1 (n) is 1.5
  • the context information is in the value interval [1, 2)
  • it can be determined that the codebook corresponding to the second data z 1 (n) is: codebook two.
  • Step 2 Determine the codebook corresponding to the second data z 1 (n) as: the codebook corresponding to the first data z(n) having the same position as the second data z 1 (n).
  • the codebook corresponding to a second data z 1 (n) is codebook 2
  • the second data z 1 (n) is located in the first column and third row of the second transformed signal
  • the first data z(n) having the same position as the second data z 1 (n) is the first data z(n) located in the first column and third row of the first transformed signal
  • the encoding end determines the context information corresponding to the codebook corresponding to each data to be quantized
  • 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.
  • 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.
  • 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).
  • FIG. 7 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG. 7 , the method may include the following steps:
  • Step 701 Receive a code stream sent by an encoding end, and perform interval decoding on the code stream to obtain decoded data.
  • Step 702 Determine inverse quantized data based on the decoded data.
  • 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.
  • steps 701 - 702 reference may be made to the above embodiment description.
  • 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.
  • 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).
  • 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.
  • 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.
  • FIG8 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG8 , the method may include the following steps:
  • 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.
  • 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.
  • step 801 For a detailed description of step 801, reference may be made to the above embodiment description.
  • 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.
  • 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).
  • 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.
  • 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.
  • FIG9 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG9 , the method may include the following steps:
  • Step 901 Determine the codebook used when encoding each encoded data based on context information.
  • Step 902 perform interval decoding on the encoded data based on the codebook.
  • steps 901 - 902 please refer to the above embodiment description.
  • 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.
  • 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).
  • 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.
  • 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.
  • FIG10 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG10 , the method may include the following steps:
  • Step 1001 Determine first indication information or second indication information corresponding to the decoded data from the bit stream;
  • Step 1002 In response to the decoded data corresponding to the first indication information, determine the decoded data as inverse quantized data;
  • 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 with the same index value as the decoded data as the inverse quantized data.
  • 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.
  • the decoded data "3" can be directly determined as the corresponding inversely quantized data.
  • the codebook used when the decoded data "4" is encoded can be first determined based on the context information corresponding to the decoded data "4".
  • 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".
  • steps 1001 - 1003 reference may be made to the above-mentioned embodiment description.
  • 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.
  • 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).
  • the decoded data can be inversely quantized to obtain data close to the data before quantization, 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.
  • 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 the 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.
  • FIG11 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG11 , the method may include the following steps:
  • Step 1101 Determine a codebook used when encoding the decoded data based on the context information
  • Step 1102 Determine a codeword in the codebook having the same index value as the decoded data as inverse quantized data.
  • steps 1101 - 1102 please refer to the above embodiment description.
  • 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.
  • 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).
  • 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.
  • 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.
  • FIG12 is a flow chart of a signal quantization method provided by an embodiment of the present disclosure. The method is executed by a decoding end. As shown in FIG12 , the method may include the following steps:
  • Step 1201 Perform noise filling, scale transformation and neural network decoding on the inverse quantized data.
  • 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.
  • 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).
  • 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.
  • 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.
  • Figure 13a is a flowchart of an execution method of an encoding end provided by an embodiment of the present disclosure.
  • the data of the audio library 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, and then y(n) and fabs(y(n)) are scaled to obtain the scaled coefficients z(n) and z 1 (n), z 1 (n) is processed by the context coding neural network to obtain the encoded context information, and under the guidance of the 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 yet 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 value of the codeword is
  • codebook is used as the codebook for quantization.
  • the specific process of quantization is:
  • Figure 13b is a flowchart of an execution method of a decoding end provided by an embodiment of the present disclosure. As shown in Figure 13b, the encoding end obtains the index through interval decoding, searches for its corresponding codeword, maps the index to the value of the codeword, and completes the inverse quantization process.
  • 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.
  • Figure 13c is a quantization noise comparison diagram when the audio data of a song is quantized using the quantization method of the present invention and the quantization method in the related art respectively, provided in an embodiment of the present disclosure
  • Figure 13d is a quantization noise comparison diagram when the audio data of speech is quantized using the quantization method of the present invention and the quantization method in the related art respectively, provided in an embodiment of the present disclosure
  • Figure 13e is a quantization noise comparison diagram when the audio data of music is quantized using the quantization method of the present invention and the quantization method in the related art respectively, provided in an embodiment of the present disclosure; wherein, the upper lines in Figures 13c, 13d, and 13e are the lines corresponding to the quantization noise when the audio data is quantized using the quantization method in the related art (i.e., linear scalar quantization), and the lower lines in Figures 13c, 13d, and 13e are the lines corresponding to the quantization noise when the audio data is quantized using the quantization method of the present invention.
  • the mean square error (MSE) value when quantizing using the quantization method of the present invention is smaller than the MSE value when quantizing using the quantization method in the related art, indicating that the present invention reduces the quantization noise.
  • 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.
  • FIG. 14 is a schematic diagram of the structure of a communication device provided by an embodiment of the present disclosure. As shown in FIG. 14 , the device may 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;
  • the transceiver module is used to send the code stream to the decoding end.
  • 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.
  • 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 determined 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.
  • the processing module is further configured to:
  • determining an index value corresponding to 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.
  • the device is further used for:
  • determining first indication information for the quantized data 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;
  • 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.
  • the codewords in the codebook respectively correspond to index values, and the index values are integers;
  • the processing module is further used for:
  • An index value corresponding to the specific codeword is determined as the quantized data.
  • the device is further used for:
  • At least one codebook is generated.
  • the device is further used for:
  • 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.
  • the device is further used for:
  • 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.
  • the specific algorithm includes a K-Means algorithm
  • the device is also used for:
  • the k initial codewords are calculated using the K-Means algorithm until convergence to obtain k calculated codewords.
  • the device is further used for:
  • the device is further used for:
  • Preprocessing the audio signal to be encoded to obtain a time-frequency signal 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;
  • the first data z(n) is determined as the data to be quantized.
  • the processing module is further configured to:
  • the second transform domain signal includes m ⁇ n second transform domain data fabs(y(n)); wherein fabs represents an absolute value;
  • a codebook corresponding to each first data z(n) is determined based on the context information.
  • the bitstream further includes context information corresponding to a codebook corresponding to each to-be-quantized data.
  • the code stream also includes first indication information or second indication information corresponding to each quantized data.
  • FIG. 15 is a schematic diagram of the structure of a communication device provided by an embodiment of the present disclosure. As shown in FIG. 15 , the device may 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 processing module is further used to determine inverse quantized data based on the decoded data.
  • 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.
  • 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).
  • the device is further used for:
  • 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.
  • the processing module is further configured to:
  • the encoded data is interval-decoded based on the codebook.
  • the processing module is further configured to:
  • a codebook used when the decoded data is 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.
  • the processing module is further configured to:
  • a codeword in the codebook having the same index value as the decoded data is determined as the inverse quantized data.
  • the device is further used for:
  • the inverse quantized data is subjected to noise filling, scale transformation and neural network decoding.
  • FIG 16 is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of the present application.
  • the communication device 1600 can 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 can be used to implement the method described in the above method embodiment, and the details can be referred to the description in the above method embodiment.
  • 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.
  • 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
  • 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.
  • 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.
  • data may also be stored in the memory 1602.
  • the communication device 1600 and the memory 1602 may be provided separately or integrated together.
  • 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.
  • 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.
  • the processor 1601 may include a transceiver for implementing the receiving and sending functions.
  • 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.
  • 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.
  • 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 (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
  • CMOS complementary metal oxide semiconductor
  • NMOS N-type metal oxide semiconductor
  • PMOS P-type metal oxide semiconductor
  • BJT bipolar junction transistor
  • BiCMOS bipolar CMOS
  • SiGe silicon germanium
  • GaAs gallium arsenide
  • 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 by FIG. 16.
  • the communication device may be an independent device or may be part of a larger device.
  • the communication device may be:
  • the IC set may also include a storage component for storing data and computer programs;
  • ASIC such as modem
  • the communication device can be a chip or a chip system
  • the communication device can be a chip or a chip system
  • the schematic diagram of the chip structure shown in Figure 17 includes a processor 1701 and an interface 1702.
  • the number of processors 1701 can be one or more, and the number of interfaces 1702 can be multiple.
  • the chip further includes a memory 1703, and the memory 1703 is used to store necessary computer programs and data.
  • 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.
  • 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.
  • the computer program product includes one or more computer programs.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer program can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer program can 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 can be any available medium that can be accessed by a computer 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 (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a high-density digital video disc (DVD)
  • DVD high-density digital video disc
  • SSD solid state disk
  • 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.
  • 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”.
  • the corresponding relationships shown in the tables in the present application can be configured or predefined.
  • the values of the signals in the tables are only examples and can be configured as other values, which are not limited by the present application.
  • the corresponding relationships shown in some rows may not be configured.
  • appropriate deformation adjustments can be made based on the above tables, such as splitting, merging, etc.
  • the names of the parameters shown in the titles in the above tables may also use other names that can be understood by the communication device, and the values or representations of the parameters may also be other values or representations that can be understood by the communication device.
  • other data structures may also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables or hash tables.
  • the predefined in the present application may be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本公开提出一种信号量化方法、装置、设备及存储介质,方法包括:确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;基于所述特定码字确定所述待量化数据对应的量化后的数据;基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;将所述码流发送至解码端。本公开的量化方法的量化噪声较小。

Description

一种信号量化方法、装置、设备及存储介质 技术领域
本公开涉及通信技术领域,尤其涉及信号量化方法、装置、设备及存储介质。
背景技术
随着互联网及数字多媒体技术的发展,音频应用已经深入到人们工作、生活的各个角落。其中,在音频应用的过程中,通常需要传输音频信号。以及,为了确保音频信号的传输速率,通常需要先对音频信号进行编码,再传输编码后的音频信号。其中,在对音频信号进行编码过程中,还涉及到对音频数据进行量化。
相关技术中,会采用线性标量量化的方式来对音频数据进行量化。
但是,相关技术中,线性标量量化的方式没有考虑待量化数据本身的分布特征,导致量化噪声较大。
发明内容
本公开提出的信号量化方法、装置、设备及存储介质,以解决相关技术中的量化方法的量化噪声较大的技术问题。
第一方面,本公开实施例提供一种信号量化方法,包括:
确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;
从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;
基于所述特定码字确定所述待量化数据对应的量化后的数据;
基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;
将所述码流发送至解码端。
本公开中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据,并基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;将该码流发送至解码端。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
第二方面,本公开实施例提供一种信号量化方法,包括:
接收编码端发送的码流,并对所述码流进行区间解码得到解码后的数据;
基于所述解码后的数据确定逆量化后的数据。
第三方面,本公开实施例提供一种通信装置,包括:
处理模块,用于确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;
所述处理模块,还用于从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;
所述处理模块,还用于基于所述特定码字确定所述待量化数据对应的量化后的数据;
所述处理模块,还用于基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;
收发模块,用于将所述码流发送至解码端。
第四方面,本公开实施例提供一种通信装置,包括:
处理模块,用于接收编码端发送的码流,并对所述码流进行区间解码得到解码后的数据;
所述处理模块,还用于基于所述解码后的数据确定逆量化后的数据。
第五方面,本公开实施例提供一种通信装置,该通信装置包括处理器,当该处理器调用存储器中的计算机程序时,执行上述第一方面至第二方面任一方面所述的方法。
第六方面,本公开实施例提供一种通信装置,该通信装置包括处理器和存储器,该存储器中存储有计算机程序;所述处理器执行该存储器所存储的计算机程序,以使该通信装置执行上述第一方面至第二方面任一方面所述的方法。
第七方面,本公开实施例提供一种通信装置,该装置包括处理器和接口电路,该接口电路用于接收代码指令并传输至该处理器,该处理器用于运行所述代码指令以使该装置执行上述第一方面至第二方面任一方面所述的方法。
第八方面,本公开实施例提供一种通信系统,该系统包括第三方面至第四方面任一方面所述的通信装置,或者,该系统包括第五方面所述的通信装置,或者,该系统包括第六方面所述的通信装置,或者,该系统包括第七方面所述的通信装置。
第九方面,本公开实施例提供一种计算机可读存储介质,用于储存为上述网络设备所用的指令,当所述指令被执行时,使所述终端设备执行上述第一方面至第二方面任一方面所述的方法。
第十方面,本公开还提供一种包括计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面任一方面所述的方法。
第十一方面,本公开提供一种芯片系统,该芯片系统包括至少一个处理器和接口,用于支持网络设备实现第一方面至第二方面任一方面所述的方法所涉及的功能,例如,确定或处理上述方法中所涉及的数据和信息中的至少一种。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存源辅节点必要的计算机程序和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
第十二方面,本公开提供一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面任一方面所述的方法。
附图说明
本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本公开实施例提供的一种通信系统的架构示意图;
图2a-2d为本公开另一个实施例所提供的信号量化方法的流程示意图;
图3为本公开再一个实施例所提供的信号量化方法的流程示意图;
图4为本公开又一个实施例所提供的信号量化方法的流程示意图;
图5为本公开另一个实施例所提供的信号量化方法的流程示意图;
图6为本公开另一个实施例所提供的信号量化方法的流程示意图;
图7为本公开另一个实施例所提供的信号量化方法的流程示意图;
图8为本公开另一个实施例所提供的信号量化方法的流程示意图;
图9为本公开另一个实施例所提供的信号量化方法的流程示意图;
图10为本公开另一个实施例所提供的信号量化方法的流程示意图;
图11为本公开另一个实施例所提供的信号量化方法的流程示意图;
图12为本公开另一个实施例所提供的信号量化方法的流程示意图;
图13a为本公开实施例所提供的一种编码端的执行方法的流程框图;
图13b为本公开实施例所提供的一种解码端的执行方法的流程框图;
图13c为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别对歌曲的音频数据量化时的量化噪声对比图;
图13d为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别 对语音的音频数据量化时的量化噪声对比图;
图13e为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别对音乐的音频数据量化时的量化噪声对比图;
图14为本公开再一个实施例所提供的通信装置的结构示意图;
图15为本公开再一个实施例所提供的通信装置的结构示意图;
图16是本申请实施例提供的一种通信装置的结构示意图;
图17为本公开一个实施例所提供的一种芯片的结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开实施例的一些方面相一致的装置和方法的例子。
在本公开实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开实施例。在本公开实施例和所附权利要求书中所使用的单数形式的“一种”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本公开实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信号彼此区分开。例如,在不脱离本公开实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”及“若”可以被解释成为“在……时”或“当……时”或“响应于确定”。
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的要素。下面通过参考附图描述的实施例是示例性的,旨在用于解释本公开,而不能理解为对本公开的限制。
为了便于理解,首先介绍本申请涉及的术语。
1、量化
在数字信号处理领域,量化指将信号的连续取值(或者大量可能的离散取值)近似为有限多个(或较少的)离散值的过程。
为了更好的理解本公开实施例公开的一种信号量化方法,下面首先对本公开实施例适用的通信系统进行描述。
请参见图1,图1为本公开实施例提供的一种通信系统的架构示意图。该通信系统可包括但不限于编码端和解码端,其中,该编码端可以为终端设备或网络设备,该解码端也可以为终端设备或网络设备。以及,图1所示的设备数量和形态仅用于举例并不构成对本公开实施例的限定,实际应用中可以包括一个或一个以上的编码端,或者一个或一个以上的解码端。其中,图1所示的通信系统以包括一个作为编码端的网络设备11、一个作为解码端的终端设备12为例。
需要说明的是,本公开实施例的技术方案可以应用于各种通信系统。例如:长期演进(long term evolution,LTE)系统、第五代(5th generation,5G)移动通信系统、5G新空口(new radio,NR)系统,或者其他未来的新型移动通信系统等。
本公开实施例中的网络设备11是网络侧的一种用于发射或接收信号的实体。例如,网络设备11可以为演进型基站(evolved NodeB,eNB)、发送接收点(transmission reception point,TRP)、射频拉远头(Radio Remote Head,RRH)、NR系统中的下一代基站(next generation NodeB,gNB)、其他未来移动通信系统中的基站或无线保真(wireless fidelity,WiFi)系统中的接入节点等。本公开的实施例对网络设备所采用的具体技术和具体设备形态不做限定。本公开实施例提供的网络设备可以是由集中单元(central unit,CU)与分布式单元(distributed unit,DU)组成的,其中,CU也可以称为控制单元(control unit),采用CU-DU的结构可以将网络设备,例如基站的协议层拆分开,部分协议层的 功能放在CU集中控制,剩下部分或全部协议层的功能分布在DU中,由CU集中控制DU。
本公开实施例中的终端设备12可以是用户侧的一种用于接收或发射信号的实体,如手机。终端设备也可以称为终端设备(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端设备(mobile terminal,MT)等。UE可以是具备通信功能的汽车、智能汽车、手机(mobile phone)、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端设备、无人驾驶(self-driving)中的无线终端设备、远程手术(remote medical surgery)中的无线终端设备、智能电网(smart grid)中的无线终端设备、运输安全(transportation safety)中的无线终端设备、智慧城市(smart city)中的无线终端设备、智慧家庭(smart home)中的无线终端设备等等。本公开的实施例对UE所采用的具体技术和具体设备形态不做限定。
可以理解的是,本公开实施例描述的通信系统是为了更加清楚的说明本公开实施例的技术方案,并不构成对于本公开实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本公开实施例提供的技术方案对于类似的技术问题,同样适用。
下面参考附图对本公开实施例所提供的信号量化方法、装置、设备及存储介质进行详细描述。
需要说明的是,本公开中,任一个实施例提供的信号量化方法可以单独执行,实施例中任一实现方式也可以单独执行,或是结合其他实施例,或其他实施例中的可能的实现方法一起被执行,还可以结合相关技术中的任一种技术方案一起被执行。
图2a为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图2所示,该信号量化方法可以包括以下步骤:
步骤201a、确定待量化数据对应的码本。
其中,在本公开的一个实施例之中,不同的待量化数据对应的码本可以相同或不同。以及,该码本可以包括k个码字,k为正整数,该k的值可以是预先设置的,例如,k可以等于3。该码本中的码字可以为整数或小数。
以及,在本公开的一个实施例之中,码本中的码字可以分别对应有索引值,该索引值为整数。其中,不同码本中的码字可以对应相同或不同的索引值。
示例的,如码本一可以包括三个码字,分别为:1、2.3、3,码本一包括的三个码字1、2.3、3对应的索引值可以为:0、1、2;码本二可以包括三个码字,分别为:2、3、3.5,码本二包括的三个码字2、3、3.5对应的索引值也可以为:0、1、2。
需要说明的是,在本公开的一个实施例之中,该码本可以是基于音频数据库预先生成的,该音频数据库可以包括历史采集过的音频数据、历史发送过的音频数据、历史接收过的音频数据中的至少一类。以及,关于如何生成码本的方法会在后续实施例进行说明。以及,关于具体如何确定待量化数据对应的码本也会在后续实施例进行说明。
步骤202a、从码本中确定特定码字,该特定码字为码本中与待量化数据距离最近的码字。
其中,在本公开的一个实施例之中,上述的“数据距离最近”可以理解为:差值绝对值最小,或者,取值较为接近。
示例的,假设一待量化数据为:3,该待量化数据对应的码本包括三个码字,该三个码字分别为:1.1、2.3、2.4。其中,由于码字2.4与待量化数据3的差值绝对值最小,因此,可以将码字2.4确定为待量化数据3对应的特定码字。
步骤203a、基于特定码字确定待量化数据对应的量化后的数据。
其中,关于如何基于特定码字确定待量化数据对应的量化后的数据会在后续实施例进行介绍。
步骤204a、基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流。
步骤205a、将该码流发送至解码端。
在本公开的一个实施例之中,编码端通过将该码流发送至解码端,以便解码端后续可以通过对该码流进行解码、逆量化等操作来还原出原始的音频信号,从而实现音频信号的传输。
以及,由步骤203a可知,在本公开的一个实施例之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,可以基于该量化后的数据逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
综上所述,本公开提供的信号量化方法之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据,并基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;将该码流发送至解码端。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图2b为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,其中,该图2b所示的方法可以为上述步骤203a的一种可能的实现方式,如图2b所示,该方法可以包括以下步骤:
步骤201b、响应于特定码字为整数,直接将特定码字确定为量化后的数据。
步骤202b、响应于特定码字为非整数,将特定码字所对应的索引值确定为量化后的数据。
其中,在本公开的一个实施例之中,码本中的码字分别对应有索引值,该索引值为整数。
以及,需要说明的是,在本公开的一个实施例之中,量化处理后所得到的量化后的数据应当均为整数,以便后续可以成功编码。但是,由于码本中的码字可能为整数,也可能为小数,因此所确定出的特定码字也可能为整数或小数,基于此,则需要执行上述步骤201b-步骤202b,以确保最终基于特定码字所得到的量化后的数据均为整数。
示例的,在本公开的一个实施例之中,假设待量化数据“3”对应的特定码字为:2,待量化数据“4”对应的特定码字为:3.5;待量化数据“3”对应的特定码字“2”所对应的索引值为:1;待量化数据“4”对应的特定码字“3.5”所对应的索引值为:2;其中,由于待量化数据“3”对应的特定码字为整数,因此可以直接将待量化数据“3”所对应的特定码字“2”,确定为待量化数据“3”的量化后的数据;以及,由于待量化数据“4”对应的特定码字为非整数,因此,需要将待量化数据“4”对应的特定码字“3.5”所对应的索引值“2”,确定为待量化数据“4”的量化后的数据。
进一步地,在本公开的一个实施例之中,由于该特定码字为:待量化数据对应码本中与待量化数据距离最近的码字。因此,当编码端直接将特定码字确定为量化后的数据时,所得到的量化后的数据实质为:与量化前的数据(即前述的待量化数据)接近的码字。由此,后续解码端进行逆量化过程时,可以直接基于量化后的数据进行逆量化,也即是,可以直接将量化后的数据作为逆量化后的数据,则所得到的逆量化后的数据是接近于量化前的数据的。
或者,当编码端将特定码字所对应的索引值确定为量化后的数据时,所得到的量化后的数据实质为:与量化前的数据(即前述的待量化数据)接近的码字所对应的索引值。基于此,后续解码端进行逆量化过程时,可以基于该索引值进行逆量化。具体的,可以先确定出该数据对应的码本,再在该码本中基于该索引值确定出对应的码字,并将该码字作为逆量化后的数据,则所得到的逆量化后的数据也是接近于量化前的数据的。
由前述内容可知,无论是执行上述步骤201b或是执行步骤202b,均可确保后续解码端逆量化时所得到的逆量化后的数据是接近于量化前的数据的,从而使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
此外,图2b对应的实施例中还可确保量化后的数据均为整数,则确保了后续操作的顺利执行。
综上所述,本公开提供的信号量化方法之中,响应于特定码字为整数,编码端会直接将特定码字确定为量化后的数据;响应于特定码字为非整数,编码端会将特定码字所对应的索引值确定为量化后的数据。由此可知,本公开中,是基于特定码字(即取值与待量化数据接近的码字)确定量化后的数据的,则量化噪声较小。并且,采用本公开的方法量化时,还可确保量化后的数据均为整数,则确保了后续操作的顺利执行。
图2c为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图2c所示,该信号量化方法可以包括以下步骤:
步骤201c、响应于直接将特定码字确定为量化后的数据,针对量化后的数据确定第一指示信息,第一指示信息用于指示:量化后的数据为码字。
步骤202c、响应于将特定码字所对应的索引值确定为量化后的数据,针对量化后的数据确定第二指示信息,第二指示信息用于指示:量化后的数据为索引值。
其中,参考上述图2b实施例可知,当待量化数据对应的特定码字不同时,对该待量化数据的量化方法也会有所不同,而当量化方法不同时,解码端所执行的逆量化过程也会对应不同。基于此,在本公开的一个实施例之中,可以针对各个量化后的数据确定指示信息,该指示信息可以用于指示该量化后的数据所对应的量化方式,以便确保解码端后续对数据进行逆量化时,可以基于各个数据对应的指示信息来进行对应的逆量化操作,以此确保后续逆量化过程的准确性,降低量化噪声。
具体的,在本公开的一个实施例之中,若上述编码端量化时是直接将特定码字确定为量化后的数据的,则可以针对该量化后的数据确定第一指示信息,该第一指示信息可以用于指示:量化后的数据为码字,则后续解码端对该量化后的数据进行逆量化时,可以基于该第一指示信息的指示执行对应的逆量化操作,即:直接将该量化后的数据作为逆量化后的数据。或者,若上述编码端量化时是将特定码字所对应的索引值确定为量化后的数据的,则可以针对该量化后的数据确定第二指示信息,该第二指示信息用于指示:量化后的数据为索引值,则后续解码端对该量化后的数据进行逆量化时,可以基于该第二指示信息的指示执行对应的逆量化操作,即:先确定该量化后的数据对应的码本,再将该码本中索引值与该量化后的数据相同的码字确定为逆量化后的数据。由此可以确保解码端所执行的逆量化操作均是与量化操作对应的,进而确保解码端能够准确地逆量化出数据。
进一步地,在本公开的一个实施例之中,上述的第一指示信息和第二指示信息可以均为比特码。例如,第一指示信息可以为“0,第二指示信息可以为1。
此外,需要说明的是,在本公开的一个实施例之中,当编码端针对量化后的数据确定出第一指示信息或第二指示信息后,后续编码端通过区间编码得到码流时(即上述步骤204a),可以在该码流中包括各个量化后的数据对应的第一指示信息或第二指示信息,以便后续解码端在对数据进行逆量化处理时,可以基于该数据对应的第一指示信息或第二指示信息来进行对应的逆量化处理,确保逆量化处理的准确性,降低量化噪声。
综上所述,本公开提供的信号量化方法之中,响应于编码端直接将特定码字确定为量化后的数据,该编码端会针对量化后的数据确定第一指示信息,该第一指示信息用于指示:量化后的数据为码字;响应于编码端将特定码字所对应的索引值确定为量化后的数据,该编码端会针对量化后的数据确定第二指示信息,该第二指示信息用于指示:量化后的数据为索引值。由此可知,本公开之中,编码端会针对各个量化后的数据确定指示信息,该指示信息用于指示对该量化后的数据所对应的量化方式,以便确保解码端后续对数据进行逆量化时,可以基于各个数据对应的指示信息来进行对应的逆量化过程,以确保后续逆量化过程的准确性,降低量化噪声。
图2d为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图2d所示,该信号量化方法可以包括以下步骤:
步骤201d、将特定码字所对应的索引值确定为量化后的数据。
其中,图2d的实施例与上述图2b的实施例的区别在于:本实施例中不再判定特定码字是否为整数,而是统一将待量化数据的特定码字对应的索引值确定为量化后的数据。以及,后续编码端进行逆量化过程时,也是统一确定数据对应的码本,并将该码本中与索引值对应的码字确定为逆量化后的数据,由此,不但可以确保量化后的数据均为整数,确保解码端能够准确地逆量化出数据,且还省略了解码端的判断特定码字是否为整数的步骤,提升了量化效率,同时也无需再传输第一指示信息和第二指示信息,节省了信令开销。
综上所述,本公开提供的信号量化方法之中,编码端会将特定码字所对应的索引值确定为量化后的数据。由此可知,本公开中,是基于特定码字(即取值与待量化数据接近的码字)确定量化后的数据的,则量化噪声较小。并且,采用本公开的方法量化时,还确保了量化后的数据均为整数,则保证了后续操作的顺利执行,以及确保了解码端能够准确地逆量化出数据。同时省略了解码端的判断特定码字是否为整数的步骤,提升了量化效率,并且也无需再传输第一指示信息和第二指示信息,节省了信令开销。
图3为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图3所示,该信号量化方法可以包括以下步骤:
步骤301、生成至少一个码本。
其中,在本公开的一个实施例之中,生成一个码本的方法可以包括以下步骤:
步骤a、从音频数据库中选择k个音频数据作为k个初始码字。
其中,在本公开的一个实施例之中,该音频数据库可以包括历史采集过的音频数据、历史发送过的音频数据、历史接收过的音频数据中的至少一类。
以及,在本公开的一个实施例之中,上述的“从音频数据库中选择k个音频数据作为k个初始码字”可以包括以下步骤:
第一步、从音频数据库中随机选择一音频数据作为第一个初始码字。
第二步、基于第一个初始码字从音频数据库中选择出第二个初始码字。
其中,在本公开的一个实施例之中,该基于第一个初始码字从音频数据库中选择出第二个初始码字的方法可以包括:
先确定音频数据库中的各个音频数据与第一个初始码字之间的距离D(x)。其中,该距离D(x)可以为音频数据与第一个初始码字之间的差值绝对值。示例的,假设所选择的第一个初始码字为:4,若音频数据为:5,则该音频数据与第一个初始码字之间的距离D(x)=|5-4|=1。
再基于各个音频数据与第一个初始码字之间的距离D(x),为各个音频数据设置选择概率。其中,该选择概率与D(x)呈正相关。也即是,当音频数据与该第一初始码字之间的距离D(x)越大时,则为该音频数据设置的选择概率应该越大。
之后,再基于选择概率从音频数据库中再选择出第二个初始码字。
第三步、基于第一个初始码字和第二个初始码字从音频数据库中选择出第三个初始码字。
其中,在本公开的一个实施例之中,该基于第一个初始码字和第二个初始码字从音频数据库中选择出第三个初始码字的方法可以包括:
先确定音频数据库中的每个音频数据与各个初始码字之间的距离,并确定出每个音频数据对应的最短距离D(x)。也即是,确定音频数据库中的每个音频数据与第一个初始码字之间的距离D 1(x),以及与第二个初始码字之间的距离D 2(x),并将min(D 1(x),D 2(x))确定为该音频数据对应的最短距离D(x)。示例的,假设第一个初始码字为4,第二个初始码字为7,若音频数据为5,则该音频数据与第一个初始码字之间的距离为D 1(x)=|5-4|=1,与第二个初始码字之间的距离为D 2(x)=|5-7|=2,则D(x)=min(D 1(x),D 2(x))=1。
之后,可以基于各个音频数据对应的最短距离(即:D(x)),为各个音频数据设置选择概率。其中,该选择概率与D(x)呈正相关。也即是,当音频数据对应的最短距离D(x)越大时,则为该音频数据设置 的选择概率应该越大。
最后,再基于选择概率从音频数据库中再选择出第三个初始码字。
第四步、基于第一个初始码字、第二个初始码字、第三个初始码字从音频数据库中选择出第四个初始码字。
其中,在本公开的一个实施例之中,该基于第一个初始码字、第二个初始码字、第三个初始码字从音频数据库中选择出第四个初始码字的方法可以包括:
先确定音频数据库中的每个音频数据与各个初始码字之间的距离,并确定出每个音频数据对应的最短距离D(x)。也即是,确定音频数据库中的每个音频数据与第一个初始码字之间的距离D 1(x),与第二个初始码字之间的距离D 2(x),以及与第三个初始码字之间的距离D 3(x),并将min(D 1(x),D 2(x),D 3(x))确定为该音频数据对应的最短距离D(x)。示例的,假设第一个初始码字为4,第二个初始码字为7,第三个初始码字为1,若音频数据为5,则该音频数据与第一个初始码字之间的距离为D 1(x)=|5-4|=1,与第二个初始码字之间的距离为D 2(x)=|5-7|=2,与第三个初始码字之间的距离为D 3(x)=|5-1|=4,则D(x)=min(D 1(x),D 2(x),D 3(x))=1。
之后,可以基于各个音频数据对应的最短距离(即:D(x)),为各个音频数据设置选择概率。其中,该选择概率与D(x)呈正相关。也即是,当音频数据对应的最短距离D(x)越大时,则为该音频数据设置的选择概率应该越大。
最后,再基于选择概率从音频数据库中再选择出第三个初始码字。
以此类推,直至选择出第k个初始码字。
其中,所选择出的第一个初始码字、第二个初始码字.....第k个初始码字即可组成上述的k个初始码字。
步骤b、利用特定算法对k个初始码字进行计算,得到k个计算后的码字,基于k个计算后的码字构成一个码本。
其中,在本公开的一个实施例之中,该特定算法可以包括K-Means算法。以及,利用特定算法对k个初始码字进行计算可以包括:利用K-Means算法对k个初始码字进行计算直至收敛,以得到k个计算后的码字。
综上所述,本公开提供的信号量化方法之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图4为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图4所示,该信号量化方法可以包括以下步骤:
步骤401、从音频数据库中选择k个音频数据作为k个初始码字。
步骤402、利用特定算法对所述k个初始码字进行计算,得到k个计算后的码字,基于k个计算后的码字构成一个码本;其中,计算后的码字均为小数。
关于步骤401-402的详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。 基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图5为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,如图5所示,该信号量化方法可以包括以下步骤:
步骤501、确定待量化数据。
其中,上述的“确定待量化数据”可以包括以下步骤:
步骤1、对待编码的音频信号进行预处理得到时频信号,所述时域信号包括m×n个时域数据x(n),m和n均为正整数,例如m可以为16,n可以为64。
其中,该预处理可以包括:将待编码的音频信号由时域变换到频域。
步骤2、将时域信号输入至编码神经网络以输出第一变换域信号,第一变换域信号包括m×n个第一变换域数据y(n)。
步骤3、对第一变换域信号进行尺度变换得到第一变换后的信号,第一变换后的信号包括m×n个尺度变换后的第一数据z(n)。
步骤4、将第一数据z(n)确定为待量化数据。
综上所述,本公开提供的信号量化方法之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图6为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由编码端执行,该图6所示的方法可以为上述步骤201a的一种可能的实现方式,如图6所示,该方法可以包括以下步骤:
步骤601、基于第一变换域信号确定第二变换域信号,该第二变换域信号包括m×n个第二变换域数据fabs(y(n));其中,fabs表示取绝对值。
步骤602、将第二变化域信号进行尺度变换得到第二变换后的信号,该第二变换后的信号包括m×n个尺度变换后的第二数据z 1(n)。
步骤603、将第二变换后的信号输入至上下文编码神经网络以输出各个第二数据z 1(n)对应的上下文信息,上下文信息用于确定第一数据z(n)对应的码本。
其中,在本公开的一个实施例之中,该上下文信息可以为一数值。
步骤604、基于各个第二数据z 1(n)对应的上下文信息确定各个第一数据z(n)对应的码本。
具体的,在本公开的一个实施例之中,基于各个第二数据z 1(n)对应的上下文信息确定各个第一数据z(n)对应的码本可以包括:
步骤一、先基于各个第二数据z 1(n)对应的上下文信息确定出对应的码本。
具体的,在本公开的一个实施例之中,不同码本均对应设置有一取值区间。其中,第二数据z 1(n)对应的码本可以为:第二数据z 1(n)的上下文信息位于的取值区间所对应的码本。
示例的,假设码本一对应取值区间[0,1),码本二对应取值区间[1,2),码本三对应取值区间[2,3),此时,若第二数据z 1(n)的上下文信息为1.5,则该上下文信息位于取值区间[1,2)中,则可以确 定该第二数据z 1(n)对应的码本为:码本二。
步骤二、将第二数据z 1(n)对应的码本确定为:与该第二数据z 1(n)具备相同位置的第一数据z(n)对应的码本。
示例的,假设通过上述步骤一确定出某第二数据z 1(n)对应的码本为:码本二,且该第二数据z 1(n)位于第二变换后的信号的第一列第三行,此时,与该第二数据z 1(n)具备相同位置的第一数据z(n)为:位于第一变换后的信号的第一列第三行的第一数据z(n),则可以确定该第一数据z(n)对应的码本为:码本二。
此外,还需要说明的是,在本公开的一个实施例之中,当编码端确定出各个待量化数据对应的码本所对应的上下文信息后,后续编码端通过区间编码得到码流时(即上述步骤204a),可以在该码流中包括各个待量化数据对应的码本所对应的上下文信息,以便后续解码端在进行解码和逆量化时,可以基于该上下文信息确定出数据对应的码本,再基于该码本对数据进行解码和逆量化。
综上所述,本公开提供的信号量化方法之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图7为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图7所示,该方法可以包括以下步骤:
步骤701、接收编码端发送的码流,并对该码流进行区间解码得到解码后的数据。
步骤702、基于解码后的数据确定逆量化后的数据。
其中,在本公开的一个实施例之中,该解码后的数据实质为前述的编码端所得到的量化后的数据,也即是,该解码后的数据实质为:该解码后的数据对应的码本中与该解码后的数据距离最近的码字,或者该码字对应的索引值。其中,解码后的数据对应的码本也即为:量化后的数据对应的码本,或者,前述的待量化数据对应的码本。
此外,关于步骤701-702的详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图8为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图8所示,该方法可以包括以下步骤:
步骤801、解析码流以确定各个解码后的数据对应的上下文信息;该上下文信息用于确定各个解码后的数据在被编码时所采用的码本。
在本公开的一个实施例之中,解码后的数据在被编码时所采用的码本可以理解为:量化后的数据对应的码本,或者,前述的待量化数据对应的码本。
以及,关于步骤801的详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图9为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图9所示,该方法可以包括以下步骤:
步骤901、基于上下文信息确定各个编码后的数据在被编码时所采用的码本。
步骤902、基于码本对编码后的数据进行区间解码。
其中,关于步骤901-902的详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图10为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图10所示,该方法可以包括以下步骤:
步骤1001、从所述码流中确定所述解码后的数据对应的第一指示信息或第二指示信息;
步骤1002、响应于所述解码后的数据对应的是第一指示信息,将所述解码后的数据确定为逆量化后的数据;
步骤1003、响应于所述解码后的数据对应的是第二指示信息,基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本,将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
示例的,在本公开的一个实施例之中,假设解码后的数据包括:3和4,其中,解码后的数据“3”对应第一指示信息,解码后的数据“4”对应第二指示信息。此时,在对解码后的数据“3”进行逆量化时,可以直接将解码后的数据“3”确定为对应的逆量化后的数据。以及,在对解码后的数据“4”进行逆量化时,可以先基于解码后的数据“4”对应的上下文信息确定出解码后的数据“4”在被编码时所采用的码本,例如,确定出的该码本所包括的三个码字分别为:1.1、2.3、3.4,其中,码字1.1对应的索引值为“2”,码字2.3对应的索引值为“3”,码字3.4对应的索引值为“4”,则码字3.4对应的索引值与该解码后的数据“4”相同,因此可以将码字3.4确定为解码后的数据“4”对应的逆量化后的数据。
以及,关于步骤1001-1003的其他详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从 而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图11为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图11所示,该方法可以包括以下步骤:
步骤1101、基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本;
步骤1102、将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
其中,关于步骤1101-1102的详细介绍可以参考上述实施例描述。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
图12为本公开实施例所提供的一种信号量化方法的流程示意图,该方法由解码端执行,如图12所示,该方法可以包括以下步骤:
步骤1201、对逆量化后的数据进行噪声填充、尺度变换和神经网络解码。
综上所述,本公开提供的信号量化方法之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
以下对本公开的方法进行示例介绍。
其中,图13a为本公开实施例所提供的一种编码端的执行方法的流程框图。如图13a所示,首先将音频库的数据通过预处理后得到时频系数x(n),将x(n)作为基础编码神经网络的输入,得到基础神经网络的变换域系数y(n),而后对y(n)和fabs(y(n))分别进行尺度变换得到尺度变换后的系数z(n)和z 1(n),z 1(n)经过上下文编码神经网络的处理,获得编码后的上下文信息,并在该信息的指导下得到对应基础部分区间编码的码本,该码本的码字数量与原方案的相同,码字的值尚未确定,将所有数据都分配到对应的码本之后,设码本包含的码字数量为k,对每个码本包含的数据集使用k-means++聚类算法确定码字的值:
1、在数据集中随机选择一个样本作为第一个初始化码字;
2、对于数据集中的每一个点x,计算它与最近聚类中心(指已选择的聚类中心)的距离D(x)
3、选择一个新的数据点作为新的聚类中心,选择的原则是:D(x)较大的点,被选取作为聚类中心的概率较大
4、重复2、3步直至选出k个码字;
5、对k个码字使用K-Means算法直至收敛获得最后的码本。
最后用该码本作为量化所使用的码本,量化的具体流程为:
对于待编码的数据,查找码本中与其距离最近的码字,并将其映射为该码字的索引,用该索引值作 为区间编码的输入。
图13b为本公开实施例所提供的一种解码端的执行方法的流程框图。如图13b所示,编码端通过区间解码得到的索引,查找其对应码字,将索引映射为码字的值,完成逆量化的过程。
本公开旨在解决相关技术没有考虑待量化数据分布的问题,通过对音频数据使用kmeans++聚类算法来获得聚类中心,代替原来没有考虑数据分布的聚类中心,形成一套更能降低量化噪声的方案。
进一步地,图13c为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别对歌曲的音频数据量化时的量化噪声对比图,图13d为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别对语音的音频数据量化时的量化噪声对比图,图13e为本公开实施例所提供的一种采用本公开的量化方法以及采用相关技术中的量化方法分别对音乐的音频数据量化时的量化噪声对比图,其中,图13c、图13d、图13e中位于上方的线条为采用相关技术中的量化方法(即线性标量量化)对音频数据量化时的量化噪声对应的线条,图13c、图13d、图13e中位于下方的线条为采用本公开的量化方法对音频数据量化时的量化噪声对应的线条。参考图13c、图13d、图13e可知,采用本公开的量化方法量化时均方误差(Mean Square Error,MSE)值小于采用相关技术中的量化方法量化时MSE值,说明本公开减小了量化噪声。
由上述内容可知,本公开通过k-means++算法确定码本码字,在编码时通过查找与该数据距离最近的码字将其编码为码字索引,完成量化的过程,减小了量化噪声,提高了有损编码的编码质量。
图14为本公开实施例所提供的一种通信装置的结构示意图,如图14所示,装置可以包括:
处理模块,用于确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;
所述处理模块,还用于从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;
所述处理模块,还用于基于所述特定码字确定所述待量化数据对应的量化后的数据;
所述处理模块,还用于基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;
收发模块,用于将所述码流发送至解码端。
综上所述,在本公开实施例提供的通信装置之中,编码端会确定待量化数据对应的码本,该码本包括k个码字,k为正整数;之后,会从该码本中确定出特定码字,该特定码字为码本中与待量化数据距离最近的码字;最后,会基于该特定码字确定待量化数据对应的量化后的数据,并基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;将该码流发送至解码端。由此可知,本公开的信号量化方法之中,量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当后续解码端进行逆量化过程时,基于该量化后的数据可以逆量化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
可选的,在本公开的一个实施例之中,所述处理模块,还用于:
响应于所述特定码字为整数,直接将所述特定码字确定为所述量化后的数据;
响应于所述特定码字为非整数,将所述特定码字所对应的索引值确定为所述量化后的数据;其中,所述码本中的码字分别对应有索引值,所述索引值为整数。
可选的,在本公开的一个实施例之中,所述装置还用于:
响应于直接将所述特定码字确定为所述量化后的数据,针对所述量化后的数据确定第一指示信息,所述第一指示信息用于指示:所述量化后的数据为码字;
响应于将所述特定码字所对应的索引值确定为所述量化后的数据,针对所述量化后的数据确定第二指示信息,所述第二指示信息用于指示:所述量化后的数据为索引值。
可选的,在本公开的一个实施例之中,所述码本中的码字分别对应有索引值,所述索引值为整数;
所述处理模块,还用于:
将所述特定码字所对应的索引值确定为所述量化后的数据。
可选的,在本公开的一个实施例之中,所述装置还用于:
生成至少一个码本。
可选的,在本公开的一个实施例之中,所述装置还用于:
从音频数据库中选择k个音频数据作为k个初始码字;
利用特定算法对所述k个初始码字进行计算,得到k个计算后的码字,基于所述k个计算后的码字构成一个码本。
可选的,在本公开的一个实施例之中,所述装置还用于:
从音频数据库中随机选择一音频数据作为第一个初始码字;
基于所述第一个初始码字从所述音频数据库中选择出第二个初始码字;
基于所述第一个初始码字和所述第二个初始码字从所述音频数据库中选择出第三个初始码字;以此类推直至选择出第k个初始码字。
可选的,在本公开的一个实施例之中,所述特定算法包括K-Means算法;
所述装置还用于:
利用所述K-Means算法对所述k个初始码字进行计算直至收敛,以得到k个计算后的码字。
可选的,在本公开的一个实施例之中,所述装置还用于:
确定待量化数据。
可选的,在本公开的一个实施例之中,所述装置还用于:
对待编码的音频信号进行预处理得到时频信号,所述时域信号包括m×n个时域数据x(n),m和n均为正整数;
将所述时域信号输入至编码神经网络以输出第一变换域信号,所述第一变换域信号包括m×n个第一变换域数据y(n);
对所述第一变换域信号进行尺度变换得到第一变换后的信号,所述第一变换后的信号包括m×n个尺度变换后的第一数据z(n);
将所述第一数据z(n)确定为所述待量化数据。
可选的,在本公开的一个实施例之中,所述处理模块还用于:
基于所述第一变换域信号确定第二变换域信号,所述第二变换域信号包括m×n个第二变换域数据fabs(y(n));其中,fabs表示取绝对值;
将所述第二变化域信号进行尺度变换得到第二变换后的信号,所述第二变换后的信号包括m×n个尺度变换后的第二数据z 1(n);
将所述第二变换后的信号输入至上下文编码神经网络以输出各个第二数据z 1(n)对应的上下文信息,所述上下文信息用于确定第一数据z(n)对应的码本;
基于所述上下文信息确定各个第一数据z(n)对应的码本。
可选的,在本公开的一个实施例之中,所述码流中还包括各个待量化数据对应的码本所对应的上下文信息。
可选的,在本公开的一个实施例之中,所述码流中还包括各个量化后的数据对应的第一指示信息或第二指示信息。
图15为本公开实施例所提供的一种通信装置的结构示意图,如图15所示,装置可以包括:
处理模块,用于接收编码端发送的码流,并对所述码流进行区间解码得到解码后的数据;
所述处理模块,还用于基于所述解码后的数据确定逆量化后的数据。
综上所述,本公开提供的通信装置之中,解码端会接收编码端发送的码流,并会对该码流进行区间解码得到解码后的数据。之后,解码端会基于解码后的数据确定逆量化后的数据。其中,该解码后的数据实质为上述实施例中的量化后的数据,而该量化后的数据实质是基于取值与量化前的数据(即前述的待量化数据)接近的码字确定的。基于此,当解码端进行逆量化过程时,基于该解码后的数据可以逆量 化出与量化前的数据接近的数据,也即是,该逆量化后的数据的取值是接近于量化前的数据的,从而确保逆量化操作能够较大程度地还原原始的量化前的数据,则使得量化噪声较小。并且,由于量化所使用的码本是通过音频数据库确定的,因此码本中的各个码字可以反映出待量化数据的分布特征,则利用上述的特定码字确定得到的量化后的数据应当也能够反映出各个量化前的数据之间的分布特征,由此可知本公开的量化方法考虑到了量化前的数据之间的分布特征,则进一步降低了量化噪声。
可选的,在本公开的一个实施例之中,所述装置还用于:
解析所述码流以确定各个解码后的数据对应的上下文信息;所述上下文信息用于确定各个解码后的数据在被编码时所采用的码本。
可选的,在本公开的一个实施例之中,所述处理模块还用于:
基于所述上下文信息确定各个编码后的数据在被编码时所采用的码本;
基于所述码本对编码后的数据进行区间解码。
可选的,在本公开的一个实施例之中,所述处理模块还用于:
从所述码流中确定所述解码后的数据对应的第一指示信息或第二指示信息;
响应于所述解码后的数据对应的是第一指示信息,将所述解码后的数据确定为逆量化后的数据;
响应于所述解码后的数据对应的是第二指示信息,基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本,将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
可选的,在本公开的一个实施例之中,所述处理模块还用于:
基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本;
将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
可选的,在本公开的一个实施例之中,所述装置还用于:
对逆量化后的数据进行噪声填充、尺度变换和神经网络解码。
请参见图16,图16是本申请实施例提供的一种通信装置1600的结构示意图。通信装置1600可以是网络设备,也可以是终端设备,也可以是支持网络设备实现上述方法的芯片、芯片系统、或处理器等,还可以是支持终端设备实现上述方法的芯片、芯片系统、或处理器等。该装置可用于实现上述方法实施例中描述的方法,具体可以参见上述方法实施例中的说明。
通信装置1600可以包括一个或多个处理器1601。处理器1601可以是通用处理器或者专用处理器等。例如可以是基带处理器或中央处理器。基带处理器可以用于对通信协议以及通信数据进行处理,中央处理器可以用于对通信装置(如,基站、基带芯片,终端设备、终端设备芯片,DU或CU等)进行控制,执行计算机程序,处理计算机程序的数据。
可选的,通信装置1600中还可以包括一个或多个存储器1602,其上可以存有计算机程序1604,处理器1601执行所述计算机程序1604,以使得通信装置1600执行上述方法实施例中描述的方法。可选的,所述存储器1602中还可以存储有数据。通信装置1600和存储器1602可以单独设置,也可以集成在一起。
可选的,通信装置1600还可以包括收发器1605、天线1606。收发器1605可以称为收发单元、收发机、或收发电路等,用于实现收发功能。收发器1605可以包括接收器和发送器,接收器可以称为接收机或接收电路等,用于实现接收功能;发送器可以称为发送机或发送电路等,用于实现发送功能。
可选的,通信装置1600中还可以包括一个或多个接口电路1607。接口电路1607用于接收代码指令并传输至处理器1601。处理器1601运行所述代码指令以使通信装置1600执行上述方法实施例中描述的方法。
在一种实现方式中,处理器1601中可以包括用于实现接收和发送功能的收发器。例如该收发器可以是收发电路,或者是接口,或者是接口电路。用于实现接收和发送功能的收发电路、接口或接口电路可以是分开的,也可以集成在一起。上述收发电路、接口或接口电路可以用于代码/数据的读写,或者,上述收发电路、接口或接口电路可以用于信号的传输或传递。
在一种实现方式中,处理器1601可以存有计算机程序1603,计算机程序1603在处理器1601上运行,可使得通信装置1600执行上述方法实施例中描述的方法。计算机程序1603可能固化在处理器1601 中,该种情况下,处理器1601可能由硬件实现。
在一种实现方式中,通信装置1600可以包括电路,所述电路可以实现前述方法实施例中发送或接收或者通信的功能。本申请中描述的处理器和收发器可实现在集成电路(integrated circuit,IC)、模拟IC、射频集成电路RFIC、混合信号IC、专用集成电路(application specific integrated circuit,ASIC)、印刷电路板(printed circuit board,PCB)、电子设备等上。该处理器和收发器也可以用各种IC工艺技术来制造,例如互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)、N型金属氧化物半导体(nMetal-oxide-semiconductor,NMOS)、P型金属氧化物半导体(positive channel metal oxide semiconductor,PMOS)、双极结型晶体管(bipolar junction transistor,BJT)、双极CMOS(BiCMOS)、硅锗(SiGe)、砷化镓(GaAs)等。
以上实施例描述中的通信装置可以是网络设备或者终端设备,但本申请中描述的通信装置的范围并不限于此,而且通信装置的结构可以不受图16的限制。通信装置可以是独立的设备或者可以是较大设备的一部分。例如所述通信装置可以是:
(1)独立的集成电路IC,或芯片,或,芯片系统或子系统;
(2)具有一个或多个IC的集合,可选的,该IC集合也可以包括用于存储数据,计算机程序的存储部件;
(3)ASIC,例如调制解调器(Modem);
(4)可嵌入在其他设备内的模块;
(5)接收机、终端设备、智能终端设备、蜂窝电话、无线设备、手持机、移动单元、车载设备、网络设备、云设备、人工智能设备等等;
(6)其他等等。
对于通信装置可以是芯片或芯片系统的情况,可参见图17所示的芯片的结构示意图。图17所示的芯片包括处理器1701和接口1702。其中,处理器1701的数量可以是一个或多个,接口1702的数量可以是多个。
可选的,芯片还包括存储器1703,存储器1703用于存储必要的计算机程序和数据。
本领域技术人员还可以了解到本申请实施例列出的各种说明性逻辑块(illustrative logical block)和步骤(step)可以通过电子硬件、电脑软件,或两者的结合进行实现。这样的功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本申请实施例保护的范围。
本申请还提供一种可读存储介质,其上存储有指令,该指令被计算机执行时实现上述任一方法实施例的功能。
本申请还提供一种计算机程序产品,该计算机程序产品被计算机执行时实现上述任一方法实施例的功能。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序。在计算机上加载和执行所述计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机程序可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解:本申请中涉及的第一、第二等各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围,也表示先后顺序。
本申请中的至少一个还可以描述为一个或多个,多个可以是两个、三个、四个或者更多个,本申请不做限制。在本申请实施例中,对于一种技术特征,通过“第一”、“第二”、“第三”、“A”、“B”、“C”和“D”等区分该种技术特征中的技术特征,该“第一”、“第二”、“第三”、“A”、“B”、“C”和“D”描述的技术特征间无先后顺序或者大小顺序。
本申请中各表所示的对应关系可以被配置,也可以是预定义的。各表中的信号的取值仅仅是举例,可以配置为其他值,本申请并不限定。在配置信息与各参数的对应关系时,并不一定要求必须配置各表中示意出的所有对应关系。例如,本申请中的表格中,某些行示出的对应关系也可以不配置。又例如,可以基于上述表格做适当的变形调整,例如,拆分,合并等等。上述各表中标题示出参数的名称也可以采用通信装置可理解的其他名称,其参数的取值或表示方式也可以通信装置可理解的其他取值或表示方式。上述各表在实现时,也可以采用其他的数据结构,例如可以采用数组、队列、容器、栈、线性表、指针、链表、树、图、结构体、类、堆、散列表或哈希表等。
本申请中的预定义可以理解为定义、预先定义、存储、预存储、预协商、预配置、固化、或预烧制。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (24)

  1. 一种信号量化方法,其特征在于,所述方法被编码端执行,包括:
    确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;
    从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;
    基于所述特定码字确定所述待量化数据对应的量化后的数据;
    基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;
    将所述码流发送至解码端。
  2. 如权利要求1所述的方法,其特征在于,所述基于所述特定码字确定所述待量化数据对应的量化后的数据,包括:
    响应于所述特定码字为整数,直接将所述特定码字确定为所述量化后的数据;
    响应于所述特定码字为非整数,将所述特定码字所对应的索引值确定为所述量化后的数据;其中,所述码本中的码字分别对应有索引值,所述索引值为整数。
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:
    响应于直接将所述特定码字确定为所述量化后的数据,针对所述量化后的数据确定第一指示信息,所述第一指示信息用于指示:所述量化后的数据为码字;
    响应于将所述特定码字所对应的索引值确定为所述量化后的数据,针对所述量化后的数据确定第二指示信息,所述第二指示信息用于指示:所述量化后的数据为索引值。
  4. 如权利要求1所述的方法,其特征在于,所述码本中的码字分别对应有索引值,所述索引值为整数;
    所述基于所述特定码字确定所述待量化数据对应的量化后的数据,包括:
    将所述特定码字所对应的索引值确定为所述量化后的数据。
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    生成至少一个码本。
  6. 如权利要求5所述的方法,其特征在于,所述生成码本,包括:
    从音频数据库中选择k个音频数据作为k个初始码字;
    利用特定算法对所述k个初始码字进行计算,得到k个计算后的码字,基于所述k个计算后的码字构成一个码本。
  7. 如权利要求6所述的方法,其特征在于,所述从音频数据库中选择k个音频数据作为k个初始码字,包括:
    从音频数据库中随机选择一音频数据作为第一个初始码字;
    基于所述第一个初始码字从所述音频数据库中选择出第二个初始码字;
    基于所述第一个初始码字和所述第二个初始码字从所述音频数据库中选择出第三个初始码字;以此类推直至选择出第k个初始码字。
  8. 如权利要求6所述的方法,其特征在于,所述特定算法包括K-Means算法;
    所述利用特定算法对所述k个初始码字进行计算,包括:
    利用所述K-Means算法对所述k个初始码字进行计算直至收敛,以得到k个计算后的码字。
  9. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    确定待量化数据。
  10. 如权利要求9所述的方法,其特征在于,所述确定待量化数据,包括:
    对待编码的音频信号进行预处理得到时频信号,所述时域信号包括m×n个时域数据x(n),m和n均为正整数;
    将所述时域信号输入至编码神经网络以输出第一变换域信号,所述第一变换域信号包括m×n个第一变换域数据y(n);
    对所述第一变换域信号进行尺度变换得到第一变换后的信号,所述第一变换后的信号包括m×n个尺度变换后的第一数据z(n);
    将所述第一数据z(n)确定为所述待量化数据。
  11. 如权利要求10所述的方法,其特征在于,所述确定待量化数据对应的码本,包括:
    基于所述第一变换域信号确定第二变换域信号,所述第二变换域信号包括m×n个第二变换域数据fabs(y(n));其中,fabs表示取绝对值;
    将所述第二变化域信号进行尺度变换得到第二变换后的信号,所述第二变换后的信号包括m×n个尺度变换后的第二数据z 1(n);
    将所述第二变换后的信号输入至上下文编码神经网络以输出各个第二数据z 1(n)对应的上下文信息,所述上下文信息用于确定第一数据z(n)对应的码本;
    基于所述上下文信息确定各个第一数据z(n)对应的码本。
  12. 如权利要求11所述的方法,其特征在于,所述码流中还包括各个待量化数据对应的码本所对应的上下文信息。
  13. 如权利要求3所述的方法,其特征在于,所述码流中还包括各个量化后的数据对应的第一指示信息或第二指示信息。
  14. 一种信号量化方法,其特征在于,所述方法被解码端执行,包括:
    接收编码端发送的码流,并对所述码流进行区间解码得到解码后的数据;
    基于所述解码后的数据确定逆量化后的数据。
  15. 如权利要求14所述的方法,其特征在于,所述方法还包括:
    解析所述码流以确定各个解码后的数据对应的上下文信息;所述上下文信息用于确定各个解码后的数据在被编码时所采用的码本。
  16. 如权利要求15所述的方法,其特征在于,所述对所述码流进行区间解码,包括:
    基于所述上下文信息确定各个编码后的数据在被编码时所采用的码本;
    基于所述码本对编码后的数据进行区间解码。
  17. 如权利要求15所述的方法,其特征在于,所述基于所述解码后的数据确定逆量化后的数据,包括:
    从所述码流中确定所述解码后的数据对应的第一指示信息或第二指示信息;
    响应于所述解码后的数据对应的是第一指示信息,将所述解码后的数据确定为逆量化后的数据;
    响应于所述解码后的数据对应的是第二指示信息,基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本,将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
  18. 如权利要求15所述的方法,其特征在于,所述基于所述解码后的数据确定为逆量化后的数据,包括:
    基于所述上下文信息确定所述解码后的数据在被编码时所采用的码本;
    将所述码本中索引值与所述解码后的数据相同的码字确定为逆量化后的数据。
  19. 如权利要求14所述的方法,其特征在于,所述方法还包括:
    对逆量化后的数据进行噪声填充、尺度变换和神经网络解码。
  20. 一种通信装置,其特征在于,包括:
    处理模块,用于确定待量化数据对应的码本,所述码本包括k个码字,k为正整数;
    所述处理模块,还用于从所述码本中确定特定码字,所述特定码字为所述码本中与待量化数据距离最近的码字;
    所述处理模块,还用于基于所述特定码字确定所述待量化数据对应的量化后的数据;
    所述处理模块,还用于基于各个待量化数据对应的码本对各个量化后的数据进行区间编码,得到码流;
    收发模块,用于将所述码流发送至解码端。
  21. 一种通信装置,其特征在于,包括:
    处理模块,用于接收编码端发送的码流,并对所述码流进行区间解码得到解码后的数据;
    所述处理模块,还用于基于所述解码后的数据确定逆量化后的数据。
  22. 一种通信装置,其特征在于,所述装置包括处理器和存储器,其中,所述存储器中存储有计算机程序,所述处理器执行所述存储器中存储的计算机程序,以使所述装置执行如权利要求1至13中任一所述的方法,或者,所述处理器执行所述存储器中存储的计算机程序,以使所述装置执行如权利要求14至19中任一所述的方法。
  23. 一种通信装置,其特征在于,包括:处理器和接口电路,其中
    所述接口电路,用于接收代码指令并传输至所述处理器;
    所述处理器,用于运行所述代码指令以执行如权利要求1至13中任一所述的方法,或者,用于运行所述代码指令以执行如权利要求14至19中任一所述的方法。
  24. 一种计算机可读存储介质,用于存储有指令,当所述指令被执行时,使如权利要求1至13中任一所述的方法被实现,或者当所述指令被执行时,使如权利要求14至19中任一所述的方法被实现。
PCT/CN2022/133839 2022-11-23 2022-11-23 一种信号量化方法、装置、设备及存储介质 WO2024108449A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280005227.8A CN118401999A (zh) 2022-11-23 2022-11-23 一种信号量化方法、装置、设备及存储介质
PCT/CN2022/133839 WO2024108449A1 (zh) 2022-11-23 2022-11-23 一种信号量化方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/133839 WO2024108449A1 (zh) 2022-11-23 2022-11-23 一种信号量化方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024108449A1 true WO2024108449A1 (zh) 2024-05-30

Family

ID=91194812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133839 WO2024108449A1 (zh) 2022-11-23 2022-11-23 一种信号量化方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN118401999A (zh)
WO (1) WO2024108449A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050031219A1 (en) * 2002-09-06 2005-02-10 The Regents Of The University Of California Encoding and decoding of digital data using cues derivable at a decoder
CN106203624A (zh) * 2016-06-23 2016-12-07 上海交通大学 基于深度神经网络的矢量量化系统及方法
CN106980656A (zh) * 2017-03-10 2017-07-25 北京大学 一种基于二值码字典树的搜索方法
US20190312666A1 (en) * 2018-04-06 2019-10-10 International Business Machines Corporation Error correcting codes with bayes decoder and optimized codebook

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677492A (zh) * 2004-04-01 2005-10-05 北京宫羽数字技术有限责任公司 一种增强音频编解码装置及方法
US10097602B2 (en) * 2016-03-29 2018-10-09 Nokia Of America Corporation Channel-aware caching-aided coded multicast
CN115050355B (zh) * 2022-05-31 2024-07-16 北京小米移动软件有限公司 语音识别模型的训练方法和装置、电子设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050031219A1 (en) * 2002-09-06 2005-02-10 The Regents Of The University Of California Encoding and decoding of digital data using cues derivable at a decoder
CN106203624A (zh) * 2016-06-23 2016-12-07 上海交通大学 基于深度神经网络的矢量量化系统及方法
CN106980656A (zh) * 2017-03-10 2017-07-25 北京大学 一种基于二值码字典树的搜索方法
US20190312666A1 (en) * 2018-04-06 2019-10-10 International Business Machines Corporation Error correcting codes with bayes decoder and optimized codebook

Also Published As

Publication number Publication date
CN118401999A (zh) 2024-07-26

Similar Documents

Publication Publication Date Title
FI116992B (fi) Menetelmät, järjestelmä ja laitteet audiosignaalin koodauksen ja siirron tehostamiseksi
CN102144256A (zh) 用于针对矢量量化器的快速最近邻搜索的方法和设备
CN108809486B (zh) Polar码编译码方法及装置
US20240312469A1 (en) Apparatus, Methods and Computer Programs for Encoding Spatial Metadata
WO2022261991A1 (zh) 一种数据处理方法、装置及系统
WO2024164284A1 (zh) 一种音频信号处理、装置、设备及存储介质
WO2024108449A1 (zh) 一种信号量化方法、装置、设备及存储介质
WO2023197187A1 (zh) 一种信道状态信息的处理方法及装置
CN109391358B (zh) 极化码编码的方法和装置
WO2024050673A1 (zh) 一种音频信号频带扩展方法、装置、设备及存储介质
WO2022012628A1 (zh) 多声道音频信号编解码方法和装置
JPWO2019154422A5 (zh)
CN116863949A (zh) 通信接收方法及其装置
WO2024197541A1 (zh) 一种量化编码方法、装置、设备及存储介质
CN109286922B (zh) 蓝牙提示音处理方法、系统、可读存储介质和蓝牙设备
WO2024031713A1 (zh) 上行8端口码本的生成方法、装置、设备及存储介质
WO2024213147A1 (zh) 一种音频编码方法、装置、电子设备及存储介质
WO2024082195A1 (zh) 一种基于ai模型的终端定位方法及装置
WO2024020904A1 (zh) 智能反射表面irs的相移配置的发送、接收方法及装置
WO2024182980A1 (zh) 一种知识库管理方法、装置、设备及存储介质
WO2024183180A1 (zh) 基于非正交多址的信息业务服务提供方法、系统、设备及介质
WO2024207530A1 (zh) 信道状态信息csi处理方法及装置
WO2024148627A1 (zh) 一种传输参数指示方法/装置/设备及存储介质
US20240072827A1 (en) Encoding/decoding method, communication apparatus, and system
WO2024108607A1 (zh) 数据压缩方法、通信装置及通信系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22966144

Country of ref document: EP

Kind code of ref document: A1