CN111862995A - A code rate determination model training method, code rate determination method and device - Google Patents

A code rate determination model training method, code rate determination method and device Download PDF

Info

Publication number
CN111862995A
CN111862995A CN202010575623.7A CN202010575623A CN111862995A CN 111862995 A CN111862995 A CN 111862995A CN 202010575623 A CN202010575623 A CN 202010575623A CN 111862995 A CN111862995 A CN 111862995A
Authority
CN
China
Prior art keywords
audio signal
code rate
encoded
audio
trained
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010575623.7A
Other languages
Chinese (zh)
Inventor
郑羲光
董培
张晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010575623.7A priority Critical patent/CN111862995A/en
Publication of CN111862995A publication Critical patent/CN111862995A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/27Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the analysis technique

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本公开关于一种码率确定模型训练方法、码率确定方法及装置,该方法包括:获取音频样本数据集合;获取每个音频信号的特征信息和音频信号对应的目标编码码率;将获取的所述特征信息输入待训练的码率确定模型中,得到待训练的码率确定模型输出的编码码率;根据待训练的码率确定模型输出的编码码率和所述目标编码码率,获取待训练的码率确定模型的损失值;根据损失值调整待训练的码率确定模型的模型参数,直至损失值低于预设阈值时,将待训练的码率确定模型作为训练好的码率确定模型。这样,后续步骤中,在对待编码音频信号进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频信号的音频质量。

Figure 202010575623

The present disclosure relates to a code rate determination model training method, code rate determination method and device. The method includes: acquiring an audio sample data set; acquiring feature information of each audio signal and a target coding rate corresponding to the audio signal; The feature information is input into the code rate determination model to be trained, and the encoding code rate output by the code rate determination model to be trained is obtained; the encoding code rate output by the model and the target encoding code rate are determined according to the code rate to be trained, and the The code rate to be trained determines the loss value of the model; the code rate to be trained is adjusted according to the loss value to determine the model parameters of the model, until the loss value is lower than the preset threshold, the code rate determination model to be trained is used as the trained code rate Determine the model. In this way, in the subsequent steps, when the to-be-encoded audio signal is encoded, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio signal can be guaranteed.

Figure 202010575623

Description

一种码率确定模型训练方法、码率确定方法及装置A code rate determination model training method, code rate determination method and device

技术领域technical field

本申请涉及音视频技术领域,特别是涉及一种码率确定模型训练方法、码率确定方法及装置。The present application relates to the technical field of audio and video, and in particular, to a method for training a code rate determination model, a method and apparatus for determining a code rate.

背景技术Background technique

随着移动互联网的发展,在终端上使用音频成为了越来越多用户的需求,为了节省传输资源和存储资源,音频信号在传输及存储中需要被编码。音频编码技术可以分为无损编码,即终端可以通过解码器完美恢复原始音频信号;另一种编码方式为有损编码,即终端通过解码器解码后的音频信号被不同程度的压缩。With the development of the mobile Internet, more and more users need to use audio on terminals. In order to save transmission resources and storage resources, audio signals need to be encoded during transmission and storage. Audio coding technology can be divided into lossless coding, that is, the terminal can perfectly restore the original audio signal through the decoder; another coding method is lossy coding, that is, the audio signal decoded by the terminal through the decoder is compressed to different degrees.

相关技术中,在对音频信号进行编码时,通常会指定一个码率,编码器可以按照指定码率进行编码,为了保证编码后的音频信号的质量,通常会指定一个高码率来对音频信号进行编码。In the related art, when encoding an audio signal, a bit rate is usually specified, and the encoder can encode according to the specified bit rate. In order to ensure the quality of the encoded audio signal, a high bit rate is usually specified for the audio signal. to encode.

这样,在传输编码后的音频信号时,会需要较高的传输带宽;并且,在存储编码后的音频信号时,会需要较大的存储空间,进而导致了传输资源和存储资源的浪费。In this way, when transmitting the encoded audio signal, a high transmission bandwidth is required; and when storing the encoded audio signal, a large storage space is required, which leads to waste of transmission resources and storage resources.

发明内容SUMMARY OF THE INVENTION

为了解决相关技术中存在的因音频信号的编码码率高,而导致传输以及存储编码后的音频信号时,造成传输资源及存储资源浪费的技术问题,本公开提供了一种码率确定模型训练方法、码率确定方法及装置,本公开的技术方案如下:In order to solve the technical problem in the related art that the encoding rate of the audio signal is high, which leads to the waste of transmission resources and storage resources when transmitting and storing the encoded audio signal, the present disclosure provides a rate determination model training method. Method, code rate determination method and device, the technical solutions of the present disclosure are as follows:

根据本公开实施例的第一方面,提供了一种码率确定模型训练方法,所述方法包括:According to a first aspect of the embodiments of the present disclosure, a method for training a code rate determination model is provided, the method comprising:

获取音频样本数据集合,所述音频样本数据集合中包括不同类型的音频信号;Obtaining an audio sample data set, the audio sample data set includes different types of audio signals;

获取每个所述音频信号的特征信息和所述音频信号对应的目标编码码率,所述特征信息与所述音频信号的类型相关联,所述目标编码码率为所述音频信号满足目标音频质量时的最低编码码率;Obtain feature information of each of the audio signals and a target coding rate corresponding to the audio signal, where the feature information is associated with the type of the audio signal, and the target coding rate is that the audio signal satisfies the target audio The minimum encoding bit rate at the time of quality;

将获取的所述特征信息输入待训练的码率确定模型中,得到所述待训练的码率确定模型输出的编码码率;Inputting the acquired feature information into the code rate determination model to be trained, to obtain the encoding code rate output by the code rate determination model to be trained;

根据所述待训练的码率确定模型输出的编码码率和所述目标编码码率,获取所述待训练的码率确定模型的损失值;Determine the coding code rate output by the model and the target coding code rate according to the code rate to be trained, and obtain the code rate to be trained to determine the loss value of the model;

根据所述损失值调整所述待训练的码率确定模型的模型参数,直至所述损失值低于预设阈值时,将所述待训练的码率确定模型作为训练好的码率确定模型。Adjust the model parameters of the bit rate determination model to be trained according to the loss value, and use the bit rate determination model to be trained as the trained bit rate determination model until the loss value is lower than a preset threshold.

可选的,获取所述音频信号对应的目标编码码率,包括:Optionally, acquiring the target encoding bit rate corresponding to the audio signal, including:

根据预设码率对所述音频信号进行编码以得到编码后的音频信号;Encode the audio signal according to a preset bit rate to obtain an encoded audio signal;

根据所述音频信号和所述编码后的音频信号,计算所述编码后的音频信号的质量损失值;calculating a quality loss value of the encoded audio signal according to the audio signal and the encoded audio signal;

当所述质量损失值小于质量损失阈值,且所述质量损失值为最小的质量损失值时,将所述预设码率确定为所述音频信号对应的目标编码码率。When the quality loss value is less than the quality loss threshold, and the quality loss value is the smallest quality loss value, the preset bit rate is determined as the target encoding bit rate corresponding to the audio signal.

可选的,所述当所述质量损失值小于质量损失阈值,且所述质量损失值为最小的质量损失值时,将所述预设码率确定为所述音频信号对应的目标编码码率,包括:Optionally, when the quality loss value is less than a quality loss threshold, and the quality loss value is a minimum quality loss value, determining the preset bit rate as the target encoding bit rate corresponding to the audio signal ,include:

当所述质量损失值小于质量损失阈值时,减小所述预设码率,并根据减小后的预设码率对所述音频信号进行编码以得到编码后的音频信号,直到所述音频质量损失值大于所述质量损失阈值;When the quality loss value is less than the quality loss threshold, the preset bit rate is reduced, and the audio signal is encoded according to the reduced preset bit rate to obtain an encoded audio signal until the audio The mass loss value is greater than the mass loss threshold;

将前一个减小后的预设码率作为目标编码码率。The previous reduced preset code rate is used as the target encoding code rate.

可选的,所述获取每个所述音频信号的特征信息,包括:Optionally, the acquiring feature information of each of the audio signals includes:

获取每个所述音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述音频信号的特征信息。Acquire amplitude information and phase information of each of the audio signals in the time-frequency domain, and determine characteristic information of the audio signal according to the amplitude information and/or the phase information.

可选的,所述获取每个所述音频信号的特征信息和所述音频信号对应的目标编码码率,包括:Optionally, the obtaining of the feature information of each of the audio signals and the target coding rate corresponding to the audio signals includes:

获取每个所述音频信号的每一帧信号的特征信息和所述音频信号的每一帧信号对应的目标编码码率;Acquiring feature information of each frame of each of the audio signals and a target encoding code rate corresponding to each frame of the audio signal;

或,获取每个所述音频信号中的每一帧信号的特征信息,将各帧信号的特征信息的平均值作为所述音频信号的特征信息,且获取与所述音频信号的特征信息对应的目标编码码率。Or, obtain the feature information of each frame signal in each of the audio signals, take the average value of the feature information of each frame signal as the feature information of the audio signal, and obtain the feature information corresponding to the audio signal. Target encoding bit rate.

根据本公开实施例的第二方面,提供了一种码率确定方法,所述方法包括:According to a second aspect of the embodiments of the present disclosure, a method for determining a code rate is provided, and the method includes:

获取待编码音频信号的特征信息;Obtain characteristic information of the audio signal to be encoded;

将所述待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到所述待编码音频信号对应的编码码率,以按照所述待编码音频信号对应的编码码率对所述待编码音频信号进行编码。The feature information of the audio signal to be encoded is input into the code rate determination model described in the first aspect, and the encoding code rate corresponding to the audio signal to be encoded is obtained, so that the encoding code rate corresponding to the audio signal to be encoded to encode the audio signal to be encoded.

可选的,所述获取待编码音频信号的特征信息,包括:Optionally, the obtaining feature information of the audio signal to be encoded includes:

获取所述待编码音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述待编码音频信号的特征信息。Acquire amplitude information and phase information of the audio signal to be encoded in the time-frequency domain, and determine characteristic information of the audio signal to be encoded according to the amplitude information and/or phase information.

可选的,所述获取待编码音频信号的特征信息,包括:Optionally, the obtaining feature information of the audio signal to be encoded includes:

获取待编码音频信号的每一帧信号的特征信息;Obtain characteristic information of each frame of the audio signal to be encoded;

或,获取待编码音频信息中的每一帧信号的特征信息,将各帧信号的特征信号的平均值作为所述待编码音频信号的特征信息。Or, the feature information of each frame of signal in the audio information to be encoded is acquired, and the average value of the feature signals of each frame signal is used as the feature information of the audio signal to be encoded.

根据本公开实施例的第三方面,提供了一种码率确定模型训练装置,所述装置包括:According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for training a code rate determination model, the apparatus comprising:

音频信号获取模块,被配置为执行获取音频样本数据集合,所述音频样本数据集合中包括不同类型的音频信号;an audio signal acquisition module configured to perform acquisition of an audio sample data set, the audio sample data set including different types of audio signals;

信息及码率获取模块,被配置为执行获取每个所述音频信号的特征信息和所述音频信号对应的目标编码码率,所述特征信息与所述音频信号的类型相关联,所述目标编码码率为所述音频信号满足目标音频质量时的最低编码码率;The information and code rate acquisition module is configured to perform acquisition of characteristic information of each of the audio signals and a target encoding code rate corresponding to the audio signal, the characteristic information is associated with the type of the audio signal, the target The encoding bit rate is the lowest encoding bit rate when the audio signal meets the target audio quality;

编码码率获取模块,被配置为执行将获取的所述特征信息输入待训练的码率确定模型中,得到所述待训练的码率确定模型输出的编码码率;an encoding rate acquisition module, configured to input the acquired feature information into a code rate determination model to be trained, and obtain an encoding rate output from the code rate determination model to be trained;

损失值获取模块,被配置为执行根据所述待训练的码率确定模型输出的编码码率和所述目标编码码率,获取所述待训练的码率确定模型的损失值;a loss value acquisition module, configured to determine the encoding code rate output by the model and the target encoding code rate according to the code rate to be trained, and obtain the code rate to be trained to determine the loss value of the model;

模型参数调整模块,被配置为执行根据所述损失值调整所述待训练的码率确定模型的模型参数,直至所述损失值低于预设阈值时,将所述待训练的码率确定模型作为训练好的码率确定模型。A model parameter adjustment module configured to adjust the model parameters of the to-be-trained code rate determination model according to the loss value, and until the loss value is lower than a preset threshold, the to-be-trained code rate determination model Determine the model as the trained bit rate.

可选的,所述信息及码率获取模块,包括:Optionally, the information and code rate acquisition module includes:

音频信号编码单元,被配置为执行根据预设码率对所述音频信号进行编码以得到编码后的音频信号;an audio signal encoding unit, configured to perform encoding on the audio signal according to a preset bit rate to obtain an encoded audio signal;

质量损失值计算单元,被配置为执行根据所述音频信号和所述编码后的音频信号,计算所述编码后的音频信号的质量损失值;a quality loss value calculation unit configured to calculate a quality loss value of the encoded audio signal according to the audio signal and the encoded audio signal;

目标编码码率确定单元,被配置为执行当所述质量损失值小于质量损失阈值,且所述质量损失值为最小的质量损失值时,将所述预设码率确定为所述音频信号对应的目标编码码率。A target encoding bit rate determination unit configured to perform, when the quality loss value is less than a quality loss threshold and the quality loss value is a minimum quality loss value, determine the preset bit rate as the audio signal corresponding to the target encoding bit rate.

可选的,所述目标编码码率确定单元,具体被配置为执行:Optionally, the target coding rate determination unit is specifically configured to execute:

当所述质量损失值小于质量损失阈值时,减小所述预设码率,并根据减小后的预设码率对所述音频信号进行编码以得到编码后的音频信号,直到所述音频质量损失值大于所述质量损失阈值;When the quality loss value is less than the quality loss threshold, the preset bit rate is reduced, and the audio signal is encoded according to the reduced preset bit rate to obtain an encoded audio signal until the audio The mass loss value is greater than the mass loss threshold;

将前一个减小后的预设码率作为目标编码码率。The previous reduced preset code rate is used as the target encoding code rate.

可选的,所述信息及码率获取模块,具体被配置为执行:Optionally, the information and code rate acquisition module is specifically configured to execute:

获取每个所述音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述音频信号的特征信息。Acquire amplitude information and phase information of each of the audio signals in the time-frequency domain, and determine characteristic information of the audio signal according to the amplitude information and/or the phase information.

可选的,所述信息及码率获取模块,具体被配置为执行:Optionally, the information and code rate acquisition module is specifically configured to execute:

获取每个所述音频信号的每一帧信号的特征信息和所述音频信号的每一帧信号对应的目标编码码率;Acquiring feature information of each frame of each of the audio signals and a target encoding code rate corresponding to each frame of the audio signal;

或,获取每个所述音频信号中的每一帧信号的特征信息,将各帧信号的特征信息的平均值作为所述音频信号的特征信息,且获取与所述音频信号的特征信息对应的目标编码码率。Or, obtain the feature information of each frame signal in each of the audio signals, take the average value of the feature information of each frame signal as the feature information of the audio signal, and obtain the feature information corresponding to the audio signal. Target encoding bit rate.

根据本公开实施例的第四方面,提供了一种码率确定装置,所述装置包括:According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for determining a code rate, the apparatus comprising:

特征信息获取模块,被配置为执行获取待编码音频信号的特征信息;a feature information acquisition module, configured to perform acquisition of feature information of the audio signal to be encoded;

编码码率确定模块,被配置为执行将所述待编码音频信号的特征信息输入第三方面所述的码率确定模型,得到所述待编码音频信号对应的编码码率,以按照所述待编码音频信号对应的编码码率对所述待编码音频信号进行编码。The encoding bit rate determination module is configured to input the feature information of the audio signal to be encoded into the bit rate determination model described in the third aspect, and obtain the encoding bit rate corresponding to the audio signal to be encoded, so as to obtain the encoding bit rate corresponding to the audio signal to be encoded according to the The encoding code rate corresponding to the encoded audio signal encodes the to-be-encoded audio signal.

可选的,所述特征信息获取模块,具体被配置为执行:Optionally, the feature information acquisition module is specifically configured to execute:

获取所述待编码音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述待编码音频信号的特征信息。Acquire amplitude information and phase information of the audio signal to be encoded in the time-frequency domain, and determine characteristic information of the audio signal to be encoded according to the amplitude information and/or phase information.

可选的,所述特征信息获取模块,具体被配置为执行:Optionally, the feature information acquisition module is specifically configured to execute:

获取待编码音频信号的每一帧信号的特征信息;Obtain characteristic information of each frame of the audio signal to be encoded;

或,获取待编码音频信息中的每一帧信号的特征信息,将各帧信号的特征信号的平均值作为所述待编码音频信号的特征信息。Or, the feature information of each frame of signal in the audio information to be encoded is acquired, and the average value of the feature signals of each frame signal is used as the feature information of the audio signal to be encoded.

根据本公开实施例的第五方面,提供了一种电子设备,包括:According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, including:

处理器;processor;

用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;

其中,所述处理器被配置为执行所述指令,以实现第一方面所述的码率确定模型训练方法。Wherein, the processor is configured to execute the instructions to implement the code rate determination model training method described in the first aspect.

根据本公开实施例的第六方面,提供了一种电子设备,包括:According to a sixth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

处理器;processor;

用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;

其中,所述处理器被配置为执行所述指令,以实现如第二方面所述的码率确定方法。Wherein, the processor is configured to execute the instructions to implement the code rate determination method according to the second aspect.

根据本公开实施例的第七方面,提供了一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如第一方面所述的码率确定模型训练方法。According to a seventh aspect of the embodiments of the present disclosure, there is provided a storage medium, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can execute the code rate according to the first aspect Determine the model training method.

根据本公开实施例的第八方面,提供了一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行第二方面所述的码率确定方法。According to an eighth aspect of the embodiments of the present disclosure, a storage medium is provided, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can perform the code rate determination described in the second aspect method.

根据本公开实施例的第九方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机实现第一方面所述的码率确定模型训练方法。According to a ninth aspect of the embodiments of the present disclosure, there is provided a computer program product including instructions, which, when executed on a computer, enables the computer to implement the code rate determination model training method described in the first aspect.

根据本公开实施例的第十方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机实现第二方面所述的码率确定方法。According to a tenth aspect of the embodiments of the present disclosure, there is provided a computer program product including instructions, which, when executed on a computer, enables the computer to implement the code rate determination method described in the second aspect.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

附图说明Description of drawings

图1是根据一示例性实施例示出的码率确定模型训练方法的流程图;1 is a flowchart of a method for training a code rate determination model according to an exemplary embodiment;

图2是根据一示例性实施例示出的码率确定模型训练过程的示意图FIG. 2 is a schematic diagram illustrating a training process of a rate determination model according to an exemplary embodiment.

图3是根据一示例性实施例示出的获取音频信号对应的目标编码码率的流程图;3 is a flow chart of obtaining a target encoding bit rate corresponding to an audio signal according to an exemplary embodiment;

图4是根据一示例性实施例示出的获取音频信号对应的目标编码码率的过程的示意图;4 is a schematic diagram of a process for obtaining a target encoding bit rate corresponding to an audio signal according to an exemplary embodiment;

图5是根据一示例性实施例示出的码率确定方法的流程图;5 is a flowchart of a method for determining a code rate according to an exemplary embodiment;

图6是根据一示例性实施例示出的码率确定模型训练装置的框图;6 is a block diagram of an apparatus for training a code rate determination model according to an exemplary embodiment;

图7是根据一示例性实施例示出的码率确定装置的框图;7 is a block diagram of an apparatus for determining a code rate according to an exemplary embodiment;

图8是根据一示例性实施例示出的一种电子设备的框图;FIG. 8 is a block diagram of an electronic device according to an exemplary embodiment;

图9是根据一示例性实施例示出的另一种电子设备的框图;FIG. 9 is a block diagram of another electronic device according to an exemplary embodiment;

图10是根据一示例性实施例示出的一种码率确定模型训练装置或者码率确定装置的框图;10 is a block diagram of a code rate determination model training apparatus or a code rate determination apparatus according to an exemplary embodiment;

图11是根据一示例性实施例示出的另一种码率确定模型训练装置或者码率确定装置的框图。FIG. 11 is a block diagram of another code rate determination model training apparatus or code rate determination apparatus according to an exemplary embodiment.

具体实施方式Detailed ways

为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second" and the like in the description and claims of the present disclosure and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.

为了解决相关技术中存在的因音频信号的编码码率高,而导致传输以及存储编码后的音频信号时,造成传输资源及存储资源浪费的技术问题,本公开提供了一种码率确定模型训练方法、码率确定方法及装置。In order to solve the technical problem in the related art that the encoding rate of the audio signal is high, which leads to the waste of transmission resources and storage resources when transmitting and storing the encoded audio signal, the present disclosure provides a rate determination model training method. Method, code rate determination method and device.

第一方面,将对本公开实施例提供的一种码率确定模型训练方法进行详细介绍。In the first aspect, a method for training a rate determination model provided by an embodiment of the present disclosure will be introduced in detail.

如图1所示,本公开实施例提供的一种码率确定模型训练方法,可以包括如下步骤:As shown in FIG. 1, a code rate determination model training method provided by an embodiment of the present disclosure may include the following steps:

在步骤S11中,获取音频样本数据集合。In step S11, an audio sample data set is acquired.

其中,音频样本数据集合中包括不同类型的音频信号。Wherein, the audio sample data set includes different types of audio signals.

具体的,在对码率确定模型进行训练时,需要采集大量的样本数据,即需要采集音频样本数据集合。并且,音频样本数据集合中可以包括不同类型的音频信号。Specifically, when training the code rate determination model, a large amount of sample data needs to be collected, that is, an audio sample data set needs to be collected. Also, different types of audio signals may be included in the audio sample data set.

举例而言,音频样本数据集合中可以包括语音信号,音乐信号以及背景环境音信号等这些不同类型的音频信号,本公开实施例对音频样本数据集合中所包括的音频信号的类型不做具体限定。For example, the audio sample data set may include different types of audio signals such as speech signals, music signals, and background environmental sound signals, and the embodiment of the present disclosure does not specifically limit the types of audio signals included in the audio sample data set .

在步骤S12中,获取每个音频信号的特征信息和音频信号对应的目标编码码率。In step S12, the feature information of each audio signal and the target coding rate corresponding to the audio signal are acquired.

其中,音频信号的特征信息与音频信号的类型相关联,目标编码码率为音频信号满足目标音频质量时的最低编码码率。The feature information of the audio signal is associated with the type of the audio signal, and the target coding rate is the lowest coding rate when the audio signal satisfies the target audio quality.

具体的,在获取到音频样本数据集合后,可以获取音频样本数据集合中每个音频信号的特征信息和目标编码码率。Specifically, after the audio sample data set is acquired, the feature information and target coding rate of each audio signal in the audio sample data set can be acquired.

音频信号的特征信息与音频信号的类型相关联,对于不同类型的音频信号,其特征信息通常也不同。具体的,当音频信号的类型为语音信号时,音频信号的特征信息为语音信号的特征信息;当音频信号的类型为音乐信号时,音频信号的特征信息为音乐信号的特征信息;同样的,当音频信号的类型为背景环境音信号时,音频信号的特征信息为背景环境音信号的特征信息。其中,音频信号的特征信息可以是音频信号在时频域的振幅信息、相位信息等,本公开实施例对音频信号的特征信息不做具体限定。The feature information of the audio signal is associated with the type of the audio signal, and the feature information is usually different for different types of audio signals. Specifically, when the type of the audio signal is a voice signal, the feature information of the audio signal is the feature information of the voice signal; when the type of the audio signal is a music signal, the feature information of the audio signal is the feature information of the music signal; Similarly, When the type of the audio signal is the background ambient sound signal, the feature information of the audio signal is the feature information of the background ambient sound signal. The characteristic information of the audio signal may be amplitude information, phase information, etc. of the audio signal in the time-frequency domain, and the embodiment of the present disclosure does not specifically limit the characteristic information of the audio signal.

并且,为了保证编码后的音频信号在满足指定的音频质量的情况下,能够尽量地节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间,需要目标编码码率为音频信号满足目标音频质量时的最低编码码率。其中,目标音频质量可以为指定的音频质量,该指定的音频质量可以根据实际情况进行确定,例如,对于类型为背景环境音的音频信号而言,指定的音频质量可以较低;对于类型为音乐信号的音频信号而言,指定的音频质量可以较高。本公开实施例对目标音频质量的大小不做具体限定。In addition, in order to ensure that the encoded audio signal can save as much as possible the transmission bandwidth when the encoded audio signal is transmitted and the storage space when the encoded audio signal is stored under the condition that the encoded audio signal satisfies the specified audio quality, the target encoding code is required. The rate is the minimum encoding bit rate when the audio signal meets the target audio quality. The target audio quality may be a specified audio quality, and the specified audio quality may be determined according to actual conditions. For example, for an audio signal whose type is background ambient sound, the specified audio quality may be lower; for an audio signal whose type is music The specified audio quality can be higher in terms of the audio signal of the signal. The embodiment of the present disclosure does not specifically limit the size of the target audio quality.

为了方案描述清楚,将在下面实施例对获取每个音频信号的特征信息和音频信号对应的目标编码码率的具体实施方式进行详细阐述。In order to describe the solution clearly, the specific implementation manner of acquiring the feature information of each audio signal and the target encoding code rate corresponding to the audio signal will be described in detail in the following embodiments.

在步骤S13中,将获取的特征信息输入待训练的码率确定模型中,得到待训练的码率确定模型输出的编码码率。In step S13, the acquired feature information is input into the code rate determination model to be trained, and the encoding code rate output by the code rate determination model to be trained is obtained.

在获取到音频信号的特征信息和音频信号对应的目标编码码率之后,可以对码率确定模型进行训练。具体的,可以将获取到的音频信号的特征信息输入到待训练的码率确定模型,从待训练的码率确定模型中输出音频信号的编码码率。After acquiring the feature information of the audio signal and the target encoding code rate corresponding to the audio signal, the code rate determination model can be trained. Specifically, the acquired feature information of the audio signal may be input into the code rate determination model to be trained, and the encoding code rate of the audio signal is output from the code rate determination model to be trained.

在步骤S14中,根据待训练的码率确定模型输出的编码码率和目标编码码率,获取待训练的码率确定模型的损失值。In step S14, the coding rate and the target coding rate output by the model are determined according to the code rate to be trained, and the loss value of the model is determined by acquiring the code rate to be trained.

具体的,由于码率确定模型的目标输出为目标编码码率,因此,在得到待训练的码率确定模型输出的编码码率后,可以根据待训练的码率确定模型输出的编码码率和目标编码码率,来计算待训练的码率确定模型的损失值。Specifically, since the target output of the code rate determination model is the target encoding code rate, after obtaining the encoding code rate output by the code rate determination model to be trained, the encoding code rate and The target encoding code rate is used to calculate the code rate to be trained to determine the loss value of the model.

可以理解的是,待训练的码率确定模型的损失值可以用于表征从待训练的码率确定模型输出的编码码率与目标编码码率之间差值的大小。如果待训练的码率确定模型的损失值较大,那么,从待训练的码率确定模型输出的编码码率与目标编码码率之间差值较大;如果待训练的码率确定模型的损失值较小,那么,从待训练的码率确定模型输出的编码码率与目标编码码率之间差值较小。It can be understood that the loss value of the rate determination model to be trained can be used to characterize the magnitude of the difference between the encoding rate output from the rate determination model to be trained and the target encoding rate. If the code rate to be trained determines that the loss value of the model is large, then the difference between the encoding code rate output by the model and the target encoding code rate is determined from the code rate to be trained; If the loss value is small, then the difference between the encoding rate output from the model determined from the rate to be trained and the target encoding rate is small.

在步骤S15中,根据损失值调整待训练的码率确定模型的模型参数,直至损失值低于预设阈值时,将待训练的码率确定模型作为训练好的码率确定模型。In step S15, the model parameters of the bit rate determination model to be trained are adjusted according to the loss value, until the loss value is lower than the preset threshold, the bit rate determination model to be trained is used as the trained bit rate determination model.

具体的,如果待训练的码率确定模型的损失值较大,说明从待训练的码率确定模型输出的编码码率与目标编码码率之间差值较大,为了使得从待训练的码率确定模型输出的编码码率接近目标编码码率,可以调整待训练的码率确定模型的模型参数。Specifically, if the loss value of the code rate determination model to be trained is relatively large, it means that the difference between the encoding code rate output from the code rate determination model to be trained and the target encoding code rate is large. The encoding rate output by the rate determination model is close to the target encoding rate, and the model parameters of the rate determination model to be trained can be adjusted.

并且,在调整待训练的码率确定模型的模型参数后,可以再次将音频信号的特征信息输入到待训练的码率确定模型中,再次得到从待训练的码率确定模型输出的编码码率,并根据再次得到的从待训练的码率确定模型输出的编码码率和目标编码码率,计算待训练的码率确定模型的损失值。直至损失值小于预设阈值时,说明从待训练的码率确定模型输出的编码码率接近目标编码码率,此时,可以将待训练的码率确定模型作为训练好的码率确定模型。Moreover, after adjusting the model parameters of the code rate determination model to be trained, the feature information of the audio signal can be input into the code rate determination model to be trained again, and the encoding code rate output from the code rate determination model to be trained is obtained again. , and determine the coding rate and target coding rate output by the model from the code rate to be trained again obtained, and calculate the code rate to be trained to determine the loss value of the model. When the loss value is less than the preset threshold, it means that the coding rate output from the rate determination model to be trained is close to the target encoding rate. At this time, the rate determination model to be trained can be used as the trained rate determination model.

需要说明的是,预设阈值可以根据实际情况进行确定,本公开实施例对预设阈值的大小不做具体限定。It should be noted that the preset threshold may be determined according to the actual situation, and the embodiment of the present disclosure does not specifically limit the size of the preset threshold.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

并且,为了更加直观清楚地了解码率确定模型的训练过程,下面将结合具体实例对码率确定模型训练的过程进行阐述,如图2所示。Moreover, in order to more intuitively and clearly understand the training process of the decoding rate determination model, the following describes the training process of the code rate determination model with reference to a specific example, as shown in FIG. 2 .

在训练码率确定模型时,获取音频信号;提取音频信号的特征,并基于综合分析估计音频信号的编码码率,即获取音频信号对应的目标编码码率,其中,该目标编码码率即为码率确定模型的目标输出。When training the code rate determination model, the audio signal is obtained; the features of the audio signal are extracted, and the coding code rate of the audio signal is estimated based on the comprehensive analysis, that is, the target coding code rate corresponding to the audio signal is obtained, wherein the target coding code rate is The bit rate determines the target output of the model.

然后基于所提取的特征和音频信号的编码码率对神经网络即待训练的码率确定模型进行训练。在训练神经网络的过程中,不断优化神经网络的参数,在神经网络的损失值小于预设阈值时,得到神经网络最优参数,此时,将训练好的神经网络确定为训练好的码率确定模型。Then the neural network, that is, the rate determination model to be trained, is trained based on the extracted features and the encoding rate of the audio signal. In the process of training the neural network, the parameters of the neural network are continuously optimized. When the loss value of the neural network is less than the preset threshold, the optimal parameters of the neural network are obtained. At this time, the trained neural network is determined as the trained bit rate Determine the model.

为了方案描述清楚,下面将对获取音频信号对应的目标编码码率的具体实施方式进行详细阐述。In order to describe the solution clearly, the specific implementation manner of obtaining the target encoding code rate corresponding to the audio signal will be described in detail below.

在一种实施方式中,获取音频信号对应的目标编码码率,如图3所示,可以包括如下步骤:In one embodiment, acquiring the target coding rate corresponding to the audio signal, as shown in FIG. 3 , may include the following steps:

在步骤S31中,根据预设码率对音频信号进行编码以得到编码后的音频信号。In step S31, the audio signal is encoded according to the preset bit rate to obtain an encoded audio signal.

具体的,在确定音频信号的目标编码码率时,可以按照预先确定的预设码率对音频信号进行编码,得到编码后的音频信号。其中,预设码率的数量可以有多个,具体的,这多个预设码率可以是预先确定的数值较大的初始编码码率,以及降低该初始编码码率所得的的编码码率。Specifically, when the target encoding bit rate of the audio signal is determined, the audio signal may be encoded according to a predetermined preset bit rate to obtain an encoded audio signal. The number of preset code rates may be multiple. Specifically, the multiple preset code rates may be a predetermined initial code rate with a larger value, and a code rate obtained by reducing the initial code rate. .

需要说明的是,预设码率的大小可以根据实际情况进行设定,本公开实施例对预设码率的大小不做具体限定。It should be noted that the size of the preset code rate may be set according to actual conditions, and the embodiment of the present disclosure does not specifically limit the size of the preset code rate.

在步骤S32中,根据音频信号和编码后的音频信号,计算编码后的音频信号的质量损失值。In step S32, the quality loss value of the encoded audio signal is calculated according to the audio signal and the encoded audio signal.

具体的,在得到编码后的音频信号后,可以得到编码后的音频信号的音频质量,并可以根据编码后的音频信号的音频质量和编码前的音频信号的信号质量,来确定编码后的音频信号的质量损失值。该质量损失值可以用于衡量编码后的音频信号与编码前的音频信号相比,音频质量的损失程度。Specifically, after obtaining the encoded audio signal, the audio quality of the encoded audio signal can be obtained, and the encoded audio signal can be determined according to the audio quality of the encoded audio signal and the signal quality of the pre-encoded audio signal The quality loss value of the signal. The quality loss value can be used to measure the degree of audio quality loss of the encoded audio signal compared to the pre-encoded audio signal.

其中,计算编码后的音频信号的质量损失值的过程可以为:利用音频质量测评方法对编码后的音频信号的音频质量与编码前的音频信号的音频质量进行质量损失测评,得到编码后的音频信号的质量损失值。The process of calculating the quality loss value of the encoded audio signal may be as follows: using an audio quality evaluation method to evaluate the quality loss of the audio quality of the encoded audio signal and the audio quality of the audio signal before encoding, and obtain the encoded audio The quality loss value of the signal.

并且,音频质量测评方法可以包括客观评测方法和主观评测方法。举例而言,客观评测方法可以为PEAQ(Perceptual Evaluationof Audio Quality,音频质量感知评估)等;主观评测方法可以为MUSHRA(Multi-Stimulus Test with Hidden Reference andAnchor,多激励隐藏参考基准测试方法)等。本公开实施例对音频质量测评方法不做具体限定。例如,PEAQ对编码后的音频信号的音频质量与编码前的音频信号的音频质量进行质量损失测评,所得的编码后的音频信号的质量损失值可以为0.1。And, the audio quality evaluation method may include an objective evaluation method and a subjective evaluation method. For example, the objective evaluation method may be PEAQ (Perceptual Evaluation of Audio Quality, perceptual evaluation of audio quality), etc.; the subjective evaluation method may be MUSHRA (Multi-Stimulus Test with Hidden Reference and Anchor, multi-stimulus hidden reference benchmark test method) and the like. The embodiment of the present disclosure does not specifically limit the audio quality evaluation method. For example, PEAQ evaluates the quality loss of the audio quality of the encoded audio signal and the audio quality of the audio signal before encoding, and the obtained quality loss value of the encoded audio signal may be 0.1.

在步骤S33中,当质量损失值小于质量损失阈值,且质量损失值为最小的质量损失值时,将预设码率确定为音频信号对应的目标编码码率。In step S33, when the quality loss value is less than the quality loss threshold and the quality loss value is the minimum quality loss value, the preset bit rate is determined as the target encoding bit rate corresponding to the audio signal.

其中,质量损失阈值的大小可以为未编码的音频信号的音频质量与目标音频质量之间的差值。The size of the quality loss threshold may be the difference between the audio quality of the uncoded audio signal and the target audio quality.

具体的,如果利用一个预设码率对音频信号进行编码后,所得的编码后的音频信号的质量损失值小于质量损失阈值,且质量损失值为最小的质量损失值时,说明利用该预设码率对音频信号进行编码后,所得的编码后的音频信号的音频质量能够满足目标音频质量,且编码后的音频信号的音频质量刚好满足目标音频质量,也就是说,该预设码率为满足目标音频质量时的最低编码码率。因此,可以将该预设码率确定为音频信号对应的目标编码码率。Specifically, if a preset bit rate is used to encode the audio signal, the quality loss value of the obtained encoded audio signal is less than the quality loss threshold, and the quality loss value is the minimum quality loss value, indicating that the preset code rate is used. After encoding the audio signal at the code rate, the audio quality of the obtained encoded audio signal can meet the target audio quality, and the audio quality of the encoded audio signal just meets the target audio quality, that is to say, the preset code rate is The minimum encoding bit rate to meet the target audio quality. Therefore, the preset bit rate can be determined as the target encoding bit rate corresponding to the audio signal.

作为本公开实施例的一种实现方式,当质量损失值小于质量损失阈值,且质量损失值为最小的质量损失值时,将预设码率确定为音频信号对应的目标编码码率,可以包括如下步骤:As an implementation manner of the embodiment of the present disclosure, when the quality loss value is less than the quality loss threshold and the quality loss value is the minimum quality loss value, the preset bit rate is determined as the target encoding bit rate corresponding to the audio signal, which may include Follow the steps below:

当质量损失值小于质量损失阈值时,减小预设码率,并根据减小后的预设码率对音频信号进行编码以得到编码后的音频信号,直到音频质量损失值大于所述质量损失阈值;When the quality loss value is less than the quality loss threshold, the preset bit rate is reduced, and the audio signal is encoded according to the reduced preset bit rate to obtain an encoded audio signal, until the audio quality loss value is greater than the quality loss threshold;

将前一个减小后的预设码率作为目标编码码率。The previous reduced preset code rate is used as the target encoding code rate.

具体的,在确定音频信号的目标编码码率时,首先可以按照一个较大的预设码率即初始编码码率对音频信号进行编码。该初始编码码率可以为一个能够最大程度保证编码后的音频信号的音频质量的编码码率。Specifically, when the target encoding bit rate of the audio signal is determined, the audio signal may first be encoded according to a relatively large preset bit rate, that is, the initial encoding bit rate. The initial encoding code rate may be an encoding code rate that can ensure the audio quality of the encoded audio signal to the greatest extent.

并且,在按照初始编码码率对音频信号进行编码后,可以将编码后的音频信号的质量损失值与质量损失阈值进行比对,如果编码后的音频信号的质量损失值小于质量损失阈值,说明编码后的音频信号的质量损失值较小,在满足目标音频质量的情况下,可以继续降低预设码率。并按照降低后的预设码率对音频信号再次编码,并将再次编码后的音频信号的质量损失值与质量损失阈值进行比对,如果再次编码后的音频信号的质量损失值仍小于质量损失阈值,则继续降低预设码率,直至编码后的音频信号的质量损失值大于质量损失阈值时,说明前一个减小后的预设码率为编码后的音频信号满足目标音频质量时的最低编码码率,因此,可以将前一个减小后的预设码率作为目标编码码率。In addition, after the audio signal is encoded according to the initial encoding bit rate, the quality loss value of the encoded audio signal can be compared with the quality loss threshold. If the quality loss value of the encoded audio signal is less than the quality loss threshold, it means that The quality loss value of the encoded audio signal is relatively small, and the preset bit rate may continue to be reduced under the condition that the target audio quality is satisfied. and re-encode the audio signal according to the reduced preset bit rate, and compare the quality loss value of the re-encoded audio signal with the quality loss threshold, if the quality loss value of the re-encoded audio signal is still less than the quality loss Threshold, continue to reduce the preset bit rate until the quality loss value of the encoded audio signal is greater than the quality loss threshold, indicating that the previous reduced preset bit rate is the lowest when the encoded audio signal meets the target audio quality. Therefore, the previous reduced preset code rate can be used as the target encoding code rate.

可见,通过本实现方式确定的目标编码码率为编码后的音频信号满足目标音频质量时的最低编码码率。It can be seen that the target encoding bit rate determined by this implementation is the lowest encoding bit rate when the encoded audio signal satisfies the target audio quality.

并且,为了更加直观清楚地了解获取音频信号的目标编码码率的过程,下面将结合具体实例对获取音频信号的目标编码码率的过程进行阐述,如图4所示。Moreover, in order to more intuitively and clearly understand the process of obtaining the target encoding code rate of the audio signal, the following will describe the process of obtaining the target encoding code rate of the audio signal with reference to a specific example, as shown in FIG. 4 .

第一,音频编码器按照初始码率对音频信号进行编码,并对编码后的音频信号进行质量损伤测评。First, the audio encoder encodes the audio signal according to the initial bit rate, and evaluates the quality impairment of the encoded audio signal.

第二,判断质量损伤值是否高于阈值。如果判断结果为否,即质量损伤值低于阈值,则更新码率,即降低初始码率。Second, it is judged whether the quality damage value is higher than the threshold. If the judgment result is no, that is, the quality impairment value is lower than the threshold, the code rate is updated, that is, the initial code rate is reduced.

第三,音频编码器按照更新后的码率对音频信号进行编码,再次得到编码后的音频,并对编码后的音频信号进行质量损伤测评。Third, the audio encoder encodes the audio signal according to the updated bit rate, obtains the encoded audio again, and performs quality impairment assessment on the encoded audio signal.

第四,再次判断质量损伤值是否高于阈值。如果判断结果为否,即质量损伤值低于阈值,则更新码率,即降低初始码率,音频编码器按照更新后的码率对音频信号进行编码。直至判断结果为是,即判断出质量损伤值高于阈值时,输出上一个满足阈值的码率,即输出损伤值低于阈值对应的码率,所输出的码率即为目标编码码率。Fourth, it is judged again whether the quality damage value is higher than the threshold. If the judgment result is no, that is, the quality impairment value is lower than the threshold, the code rate is updated, that is, the initial code rate is reduced, and the audio encoder encodes the audio signal according to the updated code rate. Until the judgment result is yes, that is, when it is judged that the quality impairment value is higher than the threshold, the last bit rate that satisfies the threshold is output, that is, the output impairment value is lower than the bit rate corresponding to the threshold, and the output bit rate is the target encoding bit rate.

为了方案描述清楚,下面将对获取每个音频信号的特征信息的具体实施方式进行详细阐述。In order to describe the solution clearly, a specific implementation manner of acquiring the feature information of each audio signal will be described in detail below.

在一种实施方式中,获取每个音频信号的特征信息,可以包括如下步骤:In one embodiment, acquiring the feature information of each audio signal may include the following steps:

获取每个音频信号在时频域的振幅信息和相位信息,根据振幅信息和/或相位信息确定音频信号的特征信息。Acquire the amplitude information and phase information of each audio signal in the time-frequency domain, and determine the characteristic information of the audio signal according to the amplitude information and/or the phase information.

具体的,可以利用时频转换方法如短时傅里叶变换,将音频信号转换至时频域,得到复数信号S(n,k)。Specifically, a time-frequency conversion method such as short-time Fourier transform can be used to convert the audio signal to the time-frequency domain to obtain a complex signal S(n, k).

S(n,k)=A(n,k)*eiθ(n,k) S(n,k)=A(n,k)*e iθ(n,k)

其中,A(n,k)为振幅信息,θ(n,k)为相位信息。Among them, A(n,k) is the amplitude information, and θ(n,k) is the phase information.

并且,作为本公开实施例的一种实现方式,在得到振幅信息和相位信息后,可以直接将振幅信息作为音频信号的特征信息;或者,可以将相位信息作为音频信号的特征信息;或者,还可以将振幅信息和相位信息均作为音频信号的特征信息,这都是合理的。Moreover, as an implementation manner of the embodiment of the present disclosure, after obtaining the amplitude information and the phase information, the amplitude information can be directly used as the characteristic information of the audio signal; or, the phase information can be used as the characteristic information of the audio signal; or, further It is reasonable to use both the amplitude information and the phase information as the characteristic information of the audio signal.

作为本公开实施例的另一种实现方式,在得到振幅信息和相位信息后,可以通过对振幅信息和/或相位信息进行预设处理,得到音频信号的其他特征信息。其中,其他特征信息可以包括:MFCC(Mel Frequency Cepstrum Coefficient,梅尔频率倒谱系数);梅尔频谱melspectrogram;谱对比度spectral contrast等,本公开实施例对其他音频特征不做具体限定。此时,可以将振幅信息、相位信息以及其他特征信息中的任一种或者多种作为音频信号的特征信息,这都是合理的。As another implementation manner of the embodiment of the present disclosure, after the amplitude information and the phase information are obtained, other characteristic information of the audio signal may be obtained by performing preset processing on the amplitude information and/or the phase information. Wherein, other feature information may include: MFCC (Mel Frequency Cepstrum Coefficient, Mel Frequency Cepstrum Coefficient); Mel spectrum melspectrogram; At this time, any one or more of amplitude information, phase information and other characteristic information may be used as characteristic information of the audio signal, which is reasonable.

可见,通过本实施方式提供的技术方案,可以准确地出音频信号的特征信息。It can be seen that, through the technical solution provided by this embodiment, the feature information of the audio signal can be accurately obtained.

为了方案描述清楚,下面将对获取每个音频信号的特征信息和音频信号对应的目标编码码率的具体实施方式进行详细阐述。In order to describe the solution clearly, a specific implementation manner of acquiring the feature information of each audio signal and the target encoding code rate corresponding to the audio signal will be described in detail below.

在一种实施方式中,获取每个音频信号的特征信息和音频信号对应的目标编码码率,可以包括如下步骤:In one embodiment, acquiring the feature information of each audio signal and the target coding rate corresponding to the audio signal may include the following steps:

获取每个音频信号的每一帧信号的特征信息和音频信号的每一帧信号对应的目标编码码率。Obtain the feature information of each frame of each audio signal and the target encoding code rate corresponding to each frame of the audio signal.

在该实施方式中,在训练码率确定模型时,可以获取每个音频信号的每一帧信号的特征信息和对应的编码码率,也就是说,训练码率确定模型的训练数据较多,因此,训练所得的编码码率确定模型的准确度较高。In this embodiment, when training the code rate determination model, the feature information of each frame of each audio signal and the corresponding encoding code rate can be obtained, that is, the training code rate determination model has more training data, Therefore, the accuracy of the coding rate determination model obtained by training is high.

可见,通过本实施方式得技术方案,训练所得的编码码率确定模型的准确度较高。It can be seen that, through the technical solution obtained in this embodiment, the accuracy of the coding rate determination model obtained by training is relatively high.

在另一种实施方式中,获取每个音频信号的特征信息和音频信号对应的目标编码码率,可以包括如下步骤:In another embodiment, acquiring the feature information of each audio signal and the target coding rate corresponding to the audio signal may include the following steps:

获取每个音频信号中的每一帧信号的特征信息,将各帧信号的特征信息的平均值作为音频信号的特征信息,且获取与音频信号的特征信息对应的目标编码码率。The feature information of each frame signal in each audio signal is obtained, the average value of the feature information of each frame signal is used as the feature information of the audio signal, and the target encoding bit rate corresponding to the feature information of the audio signal is obtained.

在实际应用中,为了降低训练码率确定模型过程的计算量,可以对音频信号的特征信息进行降维。In practical applications, in order to reduce the calculation amount of the process of determining the model by the training code rate, the feature information of the audio signal can be reduced in dimension.

举例而言,如果一个音频信号为连续30帧的音频信号,可以将该30帧的音频信号的特征信息取平均值,得到一帧长度的特征信息,并将这一帧长度的特征信息确定为音频信号的特征信息,此时,目标编码码率为该音频信号的特征信息对应的编码码率。For example, if an audio signal is an audio signal of 30 consecutive frames, the characteristic information of the audio signal of the 30 frames can be averaged to obtain the characteristic information of one frame length, and the characteristic information of this frame length can be determined as The feature information of the audio signal. In this case, the target coding rate is the coding rate corresponding to the feature information of the audio signal.

可见,通过本实施方式得技术方案,可以降低训练码率确定模型过程的计算量。It can be seen that the calculation amount in the process of determining the model by the training code rate can be reduced by the technical solution obtained in this embodiment.

第二方面,将对本公开实施例提供的码率确定方法进行详细介绍。In the second aspect, the code rate determination method provided by the embodiments of the present disclosure will be introduced in detail.

如图5所示,本公开实施例提供的码率确定方法可以包括如下步骤:As shown in FIG. 5 , the code rate determination method provided by the embodiment of the present disclosure may include the following steps:

在步骤S51中,获取待编码音频信号的特征信息。In step S51, characteristic information of the audio signal to be encoded is acquired.

具体的,在对音频信号进行传输或存储时,为了降低传输带宽或存储空间,需要对音频信号进行编码,这些待进行编码的音频信号可以称为待编码音频信号。Specifically, when transmitting or storing audio signals, in order to reduce the transmission bandwidth or storage space, the audio signals need to be encoded, and these audio signals to be encoded may be referred to as to-be-encoded audio signals.

为了准确地得到待编码音频信号对应的编码码率,需要获取待编码音频信号的特征信息,以在后续步骤中,可以将待编码音频信号的特征信息输入第一方面所述的码率确定模型中,得到待编码音频信号对应的编码码率。In order to accurately obtain the encoding bit rate corresponding to the audio signal to be encoded, the feature information of the audio signal to be encoded needs to be acquired, so that in the subsequent steps, the feature information of the audio signal to be encoded can be input into the bit rate determination model described in the first aspect , obtain the encoding bit rate corresponding to the audio signal to be encoded.

在一种实施方式中,获取待编码音频信号的特征信息,可以包括如下步骤:In one embodiment, acquiring the feature information of the audio signal to be encoded may include the following steps:

获取待编码音频信号在时频域的振幅信息和相位信息,根据振幅信息和/或相位信息确定待编码音频信号的特征信息。The amplitude information and phase information of the audio signal to be encoded in the time-frequency domain are acquired, and the characteristic information of the audio signal to be encoded is determined according to the amplitude information and/or the phase information.

具体的,可以利用时频转换方法如短时傅里叶变换,将待编码音频信号转换至时频域,得到复数信号S(n,k)。Specifically, a time-frequency conversion method such as short-time Fourier transform can be used to convert the audio signal to be encoded into the time-frequency domain to obtain a complex signal S(n, k).

S(n,k)=A(n,k)*eiθ(n,k) S(n,k)=A(n,k)*e iθ(n,k)

其中,A(n,k)为振幅信息,θ(n,k)为相位信息。Among them, A(n,k) is the amplitude information, and θ(n,k) is the phase information.

并且,作为本公开实施例的一种实现方式,在得到振幅信息和相位信息后,可以直接将振幅信息作为待编码音频信号的特征信息;或者,可以将相位信息作为待编码音频信号的特征信息;或者,还可以将振幅信息和相位信息均作为待编码音频信号的特征信息,这都是合理的。Moreover, as an implementation manner of the embodiment of the present disclosure, after obtaining the amplitude information and the phase information, the amplitude information can be directly used as the characteristic information of the audio signal to be encoded; or, the phase information can be used as the characteristic information of the audio signal to be encoded. Alternatively, both the amplitude information and the phase information can be used as the characteristic information of the audio signal to be encoded, which is reasonable.

作为本公开实施例的另一种实现方式,在得到振幅信息和相位信息后,可以通过对振幅信息和/或相位信息进行预设处理,得到待编码音频信号的其他特征信息。其中,其他特征信息可以包括:MFCC(Mel Frequency Cepstrum Coefficient,梅尔频率倒谱系数);梅尔频谱melspectrogram;谱对比度spectral contrast等,本公开实施例对其他音频特征不做具体限定。此时,可以将振幅信息、相位信息以及其他特征信息中的任一种或者多种作为待编码音频信号的特征信息,这都是合理的。As another implementation manner of the embodiment of the present disclosure, after the amplitude information and the phase information are obtained, other characteristic information of the audio signal to be encoded may be obtained by performing preset processing on the amplitude information and/or the phase information. Wherein, other feature information may include: MFCC (Mel Frequency Cepstrum Coefficient, Mel Frequency Cepstrum Coefficient); Mel spectrum melspectrogram; At this time, any one or more of amplitude information, phase information and other characteristic information may be used as characteristic information of the audio signal to be encoded, which is reasonable.

在步骤S52中,将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以按照待编码音频信号对应的编码码率对所述待编码音频信号进行编码。In step S52, the feature information of the audio signal to be encoded is input into the code rate determination model described in the first aspect, and the encoding code rate corresponding to the audio signal to be encoded is obtained, and the encoding code rate corresponding to the audio signal to be encoded is obtained. The audio signal to be encoded is encoded.

在得到待编码音频信号的特征信息之后,可以将待编码音频信号的特征信息输入到第一方面训练所得到的码率确定模型中,得到待编码音频信号对应的编码码率。通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,通过待编码音频信号对应的编码码率对待编码音频信号进行编码,在保证音频质量的情况下,最大程度的优化编码码率,从而可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。After the feature information of the audio signal to be encoded is obtained, the feature information of the audio signal to be encoded may be input into the code rate determination model obtained by training in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded. The encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit-rate determination model is appropriate and can ensure the audio quality of the encoded audio signal. Therefore, the to-be-encoded audio signal is encoded by the encoding bit rate corresponding to the to-be-encoded audio signal , Under the condition of ensuring the audio quality, the encoding bit rate is optimized to the greatest extent, thereby saving the transmission bandwidth when the encoded audio signal is transmitted, and the storage space when the encoded audio signal is stored.

本公开实施例提供的技术方案,获取待编码音频信号的特征信息;将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以通过待编码音频信号对应的编码码率对待编码音频信号进行编码。由于通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。The technical solution provided by the embodiment of the present disclosure is to obtain the feature information of the audio signal to be encoded; input the feature information of the audio signal to be encoded into the code rate determination model described in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded, to The to-be-encoded audio signal is encoded by the encoding bit rate corresponding to the to-be-encoded audio signal. Since the encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit rate determination model is appropriate, and the audio quality of the encoded audio signal can be guaranteed, the transmission bandwidth during transmission of the encoded audio signal can be saved, and the encoding The storage space when the audio signal is stored.

并且,在一种实施方式中,获取待编码音频信号的特征信息,可以包括如下步骤:And, in one embodiment, acquiring the feature information of the audio signal to be encoded may include the following steps:

获取待编码音频信号的每一帧信号的特征信息。Obtain characteristic information of each frame of the audio signal to be encoded.

在该实施方式中,可以获取待编码音频信号的每一帧信号的特征信息,这样,后续步骤中,通过将待编码音频信号的每一帧信号的特征信息输入到码率确定模型中,所得到的待编码音频信号对应的编码码率的准确度相对高一些。In this embodiment, the feature information of each frame of the audio signal to be encoded can be obtained. In this way, in the subsequent steps, by inputting the feature information of each frame of the audio signal to be encoded into the code rate determination model, the The accuracy of the encoding bit rate corresponding to the obtained audio signal to be encoded is relatively high.

在另一种实施方式中,获取待编码音频信号的特征信息,可以包括如下步骤:In another embodiment, acquiring the feature information of the audio signal to be encoded may include the following steps:

获取待编码音频信息中的每一帧信号的特征信息,将各帧信号的特征信号的平均值作为待编码音频信号的特征信息。The feature information of each frame of signal in the audio information to be encoded is acquired, and the average value of the feature signals of each frame signal is used as the feature information of the audio signal to be encoded.

在实际应用中,为了降低获取待编码音频信号的特征信息的工作量,可以对待编码音频信号的特征信息进行降维。In practical applications, in order to reduce the workload of acquiring the feature information of the audio signal to be encoded, the feature information of the audio signal to be encoded may be reduced in dimension.

举例而言,如果一个待编码音频信号为连续30帧的音频信号,可以将该30帧的待编码音频信号的特征信息取平均值,得到一帧长度的特征信息,并将这一帧长度的特征信息确定为待编码音频信号的特征信息,这样,后续步骤中,通过将待编码音频信号的特征信息输入到码率确定模型中,也可以得到待编码音频信号对应的编码码率。For example, if an audio signal to be encoded is an audio signal of 30 consecutive frames, the characteristic information of the audio signal to be encoded in the 30 frames can be averaged to obtain the characteristic information of one frame length, and the The feature information is determined as the feature information of the audio signal to be encoded. In this way, in subsequent steps, by inputting the feature information of the audio signal to be encoded into the rate determination model, the encoding bit rate corresponding to the audio signal to be encoded can also be obtained.

根据本公开实施例的第三方面,提供了一种码率确定模型训练装置,如图6所示,所述装置包括:According to a third aspect of the embodiments of the present disclosure, an apparatus for training a code rate determination model is provided. As shown in FIG. 6 , the apparatus includes:

音频信号获取模块610,被配置为执行获取音频样本数据集合,所述音频样本数据集合中包括不同类型的音频信号;an audio signal acquisition module 610, configured to perform acquiring an audio sample data set, where the audio sample data set includes different types of audio signals;

信息及码率获取模块620,被配置为执行获取每个所述音频信号的特征信息和所述音频信号对应的目标编码码率,所述特征信息与所述音频信号的类型相关联,所述目标编码码率为所述音频信号满足目标音频质量时的最低编码码率;The information and code rate acquisition module 620 is configured to perform acquisition of feature information of each of the audio signals and a target encoding code rate corresponding to the audio signal, where the feature information is associated with the type of the audio signal, the The target encoding bit rate is the lowest encoding bit rate when the audio signal meets the target audio quality;

编码码率获取模块630,被配置为执行将获取的所述特征信息输入待训练的码率确定模型中,得到所述待训练的码率确定模型输出的编码码率;The coding rate acquisition module 630 is configured to input the acquired feature information into the code rate determination model to be trained, and obtain the encoding code rate output by the code rate determination model to be trained;

损失值获取模块640,被配置为执行根据所述待训练的码率确定模型输出的编码码率和所述目标编码码率,获取所述待训练的码率确定模型的损失值;A loss value obtaining module 640, configured to determine the coding rate and the target coding rate output by the model according to the code rate to be trained, and obtain the code rate to be trained to determine the loss value of the model;

模型参数调整模块650,被配置为执行根据所述损失值调整所述待训练的码率确定模型的模型参数,直至所述损失值低于预设阈值时,将所述待训练的码率确定模型作为训练好的码率确定模型。The model parameter adjustment module 650 is configured to perform adjusting the code rate to be trained according to the loss value to determine the model parameters of the model, until the loss value is lower than a preset threshold, determine the code rate to be trained The model is used as the trained bit rate determination model.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

可选的,所述信息及码率获取模块,包括:Optionally, the information and code rate acquisition module includes:

音频信号编码单元,被配置为执行根据预设码率对所述音频信号进行编码以得到编码后的音频信号;an audio signal encoding unit, configured to perform encoding on the audio signal according to a preset bit rate to obtain an encoded audio signal;

质量损失值计算单元,被配置为执行根据所述音频信号和所述编码后的音频信号,计算所述编码后的音频信号的质量损失值;a quality loss value calculation unit configured to calculate a quality loss value of the encoded audio signal according to the audio signal and the encoded audio signal;

目标编码码率确定单元,被配置为执行当所述质量损失值小于质量损失阈值,且所述质量损失值为最小的质量损失值时,将所述预设码率确定为所述音频信号对应的目标编码码率。A target encoding bit rate determination unit configured to perform, when the quality loss value is less than a quality loss threshold and the quality loss value is a minimum quality loss value, determine the preset bit rate as the audio signal corresponding to the target encoding bit rate.

可选的,所述目标编码码率确定单元,具体被配置为执行:Optionally, the target coding rate determination unit is specifically configured to execute:

当所述质量损失值小于质量损失阈值时,减小所述预设码率,并根据减小后的预设码率对所述音频信号进行编码以得到编码后的音频信号,直到所述音频质量损失值大于所述质量损失阈值;When the quality loss value is less than the quality loss threshold, the preset bit rate is reduced, and the audio signal is encoded according to the reduced preset bit rate to obtain an encoded audio signal until the audio The mass loss value is greater than the mass loss threshold;

将前一个减小后的预设码率作为目标编码码率。The previous reduced preset code rate is used as the target encoding code rate.

可选的,所述信息及码率获取模块,具体被配置为执行:Optionally, the information and code rate acquisition module is specifically configured to execute:

获取每个所述音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述音频信号的特征信息。Acquire amplitude information and phase information of each of the audio signals in the time-frequency domain, and determine characteristic information of the audio signal according to the amplitude information and/or the phase information.

可选的,所述信息及码率获取模块,具体被配置为执行:Optionally, the information and code rate acquisition module is specifically configured to execute:

获取每个所述音频信号的每一帧信号的特征信息和所述音频信号的每一帧信号对应的目标编码码率;Acquiring feature information of each frame of each of the audio signals and a target encoding code rate corresponding to each frame of the audio signal;

或,获取每个所述音频信号中的每一帧信号的特征信息,将各帧信号的特征信息的平均值作为所述音频信号的特征信息,且获取与所述音频信号的特征信息对应的目标编码码率。Or, obtain the feature information of each frame signal in each of the audio signals, take the average value of the feature information of each frame signal as the feature information of the audio signal, and obtain the feature information corresponding to the audio signal. Target encoding bit rate.

根据本公开实施例的第四方面,提供了一种码率确定装置,如图7所示,所述装置包括:According to a fourth aspect of the embodiments of the present disclosure, an apparatus for determining a code rate is provided. As shown in FIG. 7 , the apparatus includes:

特征信息获取模块710,被配置为执行获取待编码音频信号的特征信息;A feature information obtaining module 710, configured to execute obtaining feature information of the audio signal to be encoded;

编码码率确定模块720,被配置为执行将所述待编码音频信号的特征信息输入第三方面所述的码率确定模型,得到所述待编码音频信号对应的编码码率,以按照所述待编码音频信号对应的编码码率对所述待编码音频信号进行编码。The encoding bit rate determination module 720 is configured to input the characteristic information of the audio signal to be encoded into the bit rate determination model described in the third aspect to obtain the encoding bit rate corresponding to the audio signal to be encoded, so as to obtain the encoding bit rate corresponding to the audio signal to be encoded according to the The to-be-encoded audio signal is encoded at the encoding bit rate corresponding to the to-be-encoded audio signal.

本公开实施例提供的技术方案,获取待编码音频信号的特征信息;将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以通过待编码音频信号对应的编码码率对待编码音频信号进行编码。由于通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。The technical solution provided by the embodiment of the present disclosure is to obtain the feature information of the audio signal to be encoded; input the feature information of the audio signal to be encoded into the code rate determination model described in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded, to The to-be-encoded audio signal is encoded by the encoding bit rate corresponding to the to-be-encoded audio signal. Since the encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit rate determination model is appropriate, and the audio quality of the encoded audio signal can be guaranteed, the transmission bandwidth during transmission of the encoded audio signal can be saved, and the encoding The storage space when the audio signal is stored.

可选的,所述特征信息获取模块,具体被配置为执行:Optionally, the feature information acquisition module is specifically configured to execute:

获取所述待编码音频信号在时频域的振幅信息和相位信息,根据所述振幅信息和/或相位信息确定所述待编码音频信号的特征信息。Acquire amplitude information and phase information of the audio signal to be encoded in the time-frequency domain, and determine characteristic information of the audio signal to be encoded according to the amplitude information and/or phase information.

可选的,所述特征信息获取模块,具体被配置为执行:Optionally, the feature information acquisition module is specifically configured to execute:

获取待编码音频信号的每一帧信号的特征信息;Obtain characteristic information of each frame of the audio signal to be encoded;

或,获取待编码音频信息中的每一帧信号的特征信息,将各帧信号的特征信号的平均值作为所述待编码音频信号的特征信息。Or, the feature information of each frame of signal in the audio information to be encoded is acquired, and the average value of the feature signals of each frame signal is used as the feature information of the audio signal to be encoded.

根据本公开实施例的第五方面,提供了一种电子设备,如图8所示,包括:According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, as shown in FIG. 8 , including:

处理器810;processor 810;

用于存储所述处理器可执行指令的存储器820;a memory 820 for storing the processor-executable instructions;

其中,所述处理器被配置为执行所述指令,以实现第一方面所述的码率确定模型训练方法。Wherein, the processor is configured to execute the instructions to implement the code rate determination model training method described in the first aspect.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

根据本公开实施例的第六方面,提供了一种电子设备,如图9所示,包括:According to a sixth aspect of the embodiments of the present disclosure, an electronic device is provided, as shown in FIG. 9 , including:

处理器910;processor 910;

用于存储所述处理器可执行指令的存储器920;a memory 920 for storing the processor-executable instructions;

其中,所述处理器被配置为执行所述指令,以实现如第二方面所述的码率确定方法。Wherein, the processor is configured to execute the instructions to implement the code rate determination method according to the second aspect.

本公开实施例提供的技术方案,获取待编码音频信号的特征信息;将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以通过待编码音频信号对应的编码码率对待编码音频信号进行编码。由于通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。The technical solution provided by the embodiment of the present disclosure is to obtain the feature information of the audio signal to be encoded; input the feature information of the audio signal to be encoded into the code rate determination model described in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded, to The to-be-encoded audio signal is encoded by the encoding bit rate corresponding to the to-be-encoded audio signal. Since the encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit rate determination model is appropriate, and the audio quality of the encoded audio signal can be guaranteed, the transmission bandwidth during transmission of the encoded audio signal can be saved, and the encoding The storage space when the audio signal is stored.

图10是根据一示例性实施例示出的一种用于训练编码码率确定模型的装置,或者,确定编码码率的装置1000的框图。例如,装置1000可以被提供为一服务器。参照图10,装置1000包括处理组件1022,其进一步包括一个或多个处理器,以及由存储器1032所代表的存储器资源,用于存储可由处理组件1022的执行的指令,例如应用程序。存储器1032中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1022被配置为执行指令,以执行第一方面所述的码率确定模型训练方法,或者,第二方面所述的码率确定方法。FIG. 10 is a block diagram of an apparatus for training an encoding rate determination model, or an apparatus 1000 for determining an encoding rate, according to an exemplary embodiment. For example, the apparatus 1000 may be provided as a server. 10, apparatus 1000 includes a processing component 1022, which further includes one or more processors, and a memory resource, represented by memory 1032, for storing instructions executable by processing component 1022, such as an application program. An application program stored in memory 1032 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute the instructions to perform the code rate determination model training method described in the first aspect, or the code rate determination method described in the second aspect.

装置1000还可以包括一个电源组件1026被配置为执行装置1000的电源管理,一个有线或无线网络接口1050被配置为将装置1000连接到网络,和一个输入输出(I/O)接口1058。装置1000可以操作基于存储在存储器1032的操作系统,例如Windows ServerTM,MacOS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Device 1000 may also include a power supply assembly 1026 configured to perform power management of device 1000 , a wired or wireless network interface 1050 configured to connect device 1000 to a network, and an input output (I/O) interface 1058 . Device 1000 may operate based on an operating system stored in memory 1032, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™ or the like.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

图11是根据一示例性实施例示出的一种用于训练编码码率确定模型的装置,或者,确定编码码率的装置1100的框图。例如,装置1100可以是移动电话,计算机,数字广播电子设备,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。FIG. 11 is a block diagram of an apparatus for training an encoding rate determination model, or an apparatus 1100 for determining an encoding rate, according to an exemplary embodiment. For example, apparatus 1100 may be a mobile phone, computer, digital broadcast electronic device, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and the like.

参照图11,装置1100可以包括以下一个或多个组件:处理组件1102,存储器1104,电力组件1106,多媒体组件1108,音频组件1110,输入/输出(I/O)的接口1112,传感器组件1114,以及通信组件1116。11, the apparatus 1100 may include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input/output (I/O) interface 1112, a sensor component 1114, and communication component 1116.

处理组件1102通常控制装置1100的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1102可以包括一个或多个处理器1120来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1102可以包括一个或多个模块,便于处理组件1102和其他组件之间的交互。例如,处理组件1102可以包括多媒体模块,以方便多媒体组件1108和处理组件1102之间的交互。The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 can include one or more processors 1120 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 1102 may include one or more modules that facilitate interaction between processing component 1102 and other components. For example, processing component 1102 may include a multimedia module to facilitate interaction between multimedia component 1108 and processing component 1102.

存储器1104被配置为存储各种类型的数据以支持在设备1100的操作。这些数据的示例包括用于在装置1100上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。Memory 1104 is configured to store various types of data to support operation at device 1100 . Examples of such data include instructions for any application or method operating on the device 1100, contact data, phonebook data, messages, pictures, videos, and the like. Memory 1104 may be implemented by any type of volatile or non-volatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件1107为装置1100的各种组件提供电力。电源组件1107可以包括电源管理系统,一个或多个电源,及其他与为装置1100生成、管理和分配电力相关联的组件。Power supply component 1107 provides power to various components of device 1100 . Power components 1107 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1100 .

多媒体组件1108包括在所述装置1100和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1108包括一个前置摄像头和/或后置摄像头。当设备1100处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。Multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1108 includes a front-facing camera and/or a rear-facing camera. When the device 1100 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件1110被配置为输出和/或输入音频信号。例如,音频组件1110包括一个麦克风(MIC),当装置1100处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件1116发送。在一些实施例中,音频组件1110还包括一个扬声器,用于输出音频信号。Audio component 1110 is configured to output and/or input audio signals. For example, audio component 1110 includes a microphone (MIC) that is configured to receive external audio signals when device 1100 is in operating modes, such as call mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 404 or transmitted via communication component 1116 . In some embodiments, audio component 1110 also includes a speaker for outputting audio signals.

I/O接口1112为处理组件1102和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1112 provides an interface between the processing component 1102 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.

传感器组件1114包括一个或多个传感器,用于为装置1100提供各个方面的状态评估。例如,传感器组件1114可以检测到设备1100的打开/关闭状态,组件的相对定位,例如所述组件为装置1100的显示器和小键盘,传感器组件1114还可以检测装置1100或装置1100一个组件的位置改变,用户与装置1100接触的存在或不存在,装置1100方位或加速/减速和装置1100的温度变化。传感器组件1114可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1114还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1114还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 1114 includes one or more sensors for providing status assessment of various aspects of device 1100 . For example, the sensor assembly 1114 can detect the on/off state of the device 1100, the relative positioning of components, such as the display and keypad of the device 1100, and the sensor assembly 1114 can also detect a change in the position of the device 1100 or a component of the device 1100 , the presence or absence of user contact with the device 1100 , the device 1100 orientation or acceleration/deceleration and the temperature change of the device 1100 . Sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件1116被配置为便于装置1100和其他设备之间有线或无线方式的通信。装置1100可以接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一个示例性实施例中,通信组件416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1116还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。Communication component 1116 is configured to facilitate wired or wireless communication between apparatus 1100 and other devices. Device 1100 may access wireless networks based on communication standards, such as WiFi, carrier networks (eg, 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置1100可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行第一方面所述的码率确定模型训练方法,或者,第二方面所述的码率确定方法。In an exemplary embodiment, apparatus 1100 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to implement the code rate determination model training method described in the first aspect, or the code rate determination method described in the second aspect .

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1104,上述指令可由装置1100的处理器1120执行以完成上述方法。可选地,例如,存储介质可以是非临时性计算机可读存储介质,例如,所述非临时性非临时性计算机可读存储介质计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium including instructions, such as a memory 1104 including instructions, executable by the processor 1120 of the apparatus 1100 to accomplish the above method. Alternatively, for example, the storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices, etc.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

根据本公开实施例的第七方面,提供了一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如第一方面所述的码率确定模型训练方法。According to a seventh aspect of the embodiments of the present disclosure, there is provided a storage medium, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can execute the code rate according to the first aspect Determine the model training method.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

根据本公开实施例的第八方面,提供了一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行第二方面所述的码率确定方法。According to an eighth aspect of the embodiments of the present disclosure, a storage medium is provided, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can perform the code rate determination described in the second aspect method.

本公开实施例提供的技术方案,获取待编码音频信号的特征信息;将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以通过待编码音频信号对应的编码码率对待编码音频信号进行编码。由于通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。The technical solution provided by the embodiment of the present disclosure is to obtain the feature information of the audio signal to be encoded; input the feature information of the audio signal to be encoded into the code rate determination model described in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded, to The to-be-encoded audio signal is encoded according to the encoding bit rate corresponding to the to-be-encoded audio signal. Since the encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit rate determination model is suitable, and the audio quality of the encoded audio signal can be guaranteed, the transmission bandwidth of the encoded audio signal can be saved, and the encoding The storage space when the audio signal is stored.

根据本公开实施例的第九方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机实现第一方面所述的码率确定模型训练方法。According to a ninth aspect of the embodiments of the present disclosure, there is provided a computer program product including instructions, which, when executed on a computer, enables the computer to implement the code rate determination model training method described in the first aspect.

可见,通过本公开实施例提供的技术方案,码率确定模型的目标输出是目标编码码率,该目标编码码率为音频信号满足目标音频质量时的最低编码码率,这样,后续步骤中,在对待编码音频数据进行编码时,通过该码率确定模型可以得到合适大小的编码码率,并能够保证编码后的音频数据的音频质量。而不像相关技术那样,确定一个较高的编码码率,从而可以节省编码后的音频数据传输时的传输带宽,以及编码后的音频数据存储时的存储空间。It can be seen that, through the technical solutions provided by the embodiments of the present disclosure, the target output of the code rate determination model is the target encoding code rate, and the target encoding code rate is the lowest encoding code rate when the audio signal satisfies the target audio quality. In this way, in the subsequent steps, When encoding the to-be-encoded audio data, a suitable encoding bit rate can be obtained through the bit rate determination model, and the audio quality of the encoded audio data can be guaranteed. Unlike the related art, a higher encoding bit rate is determined, thereby saving the transmission bandwidth when the encoded audio data is transmitted, and the storage space when the encoded audio data is stored.

根据本公开实施例的第十方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机实现第二方面所述的码率确定方法。According to a tenth aspect of the embodiments of the present disclosure, there is provided a computer program product including instructions, which, when executed on a computer, enables the computer to implement the code rate determination method described in the second aspect.

本公开实施例提供的技术方案,获取待编码音频信号的特征信息;将待编码音频信号的特征信息输入第一方面所述的码率确定模型,得到待编码音频信号对应的编码码率,以通过待编码音频信号对应的编码码率对待编码音频信号进行编码。由于通过码率确定模型所得到的待编码音频信号对应的编码码率大小合适,且能够保证编码后的音频信号的音频质量,因此,可以节省编码后的音频信号传输时的传输带宽,以及编码后的音频信号存储时的存储空间。The technical solution provided by the embodiment of the present disclosure is to obtain the feature information of the audio signal to be encoded; input the feature information of the audio signal to be encoded into the code rate determination model described in the first aspect to obtain the encoding code rate corresponding to the audio signal to be encoded, to The to-be-encoded audio signal is encoded by the encoding bit rate corresponding to the to-be-encoded audio signal. Since the encoding bit rate corresponding to the to-be-encoded audio signal obtained by the bit rate determination model is appropriate, and the audio quality of the encoded audio signal can be guaranteed, the transmission bandwidth during transmission of the encoded audio signal can be saved, and the encoding The storage space when the audio signal is stored.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily suggest themselves to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for rate-determining model training, the method comprising:
acquiring an audio sample data set, wherein the audio sample data set comprises different types of audio signals;
acquiring characteristic information of each audio signal and a target coding rate corresponding to the audio signal, wherein the characteristic information is associated with the type of the audio signal, and the target coding rate is the lowest coding rate when the audio signal meets the target audio quality;
inputting the acquired characteristic information into a code rate determination model to be trained to obtain a coding code rate output by the code rate determination model to be trained;
determining the coding rate output by the model according to the code rate to be trained and the target coding rate, and obtaining the loss value of the code rate determination model to be trained;
and adjusting model parameters of the code rate determination model to be trained according to the loss value until the loss value is lower than a preset threshold value, and taking the code rate determination model to be trained as the trained code rate determination model.
2. The method of claim 1, wherein obtaining the target coding rate corresponding to the audio signal comprises:
encoding the audio signal according to a preset code rate to obtain an encoded audio signal;
calculating a quality loss value of the encoded audio signal from the audio signal and the encoded audio signal;
and when the quality loss value is smaller than a quality loss threshold value and the quality loss value is the minimum quality loss value, determining the preset code rate as the target coding code rate corresponding to the audio signal.
3. The method of claim 2, wherein when the quality loss value is smaller than a quality loss threshold and the quality loss value is a minimum quality loss value, determining the preset code rate as a target coding code rate corresponding to the audio signal comprises:
when the quality loss value is smaller than a quality loss threshold, reducing the preset code rate, and encoding the audio signal according to the reduced preset code rate to obtain an encoded audio signal until the audio quality loss value is larger than the quality loss threshold;
and taking the previous reduced preset code rate as a target coding code rate.
4. A method for determining a code rate, the method comprising:
acquiring characteristic information of an audio signal to be encoded;
inputting the characteristic information of the audio signal to be encoded into the code rate determination model of any one of claims 1 to 3 to obtain the encoding code rate corresponding to the audio signal to be encoded, so as to encode the audio signal to be encoded according to the encoding code rate corresponding to the audio signal to be encoded.
5. An apparatus for rate-determining model training, the apparatus comprising:
the audio signal acquisition module is configured to execute acquisition of an audio sample data set, wherein the audio sample data set comprises different types of audio signals;
an information and code rate obtaining module configured to perform obtaining feature information of each audio signal and a target coding rate corresponding to the audio signal, where the feature information is associated with a type of the audio signal, and the target coding rate is a lowest coding rate at which the audio signal meets a target audio quality;
the code rate obtaining module is configured to input the obtained characteristic information into a code rate determination model to be trained to obtain a code rate output by the code rate determination model to be trained;
The loss value obtaining module is configured to execute the coding rate output by the code rate determination model to be trained and the target coding rate, and obtain the loss value of the code rate determination model to be trained;
and the model parameter adjusting module is configured to adjust the model parameters of the code rate determining model to be trained according to the loss value until the loss value is lower than a preset threshold value, and the code rate determining model to be trained is used as the trained code rate determining model.
6. An apparatus for determining a code rate, the apparatus comprising:
a feature information acquisition module configured to perform acquisition of feature information of an audio signal to be encoded;
an encoding rate determination module, configured to input the feature information of the audio signal to be encoded into the rate determination model of claim 5, to obtain an encoding rate corresponding to the audio signal to be encoded, so as to encode the audio signal to be encoded according to the encoding rate corresponding to the audio signal to be encoded.
7. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the code rate determination model training method of any of claims 1 to 3.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the code rate determination method of claim 4.
9. A storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the code rate determination model training method of any of claims 1 to 3.
10. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the code rate determination method of claim 4.
CN202010575623.7A 2020-06-22 2020-06-22 A code rate determination model training method, code rate determination method and device Pending CN111862995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010575623.7A CN111862995A (en) 2020-06-22 2020-06-22 A code rate determination model training method, code rate determination method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010575623.7A CN111862995A (en) 2020-06-22 2020-06-22 A code rate determination model training method, code rate determination method and device

Publications (1)

Publication Number Publication Date
CN111862995A true CN111862995A (en) 2020-10-30

Family

ID=72988049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010575623.7A Pending CN111862995A (en) 2020-06-22 2020-06-22 A code rate determination model training method, code rate determination method and device

Country Status (1)

Country Link
CN (1) CN111862995A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767956A (en) * 2021-04-09 2021-05-07 腾讯科技(深圳)有限公司 Audio encoding method, apparatus, computer device and medium
CN113194320A (en) * 2021-04-30 2021-07-30 北京达佳互联信息技术有限公司 Parameter prediction model training method and device and parameter prediction method and device
CN115334349A (en) * 2022-07-15 2022-11-11 北京达佳互联信息技术有限公司 Audio processing method and device, electronic equipment and storage medium
CN115410586A (en) * 2022-07-26 2022-11-29 北京达佳互联信息技术有限公司 Audio processing method and device, electronic equipment and storage medium
CN115641857A (en) * 2022-09-26 2023-01-24 北京达佳互联信息技术有限公司 Audio processing method, device, electronic device, storage medium and program product
CN115831133A (en) * 2022-09-29 2023-03-21 北京达佳互联信息技术有限公司 Audio processing method, device, electronic device and storage medium
WO2023077707A1 (en) * 2021-11-02 2023-05-11 深圳市中兴微电子技术有限公司 Video encoding method, model training method, device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07160297A (en) * 1993-12-10 1995-06-23 Nec Corp Voice parameter encoding system
WO1997031367A1 (en) * 1996-02-26 1997-08-28 At & T Corp. Multi-stage speech coder with transform coding of prediction residual signals with quantization by auditory models
US6839674B1 (en) * 1998-01-12 2005-01-04 Stmicroelectronics Asia Pacific Pte Limited Method and apparatus for spectral exponent reshaping in a transform coder for high quality audio
JP2007017659A (en) * 2005-07-07 2007-01-25 Fujitsu Ltd Audio encoding method and apparatus
US20110125506A1 (en) * 2009-11-26 2011-05-26 Research In Motion Limited Rate-distortion optimization for advanced audio coding
US20140249806A1 (en) * 2011-10-28 2014-09-04 Panasonic Corporation Audio encoding apparatus, audio decoding apparatus, audio encoding method, and audio decoding method
US20170104552A1 (en) * 2015-10-10 2017-04-13 Dolby Laboratories Licensing Corporation Near Optimal Forward Error Correction System and Method
CN110300315A (en) * 2019-07-24 2019-10-01 北京达佳互联信息技术有限公司 A kind of video code rate determines method, apparatus, electronic equipment and storage medium
CN110992963A (en) * 2019-12-10 2020-04-10 腾讯科技(深圳)有限公司 Network communication method, device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07160297A (en) * 1993-12-10 1995-06-23 Nec Corp Voice parameter encoding system
WO1997031367A1 (en) * 1996-02-26 1997-08-28 At & T Corp. Multi-stage speech coder with transform coding of prediction residual signals with quantization by auditory models
US6839674B1 (en) * 1998-01-12 2005-01-04 Stmicroelectronics Asia Pacific Pte Limited Method and apparatus for spectral exponent reshaping in a transform coder for high quality audio
JP2007017659A (en) * 2005-07-07 2007-01-25 Fujitsu Ltd Audio encoding method and apparatus
US20110125506A1 (en) * 2009-11-26 2011-05-26 Research In Motion Limited Rate-distortion optimization for advanced audio coding
US20140249806A1 (en) * 2011-10-28 2014-09-04 Panasonic Corporation Audio encoding apparatus, audio decoding apparatus, audio encoding method, and audio decoding method
US20170104552A1 (en) * 2015-10-10 2017-04-13 Dolby Laboratories Licensing Corporation Near Optimal Forward Error Correction System and Method
CN110300315A (en) * 2019-07-24 2019-10-01 北京达佳互联信息技术有限公司 A kind of video code rate determines method, apparatus, electronic equipment and storage medium
CN110992963A (en) * 2019-12-10 2020-04-10 腾讯科技(深圳)有限公司 Network communication method, device, computer equipment and storage medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767956A (en) * 2021-04-09 2021-05-07 腾讯科技(深圳)有限公司 Audio encoding method, apparatus, computer device and medium
CN112767956B (en) * 2021-04-09 2021-07-16 腾讯科技(深圳)有限公司 Audio encoding method, apparatus, computer device and medium
WO2022213787A1 (en) * 2021-04-09 2022-10-13 腾讯科技(深圳)有限公司 Audio encoding method, audio decoding method, apparatus, computer device, storage medium, and computer program product
US12444427B2 (en) 2021-04-09 2025-10-14 Tencent Technology (Shenzhen) Company Limited Audio encoding method, audio decoding method, apparatus, computer device, storage medium, and computer program product
JP7599030B2 (en) 2021-04-09 2024-12-12 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 AUDIO ENCODING METHOD, AUDIO DECODING METHOD, APPARATUS, COMPUTER DEVICE, AND COMPUTER PROGRAM
JP2024501933A (en) * 2021-04-09 2024-01-17 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Audio encoding method, audio decoding method, device, computer equipment and computer program
CN113194320A (en) * 2021-04-30 2021-07-30 北京达佳互联信息技术有限公司 Parameter prediction model training method and device and parameter prediction method and device
CN113194320B (en) * 2021-04-30 2022-11-22 北京达佳互联信息技术有限公司 Parameter prediction model training method and device and parameter prediction method and device
WO2023077707A1 (en) * 2021-11-02 2023-05-11 深圳市中兴微电子技术有限公司 Video encoding method, model training method, device, and storage medium
CN115334349B (en) * 2022-07-15 2024-01-02 北京达佳互联信息技术有限公司 Audio processing method, device, electronic equipment and storage medium
CN115334349A (en) * 2022-07-15 2022-11-11 北京达佳互联信息技术有限公司 Audio processing method and device, electronic equipment and storage medium
CN115410586A (en) * 2022-07-26 2022-11-29 北京达佳互联信息技术有限公司 Audio processing method and device, electronic equipment and storage medium
CN115641857A (en) * 2022-09-26 2023-01-24 北京达佳互联信息技术有限公司 Audio processing method, device, electronic device, storage medium and program product
CN115831133A (en) * 2022-09-29 2023-03-21 北京达佳互联信息技术有限公司 Audio processing method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN111862995A (en) A code rate determination model training method, code rate determination method and device
CN113362812B (en) A speech recognition method, device and electronic equipment
CN110827253A (en) Training method and device of target detection model and electronic equipment
CN110890083B (en) Audio data processing method and device, electronic equipment and storage medium
CN105895115A (en) Squeal determining method and squeal determining device
CN112201267B (en) Audio processing method and device, electronic equipment and storage medium
CN115273831A (en) Voice conversion model training method, voice conversion method and device
CN111640424B (en) Voice recognition method and device and electronic equipment
CN110992963A (en) Network communication method, device, computer equipment and storage medium
CN110415702A (en) Training method and device, conversion method and device
CN111461304A (en) Classification neural network training method, text classification method, device and equipment
CN107995676A (en) terminal control method and device
CN116741191A (en) Audio signal processing method, device, electronic equipment and storage medium
CN108364635B (en) Voice recognition method and device
CN110942782A (en) Voice compression method, voice decompression method, voice compression device, voice decompression device and electronic equipment
CN110931028B (en) A voice processing method, device and electronic device
CN110390953A (en) It utters long and high-pitched sounds detection method, device, terminal and the storage medium of voice signal
CN107437412B (en) Acoustic model processing method, voice synthesis method, device and related equipment
CN115052150B (en) Video encoding method, device, electronic device and storage medium
CN110580910B (en) Audio processing method, device, equipment and readable storage medium
CN107564534B (en) Audio quality identification method and device
CN112019948A (en) Intercom device communication method, intercom device and storage medium
CN111405319A (en) Bandwidth determination method and device, electronic equipment and storage medium
CN111292761A (en) Voice enhancement method and device
CN111225208A (en) Video coding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201030