WO2010025684A1 - Method for packet loss compensation, apparatus and system thereof - Google Patents

Method for packet loss compensation, apparatus and system thereof Download PDF

Info

Publication number
WO2010025684A1
WO2010025684A1 PCT/CN2009/073764 CN2009073764W WO2010025684A1 WO 2010025684 A1 WO2010025684 A1 WO 2010025684A1 CN 2009073764 W CN2009073764 W CN 2009073764W WO 2010025684 A1 WO2010025684 A1 WO 2010025684A1
Authority
WO
WIPO (PCT)
Prior art keywords
data frame
frame
packet loss
loss compensation
buffer
Prior art date
Application number
PCT/CN2009/073764
Other languages
French (fr)
Chinese (zh)
Inventor
朝鲁檬
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010025684A1 publication Critical patent/WO2010025684A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0009Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding

Definitions

  • the present invention relates to the field of data communications, and in particular, to a method for packet loss compensation and a device and system for implementing packet loss compensation.
  • G.711 speech codec algorithm is a pulse code modulation (Pulse Code)
  • PCM Voice over Internet Protocol
  • both history and pitchbuf are static data spaces, and in the scheme of multi-channel co-coding and decoding, the two buffers can only serve the channel. Cannot be shared by other channels or calculations. Therefore, when the number of channels is large, static data space will be allocated for each channel, so that multiple channels will occupy a lot of static space.
  • An embodiment of the present invention provides a packet loss compensation method, where the method is used for data frame transmission, including acquiring a frame loss situation of a data frame;
  • An embodiment of the present invention provides an apparatus for implementing packet loss compensation, where the apparatus is configured to perform packet loss compensation according to a packet loss condition in a data frame transmission, where the apparatus includes:
  • An obtaining module configured to acquire a frame loss condition of a data frame
  • a processing module configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after encoding is used, after the coding The stored data frame is decoded;
  • the code storage module is configured to compress and encode the data frame that has undergone the packet loss compensation process.
  • An embodiment of the present invention provides a system for implementing packet loss compensation, where the system is configured to perform packet loss compensation according to a packet loss situation in a data frame transmission, where the system includes:
  • An obtaining module configured to acquire a frame loss condition of a data frame
  • a codec module configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, and compress and encode the data frame after the packet loss compensation process, where, in the packet loss compensation algorithm, The data frame stored after the encoding needs to be decoded, and the data frame stored after the encoding is decoded.
  • FIG. 1 is a schematic flow chart of a specific embodiment of a packet loss compensation method according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of another specific embodiment of a packet loss compensation method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a specific embodiment of implementing a packet loss compensation apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a specific embodiment of the processing module of FIG. 3;
  • FIG. 5 is a flow chart of a specific embodiment of the coded storage module of FIG.
  • the embodiment of the present invention provides a packet loss compensation method, which is used for data frame transmission. As shown in FIG. 1, the method includes:
  • [33] 102 Perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm. Wherein, in the packet loss compensation algorithm, the data frame stored after encoding is used, and the data frame is performed. Decoding
  • the stored data frame referred to in the above 103 may refer to the data stored in the buffer history and the pitchbuf defined in G.711.
  • the static storage space required for decoding in G.711 is 817*16bit, and the space of 390*2*16bit is the first buffer (or called history) and the second buffer (or called pitchbuf), and the rest.
  • the compression coding referred to in 103 may specifically convert 16-bit data to 8-bit data in this example. If the original buffer is a 16-bit digital signal processor (Digital Signal
  • the encoded data can be combined storage,
  • the 8bit data is stored in a 16bit DSP. In this way, the storage history and the pitchbuf storage space can be reduced by half to save storage space.
  • FIG. 2 it is a flowchart of implementing a packet loss compensation method according to an embodiment of the present invention.
  • different processing is performed according to the situation of frame dropping.
  • six different black lines with arrows indicate six different processing flows.
  • H is referred to as the history buffer.
  • the process is processed according to the process 0.
  • the method includes: updating data stored in the history by using the newly received data frame, and performing delay of 3.75 ms on the data frame, and then decoding the output.
  • the method includes: decoding a currently received data frame;
  • Peer compressing and encoding the smoothed data frame, such as encoding a 16-bit data frame into an 8-bit data frame; [44] storing the encoded data frame in history.
  • the method includes: [46] updating the data frame in the pitchbuf according to the data in the history, that is, maintaining the consistency of the data frame stored in the first packet loss pitchbuf and hi story;
  • the data frame in the updated pitchbuf (or history) is decoded, and the decoded data frame can be stored in a copy buffer, such as defining a pitchbuf_tmp[390] copy buffer.
  • the data frame of 1/4 base period length is saved in the buffer lastq[30], and the data frame of the 1/4 base period length is smoothed;
  • the smoothed 1/4 base period length data frame is overlaid in the corresponding position in the buffer buffer, and the 10 ms compensation data frame is calculated by using the data in the covered Linyi buffer;
  • [51] Compress and encode the data frames in the buffer buffer and save them to history and pitchbuf.
  • the coded mode is stored in the corresponding storage area of the DSP.
  • the decoding result can be stored in the copy buffer, since the data in the history and the pitchbuf are completely the same, the data frame stored in the pitchbuf can also be decoded;
  • the current frame is the seventh or even higher frame loss frame, it is processed according to the process 5. That is, for consecutive packet loss more than 6 times, the current frame is all added to "0", but it is still necessary to delay the all "0" data frame after 3.7 5ms, and use the output data frame to compress and encode and update history and Pitchbuf, since the data frame is all "0", the output data frame may not be smoothed.
  • all data frames stored in the history and the pitchbuf are not necessarily required, for example, only a part of the data frames stored in the history and the pitchbuf may be needed. Complete the packet loss compensation for this time, so it is also possible to only need the data frame for this part.
  • the codec processing is performed, and it is not necessary to perform codec processing on all data frames that need history and pitchbuf storage, which requires selective encoding and decoding processing on the stored data frame, for example, before storage, the partial data frame Whether you need coding.
  • This selective codec processing method adds a certain amount of algorithm complexity, but since there is no need to encode and decode all stored data frames, the execution efficiency is improved.
  • the embodiment of the present invention further provides a device for implementing packet loss compensation.
  • the device includes: an acquisition module 1 configured to acquire data. The frame loss of the frame; the processing module 2, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and the packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after coding is used. Decoding the data frame stored after the encoding; the encoding storage module 3 is configured to compress and encode the data frame subjected to the packet loss compensation processing and store the data frame.
  • the processing module 2 may include some or all of the following modules (as shown in FIG. 4, including all cases):
  • the first processing module 20 is configured to: when the frame loss situation is that the current data frame is not a frame loss, and the previous data frame of the current data frame is a frame loss frame, the current data frame is lost according to the first processing policy. a packet compensation process; the first encoding module, configured to compress and encode the current data frame subjected to the packet loss compensation processing, and store the data frame in the first buffer.
  • the first processing strategy includes: decoding the current data frame; decoding the data stored in the first buffer; and smoothing the data decoded by the current data frame according to the decoded data in the first buffer; The smoothed data is delayed.
  • the second processing module 22 is configured to: when the frame loss situation is that the current data frame is the first frame loss frame, perform packet loss compensation processing on the current data frame according to the second processing policy;
  • the second processing strategy includes: updating the second buffer according to the data of the first buffer; decoding the data frame of the first buffer, and obtaining a base period according to the decoded data frame; The data frame of the last 1/4 base period length of the data in the second buffer is smoothed; the data frame of the corresponding last 1/4 base period length in the second buffer is replaced with the smoothed data frame; According to the replacement The data calculates a data frame that needs to be compensated; delays the data frame that needs to be compensated.
  • the third processing module 24 is configured to: when the frame loss situation is the current data frame is the second or third frame loss frame
  • the third processing strategy includes: decoding a data frame of the first buffer or the second buffer; performing corresponding update on the decoded data frame; and calculating a compensation data frame according to the updated data frame; After the compensation data frame and the decoded data frame in the first buffer are superimposed, smoothing is performed, and delaying is performed.
  • the fourth processing module 26 is configured to: when the frame loss condition is the fourth, fifth, or sixth frame loss of the current data frame,
  • the fourth processing strategy includes: decoding the first buffer or the second buffered data frame; calculating a corresponding compensation result according to the decoded data frame, and performing smoothing on the entire data frame and then delaying.
  • the code storage module 3 includes one or more of the following modules (Fig. 5 includes all cases)
  • the second encoding module 30 is configured to compress and encode the current data frame that has undergone the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
  • the third encoding module 32 is configured to compress and encode the current data frame that has undergone the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
  • the fourth encoding module 34 is configured to compress and encode the current data frame subjected to the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
  • the foregoing processing module 2 and the code storage module 3 may be implemented by a separate codec module 4, and the codec module 4 and the acquisition module 1 may be physically separated devices, and may constitute a packet loss compensation.
  • the system as shown in Figure 6.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, ie may be located in one place, or may be distributed to multiple networks. On the unit. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art, without paying creative labor, That is, it can be understood and implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a packet loss compensation method, an apparatus and a system thereof. The method is used for data frame transmission, and comprises the following steps: frame loss conditions of the data frame are obtained; according to the frame loss conditions and the packet loss compensation algorithm, packet loss compensation processing is carried out on the data frame, and the data processed by packet loss compensation are compressed, encoded and then stored; wherein, in the packet loss compensation algorithm, when the stored encoded data are needed, the stored encoded data are decoded. By adopting the scheme provided by the embodiment of the invention, as an encoding and decoding procedure is added when the data are stored in a static state space, the quantity of the stored data is reduced, and the requirement of the method for the static state space is lowered.

Description

说明书 一种丢包补偿的方法和实现丢包补偿的装置及***  Method for loss of packet compensation and device and system for implementing packet loss compensation
[1] 本申请要求于 2008年 9月 4日提交中国专利局、 申请号为 200810198318.X、 发明 名称为 "一种丢包补偿的方法和实现丢包补偿的装置及***"的中国专利申请的优 先权, 其全部内容通过引用结合在本申请中。  [1] This application claims to be submitted to the Chinese Patent Office on September 4, 2008, the application number is 200810198318.X, the invention name is "a method of packet loss compensation and a device and system for implementing packet loss compensation". Priority is hereby incorporated by reference in its entirety.
[2] 技术领域 [2] Technical field
[3] 本发明涉及数据通讯领域, 尤其涉及一种丢包补偿的方法和实现丢包补偿的装 置及***。  [3] The present invention relates to the field of data communications, and in particular, to a method for packet loss compensation and a device and system for implementing packet loss compensation.
[4] 发明背景 [4] Background of the invention
[5] G.711语音编解码算法是一种釆用脉冲编码调制 (Pulse Code  [5] G.711 speech codec algorithm is a pulse code modulation (Pulse Code)
Modulation, PCM) 技术对 8K釆样率语音的压缩编码技术, 是当前公共电话网 络上使用最为广泛的语音编解码算法。 在因特网协议承载语音 (Voice over Internet  Modulation, PCM) technology is a compression coding technology for 8K sample rate speech, which is the most widely used speech codec algorithm in public telephone networks. Voice over Internet Protocol (Voice over Internet
Protocol, VoIP) 处理过程中, 常常以 10ms的语音数据作为 G.711编解码所处理 的最小吋间间隔, 因为在网络当中存在着诸多情况引起的丢包, 所以 G.711附录 I 为使用者提供一种行之有效的丢包补偿算法。  Protocol, VoIP) In the process of processing, 10ms of voice data is often used as the minimum inter-frame interval processed by G.711 codec. Because there are many cases of packet loss in the network, G.711 Appendix I is the user. Provide an effective packet loss compensation algorithm.
[6] 当前 G.711附录 I所描述的丢包补偿算法, 是基于 10ms作为一个数据帧长度的。  [6] The current packet loss compensation algorithm described in Appendix I of G.711 is based on 10ms as a data frame length.
在整个设计当中设置两个较大的数据缓冲区 history [390] * 16bit和 pitchbuf [390] * 16 bito 其中缓冲区 history[390]中保存了已经播放的 48.75ms的数据, 用来对接下来 可能发生的丢失的 1~6包进行补偿, 同吋缓冲区 history[390]中缓存有 3.75ms的数 据结果, 以进行更好的语音平滑。 缓冲区 pitchbuf[390]只是在丢包中才进行运算 , 在不丢包吋不做任何改动, 同吋丢包吋的输出数据也不对其进行更新。  Set two large data buffers in the whole design history [390] * 16bit and pitchbuf [390] * 16 bito where the buffer history[390] holds the already played 48.75ms of data, which is used for the next possible The lost 1~6 packets are compensated, and the same buffer data history[390] has a 3.75ms data result for better speech smoothing. The buffer pitchbuf[390] only performs operations in the packet loss. If no packet is lost, no changes are made, and the output data of the packet loss is not updated.
[7] 在实现本发明过程中, 发明人发现, 在上述方案中, history和 pitchbuf都是静态 数据空间, 在多通道同吋编解码的方案当中, 这两个缓冲区只能为本通道服务 , 不能够被其他的通道或者计算所公用。 因此, 当通道数目较多吋, 将为每个 通道都分配静态数据空间, 这样多个通道将占用很多的静态空间。  [7] In the process of implementing the present invention, the inventor has found that in the above scheme, both history and pitchbuf are static data spaces, and in the scheme of multi-channel co-coding and decoding, the two buffers can only serve the channel. Cannot be shared by other channels or calculations. Therefore, when the number of channels is large, static data space will be allocated for each channel, so that multiple channels will occupy a lot of static space.
[8] 发明内容 本发明所要解决的技术问题在于, 提供一种用于丢包补偿的方法和实现丢包补 偿的装置及***。 可节省丢包补偿中需要的数据存储空间。 [8] Summary of the invention The technical problem to be solved by the present invention is to provide a method for packet loss compensation and a device and system for implementing packet loss compensation. It can save the data storage space needed for packet loss compensation.
本发明的实施例提供了一种丢包补偿方法, 所述方法用于数据帧的传输, 包括 获取数据帧的丢帧情况;  An embodiment of the present invention provides a packet loss compensation method, where the method is used for data frame transmission, including acquiring a frame loss situation of a data frame;
根据所述丢帧情况和丢包补偿算法对所述数据帧进行丢包补偿处理, 并将经过 所述丢包补偿处理的数据帧进行压缩编码后存储;  Performing packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, and compressing and encoding the data frame that has undergone the packet loss compensation process;
其中, 在所述丢包补偿算法中, 当需要使用编码后存储的数据帧吋, 对所述编 码后存储的数据帧进行解码。  In the packet loss compensation algorithm, when the data frame stored after encoding is used, the data frame stored after the encoding is decoded.
本发明的实施例提供了一种实现丢包补偿的装置, 所述装置用于根据数据帧传 输中的丢包情况进行丢包补偿, 所述装置包括:  An embodiment of the present invention provides an apparatus for implementing packet loss compensation, where the apparatus is configured to perform packet loss compensation according to a packet loss condition in a data frame transmission, where the apparatus includes:
获取模块, 用于获取数据帧的丢帧情况;  An obtaining module, configured to acquire a frame loss condition of a data frame;
处理模块, 用于根据所述丢帧情况果和丢包补偿算法对数据帧进行丢包补偿处 理, 其中, 在丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对所述编码 后存储的数据帧进行解码;  a processing module, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after encoding is used, after the coding The stored data frame is decoded;
编码存储模块, 用于将经过所述丢包补偿处理的数据帧进行压缩编码后存储。 本发明的实施例提供了一种实现丢包补偿的***, 所述***用于根据数据帧传 输中的丢包情况进行丢包补偿, 所述***包括:  The code storage module is configured to compress and encode the data frame that has undergone the packet loss compensation process. An embodiment of the present invention provides a system for implementing packet loss compensation, where the system is configured to perform packet loss compensation according to a packet loss situation in a data frame transmission, where the system includes:
获取模块, 用于获取数据帧的丢帧情况;  An obtaining module, configured to acquire a frame loss condition of a data frame;
编解码模块, 用于根据所述丢帧情况和丢包补偿算法对数据帧进行丢包补偿处 理, 并将经过丢包补偿处理的数据帧进行压缩编码后存储, 其中, 在丢包补偿 算法中, 需要使用编码后存储的数据帧吋, 对所述编码后存储的数据帧进行解 码。  a codec module, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, and compress and encode the data frame after the packet loss compensation process, where, in the packet loss compensation algorithm, The data frame stored after the encoding needs to be decoded, and the data frame stored after the encoding is decoded.
釆用本发明实施例提供的方案, 由于在数据存储在静态空间吋, 增加了一个编 解码过程, 使得存储的数据量降低了, 节省了丢包补偿对静态空间的需求。 附图简要说明  With the solution provided by the embodiment of the present invention, since the data is stored in the static space, a coding and decoding process is added, so that the amount of stored data is reduced, and the requirement for the static space of the packet loss compensation is saved. BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或 现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创 造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and other drawings may be obtained from those skilled in the art without departing from the drawings.
[24] 图 1是本发明实施例中丢包补偿方法的一个具体实施例的流程示意图; 1 is a schematic flow chart of a specific embodiment of a packet loss compensation method according to an embodiment of the present invention;
[25] 图 2是本发明实施例中丢包补偿方法的另一个具体实施例的流程示意图; 2 is a schematic flow chart of another specific embodiment of a packet loss compensation method according to an embodiment of the present invention;
[26] 图 3是本发明实施例中实现丢包补偿装置的一个具体实施例的流程示意图 FIG. 3 is a schematic flowchart diagram of a specific embodiment of implementing a packet loss compensation apparatus according to an embodiment of the present invention.
[27] 图 4是图 3中处理模块的一个具体实施例的流程示意图; 4 is a schematic flow chart of a specific embodiment of the processing module of FIG. 3;
[28] 图 5是图 3中编码存储模块的一个具体实施例的流程示意图。 [28] FIG. 5 is a flow chart of a specific embodiment of the coded storage module of FIG.
[29] 实施本发明的方式 [29] Mode for carrying out the invention
[30] 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
[31] 为了降低丢包补偿算法中相应缓冲区占用的静态存储空间, 本发明实施例提供 了一种丢包补偿方法, 用于数据帧的传输, 如图 1所示, 该方法包括:  [31] In order to reduce the static storage space occupied by the corresponding buffer in the packet loss compensation algorithm, the embodiment of the present invention provides a packet loss compensation method, which is used for data frame transmission. As shown in FIG. 1, the method includes:
[32] 101、 获取数据帧的丢帧情况。  [32] 101. Obtain the frame loss of the data frame.
[33] 102、 根据所述丢帧情况和丢包补偿算法对数据帧进行丢包补偿处理; 其中, 在丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对所述数据帧进行解码  [33] 102. Perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm. Wherein, in the packet loss compensation algorithm, the data frame stored after encoding is used, and the data frame is performed. Decoding
[34] 103、 将经过丢包补偿处理的所述数据帧进行压缩编码后存储。 [34] 103. The data frame subjected to the packet loss compensation processing is compression-encoded and stored.
[35] 下面基于 G.711附录 I对本发明实施例中所描述的丢包补偿方法进行进一步描述  [35] The packet loss compensation method described in the embodiment of the present invention is further described below based on G.711 Appendix I.
[36] 在本实施例中, 上述 103中所指的存储的数据帧, 可以是指 G.711中定义的缓冲 区 history和 pitchbuf中存储的数据。 在 G.711中解码所需要的静态存储空间为 817* 16bit, 其中有 390*2*16bit的空间为第一缓冲区 (或称为 history) 和第二缓冲区 ( 或称为 pitchbuf) , 其余为其他变量的存储区。 103中所指的压缩编码在此例中具 体可为将 16bit数据编码转换为 8bit数据。 若原来的缓冲区是用 16bit的数字信号处 理器 (Digital Signal [36] In this embodiment, the stored data frame referred to in the above 103 may refer to the data stored in the buffer history and the pitchbuf defined in G.711. The static storage space required for decoding in G.711 is 817*16bit, and the space of 390*2*16bit is the first buffer (or called history) and the second buffer (or called pitchbuf), and the rest. A storage area for other variables. The compression coding referred to in 103 may specifically convert 16-bit data to 8-bit data in this example. If the original buffer is a 16-bit digital signal processor (Digital Signal
Processor, DSP) 实现的, 那么经过编码后的数据可以通过组合存储的方式, 将 8bit数据存储在 16bit的 DSP中。 这样就可以将缓冲区 history和 pitchbuf存储空间各 减去一半, 达到节省存储空间的目的。 Processor, DSP), then the encoded data can be combined storage, The 8bit data is stored in a 16bit DSP. In this way, the storage history and the pitchbuf storage space can be reduced by half to save storage space.
[37] 如图 2所示, 为本发明实施例中丢包补偿方法的实现流程图。 在该流程中, 根 据丢帧的情况不同, 进行不同的处理, 图中以 6条带箭头的黑色曲线说明 6种不 同的处理流程。 且以 H简称 history缓冲区。 [37] As shown in FIG. 2, it is a flowchart of implementing a packet loss compensation method according to an embodiment of the present invention. In this process, different processing is performed according to the situation of frame dropping. In the figure, six different black lines with arrows indicate six different processing flows. And H is referred to as the history buffer.
[38] 0、 当判断当前帧和当前帧的前一帧都不是丢帧吋, 按流程 0处理。 具体包括: 使用新接收的数据帧更新 history中存储的数据, 并对该数据帧进行 3.75ms的延吋 后再解码输出。 [38] 0. When it is judged that the current frame and the previous frame of the current frame are not lost frames, the process is processed according to the process 0. Specifically, the method includes: updating data stored in the history by using the newly received data frame, and performing delay of 3.75 ms on the data frame, and then decoding the output.
[39] 1、 当判断当前帧不是丢帧, 但是上一帧是丢帧吋, 按流程 1处理。 具体包括: 对当前接收的数据帧进行解码;  [39] 1. When it is judged that the current frame is not a frame loss, but the previous frame is a frame loss frame, it is processed according to the process 1. Specifically, the method includes: decoding a currently received data frame;
[40] 对存储在 history中的数据帧进行解码; [40] Decoding the data frame stored in the history;
[41] 根据 history中存储的数据解码后的结果, 对当前数据帧解码后的数据帧进行平 滑, 以得到更好的语音质量;  [41] According to the decoded result of the data stored in the history, the data frame decoded by the current data frame is smoothed to obtain better voice quality;
[42] 然后对平滑后的数据帧进行 3.75ms的延吋, 以便进行输出; [42] Then a 3.75 ms delay is applied to the smoothed data frame for output;
[43] 同吋, 对平滑后的数据帧进行压缩编码, 如将 16bit数据帧编码为 8bit数据帧; [44] 将编码后的数据帧存储在 history中。 [43] Peer, compressing and encoding the smoothed data frame, such as encoding a 16-bit data frame into an 8-bit data frame; [44] storing the encoded data frame in history.
[45] 2、 当判断当前帧是丢帧, 而且是第一次丢帧吋, 按流程 2处理。 具体包括: [46] 根据 history中的数据更新 pitchbuf中的数据帧, 即保持第一次丢包吋 pitchbuf和 hi story中存储的数据帧的一致性;  [45] 2. When it is judged that the current frame is a frame loss, and the frame is lost for the first time, it is processed according to the process 2. Specifically, the method includes: [46] updating the data frame in the pitchbuf according to the data in the history, that is, maintaining the consistency of the data frame stored in the first packet loss pitchbuf and hi story;
[47] 接下来对更新后的 pitchbuf (或 history) 中的数据帧进行解码, 解码后的数据帧 可存储在一个临吋缓冲区中, 如定义一个 pitchbuf_tmp[390]临吋缓冲区。 [47] Next, the data frame in the updated pitchbuf (or history) is decoded, and the decoded data frame can be stored in a copy buffer, such as defining a pitchbuf_tmp[390] copy buffer.
[48] 再利用临吋缓冲区中存储的数据帧, 计算得到基周期, 并将临吋缓冲区中最后[48] Reusing the data frame stored in the buffer buffer to calculate the base period, and the last buffer in the buffer
1/4基周期长度的数据帧保存到缓冲区 lastq[30]当中, 并对这 1/4基周期长度的数 据帧进行平滑; The data frame of 1/4 base period length is saved in the buffer lastq[30], and the data frame of the 1/4 base period length is smoothed;
[49] 将平滑后的 1/4基周期长度的数据帧覆盖临吋缓冲区中相应的位置, 并利用覆 盖后的临吋缓冲区中的数据计算出 10ms补偿数据帧;  [49] The smoothed 1/4 base period length data frame is overlaid in the corresponding position in the buffer buffer, and the 10 ms compensation data frame is calculated by using the data in the covered Linyi buffer;
[50] 对上步中获得的补偿的 10ms数据帧进行 3.75ms延吋后输出; [50] The delayed 10ms data frame obtained in the previous step is output after 3.75ms delay;
[51] 对临吋缓冲区中的数据帧进行压缩编码后保存到 history和 pitchbuf中, 如以组合 编码的方式存放到 DSP的对应存储区域内。 [51] Compress and encode the data frames in the buffer buffer and save them to history and pitchbuf. The coded mode is stored in the corresponding storage area of the DSP.
[52] 3、 当判断当前帧是第二次或第三次丢帧吋, 按流程 3处理。 具体包括: [52] 3. When it is judged that the current frame is the second or third frame loss frame, it is processed according to the process 3. Specifically include:
[53] 对 history中存储的数据进行解码, 由于此吋 history和 pitchbuf中的数据帧完全相 同, 因此也可是对 pitchbuf中存储的数据帧进行解码; [53] Decoding the data stored in the history, since the data frames in the history and the pitchbuf are completely the same, the data frames stored in the pitchbuf can also be decoded;
[54] 将解码后的数据存储到临吋缓冲区中, 然后进行相应更新, 其更新过程跟流程[54] The decoded data is stored in the buffer buffer, and then updated accordingly, the update process and the process
2中的方式稍有不同, 具体可参照 G.711中的相关规定; 一个更新的具体例子为The method in 2 is slightly different. For details, refer to the relevant provisions in G.711. A specific example of an update is
: 将临吋缓冲区中最后一个基周期的 1/4基周期长度数据帧与 lastq[30]中存储的数 据帧进行叠加运算, 对叠加运算结果进行数据平滑处理, 然后, 将平滑后的 1/4 基周期长度的数据帧覆盖临吋缓冲区中相应的位置。 : superimposing the 1/4 base period length data frame of the last base period in the Linyi buffer with the data frame stored in lastq[30], performing data smoothing on the superposition operation result, and then smoothing the data 1 The /4 base period length data frame covers the corresponding location in the buffer.
[55] 利用更新后的临吋缓冲区中的数据计算出新的 10ms补偿数据帧, 并将该补偿数 据帧和 history中解码出的数据帧进行叠加后, 做平滑处理; [55] Calculate a new 10ms compensation data frame by using the data in the updated Linyi buffer, and superimpose the compensation data frame and the decoded data frame in the history, and then perform smoothing processing;
[56] 对上述做平滑处理后的数据帧进行 3.75ms延吋后输出; [56] The data frame after smoothing is subjected to 3.75 ms delay output.
[57] 将上述做平滑处理后的数据帧压缩编码后存储到 history和 pitchbuf中。 [57] The data frame smoothed as described above is compression-encoded and stored in history and pitchbuf.
[58] 4、 当判断当前帧是第四、 五或六次丢帧吋, 按流程 4处理。 具体包括: [58] 4. When it is judged that the current frame is the fourth, fifth or sixth frame loss frame, it is processed according to the process 4. Specifically include:
[59] 对 history中存储的数据帧进行解码, 该解码结果可存储到临吋缓冲区中, 由于 此吋 history和 pitchbuf中的数据完全相同, 因此也可是对 pitchbuf中存储的数据帧 进行解码; [59] Decoding the data frame stored in the history, the decoding result can be stored in the copy buffer, since the data in the history and the pitchbuf are completely the same, the data frame stored in the pitchbuf can also be decoded;
[60] 根据解码后的数据帧计算相应的补偿结果, 并根据该补偿结果对整体的数据帧 进行平滑处理;  [60] calculating a corresponding compensation result according to the decoded data frame, and smoothing the entire data frame according to the compensation result;
[61] 对经过平滑处理后的数据帧进行 3.75ms延吋后输出;  [61] After the smoothed data frame is delayed by 3.75ms, the output is output;
[62] 将上述做平滑处理后的数据帧压缩编码后存储到 history和 pitchbuf中。 [62] The data frame smoothed as described above is compression-encoded and stored in history and pitchbuf.
[63] 5、 当判断当前帧是第七次甚至更高次的丢帧吋, 按流程 5处理。 即对于连续丢 包超过 6次的, 将当前帧全部补充为 "0", 但是仍然需要将该全 "0"数据帧延吋 3.7 5ms后输出, 并使用该输出数据帧压缩编码后更新 history和 pitchbuf, 由于数据帧 为全" 0", 此吋对该输出数据帧可不进行平滑。 [63] 5. When it is judged that the current frame is the seventh or even higher frame loss frame, it is processed according to the process 5. That is, for consecutive packet loss more than 6 times, the current frame is all added to "0", but it is still necessary to delay the all "0" data frame after 3.7 5ms, and use the output data frame to compress and encode and update history and Pitchbuf, since the data frame is all "0", the output data frame may not be smoothed.
[64] 其中, 在上述的补偿方法中的某一具体流程分支中, history和 pitchbuf中存储的 所有数据帧并不是一定都需要的, 比如可能只需要 history和 pitchbuf中存储的一 部分数据帧就可以完成该次的丢包补偿, 因此也可以仅对该部分需要的数据帧 进行编解码处理, 而不必对所有需要 history和 pitchbuf存储的数据帧都进行编解 码处理, 这就需要对存储的数据帧选择性的进行编解码处理, 比如在存储前进 行判断, 该部分数据帧是否需要编码。 这种选择性的编解码处理方法会增加一 定的算法复杂度, 但是由于不需要对所有存储的数据帧都进行编解码处理, 因 此执行效率会有所改善。 [64] Wherein, in a specific process branch of the foregoing compensation method, all data frames stored in the history and the pitchbuf are not necessarily required, for example, only a part of the data frames stored in the history and the pitchbuf may be needed. Complete the packet loss compensation for this time, so it is also possible to only need the data frame for this part. The codec processing is performed, and it is not necessary to perform codec processing on all data frames that need history and pitchbuf storage, which requires selective encoding and decoding processing on the stored data frame, for example, before storage, the partial data frame Whether you need coding. This selective codec processing method adds a certain amount of algorithm complexity, but since there is no need to encode and decode all stored data frames, the execution efficiency is improved.
[65] 釆用上述的丢包补偿方法, 由于在数据存储在静态空间吋, 增加了一个编解码 过程, 使得存储的数据量降低了, 节省了该方法中对静态空间的需求。  [65] Using the above-mentioned packet loss compensation method, since the data is stored in the static space, a codec process is added, so that the amount of stored data is reduced, and the static space requirement in the method is saved.
[66] 另一方面, 与上述丢包补偿方法相应的, 本发明实施例还提供了一种实现丢包 补偿的装置, 如图 3所示, 该装置包括: 获取模块 1, 用于获取数据帧的丢帧情 况; 处理模块 2, 用于根据所述丢帧情况和丢包补偿算法对数据帧进行丢包补偿 处理, 其中, 在丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对所述编 码后存储的数据帧进行解码; 编码存储模块 3, 用于将经过丢包补偿处理的数据 帧进行压缩编码后存储。  [66] On the other hand, corresponding to the foregoing packet loss compensation method, the embodiment of the present invention further provides a device for implementing packet loss compensation. As shown in FIG. 3, the device includes: an acquisition module 1 configured to acquire data. The frame loss of the frame; the processing module 2, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and the packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after coding is used. Decoding the data frame stored after the encoding; the encoding storage module 3 is configured to compress and encode the data frame subjected to the packet loss compensation processing and store the data frame.
其中, 所述处理模块 2可包括下述模块中部分或全部 (如图 4所示, 为包括全部 的情况) :  The processing module 2 may include some or all of the following modules (as shown in FIG. 4, including all cases):
[68] 第一处理模块 20, 用于当所述丢帧情况为当前数据帧不是丢帧, 且当前数据帧 的前一数据帧是丢帧吋, 根据第一处理策略对当前数据帧进行丢包补偿处理; 第一编码模块, 用于将经过丢包补偿处理的当前数据帧进行压缩编码后存储在 第一缓冲区。  [68] The first processing module 20 is configured to: when the frame loss situation is that the current data frame is not a frame loss, and the previous data frame of the current data frame is a frame loss frame, the current data frame is lost according to the first processing policy. a packet compensation process; the first encoding module, configured to compress and encode the current data frame subjected to the packet loss compensation processing, and store the data frame in the first buffer.
[69] 第一处理策略包括: 对当前数据帧进行解码; 对存储在第一缓冲区的数据进行 解码; 根据第一缓冲区中解码后的数据对当前数据帧解码后的数据进行平滑; 对经过平滑后的数据进行延吋。  [69] The first processing strategy includes: decoding the current data frame; decoding the data stored in the first buffer; and smoothing the data decoded by the current data frame according to the decoded data in the first buffer; The smoothed data is delayed.
[70] 第二处理模块 22, 用于当所述丢帧情况为当前数据帧是第一次丢帧吋, 根据第 二处理策略对当前数据帧进行丢包补偿处理;  [70] The second processing module 22 is configured to: when the frame loss situation is that the current data frame is the first frame loss frame, perform packet loss compensation processing on the current data frame according to the second processing policy;
[71] 第二处理策略包括: 根据所述第一缓冲区的数据更新第二缓冲区; 对所述第一 缓冲区的数据帧进行解码, 并根据解码后的数据帧获得基周期; 将更新后的第 二缓冲区中的数据的最后 1/4基周期长度的数据帧进行平滑; 用平滑后的数据帧 替换所述第二缓冲区中相应的最后 1/4基周期长度的数据帧; 根据进行替换后的 数据计算出需要补偿的数据帧; 对所述需要补偿的数据帧进行延吋。 [71] The second processing strategy includes: updating the second buffer according to the data of the first buffer; decoding the data frame of the first buffer, and obtaining a base period according to the decoded data frame; The data frame of the last 1/4 base period length of the data in the second buffer is smoothed; the data frame of the corresponding last 1/4 base period length in the second buffer is replaced with the smoothed data frame; According to the replacement The data calculates a data frame that needs to be compensated; delays the data frame that needs to be compensated.
[72] 第三处理模块 24, 用于当所述丢帧情况为当前数据帧是第二次或第三次丢帧吋[72] The third processing module 24 is configured to: when the frame loss situation is the current data frame is the second or third frame loss frame
, 根据第三处理策略对当前数据帧进行丢包补偿处理; And performing packet loss compensation processing on the current data frame according to the third processing policy;
[73] 第三处理策略包括: 对所述第一缓冲区或第二缓冲区的数据帧进行解码; 对解 码后的数据帧进行相应的更新; 根据更新后的数据帧计算出补偿数据帧; 对所 述补偿数据帧和第一缓冲区中解码获得数据帧叠加后进行平滑, 并进行延吋。 [73] The third processing strategy includes: decoding a data frame of the first buffer or the second buffer; performing corresponding update on the decoded data frame; and calculating a compensation data frame according to the updated data frame; After the compensation data frame and the decoded data frame in the first buffer are superimposed, smoothing is performed, and delaying is performed.
[74] 第四处理模块 26, 用于当所述丢帧情况为当前数据帧是第四、 五或六次丢帧吋[74] The fourth processing module 26 is configured to: when the frame loss condition is the fourth, fifth, or sixth frame loss of the current data frame,
, 根据第四处理策略对当前数据帧进行丢包补偿处理; And performing packet loss compensation processing on the current data frame according to the fourth processing policy;
[75] 第四处理策略包括: 对所述第一缓冲区或第二缓冲的数据帧进行解码; 根据解 码后的数据帧计算出相应的补偿结果, 对整体数据帧进行平滑处理后延吋。 [75] The fourth processing strategy includes: decoding the first buffer or the second buffered data frame; calculating a corresponding compensation result according to the decoded data frame, and performing smoothing on the entire data frame and then delaying.
[76] 相应的, 编码存储模块 3包括如下模块中的一个或多个 (图 5为包括全部的情况  [76] Correspondingly, the code storage module 3 includes one or more of the following modules (Fig. 5 includes all cases)
[77] 第二编码模块 30, 用于将经过丢包补偿处理的当前数据帧进行压缩编码后存储 在第一缓冲区和第二缓冲区; [77] The second encoding module 30 is configured to compress and encode the current data frame that has undergone the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
[78] 第三编码模块 32, 用于将经过丢包补偿处理的当前数据帧进行压缩编码后存储 在第一缓冲区和第二缓冲区;  [78] The third encoding module 32 is configured to compress and encode the current data frame that has undergone the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
[79] 第四编码模块 34, 用于将经过丢包补偿处理的当前数据帧进行压缩编码后存储 在第一缓冲区和第二缓冲区。  [79] The fourth encoding module 34 is configured to compress and encode the current data frame subjected to the packet loss compensation processing, and store the data frame in the first buffer and the second buffer.
[80] 其中, 上述处理模块 2和编码存储模块 3可以由单独的编解码模块 4实现, 该编 解码模块 4和获取模块 1可以是物理上分离的装置, 并可组成一种实现丢包补偿 的***, 如图 6所示。 [80] The foregoing processing module 2 and the code storage module 3 may be implemented by a separate codec module 4, and the codec module 4 and the acquisition module 1 may be physically separated devices, and may constitute a packet loss compensation. The system, as shown in Figure 6.
[81] 釆用上述的丢包补偿装置和***, 由于在数据存储在静态空间吋, 增加了一个 编解码过程, 由于对静态空间中存储的数据帧进行了压缩编码, 使得数据帧的 存储空间减少了, 降低了该方法中对静态空间的需求。  [81] The above-mentioned packet loss compensation apparatus and system are used. Since data is stored in a static space, a codec process is added, and the data frame is compressed and encoded in the static space, so that the data frame is stored. Reduced, reducing the need for static space in the method.
[82] 以上所描述的装置实施例仅仅是示意性的, 其中所述作为分离部件说明的单元 可以是或者也可以不是物理上分开的, 即可以位于一个地方, 或者也可以分布 到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部模块来实现 本实施例方案的目的。 本领域普通技术人员在不付出创造性的劳动的情况下, 即可以理解并实施。 [82] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, ie may be located in one place, or may be distributed to multiple networks. On the unit. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art, without paying creative labor, That is, it can be understood and implemented.
[83] 通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到各实施方式 可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过硬件。 基于 这样的理解, 上述技术方案本质上或者说对现有技术做出贡献的部分可以以软 件产品的形式体现出来, 该计算机软件产品可以存储在计算机可读存储介质中 , 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令用以使得一台计算机设备 (可以 是个人计算机, 服务器, 或者网络设备等) 执行各个实施例或者实施例的某些 部分所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-described technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as ROM/RAM, magnetic Discs, optical discs, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.
[84] 以上所述的实施方式, 并不构成对该技术方案保护范围的限定。 任何在上述实 施方式的精神和原则之内所作的修改、 等同替换和改进等, 均应包含在该技术 方案的保护范围之内。  [84] The above-described embodiments do not constitute a limitation on the scope of protection of the technical solution. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the above-described embodiments are intended to be included within the scope of the technical solution.

Claims

权利要求书 Claim
[1] 一种丢包补偿方法, 所述方法用于数据帧的传输, 其特征在于, 所述方法 包括:  [1] A packet loss compensation method, the method is used for data frame transmission, and the method includes:
获取数据帧的丢帧情况;  Obtaining the frame loss of the data frame;
根据所述丢帧情况和丢包补偿算法对所述数据帧进行丢包补偿处理, 并将 经过所述丢包补偿处理的数据帧进行压缩编码后存储;  Performing packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, and compressing and encoding the data frame that has undergone the packet loss compensation process;
其中, 在所述丢包补偿算法中, 当需要使用编码后存储的数据帧吋, 对所 述编码后存储的数据帧进行解码。  In the packet loss compensation algorithm, when the encoded data frame 需要 needs to be used, the encoded data frame is decoded.
[2] 如权利要求 1所述的方法, 其特征在于, 所述根据所述丢帧情况和丢包补偿 算法对所述数据帧进行丢包补偿处理, 并将经过所述丢包补偿处理的数据 帧进行压缩编码后存储的步骤包括:  [2] The method according to claim 1, wherein the data frame is subjected to packet loss compensation processing according to the frame loss situation and a packet loss compensation algorithm, and the packet loss compensation process is performed. The steps of storing the data frame after compression encoding include:
当所述丢帧情况为当前数据帧不是丢帧, 所述当前数据帧的前一数据帧是 丢帧吋, 根据第一处理策略对当所述前数据帧进行所述丢包补偿处理; 将经过丢包补偿处理后的当前数据帧进行压缩编码后存储在第一缓冲区。  When the frame loss situation is that the current data frame is not a frame loss, the previous data frame of the current data frame is a frame loss frame, and the packet loss compensation process is performed on the previous data frame according to the first processing policy; The current data frame after the packet loss compensation process is compression-encoded and stored in the first buffer.
[3] 如权利要求 2所述的方法, 其特征在于, 所述根据第一处理策略对所述当前 数据帧进行所述丢包补偿处理包括: [3] The method according to claim 2, wherein the performing the packet loss compensation process on the current data frame according to the first processing policy comprises:
对所述当前数据帧进行解码;  Decoding the current data frame;
对存储在所述第一缓冲区的数据帧进行解码;  Decoding a data frame stored in the first buffer;
根据所述第一缓冲区中解码后的数据帧对所述当前数据帧解码后的数据帧 进行平滑;  Smoothing the data frame decoded by the current data frame according to the decoded data frame in the first buffer;
对经过平滑后的数据帧进行延吋。  Delay the smoothed data frame.
[4] 如权利要求 1所述的方法, 其特征在于, 所述根据所述丢帧情况和丢包补偿 算法对所述数据帧进行丢包补偿处理, 并将经过所述丢包补偿处理的数据 帧进行压缩编码后存储的步骤包括: [4] The method according to claim 1, wherein the data frame is subjected to packet loss compensation processing according to the frame loss situation and a packet loss compensation algorithm, and the packet loss compensation process is performed. The steps of storing the data frame after compression encoding include:
当所述丢帧情况为所述当前数据帧是第一次丢帧吋, 根据第二处理策略对 所述当前数据帧进行丢包补偿处理;  When the frame loss condition is that the current data frame is the first frame loss frame, performing packet loss compensation processing on the current data frame according to the second processing policy;
将经过所述丢包补偿处理的当前数据帧进行压缩编码后存储在第一缓冲区 和第二缓冲区。 The current data frame subjected to the packet loss compensation processing is compression-encoded and stored in the first buffer and the second buffer.
[5] 如权利要求 4所述的方法, 其特征在于, 所述根据第二处理策略对所述当前 数据帧进行丢包补偿处理包括: [5] The method according to claim 4, wherein the performing packet loss compensation processing on the current data frame according to the second processing policy comprises:
根据所述第一缓冲区的数据帧更新第二缓冲区;  Updating the second buffer according to the data frame of the first buffer;
对所述更新后的第二缓冲区的数据帧进行解码, 并根据解码后的数据帧获 得基周期;  Decoding the data frame of the updated second buffer, and obtaining a base period according to the decoded data frame;
将更新后的第二缓冲区中的数据帧的最后 1/4基周期长度的数据进行平滑; 将平滑后的数据替换所述第二缓冲区中相应的最后 1/4基周期长度的数据, 得到替换后的数据帧;  Smoothing the data of the last 1/4 base period length of the data frame in the updated second buffer; replacing the smoothed data with the corresponding last 1/4 base period length data in the second buffer, Obtaining the replaced data frame;
根据替换后的数据帧计算出补偿的数据帧;  Compensating the data frame according to the replaced data frame;
对所述需要补偿的数据帧进行延吋。  Delaying the data frame that needs to be compensated.
[6] 如权利要求 1所述的方法, 其特征在于, 所述根据所述丢帧情况和丢包补偿 算法对所述数据帧进行丢包补偿处理, 并将经过所述丢包补偿处理的数据 帧进行压缩编码后存储的步骤包括: [6] The method according to claim 1, wherein the data frame is subjected to packet loss compensation processing according to the frame loss situation and a packet loss compensation algorithm, and the packet loss compensation process is performed. The steps of storing the data frame after compression encoding include:
当所述丢帧情况为当前数据帧是第二次或第三次丢帧吋, 根据第三处理策 略对所述当前数据帧进行丢包补偿处理;  When the frame loss condition is that the current data frame is the second or third frame loss frame, the current data frame is subjected to packet loss compensation processing according to the third processing policy.
将经过所述丢包补偿处理的当前数据帧进行压缩编码后存储在第一缓冲区 和第二缓冲区。  The current data frame subjected to the packet loss compensation processing is compression-encoded and stored in the first buffer and the second buffer.
[7] 如权利要求 6所述的方法, 其特征在于, 所述根据第三处理策略对当前数据 帧进行丢包补偿处理包括:  [7] The method according to claim 6, wherein the performing packet loss compensation processing on the current data frame according to the third processing policy comprises:
对所述第一缓冲区或第二缓冲区的数据帧进行解码;  Decoding a data frame of the first buffer or the second buffer;
对解码后的数据帧进行相应的更新;  Correspondingly updating the decoded data frame;
根据更新后的数据帧计算出补偿数据帧;  Compensating the data frame according to the updated data frame;
对所述补偿数据帧和第一缓冲区中解码获得数据帧叠加后进行平滑, 并进 行延吋。  The compensated data frame and the decoded data frame in the first buffer are superimposed and smoothed, and then delayed.
[8] 如权利要求 1所述的方法, 其特征在于, 所述根据所述丢帧情况和丢包补偿 算法对所述数据帧进行丢包补偿处理, 并将经过所述丢包补偿处理的数据 帧进行压缩编码后存储的步骤包括:  [8] The method according to claim 1, wherein the data frame is subjected to packet loss compensation processing according to the frame loss situation and a packet loss compensation algorithm, and the packet loss compensation process is performed. The steps of storing the data frame after compression encoding include:
当所述丢帧情况为所述当前数据帧是第四、 五或六次丢帧吋, 根据第四处 理策略对所述当前数据帧进行丢包补偿处理; When the frame loss situation is that the current data frame is the fourth, fifth or sixth frame loss frame, according to the fourth place The policy performs packet loss compensation processing on the current data frame;
将经过所述丢包补偿处理的当前数据帧进行压缩编码后存储在第一缓冲区 和第二缓冲区。  The current data frame subjected to the packet loss compensation processing is compression-encoded and stored in the first buffer and the second buffer.
[9] 如权利要求 8所述的方法, 其特征在于, 所述根据第四处理策略对当前数据 帧进行丢包补偿处理包括:  [9] The method according to claim 8, wherein the performing packet loss compensation processing on the current data frame according to the fourth processing policy comprises:
对所述第一缓冲区或第二缓冲区的数据帧进行解码;  Decoding a data frame of the first buffer or the second buffer;
根据解码后的数据帧计算出相应的补偿结果, 对整体数据帧进行平滑处理 后延吋。  The corresponding compensation result is calculated according to the decoded data frame, and the overall data frame is smoothed and then delayed.
[10] 一种实现丢包补偿的装置, 所述装置用于根据数据帧传输中的丢包情况进 行丢包补偿, 其特征在于, 所述装置包括:  [10] A device for implementing packet loss compensation, wherein the device is configured to perform packet loss compensation according to a packet loss condition in a data frame transmission, where the device includes:
获取模块, 用于获取数据帧的丢帧情况;  An obtaining module, configured to acquire a frame loss condition of a data frame;
处理模块, 用于根据所述丢帧情况果和丢包补偿算法对数据帧进行丢包补 偿处理, 其中, 在丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对 所述编码后存储的数据帧进行解码;  a processing module, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after encoding is used, after the coding The stored data frame is decoded;
编码存储模块, 用于将经过所述丢包补偿处理的数据帧进行压缩编码后存 储。  And an encoding storage module, configured to compress and encode the data frame subjected to the packet loss compensation processing and store the data frame.
[11] 如权利要求 10所述的装置, 其特征在于,  [11] The apparatus of claim 10, wherein
所述处理模块包括第一处理模块, 用于所述丢帧情况为当前数据帧不是丢 帧, 当前数据帧的前一数据帧是丢帧吋, 根据第一处理策略对所述当前数 据帧进行丢包补偿处理;  The processing module includes a first processing module, where the frame loss is that the current data frame is not a frame loss, and the previous data frame of the current data frame is a frame loss frame, and the current data frame is performed according to the first processing policy. Packet loss compensation processing;
所述编码存储模块包括第一编码模块, 用于将经过所述丢包补偿处理后的 当前数据帧进行压缩编码后存储在第一缓冲区;  The code storage module includes a first encoding module, configured to compress and encode the current data frame after the packet loss compensation process, and store the data frame in the first buffer;
其中, 所述第一处理策略包括:  The first processing policy includes:
对当前数据帧进行解码;  Decoding the current data frame;
对存储在第一缓冲区的数据帧进行解码;  Decoding the data frame stored in the first buffer;
根据第一缓冲区中解码后的数据帧对当前数据帧解码后的数据帧进行平滑 对经过平滑后的数据帧进行延吋。 The data frame decoded by the current data frame is smoothed according to the decoded data frame in the first buffer to delay the smoothed data frame.
[12] 如权利要求 10所述的装置, 其特征在于, [12] The apparatus of claim 10, wherein
所述处理模块包括第二处理模块, 用于当所述丢帧情况为所述当前数据帧 是第一次丢帧吋, 根据第二处理策略对所述当前数据帧进行丢包补偿处理 所述编码存储模块包括第二编码模块, 用于将经过所述丢包补偿处理的当 前数据帧进行压缩编码后存储在第一缓冲区和第二缓冲区; 其中, 所述第二处理策略包括:  The processing module includes a second processing module, configured to: when the frame loss situation is that the current data frame is the first frame loss frame, perform the packet loss compensation process on the current data frame according to the second processing policy. The code storage module includes a second encoding module, configured to compress and encode the current data frame that has undergone the packet loss compensation processing in the first buffer and the second buffer, where the second processing strategy includes:
根据所述第一缓冲区的数据帧更新第二缓冲区;  Updating the second buffer according to the data frame of the first buffer;
对所述第一缓冲区的数据帧进行解码, 并根据解码后的数据帧获得基周期 将更新后的第二缓冲区中的数据帧的最后 1/4基周期长度的数据进行平滑; 将平滑后的数据替换所述第二缓冲区中相应的最后 1/4基周期长度的数据; 根据进行替换后的数据帧计算出需要补偿的数据帧;  Decoding the data frame of the first buffer, and obtaining a base period according to the decoded data frame to smooth data of a last 1/4 base period length of the data frame in the updated second buffer; Subsequent data replaces data of a corresponding last 1/4 base period length in the second buffer; and calculates a data frame to be compensated according to the replaced data frame;
对所述需要补偿的数据帧进行延吋。  Delaying the data frame that needs to be compensated.
[13] 如权利要求 10所述的装置, 其特征在于, [13] The apparatus of claim 10, wherein
所述处理模块包括第三处理模块, 用于当所述丢帧情况为所述当前数据帧 是第二次或第三次丢帧吋, 根据第三处理策略对所述当前数据帧进行丢包 补偿处理;  The processing module includes a third processing module, configured to: when the frame loss situation is that the current data frame is the second or third frame loss frame, the current data frame is lost according to the third processing policy. Compensation processing
所述编码存储模块包括第三编码模块, 用于将经过所述丢包补偿处理的当 前数据帧进行压缩编码后存储在第一缓冲区和第二缓冲区, 其中, 所述第三处理策略包括:  The code storage module includes a third encoding module, configured to compress and encode the current data frame that has undergone the packet loss compensation processing in a first buffer and a second buffer, where the third processing policy includes :
对所述第一缓冲区或第二缓冲区的数据帧进行解码;  Decoding a data frame of the first buffer or the second buffer;
对解码后的数据帧进行相应的更新;  Correspondingly updating the decoded data frame;
根据更新后的数据帧计算出补偿数据帧;  Compensating the data frame according to the updated data frame;
对所述补偿数据帧和第一缓冲区中解码获得数据帧叠加后进行平滑, 并进 行延吋。  The compensated data frame and the decoded data frame in the first buffer are superimposed and smoothed, and then delayed.
[14] 如权利要求 10所述的装置, 其特征在于,  [14] The apparatus of claim 10, wherein
所述处理模块包括第四处理模块, 用于当所述丢帧情况为当前数据帧是第 四、 五或六次丢帧吋, 根据第四处理策略对所述当前数据帧进行丢包补偿 处理; The processing module includes a fourth processing module, configured to: when the frame loss situation is the current data frame is After four, five or six frames are lost, the current data frame is subjected to packet loss compensation according to the fourth processing strategy;
所述编码存储模块包括第四编码模块, 用于将所述经过丢包补偿处理的当 前数据帧进行压缩编码后存储在第一缓冲区和第二缓冲区, 其中, 所述第四处理策略包括:  The code storage module includes a fourth encoding module, configured to compress and encode the current data frame that has undergone the packet loss compensation process in a first buffer and a second buffer, where the fourth processing policy includes :
对所述第一缓冲区或第二缓冲的数据帧进行解码;  Decoding the first buffer or the second buffered data frame;
根据解码后的数据帧计算出相应的补偿结果, 对整体数据帧进行平滑处理 后延吋。  The corresponding compensation result is calculated according to the decoded data frame, and the overall data frame is smoothed and then delayed.
[15] 一种实现丢包补偿的***, 所述***用于根据数据帧传输中的丢包情况进 行丢包补偿, 其特征在于, 所述***包括:  [15] A system for implementing packet loss compensation, the system is configured to perform packet loss compensation according to a packet loss situation in a data frame transmission, where the system includes:
获取模块, 用于获取数据帧的丢帧情况;  An obtaining module, configured to acquire a frame loss condition of a data frame;
编解码模块, 用于根据所述丢帧情况和丢包补偿算法对数据帧进行丢包补 偿处理, 并将经过丢包补偿处理的数据帧进行压缩编码后存储, 其中, 在 丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对所述编码后存储的 数据帧进行解码。  a codec module, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, and compress and encode the data frame after the packet loss compensation process, where, in the packet loss compensation algorithm, The data frame stored after the encoding needs to be decoded, and the data frame stored after the encoding is decoded.
[16] 如权利要求 15所述的***, 其特征在于, 所述编解码模块包括:  [16] The system of claim 15, wherein the codec module comprises:
处理模块, 用于根据所述丢帧情况和丢包补偿算法对数据帧进行丢包补偿 处理, 其中, 在丢包补偿算法中, 需要使用编码后存储的数据帧吋, 对所 述编码后存储的数据帧进行解码;  a processing module, configured to perform packet loss compensation processing on the data frame according to the frame loss situation and a packet loss compensation algorithm, where, in the packet loss compensation algorithm, the data frame stored after encoding is used, and the coded storage is performed. Data frame for decoding;
编码存储模块, 用于将经过所述丢包补偿处理的数据帧进行压缩编码后存 储。  And an encoding storage module, configured to compress and encode the data frame subjected to the packet loss compensation processing and store the data frame.
PCT/CN2009/073764 2008-09-04 2009-09-04 Method for packet loss compensation, apparatus and system thereof WO2010025684A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810198318XA CN101399636B (en) 2008-09-04 2008-09-04 Method for packet loss compensation, device and system implementing packet loss compensation
CN200810198318.X 2008-09-04

Publications (1)

Publication Number Publication Date
WO2010025684A1 true WO2010025684A1 (en) 2010-03-11

Family

ID=40517920

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/073764 WO2010025684A1 (en) 2008-09-04 2009-09-04 Method for packet loss compensation, apparatus and system thereof

Country Status (2)

Country Link
CN (1) CN101399636B (en)
WO (1) WO2010025684A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113035207A (en) * 2021-03-03 2021-06-25 北京猿力未来科技有限公司 Audio processing method and device
CN114415600A (en) * 2022-01-11 2022-04-29 重庆三电智能科技有限公司 Frame loss compensation position algorithm for bus type servo driver

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399636B (en) * 2008-09-04 2011-07-06 华为技术有限公司 Method for packet loss compensation, device and system implementing packet loss compensation
CN102480760B (en) * 2010-11-23 2014-09-10 中兴通讯股份有限公司 Intersystem link protocol frame dropping processing and frame-compensating distinguishing method and device
CN107919996A (en) * 2016-10-10 2018-04-17 大唐移动通信设备有限公司 A kind of data pack transmission method and equipment
CN108111702B (en) * 2017-12-07 2020-07-07 杭州闪目科技有限公司 Method for automatically compensating voice packet loss of VOIP system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030951A (en) * 2007-02-08 2007-09-05 华为技术有限公司 Drop-out compensating method and compensator
JP2007274568A (en) * 2006-03-31 2007-10-18 Oki Electric Ind Co Ltd Packet loss compensation method, packet transmitting apparatus, and packet receiving apparatus
JP2008005394A (en) * 2006-06-26 2008-01-10 Kddi Corp Communication terminal
CN101399636A (en) * 2008-09-04 2009-04-01 华为技术有限公司 Method for packet loss compensation, device and system implementing packet loss compensation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426715C (en) * 2006-07-04 2008-10-15 华为技术有限公司 Lost frame hiding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007274568A (en) * 2006-03-31 2007-10-18 Oki Electric Ind Co Ltd Packet loss compensation method, packet transmitting apparatus, and packet receiving apparatus
JP2008005394A (en) * 2006-06-26 2008-01-10 Kddi Corp Communication terminal
CN101030951A (en) * 2007-02-08 2007-09-05 华为技术有限公司 Drop-out compensating method and compensator
CN101399636A (en) * 2008-09-04 2009-04-01 华为技术有限公司 Method for packet loss compensation, device and system implementing packet loss compensation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113035207A (en) * 2021-03-03 2021-06-25 北京猿力未来科技有限公司 Audio processing method and device
CN113035207B (en) * 2021-03-03 2024-03-22 北京猿力未来科技有限公司 Audio processing method and device
CN114415600A (en) * 2022-01-11 2022-04-29 重庆三电智能科技有限公司 Frame loss compensation position algorithm for bus type servo driver
CN114415600B (en) * 2022-01-11 2024-01-23 重庆三电智能科技有限公司 Frame loss compensation position algorithm for bus type servo driver

Also Published As

Publication number Publication date
CN101399636B (en) 2011-07-06
CN101399636A (en) 2009-04-01

Similar Documents

Publication Publication Date Title
CN106664161B (en) The system and method that packet error of transmission based on redundancy restores
US8363678B2 (en) Techniques to synchronize packet rate in voice over packet networks
JP5587405B2 (en) System and method for preventing loss of information in speech frames
CA2633896C (en) Method and apparatus for enhancing rohc performance when encountering silence suppression
WO2010025684A1 (en) Method for packet loss compensation, apparatus and system thereof
JP5011305B2 (en) Audio data packet generation method and demodulation method thereof
CA3059322C (en) Method, apparatus, and system for processing audio data
US10218856B2 (en) Voice signal processing method, related apparatus, and system
JP2006238445A (en) Method and apparatus for handling network jitter in voice-over ip communication network using virtual jitter buffer and time scale modification
CN108696491B (en) Audio data sending processing method and device and audio data receiving processing method and device
WO2008063735A2 (en) Payload header compression in an rtp session
US20070107507A1 (en) Mute processing apparatus and method for automatically sending mute frames
CN109891917A (en) It is interoperated using network-terminal of compatible payload
EP1982331A1 (en) Method and arrangement for speech coding in wireless communication systems
JP5307207B2 (en) Efficient encoding of out-of-order data packets in the network
US7418013B2 (en) Techniques to synchronize packet rate in voice over packet networks
WO2010124499A1 (en) Method and terminal for synchronously recording sounds and images of opposite ends based on circuit domain video telephone
US20070133589A1 (en) Mute processing apparatus and method
KR20060037195A (en) Apparatus and method for transmit/receive of image data in a mobile communication
JP2009501500A5 (en)
WO2002017588A1 (en) Low speed speech encoding method based on the network protocol
CN107733833B (en) Voice intercommunication method and system for CDMA and VoLTE terminals
CN1538704A (en) Method of generating real time transfer protocol time stamp
KR100723679B1 (en) Method for Delivering Audio Bitstream in Ring Back Tone Section by Using Voice Slot Data Structure of Code Division Multiple Access Mobile Communication Network
JP2005073057A (en) Digital speech apparatus

Legal Events

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

Ref document number: 09811059

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09811059

Country of ref document: EP

Kind code of ref document: A1