CN108683555A - A kind of RTP method for detecting packet loss - Google Patents
A kind of RTP method for detecting packet loss Download PDFInfo
- Publication number
- CN108683555A CN108683555A CN201810344304.8A CN201810344304A CN108683555A CN 108683555 A CN108683555 A CN 108683555A CN 201810344304 A CN201810344304 A CN 201810344304A CN 108683555 A CN108683555 A CN 108683555A
- Authority
- CN
- China
- Prior art keywords
- array
- rtp
- packets
- packet loss
- count
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
- H04L43/0829—Packet loss
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
Abstract
The present invention relates to a kind of RTP method for detecting packet loss, include the following steps:S1:IP data packets are obtained, parse IP packets, UDP packets and RTP packets successively;S2:RTP packets at this time are read and recorded, the sequence number of RTP packets is stored in array, and count is counted to RTP packets and is set as 1;S3:Judge to count whether count is more than the time set, if being more than, terminate the detection to RTP packet losses, otherwise, count will be counted and be set as count+1, continue to obtain next IP data packets, re-execute step S1;S4:Sequence number in array is ranked up from small to large, obtains the maximum value and minimum value in array;S5:Judge whether difference and the value for counting count of the maximum value and minimum value in array are equal, if equal, return to step S3 judges the number in array, and carry out next step packet loss detection if differing.Compared with prior art, the present invention can realize more accurately and effectively packet loss detection in unstable transmission process.
Description
Technical field
The present invention relates to electronic information technical fields, more particularly, to a kind of RTP method for detecting packet loss.
Background technology
IPTV gradually rises and by industry extensive concern as a kind of new media form.In IPTV system, use
Video flowing encapsulation format be based on RTP/UDP/IP, RTP packets by fixed a RTP header files and payload data
It collectively constitutes, header file includes mainly version number (2bit), filler (1bit), extension bits (1bit), counter (4bit), mark
Remember position (1bit), load type (7bit), sequence number (16bit), timestamp (32bit) and source identification (32bit).Each
First 12 of the header file of RTP packets are all sames, and the value range of sequence number is 0~65535, as one RTP of every transmission,
Sequence number adds one, when due to the value of sequence number being more than 65535 can auto zero, count again, it is possible that two are identical
The case where sequence number.IPTV is transmitted data by network, and packet loss phenomenon can occur in transmission process, this can cause user
Program can not be watched, however does not have also realize accurately and effectively RTP method for detecting packet loss in unstable transmission process at present.
Invention content
It is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide a kind of packet loss detection sides RTP
Method.
The purpose of the present invention can be achieved through the following technical solutions:
The present invention provides a kind of RTP method for detecting packet loss, and this approach includes the following steps:
Step 1: obtaining IP data packets, IP packets, UDP packets and RTP packets are parsed successively;
Step 2: reading and recording RTP packets at this time, the sequence number of RTP packets is stored in array, and RTP packets are counted
Count is set as 1;
Step 3: judging to count whether count is more than the time set, if being more than, terminate the detection to RTP packet losses,
Otherwise, count will be counted and is set as count+1, continued to obtain next IP data packets, re-execute step 1;
Step 4: being ranked up from small to large to the sequence number in array, the maximum value and minimum value in array are obtained;
Step 5: judging whether the difference of the maximum value and minimum value in array and the value for counting count are equal, if phase
Deng, return to step three, if differing, judge to whether there is two identical numbers in array, and if it exists, will then have phase in array
It is moved in another array with a number in two numbers, updates former array, and resequence to updated array,
After obtaining its maximum value and minimum value, the difference of maxima and minima is judged with the value for counting count again, if not
In the presence of then showing packet loss, terminate the packet loss detection to RTP.
Preferably, the time range set is 5 minutes~2.5 hour.
Preferably, another array is identical as the former size of array.
Preferably, IP packets, UDP packets and RTP packets are parsed using agreement package head format.
Compared with prior art, the sequence number of RTP packets is stored in array by the present invention, and is ranked up to the data in array
After carry out packet loss detection, the sequence number of RTP can make decoder resequence the chaotic packet of sequence, can be in unstable transmission
More accurately and effectively packet loss detection is realized in the process.
Description of the drawings
Fig. 1 is the flow chart of detection method.
Specific implementation mode
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
Embodiment
As shown in Figure 1, the present invention relates to a kind of RTP method for detecting packet loss, include the following steps:
1, IP data packets are obtained, and IP, UDP, RTP packet are parsed according to agreement package head format successively;
2, RTP packets at this time are read and recorded, and its sequence number W is stored in array P [i], and RTP packets are counted
Count is set as 1;
3, judge to count whether count is more than the time set:
If 31) be more than, terminate the packet loss detection to RTP;
If 32) do not have, count=count+1 continues to obtain next IP data packets, that is, returns to step 1;
4, the sequence number in array is ranked up from small to large, obtains the maximum value P in array P [i]maxAnd minimum value
Pmin;
5, judge the maximum value P in array P [i]maxWith minimum value PminDifference and count count value whether phase
Deng:
If 51) equal, return to step 3;
If 52) etc., starting to judge whether there is two identical numbers in array P [i];
If 6, existing in array P [i] there are two identical number, will have in array P [i] identical two it is digital in
One is moved in another array Q [i] identical with array P [i] sizes, update P [i], and resequences to P [i], Q [i],
Find out its respective maximum value and minimum value, return to step 5;If being not present, show packet loss, and terminates to examine the packet loss of RTP
It surveys.
The flow of method according to the present invention, the present embodiment have carried out experiment detection, the result such as table 1 of detection to practical packet loss
It is shown:
1 RTP packet loss detection experimental datas of table
As shown in Table 1, for different setting times, the actual quantity of the RTP packet losses detected and theoretical quantity are almost
Indifference, accuracy rate are high, it was demonstrated that can detect of RTP packet losses well in actual test using the method for the present invention
Number.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
The staff for being familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain subject to.
Claims (5)
1. a kind of RTP method for detecting packet loss, which is characterized in that this approach includes the following steps:
S1:IP data packets are obtained, parse IP packets, UDP packets and RTP packets successively;
S2:RTP packets at this time are read and recorded, the sequence number of RTP packets is stored in array, and count settings are counted to RTP packets
It is 1;
S3:Judge to count whether count is more than the time set, if being more than, otherwise terminating the detection to RTP packet losses will count
Number count is set as count+1, continues to obtain next IP data packets, re-executes step S1;
S4:Sequence number in array is ranked up from small to large, obtains the maximum value and minimum value in array;
S5:Judge whether difference and the value for counting count of the maximum value and minimum value in array are equal, if equal, return to step
Rapid S3 judges the number in array if differing, and carries out next step packet loss detection.
2. a kind of RTP method for detecting packet loss according to claim 1, which is characterized in that in the step S5, in next step
The particular content of packet loss detection is:
Judge to whether there is two identical numbers in array, and if it exists, will then have one in identical two numbers in array
A number is moved in another array, updates former array, and resequence to updated array, obtains its maximum value and most
After small value, step S5 is re-executed, if being not present, shows packet loss, terminates the packet loss detection to RTP.
3. a kind of RTP method for detecting packet loss according to claim 1, which is characterized in that in the step S3, setting
Ranging from 5 minutes~2.5 hours of time.
4. a kind of RTP method for detecting packet loss according to claim 2, which is characterized in that another array and former array
Size is identical.
5. a kind of RTP method for detecting packet loss according to claim 1, which is characterized in that in the step S1, using association
View package head format parses IP packets, UDP packets and RTP packets.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344304.8A CN108683555A (en) | 2018-04-17 | 2018-04-17 | A kind of RTP method for detecting packet loss |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344304.8A CN108683555A (en) | 2018-04-17 | 2018-04-17 | A kind of RTP method for detecting packet loss |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108683555A true CN108683555A (en) | 2018-10-19 |
Family
ID=63799984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810344304.8A Pending CN108683555A (en) | 2018-04-17 | 2018-04-17 | A kind of RTP method for detecting packet loss |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108683555A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327889A (en) * | 2018-12-17 | 2020-06-23 | ***通信集团广东有限公司 | IPTV service performance fault detection method and device |
CN111447148A (en) * | 2020-03-12 | 2020-07-24 | 深圳震有科技股份有限公司 | RTP data packet sequencing method, system and storage medium |
CN112398797A (en) * | 2019-08-19 | 2021-02-23 | 贵州白山云科技股份有限公司 | Data transmission method, receiving device, transmitting device, medium, device, and system |
CN112422370A (en) * | 2020-11-20 | 2021-02-26 | 维沃移动通信有限公司 | Method and device for determining voice call quality |
CN112688824A (en) * | 2019-10-17 | 2021-04-20 | ***通信集团浙江有限公司 | RTP packet loss detection method, device, equipment and computer readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101488835A (en) * | 2009-02-13 | 2009-07-22 | 华为技术有限公司 | Link detection method, apparatus and communication system |
CN101662418A (en) * | 2008-08-26 | 2010-03-03 | 华为技术有限公司 | Detecting method and terminal of file transmission |
CN101699786A (en) * | 2009-10-15 | 2010-04-28 | 华为技术有限公司 | Method, device and system for detecting packet loss |
CN101771599A (en) * | 2008-12-26 | 2010-07-07 | ***通信集团公司 | Method and device for receiving RTP data packets |
CN102217237A (en) * | 2011-05-09 | 2011-10-12 | 华为技术有限公司 | Method and device for medium stream performance monitoring |
CN104703053A (en) * | 2015-03-11 | 2015-06-10 | 青岛海尔智能家电科技有限公司 | Packet loss processing method, device and system of video transmission process |
CN106506438A (en) * | 2015-09-08 | 2017-03-15 | 华为技术有限公司 | A kind of method and device for obtaining quality of service information |
-
2018
- 2018-04-17 CN CN201810344304.8A patent/CN108683555A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662418A (en) * | 2008-08-26 | 2010-03-03 | 华为技术有限公司 | Detecting method and terminal of file transmission |
CN101771599A (en) * | 2008-12-26 | 2010-07-07 | ***通信集团公司 | Method and device for receiving RTP data packets |
CN101488835A (en) * | 2009-02-13 | 2009-07-22 | 华为技术有限公司 | Link detection method, apparatus and communication system |
CN101699786A (en) * | 2009-10-15 | 2010-04-28 | 华为技术有限公司 | Method, device and system for detecting packet loss |
CN102217237A (en) * | 2011-05-09 | 2011-10-12 | 华为技术有限公司 | Method and device for medium stream performance monitoring |
CN104703053A (en) * | 2015-03-11 | 2015-06-10 | 青岛海尔智能家电科技有限公司 | Packet loss processing method, device and system of video transmission process |
CN106506438A (en) * | 2015-09-08 | 2017-03-15 | 华为技术有限公司 | A kind of method and device for obtaining quality of service information |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327889A (en) * | 2018-12-17 | 2020-06-23 | ***通信集团广东有限公司 | IPTV service performance fault detection method and device |
CN112398797A (en) * | 2019-08-19 | 2021-02-23 | 贵州白山云科技股份有限公司 | Data transmission method, receiving device, transmitting device, medium, device, and system |
CN112688824A (en) * | 2019-10-17 | 2021-04-20 | ***通信集团浙江有限公司 | RTP packet loss detection method, device, equipment and computer readable storage medium |
CN112688824B (en) * | 2019-10-17 | 2022-09-27 | ***通信集团浙江有限公司 | RTP packet loss detection method, device, equipment and computer readable storage medium |
CN111447148A (en) * | 2020-03-12 | 2020-07-24 | 深圳震有科技股份有限公司 | RTP data packet sequencing method, system and storage medium |
CN111447148B (en) * | 2020-03-12 | 2024-04-05 | 深圳震有科技股份有限公司 | RTP data packet ordering method, system and storage medium |
CN112422370A (en) * | 2020-11-20 | 2021-02-26 | 维沃移动通信有限公司 | Method and device for determining voice call quality |
CN112422370B (en) * | 2020-11-20 | 2023-02-03 | 维沃移动通信有限公司 | Method and device for determining voice call quality |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108683555A (en) | A kind of RTP method for detecting packet loss | |
JP7068526B2 (en) | Transmission method, reception method, transmission device, and reception device | |
US8681819B2 (en) | Programmable multifield parser packet | |
CN101800671B (en) | Method for detecting packet loss of H.264 video file | |
US9992549B2 (en) | Transmission method, reception method, transmission apparatus, and reception apparatus | |
CN103155515B (en) | Determine the IP loss being grouped | |
CN109561300B (en) | Service quality detection method and device | |
US11665405B2 (en) | Transmission method, reception method, transmission apparatus, and reception apparatus | |
US20030118022A1 (en) | Reconfigurable data packet header processor | |
US20140211816A1 (en) | System and a method for identifying a point in time of receipt of a data packet | |
CN108170630A (en) | A kind of serial communication baud rate adaptation method, system and equipment | |
CN102111618B (en) | Method and system for improving correctness of calculating number of video transport stream (TS) packet losses | |
CN101778294B (en) | Package loss detection method of MPEG video file | |
JP2023095944A (en) | Transmission method and transmitter apparatus | |
CN102149022B (en) | Method and system for improving packet loss calculation accuracy at MPEG-TS (moving picture expert group-transmission stream) layer | |
CN103338131A (en) | Method and equipment for testing log transmitting loss rate | |
US20160126976A1 (en) | Methods, systems, and computer readable media for optimized message decoding | |
US10917502B2 (en) | Method for using metadata in internet protocol packets | |
CN104408104B (en) | A kind of intelligent substation network data communication method | |
CN116980657B (en) | Video data transmission processing method, device and equipment | |
CN109168035B (en) | EPG information control device | |
CN108390794A (en) | A kind of computational methods and system of stream medium data packet loss | |
CN114760166B (en) | Tunnel message processing method and device | |
CN107302470B (en) | Method and device for processing xDR data represented by external data | |
US11770312B2 (en) | Service detection method and apparatus, device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181019 |
|
RJ01 | Rejection of invention patent application after publication |