[go: up one dir, main page]

CN101059957A - An audio coding selective cryptographic method - Google Patents

An audio coding selective cryptographic method Download PDF

Info

Publication number
CN101059957A
CN101059957A CNA2007100522406A CN200710052240A CN101059957A CN 101059957 A CN101059957 A CN 101059957A CN A2007100522406 A CNA2007100522406 A CN A2007100522406A CN 200710052240 A CN200710052240 A CN 200710052240A CN 101059957 A CN101059957 A CN 101059957A
Authority
CN
China
Prior art keywords
frame
bits
encrypted
encryption
class5
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.)
Granted
Application number
CNA2007100522406A
Other languages
Chinese (zh)
Other versions
CN101059957B (en
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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN2007100522406A priority Critical patent/CN101059957B/en
Publication of CN101059957A publication Critical patent/CN101059957A/en
Application granted granted Critical
Publication of CN101059957B publication Critical patent/CN101059957B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本发明公开了一种语音编码选择性加密方法,其包括步骤A,首先进行初始化,选择加密所需安全等级,确定混沌流加密方法的调节参数;步骤B,按照帧速率和安全等级确定选用的加密字节序号表和比特位置表中的参数的比特位,利用混沌流加密方法执行加密操作。还可以包括步骤C,解密方接到加密数据后,首先进行初始化,然后执行解密操作。其按安全等级选择确定需要加密的语音编码的数据位,提高语音通话的实时性,降低系统能耗,满足不同等级的业务需求。

The invention discloses a speech coding selective encryption method, which includes step A, firstly perform initialization, select the security level required for encryption, and determine the adjustment parameters of the chaotic flow encryption method; step B, determine the selected one according to the frame rate and security level The bits of the parameters in the byte sequence number table and the bit position table are encrypted, and the encryption operation is performed by using a chaotic stream encryption method. Step C may also be included. After receiving the encrypted data, the decryption party first performs initialization and then performs a decryption operation. It selects and determines the data bits of speech codes that need to be encrypted according to the security level, improves the real-time performance of voice calls, reduces system energy consumption, and meets business requirements of different levels.

Description

一种语音编码选择性加密方法A Speech Coding Selective Encryption Method

技术领域technical field

本发明涉及语音编码技术领域。尤其是涉及一种语音编码选择性加密方法,特别是涉及G.723.1语音编码的选择性加密方法。The invention relates to the technical field of speech coding. In particular, it relates to a selective encryption method of speech coding, especially a selective encryption method of G.723.1 speech coding.

背景技术Background technique

随着通信业务需求的飞速增长,为了保证通信业务数据的传输,人们大力开展各种数据压缩技术的研究工作。而语音信号的压缩数字化传输,是多年以来人们一直努力的方向。With the rapid growth of communication service demands, in order to ensure the transmission of communication service data, people vigorously carry out the research work of various data compression technologies. The compressed digital transmission of voice signals has been the direction that people have been working hard for many years.

现有技术一般采用低速率语音编码技术进行语音传输。低速率语音编码是在尽量减少失真的情况下,降低编码速率,以便减小传输时所占用的带宽。其相比较于模拟传输,可以节省带宽,便于实现与互联网(Internet Protocol,IP)的融合。The prior art generally adopts low-rate speech coding technology for speech transmission. Low-rate speech coding is to reduce the coding rate while minimizing distortion, so as to reduce the bandwidth occupied during transmission. Compared with analog transmission, it can save bandwidth and facilitate integration with the Internet (Internet Protocol, IP).

G.723.1是国际电信联盟(International Telecommunication Union,ITU)为低码率多媒体通信制定的语音编码标准。该语音编码方案是ITU-T H.324标准系列的组成部分,能够以非常低的码率压缩语音或多媒体设备的其它音频信号分量,具有6.3kbps和5.3kbps两种码率。高码率(6.3kbs)时的激励信号为多脉冲最大似然量化(Multipulse Maximum Likelihood Quantization,MP-MLQ);低码率(5.3kbs)时的激励信号为代数码本激励线性预测(Algebraic-Code-Excited Linear-Prediction,ACELP)。G.723.1语音信号的帧长30ms,240个采样值,。编码器采用线性预测-合成分析编码,使感知加权误差信号最小。G.723.1 is a voice coding standard developed by the International Telecommunication Union (ITU) for low-bit-rate multimedia communications. This speech coding scheme is a part of the ITU-T H.324 standard series, which can compress speech or other audio signal components of multimedia equipment at a very low bit rate, with two bit rates of 6.3kbps and 5.3kbps. The excitation signal at high code rate (6.3kbs) is Multipulse Maximum Likelihood Quantization (MP-MLQ); the excitation signal at low code rate (5.3kbs) is algebraic codebook excitation linear prediction (Algebraic- Code-Excited Linear-Prediction, ACELP). The frame length of G.723.1 speech signal is 30ms, 240 sampling values. The encoder employs linear prediction-synthesis analysis coding to minimize the perceptually weighted error signal.

在编码过程中,一次输入一帧,每帧经过高通滤波去掉直流分量,然后分成4个子帧,每子帧60个采样点。用线性预测分析法(Linear Predictive,LP)对语音信号进行短时预测分析,对每个子帧用加窗后的语音信号计算其线性预测编码(Linear Predictive Coding,LPC)的10阶滤波器系数,这4个子帧的LPC系数将用来建立短时感知加权滤波器,这个滤波器作用于整个帧并且得到感知加权信号。最后一子帧的LPC滤波器系数还将被转换成线谱对(Line Spectrum Pairs,LSP)系数,然后使用预测分裂矢量量化器量化。In the encoding process, one frame is input at a time, and each frame is high-pass filtered to remove the DC component, and then divided into 4 subframes, each with 60 sampling points. Carry out short-term predictive analysis on the speech signal with the linear predictive analysis method (Linear Predictive, LP), calculate the 10th order filter coefficient of its linear predictive coding (Linear Predictive Coding, LPC) for each subframe with the speech signal after adding the window, The LPC coefficients of these 4 subframes will be used to establish a short-term perceptual weighting filter, which is applied to the entire frame and obtains a perceptual weighting signal. The LPC filter coefficients of the last subframe will also be converted into Line Spectrum Pairs (LSP) coefficients, and then quantized using a predictive split vector quantizer.

如图1所示,为G.723.1编码原理图。G.723.1利用语音样点间的短时相关性和相邻语音段的长时相关性,以及对语音去除两种相关后的余量信号分别进行编码。As shown in Figure 1, it is a schematic diagram of G.723.1 encoding. G.723.1 utilizes the short-term correlation between speech samples and the long-term correlation of adjacent speech segments, and encodes the residual signals after removing the two correlations.

首先进行语音短时分析编码:1)语音信号经过高通滤波后的240个点和上一帧的后120个点合成360个样点,若当前帧为语音信号的第一帧,则前面的120个样点就全为0;2)把样点分成相互交叠的4段,每一段长180,用汉明窗函数相乘加权,以减小分段带来的吉普斯效应;3)通过自相关函数等计算,求得线性预测系数。由语音信号的短时相关性,可知语音信号的预测系数在帧内变化不会很大,所以在本编码器中仅用最后10个预测系数(每一帧内最后一个子帧的LPC参数)来近似代替本帧语音的预测系数。First carry out short-term speech analysis encoding: 1) 240 points of the speech signal after high-pass filtering and the last 120 points of the previous frame are synthesized into 360 samples, if the current frame is the first frame of the speech signal, then the preceding 120 points Each sample point is all 0; 2) Divide the sample points into 4 overlapping sections, each section is 180 long, and use the Hamming window function to multiply and weight to reduce the Gibbs effect brought by the segmentation; 3) Pass Calculate the autocorrelation function, etc., and obtain the linear prediction coefficient. From the short-term correlation of the speech signal, it can be seen that the prediction coefficient of the speech signal will not change greatly within the frame, so only the last 10 prediction coefficients (the LPC parameters of the last subframe in each frame) are used in this encoder To approximately replace the prediction coefficient of the speech of this frame.

其次,把每一个子帧的LPC参数转换为线谱对(LSP)参数,用预测分裂矢量量化(Predictive Split Vector Quantizer,PSVQ)器量化、编码后加以传送:把线谱对(LSP)残差矢量(去除了长时直流分量的LSP矢量与LSP预测矢量的差值,是10维矢量)分成3个子矢量,维数分别是3、3、4,然后对每个子矢量进行8bit码本量化,这样就产生了3个8bit码本矢量,共24位码本。Secondly, the LPC parameters of each subframe are converted into line spectrum pair (LSP) parameters, quantized and encoded by a Predictive Split Vector Quantizer (PSVQ) and transmitted: the line spectrum pair (LSP) residual The vector (the difference between the LSP vector and the LSP prediction vector after the long-term DC component is removed, is a 10-dimensional vector) is divided into 3 sub-vectors, the dimensions are 3, 3, and 4, and then 8-bit codebook quantization is performed on each sub-vector. In this way, three 8-bit codebook vectors are generated, with a total of 24-bit codebooks.

为了提高量化感知质量,高通滤波后的语音信号需通过共振峰感知加权滤波器和谐振峰噪声整形滤波器,对语音信号进行滤波,以生成初始目标信号。共振峰感知加权滤波器的参数由各子帧未量化的LPC系数构成;谐振峰噪声整形滤波器的参数通过对每两子帧进行开环基音周期估计得到。In order to improve the perceptual quality of quantization, the high-pass filtered speech signal needs to pass through formant perceptual weighting filter and formant noise shaping filter to filter the speech signal to generate the initial target signal. The parameters of the formant-aware weighting filter are composed of unquantized LPC coefficients of each subframe; the parameters of the formant noise shaping filter are obtained by performing open-loop pitch period estimation on every two subframes.

对语音信号进行加权滤波和谐噪声滤波,其间还对信号作长时分析(即基音成分,也即周期成分),即先后进行开环基音估计和闭环基音预测,得到语音长时参数编码,最后对语音去除长时相关。其中,偶子帧的基音周期(自适应码本)用7比特编码,奇子帧的基音周期用2比特差分编码。Carry out weighted filtering and noise filtering on the voice signal, during which the signal is also analyzed for a long time (that is, the pitch component, that is, the periodic component), that is, the open-loop pitch estimation and the closed-loop pitch prediction are performed successively to obtain the long-term parameter coding of the speech, and finally the Speech Removal of Long-Term Correlation. Wherein, the pitch period (adaptive codebook) of the even subframe is encoded with 7 bits, and the pitch period of the odd subframe is encoded with 2 bits of difference.

而余量信号由目标向量减去长时贡献得到。对余量信号的编码(固定码本)可选择6.3kbit/s或5.3kbit/s两种码率。前者(MP-MLQ算法)利用余量信号中小信号对合成语音质量影响不大,故可以对余量信号进行削波处理留下幅度较大者进行编码;后者(ACELP算法)用码本中存储的码字来替代余量信号,以搜索出与余量信号之间均方误差最小的码矢量进行传输。两种算法的区别在于用来代替余量信号的编码脉冲数目不同:代数码本激励线性预测(ACELP)所用的脉冲数略少于MP-MLQ的脉冲数。The margin signal is obtained by subtracting the long-term contribution from the target vector. Two code rates of 6.3kbit/s or 5.3kbit/s can be selected for encoding (fixed codebook) of the residual signal. The former (MP-MLQ algorithm) utilizes the small signal in the residual signal to have little effect on the quality of the synthesized speech, so the residual signal can be clipped to leave the one with a larger amplitude for encoding; the latter (ACELP algorithm) is used in the codebook. The stored codeword is used to replace the residual signal, and the code vector with the smallest mean square error between the residual signal and the residual signal is searched for transmission. The difference between the two algorithms lies in the number of coded pulses used to replace the residual signal: Algebraic Codebook Excited Linear Prediction (ACELP) uses slightly fewer pulses than MP-MLQ.

如图2所示,为G.723.1解码原理图,其首先从接收码流中提取LSP码本索引值,经过LSP解码、内插得到每一子帧的LSP参数,转换为LPC参数,构成LPC合成滤波器。然后从接收码流中提取每一子帧的基音周期、基音增益码本索引和激励脉冲信息,分别经过基音解码和激励解码得到激励信号e(n),对其进行基音滤波再经过合成滤波器获得重建语音,重建语音经过共振峰后滤波器和增益调整单元即得到解码器的最后输出。As shown in Figure 2, it is a schematic diagram of G.723.1 decoding. It first extracts the LSP codebook index value from the received code stream, and obtains the LSP parameters of each subframe after LSP decoding and interpolation, and converts them into LPC parameters to form LPC Synthesis filter. Then extract the pitch period, pitch gain codebook index and excitation pulse information of each subframe from the received code stream, and obtain the excitation signal e(n) through pitch decoding and excitation decoding respectively, perform pitch filtering on it and then pass through the synthesis filter The reconstructed speech is obtained, and the reconstructed speech is passed through a post-formant filter and a gain adjustment unit to obtain the final output of the decoder.

由以上过程可知,被编码器处理后的一帧信号需传输的参数包括:声道参数,即LSP参数,用以在解码端构造LPC合成滤波器;激励参数,即基音周期参数与长时预测增益参数,随机码本的脉冲位置参数和增益参数。From the above process, it can be seen that the parameters to be transmitted for a frame signal processed by the encoder include: channel parameters, that is, LSP parameters, used to construct an LPC synthesis filter at the decoding end; excitation parameters, that is, pitch period parameters and long-term prediction Gain parameter, pulse position parameter and gain parameter of random codebook.

传统的语音编码加密方法都是对G.723.1压缩语音流整体进行加密。The traditional voice coding and encryption methods encrypt the entire G.723.1 compressed voice stream.

然而与文本消息相比,语音流数据量大,实时性要求高,直接用传统加密算法如AES(Advanced Encryption Standard)、3DES(3Data EncryptionStandard)算法等对其进行整体加密,会引起明显的时延,降低其实时性性能。不仅如此,它还会显著增加系统的运算负荷,占用更多资源,消耗更多能源。这在许多场合,诸如移动通信等对低能耗十分苛求的情况下,是无法忍受的。另外,对语音数据流进行整体加密,不方便满足不同等级的业务需求。However, compared with text messages, voice streams have a large amount of data and high real-time requirements. Directly using traditional encryption algorithms such as AES (Advanced Encryption Standard) and 3DES (3Data Encryption Standard) algorithms to encrypt them as a whole will cause obvious delays , reducing its real-time performance. Not only that, it will significantly increase the computing load of the system, occupy more resources, and consume more energy. This is unbearable in many occasions, such as mobile communications, where low energy consumption is very demanding. In addition, the overall encryption of the voice data stream is inconvenient to meet the business requirements of different levels.

发明内容Contents of the invention

本发明所要解决的问题在于提供一种语音编码选择性加密方法,其按安全等级选择确定需要加密的语音编码的数据位。The problem to be solved by the present invention is to provide a selective encryption method for speech coding, which selects and determines the data bits of speech coding that need to be encrypted according to the security level.

为实现本发明而提供的一种语音编码选择性加密方法,包括下列步骤:A kind of speech coding selective encryption method provided for realizing the present invention, comprises the following steps:

步骤A,首先进行初始化,选择加密所需安全等级,确定混沌流加密方法的调节参数;Step A, first perform initialization, select the security level required for encryption, and determine the adjustment parameters of the chaotic flow encryption method;

步骤B,按照帧速率和安全等级确定选用的加密字节序号表和比特位置表中的参数的比特位,利用混沌流加密方法执行加密操作。Step B, according to the frame rate and security level, determine the bits of parameters in the encrypted byte sequence number table and bit position table, and use the chaotic stream encryption method to perform encryption operations.

所述的语音编码选择性加密方法,还可以包括下列步骤:The speech coding selective encryption method may also include the following steps:

步骤C,解密方接到加密数据后,首先进行初始化,然后执行解密操作。In step C, after the decryption party receives the encrypted data, it first performs initialization and then performs a decryption operation.

所述步骤A包括下列步骤:Described step A comprises the following steps:

步骤A1,用户选择加密所需的安全等级;Step A1, the user selects the security level required for encryption;

步骤A2,确定混沌流加密方法的调节参数;Step A2, determining the adjustment parameters of the chaotic flow encryption method;

步骤A3,取调节参数中的初始值的有效二进制位,转换字节型数据,将转换的数据存入一数组作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得密文。Step A3, get the effective binary bits of the initial value in the adjustment parameter, convert the byte data, store the converted data in an array as a key stream table, and perform XOR operation with the bits to be encrypted in the plain text of the voice data stream to get the ciphertext.

所述步骤B包括下列步骤:Said step B comprises the following steps:

步骤B1,根据收到的一帧语音帧的头两位,判断其是高速率帧,低速率帧,还是静音帧;Step B1, judge whether it is a high-rate frame, a low-rate frame, or a silent frame according to the first two bits of a received voice frame;

步骤B2,根据不同的帧,转到相应的步骤进行处理:Step B2, according to different frames, go to the corresponding steps for processing:

如果是高速率帧,则选用高速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤B3;If it is a high-rate frame, select the byte sequence number table corresponding to the high rate and the bit position table corresponding to the required security level, and go to step B3;

如果是低速率帧,则选用以上低速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤B3;If it is a low-rate frame, select the byte sequence number table corresponding to the above low rate and the bit position table corresponding to the required security level, and go to step B3;

如果是静音帧,则不需要加密,转回到步骤B1,转而处理下一帧;If it is a silent frame, no encryption is required, and it returns to step B1 to process the next frame;

步骤B3,在按照帧速率和安全等级确定选用的加密字节序号表和比特位置表后,执行当前帧的加密操作;Step B3, after determining the selected encrypted byte sequence number table and bit position table according to the frame rate and security level, perform the encryption operation of the current frame;

步骤B4,完成当前帧的加密操作后,如果密钥流使用完,利用所述混沌流加密方法中的调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,则转回步骤B1,转而处理下一帧。Step B4, after completing the encryption operation of the current frame, if the key stream is used up, use the adjustment parameters in the chaotic stream encryption method to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; If there are speech frames, go back to step B1 and process the next frame.

所述步骤C包括下列步骤:Described step C comprises the following steps:

步骤C1,接收控制参数并解密得到加密安全等级,并解密得到混沌流加密方法的调节参数;Step C1, receiving and decrypting the control parameters to obtain the encryption security level, and decrypting to obtain the adjustment parameters of the chaotic flow encryption method;

步骤C2,取调节参数的有效二进制位,转换为字节型数据,将转换的数据存入字节型数组作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得明文;Step C2, take the effective binary digits of the adjustment parameters, convert them into byte data, store the converted data into the byte array as the key stream table, and perform XOR operation with the bits to be encrypted in the plain text of the voice data stream, to obtain plaintext;

步骤C3,执行当前帧的具体解密操作流程;Step C3, execute the specific decryption operation process of the current frame;

步骤C4,完成当前帧的解密操作后,如果密钥流使用完,利用调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,转而处理下一帧。Step C4, after completing the decryption operation of the current frame, if the key stream is used up, use the adjustment parameters to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; if there are still speech frames, turn to Process the next frame.

所述混沌流加密方法为Logistics映射的一维非线性迭代方法表征的混沌流加密方法。The chaotic flow encryption method is a chaotic flow encryption method characterized by a one-dimensional nonlinear iterative method of Logistic mapping.

所述Logistics映射的一维非线性迭代方法为改进的Logistics地图一维非线性迭代方法,所述迭代方法如下式所示:The one-dimensional nonlinear iterative method of the Logistics map is an improved one-dimensional nonlinear iterative method of the Logistics map, and the iterative method is shown in the following formula:

G(x)=(β+1)(1+1/β)β×(1-x)β G(x)=(β+1)(1+1/β) β ×(1-x) β

其中,β∈(1,4),x0∈(0,1),x的初始值为x0,通过此式迭代可以得到x1,x2,x3,...xn...。Among them, β∈(1, 4), x 0 ∈ (0, 1), the initial value of x is x 0 , through iteration of this formula, x 1 , x 2 , x 3 , ... x n ... .

所述步骤B中,按帧速率和加密所需的安全等级确定选用的加密字节序号表和比特位置表,为:In the step B, the encryption byte sequence number table and the bit position table selected for use are determined according to the security level required for the frame rate and encryption, which is:

确定语音帧中参数的比特位的敏感性排列顺序,以此将比特位分为不同类别,加密不同类别的比特位获得不同安全等级。Determine the sensitivity arrangement order of the bit bits of the parameters in the speech frame, so as to divide the bits into different categories, and encrypt the bits of different categories to obtain different security levels.

所述语音编码为G.723.1标准语音帧的语音编码。The speech coding is the speech coding of the G.723.1 standard speech frame.

所述语音帧中参数的比特位的敏感性排列顺序为五个类,分别为CLASS1,CLASS2,CLASS3,CLASS4,CLASS5,其重要性依次降低。The sensitivity arrangement order of the bit bits of the parameters in the speech frame is five categories, respectively CLASS1, CLASS2, CLASS3, CLASS4, and CLASS5, and their importance decreases in order.

当安全等级为Level 1时,加密CLASS1中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的48bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的38bit位加密;When the security level is Level 1, the bits in CLASS1 are encrypted, and the 48bit bits in the voice frame are encrypted in the high rate mode of the G.723.1 standard voice frame; the voice is encrypted in the low rate mode of the G.723.1 standard voice frame 38bit bit encryption in the frame;

当安全等级为Level 2时,加密CLASS1和CLASS2中的比特位,在G.723.1标准语音帧的高速率模式对语音帧中的62bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的52bit位加密;When the security level is Level 2, the bits in CLASS1 and CLASS2 are encrypted, and the 62bit bits in the voice frame are encrypted in the high rate mode of the G.723.1 standard voice frame; 52bit encryption in voice frames;

当安全等级为Level 3时,加密CLASS1、CLASS2和CLASS3中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的74bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的64bit位加密;When the security level is Level 3, encrypt the bits in CLASS1, CLASS2 and CLASS3, and encrypt 74 bits in the voice frame in the high rate mode of the G.723.1 standard voice frame; in the low rate mode of the G.723.1 standard voice frame In this mode, the 64bit bits in the voice frame are encrypted;

当安全等级为Level 4时,加密CLASS1、CLASS2、CLASS3和CLASS4中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的86bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的76bit位加密。When the security level is Level 4, the bits in CLASS1, CLASS2, CLASS3 and CLASS4 are encrypted, and the 86bit bits in the voice frame are encrypted in the high-speed mode of the G.723.1 standard voice frame; in the G.723.1 standard voice frame Encrypt 76 bits in voice frames in low rate mode.

本发明的有益效果是:本发明的语音编码选择性加密方法,一方面提高语音通话的实时性。在语音帧中进行选择性加密,即在帧间,仅对携带有语音信息的高/低速率帧进行加密,对大量的SID帧(静音帧)不加密;在帧内,按安全等级的需要,对那些敏感性高的比特位(即对重建语音影响大)进行加密。与传统的对语音媒体内容进行整体加密相比,这无疑加快加密速度;另一方面,能够降低系统能耗,减少对资源的占用。其通过对语音帧进行选择性加密,这些措施在提高效率的同时,也可以降低系统能耗,减少占用的资源数量。降低能耗在一些能源资源十分紧张的应用环境中,如无线通信领域中其移动设备携带能量有限,是非常关键的问题。减少对资源的占用,也可减轻网络处理节点的负荷。进一步地,其能够便于满足不同等级的业务需求。选择性加密不仅仅可以从技术上满足更好的需求,它在许多互联网的业务中,也有实际的应用价值。比如,提供各类音频服务的网站,其语音材料可以以不同的加密强度提供给用户,如果是免费提供给用户试听,可以对语音采取某种加密强度,以进行模糊处理。诸如此类的许多应用,总之,选择性加密为不同等级的业务需求提供了可行性与良好的技术支持。The beneficial effects of the present invention are: the speech coding selective encryption method of the present invention improves the real-time performance of the speech conversation on the one hand. Selective encryption is performed in voice frames, that is, between frames, only the high/low rate frames carrying voice information are encrypted, and a large number of SID frames (silent frames) are not encrypted; within frames, according to the needs of the security level , to encrypt those bits with high sensitivity (that is, having a great influence on reconstructed speech). Compared with the traditional overall encryption of voice media content, this undoubtedly speeds up the encryption speed; on the other hand, it can reduce system energy consumption and resource occupation. By selectively encrypting speech frames, these measures can not only improve efficiency, but also reduce system energy consumption and reduce the amount of resources occupied. Reducing energy consumption is a very critical issue in some application environments where energy resources are very tight, such as the limited energy carried by mobile devices in the field of wireless communications. Reducing the occupation of resources can also reduce the load of network processing nodes. Further, it can facilitate meeting business demands of different levels. Selective encryption can not only meet better technical requirements, but also has practical application value in many Internet businesses. For example, for websites that provide various audio services, the voice materials can be provided to users with different encryption strengths. If they are provided for free to users for trial listening, a certain encryption strength can be used for the voice to perform obfuscation. Many applications like this, in short, selective encryption provides feasibility and good technical support for different levels of business needs.

附图说明Description of drawings

图1为现有技术G.723.1标准语音帧的语音编码原理图;Fig. 1 is the speech coding principle diagram of prior art G.723.1 standard speech frame;

图2为现有技术G.723.1标准语音帧的语音解码原理图;Fig. 2 is the speech decoding principle diagram of prior art G.723.1 standard speech frame;

图3为本发明语音编码选择性加密方法流程图;Fig. 3 is the flow chart of speech coding selective encryption method of the present invention;

图4为本发明语间编码选择性加密过程示意图;Fig. 4 is a schematic diagram of the selective encryption process of interlingual coding in the present invention;

图5为图4中步骤S100初始化过程流程图;FIG. 5 is a flowchart of the initialization process of step S100 in FIG. 4;

图6为图4中步骤S200选择确定比特位,执行加密操作过程流程图;Fig. 6 is that step S200 in Fig. 4 selects and confirms bit position, carries out the flow chart of encryption operation process;

图7为图4中步骤S300解密过程流程图;Fig. 7 is a flowchart of the decryption process of step S300 in Fig. 4;

图8为本发明一实施例G.723.1标准语音帧高速率帧安全等级为1时第3字节开始加密过程示意图;Fig. 8 is a schematic diagram of the encryption process of the third byte when the high-rate frame security level of the G.723.1 standard voice frame is 1 according to an embodiment of the present invention;

图9为图8所示G.723.1标准语音帧第10字节加密过程示意图;Fig. 9 is the schematic diagram of the 10th byte encryption process of the G.723.1 standard voice frame shown in Fig. 8;

图10为图8所示G.723.1标准语音帧第11字节加密过程示意图;Fig. 10 is a schematic diagram of the 11th byte encryption process of the G.723.1 standard voice frame shown in Fig. 8;

图11为图8所示G.723.1标准语音帧第12字节加密过程示意图;Fig. 11 is the schematic diagram of the 12th byte encryption process of the G.723.1 standard voice frame shown in Fig. 8;

图12为图8所示G.723.1标准语音帧第14字节加密过程示意图;Fig. 12 is the schematic diagram of the 14th byte encryption process of the G.723.1 standard voice frame shown in Fig. 8;

图13为图8所示G.723.1标准语音帧的下一帧从第3字节开始加密过程示意图。FIG. 13 is a schematic diagram of the encryption process starting from the third byte of the next frame of the G.723.1 standard voice frame shown in FIG. 8 .

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明的一种语音编码选择性加密方法进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solution and advantages of the present invention clearer, a voice coding selective encryption method of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

一般地,在对语音加密效果的衡量标准中,包括客观和主观评测两方面,但对于低速率的窄带压缩语音信号,客观评测的参数如信噪比等,很难真正反映其表现性能,而主观评测更贴近实际情况,所以通常更注重主观评测。主观评测上的几个主要衡量标准即包括以下几点:Generally speaking, the measurement standard of speech encryption effect includes both objective and subjective evaluation, but for low-rate narrowband compressed speech signals, the parameters of objective evaluation, such as signal-to-noise ratio, etc., are difficult to truly reflect its performance, while Subjective evaluation is closer to the actual situation, so it usually pays more attention to subjective evaluation. Several main measurement criteria in subjective evaluation include the following points:

1、语音可理解性(语义)1. Speech intelligibility (semantics)

2、语音的性别判断2. Voice gender judgment

3、明文攻击3. Plaintext attack

4、静音/非静音的区分4. Mute/non-mute distinction

这也就是在语音的主观评测上希望达到的标准,也就是说,本发明实施例中,应当通过加密,使人在听过语音后不可再做出关于以上几点的有效的分辨行为。This is the standard that is expected to be achieved in the subjective evaluation of speech. That is to say, in the embodiment of the present invention, it should be encrypted so that people can no longer make effective discrimination behaviors about the above points after listening to the speech.

需要说明的是,以上四个标准相当于加密安全强度最高的要求。本发明实施例中不同的安全等级得到的加密效果不一样,并不是都可以满足以上四个标准,并且本发明中的方法是对加密的效率和安全强度的一种折中,在两者间寻求一个平衡点。以上标准仅仅是一个我们希望达到的总的标准与原则,与本发明的安全等级等等没有直接关联联系,也没有先后排序。It should be noted that the above four standards correspond to the highest encryption security requirements. In the embodiment of the present invention, the encryption effects obtained by different security levels are not the same, and not all of them can meet the above four standards, and the method in the present invention is a compromise between encryption efficiency and security strength. Find a balance. The above standard is only a general standard and principle that we hope to achieve, and has no direct relationship with the security level of the present invention, etc., and there is no sequence.

数字语音、图像以及视频压缩数据流都有一个特性,即感官上的不均衡重要性(nonuniform perceptual importance),也就是说,数据流中一部分位上发生的错误比在其他位上发生的错误所带来的影响要显著的多。Digital voice, image, and video compressed data streams all have a property of nonuniform perceptual importance, that is, errors occurring in some bits of the data stream are less frequent than errors occurring in other bits. The impact is much more significant.

到目前为止,关于这个结论的最重要的应用就是在无线信道多媒体数据传输中采用的不均等错误保护(Unequal Error Protection,UEP)机制。So far, the most important application of this conclusion is the Unequal Error Protection (UEP) mechanism used in wireless channel multimedia data transmission.

因此,不同于加密整个多媒体流,本发明语音编码选择性加密方法,采用一种选择性加密方法,与传统加密方法中加密所有数据的做法不一样,选择性加密方法仅对一部分对感知影响更为重大的比特位进行加密,而剩余的部分则直接不加保护的在信道中传输,即通过保持加密后数据格式信息和控制信息不变,只加密实际数据,从而保持加密后数据流的相容性,其在确保所需安全强度的情况下,降低运算负荷,也就节省了更多的资源、能耗,传输速度得到了很大的提高,在实时性方面也就有了更好的表现,能够满足实时性要求。同时,选择性加密方法可以要求与具体的数据格式相结合,根据安全性水平要求的不同,选择加密不同的敏感数据,从而满足不同的需求,Therefore, different from encrypting the entire multimedia stream, the selective encryption method for voice coding of the present invention adopts a selective encryption method, which is different from the way of encrypting all data in the traditional encryption method, and the selective encryption method only affects a part more on perception Encrypt important bits, while the rest are directly transmitted in the channel without protection, that is, by keeping the encrypted data format information and control information unchanged, only the actual data is encrypted, so as to maintain the similarity of the encrypted data stream. Capacitance, it reduces the computing load while ensuring the required security strength, which saves more resources and energy consumption, greatly improves the transmission speed, and has better real-time performance. The performance can meet the real-time requirements. At the same time, the selective encryption method can be required to be combined with a specific data format. According to different security level requirements, different sensitive data can be encrypted to meet different needs.

本发明实施例以G.723.1语音编码的选择性加密来说明本发明的语音编码选择性加密方法,但是本发明并不限定于只适用于G.723.1语音编码,其同样可以适用于其它标准的语音编码。The embodiment of the present invention uses the selective encryption of G.723.1 speech coding to illustrate the speech coding selective encryption method of the present invention, but the present invention is not limited to only applicable to G.723.1 speech coding, and it can be applicable to other standards Speech coding.

如图3和图4所示,其中,图3本发明语音编码选择性加密方法流程图;图4为本发明语音编码选择性加密过程示意图;下面详细说明本发明的一种语音编码选择性加密方法:As shown in Fig. 3 and Fig. 4, wherein, Fig. 3 speech coding selective encryption method flowchart of the present invention; Fig. 4 is the speech coding selective encryption process schematic diagram of the present invention; A kind of speech coding selective encryption of the present invention is described in detail below method:

步骤S100,首先进行初始化,选择加密所需安全等级,确定加密迭代方法的调节参数;Step S100, first perform initialization, select the security level required for encryption, and determine the adjustment parameters of the encryption iteration method;

如图5所示,其具体包括如下步骤:As shown in Figure 5, it specifically includes the following steps:

步骤S110,用户选择加密所需的安全等级Level;Step S110, the user selects the security level Level required for encryption;

步骤S120,确定Logistics映射的一维非线性迭代方法表征混沌流加密方法的调节参数x0和β;Step S120, determining the adjustment parameters x 0 and β of the chaotic flow encryption method represented by the one-dimensional nonlinear iterative method of the Logistics map;

用户选择这两个参数x0和β,此两个参数即相当于密钥。x0在0~1之间取值,β在1...~4之间取值,对小数点后的位数没有要求,较佳地,鉴于计算机可处理的位数,两个参数在小数点后取不超过10位。本发明实施例举例说明,所述两个参数为取值x0=0.3,β=3.78。同时,需要说明的是,可以在计算机VC编程环境中,将此两个参数存储为双精度浮点数类型,以便于选取64位有效二进制位。The user selects these two parameters x 0 and β, and these two parameters are equivalent to the key. x 0 takes a value between 0 and 1, β takes a value between 1...~4, and there is no requirement for the number of digits after the decimal point. Preferably, in view of the number of digits that the computer can handle, the two parameters are in the Take no more than 10 digits afterward. The embodiment of the present invention illustrates that the two parameters take values x 0 =0.3 and β=3.78. At the same time, it should be noted that in the computer VC programming environment, these two parameters can be stored as double-precision floating-point numbers, so as to select 64 effective binary digits.

步骤S130,取调节参数中的初始值x0的小数点后的64位有效二进制位,转换为8个字节型(byte)数据,将转换的数组存入一数组作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得密文。Step S130, get the 64 effective binary digits after the decimal point of the initial value x0 in the adjustment parameter, convert it into 8 byte type (byte) data, store the converted array into an array as the key stream table, in order to The XOR operation is performed with the bits to be encrypted in the plaintext of the voice data stream to obtain the ciphertext.

所述转换为现有技术,其将64个二进制位分为8组,每一组8个比特位刚好形成一个字节型数据;Described conversion is prior art, and it divides 64 binary digits into 8 groups, and each group of 8 bits just forms a byte type data;

所述密钥流表为将转换的数据存入一长度为8的字节型(byte)型数组keyList[]得到,其用以和语音数据流明文要加密的位进行异或运算,以获得密文。The key stream table is obtained by storing the converted data into a byte type (byte) type array keyList[] with a length of 8, and it is used to carry out an XOR operation with the bits to be encrypted in plain text of the voice data stream to obtain ciphertext.

步骤S200,按照帧速率(帧长度)和安全等级确定选用的加密字节序号表和比特位置表,执行加密操作。Step S200, determine the selected encryption byte sequence number table and bit position table according to the frame rate (frame length) and security level, and execute the encryption operation.

在语音编码加密的过程中,用户在选择加密所需安全等级Level后,就要根据具体的加密对象G.723.1的语音编码的格式特点,选择确定需要加密的语音编码的比特位。In the process of speech coding encryption, after the user selects the security level Level required for encryption, the user must select and determine the bits of the speech coding to be encrypted according to the format characteristics of the speech coding of the specific encrypted object G.723.1.

如图6所示,具体包括如下步骤:As shown in Figure 6, it specifically includes the following steps:

步骤S210,首先根据收到的一帧语音帧的头两位,判断其是高速率帧(帧长24字节,6.3kbps),低速率帧(帧长20字节,5.3kbps),还是SID帧(静音帧);Step S210, at first according to the first two bits of a received frame of voice frame, judge whether it is a high rate frame (24 bytes of frame length, 6.3kbps), a low rate frame (20 bytes of frame length, 5.3kbps), or SID frame(silent frame);

步骤S220,根据不同的帧,转到相应的步骤进行处理;Step S220, according to different frames, turn to corresponding steps for processing;

Case1:如果是高速率帧,则选用高速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤S230;Case1: if it is a high-rate frame, then select the byte sequence number table corresponding to the high-rate to be encrypted and the bit position table corresponding to the required security level, and go to step S230;

Case2:如果是低速率帧,则选用以上低速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤S230;Case2: if it is a low-rate frame, then select the byte sequence number table corresponding to the above low-rate to be encrypted and the bit position table corresponding to the required security level, and go to step S230;

Case3:如果是SID帧(静音帧),则不需要加密,转回到步骤S210,转而处理下一帧;Case3: if it is a SID frame (silent frame), then no encryption is required, and it turns back to step S210 to process the next frame;

步骤S230,在按照帧速率(帧长度)和安全等级确定选用的加密字节序号表和比特位置表后,执行当前帧的加密操作。Step S230, after determining the selected encryption byte sequence number table and bit position table according to the frame rate (frame length) and security level, perform the encryption operation of the current frame.

步骤240,完成当前帧的加密操作后,如果密钥流使用完,利用所述混沌流加密方法中的调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,则转回步骤210,转而处理下一帧。Step 240, after the encryption operation of the current frame is completed, if the key stream is used up, use the adjustment parameters in the chaotic stream encryption method to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; If there are speech frames, go back to step 210 and process the next frame.

进一步地,还可以包括下列步骤:Further, the following steps may also be included:

步骤S300,解密方接到加密数据后,首先进行初始化,然后执行解密操作。In step S300, after receiving the encrypted data, the decryption party first performs initialization and then performs a decryption operation.

如图7所示,具体包括如下步骤:As shown in Figure 7, it specifically includes the following steps:

步骤S310,接收控制参数并解密得到加密安全等级level,并解密得到混沌流加密方法的调节参数x0和β;Step S310, receiving and decrypting the control parameters to obtain the encrypted security level level, and decrypting to obtain the adjustment parameters x 0 and β of the chaotic flow encryption method;

步骤S320,取x0的小数点后的64位有效二进制位,转换为8个byte型数据,将转换的数据存入一长度为8的byte型数组keyList[]作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得明文;Step S320, take the 64 effective binary digits after the decimal point of x 0 , convert them into 8 byte data, and store the converted data into a byte array keyList[] with a length of 8 as a key stream table for use with The bits to be encrypted in the plaintext of the voice data stream are XORed to obtain the plaintext;

步骤S330,执行当前帧的具体解密操作流程;Step S330, execute the specific decryption operation process of the current frame;

步骤S340,完成当前帧的解密操作后,如果密钥流使用完,利用调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,转而处理下一帧。Step S340, after completing the decryption operation of the current frame, if the key stream is used up, use the adjustment parameters to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; if there are voice frames, turn to Process the next frame.

执行本发明选择性加密方法的具体解密流程,与执行加密操作流程相对应,本领域的技术人员可以根据本发明具体实施例所描述的加密过程而完成解密过程,因此,在本发明实施例中,不再一一进行详细描述。The specific decryption process for performing the selective encryption method of the present invention corresponds to the execution of the encryption operation process, and those skilled in the art can complete the decryption process according to the encryption process described in the specific embodiment of the present invention. Therefore, in the embodiment of the present invention , will not be described in detail one by one.

下面详细说明步骤S120中确定Logistics映射的一维非线性迭代方法表征的混沌流加密方法的调节参数X0和β的具体方法过程:The specific method process of the adjustment parameters X 0 and β of the chaotic flow encryption method characterized by the one-dimensional nonlinear iterative method of determining the Logistics mapping in the step S120 is described in detail below:

较佳地,综合考虑选择性加密的特点、效率以及安全性,本发明实施例中采用混沌流加密算法,异或操作以字节为单位,但对混沌密钥流的使用进行改进,结合对G.723.1帧结构所选择的需要加密部分位置的特点,可以适当地对混沌密钥流进行重复使用,而不十分影响其安全性能,从而提高效率。Preferably, considering the characteristics, efficiency and security of selective encryption, the chaotic stream encryption algorithm is adopted in the embodiment of the present invention, and the XOR operation is in bytes, but the use of the chaotic key stream is improved, combined with the The feature of the part of the G.723.1 frame structure that needs to be encrypted can properly reuse the chaotic key stream without greatly affecting its security performance, thereby improving efficiency.

流加密的优点是错误扩展小、实时性高,其保密度取决于密钥发生器产生的密钥序列的随机性,当密钥序列非常接近随机序列时,其安全性很高。但是,传统的流加密方法中,采用的伪随机序列发生器为线性同余发生器或线性反馈移位寄存器,它们的安全性都较差,易被破解。因此,本发明实施例采用混沌流加密方法。The advantages of stream encryption are small error expansion and high real-time performance. Its confidentiality depends on the randomness of the key sequence generated by the key generator. When the key sequence is very close to the random sequence, its security is very high. However, in the traditional stream encryption method, the pseudo-random sequence generator used is a linear congruential generator or a linear feedback shift register, and their security is poor and easy to be cracked. Therefore, the embodiment of the present invention adopts a chaotic stream encryption method.

作为一种可实施的方式,一种简单且被广泛研究的自治一维离散动态系统是Logistics映射方法,它用一维非线性迭代方法来表征的混沌流加密方法,如式(10)所示。As an implementable way, a simple and widely studied autonomous one-dimensional discrete dynamic system is the logistic mapping method, which uses a one-dimensional nonlinear iterative method to characterize the chaotic flow encryption method, as shown in equation (10) .

F(xn)=λxn(1-xn)                                            (10)F(x n )=λx n (1-x n ) (10)

其中,n=0,1,2,……,x0和λ为调节参数,当x0∈(0,1),λ∈(3.5699456...,4)时,Logistics映射工作于混沌态,即由初始条件x0在Logistics映射方法的作用下所产生的序列{xk,k=0,1,2,3...}是非周期的、不收敛的,且对初始值和参数非常敏感。Among them, n=0, 1, 2, ..., x 0 and λ are adjustment parameters, when x 0 ∈ (0, 1), λ ∈ (3.5699456..., 4), the Logistics mapping works in a chaotic state, That is, the sequence {x k , k=0, 1, 2, 3...} generated by the initial condition x 0 under the action of the Logistics mapping method is aperiodic and non-convergent, and is very sensitive to the initial value and parameters .

该混沌流加密方法有两个问题,一个是流加密方法的固定点,即多次迭代趋近于某一个固定值,另一个是“稳定窗”,即在某个区间的点聚集,窗中产生的迭代序列不能提供作为密钥流所必须的安全性。There are two problems with this chaotic flow encryption method, one is the fixed point of the flow encryption method, that is, multiple iterations approach a certain fixed value, and the other is the "stable window", that is, points gathered in a certain interval, in the window The resulting iterative sequence does not provide the necessary security as a keystream.

本发明实施例采用改进的Logistics地图(Logistics map)一维非线性迭代方法以避免现有技术的问题。本发明实施例的迭代方法如式(11)所示:The embodiment of the present invention adopts an improved one-dimensional nonlinear iterative method of the Logistics map (Logistics map) to avoid the problems of the prior art. The iterative method of the embodiment of the present invention is shown in formula (11):

G(x)=(β+1)(1+1/β)β×(1-x)β                           (11)G(x)=(β+1)(1+1/β) β ×(1-x) β (11)

其中,β∈(1,4),x0∈(0,1),x的初始值为x0,通过此式迭代可以得到x1,x2,x3,...xn...。Among them, β∈(1, 4), x 0 ∈ (0, 1), the initial value of x is x 0 , through iteration of this formula, x 1 , x 2 , x 3 , ... x n ... .

理论上,式(11)产生的序列是非周期的,但是由于受到计算机字长的限制,实际由计算机仿真得到的混沌序列都只是对客观混沌的逼近,因此有一个“循环窗”问题,就是经过若干次迭代,迭代值出现周期性。根据测试的结果,在采用双精度的浮点运算时,可用的迭代平均次数>=2*107。Theoretically, the sequence generated by formula (11) is aperiodic, but due to the limitation of the word length of the computer, the chaotic sequence obtained by the computer simulation is only the approximation of the objective chaos, so there is a "cyclic window" problem, that is, after For several iterations, the iteration value appears periodic. According to the test results, when double-precision floating-point operations are used, the average number of iterations available >=2*107.

下面详细说明步骤S200中按帧速率(帧长度)和加密所需的安全等级Level确定选用的加密字节序号表和比特位置表的具体方法过程:The specific method process of determining the encryption byte sequence number table and bit position table selected by frame rate (frame length) and encryption required security level Level in step S200 in detail below:

为了说明本发明的按帧速率(帧长度)和加密所需的安全等级Level确定选用的加密字节序号表和比特位置表,首先说明G.723.1标准帧结构,并根据比特帧结构分析其参数重要性,然后根据其参数重要性按安全等级Level需要选择要加密的比特位,即如何确定语音帧中参数的比特位的敏感性排列顺序,以此将比特位分为不同类别,加密不同类别的比特位获得不同安全等级。In order to illustrate the encryption byte sequence number table and bit position table selected by frame rate (frame length) and encryption required security level Level of the present invention, first illustrate the G.723.1 standard frame structure, and analyze its parameters according to the bit frame structure Importance, and then select the bits to be encrypted according to the importance of the parameters according to the security level Level, that is, how to determine the sensitivity order of the bits of the parameters in the voice frame, so as to divide the bits into different categories and encrypt different categories The bits get different security levels.

如表1所示为低速率帧5.3kbps模式G.723.1语音编码后的比特分配帧结构:As shown in Table 1, the bit allocation frame structure after the low-rate frame 5.3kbps mode G.723.1 speech coding:

表1  低速率帧5.3kbps模式G.723.1语音编码后的比特分配帧结构表 参数 码字   第一子帧   第二子帧   第三子帧   第四子帧   每帧共计   (bit)   LPC索引   LPC   24   自适应码本延时 ACL0,ACL1,ACL2,ACL3 7 2 7 2 18   所有增益的联合编码 GAIN0,GAIN1,GAIN2,GAIN3 12 12 12 12 48 脉冲位置 POS0,POS1,POS2,POS3   12   12   12   12 48   脉冲符号   PSIG0,PSIG1,PSIG2,PSIG3   4   4   4   4   16   奇偶标志位 GRID0,GRID1,GRID2,GRID3 1 1 1 1 4   总计   158 Table 1 Frame structure table of bit allocation after G.723.1 speech coding in low-rate frame 5.3kbps mode parameter Codeword first subframe second subframe third subframe fourth subframe Total per frame (bit) LPC index LPC twenty four Adaptive codebook delay ACL0, ACL1, ACL2, ACL3 7 2 7 2 18 Joint encoding of all gains GAIN0, GAIN1, GAIN2, GAIN3 12 12 12 12 48 pulse position POS0, POS1, POS2, POS3 12 12 12 12 48 pulse symbol PSIG0, PSIG1, PSIG2, PSIG3 4 4 4 4 16 parity bit GRID0, GRID1, GRID2, GRID3 1 1 1 1 4 total 158

如表2所示为高速率帧6.3kbps模式G.723.1语音编码后的比特分配帧结构:As shown in Table 2, the bit allocation frame structure after the high-rate frame 6.3kbps mode G.723.1 speech coding:

表2  高速率帧6.3kbps模式G.723.1语音编码后的比特分配帧结构表 参数 码字   第一子帧   第二子帧   第三子帧   第四子帧  每帧共计(bit)   LPC索引 LPC  24   自适应码本延时 ACL0,ACL1,ACL2,ACL3 7 2 7 2 18   所有增益的联合编码 GAIN0,GAIN1,GAIN2,GAIN3 12   12   12   12 48 脉冲位置 POS0,POS1,POS2,POS3 20   18   20   18 73   脉冲符号 PSIG0,PSIG1,PSIG2,PSIG3   6   5   6   5  22 奇偶标志位  GRID0,GRID1,GRID2,GRID3 1 1 1 1 4   总计   189 Table 2 Frame structure table of bit allocation after G.723.1 speech coding in high-rate frame 6.3kbps mode parameter Codeword first subframe second subframe third subframe fourth subframe Total per frame (bit) LPC index LPC twenty four Adaptive codebook delay ACL0, ACL1, ACL2, ACL3 7 2 7 2 18 Joint encoding of all gains GAIN0, GAIN1, GAIN2, GAIN3 12 12 12 12 48 pulse position POS0, POS1, POS2, POS3 20 18 20 18 73 pulse symbol PSIG0, PSIG1, PSIG2, PSIG3 6 5 6 5 twenty two parity bit GRID0, GRID1, GRID2, GRID3 1 1 1 1 4 total 189

通过对G.723.1的编码过程的分析,对照帧结构,可以确定帧中各个参数的作用:By analyzing the encoding process of G.723.1 and comparing the frame structure, the role of each parameter in the frame can be determined:

1)LPC索引是LPC参数,用于在解码端构造LPC合成滤波器,十分关键,LPC系数和最后的语音的可理解性(即语义)有着密切关联;1) The LPC index is the LPC parameter, which is used to construct the LPC synthesis filter at the decoding end. It is very critical. The LPC coefficient is closely related to the intelligibility (ie semantics) of the final speech;

2)联合增益GAIN0、GAIN1、GAIN2、GAIN3是自适应码本和固定码本的增益的联合编码,增益参数影响着人耳对语音的通话与静音期的分辨能力;2) The joint gains GAIN0, GAIN1, GAIN2, and GAIN3 are the joint coding of the gains of the adaptive codebook and the fixed codebook, and the gain parameters affect the human ear's ability to distinguish speech conversations and silent periods;

3)ACL0、ACL1、ACL2、ACL3分别代表第一、二、三、四子帧的自适应码本延时,它们代表语音激励中的长时基音,也即周期脉冲成分,这个成分影响着人耳对语音的性别判断;3) ACL0, ACL1, ACL2, and ACL3 respectively represent the adaptive codebook delays of the first, second, third, and fourth subframes. They represent the long-term pitch in speech excitation, that is, the periodic pulse component. This component affects human Ear-to-sound gender judgments;

4)脉冲符号(PSIG0,PSIG1,PSIG2,PSIG3)和脉冲位置(POS0,POS1,POS2,POS3)分别代表固定码本(语音激励中的非周期脉冲成分)的编码脉冲的符号和位置。固定码本是在对激励信号的编码过程中,对目标矢量和长时基音贡献的差值的逼近,是总激励的余量信号,因此其重要性低于自适应码本,在自适应码本已有效加密的基础上,固定码本相关参数的加密优先级可置后考虑。4) Pulse sign (PSIG0, PSIG1, PSIG2, PSIG3) and pulse position (POS0, POS1, POS2, POS3) respectively represent the sign and position of the coded pulse of the fixed codebook (aperiodic pulse component in speech excitation). The fixed codebook is the approximation of the difference between the target vector and the long-term pitch contribution in the process of encoding the excitation signal, and it is the residual signal of the total excitation, so its importance is lower than that of the adaptive codebook. In the adaptive codebook On the basis of the already effective encryption, the encryption priority of the relevant parameters of the fixed codebook can be considered later.

因此,通过对语音加密效果的衡量标准和G.723.1各参数作用的联合考虑,明确LPC参数、联合增益和自适应码本三个参数非常重要,在选择加密参数时需要首先考虑,固定码本参数的加密可以置后考虑。Therefore, it is very important to clarify the three parameters of LPC parameters, joint gain and adaptive codebook through the joint consideration of the measurement standard of speech encryption effect and the role of G.723.1 parameters. When selecting encryption parameters, it is necessary to consider first. Fixed codebook Encryption of parameters can be considered as a post-processing.

同时,为了进一步说明按安全等级选择需要加密的比特位,本发明实施例结合G.723.1的附件C中对帧比特位的误码敏感性的排列顺序,分析说明G.723.1的编码比特帧结构中参数重要性,并按安全等级需要选择要加密的比特位。At the same time, in order to further illustrate the selection of bits that need to be encrypted according to the security level, the embodiment of the present invention combines the arrangement order of the error sensitivity of the frame bits in Annex C of G.723.1 to analyze and illustrate the coded bit frame structure of G.723.1 The importance of medium parameters, and select the bits to be encrypted according to the security level.

在了解G.723.1帧结构中的不同比特位对解码端语音信号重建有怎样的影响后,再结合G.723.1的附件C中解码已给出的对帧比特位的误码敏感性的排列顺序,以及根据语音加密效果的衡量标准等,根据系统资源的条件、不同安全等级的需求,选择加密不同的比特位,并根据安全等级选择要加密的比特位。After understanding how the different bits in the G.723.1 frame structure affect the reconstruction of the speech signal at the decoder, combine the arrangement order of the error sensitivity of the frame bits given in Annex C of G.723.1 , and according to the measurement standard of voice encryption effect, etc., according to the conditions of system resources and the requirements of different security levels, select different bits for encryption, and select the bits to be encrypted according to the security level.

ITU-T发布的G.723.1的附件C是关于无线通信中的信道编码,而由于无线通信的信道误码率很高,因此提出附件C以对G.723.1帧结构中对误码特别敏感(即发生错误对重建语音的影响非常大)的比特位进行CRC校验编码,增强其抗错性能。为此,附件C中给出了G.723.1的改进帧结构(与标准帧格式略有不同,对信道误码有更强抗错性能)的比特位的误码敏感性的排列顺序。这也是进行选择性加密参考的主要有利依据之一。Annex C of G.723.1 released by ITU-T is about channel coding in wireless communication, and because the channel bit error rate of wireless communication is very high, Annex C is proposed to be particularly sensitive to bit errors in the G.723.1 frame structure ( That is to say, errors have a very large impact on the reconstructed voice) bits for CRC check coding to enhance its error resistance performance. For this reason, Annex C gives the arrangement order of the bit error sensitivity of the improved frame structure of G.723.1 (slightly different from the standard frame format, which has stronger error resistance to channel errors). This is also one of the main arguments in favor of selective encrypted references.

G.723.1的附件C中略微修改了G.723.1的帧结构,以适应无线信道的传输,它是原结构的一种解压缩表示,具有更强的鲁棒性,以抵抗信道误码。In Annex C of G.723.1, the frame structure of G.723.1 is slightly modified to adapt to the transmission of wireless channels. It is a decompressed representation of the original structure and has stronger robustness against channel errors.

G.723.1语音编码的帧在G.723.1的附件C标准解压缩后的高速率(6.3kbps)传输语音参数帧格式如下表3所示:The high-speed (6.3kbps) transmission speech parameter frame format of the G.723.1 speech coded frame after the Annex C standard decompression of G.723.1 is shown in Table 3 below:

           表3 G.723.1语音编码的帧在解压缩后的Table 3 G.723.1 speech coded frames after decompression

           高速率(6.3kbps)传输语音参数帧格式表   信道中的字节序号 比特位   1   R_LPC_B5...R_LPC_B0,VAD,RATE   2   R_LPC_B13...R_LPC_B6   3   R_LPC_B21...R_LPC_B14   4   ACL0_B5...ACL0_B0,R_LPC_B23,R_LPC_B22   5   ACL2_B4...ACL2_B0,ACL1_B1,ACL1_B0,ACL0_B6 6   AGAIN0_B3...AGAIN0_B0,ACL3_B1,ACL3_B0,ACL2_B6,ACL2_B5   7   AGAIN1_B3...AGAIN1_B0,AGAIN0_B7...AGAIN0_B4   8   AGAIN2_B3...AGAIN2_B0,AGAIN1_B7...AGAIN1_B4   9   AGAIN3_B3...AGAIN3_B0,AGAIN2_B7...AGAIN2_B4   10   FGAIN0_B3...FGAIN0_B0,AGAIN3_B7...AGAIN3_B4 11   FGAIN2_B1,FGAIN2_B0,FGAIN1_B4...FGAIN1_B0,FGAIN0_B4   12   FGAIN3_B4...FGAIN3_B0,FGAIN2_B4...FGAIN2_B2 13   MSBPOS_B3...MSBPOS_B0,GRID3_B0,GRID2_B0,GRID1_B0,GRID0_B0   14   MSBPOS_B11...MSBPOS_B4   15   POS0_B6...POS0_B0,MSBPOS_B12   16   POS0_B14...POS0_B7   17   POS1_B6...POS1_B0,POS0_B15   18   POS2_B0,POS1_B13...POS1_B7   19   POS2_B8...POS2_B1   20   POS3_B0,POS2_B15...POS2_B9   21   POS3_B8...POS3_B1   22   PSIG0_B2...PSIG0_B0,POS3_B13...POS3_B9   23   PSIG1_B4...PSIG1_B0,PSIG0_B5...PSIG0_B3   24   PSIG3_B1,PSIG3_B0,PSIG2_B5...PSIG2_B0   25   UB,UB,UB,UB,UB,PSIG3_B4...PSIG3_B2 High-speed (6.3kbps) transmission voice parameter frame format table byte ordinal in channel bit 1 R_LPC_B5...R_LPC_B0, VAD, RATE 2 R_LPC_B13...R_LPC_B6 3 R_LPC_B21...R_LPC_B14 4 ACL0_B5...ACL0_B0, R_LPC_B23, R_LPC_B22 5 ACL2_B4...ACL2_B0, ACL1_B1, ACL1_B0, ACL0_B6 6 AGAIN0_B3...AGAIN0_B0, ACL3_B1, ACL3_B0, ACL2_B6, ACL2_B5 7 AGAIN1_B3...AGAIN1_B0, AGAIN0_B7...AGAIN0_B4 8 AGAIN2_B3...AGAIN2_B0, AGAIN1_B7...AGAIN1_B4 9 AGAIN3_B3...AGAIN3_B0, AGAIN2_B7...AGAIN2_B4 10 FGAIN0_B3...FGAIN0_B0, AGAIN3_B7...AGAIN3_B4 11 FGAIN2_B1, FGAIN2_B0, FGAIN1_B4...FGAIN1_B0, FGAIN0_B4 12 FGAIN3_B4...FGAIN3_B0, FGAIN2_B4...FGAIN2_B2 13 MSBPOS_B3...MSBPOS_B0, GRID3_B0, GRID2_B0, GRID1_B0, GRID0_B0 14 MSBPOS_B11...MSBPOS_B4 15 POS0_B6...POS0_B0, MSBPOS_B12 16 POS0_B14...POS0_B7 17 POS1_B6...POS1_B0, POS0_B15 18 POS2_B0, POS1_B13...POS1_B7 19 POS2_B8...POS2_B1 20 POS3_B0, POS2_B15...POS2_B9 twenty one POS3_B8...POS3_B1 twenty two PSIG0_B2...PSIG0_B0, POS3_B13...POS3_B9 twenty three PSIG1_B4...PSIG1_B0, PSIG0_B5...PSIG0_B3 twenty four PSIG3_B1, PSIG3_B0, PSIG2_B5...PSIG2_B0 25 UB, UB, UB, UB, UB, PSIG3_B4...PSIG3_B2

G.723.1语音编码的帧在G.723.1的附件C标准解压缩后的低速率(5.3kbps)传输语音参数帧格式如下表4所示:The low-rate (5.3kbps) transmission speech parameter frame format of the G.723.1 speech coded frame after the Annex C standard decompression of G.723.1 is shown in Table 4 below:

           表4 G.723.1语音编码的帧在解压缩后的Table 4 G.723.1 speech coded frames after decompression

           低速率(5.3kbps)传输语音参数帧格式表   信道中的字节序号 比特位   1   R_LPC_B5...R_LPC_B0,VAD,RATE   2   R_LPC_B13...R_LPC_B6   3   R_LPC_B21...R_LPC_B14   4   ACL0_B5...ACL0_B0,R_LPC_B23,R_LPC_B22   5   ACL2_B4...ACL2_B0,ACL1_B1,ACL1_B0,ACL0_B6 6   AGAIN0_B3...AGAIN0_B0,ACL3_B1,ACL3_B0,ACL2_B6,ACL2_B5   7   AGAIN1_B3...AGAIN1_B0,AGAIN0_B7...AGAIN0_B4   8   AGAIN2_B3...AGAIN2_B0,AGAIN1_B7...AGAIN1_B4   9   AGAIN3_B3...AGAIN3_B0,AGAIN2_B7...AGAIN2_B4   10   FGAIN0_B3...FGAIN0_B0,AGAIN3_B7...AGAIN3_B4 11   FGAIN2_B1,FGAIN2_B0,FGAIN1_B4...FGAIN1_B0,FGAIN0_B4   12   FGAIN3_B4...FGAIN3_B0,FGAIN2_B4...FGAIN2_B2   13   POS0_B3...POS0_B0,GRID3_B0,GRID2_B0,GRID1_B0,GRID0_B0   14   POS0_B11...POS0_B8,POS0_B7...POS0_B4   15   POS1_B7...POS1_B4,POS1_B3...POS1_B0   16   POS2_B3...POS2_B0,POS1_B11...POS1_B8   17   POS2_B11...POS2_B8,POS2_B7...POS2_B4   18   POS3_B7,POS3_B4...POS3_B3...POS3_B0   19   PSIG0_B3...PSIG0_B0,POS3_B11...POS3_B8   20   PSIG2_B3...PSIG2_B0,PSIG1_B3...PSIG1_B0   21   UB,UB,UB,UB,PSIG3_B3...PSIG3_B0 Low rate (5.3kbps) transmission speech parameter frame format table byte ordinal in channel bit 1 R_LPC_B5...R_LPC_B0, VAD, RATE 2 R_LPC_B13...R_LPC_B6 3 R_LPC_B21...R_LPC_B14 4 ACL0_B5...ACL0_B0, R_LPC_B23, R_LPC_B22 5 ACL2_B4...ACL2_B0, ACL1_B1, ACL1_B0, ACL0_B6 6 AGAIN0_B3...AGAIN0_B0, ACL3_B1, ACL3_B0, ACL2_B6, ACL2_B5 7 AGAIN1_B3...AGAIN1_B0, AGAIN0_B7...AGAIN0_B4 8 AGAIN2_B3...AGAIN2_B0, AGAIN1_B7...AGAIN1_B4 9 AGAIN3_B3...AGAIN3_B0, AGAIN2_B7...AGAIN2_B4 10 FGAIN0_B3...FGAIN0_B0, AGAIN3_B7...AGAIN3_B4 11 FGAIN2_B1, FGAIN2_B0, FGAIN1_B4...FGAIN1_B0, FGAIN0_B4 12 FGAIN3_B4...FGAIN3_B0, FGAIN2_B4...FGAIN2_B2 13 POS0_B3...POS0_B0, GRID3_B0, GRID2_B0, GRID1_B0, GRID0_B0 14 POS0_B11...POS0_B8, POS0_B7...POS0_B4 15 POS1_B7...POS1_B4, POS1_B3...POS1_B0 16 POS2_B3...POS2_B0, POS1_B11...POS1_B8 17 POS2_B11...POS2_B8, POS2_B7...POS2_B4 18 POS3_B7, POS3_B4...POS3_B3...POS3_B0 19 PSIG0_B3...PSIG0_B0, POS3_B11...POS3_B8 20 PSIG2_B3...PSIG2_B0, PSIG1_B3...PSIG1_B0 twenty one UB, UB, UB, UB, PSIG3_B3...PSIG3_B0

表5为G.723.1的附件C解压缩后的高速率(6.3kbps)传输语音帧比特位的主观敏感性排序表。相应比特位上的数字表明了其主观敏感性的排序(最重要的排位为0,依次类推)。Table 5 is the subjective sensitivity sorting table of the bits of the high-speed (6.3 kbps) transmission speech frame after decompression in Annex C of G.723.1. The numbers on the corresponding bits indicate the ranking of their subjective sensitivities (the most important rank is 0, and so on).

                       表5解压缩后的高速率(6.3kbps)Table 5 High rate after decompression (6.3kbps)

                    传输语音帧比特位的主观敏感性排序表   信道中的字节序号 比特位的主观敏感性排序号   1   175   180   189   190   191   192   VAD   RATE   2   98   73   107   154   167   168   169   170   3   30   17   16   31   48   55   49   71   4   6   4   0   2   11   26   10   14   5   5   1   3   12   27   24   60   8   6   44   66   62   82   25   61   9   7   7   45   67   63   83   78   36   50   40   8   46   68   64   84   79   37   51   41   9   47   69   65   85   80   38   52   42   10   56   99   159   185   81   39   53   43   11   161   187   20   57   100   160   186   19   12   22   59   102   162   188   21   58   101   13   35   54   70   72   179   178   177   176   14   13   15   23   28   29   32   33   34   15   128   132   146   155   163   171   181   18   16   76   86   90   94   103   108   112   116   17   129   133   147   156   164   172   182   74   18   183   87   91   95   104   109   113   117   19   114   118   130   134   148   157   165   173   20   184   75   77   88   92   96   105   110   21   115   119   131   135   149   158   166   174   22   136   124   120   89   93   97   106   111   23   151   141   137   125   121   144   150   140   24   127   123   145   152   142   138   126   122   25   UB   UB   UB   UB   UB   153   143   139 Subjective Sensitivity Sorting Table of Transmitted Speech Frame Bits byte ordinal in channel Subjective Sensitivity Ranking Number of Bits 1 175 180 189 190 191 192 VAD RATE 2 98 73 107 154 167 168 169 170 3 30 17 16 31 48 55 49 71 4 6 4 0 2 11 26 10 14 5 5 1 3 12 27 twenty four 60 8 6 44 66 62 82 25 61 9 7 7 45 67 63 83 78 36 50 40 8 46 68 64 84 79 37 51 41 9 47 69 65 85 80 38 52 42 10 56 99 159 185 81 39 53 43 11 161 187 20 57 100 160 186 19 12 twenty two 59 102 162 188 twenty one 58 101 13 35 54 70 72 179 178 177 176 14 13 15 twenty three 28 29 32 33 34 15 128 132 146 155 163 171 181 18 16 76 86 90 94 103 108 112 116 17 129 133 147 156 164 172 182 74 18 183 87 91 95 104 109 113 117 19 114 118 130 134 148 157 165 173 20 184 75 77 88 92 96 105 110 twenty one 115 119 131 135 149 158 166 174 twenty two 136 124 120 89 93 97 106 111 twenty three 151 141 137 125 121 144 150 140 twenty four 127 123 145 152 142 138 126 122 25 UB UB UB UB UB 153 143 139

表6是G.723.1的附件C解压缩后的低速率(5.3kbps)传输语音帧比特位的主观敏感性排序表。相应比特位上的数字表明了其主观敏感性的排序(最重要的排位为0,依次类推)。Table 6 is the subjective sensitivity sorting table of the bits of the speech frame transmitted at a low rate (5.3 kbps) after decompression in Annex C of G.723.1. The numbers on the corresponding bits indicate the ranking of their subjective sensitivities (the most important rank is 0, and so on).

   表6解压缩后的低速率(5.3kbps)Table 6 Low rate after decompression (5.3kbps)

传输语音帧比特位的主观敏感性排序表   信道   比特位的主观敏感性排序号   中的字节序号   1   152   153   158   159   160   161   VAD   RATE   2   69   64   70   91   145   140   147   146   3   24   15   14   25   46   50   47   63   4   4   6   0   2   11   18   10   13   5   7   1   3   12   19   16   48   8   6   42   59   55   65   17   49   9   5   7   43   60   56   66   26   30   34   38   8   44   61   57   67   27   31   35   39   9   45   62   58   68   28   32   36   40   10   51   87   141   154   29   33   37   41   11   143   156   21   52   88   142   155   20   12   23   54   90   144   157   22   53   89   13   100   128   96   104   151   150   149   148   14   132   112   116   136   108   120   124   92   15   109   121   125   93   101   129   97   105   16   102   130   98   106   133   113   117   137   17   134   114   118   138   110   122   126   94   18   111   123   127   95   103   131   99   107   19   83   79   75   71   135   115   119   139   20   85   81   77   73   84   80   76   72   21   UB   UB   UB   UB   86   82   78   74 Subjective Sensitivity Sorting Table of Transmitted Speech Frame Bits channel Subjective Sensitivity Ranking Number of Bits Byte ordinals in 1 152 153 158 159 160 161 VAD RATE 2 69 64 70 91 145 140 147 146 3 twenty four 15 14 25 46 50 47 63 4 4 6 0 2 11 18 10 13 5 7 1 3 12 19 16 48 8 6 42 59 55 65 17 49 9 5 7 43 60 56 66 26 30 34 38 8 44 61 57 67 27 31 35 39 9 45 62 58 68 28 32 36 40 10 51 87 141 154 29 33 37 41 11 143 156 twenty one 52 88 142 155 20 12 twenty three 54 90 144 157 twenty two 53 89 13 100 128 96 104 151 150 149 148 14 132 112 116 136 108 120 124 92 15 109 121 125 93 101 129 97 105 16 102 130 98 106 133 113 117 137 17 134 114 118 138 110 122 126 94 18 111 123 127 95 103 131 99 107 19 83 79 75 71 135 115 119 139 20 85 81 77 73 84 80 76 72 twenty one UB UB UB UB 86 82 78 74

由结合G.723.1的附件C解压缩后的帧比特位敏感性排列顺序表可以看到,其重要性的排列顺序和前面对G.723.1的各个参数作用以及重要性的结论基本是一致的。It can be seen from the decompressed frame bit sensitivity ranking table combined with Annex C of G.723.1 that the ranking order of its importance is basically consistent with the previous conclusions on the role and importance of each parameter of G.723.1 .

即总体而言,参数LPC系数、自适应码矢量索引和增益的敏感程度较高,因为它们对重建语音的影响很大。That is, in general, the parameters LPC coefficients, adaptive code vector index and gain are more sensitive because they have a great influence on reconstructed speech.

表5和表6中得到的比特位敏感性排序是G.723.1附件C的解压缩后的语音帧中的比特位敏感性排序,但本发明所需要的是G.723.1标准语音帧中的比特位敏感性排序,所以需要得到两种语音帧之间的转化关系,以及比特位的对应关系,以求得G.723.1标准语音帧中比特位敏感性的排序和分类。The bit sensitivity sorting obtained in Table 5 and Table 6 is the bit sensitivity sorting in the decompressed speech frame of G.723.1 Annex C, but what the present invention needs is the bit in the G.723.1 standard speech frame Bit-sensitivity sorting, so it is necessary to obtain the conversion relationship between the two voice frames and the corresponding relationship between bits, so as to obtain the sorting and classification of the bit-sensitivity in the G.723.1 standard voice frames.

下面详细说明G.723.1附件C的解压缩后的语音帧中的比特位敏感性排序和G.723.1标准语音帧中的比特位敏感性排序这两种语音帧之间的转化关系,以及比特位的对应关系:The conversion relationship between the bit-sensitive sorting in the decompressed speech frame of G.723.1 Annex C and the bit-sensitive sorting in the G.723.1 standard speech frame, and the bit Corresponding relationship:

结合表1至表6关于G.723.1参数,以及G.723.1的附件C参数及语音帧比特位的主观敏感性排序表。可以看出,因为G.723.1的附件C解压缩后的帧结构和标准帧结构在每一参数内部的编码顺序上是有区别的,解压缩后的帧比特位敏感性排列顺序不能直接用于G.723.1的标准帧结构,所以需要确定G.723.1标准的语音参数与G.723.1的附件C标准的语音编码参数相互转换关系,以便G.723.1标准的语音参数与G.723.1的附件C标准的语音编码参数可以进行相互转换。Combining Table 1 to Table 6 about G.723.1 parameters, and Annex C parameters of G.723.1 and subjective sensitivity ranking table of speech frame bits. It can be seen that, because the decompressed frame structure of Annex C of G.723.1 is different from the standard frame structure in the encoding sequence of each parameter, the bit-sensitive sequence of the decompressed frame cannot be directly used for The standard frame structure of G.723.1, so it is necessary to determine the mutual conversion relationship between the voice parameters of the G.723.1 standard and the voice coding parameters of the Annex C standard of G.723.1, so that the voice parameters of the G.723.1 standard and the Annex C standard of G.723.1 Speech coding parameters can be converted to each other.

1)LPC参数的转换关系:1) Conversion relationship of LPC parameters:

G.723.1标准编码中,LPC参数是把LSP残差矢量(去除了长时直流分量的LSP矢量与LSP预测矢量的差值,是10维矢量)分成3个子矢量,维数分别是3、3、4,然后对每个子矢量进行8bit码本量化,这样就产生了3个8bit码本矢量,共24位码本。In the G.723.1 standard encoding, the LPC parameter is to divide the LSP residual vector (the difference between the LSP vector and the LSP prediction vector after the long-term DC component is removed, which is a 10-dimensional vector) into 3 sub-vectors, and the dimensions are 3 and 3 respectively. , 4, and then perform 8-bit codebook quantization on each sub-vector, thus generating three 8-bit codebook vectors, with a total of 24-bit codebooks.

G.723.1标准帧结构中的LPC参数通过下列变换得到G.723.1的附件C中的帧结构的LPC参数:The LPC parameters in the G.723.1 standard frame structure are obtained through the following transformations to obtain the LPC parameters in the frame structure in Annex C of G.723.1:

G.723.1标准帧结构中的LPC参数由下面三个子矢量构成:The LPC parameters in the G.723.1 standard frame structure consist of the following three sub-vectors:

E0={LPC_B7,LPC_B6,LPC_B5,LPC_B4,LPC_B3,LPC_B2,LPC_B1,LPC_B0}E0={LPC_B7, LPC_B6, LPC_B5, LPC_B4, LPC_B3, LPC_B2, LPC_B1, LPC_B0}

E1={LPC_B15,LPC_B14,LPC_B13,LPC_B12,LPC_B11,LPC_B10,LPC_B9,LPC_B8}E1={LPC_B15, LPC_B14, LPC_B13, LPC_B12, LPC_B11, LPC_B10, LPC_B9, LPC_B8}

E2={LPC_B23,LPC_B22,LPC_B21,LPC_B20,LPC_B19,LPC_B18,LPC_B17,LPC_B16}E2={LPC_B23, LPC_B22, LPC_B21, LPC_B20, LPC_B19, LPC_B18, LPC_B17, LPC_B16}

三个子矢量通过式(1)的映射重新得到新的三个子矢量:The three sub-vectors get new three sub-vectors through the mapping of formula (1):

ee mm RR == ReorderTaReorder Ta bb mm [[ ee mm ]] mm == 0,1.20,1.2 -- -- -- (( 11 ))

得到的输出即是G.723.1的附件C中用于无线信道传输的LPC参数索引。The obtained output is the LPC parameter index used for wireless channel transmission in Annex C of G.723.1.

因此,G.723.1的附件C中解压缩后的帧参数与标准帧参数的对应关系为:Therefore, the corresponding relationship between decompressed frame parameters and standard frame parameters in Annex C of G.723.1 is:

R_LPC_B7...R_LPC_B0由LPC_B7...LPC_B0映射得到(第一个子矢量);R_LPC_B7...R_LPC_B0 is mapped from LPC_B7...LPC_B0 (the first sub-vector);

R_LPC_B15...R_LPC_B8由LPC_B15...LPC_B8映射得到(第二个子矢量);R_LPC_B15...R_LPC_B8 is obtained by mapping LPC_B15...LPC_B8 (the second sub-vector);

R_LPC_B23...R_LPC_B16由LPC_B23...LPC_B16映射得到(第三个子矢量);R_LPC_B23...R_LPC_B16 is obtained by mapping LPC_B23...LPC_B16 (the third sub-vector);

G.723.1附件C中帧结构的比特位的敏感性排序表中,LPC参数的最后一个子矢量(R_LPC_B23...R_LPC_B16)的敏感性远高于前两个,因此在标准帧结构中,对应有LPC_B23...LPC_B16的敏感性很高,而LPC_B15...LPC_B0敏感性很低。In the sensitivity ranking table of the bits of the frame structure in Annex C of G.723.1, the sensitivity of the last sub-vector of the LPC parameter (R_LPC_B23...R_LPC_B16) is much higher than the first two, so in the standard frame structure, the corresponding There are LPC_B23...LPC_B16 with high sensitivity and LPC_B15...LPC_B0 with low sensitivity.

2)增益参数的转换关系:2) Conversion relationship of gain parameters:

G.723.1标准编码中,每一子帧的联合增益用12比特编码,它事实上是两个独立增益(自适应码本相关增益和固定码本相关增益)的联合压缩编码。在G.723.1的附件C中,为了增强帧结构抗信道误码的能力,它把标准结构中的联合增益进行解压缩,把每一个子帧的增益索引GAINx_By解压缩为一个8比特的AGAINx_By和一个5比特的FGAINx_By共两个增益索引。In G.723.1 standard coding, the joint gain of each subframe is coded with 12 bits, which is actually the joint compression coding of two independent gains (adaptive codebook related gain and fixed codebook related gain). In Annex C of G.723.1, in order to enhance the ability of the frame structure to resist channel errors, it decompresses the joint gain in the standard structure, and decompresses the gain index GAINx_By of each subframe into an 8-bit AGAINx_By and A 5-bit FGAINx_By has two gain indices.

其步骤如下:The steps are as follows:

21)根据式(2)解码得到每一偶子帧的基音周期预测21) Decoding according to formula (2) to obtain the pitch period prediction of each even subframe

Figure A20071005224000242
Figure A20071005224000242

其中,PIndi为自适应码本索引Among them, PIndi is the adaptive codebook index

22)根据式(3)解码得到每一奇子帧的基因周期预测22) According to formula (3), the gene period prediction of each odd subframe is obtained by decoding

Figure A20071005224000243
Figure A20071005224000243

Figure A20071005224000244
Figure A20071005224000244

23)计算得到每一子帧的基音周期预测的增益矢量23) Calculate the gain vector of the pitch period prediction of each subframe

231)当低速率时,联合增益索引(GIndi)包含基音周期预测(自适应码本)增益矢量的信息和脉冲序列(固定码本)增益索引的信息,其计算式如式(4)表示:231) When the rate is low, the joint gain index (GIndi) contains the information of the pitch period prediction (adaptive codebook) gain vector and the information of the pulse sequence (fixed codebook) gain index, and its calculation formula is expressed as formula (4):

Figure A20071005224000251
Figure A20071005224000251

其中,PGIndi为基音周期自适应码本相关增益索引,GSize=24;Among them, PGIndi is the pitch cycle adaptive codebook correlation gain index, GSize=24;

232)当高速率时,如果Li>=58,增益计算同式(4)。否则,其计算如式(5):232) When the rate is high, if Li>=58, the gain calculation is the same as formula (4). Otherwise, its calculation is as formula (5):

Figure A20071005224000252
Figure A20071005224000252

24)根据式(6)计算得到每一子帧的脉冲的最大增益(MGIndi)24) Calculate the maximum gain (MGIndi) of the pulse of each subframe according to formula (6)

Figure A20071005224000253
Figure A20071005224000253

由以上解压缩过程,可以得到G.723.1的附件C中解压缩后的帧参数与标准帧参数的对应关系为:From the above decompression process, the corresponding relationship between decompressed frame parameters and standard frame parameters in Annex C of G.723.1 can be obtained as follows:

增益索引AGAINx_By对应式(5)中的基音周期自适应码本相关增益索引PGIndi,其中,增益索引FGAINx_By对应式(6)中的最大增益MGIndi,标准帧格式中的增益索引GAINx_By对应上式中的联合增益索引GIndi。因此,AGAINx_By和FGAINx_By由GAINx_By解压缩而来。The gain index AGAINx_By corresponds to the pitch period adaptive codebook related gain index PGIndi in formula (5), where the gain index FGAINx_By corresponds to the maximum gain MGIndi in formula (6), and the gain index GAINx_By in the standard frame format corresponds to the above formula Joint gain index GIndi. Therefore, AGAINx_By and FGAINx_By are decompressed from GAINx_By.

GAINx_By,是G.723.1标准帧结构中的参数,AGAINx_By和FGAINx_By是G.723.1附件C中的解压缩后的帧结构中的参数,由标准帧结构中的GAINx_By参数解压缩而来。本发明中根据它们之间的转换关系,以求得GAINx_By和AGAINx_By、FGAINx_By之间的比特位的对应关系,从而可以由附件C中给出的解压缩后的帧的比特位敏感性排序,得到标准语音帧的比特位敏感性排序。GAINx_By is a parameter in the G.723.1 standard frame structure. AGAINx_By and FGAINx_By are parameters in the decompressed frame structure in G.723.1 Annex C, which are decompressed from the GAINx_By parameter in the standard frame structure. In the present invention, according to the conversion relationship between them, to obtain the corresponding relationship of bits between GAINx_By and AGAINx_By, FGAINx_By, thereby can be sorted by the bit sensitivity of the decompressed frame given in Annex C, get Bit-sensitive ordering of standard speech frames.

由比特敏感性排序表可以得出,每一子帧的增益索引AGAINx_By(y>=3)的敏感性比较高,每一子帧的增益索引FGAINx_B4位敏感性很高,而AGAINx_By(y<3)和FGAINx_By的低四位敏感性都较低。From the bit sensitivity ranking table, it can be concluded that the sensitivity of the gain index AGAINx_By (y>=3) of each subframe is relatively high, the sensitivity of the gain index FGAINx_B4 of each subframe is very high, and the sensitivity of AGAINx_By (y<3 ) and the lower four bits of FGAINx_By are less sensitive.

由于AGAINx_By是标准帧结构中的GAINx_By整除24的商,所以AGAINx_By(y>=3)这些比特位主要由GAINx_By的最高4位决定,故而相应地有G.723.1标准帧结构中,GAINx_By的最高4位的敏感性比其它的位高。Since AGAINx_By is the quotient of GAINx_By in the standard frame structure divided by 24, the bits of AGAINx_By (y>=3) are mainly determined by the highest 4 bits of GAINx_By, so correspondingly in the G.723.1 standard frame structure, the highest 4 bits of GAINx_By bit is more sensitive than other bits.

另外,增益索引FGAINx_By最高位情况复杂一些,不仅GAINx_By的高位对它有影响,低位也会影响到它的取值,但FGAINx_By的低四位敏感性都很低,所以整体上优先考虑对AGAINx_By高位有影响的GAINx_By的位的加密,也即GAINx_By的高位。In addition, the highest bit of the gain index FGAINx_By is more complicated. Not only the high bit of GAINx_By affects it, but the low bit also affects its value, but the sensitivity of the lower four bits of FGAINx_By is very low, so the overall priority is given to the high bit of AGAINx_By Encryption of the affected GAINx_By bit, that is, the high bit of GAINx_By.

因此,把G.723.1标准帧的比特位按照敏感性划分为五类CLASS1,CLASS2,CLASS3,CLASS4,CLASS5,CLASS1类中的比特位敏感性最高,CLASS2其次,依次类推。因此,最低安全等级Level1的加密是对CLASS1中的比特位加密,高一安全等级Level2的是对CLASS1和CLASS2中的比特位加密,...,最高安全等级Level4的加密是对五类中的前4类比特位进行加密。Therefore, the bits of the G.723.1 standard frame are divided into five categories according to sensitivity: CLASS1, CLASS2, CLASS3, CLASS4, CLASS5, and the bit sensitivity of CLASS1 is the highest, followed by CLASS2, and so on. Therefore, the encryption of the lowest security level Level1 is to encrypt the bits in CLASS1, the level of one higher security level Level2 is to encrypt the bits in CLASS1 and CLASS2, ..., the encryption of the highest security level Level4 is to encrypt the bits in the five categories The first 4 types of bits are encrypted.

其中,CLASS是对比特位的分类,Level是对安全等级的划分。Among them, CLASS is the classification of bits, and Level is the division of security levels.

在G.723.1的标准帧结构高速率模式(6.3kbps)下,比特位的主观敏感性排序号如表7所示。特别需要说明的是,本表没有给出各比特位的精确排序,而是根据敏感性做了大致的类别划分,划分为五类表示其敏感性由高至低。In the high-speed mode (6.3kbps) of the standard frame structure of G.723.1, the subjective sensitivity ranking numbers of the bits are shown in Table 7. In particular, it should be noted that this table does not give the precise ordering of each bit, but roughly classifies them according to their sensitivities. The five classes represent their sensitivities from high to low.

                          表7  在G.723.1的标准帧结构高速率                                                                                        , the standard frame structure of G.723.1 is at a high rate

                      模式(6.3kbps)下,比特位的主观敏感性排序号   信道中的字节序号 比特位的主观敏感性排序号 1   LPC_B5(CLASS5)   LPC_B4(CLASS5)   LPC_B3(CLASS5)   LPC_B2(CLASS5)   LPC_B1(CLASS5)   LPC_B0(CLASS5)  VADFLAG_B0   RATEFLAG_B0 2   LPC_B13(CLASS5)   LPC_B12(CLASS5)   LPC_B11(CLASS5)   LPC_B10(CLASS5)   LPC_B9(CLASS5)   LPC_B8(CLASS5)   LPC_B7(CLASS5)   LPC_B6(CLASS5) 3   LPC_B21(CLASS1)   LPC_B20(CLASS1)   LPC_B19(CLASS1)   LPC_B18(CLASS1)   LPC_B17(CLASS2)   LPC_B16(CLASS2)   LPC_B15(CLASS2)   LPC_B14(CLASS2) 4   ACL0_B5(CLASS1)   ACL0_B4(CLASS1)   ACL0_B3(CLASS1)   ACL0_B2(CLASS1)   ACL0_B1(CLASS1)   ACL0_B0(CLASS1)   LPC_B23(CLASS1)   LPC_B22(CLASS1) 5   ACL2_B4(CLASS1)   ACL2_B3(CLASS1)   ACL2_B2(CLASS1)   ACL2_B1(CLASS1)   ACL2_B0(CLASS1)   ACL1_B1(CLASS1)   ACL1_B0(CLASS2)   ACL0_B6(CLASS1) 6   GAIN0_B3(CLASS3)   GAIN0_B2(CLASS4)   GAIN0_B1(CLASS4)   GAIN0_B0(CLASS4)   ACL3_B1(CLASS1)   ACL3_B0(CLASS2)   ACL2_B6(CLASS1)   ACL2_B5(CLASS1) 7   GAIN0_B11(CLASS1)   GAIN0_B10(CLASS)   GAIN0_B9(CLASS1)   GAIN0_B8(CLASS1)   GAIN0_B7(CLASS2)   GAIN0_B6(CLASS2)   GAIN0_B5(CLASS3)   GAIN0_B4(CLASS3) 8   GAIN1_B7(CLASS2)   GAIN1_B6(CLASS2)   GAIN1_B5(CLASS3)   GAIN1_B4(CLASS3)   GAIN1_B3(CLASS3)   GAIN1_B2(CLASS4)   GAIN1_B1(CLASS4)   GAIN1_B0(CLASS4) 9   GAIN2_B3(CLASS3)   GAIN2_B2(CLASS4)   GAIN2_B1(CLASS4)   GAIN2_B0(CLASS4)   GAIN1_B11(CLASS1)   GAIN1_B10(CLASS1)   GAIN1_B9(CLASS1)   GAIN1_B8(CLASS1) 10   GAIN2_B11(CLASS1)   GAIN2_B10(CLASS1)   GAIN2_B9(CLASS1)   GAIN2_B8(CLASS1)   GAIN2_B7(CLASS2)   GAIN2_B6(CLASS2)   GAIN2_B5(CLASS3)   GAIN2_B4(CLASS3) 11   GAIN3_B7(CLASS2)   GAIN3_B6(CLASS2)   GAIN3_B5(CLASS3)   GAIN3_B4(CLASS3)   GAIN3_B3(CLASS3)   GAIN3_B2(CLASS4)   GAIN3_B1(CLASS4)   GAIN3_B0(CLASS4) 12   GRID3_B0(CLASS5)   GRID2_B0(CLASS5)   GRID1_B0(CLASS5)   GRID0_B0(CLASS5)   GAIN3_B11(CLASS1)   GAIN3_B10(CLASS1)   GAIN3_B9(CLASS1)   GAIN3_B8(CLASS1) 13   MSBPOS_B6(CLASS1)   MSBPOS_B5(CLASS1)   MSBPOS_B4(CLASS1)   MSBPOS_B3(CLASS1)   MSBPOS_B2(CLASS5)   MSBPOS_B1(CLASS5)   MSBPOS_B0(CLASS5)   UB(CLASS5) 14   POS0_B1(CLASS5)   POS0_B0(CLASS5)   MSBPOS_B12(CLASS1)   MSBPOS_B11(CLASS1)   MSBPOS_B10(CLASS1)   MSBOS_B9(CLASS1)   MSBPOS_B8(CLASS1)   MSBPOS_B7(CLASS1) 15   POS0_B9(CLASS5)   POS0_B8(CLASS5)   POS0_B7(CLASS5)   POS0_B6(CLASS5)   POS0_B5(CLASS5)   POS0_B4(CLASS5)   POS0_B3(CLASS5)   POS0_B2(CLASS5) 16   POS1_B1(CLASS5)   POS1_B0(CLASS5)   POS0_B15(CLASS5)   POS0_B14(CLASS5)   POS0_B13(CLASS5)   POS0_B12(CLASS5)   POS0_B11(CLASS5)   POS0_B10(CLASS5) 17   POS1_B9(CLASS5)   POS1_B8(CLASS5)   POS1_B7(CLASS5)   POS1_B6(CLASS5)   POS1_B5(CLASS5)   POS1_B4(CLASS5)   POS1_B3(CLASS5)   POS1_B2(CLASS5) 18   POS2_B3(CLASS5)   POS2_B2(CLASS5)   POS2_B1(CLASS5)   POS1_B0(CLASS5)   POS1_B13(CLASS5)   POS1_B12(CLASS5)   POS1_B11(CLASS5)   POS1_B10(CLASS5) 19   POS2_B11(CLASS5)   POS2_B10(CLASS5)   POS2_B9(CLASS5)   POS2_B8(CLASS5)   POS2_B7(CLASS5)   POS2_B6(CLASS5)   POS2_B5(CLASS5)   POS2_B4(CLASS5) 20   POS3_B3(CLASS5)   POS3_B2(CLASS5)   POS3_B1(CLASS5)   POS3_B0(CLASS5)   POS2_B15(CLASS5)   POS2_B14(CLASS5)   POS2_B13(CLASS5)   POS2_B12(CLASS5) 21   POS3_B11   POS3_B10   POS3_B9   POS3_B8   POS3_B7   POS3_B6   POS3_B5   POS3_B4   (CLASS5)   (CLASS5)   (CLASS5)   (CLASS5)   (CLASS5)   (CLASS5)   (CLASS5)   (CLASS5) 22   PSIG0_B5(CLASS5)   PSIG0_B4(CLASS5)   PSIG0_B3(CLASS5)   PSIG0_B2(CLASS5)   PSIG0_B1(CLASS5)   PSIG0_B0(CLASS5)   POS3_B13(CLASS5)   POS3_B12(CLASS5) 23   PSIG2_B2(CLASS5)   PSIG2_B1(CLASS5)   PSIG2_B0(CLASS5)   PSIG1_B4(CLASS5)   PSIG1_B3(CLASS5)   PSIG1_B2(CLASS5)   PSIG1_B1(CLASS5)   PSIG1_B0(CLASS5) 24   PSIG3_B4(CLASS5)   PSIG3_B3(CLASS5)   PSIG3_B2(CLASS5)   PSIG3_B1(CLASS5)   PSIG3_B0(CLASS5)   PSIG2_B5(CLASS5)   PSIG2_B4(CLASS5)   PSIG2_B3(CLASS5) In mode (6.3kbps), the subjective sensitivity order number of bits byte ordinal in channel Subjective Sensitivity Ranking Number of Bits 1 LPC_B5 (CLASS5) LPC_B4 (CLASS5) LPC_B3 (CLASS5) LPC_B2 (CLASS5) LPC_B1(CLASS5) LPC_B0 (CLASS5) VADFLAG_B0 RATEFLAG_B0 2 LPC_B13 (CLASS5) LPC_B12 (CLASS5) LPC_B11 (CLASS5) LPC_B10 (CLASS5) LPC_B9 (CLASS5) LPC_B8 (CLASS5) LPC_B7 (CLASS5) LPC_B6 (CLASS5) 3 LPC_B21 (CLASS1) LPC_B20 (CLASS1) LPC_B19 (CLASS1) LPC_B18 (CLASS1) LPC_B17 (CLASS2) LPC_B16(CLASS2) LPC_B15 (CLASS2) LPC_B14 (CLASS2) 4 ACL0_B5 (CLASS1) ACL0_B4 (CLASS1) ACL0_B3 (CLASS1) ACL0_B2 (CLASS1) ACL0_B1 (CLASS1) ACL0_B0 (CLASS1) LPC_B23 (CLASS1) LPC_B22 (CLASS1) 5 ACL2_B4 (CLASS1) ACL2_B3 (CLASS1) ACL2_B2(CLASS1) ACL2_B1(CLASS1) ACL2_B0(CLASS1) ACL1_B1 (CLASS1) ACL1_B0(CLASS2) ACL0_B6 (CLASS1) 6 GAIN0_B3 (CLASS3) GAIN0_B2 (CLASS4) GAIN0_B1 (CLASS4) GAIN0_B0 (CLASS4) ACL3_B1 (CLASS1) ACL3_B0 (CLASS2) ACL2_B6(CLASS1) ACL2_B5 (CLASS1) 7 GAIN0_B11 (CLASS1) GAIN0_B10 (CLASS) GAIN0_B9 (CLASS1) GAIN0_B8 (CLASS1) GAIN0_B7 (CLASS2) GAIN0_B6 (CLASS2) GAIN0_B5 (CLASS3) GAIN0_B4 (CLASS3) 8 GAIN1_B7 (CLASS2) GAIN1_B6 (CLASS2) GAIN1_B5 (CLASS3) GAIN1_B4 (CLASS3) GAIN1_B3 (CLASS3) GAIN1_B2 (CLASS4) GAIN1_B1 (CLASS4) GAIN1_B0 (CLASS4) 9 GAIN2_B3 (CLASS3) GAIN2_B2 (CLASS4) GAIN2_B1 (CLASS4) GAIN2_B0 (CLASS4) GAIN1_B11 (CLASS1) GAIN1_B10 (CLASS1) GAIN1_B9 (CLASS1) GAIN1_B8 (CLASS1) 10 GAIN2_B11 (CLASS1) GAIN2_B10 (CLASS1) GAIN2_B9 (CLASS1) GAIN2_B8 (CLASS1) GAIN2_B7 (CLASS2) GAIN2_B6 (CLASS2) GAIN2_B5 (CLASS3) GAIN2_B4 (CLASS3) 11 GAIN3_B7 (CLASS2) GAIN3_B6 (CLASS2) GAIN3_B5 (CLASS3) GAIN3_B4 (CLASS3) GAIN3_B3 (CLASS3) GAIN3_B2 (CLASS4) GAIN3_B1 (CLASS4) GAIN3_B0 (CLASS4) 12 GRID3_B0(CLASS5) GRID2_B0(CLASS5) GRID1_B0 (CLASS5) GRID0_B0 (CLASS5) GAIN3_B11 (CLASS1) GAIN3_B10 (CLASS1) GAIN3_B9 (CLASS1) GAIN3_B8 (CLASS1) 13 MSBPOS_B6 (CLASS1) MSBPOS_B5 (CLASS1) MSBPOS_B4 (CLASS1) MSBPOS_B3 (CLASS1) MSBPOS_B2 (CLASS5) MSBPOS_B1 (CLASS5) MSBPOS_B0 (CLASS5) UB (CLASS5) 14 POS0_B1 (CLASS5) POS0_B0 (CLASS5) MSBPOS_B12 (CLASS1) MSBPOS_B11 (CLASS1) MSBPOS_B10 (CLASS1) MSBOS_B9(CLASS1) MSBPOS_B8 (CLASS1) MSBPOS_B7 (CLASS1) 15 POS0_B9 (CLASS5) POS0_B8 (CLASS5) POS0_B7 (CLASS5) POS0_B6 (CLASS5) POS0_B5 (CLASS5) POS0_B4 (CLASS5) POS0_B3 (CLASS5) POS0_B2 (CLASS5) 16 POS1_B1 (CLASS5) POS1_B0 (CLASS5) POS0_B15 (CLASS5) POS0_B14 (CLASS5) POS0_B13 (CLASS5) POS0_B12 (CLASS5) POS0_B11 (CLASS5) POS0_B10 (CLASS5) 17 POS1_B9 (CLASS5) POS1_B8 (CLASS5) POS1_B7 (CLASS5) POS1_B6 (CLASS5) POS1_B5 (CLASS5) POS1_B4 (CLASS5) POS1_B3 (CLASS5) POS1_B2 (CLASS5) 18 POS2_B3 (CLASS5) POS2_B2 (CLASS5) POS2_B1 (CLASS5) POS1_B0 (CLASS5) POS1_B13 (CLASS5) POS1_B12 (CLASS5) POS1_B11 (CLASS5) POS1_B10 (CLASS5) 19 POS2_B11 (CLASS5) POS2_B10 (CLASS5) POS2_B9 (CLASS5) POS2_B8 (CLASS5) POS2_B7 (CLASS5) POS2_B6 (CLASS5) POS2_B5 (CLASS5) POS2_B4 (CLASS5) 20 POS3_B3 (CLASS5) POS3_B2 (CLASS5) POS3_B1 (CLASS5) POS3_B0 (CLASS5) POS2_B15 (CLASS5) POS2_B14 (CLASS5) POS2_B13 (CLASS5) POS2_B12 (CLASS5) twenty one POS3_B11 POS3_B10 POS3_B9 POS3_B8 POS3_B7 POS3_B6 POS3_B5 POS3_B4 (CLASS5) (CLASS5) (CLASS5) (CLASS5) (CLASS5) (CLASS5) (CLASS5) (CLASS5) twenty two PSIG0_B5 (CLASS5) PSIG0_B4 (CLASS5) PSIG0_B3 (CLASS5) PSIG0_B2 (CLASS5) PSIG0_B1 (CLASS5) PSIG0_B0 (CLASS5) POS3_B13 (CLASS5) POS3_B12 (CLASS5) twenty three PSIG2_B2 (CLASS5) PSIG2_B1 (CLASS5) PSIG2_B0 (CLASS5) PSIG1_B4 (CLASS5) PSIG1_B3 (CLASS5) PSIG1_B2 (CLASS5) PSIG1_B1 (CLASS5) PSIG1_B0 (CLASS5) twenty four PSIG3_B4 (CLASS5) PSIG3_B3 (CLASS5) PSIG3_B2 (CLASS5) PSIG3_B1 (CLASS5) PSIG3_B0 (CLASS5) PSIG2_B5 (CLASS5) PSIG2_B4 (CLASS5) PSIG2_B3 (CLASS5)

在G.723.1的标准帧结构低速率模式(5.3kbps)下,比特位的主观敏感性排序号如表8所示:In the low-rate mode (5.3kbps) of the standard frame structure of G.723.1, the subjective sensitivity ranking numbers of the bits are shown in Table 8:

                                         表8在G.723.1的标准帧结构低速率Table 8 Low rate in G.723.1 standard frame structure

                                  模式(5.3kbps)下,比特位的主观敏感性排序号   信道中的字节序号 比特位的主观敏感性排序号 1   LPC_B5(CLASS5)   LPC_B4(CLASS5)   LPC_B3(CLASS5)   LPC_B2(CLASS5)   LPC_B1(CLASS5)   LPC_B0(CLASS5)   VADFLAG_B0 RATEFLAG_B0 2   LPC_B13(CLASS5)   LPC_B12(CLASS5)   LPC_B11(CLASS5)   LPC_B10(CLASS5)   LPC_B9(CLASS5)   LPC_B8(CLASS5)   LPC_B7(CLASS5)   LPC_B6(CLASS5) 3   LPC_B21(CLASS1)   LPC_B20(CLASS1)   LPC_B19(CLASS1)   LPC_B18(CLASS1)   LPC_B17(CLASS2)   LPC_B16(CLASS2)   LPC_B15(CLASS2)   LPC_B14(CLASS2) 4   ACL0_B5(CLASS1)   ACL0_B4(CLASS1)   ACL0_B3(CLASS1)   ACL0_B2(CLASS1)   ACL0_B1(CLASS1)   ACL0_B0(CLASS1)   LPC_B23(CLASS1)   LPC_B22(CLASS1) 5   ACL2_B4(CLASS1)   ACL2_B3(CLASS1)   ACL2_B2(CLASS1)   ACL2_B1(CLASS1)   ACL2_B0(CLASS1)   ACL1_B1(CLASS1)   ACL1_B0(CLASS2)   ACL0_B6(CLASS1) 6   GAIN0_B3(CLASS3)   GAIN0_B2(CLASS4)   GAIN0_B1(CLASS4)   GAIN0_B0(CLASS4)   ACL3_B1(CLASS1)   ACL3_B0(CLASS2)   ACL2_B6(CLASS1)   ACL2_B5(CLASS1) 7   GAIN0_B11(CLASS1)   GAIN0_B10(CLASS1)   GAIN0_B9(CLASS1)   GAIN0_B8(CLASS1)   GAIN0_B7(CLASS2)   GAIN0_B6(CLASS2)   GAIN0_B5(CLASS3)   GAIN0_B4(CLASS3) 8   GAIN1_B7(CLASS2)   GAIN1_B6(CLASS2)   GAIN1_B5(CLASS3)   GAIN1_B4(CLASS3)   GAIN1_B3(CLASS3)   GAIN1_B2(CLASS4)   GAIN1_B1(CLASS4)   GAIN1_B0(CLASS4) 9   GAIN2_B3(CLASS3)   GAIN2_B2(CLASS4)   GAIN2_B1(CLASS4)   GAIN2_B0(CLASS4)   GAIN1_B11(CLASS1)   GAIN1_B10(CLASS1)   GAIN1_B9(CLASS1)   GAIN1_B8(CLASS1) 10   GAIN2_B11(CLASS1)   GAIN2_B10(CLASS1)   GAIN2_B9(CLASS1)   GAIN2_B8(CLASS1)   GAIN2_B7(CLASS2)   GAIN2_B6(CLASS2)   GAIN2_B5(CLASS3)   GAIN2_B4(CLASS3) 11   GAIN3_B7(CLASS2)   GAIN3_B6(CLASS2)   GAIN3_B5(CLASS3)   GAIN3_B4(CLASS3)   GAIN3_B3(CLASS3)   GAIN3_B2(CLASS4)   GAIN3_B1(CLASS4)   GAIN3_B0(CLASS4) 12   GRID3_B0(CLASS5)   GRID2_B0(CLASS5)   GRID1_B0(CLASS5)   GRID0_B0(CLASS5)   GAIN3_B11(CLASS1)   GAIN3_B10(CLASS1)   GAIN3_B9(CLASS1)   GAIN3_B8(CLASS1) 13   POS0_B7(CLASS5)   POS0_B6(CLASS5)   POS0_B5(CLASS5)   POS0_B4(CLASS5)   POS0_B3(CLASS5)   POS0_B2(CLASS5)   POS0_B1(CLASS5)   POS0_B0(CLASS5) 14   POS1_B3(CLASS5)   POS1_B2(CLASS5)   POS1_B1(CLASS5)   POS1_B0(CLASS5)   POS0_B11(CLASS5)   POS0_B10(CLASS5)   POS0_B9(CLASS5)   POS0_B8(CLASS5) 15   POS1_B11(CLASS5)   POS1_B10(CLASS5)   POS1_B9(CLASS5)   POS1_B8(CLASS5)   POS1_B7(CLASS5)   POS1_B6(CLASS5)   POS1_B5(CLASS5)   POS1_B4(CLASS5) 16   POS2_B7(CLASS5)   POS2_B6(CLASS5)   POS2_B5(CLASS5)   POS2_B4(CLASS5)   POS2_B3(CLASS5)   POS2_B2(CLASS5)   POS2_B1(CLASS5)   POS2_B0(CLASS5) 17   POS3_B3(CLASS5)   POS3_B2(CLASS5)   POS3_B1(CLASS5)   POS3_B0(CLASS5)   POS2_B11(CLASS5)   POS2_B10(CLASS5)   POS2_B9(CLASS5)   POS2_B8(CLASS5) 18   POS3_B11(CLASS5)   POS3_B10(CLASS5)   POS3_B9(CLASS5)   POS3_B8(CLASS5)   POS3_B7(CLASS5)   POS3_B6(CLASS5)   POS3_B5(CLASS5)   POS3_B4(CLASS5) 19   PSIG1_B3(CLASS5)   PSIG1_B2(CLASS5)   PSIG1_B1(CLASS5)   PSIG1_B0(CLASS5)   PSIG0_B3(CLASS5)   PSIG0_B2(CLASS5)   PSIG0_B1(CLASS5)   PSIG0_B0(CLASS5) 20   PSIG3_B3(CLASS5)   PSIG3_B2(CLASS5)   PSIG3_B1(CLASS5)   PSIG3_B0(CLASS5)   PSIG2_B3(CLASS5)   PSIG2_B2(CLASS5)   PSIG2_B1(CLASS5)   PSIG2_B0(CLASS5) In mode (5.3kbps), the subjective sensitivity order number of bits byte ordinal in channel Subjective Sensitivity Ranking Number of Bits 1 LPC_B5 (CLASS5) LPC_B4 (CLASS5) LPC_B3 (CLASS5) LPC_B2 (CLASS5) LPC_B1(CLASS5) LPC_B0 (CLASS5) VADFLAG_B0 RATEFLAG_B0 2 LPC_B13 (CLASS5) LPC_B12 (CLASS5) LPC_B11 (CLASS5) LPC_B10 (CLASS5) LPC_B9 (CLASS5) LPC_B8 (CLASS5) LPC_B7 (CLASS5) LPC_B6 (CLASS5) 3 LPC_B21 (CLASS1) LPC_B20 (CLASS1) LPC_B19 (CLASS1) LPC_B18 (CLASS1) LPC_B17 (CLASS2) LPC_B16(CLASS2) LPC_B15 (CLASS2) LPC_B14 (CLASS2) 4 ACL0_B5 (CLASS1) ACL0_B4 (CLASS1) ACL0_B3 (CLASS1) ACL0_B2 (CLASS1) ACL0_B1 (CLASS1) ACL0_B0 (CLASS1) LPC_B23 (CLASS1) LPC_B22 (CLASS1) 5 ACL2_B4 (CLASS1) ACL2_B3 (CLASS1) ACL2_B2(CLASS1) ACL2_B1(CLASS1) ACL2_B0(CLASS1) ACL1_B1 (CLASS1) ACL1_B0(CLASS2) ACL0_B6 (CLASS1) 6 GAIN0_B3 (CLASS3) GAIN0_B2 (CLASS4) GAIN0_B1 (CLASS4) GAIN0_B0 (CLASS4) ACL3_B1 (CLASS1) ACL3_B0 (CLASS2) ACL2_B6(CLASS1) ACL2_B5 (CLASS1) 7 GAIN0_B11 (CLASS1) GAIN0_B10 (CLASS1) GAIN0_B9 (CLASS1) GAIN0_B8 (CLASS1) GAIN0_B7 (CLASS2) GAIN0_B6 (CLASS2) GAIN0_B5 (CLASS3) GAIN0_B4 (CLASS3) 8 GAIN1_B7 (CLASS2) GAIN1_B6 (CLASS2) GAIN1_B5 (CLASS3) GAIN1_B4 (CLASS3) GAIN1_B3 (CLASS3) GAIN1_B2 (CLASS4) GAIN1_B1 (CLASS4) GAIN1_B0 (CLASS4) 9 GAIN2_B3 (CLASS3) GAIN2_B2 (CLASS4) GAIN2_B1 (CLASS4) GAIN2_B0 (CLASS4) GAIN1_B11 (CLASS1) GAIN1_B10 (CLASS1) GAIN1_B9 (CLASS1) GAIN1_B8 (CLASS1) 10 GAIN2_B11 (CLASS1) GAIN2_B10 (CLASS1) GAIN2_B9 (CLASS1) GAIN2_B8 (CLASS1) GAIN2_B7 (CLASS2) GAIN2_B6 (CLASS2) GAIN2_B5 (CLASS3) GAIN2_B4 (CLASS3) 11 GAIN3_B7 (CLASS2) GAIN3_B6 (CLASS2) GAIN3_B5 (CLASS3) GAIN3_B4 (CLASS3) GAIN3_B3 (CLASS3) GAIN3_B2 (CLASS4) GAIN3_B1 (CLASS4) GAIN3_B0 (CLASS4) 12 GRID3_B0(CLASS5) GRID2_B0(CLASS5) GRID1_B0 (CLASS5) GRID0_B0 (CLASS5) GAIN3_B11 (CLASS1) GAIN3_B10 (CLASS1) GAIN3_B9 (CLASS1) GAIN3_B8 (CLASS1) 13 POS0_B7 (CLASS5) POS0_B6 (CLASS5) POS0_B5 (CLASS5) POS0_B4 (CLASS5) POS0_B3 (CLASS5) POS0_B2 (CLASS5) POS0_B1 (CLASS5) POS0_B0 (CLASS5) 14 POS1_B3 (CLASS5) POS1_B2 (CLASS5) POS1_B1 (CLASS5) POS1_B0 (CLASS5) POS0_B11 (CLASS5) POS0_B10 (CLASS5) POS0_B9 (CLASS5) POS0_B8 (CLASS5) 15 POS1_B11 (CLASS5) POS1_B10 (CLASS5) POS1_B9 (CLASS5) POS1_B8 (CLASS5) POS1_B7 (CLASS5) POS1_B6 (CLASS5) POS1_B5 (CLASS5) POS1_B4 (CLASS5) 16 POS2_B7 (CLASS5) POS2_B6 (CLASS5) POS2_B5 (CLASS5) POS2_B4 (CLASS5) POS2_B3 (CLASS5) POS2_B2 (CLASS5) POS2_B1 (CLASS5) POS2_B0 (CLASS5) 17 POS3_B3 (CLASS5) POS3_B2 (CLASS5) POS3_B1 (CLASS5) POS3_B0 (CLASS5) POS2_B11 (CLASS5) POS2_B10 (CLASS5) POS2_B9 (CLASS5) POS2_B8 (CLASS5) 18 POS3_B11 (CLASS5) POS3_B10 (CLASS5) POS3_B9 (CLASS5) POS3_B8 (CLASS5) POS3_B7 (CLASS5) POS3_B6 (CLASS5) POS3_B5 (CLASS5) POS3_B4 (CLASS5) 19 PSIG1_B3 (CLASS5) PSIG1_B2 (CLASS5) PSIG1_B1 (CLASS5) PSIG1_B0 (CLASS5) PSIG0_B3 (CLASS5) PSIG0_B2 (CLASS5) PSIG0_B1 (CLASS5) PSIG0_B0 (CLASS5) 20 PSIG3_B3 (CLASS5) PSIG3_B2 (CLASS5) PSIG3_B1 (CLASS5) PSIG3_B0 (CLASS5) PSIG2_B3 (CLASS5) PSIG2_B2 (CLASS5) PSIG2_B1 (CLASS5) PSIG2_B0 (CLASS5)

从表7和表8可以得到,当安全等级为Level1时,加密CLASS1中的比特位,在高速率模式(6.3kbps)下共需要加密CLASS1中的48位,因此对语音帧中的48bit位加密;在低速率模式(5.3kbps)下共需要加密CLASS1中的38位,因此对语音帧中的38bit位加密;It can be obtained from Table 7 and Table 8 that when the security level is Level1, the bits in CLASS1 are encrypted. In the high-speed mode (6.3kbps), 48 bits in CLASS1 need to be encrypted, so 48 bits in the voice frame are encrypted. ;Under the low rate mode (5.3kbps), it is necessary to encrypt 38 bits in CLASS1, so the 38 bits in the voice frame are encrypted;

当安全等级为Level 2时,加密CLASS1和CLASS2中的比特位,在高速率模式(6.3kbps)下还需要加密CLASS2中的14位,因此对语音帧中的48+14=62bit位加密;低速率模式(5.3kbps)下还需要加密CLASS2中的14位,因此对语音帧中的38+12=52bit位加密;When the security level is Level 2, the bits in CLASS1 and CLASS2 are encrypted, and 14 bits in CLASS2 need to be encrypted in the high-speed mode (6.3kbps), so 48+14=62bits in the voice frame are encrypted; low Also need to encrypt 14 in the CLASS2 under the rate pattern (5.3kbps), therefore 38+12=52bit in the speech frame is encrypted;

当安全等级为Level 3时,加密CLASS1、CLASS2和CLASS3中的比特位,在高速率模式(6.3kbps)下还需要加密CLASS3中的12位,因此对语音帧中的62+12=74bit位加密;在低速率模式(5.3kbps)下还需要加密CLASS3中的12位,因此对语音帧中的52+12=64bit位加密;When the security level is Level 3, the bits in CLASS1, CLASS2 and CLASS3 are encrypted, and 12 bits in CLASS3 need to be encrypted in the high-speed mode (6.3kbps), so 62+12=74 bits in the voice frame are encrypted ; Also need to encrypt 12 in the CLASS3 under the low rate mode (5.3kbps), so 52+12=64bit in the voice frame is encrypted;

当安全等级为Level 4时,加密CLASS1、CLASS2、CLASS3和CLASS4中的比特位,在高速率模式(6.3kbps)下还需要加密CLASS4中的12位,因此对语音帧中的74+12=86bit位加密;在低速率模式(5.3kbps)下还需要加密12位,因此对语音帧中的64+12=76bit位加密。When the security level is Level 4, the bits in CLASS1, CLASS2, CLASS3 and CLASS4 are encrypted, and 12 bits in CLASS4 need to be encrypted in the high-speed mode (6.3kbps), so 74+12=86bit in the voice frame Bit encryption; under the low rate mode (5.3kbps), 12 bits need to be encrypted, so 64+12=76 bits in the speech frame are encrypted.

在本发明实施例中,根据比特位的敏感性排序,给第一类(CLASS1)给48比特(bit),第二类给14比特(bit)...,只是一个较佳的划分范畴,最敏感的48位划为第一类,是因为它囊括了几个重要参数的最重要的比特位部分。In the embodiment of the present invention, according to the sensitivity sorting of bits, 48 bits (bits) are given to the first class (CLASS1), and 14 bits (bits) are given to the second class, which is only a better division category. The most sensitive 48 bits are classified as the first category because it includes the most important bits of several important parameters.

在本发明实施例中,给出了比特位的加密的优先顺序,没有限制某种具体的应用背景以及安全强度需求。如果某种实际应用中,对比特位进行加密安全强度没有达到具体环境的应用要求的话,在此基础上依次增加对CLASS1、CLASS2...中的比特位的加密,直到获得所需效果。本领域的普通技术人员也可以根据本领域常用的划分方法,对比特位进行敏感性排序,但其并没有超出本发明的范围。In the embodiment of the present invention, the priority order of bit encryption is given, without limiting a certain specific application background and security strength requirements. If in a certain practical application, the security strength of encrypting the bits does not meet the application requirements of the specific environment, on this basis, increase the encryption of the bits in CLASS1, CLASS2... until the desired effect is obtained. Those skilled in the art may also perform sensitivity sorting on the bits according to the division methods commonly used in the art, but this does not exceed the scope of the present invention.

作为一种可实施的方式,所述安全等级和选择性加密一帧中各字节需加密的比特位置表的数据结构可以表示如下:As an implementable manner, the data structure of the security level and the bit position table to be encrypted for each byte in a selective encryption frame can be expressed as follows:

/*安全等级*//*Security Level*/

#define SECURITY_LEVEL1  1  ∥需要加密以上提出的CLASS1中的比特位#define SECURITY_LEVEL1 1 ∥ needs to encrypt the bits in CLASS1 proposed above

#define SECURITY_LEVEL2  2  ∥需要加密以上提出的CLASS1~2中的比特位#define SECURITY_LEVEL2 2 ∥ It is necessary to encrypt the bits in CLASS1~2 proposed above

#define SECURITY_LEVEL3  3  ∥需要加密以上提出的CLASS1~3中的比特位#define SECURITY_LEVEL3 3 ∥ It is necessary to encrypt the bits in CLASS1~3 proposed above

#define SECURITY_LEVEL4  4  ∥需要加密以上提出的CLASS1~4中的比特位#define SECURITY_LEVEL4 4 ∥ It is necessary to encrypt the bits in CLASS1~4 proposed above

/*选择性加密一帧中需加密的字节序号表*//*Selectively encrypt the byte sequence number table to be encrypted in a frame*/

byte highrate_bytepos_list[]={3,4,5,6,7,8,9,10,11,12,13,14};byte highrate_bytepos_list[]={3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};

byte lowrate_bytepos_list[]={3,4,5,6,7,8,9,10,11,12};byte lowrate_bytepos_list[]={3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

/*选择性加密一帧中各字节需加密的比特位置表*//* Selectively encrypt the bit position table to be encrypted for each byte in a frame */

byte highrate_level1_bitpos_list[]={0xf0,0xff,0xfd,0x0b,0xf0,0x00,byte highrate_level1_bitpos_list[]={0xf0, 0xff, 0xfd, 0x0b, 0xf0, 0x00,

0x0f,0xf0,0x00,0x0f,0xf0,0x3f};0x0f, 0xf0, 0x00, 0x0f, 0xf0, 0x3f};

∥高速率、安全等级等级1时,选用的比特位置表∥For high speed and security level 1, the selected bit position table

byte highrate_level2_bitpos_list[]={0xff,0xff,0xff,0x0f,0xfc,0xc0,byte highrate_level2_bitpos_list[]={0xff, 0xff, 0xff, 0x0f, 0xfc, 0xc0,

0x0f,0xfc,0xc0,0x0f,0xf0,0x3f};0x0f, 0xfc, 0xc0, 0x0f, 0xf0, 0x3f};

∥高速率、安全等级等级2时,选用的比特位置表∥For high speed and security level 2, the selected bit position table

byte highrate_level3_bitpos_list[]={0xff,0xff,0xff,0x8f,0xff,0xf8,byte highrate_level3_bitpos_list[]={0xff, 0xff, 0xff, 0x8f, 0xff, 0xf8,

0x8f,0xff,0xf8,0x0f,0xf0,0x3f};0x8f, 0xff, 0xf8, 0x0f, 0xf0, 0x3f};

∥高速率、安全等级等级3时,选用的比特位置表∥For high speed and security level 3, the selected bit position table

byte highrate_level4_bitpos_list[]={0xff,0xff,0xff,0xff,0xff,0xff,byte highrate_level4_bitpos_list[]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0xff,0xff,0xff,0x0f,0xf0,0x3f};0xff, 0xff, 0xff, 0x0f, 0xf0, 0x3f};

∥高速率、安全等级等级4时,选用的比特位置表∥For high speed and security level 4, the selected bit position table

byte lowrate_level1_bitpos_list[]={0xf0,0xff,0xfd,0x0b,0xf0,0x00,byte lowrate_level1_bitpos_list[]={0xf0, 0xff, 0xfd, 0x0b, 0xf0, 0x00,

0x0f,0xf0,0x00,0x0f};0x0f, 0xf0, 0x00, 0x0f};

∥低速率、安全等级等级1时,选用的比特位置表∥ When the rate is low and the security level is 1, the selected bit position table

byte lowrate_level2_bitpos_list[]={0xff,0xff,0xff,0x0f,0xfc,0xc0,byte lowrate_level2_bitpos_list[]={0xff, 0xff, 0xff, 0x0f, 0xfc, 0xc0,

0x0f,0xfc,0xc0,0x0f};0x0f, 0xfc, 0xc0, 0x0f};

∥低速率、安全等级等级2时,选用的比特位置表∥ When the rate is low and the security level is 2, the selected bit position table

byte lowrate_level3_bitpos_list[]={0xff,0xff,0xff,0x8f,0xff,0xf8,byte lowrate_level3_bitpos_list[]={0xff, 0xff, 0xff, 0x8f, 0xff, 0xf8,

0x8f,0xff,0xf8,0x0f};0x8f, 0xff, 0xf8, 0x0f};

∥低速率、安全等级等级3时,选用的比特位置表∥ When the rate is low and the security level is 3, the selected bit position table

byte lowrate_level4_bitpos_list[]={0xff,0xff,0xff,0xff,0xff,0xff,byte lowrate_level4_bitpos_list[]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0xff,0xff,0xff,0x0f};0xff, 0xff, 0xff, 0x0f};

∥低速率、安全等级等级4时,选用的比特位置表∥ When the rate is low and the security level is 4, the selected bit position table

下面详细说明本发明步骤S230执行加密操作的具体方法过程:The concrete method process that step S230 of the present invention carries out encryption operation is described in detail below:

首先,G.723.1的帧大小有三种:24字节(6.4kbit/s帧),20字节(5.3kbit/s帧)和4字节,其中4字节帧为SID(静音插入指示语),三种帧如何间隔没有限制。其帧的大小通过每帧的头两个比特VADFLAG_B0和RATEFLAG_B0反映。其对应关系如表9所示:First of all, G.723.1 has three frame sizes: 24 bytes (6.4kbit/s frame), 20 bytes (5.3kbit/s frame) and 4 bytes, of which the 4-byte frame is the SID (Silent Insertion Indicator) , there is no limit on how the three frames are spaced apart. The frame size is reflected by the first two bits VADFLAG_B0 and RATEFLAG_B0 of each frame. The corresponding relationship is shown in Table 9:

表9  VADFLAG_B0和RATEFLAG_B0与每帧比特数的对应关系表   RATEFLAG_B0   VADFLAG   每帧比特数(比特)   0   0   192(24字节)   0   1   160(20字节)   1   0   32(4字节)   默认   默认   8(1字节) Table 9 Correspondence between VADFLAG_B0 and RATEFLAG_B0 and the number of bits per frame RATEFLAG_B0 VADFLAG Bits per frame (bits) 0 0 192 (24 bytes) 0 1 160 (20 bytes) 1 0 32 (4 bytes) default default 8 (1 byte)

因此,可以看出,VADFLAG_B0和RATEFLAG_B0两位是用来区别G.723.1的三种帧的,不能加密。Therefore, it can be seen that the two bits of VADFLAG_B0 and RATEFLAG_B0 are used to distinguish the three types of frames of G.723.1 and cannot be encrypted.

根据这种帧结构特点,保留每帧帧头VADFLAG_B0和RATEFLAG_B0是必要的,以此判断是否属于静音帧。According to the characteristics of this frame structure, it is necessary to reserve the frame header VADFLAG_B0 and RATEFLAG_B0 of each frame, so as to judge whether it belongs to a silent frame.

同时,在G.723.1编码中,由于语音的有效数据都包含在每帧24字节和20字节的语音帧中,而静音帧包含的是无效的数据量,所以在加密时就不用对静音帧进行加密,这样可以减少加密的数据量。At the same time, in the G.723.1 encoding, since the effective data of the voice is included in the voice frames of 24 bytes and 20 bytes per frame, and the silence frame contains invalid data, there is no need to modify the silence when encrypting. Frames are encrypted, which reduces the amount of encrypted data.

在本发明实施例中,如图8所示;以高速率语音帧、安全等级为1的情况为例进行分析说明,此时要加密的字节序号表选用byte highrate_bytepos_list[],比特位置表选用byte highrate_level1_bitpos_list[]。In the embodiment of the present invention, as shown in Figure 8; Take the situation of high-speed voice frame and security level as 1 as an example to analyze and illustrate, the byte sequence number table to be encrypted is selected byte highrate_bytepos_list[] for use, and the bit position table is selected for use byte highrate_level1_bitpos_list[].

其中,高速率语音帧71(一帧24字节)中,斜体带下划线表示此字节有需要加密的位,否则没有。Among them, in the high-speed speech frame 71 (a frame of 24 bytes), the underlined italics indicate that this byte has bits that need to be encrypted, otherwise there is no bit.

数组72表示长度为12的字节(byte)型数组,它的第一项存放的数据对应于语音帧的第三帧,前四位为1表示语音帧第三帧前四位需要加密,后四位则不需要,依此类推。Array 72 represents that length is a byte (byte) type array of 12, and the data stored in its first item corresponds to the third frame of the speech frame, and the first four digits are 1 to represent that the first four digits of the third frame of the speech frame need to be encrypted. Four bits are not needed, and so on.

数组keyList[8]73表表Xi小数点后取64位二进制位,生成8字节的字节型(byte)型数据,存入数组keyList[8]73中。The array keyList[8]73 table table Xi gets 64 binary digits after the decimal point, generates 8-byte byte type (byte) type data, and stores it in the array keyList[8]73.

具体包括如下步骤:Specifically include the following steps:

步骤S231,首先收到语音帧的第一帧,此处经判定后假设为高速率帧,安全等级为1,查找数组byte highrate bytepos_list[]的第1项为3,说明语音帧的第3字节有要加密的位;Step S231, at first receive the first frame of the speech frame, which is assumed to be a high-rate frame after being judged here, and the security level is 1, and the first item of the search array byte highrate bytepos_list[] is 3, indicating that the third word of the speech frame section has bits to encrypt;

步骤S232,数组byte highrate_level1_bitpos_list[]的第1项记录语音帧的第3字节需要加密的比特位,取出其值11110000,比特位为1说明相应语音帧字节的比特位需要加密,否则不用;Step S232, the first item of the array byte highrate_level1_bitpos_list[] records the bit that needs to be encrypted in the 3rd byte of the voice frame, takes out its value 11110000, and the bit is 1 to illustrate that the bit of the corresponding voice frame byte needs to be encrypted, otherwise not;

步骤S233,将11110000与数组keyList[](存放生成的64位密钥流)的第1项相与,得到的结果与语音帧的第3字节进行异或,结果送回语音帧第3字节;Step S233: AND 11110000 with the first item of the array keyList[] (storing the generated 64-bit key stream), XOR the result obtained with the third byte of the speech frame, and send the result back to the third word of the speech frame Festival;

步骤S234,再查找数组byte highrate_bytepos_list[]的第2项为4,说明语音帧的第4字节有要加密的位;Step S234, then look for the second item of the array byte highrate_bytepos_list[] to be 4, indicating that the 4th byte of the voice frame has a bit to be encrypted;

步骤S235,数组byte highrate_level1_bitpos_list[]的第2项记录语音帧的第4字节需要加密的比特位,取出其值11111111;Step S235, the 2nd item of the array byte highrate_level1_bitpos_list[] records the bit that the 4th byte of the voice frame needs to be encrypted, and takes out its value 11111111;

步骤S236,与数组keyList[]的第2项相与,得到的结果与语音帧的第4字节进行异或,结果送回语音帧第4字节。Step S236, AND with the second item of the array keyList[], XOR the obtained result with the 4th byte of the speech frame, and send the result back to the 4th byte of the speech frame.

以此类推,直到将语音帧的第10字节加密完成,如图9所示。By analogy, until the 10th byte of the voice frame is encrypted, as shown in FIG. 9 .

步骤S237,当语音帧的第11个字节需要加密时,keyList[]表回到表头第1项,用此字节与语音帧第11字节进行异或加密。Step S237, when the 11th byte of the voice frame needs to be encrypted, the keyList[] table returns to item 1 of the header, and uses this byte to perform XOR encryption with the 11th byte of the voice frame.

如图10所示,当进行到步骤S237时,keyList[]的第8个字节也已用完,当语音帧的第11个字节需要加密时,keyList[]表回到表头第1项,用此字节与语音帧第11字节进行异或加密。因为语音帧每一字节要加密的比特位并不相同,即使keyList[]重复使用,其中每一次真正使用到的比特位也不尽相同。As shown in Figure 10, when proceeding to step S237, the 8th byte of keyList[] is also used up, and when the 11th byte of the voice frame needs to be encrypted, keyList[] table returns to the 1st byte of the header Item, use this byte to perform XOR encryption with the 11th byte of the voice frame. Because the bits to be encrypted for each byte of the voice frame are different, even if keyList[] is used repeatedly, the bits actually used each time are different.

步骤S238,向后滑动继续加密第12字节,同时,keyList[]表也向后滑动到第2项,byte highrate_bytepos_list[]和byte highrate_level1_bitpos_list[]也向后移动一项;Step S238, slide backward to continue encrypting the 12th byte, meanwhile, the keyList[] table also slides backward to the second item, and byte highrate_bytepos_list[] and byte highrate_level1_bitpos_list[] also move backward one item;

如图11所示,语音帧第11字节加密完后,向后滑动继续加密第12字节,同时,keyList[]表也向后滑动到第2项,byte highrate_bytepos_list[]和byte highrate_level1_bitpos_list[]也向后移动一项;As shown in Figure 11, after the 11th byte of the voice frame is encrypted, slide backwards to continue encrypting the 12th byte. At the same time, the keyList[] table also slides backwards to the second item, byte highrate_bytepos_list[] and byte highrate_level1_bitpos_list[] also move backward one item;

以此类推,至加密完成语音帧第14字节,此语音帧加密完成,因为第14字节以后没有需要加密的字节,如图12所示。By analogy, until the 14th byte of the voice frame is encrypted, the voice frame is encrypted, because there is no byte to be encrypted after the 14th byte, as shown in Figure 12.

步骤S239,在当前语音帧加密完成后,取下一帧语音帧,判断是否为静音帧,如果是静音帧则不执行加密操作,继续取下一帧;如果不是静音帧,则继续下一步骤;Step S239, after the encryption of the current voice frame is completed, take the next frame of voice frame, and judge whether it is a silent frame, if it is a silent frame, then do not perform the encryption operation, and continue to take the next frame; if it is not a silent frame, then continue to the next step ;

此时,如图13所示,keyList[]表从第2项开始使用,与语音帧第1个需要加密的字节(即字节3)进行异或操作。At this time, as shown in FIG. 13 , the keyList[] table is used starting from the second item, and XOR operation is performed with the first byte to be encrypted (that is, byte 3) of the speech frame.

后续操作和上一帧语音帧一样,语音帧字节、keyList[]、byte highrate_bytepos_list[]和byte highrate_level1_bitpos_list[]都相应向后移动,逐字节进行异或加密。直到keyList[]第8项使用完,回到其表头第1项,再继续和语音帧下一字节异或加密,直到此语音帧加密完成。Subsequent operations are the same as the previous voice frame, the voice frame bytes, keyList[], byte highrate_bytepos_list[] and byte highrate_level1_bitpos_list[] all move backwards accordingly, and XOR encryption is performed byte by byte. Until the 8th item of keyList[] is used up, return to the 1st item of its header, and then continue XOR encryption with the next byte of the voice frame until the encryption of the voice frame is completed.

再取下一非静音语音帧,keyList[]表从第3项开始使用,与上类似和语音帧逐字节进行异或加密,直到此帧加密完成。Then take the next non-silent voice frame, and use the keyList[] table from item 3. Similar to the above, perform XOR encryption with the voice frame byte by byte until the encryption of this frame is completed.

再取下一非静音语音帧,keyList[]表从第8项开始使用,与上类似和语音帧逐字节进行异或加密,直到此帧加密完成。Then take the next non-silent voice frame, and use the keyList[] table from the 8th item, similar to the above, perform XOR encryption with the voice frame byte by byte until the encryption of this frame is completed.

此时,已加密过8个非静音帧,keyList[]表作废,需要更新。利用式(9)At this time, 8 non-silent frames have been encrypted, and the keyList[] table is invalid and needs to be updated. Using formula (9)

G(x)=(β+1)(1+1/β)β×(1-x)β,                               (9)G(x)=(β+1)(1+1/β) β ×(1-x) β , (9)

对xx(x的当前值)进行迭代,得到xi+1,取xi+1的小数点后的64位有效二进制位,转换为8个byte型数据,将转换的数据存入数组keyList[],实现了keyList[]的更新。Iterate over xx (the current value of x) to get x i+1 , take the 64 effective binary digits after the decimal point of x i+1 , convert it into 8 byte data, and store the converted data into the array keyList[] , to achieve the update of keyList[].

继续取一帧非静音帧,keyList[]表从第1项开始使用;Continue to take a non-silent frame, and the keyList[] table will be used from item 1;

继续取一帧非静音帧,keyList[]表从第2项开始使用;Continue to take a non-silent frame, and the keyList[] table will be used from item 2;

继续取一帧非静音帧,keyList[]表从第3项开始使用;Continue to take a non-silent frame, and the keyList[] table will be used from item 3;

重复上述过程,直至第8次取一帧非静音帧,keyList[]表从第8项开始使用。Repeat the above process until a non-silent frame is taken for the 8th time, and the keyList[] table is used from the 8th item.

这样,加密完成8个非静音帧,对xi进行迭代,得到xi+1对keyList[]进行更新。以此处理下一个8个非静音帧。In this way, 8 non-silent frames are encrypted, and xi is iterated to obtain xi +1 to update keyList[]. In this way, the next 8 non-silent frames are processed.

直到所有语音帧加密完成。Until all voice frames are encrypted.

本发明的语音编码选择性加密方法,使用选择性加密对G.723.1编码语音进行混沌流加密,具有如下优点:Speech coding selective encryption method of the present invention, uses selective encryption to carry out chaotic stream encryption to G.723.1 coded speech, has following advantages:

1)提高语音通话的实时性1) Improve the real-time performance of voice calls

语音编码选择性加密方法从以下几方面提高加密效率:The speech coding selective encryption method improves the encryption efficiency from the following aspects:

A1)对语音帧进行选择性加密,在帧间,仅对携带有语音信息的高/低速率帧进行加密,对大量的SID帧(静音帧)不加密;在帧内,按安全等级的需要,对那些敏感性高的比特位(即对重建语音影响大)进行加密。与传统的对语音媒体内容进行整体加密相比,这无疑加快加密速度。A1) Selectively encrypt voice frames. Between frames, only high/low rate frames carrying voice information are encrypted, and a large number of SID frames (silent frames) are not encrypted; within frames, according to the needs of the security level , to encrypt those bits with high sensitivity (that is, having a great influence on reconstructed speech). Compared with the traditional overall encryption of voice media content, this undoubtedly speeds up the encryption speed.

A2)使用流加密算法,将明文直接和密钥流进行异或,相比分组算法,此法速度更快。A2) Use the stream encryption algorithm to XOR the plaintext directly with the key stream. Compared with the block algorithm, this method is faster.

A3)为了增强安全性,流加密算法中使用的密钥流为混沌序列,由改进的Logistics map映射得到。此法在迭代过程中,计算复杂度较大,为了减少密钥流的计算量,结合G.723.1帧结构所选择的需要加密部分位置的特点,适当地对混沌密钥流进行重复使用(具体见实例详解),而不显著影响其安全性能。A3) In order to enhance security, the key stream used in the stream encryption algorithm is a chaotic sequence, which is obtained by the improved Logistics map mapping. In the iterative process of this method, the calculation complexity is relatively large. In order to reduce the calculation amount of the key stream, combined with the characteristics of the selected part of the G.723.1 frame structure that needs to be encrypted, the chaotic key stream is appropriately reused (specifically See examples for detailed explanation), without significantly affecting its safety performance.

2)降低系统能耗,减少对资源的占用2) Reduce system energy consumption and reduce resource occupation

对语音帧进行选择性加密,使用流加密算法,对混沌密钥流进行适当的重复利用,这些措施在提高效率的同时,也可以降低系统能耗,减少占用的资源数量。降低能耗在一些能源资源十分紧张的应用环境中,如无线通信领域中其移动设备携带能量有限,是非常关键的问题。减少对资源的占用,也可减轻网络处理节点的负荷。Selectively encrypt voice frames, use stream encryption algorithm, and properly reuse chaotic key streams. These measures can not only improve efficiency, but also reduce system energy consumption and the amount of resources occupied. Reducing energy consumption is a very critical issue in some application environments where energy resources are very tight, such as the limited energy carried by mobile devices in the field of wireless communications. Reducing the occupation of resources can also reduce the load of network processing nodes.

3)便于满足不同等级的业务需求3) It is convenient to meet the business needs of different levels

选择性加密不仅仅可以从技术上满足更好的需求,它在许多互联网的业务中,也有实际的应用价值。比如,提供各类音频服务的网站,其语音材料可以以不同的加密强度提供给用户,如果是免费提供给用户试听,可以对语音采取某种加密强度,以进行模糊处理。诸如此类的许多应用,总之,选择性加密为不同等级的业务需求提供了可行性与良好的技术支持。Selective encryption can not only meet better technical requirements, but also has practical application value in many Internet businesses. For example, for websites that provide various audio services, the voice materials can be provided to users with different encryption strengths. If they are provided for free to users for trial listening, a certain encryption strength can be used for the voice to perform obfuscation. Many applications like this, in short, selective encryption provides feasibility and good technical support for different levels of business needs.

以上对本发明的具体实施例进行了描述和说明,这些实施例应被认为其只是示例性的,并不用于对本发明进行限制,本发明应根据所附的权利要求进行解释。The specific embodiments of the present invention have been described and illustrated above, and these embodiments should be considered as exemplary only, and are not used to limit the present invention, and the present invention should be interpreted according to the appended claims.

Claims (11)

1、一种语音编码选择性加密方法,其特征在于,包括下列步骤:1, a kind of speech coding selective encryption method is characterized in that, comprises the following steps: 步骤A,首先进行初始化,选择加密所需安全等级,确定混沌流加密方法的调节参数;Step A, first perform initialization, select the security level required for encryption, and determine the adjustment parameters of the chaotic flow encryption method; 步骤B,按照帧速率和安全等级确定选用的加密字节序号表和比特位置表中的参数的比特位,利用混沌流加密方法执行加密操作。Step B, according to the frame rate and security level, determine the bits of parameters in the encrypted byte sequence number table and bit position table, and use the chaotic stream encryption method to perform encryption operations. 2、根据权利要求1所述的语音编码选择性加密方法,其特征在于,还包括下列步骤:2. The speech coding selective encryption method according to claim 1, further comprising the following steps: 步骤C,解密方接到加密数据后,首先进行初始化,然后执行解密操作。In step C, after the decryption party receives the encrypted data, it first performs initialization and then performs a decryption operation. 3、根据权利要求1或2所述的语音编码选择性加密方法,其特征在于,所述步骤A包括下列步骤:3. The speech coding selective encryption method according to claim 1 or 2, wherein said step A comprises the following steps: 步骤A1,用户选择加密所需的安全等级;Step A1, the user selects the security level required for encryption; 步骤A2,确定混沌流加密方法的调节参数;Step A2, determining the adjustment parameters of the chaotic flow encryption method; 步骤A3,取调节参数中的初始值的有效二进制位,转换字节型数据,将转换的数据存入一数组作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得密文。Step A3, get the effective binary bits of the initial value in the adjustment parameter, convert the byte data, store the converted data in an array as a key stream table, and perform XOR operation with the bits to be encrypted in the plain text of the voice data stream to get the ciphertext. 4、根据权利要求1或2所述的语音编码选择性加密方法,其特征在于,所述步骤B包括下列步骤:4. The speech coding selective encryption method according to claim 1 or 2, wherein said step B comprises the following steps: 步骤B1,根据收到的一帧语音帧的头两位,判断其是高速率帧,低速率帧,还是静音帧;Step B1, judge whether it is a high-rate frame, a low-rate frame, or a silent frame according to the first two bits of a received voice frame; 步骤B2,根据不同的帧,转到相应的步骤进行处理:Step B2, according to different frames, go to the corresponding steps for processing: 如果是高速率帧,则选用高速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤B3;If it is a high-rate frame, select the byte sequence number table corresponding to the high rate and the bit position table corresponding to the required security level, and go to step B3; 如果是低速率帧,则选用以上低速率相应的需要加密的字节序号表和所需安全等级所对应的比特位置表,转到步骤B3;If it is a low-rate frame, select the byte sequence number table corresponding to the above low rate and the bit position table corresponding to the required security level, and go to step B3; 如果是静音帧,则不需要加密,转回到步骤B1,转而处理下一帧;If it is a silent frame, no encryption is required, and it returns to step B1 to process the next frame; 步骤B3,在按照帧速率和安全等级确定选用的加密字节序号表和比特位置表后,执行当前帧的加密操作;Step B3, after determining the selected encrypted byte sequence number table and bit position table according to the frame rate and security level, perform the encryption operation of the current frame; 步骤B4,完成当前帧的加密操作后,如果密钥流使用完,利用所述混沌流加密方法中的调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,则转回步骤B1,转而处理下一帧。Step B4, after completing the encryption operation of the current frame, if the key stream is used up, use the adjustment parameters in the chaotic stream encryption method to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; If there are speech frames, go back to step B1 and process the next frame. 5、根据权利要求2所述的语音编码选择性加密方法,其特征在于,所述步骤C包括下列步骤:5. The speech coding selective encryption method according to claim 2, wherein said step C comprises the following steps: 步骤C1,接收控制参数并解密得到加密安全等级,并解密得到混沌流加密方法的调节参数;Step C1, receiving and decrypting the control parameters to obtain the encryption security level, and decrypting to obtain the adjustment parameters of the chaotic flow encryption method; 步骤C2,取调节参数的有效二进制位,转换为字节型数据,将转换的数据存入字节型数组作为密钥流表,用以和语音数据流明文要加密的位进行异或运算,以获得明文;Step C2, take the effective binary digits of the adjustment parameters, convert them into byte data, store the converted data into the byte array as the key stream table, and perform XOR operation with the bits to be encrypted in the plain text of the voice data stream, to obtain plaintext; 步骤C3,执行当前帧的解密操作流程;Step C3, execute the decryption operation process of the current frame; 步骤C4,完成当前帧的解密操作后,如果密钥流使用完,利用调节参数对当前混沌序列值进行迭代,得到新的密钥流,更新密钥流表;如果还有语音帧,转而处理下一帧。Step C4, after completing the decryption operation of the current frame, if the key stream is used up, use the adjustment parameters to iterate the current chaotic sequence value to obtain a new key stream, and update the key stream table; if there are still speech frames, turn to Process the next frame. 6、根据权利要求1或2所述的语音编码选择性加密方法,其特征在于,所述混沌流加密方法为Logistics映射的一维非线性迭代方法表征的混沌流加密方法。6. The speech coding selective encryption method according to claim 1 or 2, characterized in that the chaotic flow encryption method is a chaotic flow encryption method represented by a one-dimensional nonlinear iterative method of Logistics mapping. 7、根据权利要求6所述的语音编码选择性加密方法,其特征在于,所述Logistics映射的一维非线性迭代方法为改进的Logistics地图一维非线性迭代方法,所述迭代方法如下式所示:7. The speech coding selective encryption method according to claim 6, wherein the one-dimensional nonlinear iterative method of the Logistics map is an improved one-dimensional nonlinear iterative method of the Logistics map, and the iterative method is as follows Show: G(x)=(β+1)(1+1/β)βx(1-x)β G(x)=(β+1)(1+1/β) β x(1-x) β 其中,β∈(1,4),x0∈(0,1),x的初始值为x0,通过此式迭代可以得到x1,x2,x3,…xn…。Among them, β∈(1,4), x 0 ∈(0,1), the initial value of x is x 0 , and x 1 , x 2 , x 3 ,…x n … can be obtained through iteration of this formula. 8、根据权利要求1或2所述的语音编码选择性加密方法,其特征在于,所述步骤B中,按帧速率和加密所需的安全等级确定选用的加密字节序号表和比特位置表,为:8. The speech coding selective encryption method according to claim 1 or 2, characterized in that, in said step B, the selected encrypted byte sequence number table and bit position table are determined according to the frame rate and the security level required for encryption ,for: 确定语音帧中参数的比特位的敏感性排列顺序,以此将比特位分为不同类别,加密不同类别的比特位获得不同安全等级。Determine the sensitivity arrangement order of the bit bits of the parameters in the speech frame, so as to divide the bits into different categories, and encrypt the bits of different categories to obtain different security levels. 9、根据权利要求8所述的语音编码选择性加密方法,其特征在于,所述语音编码为G.723.1标准语音帧的语音编码。9. The speech coding selective encryption method according to claim 8, characterized in that the speech coding is speech coding of G.723.1 standard speech frames. 10、根据权利要求9所述的语音编码选择性加密方法,其特征在于,所述语音帧中参数的比特位的敏感性排列顺序为五个类,分别为CLASS1,CLASS2,CLASS3,CLASS4,CLASS5,其重要性依次降低。10. The speech coding selective encryption method according to claim 9, characterized in that, the order of sensitive arrangement of bits of parameters in the speech frame is five categories, namely CLASS1, CLASS2, CLASS3, CLASS4, and CLASS5 , and its importance decreases in turn. 11、根据权利要求10所述的语音编码选择性加密方法,其特征在于,11. The speech coding selective encryption method according to claim 10, characterized in that: 当安全等级为Level 1时,加密CLASS1中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的48bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的38bit位加密;When the security level is Level 1, the bits in CLASS1 are encrypted, and the 48bit bits in the voice frame are encrypted in the high rate mode of the G.723.1 standard voice frame; the voice is encrypted in the low rate mode of the G.723.1 standard voice frame 38bit bit encryption in the frame; 当安全等级为Level 2时,加密CLASS1和CLASS2中的比特位,在G.723.1标准语音帧的高速率模式对语音帧中的62bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的52bit位加密;When the security level is Level 2, the bits in CLASS1 and CLASS2 are encrypted, and the 62bit bits in the voice frame are encrypted in the high rate mode of the G.723.1 standard voice frame; 52bit encryption in voice frames; 当安全等级为Level 3时,加密CLASS1、CLASS2和CLASS3中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的74bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的64bit位加密;When the security level is Level 3, encrypt the bits in CLASS1, CLASS2 and CLASS3, and encrypt 74 bits in the voice frame in the high rate mode of the G.723.1 standard voice frame; in the low rate mode of the G.723.1 standard voice frame In this mode, the 64bit bits in the voice frame are encrypted; 当安全等级为Level 4时,加密CLASS1、CLASS2、CLASS3和CLASS4中的比特位,在G.723.1标准语音帧的高速率模式下对语音帧中的86bit位加密;在G.723.1标准语音帧的低速率模式下对语音帧中的76bit位加密。When the security level is Level 4, the bits in CLASS1, CLASS2, CLASS3 and CLASS4 are encrypted, and the 86bit bits in the voice frame are encrypted in the high-speed mode of the G.723.1 standard voice frame; in the G.723.1 standard voice frame Encrypt 76 bits in voice frames in low rate mode.
CN2007100522406A 2007-05-24 2007-05-24 A Speech Coding Selective Encryption Method Expired - Fee Related CN101059957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007100522406A CN101059957B (en) 2007-05-24 2007-05-24 A Speech Coding Selective Encryption Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100522406A CN101059957B (en) 2007-05-24 2007-05-24 A Speech Coding Selective Encryption Method

Publications (2)

Publication Number Publication Date
CN101059957A true CN101059957A (en) 2007-10-24
CN101059957B CN101059957B (en) 2011-06-22

Family

ID=38866031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007100522406A Expired - Fee Related CN101059957B (en) 2007-05-24 2007-05-24 A Speech Coding Selective Encryption Method

Country Status (1)

Country Link
CN (1) CN101059957B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009100679A1 (en) * 2008-02-13 2009-08-20 Haiyun Liu An encryption/decryption method
CN101764666A (en) * 2009-12-24 2010-06-30 中国电信股份有限公司 Speech encryption method and device and decryption method and device
CN102176778A (en) * 2010-12-22 2011-09-07 苏州博联科技有限公司 Control method of wireless microphone system
CN102523441A (en) * 2011-12-22 2012-06-27 北京工业大学 H.264 compressed domain bit plane encryption method based on bit sensitivity
WO2013185303A1 (en) * 2012-06-13 2013-12-19 Qualcomm Incorporated Encryption bitmap for a device-to-device expression
CN103944577A (en) * 2013-01-22 2014-07-23 中国科学院大学 Design method for united channel safe coding and decoding device based on Knuth code
CN104091597A (en) * 2014-06-26 2014-10-08 华侨大学 IP voice steganography method based on speed modulation
CN104517068A (en) * 2014-12-31 2015-04-15 华为技术有限公司 Audio file processing method and equipment
CN104994500A (en) * 2015-05-22 2015-10-21 南京科烁志诺信息科技有限公司 Voice secrecy transmission method and device used for mobile phone
CN106998471A (en) * 2017-03-16 2017-08-01 中国人民武装警察部队工程大学 A kind of video hidden method and video extraction method for changing predictive mode
CN108156136A (en) * 2017-12-08 2018-06-12 陕西师范大学 A kind of indirect transmission and the close figure carrier-free examination question camouflage method of random code book
CN108833924A (en) * 2018-06-22 2018-11-16 东北大学 A Multi-level Security Video Encryption Algorithm Based on H.265
CN113645613A (en) * 2021-07-08 2021-11-12 中国人民解放军战略支援部队信息工程大学 Device and method for real-time voice encryption in cellular mobile network
CN114142970A (en) * 2021-11-25 2022-03-04 无锡彼星半导体有限公司 Fault-tolerant transmission method for high-speed transmission of two-dimensional array data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6598161B1 (en) * 1999-08-09 2003-07-22 International Business Machines Corporation Methods, systems and computer program products for multi-level encryption
CN1330353A (en) * 2000-06-20 2002-01-09 北京华诺信息技术有限公司 Information encryption method and system
CN100431295C (en) * 2002-11-26 2008-11-05 松下电器产业株式会社 Data encryption and decryption method and device

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009100679A1 (en) * 2008-02-13 2009-08-20 Haiyun Liu An encryption/decryption method
CN101764666A (en) * 2009-12-24 2010-06-30 中国电信股份有限公司 Speech encryption method and device and decryption method and device
CN101764666B (en) * 2009-12-24 2013-06-26 中国电信股份有限公司 Speech encryption method and device and decryption method and device
CN102176778A (en) * 2010-12-22 2011-09-07 苏州博联科技有限公司 Control method of wireless microphone system
CN102523441A (en) * 2011-12-22 2012-06-27 北京工业大学 H.264 compressed domain bit plane encryption method based on bit sensitivity
CN102523441B (en) * 2011-12-22 2014-04-02 北京工业大学 H.264 compressed domain bit plane encryption method based on bit sensitivity
WO2013185303A1 (en) * 2012-06-13 2013-12-19 Qualcomm Incorporated Encryption bitmap for a device-to-device expression
CN103944577A (en) * 2013-01-22 2014-07-23 中国科学院大学 Design method for united channel safe coding and decoding device based on Knuth code
CN104091597B (en) * 2014-06-26 2017-03-01 华侨大学 A kind of ip voice steganography method based on rate modulation
CN104091597A (en) * 2014-06-26 2014-10-08 华侨大学 IP voice steganography method based on speed modulation
CN104517068A (en) * 2014-12-31 2015-04-15 华为技术有限公司 Audio file processing method and equipment
CN104994500A (en) * 2015-05-22 2015-10-21 南京科烁志诺信息科技有限公司 Voice secrecy transmission method and device used for mobile phone
CN104994500B (en) * 2015-05-22 2018-07-06 南京科烁志诺信息科技有限公司 A kind of speech security transmission method and device for mobile phone
CN106998471A (en) * 2017-03-16 2017-08-01 中国人民武装警察部队工程大学 A kind of video hidden method and video extraction method for changing predictive mode
CN106998471B (en) * 2017-03-16 2020-03-17 中国人民武装警察部队工程大学 Video hiding method and video extracting method for modifying prediction mode
CN108156136A (en) * 2017-12-08 2018-06-12 陕西师范大学 A kind of indirect transmission and the close figure carrier-free examination question camouflage method of random code book
CN108156136B (en) * 2017-12-08 2020-08-04 陕西师范大学 A method of camouflaging test questions without direct transmission and random codebook
CN108833924A (en) * 2018-06-22 2018-11-16 东北大学 A Multi-level Security Video Encryption Algorithm Based on H.265
CN113645613A (en) * 2021-07-08 2021-11-12 中国人民解放军战略支援部队信息工程大学 Device and method for real-time voice encryption in cellular mobile network
CN113645613B (en) * 2021-07-08 2023-07-04 中国人民解放军战略支援部队信息工程大学 Cellular mobile network real-time voice encryption equipment and method
CN114142970A (en) * 2021-11-25 2022-03-04 无锡彼星半导体有限公司 Fault-tolerant transmission method for high-speed transmission of two-dimensional array data
CN114142970B (en) * 2021-11-25 2024-04-19 无锡彼星半导体有限公司 Fault-tolerant transmission method for two-dimensional array data high-speed transmission

Also Published As

Publication number Publication date
CN101059957B (en) 2011-06-22

Similar Documents

Publication Publication Date Title
CN101059957A (en) An audio coding selective cryptographic method
CN1200403C (en) Vector quantizing device for LPC parameters
CN1201288C (en) Decoding method and equipment and program facility medium
CN1165892C (en) Periodicity enhancement in decoding wideband signals
CN100338648C (en) Method and device for efficient frame erasure concealment in linear predictive based speech codecs
CN1205603C (en) Indexing pulse positions and signs in algebraic codebooks for coding of wideband signals
CN1160703C (en) Speech coding method and device, and sound signal coding method and device
CN1156303A (en) Voice coding method and device and voice decoding method and device
CN1245706C (en) Multimode speech encoder
CN1703736A (en) Methods and devices for source controlled variable bit-rate wideband speech coding
CN1185620C (en) Sound synthetizer and method, telephone device and program service medium
CN1097396C (en) Vector quantization apparatus
CN1248195C (en) Voice coding converting method and device
CN101048649A (en) Scalable decoding apparatus and scalable encoding apparatus
CN1503221A (en) Audio encoding device and audio encoding method
CN1222997A (en) Audio signal coding and decoding method and audio signal coder and decoder
CN1156872A (en) Speech encoding method and apparatus
CN1375818A (en) Audio-frequency coding apapratus, method, decoding apparatus and audio-frequency decoding method
CN1140362A (en) Encoder
CN1218334A (en) Scalable stereo audio encoding/decoding method and device
CN1188957A (en) Vector quantization method and speech encoding method and apparatus
CN1155725A (en) Speech encoding method and apparatus
CN1898723A (en) Signal decoding apparatus and signal decoding method
CN1457425A (en) Codebook structure and search for speech coding
CN101076853A (en) Wide-band encoding device, wide-band lsp prediction device, band scalable encoding device, wide-band encoding method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110622

Termination date: 20120524