WO2007006185A1 - A method for protecting the channel of the voip digital signal processing - Google Patents

A method for protecting the channel of the voip digital signal processing Download PDF

Info

Publication number
WO2007006185A1
WO2007006185A1 PCT/CN2005/001814 CN2005001814W WO2007006185A1 WO 2007006185 A1 WO2007006185 A1 WO 2007006185A1 CN 2005001814 W CN2005001814 W CN 2005001814W WO 2007006185 A1 WO2007006185 A1 WO 2007006185A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
queue
packet
protection
sequence number
Prior art date
Application number
PCT/CN2005/001814
Other languages
French (fr)
Chinese (zh)
Inventor
Bin Lin
Original Assignee
Zte Corporation
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 Zte Corporation filed Critical Zte Corporation
Publication of WO2007006185A1 publication Critical patent/WO2007006185A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/752Media network packet handling adapting media to network capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the invention relates to a chip protection method for DSP (Digital Signal Processing) in the field of communication, in particular to improving the reliability and VOIP of a DSP channel by filtering invalid RTP (Real Time Transmission Protocol, for transmission media) messages.
  • RTP Real Time Transmission Protocol, for transmission media
  • Voice over IP IP-based voice service
  • the traditional communication service adopts circuit-switching technology.
  • the two parties establish a service by establishing a fixed-bandwidth circuit. In this way, the bandwidth utilization is low, the communication cost is high, and the development and promotion of value-added services are difficult.
  • the bearer network is an IP packet switching network, such as the Internet.
  • IP packet switching network such as the Internet.
  • the advantages of packet switching are high network utilization, low cost of communication, and the development and promotion of new services is relatively fast due to the use of an open architecture.
  • the DSP When using IP or other packet-switched networks as the bearer network, the DSP is usually used to perform PCM (Pulse Code Modulation) voice-to-packet voice bidirectional conversion. A user's voice is converted to a data packet on the packet network after being converted by the DSP. After the packet arrives at the peer, it is converted to voice by the other party's DSP, and vice versa.
  • PCM Pulse Code Modulation
  • the packet is also sent to the DSP because the port meets the requirements, which affects the normal operation of the DSP, resulting in a drop in voice quality or DSP anomalies.
  • the source of the packet may be from a network error, such as an IP or UDP port error.
  • the device needs to periodically send media packets because it needs to maintain the internal mapping of NAT.
  • This packet is a kind of interference to the DSP channel of the receiver and causes the same problem.
  • DSP can only support one voice stream at the same time, all messages except this voice stream will have adverse effects on the DSP, and introduce delay and jitter, which will affect the voice quality.
  • the amount, the heavy, causes software anomalies inside the DSP chip.
  • Chinese Patent Application discloses a method of sorting time stamps of RTP packets to eliminate their jitter delay.
  • the method uses the buffer storage queue to receive the RTP data packet.
  • the first normally arrived data packet is first stored in the start address of the buffer queue, and the time stamp is used as the reference time stamp;
  • a data packet based on its timestamp, determines its storage address in the buffer queue and stores it in the corresponding address.
  • the reference timestamp is used as the transmission timestamp, and the corresponding first normally arrived data packet is output to the next interface; then the sum of the transmission timestamp and the timestamp interval is used as the sum of The new transmission time stamp, and then check whether there is a data packet in the storage address corresponding to the new transmission time stamp, and then output the data packet to the next interface.
  • This method uses the timestamp to debounce and cannot filter invalid packets. If an invalid message appears, it is also entered into the DSP. Summary of the invention
  • the technical problem to be solved by the present invention is to provide a method for protecting a VOIP DSP channel, which overcomes the defects in the VOIP DSP chip receiving process, and solves the problem of sound quality degradation and abnormality when the voice channel receives invalid data, thereby improving the DSP channel.
  • the reliability of the work makes the VOIP equipment highly robust and anti-interference.
  • the present invention provides a method for protecting a VOIP digital signal processing channel, wherein a plurality of buffered message queues to the digital signal processing channel are set, and according to an incoming real-time transmission protocol message sequence The continuity of the number and/or the timestamp, filtering the invalid message in the message, and inputting the filtered message to the digital signal processing channel.
  • the method includes the following steps:
  • Step 1 Set a plurality of buffered message queues to the digital signal processing channel, the queue including at least a normal queue and a protection queue;
  • Step 2 extract the sequence number of the newly arrived real-time transport protocol packet, and determine whether the packet is a suspicious packet according to the continuity of the sequence number and/or the timestamp of the preceding and succeeding messages; if yes, the suspicious report is The text is stored in the protection queue; if not, the message is placed in a normal queue;
  • Step 3 determining, according to the sequence number of the subsequent new packet, whether the suspicious packet in the protection queue is an invalid packet; if yes, discarding the suspicious packet, and clearing the protection queue; if not, using the The protection queue replaces the normal queue.
  • the method further comprising the step of transmitting a message in the normal queue to a digital signal processing channel.
  • the method further includes setting a variable V to record a sequence number of a last message in the current normal queue.
  • the method further includes: determining whether the incoming message is the first message after the channel is opened, and if yes, assigning the initial value of the variable V to the sequence of the first message number.
  • the method further includes the step of continuously updating the variable V when the new message is stored in the normal queue.
  • step 2 further comprises:
  • Step 21 set threshold values A, B;
  • Step 22 Determine whether the absolute value of the sequence number M of the newly arrived message and the current value of the variable V is less than the threshold A. If not, the message is a suspicious message. If yes, determining whether the timestamp of the new packet with the sequence number M and the timestamp of the old packet whose sequence number is the current value of V is less than the threshold B; if yes, The new packet is not a suspicious packet, and the new packet with the sequence number M is included in the normal queue, and the value of the variable V is updated to be M. If not, the packet is a suspicious packet.
  • step 3 further comprises:
  • Step 31 setting a threshold C
  • Step 32 Record the serial number L of the subsequent new message
  • the third step it is determined whether the absolute value of the value of the variable V is less than the value of the variable V. If yes, the message stored in the protection queue is an invalid message, and the sequence number is L's new The message is a valid message and is stored in the normal queue, and the value of the variable V is updated as L; if not, the absolute value of the L is subtracted from the sequence number of the last message in the protection queue. Whether it is less than the threshold C; if yes, the newly received subsequent message with the sequence number L is also a suspicious message, and is stored in the protection queue. If not, the The packet in the protection queue is an invalid packet, and the protection queue is emptied, and the packet with the sequence number L is stored as a suspicious packet in the protection queue.
  • step three or three further comprises:
  • Step 3 31, setting a threshold value of the number of protection queue packets D;
  • step 3:32 it is determined whether the number of the packets stored in the protection queue is greater than or equal to the threshold D. If yes, the original normal queue is cleared, and the original queue is replaced by the protection queue to form a new one. a normal queue, and further updating the value of the variable V as the serial number of the last message in the new normal queue; if not, the V value is unchanged, continue to extract the serial number of the new message and transfer.
  • the method of the step, wherein the step 323 further includes: when the number of packets in the protection queue is greater than or equal to the threshold D, using the original normal queue as a new protection queue. A step of.
  • the invention solves the defects in the VOIP DSP packet processing in the prior art, and avoids the degradation of the sound quality and the abnormality when the invalid data is received.
  • the received packet When the received packet is normal, it does not affect the original packet processing process, and does not introduce packet loss, jitter, and delay.
  • these invalid messages can be filtered out to avoid abnormalities, improve sound quality, and not introduce new packet loss, jitter, and delay.
  • media/call switching is performed, a delay of several tens of milliseconds is introduced at the time of switching, which can be ignored, but an abnormality can be avoided and the sound quality is improved.
  • FIG. 2 is a sequence diagram of an RTP message entering a DSP before applying the method of the present invention
  • FIG. 3 is a sequence diagram of an RTP message entering a DSP after applying the method of the present invention. detailed description:
  • the normal RTP packets are continuous. Occasionally, due to out-of-order and packet loss, they fluctuate within a small range.
  • media switching refers to the switching of normal voice RTP streams
  • the sequence number jumps, but subsequent The message should be continuous again.
  • the suspicious packet can be temporarily placed in the protection queue. If the subsequent packet proves that the suspicious packet is invalid, the temporary queue is cleared; if the subsequent packet proves that the suspicious packet is indeed valid Then, replace the normal queue with the protection queue and pass the data to the DSP.
  • the original normal queue acts as a new protection queue.
  • the method of the present invention can be implemented by judging the continuity of the message sequence number or the continuity of the time stamp, or in combination, by simultaneously determining the continuity of the sequence number and the time stamp.
  • Figure 1 shows a process flow diagram of the method of the invention, the method of the invention being as follows:
  • Each DSP channel is assigned a number of buffered message queues, including the normal queue and the protection queue.
  • the variable is reassigned to record the sequence number of the last message entering the current normal queue, assuming that a variable named V is assigned.
  • step 110 When receiving the subsequent RTP message, extract the serial number of the message (assumed to be equal to L) (step 110), and determine whether the difference between L and variable V is not large (ie, the absolute value of L minus V) If it is less than the threshold A) (step 111), if yes, it is considered that the suspected packet in the protection queue is an invalid packet, clear the protection queue, put the packet with the serial number L into the normal queue, and record the new variable with the variable V.
  • the serial number, ie v L (step 112).
  • the thresholds A, B, and C are all configurable in the above steps.
  • the threshold D is also configurable.
  • the larger the value of the threshold value D the smaller the possibility of false switching, but the larger the switching delay.
  • other applications are similar.
  • 2 is a sequence diagram of an RTP message entering the DSP before applying the method of the present invention.
  • 3 is a sequence diagram of an RTP message entering a DSP after applying the method of the present invention.
  • threshold A is configured to 10
  • threshold B is configured to 100ms
  • threshold C is configured to 5
  • threshold D is configured to 2.
  • the third step is to receive the packet with the sequence number 4.
  • the sequence number of the packet is not continuous, but the difference is not large (less than the threshold A).
  • the fourth step receiving the packet with the serial number of 1000, the serial number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is invalid or media switching occurs, so this is The message is placed in the protection queue, the initial protection queue 33 shown in FIG.
  • the packet with the sequence number 5 is received, and the sequence number of the packet is consecutive with the current sequence number of the normal queue.
  • the suspected packet in the protection queue is an invalid packet, and the 1000 packet in the protection queue is cleared, and the serial number is The 5 packet is placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record the current serial number - 5.
  • the packet with the sequence number 1001 is received, and the sequence number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is an invalid message or a media switch occurs, this is The message is placed in the protection queue.
  • the packet with the sequence number 1002 is received, and the sequence number of the packet and the current sequence number of the normal queue are not consecutive, but compared with the 1001 message in the protection queue is continuous (less than the threshold C), the packet is first placed.
  • the protection queue check whether the number of packets in the protection queue reaches the threshold D. Since the threshold D is now set to 2, the threshold has been reached. At this time, it can be determined that the media switching has occurred.
  • the packet with the sequence number 10 is received, and the sequence number of the packet is discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since the packet cannot be determined to be an invalid message or a media switch occurs, the report is sent. The text is placed in the protection queue, the switched protection queue 34 shown in FIG.
  • the packet with the sequence number 1005 is received, and the sequence number of the packet is very close to the current sequence number of the normal queue (less than the threshold A). At this time, it can be determined that the suspected packet in the protection queue is an invalid packet, and the protection queue is cleared.
  • the packet with the serial number of 2000 is received, and the sequence number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is an invalid message or a media switch occurs, This message is placed in the protection queue.
  • the packet with the serial number of 3000 is received, the sequence number of the packet is not continuous with the normal queue (greater than the threshold A), and the packet in the protection queue is not continuous (greater than the threshold C:), indicating that the packet is suspicious and cannot be Determine whether the message is invalid or media switch, delete the 2000 packet in the protection queue, and put the packet with the serial number 3000 into the protection queue.
  • Figure 2 is a sequence diagram of the RTP message entering the DSP after applying the method.
  • Figure 2 uses the prior art single-queue mode. In this way, all messages enter the DSP directly.
  • Figure 3 uses the dual queue mode to set the normal queue and the protection queue respectively. Only the packets in the normal queue enter the DSP. It can be seen from the comparison before and after the method of the present invention that only the packets in the normal queue enter the DSP, and the original RTP packets with many interferences are processed into a very regular, very "clean" voice.
  • the RTP stream is input to the DSP to protect the DSP.
  • the conditions for judging valid messages in the above process can be flexibly configured, for example: Threshold A, Threshold B, Threshold C, Threshold D.
  • the above conditions can be combined as appropriate and flexibly modified. Achieve the best value for the project.
  • the invention solves the defects in the VOIP DSP packet processing in the prior art, and avoids the degradation of the sound quality and the abnormality when the invalid data is received.
  • the received packet When the received packet is normal, it does not affect the original packet processing process, and does not introduce packet loss, jitter, and delay.
  • these invalid messages can be filtered out to avoid abnormalities, improve sound quality, and not introduce new packet loss, jitter, and delay.
  • media/call switching is performed, a delay of several tens of milliseconds is introduced at the time of switching, which can be ignored, but an abnormality can be avoided and the sound quality is improved.
  • This method can be applied to all communication systems that use RT as a media transport protocol. There is no need to modify existing call control protocols.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method for protecting the channel of the VOIP digital signal processing includes: setting a plurality of message buffer storage queues to the digital signal processing channel, and filtering the ineffective message in the said message according to the succession of the sequence numbers and/or time stamps of the real time transport protocol message arrived, and inputting the filtered message to the digital signal processing channel. The present invention overcomes the defect during the packet receiving process of the VOIP DSP chip, and solves the problem that the sound quality is abnormal and fall when the ineffective data is received in the voice channel, thereby improves the working reliability of the DSP channel, and gives VOIP equipment the high robustness and anti-interference ability.

Description

一种保护 VOIP数字信号处理通道的方法 技术领域  Method for protecting VOIP digital signal processing channel
本发明涉及一种通讯领域的 DSP (数字信号处理)的芯片保护方法,特别 是一种通过过滤无效的 RTP (实时传输协议, 用于传输媒体)报文来提高 DSP 通道的可靠性和 VOIP (Voice over IP,基于 IP的话音业务) 设备的鲁棒性的方 法。 背景技术  The invention relates to a chip protection method for DSP (Digital Signal Processing) in the field of communication, in particular to improving the reliability and VOIP of a DSP channel by filtering invalid RTP (Real Time Transmission Protocol, for transmission media) messages. Voice over IP, IP-based voice service) The robustness of the device. Background technique
传统的通讯业务是采用电路交换技术,通话双方通过建立一条固定带宽的 电路实现提供业务,这种方式下带宽利用率底, 通讯的成本高,而且增值业务 的开发、 推广比较困难。  The traditional communication service adopts circuit-switching technology. The two parties establish a service by establishing a fixed-bandwidth circuit. In this way, the bandwidth utilization is low, the communication cost is high, and the development and promotion of value-added services are difficult.
目前, 许多新开发的多媒体通讯业务采用分组交换技术, 承载网络是 IP 分组交换网络,比如因特网。分组交换的优点是网络利用率高,通讯的成本底, 而且由于使用了开放式的架构, 新业务的开发、 推广比较快速。  At present, many newly developed multimedia communication services use packet switching technology, and the bearer network is an IP packet switching network, such as the Internet. The advantages of packet switching are high network utilization, low cost of communication, and the development and promotion of new services is relatively fast due to the use of an open architecture.
当使用 IP或其他分组交换网络作为承载网络时, 通常使用 DSP完成 PCM (脉冲编码调制)话音到分组话音的双向转换,一个用户的话音通过 DSP 的后转换为数据包在分组网络上传输, 数据包到达对端后, 再由对方的 DSP 转换为话音, 反之亦然。  When using IP or other packet-switched networks as the bearer network, the DSP is usually used to perform PCM (Pulse Code Modulation) voice-to-packet voice bidirectional conversion. A user's voice is converted to a data packet on the packet network after being converted by the DSP. After the packet arrives at the peer, it is converted to voice by the other party's DSP, and vice versa.
当用户使用 IP网络提供的多媒体通讯业务时, 由于 IP网络不如电路交换 网络确定和可靠, 因此会遇到以下问题:  When a user uses a multimedia communication service provided by an IP network, since the IP network is not as determined and reliable as the circuit-switched network, the following problems are encountered:
当收到来自于网络的无效数据包的时候, 由于端口符合要求,这个数据包 也会被打入到 DSP中,影响 DSP的正常工作,导致语音质量下降或 DSP异常。  When an invalid packet from the network is received, the packet is also sent to the DSP because the port meets the requirements, which affects the normal operation of the DSP, resulting in a drop in voice quality or DSP anomalies.
数据包的来源可能来自网络错误, 例如 IP或 UDP端口错误。  The source of the packet may be from a network error, such as an IP or UDP port error.
也可能来自恶意的网络攻击,这些包可能由于端口符合要求,也会被打入 到 DSP中, 引起相同的问题。  It may also come from malicious cyber attacks. These packets may also be sent to the DSP due to the port's compliance requirements, causing the same problem.
在私网环境下, 由于要维系 NAT的内部映射, 设备需要定期发送媒体报 文, 这个报文对于接收方的 DSP通道来说, 是一种干扰, 也会引起相同问题。  In the private network environment, the device needs to periodically send media packets because it needs to maintain the internal mapping of NAT. This packet is a kind of interference to the DSP channel of the receiver and causes the same problem.
原因在于: DSP在同一个时间内只能支持一个语音流,除这个语音流外的 所有报文, 都会对 DSP产生不利的效果, 轻则引入延迟和抖动, 影响话音质 量, 重则引起 DSP芯片内部的软件异常。 The reason is: DSP can only support one voice stream at the same time, all messages except this voice stream will have adverse effects on the DSP, and introduce delay and jitter, which will affect the voice quality. The amount, the heavy, causes software anomalies inside the DSP chip.
中国专利申请(03125107) 公开了一种用 RTP数据包的序号进行排序以 消除其抖动延时的方法; 该专利采用缓冲存储队列从 IP网络中接收 RTP数据 包,数据入队时根据数据包序号确定其在缓冲队列中的存储地址并将该数据包 存入其存储地址, 同时启动对应的计数器; 数据出队时, 将缓冲队列中各个存 有数据包的存储地址对应的计数器分别加 1,再检查缓冲队列中当前存储的所 有数据包中, 是否有一个数据包满足输出条件: timer®+seq i)=min— seq+n, 如果有则再检查最小数据包序号所对应的存储地址中是否有数据包,有则将其 中的数据包输出到下一接口,并将其所在存储地址对应的计数器清零。该方法 是利用序列号去抖动, 不能无效杂包, 如果出现无效报文, 也被输入到 DSP 里了。 Chinese patent application (03125107) discloses a method for sorting by using the serial number of RTP data packets to eliminate the jitter delay thereof; the patent uses a buffer storage queue to receive RTP data packets from an IP network, and the data is entered into a queue according to the data packet number. Determining the storage address in the buffer queue and storing the data packet in its storage address, and starting the corresponding counter; when the data is dequeued, the counter corresponding to the storage address of each data packet in the buffer queue is incremented by one, Then check whether all the packets currently stored in the buffer queue meet the output condition: timer®+se q i)=min— seq+n, if yes, check the storage address corresponding to the smallest packet sequence number. Whether there is a data packet in it, or some of the data packets are output to the next interface, and the counter corresponding to the storage address is cleared. This method uses the serial number to debounce, and cannot invalidate the miscellaneous packets. If an invalid message occurs, it is also input into the DSP.
中国专利申请(03125108 )公开了一种用 RTP数据包的时戳进行排序以 消除其抖动延时的方法。 该方法采用缓冲存储队列接收 RTP数据包, 数据入 队时先将第一个正常达到的数据包存入缓冲队列的起始地址,并以其时戳作为 基准时戳;对于之后收到的每一个数据包,根据其时戳确定其在缓冲队列中的 存储地址, 并将其存入相应地址。数据出队时, 在缓存预定时间后, 以基准时 戳作为发送时戳,将对应的第一个正常达到的数据包输出到下一接口;然后以 发送时戳加上时戳间隔之和作为新的发送时戳,再检查新发送时戳所对应的存 储地址中是否有数据包,有则将其中的数据包输出到下一接口。该方法是利用 时间戳去抖动, 不能过滤无效包。如果出现无效报文, 也被输入到 DSP里了。 发明内容  Chinese Patent Application (03125108) discloses a method of sorting time stamps of RTP packets to eliminate their jitter delay. The method uses the buffer storage queue to receive the RTP data packet. When the data is enqueued, the first normally arrived data packet is first stored in the start address of the buffer queue, and the time stamp is used as the reference time stamp; A data packet, based on its timestamp, determines its storage address in the buffer queue and stores it in the corresponding address. When the data is dequeued, after the predetermined time is cached, the reference timestamp is used as the transmission timestamp, and the corresponding first normally arrived data packet is output to the next interface; then the sum of the transmission timestamp and the timestamp interval is used as the sum of The new transmission time stamp, and then check whether there is a data packet in the storage address corresponding to the new transmission time stamp, and then output the data packet to the next interface. This method uses the timestamp to debounce and cannot filter invalid packets. If an invalid message appears, it is also entered into the DSP. Summary of the invention
本发明所要解决的技术问题在于提供一种保护 VOIP DSP通道的方法,以 克服 VOIP DSP芯片收包处理中的缺陷,解决话音通道收到无效数据时音质下 降和发生异常的问题, 从而提高 DSP通道工作的可靠性, 使 VOIP设备具备 很强的鲁棒性和抗干扰能力。  The technical problem to be solved by the present invention is to provide a method for protecting a VOIP DSP channel, which overcomes the defects in the VOIP DSP chip receiving process, and solves the problem of sound quality degradation and abnormality when the voice channel receives invalid data, thereby improving the DSP channel. The reliability of the work makes the VOIP equipment highly robust and anti-interference.
为了实现上述目的,本发明提供了一种保护 VOIP数字信号处理通道的方 法, 其中, 通过设置多个到所述数字信号处理通道的缓冲存储报文队列, 并根 据到来的实时传输协议报文序列号和 /或时间戳的连续性, 过滤所述报文中的 无效报文, 并将所述过滤后的报文输入到所述数字信号处理通道。 所述的方法, 其中, 包括如下步骤: In order to achieve the above object, the present invention provides a method for protecting a VOIP digital signal processing channel, wherein a plurality of buffered message queues to the digital signal processing channel are set, and according to an incoming real-time transmission protocol message sequence The continuity of the number and/or the timestamp, filtering the invalid message in the message, and inputting the filtered message to the digital signal processing channel. The method includes the following steps:
步骤一,设置多个到数字信号处理通道的缓冲存储报文队列,所述队列至 少包括正常队列和保护队列;  Step 1: Set a plurality of buffered message queues to the digital signal processing channel, the queue including at least a normal queue and a protection queue;
步骤二,抽取新到来的实时传输协议报文的序列号,根据前后报文序列号 和 /或时间戳的连续性, 判断所述报文是否为可疑报文; 如是, 则将所述可疑 报文存放在所述保护队列中; 如否, 则将所述报文放入正常队列中;  Step 2: extract the sequence number of the newly arrived real-time transport protocol packet, and determine whether the packet is a suspicious packet according to the continuity of the sequence number and/or the timestamp of the preceding and succeeding messages; if yes, the suspicious report is The text is stored in the protection queue; if not, the message is placed in a normal queue;
步骤三,根据后续新报文的序列号判断所述保护队列中的可疑报文是否为 无效报文; 如是, 则丢弃所述可疑报文, 清空所述保护队列; 如否, 则用所述 保护队列替换正常队列。  Step 3: determining, according to the sequence number of the subsequent new packet, whether the suspicious packet in the protection queue is an invalid packet; if yes, discarding the suspicious packet, and clearing the protection queue; if not, using the The protection queue replaces the normal queue.
所述的方法,其中,进一步包括将所述正常队列中的报文传给数字信号处 理通道的步骤。  The method, further comprising the step of transmitting a message in the normal queue to a digital signal processing channel.
所述的方法,其中,进一步包括设置一变量 V来记录当前的正常队列中的 最后一个报文的序列号。  The method further includes setting a variable V to record a sequence number of a last message in the current normal queue.
所述的方法,其中,进一步包括判断所述到来的报文是否为通道打开后的 第一个报文, 如是, 则将所述变量 V的初值赋值为所述第一个报文的序列号。  The method further includes: determining whether the incoming message is the first message after the channel is opened, and if yes, assigning the initial value of the variable V to the sequence of the first message number.
所述的方法, 其中,进一步包括当所述新报文被存入正常队列时, 不断更 新变量 V的步骤。  The method further includes the step of continuously updating the variable V when the new message is stored in the normal queue.
所述的方法, 其中, 所述步骤二进一步包括:  The method, wherein the step 2 further comprises:
步骤二一, 设定门限值 A、 B;  Step 21, set threshold values A, B;
步骤二二, 判断所述新到来的报文的序列号 M与所述变量 V当前取值相 减的绝对值是否小于所述门限值 A, 如否, 则所述报文为可疑报文, 如是, 则 进一步判断所述序列号为 M的新报文的时间戳和所述序列号为 V当前取值的 旧报文的时间戳是否小于所述门限值 B; 如是, 则所述新报文不是可疑报文, 将所述序列号为 M的新报文列入正常队列, 并更新所述变量 V的取值为 M, 如否, 则所述报文为可疑报文。  Step 22: Determine whether the absolute value of the sequence number M of the newly arrived message and the current value of the variable V is less than the threshold A. If not, the message is a suspicious message. If yes, determining whether the timestamp of the new packet with the sequence number M and the timestamp of the old packet whose sequence number is the current value of V is less than the threshold B; if yes, The new packet is not a suspicious packet, and the new packet with the sequence number M is included in the normal queue, and the value of the variable V is updated to be M. If not, the packet is a suspicious packet.
所述的方法, 其中, 所述步骤三进一步包括:  The method, wherein the step 3 further comprises:
步骤三一, 设定一门限值 C;  Step 31, setting a threshold C;
步骤三二, 记录后续新报文的序列号 L;  Step 32: Record the serial number L of the subsequent new message;
步骤三三, 判断所述 L与所述变量 V的值相减的绝对值是否小于所述 A, 如是, 则所述存放在保护队列中的报文为无效报文, 且所述序列号为 L的新 报文为有效报文被存入正常队列, 更新所述变量 V的取值为 L; 如否, 则进一 步判断所述 L与所述保护队列中最后一个报文的序列号相减的绝对值是否小 于所述门限值 C;如是,则所述新接收的序列号为 L的后续报文也为可疑报文, 并将其存放于所述保护队列中,如否,则所述存放在保护队列中的报文为无效 报文, 清空所述保护队列, 并将所述序列号为 L的报文作为可疑报文存入保 护队列中。 In the third step, it is determined whether the absolute value of the value of the variable V is less than the value of the variable V. If yes, the message stored in the protection queue is an invalid message, and the sequence number is L's new The message is a valid message and is stored in the normal queue, and the value of the variable V is updated as L; if not, the absolute value of the L is subtracted from the sequence number of the last message in the protection queue. Whether it is less than the threshold C; if yes, the newly received subsequent message with the sequence number L is also a suspicious message, and is stored in the protection queue. If not, the The packet in the protection queue is an invalid packet, and the protection queue is emptied, and the packet with the sequence number L is stored as a suspicious packet in the protection queue.
所述的方法, 其中, 所述步骤三三进一步包括:  The method, wherein the step three or three further comprises:
步骤三三一, 设定一保护队列报文数的门限值 D;  Step 3: 31, setting a threshold value of the number of protection queue packets D;
步骤三三二,判断存放于所述保护队列中的报文数是否大于或等于所述门 限值 D, 如是, 则清空原有的正常队列, 用保护队列替换原有的正常队列形成 新的正常队列,并进一步更新所述变量 V的值为所述新的正常队列中最后一个 报文的序列号; 如否, 则所述 V值不变, 继续抽取新报文的序列号并转入步骤 所述的方法,其中,所述步骤三三二进一步包括当所述保护队列中的报文 数大于或等于所述门限值 D时, 将所述原有的正常队列作为新的保护队列的 步骤。  In step 3:32, it is determined whether the number of the packets stored in the protection queue is greater than or equal to the threshold D. If yes, the original normal queue is cleared, and the original queue is replaced by the protection queue to form a new one. a normal queue, and further updating the value of the variable V as the serial number of the last message in the new normal queue; if not, the V value is unchanged, continue to extract the serial number of the new message and transfer The method of the step, wherein the step 323 further includes: when the number of packets in the protection queue is greater than or equal to the threshold D, using the original normal queue as a new protection queue. A step of.
本发明解决了现有技术中 VOIP DSP收包处理中的缺陷,避免了收到无效 数据时音质下降和异常问题。当收到的报文是正常的情况下,不影响原来的报 文处理流程, 不会引入丢包, 抖动, 和延迟。 当收到的报文中有无效报文时, 可以过滤掉这些无效报文, 避免异常, 改善音质, 同时不会引入新的丢包, 抖 动, 和延迟。 当进行媒体 /呼叫切换的时候, 会在切换时引入几十毫秒的延迟, 可以忽略不计, 但是可以避免异常, 同时音质得到改善。  The invention solves the defects in the VOIP DSP packet processing in the prior art, and avoids the degradation of the sound quality and the abnormality when the invalid data is received. When the received packet is normal, it does not affect the original packet processing process, and does not introduce packet loss, jitter, and delay. When there are invalid messages in the received message, these invalid messages can be filtered out to avoid abnormalities, improve sound quality, and not introduce new packet loss, jitter, and delay. When media/call switching is performed, a delay of several tens of milliseconds is introduced at the time of switching, which can be ignored, but an abnormality can be avoided and the sound quality is improved.
本方法可以适用于所有使用 RTP作为媒体传输协议的通讯系统。 不需要 对现有的呼叫控制协议做修改。 附图说明- 图 1为本发明方法的处理流程图;  This method can be applied to all communication systems that use RTP as a media transport protocol. There is no need to modify existing call control protocols. BRIEF DESCRIPTION OF THE DRAWINGS - Figure 1 is a process flow diagram of the method of the present invention;
图 2为应用本发明的方法前 RTP报文进入 DSP的次序图;  2 is a sequence diagram of an RTP message entering a DSP before applying the method of the present invention;
图 3为应用本发明的方法后 RTP报文进入 DSP的次序图。 具体实施方式: 3 is a sequence diagram of an RTP message entering a DSP after applying the method of the present invention. detailed description:
正常的 RTP报文是连续的, 偶尔因为乱序和丢包, 在一个小范围内部波 动, 当发生媒体切换(是指正常的话音 RTP流的切换) 的时候, 序列号发生 跳变,但是后续的报文应该又是连续的。根据这些特点,可以暂时把可疑的报 文临时放在保护队列里,如果后续的报文证明可疑报文是无效报文,则清空临 时队列;如果后续的报文证明可疑报文确实是有效报文,则用保护队列替换正 常队列,并把数据传给 DSP。原来的正常队列作为新的保护队列。本发明的方 法可以通过判断报文序列号的连续性或时间戳的连续性,也可以组合使用,通 过同时判断序列号和时间戳的连续性来实现。  The normal RTP packets are continuous. Occasionally, due to out-of-order and packet loss, they fluctuate within a small range. When media switching occurs (refers to the switching of normal voice RTP streams), the sequence number jumps, but subsequent The message should be continuous again. According to these features, the suspicious packet can be temporarily placed in the protection queue. If the subsequent packet proves that the suspicious packet is invalid, the temporary queue is cleared; if the subsequent packet proves that the suspicious packet is indeed valid Then, replace the normal queue with the protection queue and pass the data to the DSP. The original normal queue acts as a new protection queue. The method of the present invention can be implemented by judging the continuity of the message sequence number or the continuity of the time stamp, or in combination, by simultaneously determining the continuity of the sequence number and the time stamp.
图 1示出了本发明方法的处理流程图, 发明所述的方法如下:  Figure 1 shows a process flow diagram of the method of the invention, the method of the invention being as follows:
1)每个 DSP通道分配若干个缓冲存储报文队列, 包括正常队列和保护队 列。再分配变量来记录进入当前的正常队列的最后一个报文的序列号,假定分 配了一个名字为 V的变量。  1) Each DSP channel is assigned a number of buffered message queues, including the normal queue and the protection queue. The variable is reassigned to record the sequence number of the last message entering the current normal queue, assuming that a variable named V is assigned.
2) 当 DSP收到一个新 RTP报文时 (步骤 101), 判断这个报文是否为这 个通道打开后的第一个报文 (步骤 102), 如是, 则把这个报文放到正常队列 中, 即当 DSP收到第一个报文的时候, 把这个报文放到正常队列中, 并用变 量 V记下这个报文的序列号,假定这个报文的序列号是 N,则 V = N (步骤 103);  2) When the DSP receives a new RTP message (step 101), it is determined whether the message is the first message after the channel is opened (step 102), and if so, the message is placed in the normal queue. That is, when the DSP receives the first message, put the message into the normal queue, and use the variable V to record the serial number of the message. Assuming that the sequence number of the message is N, then V = N (step 103);
3)如否, 则提取这个报文的序列号 (假定等于 M) (步骤 104), 判断是 否M = v+l (步骤 105),如果 M = v+1,则认为这个 RTP报文是一个完全正常 而且连续的报文, 把这个报文放到正常队列中, 并用变量 V记下新的序列号, 即 v = M (步骤 106)。  3) If no, extract the sequence number of the message (assumed to be equal to M) (step 104), determine whether M = v + l (step 105), if M = v + 1, then consider the RTP message to be a A completely normal and continuous message, put this message into the normal queue, and record the new serial number with the variable V, ie v = M (step 106).
4)判断如果 M和 V相减的绝对值不大, 即 M减 V的绝对值小于一个门 限值 A (这个门限值是可以配置的, 比如设置为 10), 而且序号为 M、 V的报 文的时间戳相减的绝对值小于一个门限值 B (这个门限值也是可以配置的, 比 如设置为 100毫秒)(步骤 107), 则认为这个报文尚属正常, 可能是由于低层 是不可靠传输, 发生了乱序或者丢包。 把这个报文放到正常队列。 用变量 V 记下新的序列号, 即 v = M (步骤 108)。  4) It is judged that if the absolute value of M and V subtraction is not large, that is, the absolute value of M minus V is less than a threshold A (this threshold is configurable, for example, set to 10), and the serial number is M, V. The absolute value of the time stamp subtraction of the message is less than a threshold B (this threshold is also configurable, for example, set to 100 milliseconds) (step 107), then the message is considered normal, possibly due to The lower layer is unreliable transmission, and out of order or packet loss occurs. Put this message in the normal queue. Write down the new serial number with the variable V, ie v = M (step 108).
5)如果 M和 V相减的绝对值比较大(即 M减 V的绝对值大于或等于门 限值 A), 或者序号为 M、 V的报文的时间戳相减的绝对值大于或等于门限值 B, 认为这个报文可疑, 把这个报文放到保护队列 。 变量 V的值不变化。 等 待后续的报文决定下一步处理, (步骤 109)。 5) If the absolute value of M and V subtraction is relatively large (ie, the absolute value of M minus V is greater than or equal to the threshold A), or the absolute value of the time stamp subtracted by the message with the sequence number M and V is greater than or equal to Threshold B, consider this message suspicious, put this message in the protection queue. The value of the variable V does not change. Wait The subsequent message is determined to be processed in the next step (step 109).
6)当收到后续的 RTP报文的时候,提取这个报文的序列号(假定等于 L) (歩骤 110),判断 L和变量 V相比差别是否不大(即 L减 V的绝对值小于门 限值 A) (步骤 111), 如是, 则认为保护队列里面被怀疑的包是无效包, 清空 保护队列, 把序列号为 L的报文放到正常队列里面, 用变量 V记下新的序列 号, 即 v = L (步骤 112)。  6) When receiving the subsequent RTP message, extract the serial number of the message (assumed to be equal to L) (step 110), and determine whether the difference between L and variable V is not large (ie, the absolute value of L minus V) If it is less than the threshold A) (step 111), if yes, it is considered that the suspected packet in the protection queue is an invalid packet, clear the protection queue, put the packet with the serial number L into the normal queue, and record the new variable with the variable V. The serial number, ie v = L (step 112).
7)如果 L和变量 V相比差别大, 即 L减 V的绝对值大于门限值 A, 则进 一步判断序列号为 L的报文和保护队列里面的报文相比是否连续, 即 L减保 护队列里面的最后报文的序列号的绝对值是否小于门限值 C (步骤 113), 如 否, 即新报文与保护队列中的报文相比比较不连续,则认为不但上一个被怀疑 的包是无效包, 而且新收到的报文也是可疑的, 先清空保护队列, 再把新收到 的序列号为 L的报文放到保护队列里(步骤 114)。 注意门限值 C和门限值 A 可以不相等是单独配置的, 比如门限值 C可配置为 5。  7) If the difference between L and variable V is large, that is, the absolute value of L minus V is greater than the threshold A, it is further determined whether the message with the sequence number L is continuous with the message in the protection queue, that is, L minus Whether the absolute value of the sequence number of the last message in the protection queue is less than the threshold C (step 113). If no, that is, the new message is less continuous than the message in the protection queue, it is considered that not only the previous one is The suspected packet is an invalid packet, and the newly received packet is also suspicious. The protection queue is first cleared, and the newly received packet with the serial number L is placed in the protection queue (step 114). Note that the threshold C and the threshold A can be unequally configured separately. For example, the threshold C can be configured to 5.
8)如果 L和变量 V相比差别较大(即 L减 V的绝对值大于门限值 A), 但是和保护队列里面的报文相比是比较连续的 (L减去保护队列的最后一个报 文的序列号的绝对值小于门限值 C), 把这个序号为 L的报文放入保护队列 (步 骤 115)。 检査保护队列里面报文的个数, 判断是否小于门限值 D (步骤 116) 如果个数小于门限值 D (这个门限值也是可以配置的, 例如配置为 3), 则变 量 V的值不变化, 等待下一个报文(步骤 118), 并回到步骤 110, 等待后续的 报文决定下一步处理。 直到保护队列里面报文的个数大于或者等于门限值 D, 则进入步骤 117。  8) If L and variable V are significantly different (ie, the absolute value of L minus V is greater than the threshold A), but compared with the message in the protection queue is relatively continuous (L minus the last one of the protection queue) The absolute value of the sequence number of the message is less than the threshold C), and the message with the sequence number L is placed in the protection queue (step 115). Check the number of packets in the protection queue to determine whether it is less than the threshold D (step 116). If the number is less than the threshold D (this threshold is also configurable, for example, configured as 3), the variable V The value does not change, wait for the next message (step 118), and returns to step 110 to wait for subsequent messages to determine the next step. Until the number of packets in the protection queue is greater than or equal to the threshold D, the process proceeds to step 117.
9)这时认为保护队列里面现有的被怀疑的包都是有效包, 用保护队列替 换原来的正常队列作为新的正常队列, 同时清空原来的正常队列,作为新的保 护队列来使用。用变量 V记下收到的最后一个报文序号的序列号(假定序列号 为 X), 即 v = X (步骤 117)。  9) At this time, it is considered that the existing suspected packets in the protection queue are valid packets, and the original normal queue is replaced by the protection queue as the new normal queue, and the original normal queue is cleared and used as a new protection queue. Use the variable V to note the serial number of the last message number received (assuming the sequence number is X), ie v = X (step 117).
其中, 在上面的步骤中门限值 A, B,C都是可以配置的。 另外, 保护队列 收到多少个连续的 RTP报文的时候升级为正常队列也是可以配置的, 也就是 说门限值 D也是可以配置的。 门限值 D的数值越大, 误切换的可能性越小, 但是切换延迟也越大。工程中,可以通过灵活配置这些门限值找到一个最优值, 使话音质量, 切换延迟, 设备鲁棒性等综合性能最优。 举一个应用实例, 其它的应用是类似的。其中, 图 2为应用本发明的方法 前 RTP报文进入 DSP的次序图。 图 3为应用本发明的方法后 RTP报文进入 DSP的次序图。 Among them, the thresholds A, B, and C are all configurable in the above steps. In addition, when the number of consecutive RTP packets received by the protection queue is upgraded to a normal queue, it can be configured, that is, the threshold D is also configurable. The larger the value of the threshold value D, the smaller the possibility of false switching, but the larger the switching delay. In engineering, you can find an optimal value by flexibly configuring these thresholds, so that the overall performance of voice quality, handover delay, and device robustness is optimal. As an application example, other applications are similar. 2 is a sequence diagram of an RTP message entering the DSP before applying the method of the present invention. 3 is a sequence diagram of an RTP message entering a DSP after applying the method of the present invention.
这里以分配了两个队列为例,一个作为正常队列, 一个作为保护队列。在 这个例子中门限 A配置为 10, 门限 B配置为 100ms, 门限 C配置为 5, 门限 D配置为 2。  Here, two queues are assigned as an example, one as a normal queue and one as a protection queue. In this example, threshold A is configured to 10, threshold B is configured to 100ms, threshold C is configured to 5, and threshold D is configured to 2.
第一步,收到序号为 1的包放在正常队列(图 3中所示的最初的正常队列 31)里面, 等待 DSP驱动程序把报文输入到 DSP中。 记录当前序号 = 1。  In the first step, the packet with sequence number 1 is placed in the normal queue (the initial normal queue 31 shown in Figure 3), waiting for the DSP driver to input the message into the DSP. Record current serial number = 1.
第二步, 收到序号为 2的包放在正常队列里面, 等待 DSP驱动程序把报 文输入到 DSP中。 记录当前序号 = 2。  In the second step, the packet with sequence number 2 is received in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 2.
第三步, 收到序号为 4的包, 包的序号虽然不连续, 但是相差不大(小于 门限 A), 这时候检査时间戳, 发现时间戳也是相差不大(小于门限 B), 则放 在正常队列里面, 等待 DSP驱动程序把报文输入到 DSP中。 记录当前序号 = 4。  The third step is to receive the packet with the sequence number 4. The sequence number of the packet is not continuous, but the difference is not large (less than the threshold A). At this time, the timestamp is checked, and the timestamp is found to be similar (less than the threshold B). Place it in the normal queue and wait for the DSP driver to enter the message into the DSP. Record current serial number = 4.
第四步, 收到序号为 1000的包, 包的序号完全不连续(大于门限 A), 说 明这个包可疑, 由于目前不能够确定这个报文是无效报文还是发生了媒体切 换, 所以把这个报文放到保护队列, 图 3中所示的最初的保护队列 33。  The fourth step, receiving the packet with the serial number of 1000, the serial number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is invalid or media switching occurs, so this is The message is placed in the protection queue, the initial protection queue 33 shown in FIG.
第五步, 收到序号为 5的包, 包的序号和正常队列的当前序号连续, 这时 候可以确定保护队列中被怀疑的包是无效包, 清空保护队列中的 1000号包, 把序号为 5的包则放在正常队列里面, 等待 DSP驱动程序把报文输入到 DSP 中。 记录当前序号 - 5。  In the fifth step, the packet with the sequence number 5 is received, and the sequence number of the packet is consecutive with the current sequence number of the normal queue. At this time, it can be determined that the suspected packet in the protection queue is an invalid packet, and the 1000 packet in the protection queue is cleared, and the serial number is The 5 packet is placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record the current serial number - 5.
第六步, 收到序号为 6的包放在正常队列里面, 等待 DSP驱动程序把报 文输入到 DSP中。 记录当前序号 = 6。  In the sixth step, the packet with sequence number 6 is received in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 6.
第七步, 收到序号为 1001的包, 包的序号完全不连续(大于门限 A), 说 明这个包可疑, 由于目前不能够确定这个报文是无效报文还是发生了媒体切 换, 所以把这个报文放到保护队列。  In the seventh step, the packet with the sequence number 1001 is received, and the sequence number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is an invalid message or a media switch occurs, this is The message is placed in the protection queue.
第八步,收到序号为 1002的包,包的序号和正常队列的当前序号不连续, 但是和保护队列里面的 1001报文相比是连续(小于门限 C),先把这个报文放 到保护队列里面, 再检查保护队列里面的报文的数量是否达到门限 D, 由于现 在门限 D配置为 2, 所以已经达到门限了, 这时候可以确定发生了媒体切换, 把保护队列标记为正常队列, 为图 3中所示的切换后的正常队列 32, 同时清 空原来的正常队列,标记为保护队列来使用。等待 DSP驱动程序把 1001、 1002 号报文输入到 DSP中。 记录当前序号 = 1002。 In the eighth step, the packet with the sequence number 1002 is received, and the sequence number of the packet and the current sequence number of the normal queue are not consecutive, but compared with the 1001 message in the protection queue is continuous (less than the threshold C), the packet is first placed. In the protection queue, check whether the number of packets in the protection queue reaches the threshold D. Since the threshold D is now set to 2, the threshold has been reached. At this time, it can be determined that the media switching has occurred. The protection queue is marked as a normal queue, which is the switched normal queue 32 shown in FIG. 3, and the original normal queue is cleared at the same time, and is marked as a protection queue for use. Wait for the DSP driver to input the 1001 and 1002 messages into the DSP. Record current serial number = 1002.
第九步, 收到序号为 1003的包放在正常队列里面, 等待 DSP驱动程序把 报文输入到 DSP中。 记录当前序号 = 1003。  In the ninth step, the packet with the sequence number 1003 is received in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 1003.
第十步, 收到序号为 10的包, 包的序号不连续(大于门限 A), 说明这个 包可疑, 由于目前不能够确定这个报文是无效报文还是发生了媒体切换,所以 把这个报文放到保护队列, 图 3中所示的切换后的保护队列 34。  In the tenth step, the packet with the sequence number 10 is received, and the sequence number of the packet is discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since the packet cannot be determined to be an invalid message or a media switch occurs, the report is sent. The text is placed in the protection queue, the switched protection queue 34 shown in FIG.
第十一步, 收到序号为 1005的包, 包的序号和正常队列的当前序号很接 近(小于门限 A), 这时候可以确定保护队列中被怀疑的包是无效包, 清空保 护队列中的 10号包, 把序号为 1005的包则放在正常队列里面, 等待 DSP驱 动程序把报文输入到 DSP中。 记录当前序号 = 1005。  In the eleventh step, the packet with the sequence number 1005 is received, and the sequence number of the packet is very close to the current sequence number of the normal queue (less than the threshold A). At this time, it can be determined that the suspected packet in the protection queue is an invalid packet, and the protection queue is cleared. In the 10th package, the packet with the serial number of 1005 is placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 1005.
第十二步, 收到序号为 1006的包, 放在正常队列里面, 等待 DSP驱动程 序把报文输入到 DSP中。 记录当前序号 = 1006。  In the twelfth step, the packet with the sequence number 1006 is received and placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 1006.
第十三步, 收到序号为 1007的包, 放在正常队列里面, 等待 DSP驱动程 序把报文输入到 DSP中。 记录当前序号 = 1007。  In the thirteenth step, the packet with the sequence number 1007 is received and placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 1007.
第十四步, 收到序号为 2000的包, 包的序号完全不连续 (大于门限 A), 说明这个包可疑,由于目前不能够确定这个报文是无效报文还是发生了媒体切 换, 所以把这个报文放到保护队列。  In the fourteenth step, the packet with the serial number of 2000 is received, and the sequence number of the packet is completely discontinuous (greater than the threshold A), indicating that the packet is suspicious. Since it is currently impossible to determine whether the packet is an invalid message or a media switch occurs, This message is placed in the protection queue.
第十五步, 收到序号为 3000的包, 包的序号和正常队列不连续 (大于门限 A), 和保护队列里面的包也不连续 (大于门限 C:), 说明这个包可疑, 不能够确 定这个报文是无效报文还是发生了媒体切换,删除保护队列里面的 2000号包, 把序号为 3000的包放到保护队列里面。  In the fifteenth step, the packet with the serial number of 3000 is received, the sequence number of the packet is not continuous with the normal queue (greater than the threshold A), and the packet in the protection queue is not continuous (greater than the threshold C:), indicating that the packet is suspicious and cannot be Determine whether the message is invalid or media switch, delete the 2000 packet in the protection queue, and put the packet with the serial number 3000 into the protection queue.
第十六步,收到序号为 1008的包,包的序号和正常队列的当前序号连续, 这时候可以确定保护队列中被怀疑的包是无效包, 清空保护队列。 把放 1008 号包在正常队列里面, 等待 DSP驱动程序把报文输入到 DSP中。 记录当前序 号 = 1008。  In the sixteenth step, the packet with the sequence number 1008 is received, and the sequence number of the packet is consecutive with the current sequence number of the normal queue. At this time, it can be determined that the suspected packet in the protection queue is an invalid packet, and the protection queue is cleared. Put the 1008 packet in the normal queue and wait for the DSP driver to input the message into the DSP. Record the current serial number = 1008.
第十七步, 收到序号为 1009的包, 放在正常队列里面, 等待 DSP驱动程 序把报文输入到 DSP中。 记录当前序号 = 1009。  In the seventeenth step, the packet with the sequence number 1009 is received and placed in the normal queue, waiting for the DSP driver to input the message into the DSP. Record current serial number = 1009.
经过这个过程, 参考图 2应用本方法前 RTP报文进入 DSP的次序图和附 图 3应用本方法后 RTP报文进入 DSP的次序图。 .图 2采用的是现有技术的单 队列方式,采用此方式, 所有的报文直接进入 DSP。 图 3采用双队列方式, 分 别设置正常队列和保护队列,只有正常队列里面的报文才进入 DSP。前后对比 可以看出,采用本发明的方法只有正常队列里的报文才进入 DSP,原来带有很 多干扰的 RTP报文, 经过处理后, 变成一个很有规律的, 很 "干净"的语音 RTP流输入到 DSP里, 起到对 DSP的保护作用。 After this process, refer to Figure 2 to apply the method before the RTP message enters the DSP sequence diagram and attached Figure 3 is a sequence diagram of the RTP message entering the DSP after applying the method. Figure 2 uses the prior art single-queue mode. In this way, all messages enter the DSP directly. Figure 3 uses the dual queue mode to set the normal queue and the protection queue respectively. Only the packets in the normal queue enter the DSP. It can be seen from the comparison before and after the method of the present invention that only the packets in the normal queue enter the DSP, and the original RTP packets with many interferences are processed into a very regular, very "clean" voice. The RTP stream is input to the DSP to protect the DSP.
上面过程中对有效报文的判断条件可以灵活配置,例如:门限 A,门限 B, 门限 C, 门限 D。 以上的条件可以适当组合, 灵活修改。达到在工程上找到最 优值的目的。 工业应用性  The conditions for judging valid messages in the above process can be flexibly configured, for example: Threshold A, Threshold B, Threshold C, Threshold D. The above conditions can be combined as appropriate and flexibly modified. Achieve the best value for the project. Industrial applicability
本发明解决了现有技术中 VOIP DSP收包处理中的缺陷,避免了收到无效 数据时音质下降和异常问题。当收到的报文是正常的情况下,不影响原来的报 文处理流程, 不会引入丢包, 抖动, 和延迟。 当收到的报文中有无效报文时, 可以过滤掉这些无效报文, 避免异常, 改善音质, 同时不会引入新的丢包, 抖 动, 和延迟。 当进行媒体 /呼叫切换的时候, 会在切换时引入几十毫秒的延迟, 可以忽略不计,但是可以避免异常, 同时音质得到改善。本方法可以适用于所 有使用 RT 作为媒体传输协议的通讯系统。 不需要对现有的呼叫控制协议做 修改。  The invention solves the defects in the VOIP DSP packet processing in the prior art, and avoids the degradation of the sound quality and the abnormality when the invalid data is received. When the received packet is normal, it does not affect the original packet processing process, and does not introduce packet loss, jitter, and delay. When there are invalid messages in the received message, these invalid messages can be filtered out to avoid abnormalities, improve sound quality, and not introduce new packet loss, jitter, and delay. When media/call switching is performed, a delay of several tens of milliseconds is introduced at the time of switching, which can be ignored, but an abnormality can be avoided and the sound quality is improved. This method can be applied to all communication systems that use RT as a media transport protocol. There is no need to modify existing call control protocols.

Claims

权利要求书 Claim
1、 一种保护 VOIP数字信号处理通道的方法, 其特征在于, 通过设置多 个到所述数字信号处理通道的缓冲存储报文队列,并根据到来的实时传输协议 报文序列号和 /或时间戳的连续性, 过滤所述报文中的无效报文, 并将所述过 滤后的报文输入到所述数字信号处理通道。 A method for protecting a VOIP digital signal processing channel, characterized by: setting a plurality of buffered message queues to the digital signal processing channel, and according to an incoming real-time transmission protocol message sequence number and/or time The continuity of the stamp, filtering the invalid message in the message, and inputting the filtered message to the digital signal processing channel.
2、 根据权利要求 1所述的方法, 其特征在于, 进一步包括如下步骤: 步骤一,设置多个到数字信号处理通道的缓冲存储报文队列,所述队列至 少包括正常队列和保护队列;  The method according to claim 1, further comprising the following steps: Step 1: Set a plurality of buffered storage message queues to the digital signal processing channel, the queue including at least a normal queue and a protection queue;
步骤二,抽取新到来的实时传输协议报文的序列号,根据前后报文序列号 和 /或时间戳的连续性, 判断所述报文是否为可疑报文; 如是, 则将所述可疑 报文存放在所述保护队列中; 如否, 则将所述报文放入正常队列中;  Step 2: extract the sequence number of the newly arrived real-time transport protocol packet, and determine whether the packet is a suspicious packet according to the continuity of the sequence number and/or the timestamp of the preceding and succeeding messages; if yes, the suspicious report is The text is stored in the protection queue; if not, the message is placed in a normal queue;
步骤三,根据后续新报文的序列号判断所述保护队列中的可疑报文是否为 无效报文; 如是, 则丢弃所述可疑报文, 清空所述保护队列; 如否, 则用所述 保护队列替换正常队列。  Step 3: determining, according to the sequence number of the subsequent new packet, whether the suspicious packet in the protection queue is an invalid packet; if yes, discarding the suspicious packet, and clearing the protection queue; if not, using the The protection queue replaces the normal queue.
3、 根据权利要求 2所述的方法, 其特征在于, 进一步包括将所述正常队 列中的报文传给数字信号处理通道的步骤。  3. The method of claim 2, further comprising the step of transmitting a message in said normal queue to a digital signal processing channel.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 进一步包括设置一变 量 V来记录当前的正常队列中的最后一个报文的序列号。  4. The method of claim 2 or 3, further comprising setting a variable V to record the sequence number of the last message in the current normal queue.
5、 根据权利要求 4所述的方法, 其特征在于, 进一步包括判断所述到来 的报文是否为通道打开后的第一个报文,如是,则将所述变量 V的初值赋值为 所述第一个报文的序列号。  The method according to claim 4, further comprising determining whether the incoming message is the first message after the channel is opened, and if so, assigning the initial value of the variable V to The serial number of the first message.
6、 根据权利要求 5所述的方法, 其特征在于, 进一步包括当所述新报文 被存入正常队列时, 不断更新变量 V的步骤。  6. The method of claim 5, further comprising the step of continuously updating the variable V when the new message is stored in the normal queue.
7、 根据权利要求 2、 3、 5或 6所述的方法, 其特征在于, 所述步骤二进 一步包括:  7. The method of claim 2, 3, 5 or 6, wherein the step two further comprises:
步骤二一, 设定门限值 A、 B;  Step 21, set threshold values A, B;
步骤二二, 判断所述新到来的报文的序列号 M与所述变量 V当前取值相 减的绝对值是否小于所述门限值 A, 如否, 则所述报文为可疑报文, 如是, 则 进一步判断所述序列号为 M的新报文的时间戳和所述序列号为 V当前取值的 旧报文的时间戳是否小于所述门限值 B; 如是, 则所述新报文不是可疑报文, 将所述序列号为 M的新报文列入正常队列, 并更新所述变量 V的取值为 M, 如否, 则所述报文为可疑报文。 Step 22: Determine whether the absolute value of the sequence number M of the newly arrived message and the current value of the variable V is less than the threshold A. If not, the message is a suspicious message. If yes, further determining the timestamp of the new packet with the sequence number M and the sequence number being the current value of V Whether the time stamp of the old message is less than the threshold B; if yes, the new message is not a suspicious message, the new message with the sequence number M is included in the normal queue, and the variable V is updated. The value is M. If no, the message is a suspicious message.
8、 根据权利要求 7所述的方法, 其特征在于, 所述步骤三进一步包括: 步骤三一, 设定一门限值 C;  The method according to claim 7, wherein the step 3 further comprises: step three, setting a threshold C;
步骤三二, 记录后续新报文的序列号 L;  Step 32: Record the serial number L of the subsequent new message;
步骤三三, 判断所述 L与所述变量 V的值相减的绝对值是否小于所述 A, 如是, 则所述存放在保护队列中的报文为无效报文, 且所述序列号为 L的新 报文为有效报文被存入正常队列, 更新所述变量 V的取值为 L; 如否, 则进一 步判断所述 L与所述保护队列中最后一个报文的序列号相减的绝对值是否小 于所述门限值 C;如是,则所述新接收的序列号为 L的后续报文也为可疑报文, 并将其存放于所述保护队列中,如否,则所述存放在保护队列中的报文为无效 拫文, 清空所述保护队列, 并将所述序列号为 L的报文作为可疑报文存入保 护队列中。  In the third step, it is determined whether the absolute value of the value of the variable V is less than the value of the variable V. If yes, the message stored in the protection queue is an invalid message, and the sequence number is The new message of L is stored in the normal queue as a valid message, and the value of the variable V is updated to be L; if not, the L is further determined to be subtracted from the sequence number of the last message in the protection queue. If the absolute value is less than the threshold C; if yes, the newly received subsequent message whose sequence number is L is also a suspicious message, and is stored in the protection queue. The packet stored in the protection queue is invalid, the protection queue is emptied, and the packet with the sequence number L is stored as a suspicious message in the protection queue.
9、根据权利要求 8所述的方法,其特征在于, 所述步骤三三进一步包括: 步骤三三一, 设定一保护队列报文数的门限值 D;  The method according to claim 8, wherein the step three three further comprises: step three three one, setting a threshold D of the number of protection queue packets;
步骤三三二,判断存放于所述保护队列中的报文数是否大于或等于所述门 限值 D, 如是, 则清空原有的正常队列, 用保护队列替换原有的正常队列形成 新的正常队列,并进一步更新所述变量 V的值为所述新的正常队列中最后一个 报文的序列号; 如否, 则所述 V值不变, 继续抽取新报文的序列号并转入步骤  In step 3:32, it is determined whether the number of the packets stored in the protection queue is greater than or equal to the threshold D. If yes, the original normal queue is cleared, and the original queue is replaced by the protection queue to form a new one. a normal queue, and further updating the value of the variable V as the serial number of the last message in the new normal queue; if not, the V value is unchanged, continue to extract the serial number of the new message and transfer Step
10、根据权利要求 9所述的方法, 其特征在于, 所述步骤三三二进一步包 括当所述保护队列中的报文数大于或等于所述门限值 D时, 将所述原有的正 常队列作为新的保护队列的步骤。 The method according to claim 9, wherein the step 323 further comprises: when the number of packets in the protection queue is greater than or equal to the threshold D, the original The normal queue acts as a new protection queue step.
PCT/CN2005/001814 2005-07-12 2005-11-01 A method for protecting the channel of the voip digital signal processing WO2007006185A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200510012152.4 2005-07-12
CN200510012152.4A CN100479425C (en) 2005-07-12 2005-07-12 Method for protecting VOIP digital signal processing channel

Publications (1)

Publication Number Publication Date
WO2007006185A1 true WO2007006185A1 (en) 2007-01-18

Family

ID=37609942

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2005/001814 WO2007006185A1 (en) 2005-07-12 2005-11-01 A method for protecting the channel of the voip digital signal processing

Country Status (2)

Country Link
CN (1) CN100479425C (en)
WO (1) WO2007006185A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051883B (en) * 2007-05-11 2011-04-20 杭州华三通信技术有限公司 Service switching method and system after main voice server fault restoring
CN103236896B (en) * 2013-04-07 2016-09-28 北京全路通信信号研究设计院集团有限公司 Clock adjustment method and system of vehicle-mounted control equipment
CN103279442B (en) * 2013-06-14 2017-01-11 浪潮电子信息产业股份有限公司 Message filtering system and message filtering method of high-speed interconnection bus
CN107743054A (en) * 2017-08-25 2018-02-27 杭州德泽机器人科技有限公司 System during a kind of synchronous pair of multisensor
CN110995947B (en) * 2019-11-05 2021-04-20 深圳震有科技股份有限公司 Channel density detection method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040156380A1 (en) * 2003-01-24 2004-08-12 Silverman Steven P. Multi-level expedited forwarding per hop behavior
CN1549535A (en) * 2003-05-09 2004-11-24 华为技术有限公司 Method for ordering to eliminate its jitter time delay by rank of RTP data packet
CN1549536A (en) * 2003-05-09 2004-11-24 ��Ϊ�������޹�˾ Method for ordering to eliminate its jitter time delay by time stamp of RTP data pocket
US20050105532A1 (en) * 2003-11-13 2005-05-19 Yun Bin Y. Router for scheduling packet and method therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040156380A1 (en) * 2003-01-24 2004-08-12 Silverman Steven P. Multi-level expedited forwarding per hop behavior
CN1549535A (en) * 2003-05-09 2004-11-24 华为技术有限公司 Method for ordering to eliminate its jitter time delay by rank of RTP data packet
CN1549536A (en) * 2003-05-09 2004-11-24 ��Ϊ�������޹�˾ Method for ordering to eliminate its jitter time delay by time stamp of RTP data pocket
US20050105532A1 (en) * 2003-11-13 2005-05-19 Yun Bin Y. Router for scheduling packet and method therefor

Also Published As

Publication number Publication date
CN100479425C (en) 2009-04-15
CN1897561A (en) 2007-01-17

Similar Documents

Publication Publication Date Title
EP1805616B1 (en) Methods and systems for automatic denial of service protection in an ip device
US7548539B2 (en) Method and apparatus for Voice-over-IP call recording
US6934258B1 (en) Quality of service based transitioning between alternate transport paths
US7873035B2 (en) Method and apparatus for voice-over-IP call recording and analysis
US7809128B2 (en) Methods and systems for per-session traffic rate policing in a media gateway
US20130058238A1 (en) Method and system for automated call troubleshooting and resolution
JP4515979B2 (en) IP phone
CN102025483A (en) Wireless router and method for preventing malicious scanning by using same
WO2007006185A1 (en) A method for protecting the channel of the voip digital signal processing
US8089962B2 (en) Method, system and apparatus for filtering packets
EP1186143A1 (en) Quality of service based transitioning between alternate transport paths
JP2011147007A (en) Speech recording apparatus and speech recording system
US7180863B1 (en) Method and apparatus for overload control in multi-branch packet networks
CN1992650A (en) Method for detecting calling continuity of IP packet carrying network
WO2008001580A1 (en) Communication apparatus and method
US8908541B2 (en) Methods, systems, and computer readable media for intelligent optimization of digital signal processor (DSP) resource utilization in a media gateway
US20120300767A9 (en) Method and apparatus for voice traffic management in a data network
US8526424B2 (en) Enhancing voice QoS over unmanaged bandwidth limited packet network
CN1653795A (en) Device to terminate a modem relay channel directly to an ip network
CN101622823A (en) Methods and systems for per-session network address translation (nat) learning and firewall filtering in media gateway
KR100376133B1 (en) Method for Prevention of Data Transmission Delay
Su et al. An algorithm for reducing loss rate of high-speed TCP
JP2008017075A (en) Communication controller and communication control method used therefore, and program thereof
Sun et al. Possibilities of Voice Resource DoS Attacks Based on H. 323 Protocol in Softswitch Network
CN1859296A (en) Method for controlling real time service on router

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 05802197

Country of ref document: EP

Kind code of ref document: A1