Compression algorithm of audio flow

文档序号:36639 发布日期:2021-09-24 浏览:36次 中文

阅读说明:本技术 一种音频流量的压缩算法 (Compression algorithm of audio flow ) 是由 黄超 蒋泽飞 于 2021-06-20 设计创作,主要内容包括:本发明公开了一种音频流量的压缩算法,包括以下步骤;步骤一、进行去噪处理;步骤二、对去噪处理后的音频数据计算功率谱密度,如果功率谱密度小于所设定的阈值,则把音频数据包标识为音频静态帧格式,并把向服务器发送的音频数据包数据字段填为空;步骤三、服务端收到带有音频静态帧的数据包之后,对音频数据进行转发;步骤四、客户端PC软件或APP软件收到服务端转发的音频数据包之后,在播放的时候客户端对带有音频静态帧的数据包标识为静音。本发明能够对前端摄像机芯片编码输出的音频数据的噪声进行去除,可以改善客户端播放音频声音的用户体验,减轻了服务端的流量压力,降低了服务器的使用费用。(The invention discloses a compression algorithm of audio flow, which comprises the following steps of; step one, carrying out denoising treatment; step two, calculating the power spectral density of the audio data after the denoising treatment, if the power spectral density is smaller than a set threshold value, marking the audio data packet into an audio static frame format, and filling the data field of the audio data packet sent to the server into a null; step three, after receiving the data packet with the audio static frame, the server side forwards the audio data; and fourthly, after the client PC software or the APP software receives the audio data packet forwarded by the server, the client marks the data packet with the audio static frame as mute in the playing process. The invention can remove the noise of the audio data output by the front-end camera chip code, can improve the user experience of playing audio sound by the client, reduces the flow pressure of the server and reduces the use cost of the server.)

1. An audio traffic compression algorithm, characterized by: comprises the following steps;

step one, carrying out denoising treatment;

step two, calculating the power spectral density of the audio data after the denoising treatment, if the power spectral density is smaller than a set threshold value, marking the audio data packet into an audio static frame format, and filling the data field of the audio data packet sent to the server into a null;

step three, after receiving the data packet with the audio static frame, the server side forwards the audio data;

and fourthly, after the client PC software or the APP software receives the audio data packet forwarded by the server, the client marks the data packet with the audio static frame as mute in the playing process.

2. A compression algorithm for audio traffic according to claim 1, characterized by: there are configuration items in the client PC software or APP to configure the power spectral density value of the audio.

3. A compression algorithm for audio traffic according to claim 2, characterized in that: the user can adjust the power spectral density value according to the current monitored ambient sound condition through the configuration item, select useful sound information to be reserved, and filter sound information which is considered to be useless by the user.

Technical Field

The invention relates to the technical field of electronic information, in particular to an audio flow compression algorithm.

Background

The audio compression technology mainly encodes an original digital audio signal (PCM) into formats such as g.711a, g.711u, AAC, Opus and the like for transmission, or filters some negligible audio data on the basis of not losing useful audio information, so as to reduce the pressure of occupying network bandwidth in the transmission process, but when the audio signal in the original PCM format is encoded, a large amount of noise and distortion phenomena appear in the audio signal, and moreover, the audio data directly adopting the PCM format occupies a large amount of physical space and network bandwidth for storage and transmission, so the digital audio signal has particularly outstanding advantages in data storage and transmission and also has corresponding disadvantages. The digital audio compression coding is to compress audio data as much as possible under the condition of ensuring that audio signals are not distorted in hearing, and to remove redundant information in sound, wherein redundant components refer to information which cannot be sensed by human ears in the audio, and the redundant information does not help to determine information such as tone, tone and the like of the sound, so that the problem which needs to be solved correspondingly in the network transmission of the audio code stream of the camera in the security industry also exists.

Once the video cameras connected to the platform reach the level of tens of millions or even hundreds of millions, when a large amount of video data are transmitted to the server at the same time, a large flow pressure is generated on the server, and the video data transmitted by the video cameras need to be optimized in order to save the flow cost of the server.

Disclosure of Invention

The present invention is directed to provide an audio traffic compression algorithm to solve the above problems in the prior art.

In order to achieve the purpose, the invention provides the following technical scheme: an audio traffic compression algorithm comprising the steps of;

step one, carrying out denoising treatment;

step two, calculating the power spectral density of the audio data after the denoising treatment, if the power spectral density is smaller than a set threshold value, marking the audio data packet into an audio static frame format, and filling the data field of the audio data packet sent to the server into a null;

step three, after receiving the data packet with the audio static frame, the server side forwards the audio data;

and fourthly, after the client PC software or the APP software receives the audio data packet forwarded by the server, the client marks the data packet with the audio static frame as mute in the playing process.

Preferably, there are configuration items in the client PC software or APP that configure the power spectral density value of the audio.

Preferably, the user can adjust the power spectral density value according to the currently monitored ambient sound condition through the configuration item, select useful sound information to be reserved, and filter sound information which is considered to be useless by the user.

The compression algorithm of the audio flow provided by the invention has the beneficial effects that:

1. the invention can remove the noise of the audio data output by the front-end camera chip code, and can improve the user experience of playing audio sound by the client;

2. the audio data after the noise is removed is not sent to the server, and the audio data content lower than the audio static frame threshold configured by the user is not sent to the server, so that the flow pressure of the server is reduced, and the use cost of the server is reduced.

Drawings

FIG. 1 is a flow chart of the present invention for processing CameraSDK internal audio data;

fig. 2 is a flow chart of the processing of live and played back audio packets according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1-2, the present invention provides a technical solution: an audio traffic compression algorithm comprising the steps of;

step one, carrying out denoising treatment;

step two, calculating the power spectral density of the audio data after the denoising treatment, if the power spectral density is smaller than a set threshold value, marking the audio data packet into an audio static frame format, and filling the data field of the audio data packet sent to the server into a null;

step three, after receiving the data packet with the audio static frame, the server side forwards the audio data;

fourthly, after the client PC software or the APP software receives the audio data packet forwarded by the server, the client marks the data packet with the audio static frame as mute in the playing process;

the method comprises the steps that configuration items configured for the power spectral density value of the audio are arranged in client PC software or APP, and because audio information collected by a camera is relevant to ambient environment information, a user can adjust the power spectral density value according to the current monitored ambient environment sound condition, select useful sound information to be reserved and filter sound information which the user considers useless.

Example (b): when audio data is preprocessed in a Camera system DK, firstly, denoising is carried out, the audio data output by the coding of a camera chip comprises white noise and colored noise, the audio data packet stuffed in the Camera system DK needs to be decoded and converted into a PCM audio format, then, Fourier expansion is carried out on the PCM audio data, the white noise and the colored noise are filtered by a digital filter, and then the audio data of the PCM after denoising is coded into the original audio coding format stuffed in the Camera system DK;

secondly, counting the power spectrum density of audio data converted into PCM after denoising processing in the last 2 seconds plugged into the Camera SDK, reporting a default value of the audio power spectrum density to an ESD (configuration center server) inside the camera Camera SDK, wherein the default value of the power spectrum density of the audio supports client PC software or APP software to perform user configuration, comparing the power spectrum density value of the audio calculated by the camera SDK with the power spectrum density value configured by the user, if the power spectrum density value of the audio is smaller than the currently configured audio power spectrum density value, marking all audio data packets plugged into the Camera SDK into an audio static frame format, and filling an audio data field into a NULL (NULL) when sending the audio data packets to a service end;

if the audio power spectral density value calculated after two seconds is larger than the audio power spectral density value configured by the user, identifying all audio data packets plugged into the CamerasDK as normal audio formats, and filling the audio data fields with the audio data after denoising when the audio data packets are sent to the server;

after the server receives the static frame identification of the audio data packet, the server forwards the audio data packet, and when the client PC software or APP software plays, the server mutes the identification of the received audio data packet with the audio static frame identification.

Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:回声处理方法、装置、设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!