CN105141476A - TCP message error information obtaining method and device - Google Patents

TCP message error information obtaining method and device Download PDF

Info

Publication number
CN105141476A
CN105141476A CN201510509636.3A CN201510509636A CN105141476A CN 105141476 A CN105141476 A CN 105141476A CN 201510509636 A CN201510509636 A CN 201510509636A CN 105141476 A CN105141476 A CN 105141476A
Authority
CN
China
Prior art keywords
tcp message
message
transmission
sequence number
tcp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510509636.3A
Other languages
Chinese (zh)
Other versions
CN105141476B (en
Inventor
马明礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment Co Ltd
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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201510509636.3A priority Critical patent/CN105141476B/en
Publication of CN105141476A publication Critical patent/CN105141476A/en
Application granted granted Critical
Publication of CN105141476B publication Critical patent/CN105141476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a TCP message error information obtaining method and device in an embodiment. The method comprises: obtaining TCP messages in real time at a preset analysis point; extracting a retransmitted TCP message according to the current TCP message and a prior TCP message; obtaining relevant parameters corresponding to the retransmitted TCP message, wherein the relevant parameters include the number of acknowledge characters ACK corresponding to the retransmitted TCP message before the retransmitted TCP message passes through the analysis point; and when the relevant parameters satisfy a first preset condition, determining that the error information of the retransmitted TCP message is information retransmitted due to time out. The TCP message error information obtaining method is capable of obtaining the error information of the retransmitted TCP message accurately and immediately and avoiding the problem that the error information of the retransmitted TCP message cannot be acquired accurately by capturing later.

Description

A kind of acquisition methods of TCP message error message and device
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of acquisition methods of TCP message error message and a kind of acquisition device of TCP message error message.
Background technology
ICP/IP protocol is by the IP agreement (InternetProtocol of network layer, agreement interconnected between network) and the Transmission Control Protocol (TransmissionControlProtocol of transport layer, transmission control protocol) composition, IP agreement is a kind of connectionless, insecure communication protocol, Transmission Control Protocol is a kind of connection-oriented, reliable host-host protocol based on IP agreement, for application layer provides reliable transmission service.
In order to ensure the reliability of transfer of data, Transmission Control Protocol adopts and retransmits and acknowledgement mechanism.In the transmitting procedure of data, when there is packet loss, the abnormal transmission state such as out of order and overtime, transmitting terminal can to occurring that the TCP message of abnormal transmission state resends.
The data re-transmission of Transmission Control Protocol means the transmission repeated for same TCP message, this just additionally occupies unnecessary network broadband and flow, when there is a large amount of data re-transmission, will the transmission performance of network be had a strong impact on, significantly reduce the efficiency of transmission of network.Once there is the problem that the efficiency of transmission of network is low, determining the reason causing TCP message to retransmit, namely determining that the error message of TCP message is the key of dealing with problems.
In first technology, common way is, after the problem that efficiency of transmission is low occurs, a certain amount of TCP message of disposable crawl, adopt third party's instrument (as instruments such as SmartBit, WireShark, Sniffer) to analyze the TCP message captured, thus determine the error message of TCP message.
Due in first technology be retransmit issue occur after capture TCP message again, thus, only have when causing the reason retransmitted to repeat continuously, analysis result relatively reliably can be obtained, but, in actual applications, retransmit issue not repeats as a rule continuously, when retransmit issue does not occur in the process capturing TCP message, capture TCP message analysis again after retransmit issue is occurred, obviously accurately cannot determine the error message of TCP message.
Summary of the invention
Embodiment of the present invention technical problem to be solved is to provide a kind of acquisition methods of TCP message error message, in order to accurately to know the error message of TCP message.
Accordingly, the embodiment of the present invention additionally provides a kind of acquisition device of TCP message error message, in order to ensure the implementation and application of said method.
In order to solve the problem, the embodiment of the invention discloses a kind of acquisition methods of TCP message error message, comprising:
In preset analysis site Real-time Obtaining TCP message; The TCP message obtained comprises current TCP message and in first TCP message;
According to described current TCP message and described in first TCP message, extract and retransmit TCP message;
Obtain the relevant parameter that described re-transmission TCP message is corresponding; Described relevant parameter is included in described re-transmission TCP message before described analysis site, the acknowledge character ACK number corresponding with described re-transmission TCP message;
When described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information; Described first pre-conditionedly comprises described acknowledge character ACK number and is less than first threshold.
Preferably, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described method also comprises:
When described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information; Described second pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is not through described analysis site.
Preferably, described method also comprises:
First TCP message, extract the first out of order TCP message from described, and add up the out of order number of TCP message of described first out of order TCP message;
From the extracted first out of order TCP message, obtain the second out of order TCP message corresponding with described re-transmission TCP message;
When described relevant parameter meets the 3rd pre-conditioned, and, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information; Described 3rd pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is through described analysis site.
Preferably, described method also comprises:
When described relevant parameter meets described 3rd pre-conditioned, and, when the out of order number of TCP message of described second out of order TCP message is less than described Second Threshold, determine that the error message of described re-transmission TCP message is the information causing re-transmission at described analysis site downstream packet loss.
Preferably, described according to described current TCP message and described in first TCP message, extract the step retransmitting TCP message and comprise:
From described current TCP message, extract the first transmission sequence number TSN, an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
When described first transmission sequence number TSN is less than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract described current TCP message as re-transmission TCP message;
Or, when described first transmission sequence number TSN is greater than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of described current TCP message as re-transmission TCP message.
Preferably, describedly comprise the first TCP message and the second TCP message in first TCP message, all TCP message that described second TCP message obtains before being included in and obtaining described first TCP message, describedly first TCP message, extract the first out of order TCP message from described, and the step of adding up the out of order number of TCP message of described first out of order TCP message comprises:
From described first TCP message, extract the second transmission sequence number TSN, the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
When described second transmission sequence number TSN is less than described second transmission sequence number maximum of T SN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message;
Add up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding;
Using the TCP message out of order number of the number of the TCP message of statistics acquisition as described first out of order TCP message.
The embodiment of the invention also discloses a kind of acquisition device of TCP message error message, comprising:
TCP message acquisition module, in preset analysis site Real-time Obtaining TCP message; The TCP message obtained comprises current TCP message and in first TCP message;
Retransmit TCP message extraction module, for according to described current TCP message and described in first TCP message, extract and retransmit TCP message;
Relevant parameter acquisition module, for obtaining relevant parameter corresponding to described re-transmission TCP message; Described parameter is included in described re-transmission TCP message before described analysis site, the acknowledge character ACK number corresponding with described re-transmission TCP message;
First error message determination module, for when described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information; Described first pre-conditionedly comprises described acknowledge character ACK number and is less than first threshold.
Preferably, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described device also comprises:
Second error message determination module, for when described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information; Described second pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is not through described analysis site.
Preferably, described device also comprises:
First out of order TCP message extraction module, for extracting the first out of order TCP message from described in first TCP message, and adds up the out of order number of TCP message of described first out of order TCP message;
Second out of order TCP message acquisition module, for from the extracted first out of order TCP message, obtains the second out of order TCP message corresponding with described re-transmission TCP message;
3rd error message determination module, pre-conditioned for meeting the 3rd when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information; Described 3rd pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is through described analysis site.
Preferably, described device also comprises:
4th error message determination module, described 3rd pre-conditioned for meeting when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is less than described Second Threshold, determine that the error message of described re-transmission TCP message is the information causing re-transmission at described analysis site downstream packet loss.
Preferably, described re-transmission TCP message extraction module comprises:
First transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the first transmission sequence number TSN from described current TCP message, an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
Retransmit TCP message and extract submodule, for being less than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract described current TCP message as re-transmission TCP message;
Or, for being greater than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of described current TCP message as re-transmission TCP message.
Preferably, describedly comprise the first TCP message and the second TCP message in first TCP message, all TCP message that described second TCP message obtains before being included in and obtaining described first TCP message, described first out of order TCP message extraction module comprises:
Second transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the second transmission sequence number TSN from described first TCP message, the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
Out of order TCP message extracts submodule, for being less than described second transmission sequence number maximum of T SN as described second transmission sequence number TSN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message;
TCP message out of order number statistics submodule, for adding up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding, and the number of TCP message statistics obtained is as the out of order number of TCP message of described first out of order TCP message.
With compared with first technology, the embodiment of the present invention comprises following advantage:
The embodiment of the present invention can in analysis site place Real-time Obtaining TCP message, extract re-transmission TCP message, when retransmitting TCP message and putting by analysis, obtain and retransmit acknowledge character ACK number corresponding to TCP message, acknowledge character ACK number is less than first threshold, determine that the error message of described re-transmission TCP message is the information being caused re-transmission by time-out, TCP message due to the embodiment of the present invention is online acquisition, whole data flow is run through to the analytic process of TCP message, once retransmitting appears in TCP message, the reason that TCP message retransmits can be obtained in time, namely know and retransmit TCP message error message, avoid the problem capturing afterwards and accurately cannot know and retransmit TCP message error message.
The TCP message of the embodiment of the present invention is Real-time Obtaining, when using LTE base station side as analysis site, only corresponding TCP message grabbing device need be installed in LTE base station side, avoid in first technology after TCP message retransmit issue occurs, arrange the personnel be correlated with to climb up again troublesome operation that TCP message crawl is carried out in base station, saves the time spent by TCP message of capturing and cost.
The embodiment of the present invention can not only know the reason causing TCP message to retransmit, TCP message can also be obtained and retransmit the transmission zone (namely specifically occur in analysis site upstream or occur in analysis site downstream) occurred, avoid and need technical professional can know that TCP message retransmits the embarrassment of the network segment occurred by the manual analysis of secondary in first technology.
Accompanying drawing explanation
Fig. 1 is the communication scheme of wireless network LTE;
Fig. 2 is the flow chart of steps of the acquisition methods embodiment 1 of a kind of TCP message error message of the present invention;
Fig. 3 a retransmits model A schematic diagram;
Fig. 3 b retransmits Model B schematic diagram;
Fig. 4 a is that time-out causes retransmitting schematic diagram;
Fig. 4 b is that analysis site upstream packet loss causes retransmitting schematic diagram;
Fig. 5 is the flow chart of steps of the acquisition methods embodiment 2 of a kind of TCP message error message of the present invention;
Fig. 6 is out of order model schematic;
Fig. 7 a is that seriously out of order causing retransmits schematic diagram in analysis site upstream;
Fig. 7 b is that analysis site downstream packet loss causes retransmitting schematic diagram;
Fig. 8 is the structured flowchart of the acquisition device embodiment of a kind of TCP message error message of the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
One of core idea of the embodiment of the present invention is, the embodiment of the present invention can in analysis site place Real-time Obtaining TCP message, extract re-transmission TCP message, when retransmitting TCP message and putting by analysis, obtain and retransmit acknowledge character ACK number corresponding to TCP message, acknowledge character ACK number is less than first threshold, determine that the error message of described re-transmission TCP message is the information being caused re-transmission by time-out, TCP message due to the embodiment of the present invention is online acquisition, whole data flow is run through to the analytic process of TCP message, once retransmitting appears in TCP message, the reason that TCP message retransmits can be obtained in time, namely know and retransmit TCP message error message, avoid the problem capturing afterwards and accurately cannot know and retransmit TCP message error message.
Fig. 1 is the communication scheme of wireless network LTE (LongTermEvolution), the composition of wireless network LTE comprises mobile terminal 101, LTE base station 102, passback net 103, core net 104, router (not indicating in figure) and the Internet 105 (Internet), and the communication process of mobile terminal and the Internet is as follows:
When data downstream, by the Internet 105 (data sending terminal), TCP message is routed to core net 104 by router, core net carries out GTP tunnel encapsulation to TCP message, add GTPU tunnel head, LTE base station 102 is sent to by tunnel style, GTPU tunnel head is peeled off by LTE base station, is sent to corresponding mobile terminal 101 (data receiver) by wireless link; Data uplink is contrary with the communication process of data downstream.
The embodiment of the present invention is for wireless network LTE, and the present invention will be described in detail.
It should be noted that, those skilled in the art should know, the embodiment of the present invention not only may be used for wireless network LTE, can also be used for cable network and other wireless network.
Embodiment one:
With reference to Fig. 2, show the flow chart of steps of the acquisition methods embodiment 1 of a kind of TCP message error message of the present invention, specifically can comprise the steps:
Step 201, in preset analysis site Real-time Obtaining TCP message;
In wireless network LTE, the analysis site of the embodiment of the present invention can be mobile terminal, LTE base station, and can be also other network elements such as core net, the embodiment of the present invention be restricted this.
It should be noted that, inventive embodiments can be applied in the process that transmitting terminal and receiving terminal carry out the mutual whole data flow of TCP message.
The embodiment of the present invention can be arranged on analysis site by having the device capturing TCP message function, sends in the process of TCP message at transmitting terminal to receiving terminal, when TCP message is put by analysis, can Real-time Obtaining TCP message, and TCP message is stored in the buffer.
Because the TCP message of the embodiment of the present invention can Real-time Obtaining, and cover the whole data flow that TCP message is mutual, when using LTE base station side as analysis site, can be avoided in first technology after TCP message retransmit issue occurs, arrange the personnel be correlated with to climb up again troublesome operation that TCP message crawl is carried out in base station, saves the time spent by TCP message of capturing and cost.
In a particular application, the TCP message obtained can comprise current TCP message and in first TCP message, the TCP message being about to obtain is divided into current TCP message and in first TCP message, wherein, current TCP message can refer to the TCP message that current time obtains, and can be all TCP message obtained before current time in first TCP message.
Step 202, according to described current TCP message and described in first TCP message, extracts and retransmits TCP message;
The embodiment of the present invention according to current TCP message and described in first TCP message, can be extracted and retransmit TCP message.
In one preferred embodiment of the invention, step 202 can comprise following sub-step:
Sub-step S11, extracts the first transmission sequence number TSN from described current TCP message, and an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
In a particular application, TCP message comprises TCP head and IPV4 head, and wherein, TCP head comprises transmission sequence number TSN (TransmissionSequenceNumber), and IPV4 head comprises IP and identifies IPID (IPIdentification).
Transmission sequence number TSN can increase progressively continuously, represents that TCP message is paid the order of ICP/IP protocol stack by TCP message transmitting terminal, and IP identifies IPID and represents that TCP message leaves the order of ICP/IP protocol stack.
The embodiment of the present invention can extract the first transmission sequence number TSN from current TCP message, and an IP identifies IPID, from extracting the first transmission sequence number maximum of T SN first TCP message mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX.
Specifically from the TCP head of TCP message, parse transmission sequence number TSN, from the IPV4 head of TCP message, parse IP identify IPID.
First transmission sequence number maximum of T SN mAXbe the maximum of the transmission sequence number TSN of all TCP message in first TCP message, an IP identifies maximum IPID mAXthe first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID, can from the first transmission sequence number maximum of T SN mAXresolve in the IPV4 head of corresponding TCP message and obtain, that is, the first transmission sequence number maximum of T SN mAXwith the first transmission sequence number maximum of T SN mAXextract from same TCP message.
In practical operation, the first transmission sequence number maximum of T SN mAXmaximum IPID is identified with an IP mAXacquisition be a dynamic process, the change of TCP message obtained along with analysis site, the first transmission sequence number maximum of T SN mAXmaximum IPID is identified with an IP mAXalso may along with change.
Specifically, the transmission sequence number TSN of the TCP message of most initial acquisition and IP identify IPID can respectively as the first transmission sequence number maximum of T SN obtaining the most initial TCP message moment mAXmaximum IPID is identified with an IP mAXstore, when obtaining next TCP message, can by the transmission sequence number TSN of next TCP message of acquisition and the first transmission sequence number maximum of T SN of storage mAXcompare, the maximum in both is updated to the first transmission sequence number maximum of T SN mAX, and by the first transmission sequence number maximum of T SN mAXthe IP of corresponding TCP message identifies IPID and is updated to an IP mark maximum IPID mAX.
In embodiments of the present invention, when described first transmission sequence number TSN is less than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, perform sub-step S12a, when described first transmission sequence number TSN is greater than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, perform sub-step S12b.
Sub-step S12a, extracts described current TCP message as re-transmission TCP message;
In embodiments of the present invention, when described first transmission sequence number TSN is less than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract current TCP message as re-transmission TCP message.
Exemplarily, as shown in Figure 3 a, with (TSN, IPID) formal description, the TCP message that transmitting terminal sends is respectively: (1, 1), (2, 2), (3, 3), (4, 4), (3, 5), current, the TCP message that analysis site obtains is respectively: (1, 1), (2, 2), (4, 4), (3, 5), wherein, (1, 1), (2, 2), (4, 4) for analysis site obtain in first TCP message, (3, 5) be the current TCP message of analysis site acquisition, Yi Zhi, a first transmission sequence number TSN and IP identifies IPID and is respectively 3 and 5, first transmission sequence number maximum of T SN mAXmaximum IPID is identified with an IP mAXbe 4, due to 3 < 4, and 5 > 4, therefore, can extract (3,5) for retransmitting TCP message.
Sub-step S12b, extracts the previous TCP message of described current TCP message as re-transmission TCP message.
In embodiments of the present invention, when described first transmission sequence number TSN is greater than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of current TCP message as re-transmission TCP message.
Exemplarily, as shown in Figure 3 b, with (TSN, IPID) formal description, the TCP message that transmitting terminal sends is respectively: (1, 1), (2, 2), (3, 3), (4, 4), (3, 5), current, the TCP message that analysis site gets is respectively: (1, 1), (2, 2), (3, 5), (4, 4), wherein, (1, 1), (2, 2), (3, 5) for analysis site obtain in first TCP message, (4, 4) be the current TCP message of analysis site acquisition, Yi Zhi, a first transmission sequence number TSN and IP identifies IPID and is 4, first transmission sequence number maximum of T SN mAXmaximum IPID is identified with an IP mAXbe respectively 3 and 5, due to 4 > 3, and 4 < 5, therefore, can extract (3,5) for retransmitting TCP message.
Step 203, obtains the relevant parameter that described re-transmission TCP message is corresponding;
Step 204, when described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information;
The embodiment of the present invention can obtain and retransmit relevant parameter corresponding to TCP message, and relevant parameter can be included in and retransmit before message puts by analysis, the acknowledge character ACK number corresponding with this re-transmission TCP message.
In embodiments of the present invention, the acknowledge character ACK retransmitting TCP message corresponding can obtain at analysis site place.In data communication, acknowledge character (Acknowledgement, ACK) be the one transmission class control character that receiving terminal sends to transmitting terminal, to represent that the TCP message sent has confirmed that reception is errorless, if certain TCP message does not arrive receiving terminal, the TCP message that receiving terminal can not arrive for this repeats to send acknowledge character ACK to transmitting terminal.
In a particular application, retransmitting acknowledge character ACK number corresponding to TCP message can be acknowledge character ACK number for retransmitting original TCP message corresponding to TCP message, described original message is the TCP message that transmitting terminal sends, such as, if retransmitting TCP message is (3,5), so, original TCP message is (3,3), acknowledge character ACK number can be the number of the acknowledge character ACK for original TCP message (3,3).
As a concrete example, suppose that the TCP message that transmitting terminal sends is (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (3, 6), the TCP message that receiving terminal receives is (1, 1), (2, 2), (4, 4), (5, 5), (3, 6), i.e. intercalary delection TCP message (3, 3), so, receiving (4, 4) and (5, 5) time, receiving terminal all can for TCP message (3, 3) acknowledge character ACK is sent to transmitting terminal, to inform transmitting terminal TCP message (3, 3) also do not arrive, until retransmit TCP message (3, 6) till arriving, so, when re-transmission TCP message (3, 6) when arriving, retransmit TCP message (3, 6) corresponding acknowledge character ACK number is 2.
The embodiment of the present invention when relevant parameter meet first pre-conditioned time, namely when the acknowledge character ACK number corresponding with retransmitting TCP message is less than first threshold, determine that the error message of this re-transmission TCP message is the information being caused re-transmission by time-out, that is, this TCP message due to time-out cause retransmit.
Usually, first threshold can get 3, and those skilled in the art also can set the size of first threshold according to actual needs, and the embodiment of the present invention is not restricted this.
Exemplarily, as shown in fig. 4 a, suppose that first threshold gets 3, the TCP message that transmitting terminal sends is (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), ..., (3, 21), the TCP message that analysis site place receives may comprise (1, 1), (2, 2), (3, 21) and other TCP message, message (3, 21) be retransmit TCP message, corresponding original TCP message is (3, 3), as long as meet not monitor at analysis site place be more than or equal to 3 times for original TCP message (3, 3) acknowledge character ACK, can determine to retransmit TCP message (3, 21) because time-out causes.
In one preferred embodiment of the invention, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described method also comprises:
When described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information.
Wherein, the second pre-conditioned acknowledge character ACK number that comprises is more than or equal to described first threshold, and original TCP message is not through described analysis site.
Original TCP message is the TCP message that transmitting terminal corresponding to this re-transmission TCP message sends, and such as, if retransmitting TCP message is (3,5), so, original TCP message is (3,3).
When monitoring for original TCP message (3 at analysis site place, 3) acknowledge character ACK number is more than or equal to first threshold, further, when original TCP message is not put by analysis, the error message determining to retransmit TCP message is the information causing re-transmission at analysis site upstream packet loss.
In a particular application, original TCP message whether by analysis point can be determined in the following manner, suppose to retransmit TCP message for (3,5):
Because the TCP message obtained can store in the buffer by analysis site, when re-transmission TCP message (3,5), when putting by analysis, can search in the buffer and whether there is TCP message (3,3), if exist, original TCP message (3,3) point by analysis before this re-transmission TCP message is put by analysis is then described, if do not exist, original TCP message (3,3) not point by analysis before this re-transmission TCP message is put by analysis is then described.
Exemplarily, as shown in Figure 4 b, suppose that first threshold gets 3, the TCP message that transmitting terminal sends is (1,1), (2,2), (3,3), (4,4), (5,5), (6,6), ..., (3,21), the TCP message that analysis site place receives comprises (1,1), (2,2), (4,4), (5,5), (6,6), ..., (3,21), message (3, 21) be retransmit TCP message, corresponding original TCP message is (3,3), when re-transmission TCP message (3,21) is put by analysis, monitor original TCP message (3, 3) point is not by analysis had, and, due to TCP message (3, 3) normally receiving terminal is not arrived, so, when receiving terminal receives (4,4), (5,5), (20,20) Shi Douhui sends an acknowledge character ACK to transmitting terminal, to inform transmitting terminal TCP message (3,3) also do not arrive, when TCP message (3,21) is put by analysis, count on for original TCP message (3,3) acknowledge character ACK number is 17, be greater than 3, so, can determine to retransmit TCP message (3,21) be due to original TCP message (3,3) cause at analysis site upstream packet loss, such as, in the transmitting procedure of transmitting terminal to LTE base station, original TCP message (3,3) lost.
The TCP message of the embodiment of the present invention is online acquisition, whole data flow is run through to the analytic process of TCP message, once retransmitting appears in TCP message, the reason that TCP message retransmits can be obtained in time, namely know and retransmit TCP message error message, avoid the problem capturing afterwards and accurately cannot know and retransmit TCP message error message.
Simultaneously, the embodiment of the present invention can not only know the reason causing TCP message to retransmit, TCP message can also be obtained and retransmit the transmission zone (namely specifically occur in analysis site upstream or occur in analysis site downstream) occurred, avoid and need technical professional can know that TCP message retransmits the embarrassment of the network segment occurred by the manual analysis of secondary in first technology.
Embodiment two:
With reference to Fig. 5, show the flow chart of steps of the acquisition methods embodiment 2 of a kind of TCP message error message of the present invention, specifically can comprise the steps:
Step 301, in preset analysis site Real-time Obtaining TCP message;
Wherein, the TCP message obtained can comprise current TCP message and in first TCP message.
Step 302, according to described current TCP message and described in first TCP message, extracts and retransmits TCP message;
Step 303, obtains the relevant parameter that described re-transmission TCP message is corresponding;
Wherein, relevant parameter can be included in and retransmit TCP message before described analysis site, the acknowledge character ACK number corresponding with retransmitting TCP message, and, before re-transmission TCP message is put by analysis, retransmit the information whether original TCP message corresponding to TCP message is put by analysis.
In embodiments of the present invention, when relevant parameter meet first pre-conditioned time, namely when the acknowledge character ACK number corresponding with retransmitting TCP message is less than first threshold, determine that the error message of this re-transmission TCP message is the information being caused re-transmission by time-out, that is, this TCP message due to time-out cause retransmit.
When described relevant parameter meet second pre-conditioned time, namely when acknowledge character ACK number is more than or equal to described first threshold, and when original TCP message is not put by analysis, the error message determining to retransmit TCP message is the information causing re-transmission at analysis site upstream packet loss.
Step 304, extracts the first out of order TCP message from described, and adds up the out of order number of TCP message of described first out of order TCP message first TCP message;
In embodiments of the present invention, can be all TCP message obtained before obtaining current TCP message in first TCP message, the first TCP message and the second TCP message can be comprised, all TCP message that the second TCP message obtains before can being included in acquisition first TCP message in first TCP message.
It should be noted that, in a particular application, the division of the first TCP message and the second TCP message can be a dynamic process, such as, when get at analysis site place comprise 2 in first TCP message time, comprise current TCP message and namely altogether obtain 3 TCP message, the first TCP message can be the 2nd TCP message, and the second TCP message can comprise the 1st TCP message; When continuing to get next TCP message at analysis site place, be 3 in first TCP message, now, the first TCP message can be the 3rd TCP message, and the second TCP message can comprise the 1st and the 2nd TCP message; Follow-up continue to get TCP message time, the division of the first TCP message and the second TCP message can the like.
In one preferred embodiment of the invention, the first TCP message and the second TCP message can be comprised in first TCP message, all TCP message that second TCP message obtains before can being included in and obtaining described first TCP message, then step 304 can comprise following sub-step:
Sub-step S21, extracts the second transmission sequence number TSN from described first TCP message, and the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
It should be noted that, the second transmission sequence number maximum of T SN mAXbe the maximum of the transmission sequence number TSN in all the second TCP message, the 2nd IP identifies maximum IPID mAXthe second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID, can from the second transmission sequence number maximum of T SN mAXextract in corresponding TCP message.
Sub-step S22, when described second transmission sequence number TSN is less than described second transmission sequence number maximum of T SN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message.
Exemplarily, as shown in Figure 6, the TCP message that transmitting terminal sends comprises (1, 1), (2, 2), (3, 3), (4, 4), (5, 5) and (6, 6), analysis site place obtain TCP message comprise (1, 1), (2, 2), (5, 5), (3, 3), (4, 4) and (6, 6), getting TCP message (4, 4) moment, (1 is comprised in first TCP message, 1), (2, 2), (5, 5) and (3, 3), so, first TCP message is (3, 3), second TCP message comprises (1, 1), (2, 2) and (5, 5), now, the the second transmission sequence number TSN extracted and the 2nd IP identifies IPID and is 3, second transmission sequence number maximum of T SN mAXmaximum IPID is identified with the 2nd IP mAXbe 5, Yi Zhi, meet the second transmission sequence number TSN and be less than the second transmission sequence number maximum of T SN mAX, and the 2nd IP mark IPID is less than the 2nd IP mark maximum IPID mAX, then extracting TCP message (3,3) is the first out of order message, when continuing to get (6 at analysis site place, 6) time, (1,1), (2,2), (5 are comprised in first TCP message, 5), (3,3) and (4,4), so, first TCP message is (4,4), the second TCP message comprises (1,1), (2,2), (5,5) and (3,3), now, the the second transmission sequence number TSN extracted and the 2nd IP identifies IPID and is 4, the second transmission sequence number maximum of T SN mAXmaximum IPID is identified with the 2nd IP mAXbe 5, same satisfied second transmission sequence number TSN is less than the second transmission sequence number maximum of T SN mAX, and the 2nd IP mark IPID is less than the 2nd IP mark maximum IPID mAX, then extracting TCP message (4,4) is the first out of order message.
Sub-step S23, adds up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding;
Sub-step S24, using the TCP message out of order number of the number of the TCP message of statistics acquisition as described first out of order TCP message.
Such as, suppose that the TCP message obtained at analysis site place comprises: (1,1), (2,2), (4,4) (5,5), (6,6) ..., (15,15), (3,3).With reference to the extracting rule of aforementioned first out of order message, known (3,3) are the first out of order message (being also the first TCP message).
First out of order message (3,3) the transmission sequence number TSN that (being also the first TCP message) is corresponding is the second transmission sequence number TSN, namely the second transmission sequence number TSN is 3, and so the next transmission sequence number TSN of the second transmission sequence number TSN is 4.
The embodiment of the present invention can from the next transmission sequence number TSN of the transmission sequence number TSN of the first out of order message, to the second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding.
That is, statistics (1,1), (2,2), (4,4), (5,5), (6,6) ..., (15,15), (3,3) TCP message, the number of transmission sequence number TSN TCP message that all transmission sequence number TSN are corresponding from 4 to 15.
Can know, (1,1), (2,2), (4,4), (5,5), (6,6) ..., (15,15), in (3,3) TCP message, the transmission sequence number TSN TCP message that all transmission sequence number TSN are corresponding from 4 to 15 comprises (4,4), (5,5), (6,6) ..., (15,15), thus, the number of TCP message that statistics obtains is 12, and so, the out of order number of TCP message corresponding to the first out of order TCP message is also 12.
Step 305, from the extracted first out of order TCP message, obtains the second out of order TCP message corresponding with described re-transmission TCP message;
In actual applications, due to the first out of order TCP message, comprise all out of order TCP message obtaining and retransmit in the front TCP message obtained of TCP message, thus, the first out of order TCP message can comprise 0,1, more than 2 or 2.
The embodiment of the present invention can from the extracted first out of order TCP message, obtain the second out of order TCP message corresponding with retransmitting TCP message, be specially, second out of order TCP message is identical with the transmission sequence number TSN of re-transmission TCP message, such as, if retransmitting TCP message is (3,21), the second so corresponding with (3,21) out of order TCP message is (3,3).
Step 306, when described relevant parameter meets the 3rd pre-conditioned, further, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information.
In embodiments of the present invention, the 3rd pre-conditioned acknowledge character ACK number that can comprise is more than or equal to first threshold, and original TCP message is point by analysis.
The acknowledge character ACK number corresponding when satisfied re-transmission TCP message is more than or equal to first threshold, retransmit the original TCP message point by analysis that TCP message is corresponding, and, when the out of order number of TCP message of the second out of order TCP message is more than or equal to Second Threshold, can determine the error message of this re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information.
In embodiments of the present invention, seriously out of order refer to the out of order number of TCP message of the second out of order TCP message be more than or equal to Second Threshold and cause retransmit situation.
Second Threshold usually can value 3, and certainly, those skilled in the art can set the size of Second Threshold according to actual needs.
Exemplarily, as shown in Figure 7a, suppose that first threshold gets 3, the TCP message that transmitting terminal sends comprises: (1,1), (2,2), (3,3), (4,4) ..., (14,14), (15,15), (16,16) ... (3,21), the TCP message received at analysis site place comprises: (1,1), (2,2), (4,4), (5,5) ..., (15,15), (3,3), (16,16) ..., (3,21).
Message (3, 21) be retransmit TCP message, corresponding original TCP message is (3, 3), in re-transmission TCP message (3, 21) when putting by analysis, monitor original TCP message (3, 3) once point by analysis, and, due to TCP message (3, 3) normally receiving terminal is not arrived, so, when receiving terminal receives (4, 4), (5, 5), (6, 6) Shi Douhui sends an acknowledge character ACK to transmitting terminal, to inform transmitting terminal TCP message (3, 3) also do not arrive, when TCP message (3, 21) when putting by analysis, count on for original TCP message (3, 3) acknowledge character ACK number is 3, simultaneously, second out of order TCP message (3, 3) the out of order number of TCP message is 12, be more than or equal to 3, then can determine to retransmit TCP message (3, 21) be due to original TCP message (3, 3) seriously out of orderly in analysis site upstream to cause.
In one preferred embodiment of the invention, when relevant parameter meets the 3rd pre-conditioned, further, when the out of order number of TCP message of the second out of order TCP message is less than described Second Threshold, the error message determining to retransmit TCP message is the information causing re-transmission at analysis site downstream packet loss.
Exemplarily, as shown in Figure 7b, suppose that first threshold gets 3, the TCP message that transmitting terminal sends comprises: (1,1), (2,2), (3,3), (4,4), (5,5), (6,6) ..., (20,20), (3,21), the TCP message that analysis site place receives comprises (1,1), (2,2), (4,4), (3,3), (5,5), (6,6) ..., (20,20), (3,21).
Message (3, 21) be retransmit TCP message, corresponding original TCP message is (3, 3), in re-transmission TCP message (3, 21) when putting by analysis, monitor original TCP message (3, 3) once point by analysis, and, due to TCP message (3, 3) normally receiving terminal is not arrived, so, when receiving terminal receives (4, 4), (5, 5), (20, 20) Shi Douhui sends an acknowledge character ACK to transmitting terminal, to inform transmitting terminal TCP message (3, 3) also do not arrive, when TCP message (3, 21) when putting by analysis, count on for original TCP message (3, 3) acknowledge character ACK number is 17, simultaneously, the out of order number of TCP message of the second out of order TCP message is 1, be less than 3, then can determine to retransmit TCP message (3, 21) be due to original TCP message (3, 3) cause at analysis site downstream packet loss.
Because embodiment one and embodiment two have similarity, in embodiment one or embodiment two, not exhaustive part is cross-referenced.
Need bright be, for embodiment of the method, in order to simple description, therefore it is all expressed as a series of action and says combination, but those skilled in the art should know, the embodiment of the present invention is not by the restriction of described sequence of movement, because according to the embodiment of the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action might not be that the embodiment of the present invention is necessary.
With reference to Fig. 8, show the structured flowchart of the acquisition device embodiment of a kind of TCP message error message of the present invention, specifically can comprise as lower module:
TCP message acquisition module 401, in preset analysis site Real-time Obtaining TCP message; The TCP message obtained comprises current TCP message and in first TCP message;
Retransmit TCP message extraction module 402, for according to described current TCP message and described in first TCP message, extract and retransmit TCP message;
Relevant parameter acquisition module 403, for obtaining relevant parameter corresponding to described re-transmission TCP message; Described relevant parameter is included in described re-transmission TCP message before described analysis site, the acknowledge character ACK number corresponding with described re-transmission TCP message;
First error message determination module 404, for when described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information; Described first pre-conditionedly comprises described acknowledge character ACK number and is less than first threshold.
In one preferred embodiment of the invention, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described device also comprises:
Second error message determination module, for when described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information; Described second pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is not through described analysis site.
In one preferred embodiment of the invention, described device also comprises:
First out of order TCP message extraction module, for extracting the first out of order TCP message from described in first TCP message, and adds up the out of order number of TCP message of described first out of order TCP message;
Second out of order TCP message acquisition module, for from the extracted first out of order TCP message, obtains the second out of order TCP message corresponding with described re-transmission TCP message;
3rd error message determination module, pre-conditioned for meeting the 3rd when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information; Described 3rd pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is through described analysis site.
In one preferred embodiment of the invention, described device also comprises:
4th error message determination module, described 3rd pre-conditioned for meeting when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is less than described Second Threshold, determine that the error message of described re-transmission TCP message is the information causing re-transmission at described analysis site downstream packet loss.
In one preferred embodiment of the invention, described re-transmission TCP message extraction module comprises:
First transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the first transmission sequence number TSN from described current TCP message, an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
Retransmit TCP message and extract submodule, for being less than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract described current TCP message as re-transmission TCP message;
Or, for being greater than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of described current TCP message as re-transmission TCP message.
In one preferred embodiment of the invention, describedly comprise the first TCP message and the second TCP message in first TCP message, all TCP message that described second TCP message obtains before being included in and obtaining described first TCP message, described first out of order TCP message extraction module can comprise:
Second transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the second transmission sequence number TSN from described first TCP message, the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
Out of order TCP message extracts submodule, for being less than described second transmission sequence number maximum of T SN as described second transmission sequence number TSN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message;
TCP message out of order number statistics submodule, for adding up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding, and the number of TCP message statistics obtained is as the out of order number of TCP message of described first out of order TCP message.
For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Those skilled in the art should understand, the embodiment of the embodiment of the present invention can be provided as method, device or computer program.Therefore, the embodiment of the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the embodiment of the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The embodiment of the present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, terminal equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminal equipment to produce a machine, making the instruction performed by the processor of computer or other programmable data processing terminal equipment produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing terminal equipment, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded on computer or other programmable data processing terminal equipment, make to perform sequence of operations step to produce computer implemented process on computer or other programmable terminal equipment, thus the instruction performed on computer or other programmable terminal equipment is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although described the preferred embodiment of the embodiment of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of embodiment of the present invention scope.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or terminal equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or terminal equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the terminal equipment comprising described key element and also there is other identical element.
Above to the acquisition methods of a kind of TCP message error message provided by the present invention and a kind of acquisition device of TCP message error message, be described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (12)

1. an acquisition methods for TCP message error message, is characterized in that, comprising:
In preset analysis site Real-time Obtaining TCP message; The TCP message obtained comprises current TCP message and in first TCP message;
According to described current TCP message and described in first TCP message, extract and retransmit TCP message;
Obtain the relevant parameter that described re-transmission TCP message is corresponding; Described relevant parameter is included in described re-transmission TCP message before described analysis site, the acknowledge character ACK number corresponding with described re-transmission TCP message;
When described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information; Described first pre-conditionedly comprises described acknowledge character ACK number and is less than first threshold.
2. method according to claim 1, is characterized in that, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described method also comprises:
When described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information; Described second pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is not through described analysis site.
3. method according to claim 2, is characterized in that, also comprises:
First TCP message, extract the first out of order TCP message from described, and add up the out of order number of TCP message of described first out of order TCP message;
From the extracted first out of order TCP message, obtain the second out of order TCP message corresponding with described re-transmission TCP message;
When described relevant parameter meets the 3rd pre-conditioned, and, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information; Described 3rd pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is through described analysis site.
4. method according to claim 3, is characterized in that, also comprises:
When described relevant parameter meets described 3rd pre-conditioned, and, when the out of order number of TCP message of described second out of order TCP message is less than described Second Threshold, determine that the error message of described re-transmission TCP message is the information causing re-transmission at described analysis site downstream packet loss.
5. the method according to claim 1 or 2 or 3 or 4, is characterized in that, described according to described current TCP message and described in first TCP message, extracts the step retransmitting TCP message and comprises:
From described current TCP message, extract the first transmission sequence number TSN, an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
When described first transmission sequence number TSN is less than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract described current TCP message as re-transmission TCP message;
Or, when described first transmission sequence number TSN is greater than described first transmission sequence number maximum of T SN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of described current TCP message as re-transmission TCP message.
6. the method according to claim 3 or 4, it is characterized in that, describedly comprise the first TCP message and the second TCP message in first TCP message, all TCP message that described second TCP message obtains before being included in and obtaining described first TCP message, describedly first TCP message, extract the first out of order TCP message from described, and the step of adding up the out of order number of TCP message of described first out of order TCP message comprises:
From described first TCP message, extract the second transmission sequence number TSN, the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
When described second transmission sequence number TSN is less than described second transmission sequence number maximum of T SN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message;
Add up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding;
Using the TCP message out of order number of the number of the TCP message of statistics acquisition as described first out of order TCP message.
7. an acquisition device for TCP message error message, is characterized in that, comprising:
TCP message acquisition module, in preset analysis site Real-time Obtaining TCP message; The TCP message obtained comprises current TCP message and in first TCP message;
Retransmit TCP message extraction module, for according to described current TCP message and described in first TCP message, extract and retransmit TCP message;
Relevant parameter acquisition module, for obtaining relevant parameter corresponding to described re-transmission TCP message; Described parameter is included in described re-transmission TCP message before described analysis site, the acknowledge character ACK number corresponding with described re-transmission TCP message;
First error message determination module, for when described relevant parameter meet first pre-conditioned time, determine the error message of described re-transmission TCP message be by time-out cause retransmit information; Described first pre-conditionedly comprises described acknowledge character ACK number and is less than first threshold.
8. device according to claim 7, is characterized in that, described relevant parameter comprises when described re-transmission TCP message is before described analysis site, the information whether original TCP message corresponding to described re-transmission TCP message is put by analysis; Described device also comprises:
Second error message determination module, for when described relevant parameter meet second pre-conditioned time, determine the error message of described re-transmission TCP message be described analysis site upstream packet loss cause retransmit information; Described second pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is not through described analysis site.
9. device according to claim 8, is characterized in that, also comprises:
First out of order TCP message extraction module, for extracting the first out of order TCP message from described in first TCP message, and adds up the out of order number of TCP message of described first out of order TCP message;
Second out of order TCP message acquisition module, for from the extracted first out of order TCP message, obtains the second out of order TCP message corresponding with described re-transmission TCP message;
3rd error message determination module, pre-conditioned for meeting the 3rd when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is more than or equal to Second Threshold, determine the error message of described re-transmission TCP message be in described analysis site upstream seriously out of order cause retransmit information; Described 3rd pre-conditionedly comprises described acknowledge character ACK number and is more than or equal to described first threshold, and described original TCP message is through described analysis site.
10. device according to claim 9, is characterized in that, also comprises:
4th error message determination module, described 3rd pre-conditioned for meeting when described relevant parameter, and, when the out of order number of TCP message of described second out of order TCP message is less than described Second Threshold, determine that the error message of described re-transmission TCP message is the information causing re-transmission at described analysis site downstream packet loss.
11. devices according to claim 7 or 8 or 9 or 10, it is characterized in that, described re-transmission TCP message extraction module comprises:
First transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the first transmission sequence number TSN from described current TCP message, an IP identifies IPID, and, first TCP message, extract the first transmission sequence number maximum of T SN from described mAX, and by described first transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as an IP mark maximum IPID mAX;
Retransmit TCP message and extract submodule, for being less than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is greater than a described IP mark maximum IPID mAXtime, extract described current TCP message as re-transmission TCP message;
Or, for being greater than described first transmission sequence number maximum of T SN as described first transmission sequence number TSN mAX, and a described IP identifies IPID and is less than a described IP mark maximum IPID mAXtime, extract the previous TCP message of described current TCP message as re-transmission TCP message.
12. devices according to claim 9 or 10, it is characterized in that, describedly comprise the first TCP message and the second TCP message in first TCP message, all TCP message that described second TCP message obtains before being included in and obtaining described first TCP message, described first out of order TCP message extraction module comprises:
Second transmission sequence number TSN and IP identifies IPID and extracts submodule, and for extracting the second transmission sequence number TSN from described first TCP message, the 2nd IP identifies IPID, and, from described second TCP message, extract the second transmission sequence number maximum of T SN mAX, and by described second transmission sequence number maximum of T SN mAXcorresponding IP identifies IPID and is designated as the 2nd IP mark maximum IPID mAX;
Out of order TCP message extracts submodule, for being less than described second transmission sequence number maximum of T SN as described second transmission sequence number TSN mAX, and described 2nd IP identifies IPID and is less than described 2nd IP mark maximum IPID mAXtime, extract described first TCP message as the first out of order TCP message;
TCP message out of order number statistics submodule, for adding up the next transmission sequence number TSN from described second transmission sequence number TSN, to described second transmission sequence number maximum of T SN mAXin, the number of the TCP message that all transmission sequence number TSN are corresponding, and the number of TCP message statistics obtained is as the out of order number of TCP message of described first out of order TCP message.
CN201510509636.3A 2015-08-18 2015-08-18 A kind of acquisition methods and device of TCP message error message Active CN105141476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510509636.3A CN105141476B (en) 2015-08-18 2015-08-18 A kind of acquisition methods and device of TCP message error message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510509636.3A CN105141476B (en) 2015-08-18 2015-08-18 A kind of acquisition methods and device of TCP message error message

Publications (2)

Publication Number Publication Date
CN105141476A true CN105141476A (en) 2015-12-09
CN105141476B CN105141476B (en) 2018-12-18

Family

ID=54726693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510509636.3A Active CN105141476B (en) 2015-08-18 2015-08-18 A kind of acquisition methods and device of TCP message error message

Country Status (1)

Country Link
CN (1) CN105141476B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800519A (en) * 2017-11-20 2018-03-13 烽火通信科技股份有限公司 The repeating method and retransmission system of a kind of packet
CN112491655A (en) * 2020-11-20 2021-03-12 中国建设银行股份有限公司 Method and device for determining TCP transmission exception type, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757248B1 (en) * 2000-06-14 2004-06-29 Nokia Internet Communications Inc. Performance enhancement of transmission control protocol (TCP) for wireless network applications
CN1520104A (en) * 2003-09-02 2004-08-11 中国科学院计算技术研究所 Method for raising transmission performance of TCP in isomerous networks
CN101056260A (en) * 2007-05-21 2007-10-17 中南大学 ECN mechanism-based congestion control method in the mixed network
CN102098150A (en) * 2009-12-10 2011-06-15 中兴通讯股份有限公司 Reception acknowledgement processing method and base station
CN102833783A (en) * 2012-07-02 2012-12-19 北京邮电大学 Method for optimizing terminal control protocol (TCP) under wireless environment
CN103986548A (en) * 2013-02-07 2014-08-13 华为技术有限公司 Method for determining packet loss reasons and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757248B1 (en) * 2000-06-14 2004-06-29 Nokia Internet Communications Inc. Performance enhancement of transmission control protocol (TCP) for wireless network applications
CN1520104A (en) * 2003-09-02 2004-08-11 中国科学院计算技术研究所 Method for raising transmission performance of TCP in isomerous networks
CN101056260A (en) * 2007-05-21 2007-10-17 中南大学 ECN mechanism-based congestion control method in the mixed network
CN102098150A (en) * 2009-12-10 2011-06-15 中兴通讯股份有限公司 Reception acknowledgement processing method and base station
CN102833783A (en) * 2012-07-02 2012-12-19 北京邮电大学 Method for optimizing terminal control protocol (TCP) under wireless environment
CN103986548A (en) * 2013-02-07 2014-08-13 华为技术有限公司 Method for determining packet loss reasons and terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800519A (en) * 2017-11-20 2018-03-13 烽火通信科技股份有限公司 The repeating method and retransmission system of a kind of packet
CN107800519B (en) * 2017-11-20 2020-12-01 烽火通信科技股份有限公司 Retransmission method and retransmission system of data packet
CN112491655A (en) * 2020-11-20 2021-03-12 中国建设银行股份有限公司 Method and device for determining TCP transmission exception type, electronic equipment and storage medium
CN112491655B (en) * 2020-11-20 2022-07-12 中国建设银行股份有限公司 Method and device for determining TCP transmission exception type, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105141476B (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN102474463B (en) Communication apparatus and communication method
CN102006283B (en) Data transmission method and device
US10798199B2 (en) Network traffic accelerator
CN102664718B (en) The method and apparatus that wireless side tcp data retransmits
CN102932461B (en) Network acceleration transmission method and device
CN106612284B (en) Streaming data transmission method and device
CN106452688A (en) Beidou data lost message retransmission method and system
CN115037700B (en) Complex network data packet transmission method, system, terminal and storage medium
CN107104902A (en) A kind of method, relevant apparatus and the system of RDMA data transfers
CN113259391B (en) Data transmission method and device applied to multi-level node network
CN107645409A (en) A kind of transmission fault reason method and device for determining data
CN108886713B (en) Data transmission method, data receiving equipment and data sending equipment
CN107317760B (en) SDU (service data Unit) segmentation processing method and data receiving end
WO2016095379A1 (en) Assistant positioning method and device for packet loss position and computer storage medium
CN105141476A (en) TCP message error information obtaining method and device
US20150023189A1 (en) Packet analysis device and packet analyzing method
CN106162739A (en) Method for controlling network congestion and system
CN106911644A (en) A kind of message recombining method and equipment
CN102957580B (en) Flow statistical method and flow statistical equipment
CN110855510A (en) Data transmission optimization method, device, equipment and medium
JP5958355B2 (en) Analysis apparatus, analysis method, and analysis program
CN109756306B (en) Information transmission method and communication device
CN109067503A (en) A kind of data repeating method and device
CN102340508B (en) Data transmission method and equipment
CN106341348B (en) A kind of flow control methods and access network elements towards TCP traffic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant