CN105141476B - A kind of acquisition methods and device of TCP message error message - Google Patents

A kind of acquisition methods and device of TCP message error message Download PDF

Info

Publication number
CN105141476B
CN105141476B CN201510509636.3A CN201510509636A CN105141476B CN 105141476 B CN105141476 B CN 105141476B CN 201510509636 A CN201510509636 A CN 201510509636A CN 105141476 B CN105141476 B CN 105141476B
Authority
CN
China
Prior art keywords
tcp message
message
tcp
sequence number
max
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.)
Active
Application number
CN201510509636.3A
Other languages
Chinese (zh)
Other versions
CN105141476A (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

Landscapes

  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides the acquisition methods and device of a kind of TCP message error message, wherein the described method includes: obtaining TCP message in real time in preset analysis site;According to current TCP message and first TCP message, extracts and retransmit TCP message;It obtains and retransmits the corresponding relevant parameter of TCP message;Relevant parameter is included in the re-transmission TCP message by before the analysis site, ACK number of confirmation character corresponding with TCP message is retransmitted;When relevant parameter meets the first preset condition, determine that the error message for retransmitting TCP message is the information for causing to retransmit by time-out.The embodiment of the present invention can obtain the error message for retransmitting TCP message accurately, in time, and the problem of retransmitting TCP message error message can not accurately be known by avoiding subsequent crawl.

Description

A kind of acquisition methods and device of TCP message error message
Technical field
The present invention relates to network communication technology field, a kind of acquisition methods more particularly to TCP message error message and A kind of acquisition device of TCP message error message.
Background technique
ICP/IP protocol by network layer IP agreement (Internet Protocol, the agreement interconnected between network) and pass The Transmission Control Protocol (Transmission Control Protocol, transmission control protocol) of defeated layer forms, and IP agreement is a kind of nothing Connection, insecure communication protocol, Transmission Control Protocol is a kind of connection-oriented, reliable transport protocol based on IP agreement, is Application layer provides reliable transmission service.
In order to ensure the reliability of data transmission, Transmission Control Protocol is using re-transmission and acknowledgement mechanism.In the transmission process of data In, when there is the abnormal transmissions state such as packet loss, random ordering and time-out, transmitting terminal can be to the TCP message for abnormal transmission state occur It is retransmitted.
The data of Transmission Control Protocol, which retransmit, to be meaned to have carried out duplicate transmission for same TCP message, this is just additionally occupied Unnecessary network broadband and flow will seriously affect the transmission performance of network, significantly when there is the re-transmission of a large amount of data Reduce the efficiency of transmission of network.When the efficiency of transmission for network occur low problem, the original for causing TCP message to retransmit is determined Cause determines that the error message of TCP message is the key that solve the problems, such as.
In first technology, it is common practice to, after the low problem of efficiency of transmission occurs, disposably grab a certain amount of TCP message, using third party's tool (such as SmartBit, WireShark, Sniffer tool) to the TCP message of crawl into Row analysis, so that it is determined that the error message of TCP message.
Due to first technology be re-transmission problem appearance after grab TCP message again, thus, only when cause retransmit the reason of It continuously repeats when occurring, can just access relatively reliable analysis as a result, however, in practical applications, retransmitting problem in majority In the case of not continuously repeat appearance, when re-transmission problem does not occur during grabbing TCP message, to re-transmission Problem grabs TCP message after occurring again and is analyzed, it is clear that can not accurately determine the error message of TCP message.
Summary of the invention
The embodiment of the present invention is used the technical problem to be solved is that a kind of acquisition methods of TCP message error message are provided Accurately to know the error message of TCP message.
Correspondingly, the embodiment of the invention also provides a kind of acquisition device of TCP message error message, it is above-mentioned to guarantee The realization and application of method.
To solve the above-mentioned problems, the embodiment of the invention discloses a kind of acquisition methods of TCP message error message, packets It includes:
TCP message is obtained in real time in preset analysis site;Acquired TCP message includes current TCP message and first TCP Message;
According to the current TCP message and the first TCP message, extracts and retransmit TCP message;
Obtain the corresponding relevant parameter of the re-transmission TCP message;The relevant parameter is included in the re-transmission TCP message warp Before crossing the analysis site, ACK number of confirmation character corresponding with the re-transmission TCP message;
When the relevant parameter meets the first preset condition, determine that the error message for retransmitting TCP message is by surpassing When cause retransmit information;First preset condition includes that described ACK number of confirmation character is less than first threshold.
Preferably, the relevant parameter includes the re-transmission TCP before the re-transmission TCP message passes through the analysis site The information whether corresponding original TCP message of message is put by analysis;The method also includes:
When the relevant parameter meets the second preset condition, determine the error message for retransmitting TCP message in institute Stating analysis site upstream packet loss leads to the information retransmitted;Second preset condition include described ACK number of confirmation character be greater than or Equal to the first threshold, and, the original TCP message does not pass through the analysis site.
Preferably, the method also includes:
The first out-of-order TCP message is extracted from the first TCP message, and counts the TCP of the described first out-of-order TCP message Packet out-ordering number;
From the extracted first out-of-order TCP message, the second random ordering TCP report corresponding with the re-transmission TCP message is obtained Text;
When the relevant parameter meets third preset condition, also, the TCP message random ordering of the described second out-of-order TCP message When number is greater than or equal to second threshold, determine that the error message for retransmitting TCP message is serious in the analysis site upstream Random ordering leads to the information retransmitted;The third preset condition includes that described ACK number of confirmation character is greater than or equal to described first Threshold value, and, the original TCP message passes through the analysis site.
Preferably, the method also includes:
When the relevant parameter meets the third preset condition, also, the TCP message of the described second out-of-order TCP message When out-of-order number is less than the second threshold, determine that the error message for retransmitting TCP message is to lose in the analysis site downstream Packet leads to the information retransmitted.
Preferably, described according to the current TCP message and the first TCP message, extract the step of retransmitting TCP message Include:
The first transmission sequence number TSN is extracted from the current TCP message, the first IP identifies IPID, and, from it is described The first transmission sequence number maximum of T SN is extracted in first TCP messageMAX, and by the first transmission sequence number maximum of T SNMAXIt is right The IP mark IPID answered is denoted as the first IP mark maximum value IPIDMAX
When the first transmission sequence number TSN is less than the first transmission sequence number maximum of T SNMAX, and, described One IP identifies IPID and is greater than the first IP mark maximum value IPIDMAXWhen, the current TCP message, which is extracted, as TCP is retransmitted reports Text;
Alternatively, when the first transmission sequence number TSN is greater than the first transmission sequence number maximum of T SNMAX, and, institute It states the first IP mark IPID and is less than the first IP mark maximum value IPIDMAXWhen, extract the previous of the current TCP message TCP message is as re-transmission TCP message.
Preferably, the first TCP message includes the first TCP message and the second TCP message, the second TCP message packet All TCP messages obtained before obtaining first TCP message are included, it is described that first is extracted from the first TCP message disorderly Sequence TCP message, and the step of counting the TCP message random ordering number of the described first out-of-order TCP message includes:
The second transmission sequence number TSN is extracted from first TCP message, the 2nd IP identifies IPID, and, from described the The second transmission sequence number maximum of T SN is extracted in two TCP messagesMAX, and by the second transmission sequence number maximum of T SNMAXIt is right The IP mark IPID answered is denoted as the 2nd IP mark maximum value IPIDMAX
When the second transmission sequence number TSN is less than the second transmission sequence number maximum of T SNMAX, and, described Two IP identify IPID and are less than the 2nd IP mark maximum value IPIDMAXWhen, first TCP message is extracted as the first random ordering TCP message;
Next transmission sequence number TSN from the second transmission sequence number TSN is counted, until second transmission sequence number Maximum of T SNMAXIn, the number of the corresponding TCP message of all transmission sequence number TSN;
The number for the TCP message that statistics is obtained is as the TCP message random ordering number of the 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 obtains module, for obtaining TCP message in real time in preset analysis site;Acquired TCP message includes Current TCP message and first TCP message;
TCP message extraction module is retransmitted, for extracting and retransmitting according to the current TCP message and the first TCP message TCP message;
Relevant parameter obtains module, for obtaining the corresponding relevant parameter of the re-transmission TCP message;The parameter includes Before the re-transmission TCP message is by the analysis site, ACK number of confirmation character corresponding with the re-transmission TCP message;
First error message determining module, for determining described heavy when the relevant parameter meets the first preset condition The error message for passing TCP message is the information for causing to retransmit by time-out;First preset condition includes the confirmation character ACK Number is less than first threshold.
Preferably, the relevant parameter includes the re-transmission TCP before the re-transmission TCP message passes through the analysis site The information whether corresponding original TCP message of message is put by analysis;Described device further include:
Second error message determining module, for determining described heavy when the relevant parameter meets the second preset condition The error message for passing TCP message is the information for causing to retransmit in analysis site upstream packet loss;Second preset condition includes Described ACK number of confirmation character is greater than or equal to the first threshold, and, the original TCP message is not by described point Analysis point.
Preferably, described device further include:
First out-of-order TCP message extraction module, for extracting the first out-of-order TCP message from the first TCP message, and Count the TCP message random ordering number of the described first out-of-order TCP message;
Second out-of-order TCP message obtains module, for from the extracted first out-of-order TCP message, obtain with it is described heavy Pass the corresponding second out-of-order TCP message of TCP message;
Third error message determining module, for meeting third preset condition, also, described second when the relevant parameter When the TCP message random ordering number of out-of-order TCP message is greater than or equal to second threshold, the error letter for retransmitting TCP message is determined Breath is the information for causing to retransmit in the serious random ordering in analysis site upstream;The third preset condition includes the confirmation character ACK number is greater than or equal to the first threshold, and, the original TCP message passes through the analysis site.
Preferably, described device further include:
4th error message determining module, for meeting the third preset condition when the relevant parameter, also, it is described When the TCP message random ordering number of second out-of-order TCP message is less than the second threshold, the error for retransmitting TCP message is determined Information is the information for causing to retransmit in analysis site downstream packet loss.
Preferably, the re-transmission TCP message extraction module includes:
First transmission sequence number TSN and IP identifies IPID extracting sub-module, for extracting the from the current TCP message One transmission sequence number TSN, the first IP identifies IPID, and, the first transmission sequence number maximum is extracted from the first TCP message Value TSNMAX, and by the first transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the first IP mark maximum value IPIDMAX
TCP message extracting sub-module is retransmitted, for being less than the first transmission queue as the first transmission sequence number TSN Number maximum of T SNMAX, and, the first IP mark IPID is greater than the first IP and identifies maximum value IPIDMAXWhen, extract institute Current TCP message is stated as re-transmission TCP message;
Alternatively, for being greater than the first transmission sequence number maximum of T SN as the first transmission sequence number TSNMAX, with And the first IP mark IPID is less than the first IP and identifies maximum value IPIDMAXWhen, before extracting the current TCP message One TCP message is as re-transmission TCP message.
Preferably, the first TCP message includes the first TCP message and the second TCP message, the second TCP message packet All TCP messages obtained before obtaining first TCP message are included, the described first out-of-order TCP message extraction module includes:
Second transmission sequence number TSN and IP identifies IPID extracting sub-module, for extracting the from first TCP message Two transmission sequence number TSN, the 2nd IP identify IPID, and, the second transmission sequence number maximum is extracted from second TCP message Value TSNMAX, and by the second transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the 2nd IP mark maximum value IPIDMAX
Out-of-order TCP message extracting sub-module, for being less than the second transmission queue as the second transmission sequence number TSN Number maximum of T SNMAX, and, the 2nd IP mark IPID is less than the 2nd IP and identifies maximum value IPIDMAXWhen, extract institute The first TCP message is stated as the first out-of-order TCP message;
TCP message random ordering number statistic submodule, for counting next transmission from the second transmission sequence number TSN Queue number TSN, until the second transmission sequence number maximum of T SNMAXIn, the corresponding TCP message of all transmission sequence number TSN Number, and the number for the TCP message that statistics is obtained is as the TCP message random ordering number of the described first out-of-order TCP message.
Compared with first technology, the embodiment of the present invention includes following advantages:
The embodiment of the present invention can obtain TCP message in real time at analysis site, extract re-transmission TCP message, as re-transmission TCP It when message is put by analysis, obtains and retransmits the corresponding ACK number of confirmation character of TCP message, confirm ACK number of character less than first Threshold value determines that the error message for retransmitting TCP message is the information for causing to retransmit by time-out, due to the embodiment of the present invention TCP message obtains online, runs through entire data flow to the analytic process of TCP message, once TCP message retransmits, energy It is enough to obtain the reason of TCP message retransmits in time, that is, know and retransmit TCP message error message, avoiding subsequent crawl can not be accurate Know the problem of retransmitting TCP message error message.
The TCP message of the embodiment of the present invention obtains in real time, only need to be in LTE when using LTE base station side as analysis site Base station side installs corresponding TCP message grabbing device, avoids first technology after TCP message retransmits problem appearance, then It arranges relevant personnel to climb up the troublesome operation that base station carries out TCP message crawl, saves the time spent by crawl TCP message And cost.
The embodiment of the present invention can not only know the reason of causing TCP message to retransmit, additionally it is possible to obtain TCP message and retransmit hair Raw transmission zone (being specifically to occur in analysis site upstream or occur in analysis site downstream), avoids first technology needs Technical professional can know that TCP message retransmits the embarrassment of the network segment occurred by secondary manual analysis.
Detailed description of the invention
Fig. 1 is the communication scheme of wireless network LTE;
Fig. 2 is a kind of step flow chart of the acquisition methods embodiment 1 of TCP message error message of the invention;
Fig. 3 a is to retransmit model A schematic diagram;
Fig. 3 b is to retransmit Model B schematic diagram;
Fig. 4 a, which is a time out, to be caused to retransmit schematic diagram;
Fig. 4 b is that analysis site upstream packet loss causes to retransmit schematic diagram;
Fig. 5 is a kind of step flow chart of the acquisition methods embodiment 2 of TCP message error message of the invention;
Fig. 6 is out-of-order model schematic;
Fig. 7 a is that the serious random ordering in analysis site upstream causes to retransmit schematic diagram;
Fig. 7 b is that analysis site downstream packet loss causes to retransmit schematic diagram;
Fig. 8 is a kind of structural block diagram of the acquisition device embodiment of TCP message error message of the invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
One of the core concepts of the embodiments of the present invention is that the embodiment of the present invention can obtain TCP in real time at analysis site Message extracts re-transmission TCP message, when re-transmission TCP message is put by analysis, obtains and retransmits the corresponding confirmation word of TCP message ACK number is accorded with, confirmation ACK number of character is less than first threshold, determines that the error message for retransmitting TCP message is to be led by time-out The information retransmitted is caused, since the TCP message of the embodiment of the present invention obtains online, whole is run through to the analytic process of TCP message A data flow can obtain the reason of TCP message retransmits in time, that is, know re-transmission TCP message once TCP message retransmits Error message, the problem of retransmitting TCP message error message can not accurately be known by avoiding subsequent crawl.
Fig. 1 is the communication scheme of wireless network LTE (Long Term Evolution), the composition packet of wireless network LTE Include mobile terminal 101, LTE base station 102, passback net 103, core net 104, router (not indicating in figure) and internet 105 (Internet), the communication process of mobile terminal and internet is as follows:
In data downstream, TCP message is routed to core net by router by internet 105 (data sending terminal) 104, core net carries out GTP tunnel encapsulation to TCP message, adds the tunnel GTPU head, is sent to LTE base station by tunnel style 102, LTE base station removes the tunnel GTPU head, is sent to corresponding mobile terminal 101 (data receiver) by Radio Link; Data uplink is opposite with the communication process of data downstream.
The embodiment of the present invention is by taking wireless network LTE as an example, and the present invention will be described in detail.
It should be noted that those skilled in the art should know that the embodiment of the present invention can be not only used for wireless network LTE can be also used for cable network and other wireless networks.
Embodiment one:
Referring to Fig. 2, a kind of step process of the acquisition methods embodiment 1 of TCP message error message of the invention is shown Figure, can specifically include following steps:
Step 201, TCP message is obtained in real time in preset analysis site;
In wireless network LTE, the analysis site of the embodiment of the present invention can be mobile terminal, LTE base station, be also possible to core Other network elements such as heart net, the embodiment of the present invention to this with no restriction.
It should be noted that inventive embodiments, which can be applied, carries out the entire of TCP message interaction in transmitting terminal and receiving end The process of data flow.
The embodiment of the present invention can will have the device of crawl TCP message function be mounted on analysis site, in transmitting terminal to connecing During receiving end sends TCP message, when TCP message is put by analysis, TCP message can be obtained in real time, TCP message is deposited Storage is in the buffer.
Since the TCP message of the embodiment of the present invention can obtain in real time, and cover the entire data of TCP message interaction Stream can be avoided first technology after TCP message retransmits problem appearance, then arrange when using LTE base station side as analysis site Relevant personnel climb up base station carry out TCP message crawl troublesome operation, save crawl TCP message spent by the time and at This.
In a particular application, the TCP message of acquisition may include current TCP message and first TCP message, that is, will acquire TCP message is divided into current TCP message and first TCP message, wherein current TCP message can refer to the TCP obtained at current time Message, first TCP message can be all TCP messages obtained before current time.
Step 202, it according to the current TCP message and the first TCP message, extracts and retransmits TCP message;
The embodiment of the present invention can be extracted according to current TCP message and the first TCP message and retransmit TCP message.
In one preferred embodiment of the invention, step 202 may include following sub-step:
Sub-step S11 extracts the first transmission sequence number TSN, the first IP from the current TCP message and identifies IPID, with And the first transmission sequence number maximum of T SN is extracted from the first TCP messageMAX, and most by first transmission sequence number Big value TSNMAXCorresponding IP mark IPID is denoted as the first IP mark maximum value IPIDMAX
In a particular application, TCP message includes TCP header and IPV4 head, wherein TCP header includes transmission sequence number TSN (Transmission Sequence Number), IPV4 include IP mark IPID (IPIdentification).
Transmission sequence number TSN can be increased continuously, and indicate that TCP message is delivered ICP/IP protocol stack by TCP message transmitting terminal Sequence, IP mark IPID indicates that TCP message leaves the sequence of ICP/IP protocol stack.
The embodiment of the present invention can extract the first transmission sequence number TSN, the first IP from current TCP message and identify IPID, The first transmission sequence number maximum of T SN is extracted from first TCP messageMAX, and by the first transmission sequence number maximum value TSNMAXCorresponding IP mark IPID is denoted as the first IP mark maximum value IPIDMAX
Transmission sequence number TSN is specifically parsed from the TCP header of TCP message, is parsed from the IPV4 head of TCP message IP identifies IPID.
First transmission sequence number maximum of T SNMAXIt is the transmission sequence number TSN of all TCP messages in first TCP message Maximum value, the first IP identify maximum value IPIDMAXIt is the first transmission sequence number maximum of T SNMAXCorresponding IP identifies IPID, can With from the first transmission sequence number maximum of T SNMAXIt parses and obtains in the IPV4 head of corresponding TCP message, that is to say, that first passes Defeated queue number maximum of T SNMAXWith the first transmission sequence number maximum of T SNMAXIt is to be extracted from the same TCP message.
In actual operation, the first transmission sequence number maximum of T SNMAXMaximum value IPID is identified with the first IPMAXAcquisition It is a dynamic process, with the variation for the TCP message that analysis site obtains, the first transmission sequence number maximum of T SNMAXWith One IP identifies maximum value IPIDMAXIt may also be with variation.
Specifically, transmission sequence number TSN and IP the mark IPID for the TCP message that most initial obtains can be respectively as obtaining Take the first transmission sequence number maximum of T SN at most initial TCP message momentMAXMaximum value IPID is identified with the first IPMAXIt is deposited Storage, when obtaining next TCP message, the transmission sequence number TSN for the next TCP message that can be will acquire and the first of storage Transmission sequence number maximum of T SNMAXIt is compared, the maximum value in the two is updated to the first transmission sequence number maximum value TSNMAX, and by the first transmission sequence number maximum of T SNMAXThe IP mark IPID of corresponding TCP message is updated to the first IP mark Maximum value IPIDMAX
In embodiments of the present invention, when the first transmission sequence number TSN is less than the first transmission sequence number maximum value TSNMAX, and, the first IP mark IPID is greater than the first IP and identifies maximum value IPIDMAXWhen, sub-step S12a is executed, When the first transmission sequence number TSN is greater than the first transmission sequence number maximum of T SNMAX, and, the first IP mark IPID is less than the first IP and identifies maximum value IPIDMAXWhen, execute sub-step S12b.
Sub-step S12a extracts the current TCP message as re-transmission TCP message;
In embodiments of the present invention, when the first transmission sequence number TSN is less than the first transmission sequence number maximum value TSNMAX, and, the first IP mark IPID is greater than the first IP and identifies maximum value IPIDMAXWhen, extract current TCP message As re-transmission TCP message.
As an example, as shown in Figure 3a, describing in the form of (TSN, IPID), the TCP message that transmitting terminal is sent is respectively as follows: (1,1), (2,2), (3,3), (4,4), (3,5), currently, analysis site obtain TCP message be respectively as follows: (1,1), (2,2), (4, 4), (3,5), wherein (1,1), (2,2), (4,4) are the first TCP message that analysis site obtains, and (3,5) are what analysis site obtained Current TCP message, is apparent from, and the first transmission sequence number TSN and the first IP mark IPID are respectively 3 and 5, and the first transmission sequence number is most Big value TSNMAXMaximum value IPID is identified with the first IPMAXIt is 4, due to 3 < 4, and, 5 > 4, therefore, can extract (3,5) is Retransmit TCP message.
Sub-step S12b extracts the previous TCP message of the current TCP message as re-transmission TCP message.
In embodiments of the present invention, when the first transmission sequence number TSN is greater than the first transmission sequence number maximum value TSNMAX, and, the first IP mark IPID is less than the first IP and identifies maximum value IPIDMAXWhen, extract current TCP message Previous TCP message as retransmit TCP message.
As an example, as shown in Figure 3b, describing in the form of (TSN, IPID), the TCP message that transmitting terminal is sent is respectively as follows: (1,1), (2,2), (3,3), (4,4), (3,5), currently, the TCP message that analysis site is got be respectively as follows: (1,1), (2,2), (3,5), (4,4), wherein (1,1), (2,2), (3,5) are the first TCP message that analysis site obtains, and (4,4) are analysis site acquisition Current TCP message, be apparent from, the first transmission sequence number TSN and the first IP mark IPID are 4, and the first transmission sequence number is maximum Value TSNMAXMaximum value IPID is identified with the first IPMAXRespectively 3 and 5, due to 4 > 3, and, therefore 4 < 5 can extract (3,5) To retransmit TCP message.
Step 203, the corresponding relevant parameter of the re-transmission TCP message is obtained;
Step 204, when the relevant parameter meets the first preset condition, the error letter for retransmitting TCP message is determined Breath is by the overtime information for causing to retransmit;
The corresponding relevant parameter of the available re-transmission TCP message of the embodiment of the present invention, relevant parameter may include retransmitting Before message is put by analysis, ACK number of confirmation character corresponding with the re-transmission TCP message.
In embodiments of the present invention, retransmitting the corresponding confirmation character ACK of TCP message can obtain at analysis site.In number According in communication, confirmation character (Acknowledgement, ACK) is a kind of transmission class control word that receiving end is sent to transmitting terminal Symbol, to indicate that the TCP message sent has confirmed that reception is errorless, if some TCP message does not reach receiving end, receiving end can be with needle The TCP message not reached is repeated to send confirmation character ACK to transmitting terminal.
In a particular application, retransmitting the corresponding ACK number of confirmation character of TCP message can be for re-transmission TCP message pair The original TCP message answered is read really accords with ACK number, and the original message is the TCP message that transmitting terminal is sent, for example, if weight Passing TCP message is (3,5), then, original TCP message is (3,3), and confirmation ACK number of character can be for original TCP message (3,3) read really accords with the number of ACK.
As a specific example, it is assumed that transmitting terminal send TCP message be (1,1), (2,2), (3,3), (4,4), (5, 5), (3,6), the received TCP message in receiving end are (1,1), (2,2), (4,4), (5,5), (3,6), i.e. intercalary delection TCP report Literary (3,3), then, when receiving (4,4) and (5,5), receiving end can all send confirmation character ACK for TCP message (3,3) To transmitting terminal, to inform transmitting terminal TCP message (3,3), there are no arrival, until retransmitting TCP message (3,6) and reaching, that , when retransmitting TCP message (3,6) arrival, retransmitting TCP message (3,6) corresponding ACK number of confirmation character is 2.
The embodiment of the present invention is when relevant parameter meets the first preset condition, i.e., when confirmation corresponding with TCP message is retransmitted When ACK number of character is less than first threshold, determine that the error message of the re-transmission TCP message is the information for causing to retransmit by time-out, That is, the TCP message is to cause to retransmit due to time-out.
In general, first threshold can take 3, those skilled in the art can also set the big of first threshold according to actual needs It is small, the embodiment of the present invention to this with no restriction.
As an example, as shown in fig. 4 a, it is assumed that first threshold takes 3, the TCP message that transmitting terminal is sent is (1,1), (2,2), (3,3), (4,4), (5,5), (6,6) ..., (3,21), the TCP message received at analysis site may include (1,1), (2,2), (3,21) and other TCP messages, message (3,21) are to retransmit TCP message, and corresponding original TCP message is (3,3), only Meet and do not monitor reading really for original TCP message (3,3) and accord with ACK more than or equal to 3 times at analysis site, i.e., It can determine that retransmitting TCP message (3,21) is as caused by time-out.
In one preferred embodiment of the invention, the relevant parameter includes working as described in re-transmission TCP message process Before analysis site, the information for retransmitting the corresponding original TCP message of TCP message and whether putting by analysis;The method also includes:
When the relevant parameter meets the second preset condition, determine the error message for retransmitting TCP message in institute Stating analysis site upstream packet loss leads to the information retransmitted.
Wherein, the second preset condition includes confirmation ACK number of character more than or equal to the first threshold, and, it is original TCP message does not pass through the analysis site.
Original TCP message is the TCP message that the corresponding transmitting terminal of the re-transmission TCP message is sent, for example, if retransmitting TCP report Text is (3,5), then, original TCP message is (3,3).
ACK number is accorded with more than or equal to first when monitoring to read really for original TCP message (3,3) at analysis site Threshold value, also, when original TCP message is not put by analysis, determine that the error message for retransmitting TCP message is in analysis site upstream Packet loss leads to the information retransmitted.
In a particular application, original TCP message whether by analysis point can be determined in the following manner, it is assumed that retransmitted TCP message is (3,5):
The TCP message storage that can be will acquire due to analysis site in the buffer, when retransmitting TCP message (3,5) by analysis When point, it can search whether that there are TCP message (3,3) in the buffer, and if it exists, then illustrate that original TCP message (3,3) is heavy at this It passes TCP message and puts preceding point by analysis by analysis, if it does not exist, then illustrate that original TCP message (3,3) is reported in re-transmission TCP Point is preceding without point by analysis by analysis for text.
As an example, as shown in Figure 4 b, it is assumed that first threshold takes 3, the TCP message that transmitting terminal is sent is (1,1), (2,2), (3,3), (4,4), (5,5), (6,6) ..., (3,21), the TCP message received at analysis site include (1,1), (2,2), (4,4), (5,5), (6,6) ..., (3,21), message (3,21) is to retransmit TCP message, and corresponding original TCP message is (3,3), when retransmitting TCP message (3,21) and putting by analysis, monitor original TCP message (3,3) there is no point by analysis, Also, since TCP message (3,3) reach receiving end there is no normal, then, when receiving end receive (4,4), (5, 5) a confirmation character ACK ..., can be all sent when (20,20) to transmitting terminal, to inform that transmitting terminal TCP message (3,3) does not have also There is arrival, when TCP message (3,21) is put by analysis, counts on to read really for original TCP message (3,3) and accord with ACK Number is 17, is greater than 3, it is possible to determine that retransmitting TCP message (3,21) is since original TCP message (3,3) is in analysis site upstream Caused by packet loss, for example, original TCP message (3,3) is lost in the transmission process of transmitting terminal to LTE base station.
The TCP message of the embodiment of the present invention obtains online, runs through entire data flow to the analytic process of TCP message, Once TCP message retransmits, the reason of TCP message retransmits can be obtained in time, that is, is known and retransmitted TCP message error message, The problem of retransmitting TCP message error message can not accurately be known by avoiding subsequent crawl.
Meanwhile the embodiment of the present invention can not only know the reason of causing TCP message to retransmit, additionally it is possible to obtain TCP message The transmission zone (being specifically to occur in analysis site upstream or occur in analysis site downstream) occurred is retransmitted, first skill is avoided Art needs technical professional that can know that TCP message retransmits the awkward of the network segment occurred by secondary manual analysis A word used for translation.
Embodiment two:
Referring to Fig. 5, a kind of step process of the acquisition methods embodiment 2 of TCP message error message of the invention is shown Figure, can specifically include following steps:
Step 301, TCP message is obtained in real time in preset analysis site;
Wherein, acquired TCP message may include current TCP message and first TCP message.
Step 302, it according to the current TCP message and the first TCP message, extracts and retransmits TCP message;
Step 303, the corresponding relevant parameter of the re-transmission TCP message is obtained;
Wherein, relevant parameter may include retransmitting TCP message by before the analysis site, corresponding with TCP message is retransmitted Really it reads and accords with ACK number, and, before retransmitting TCP message and putting by analysis, retransmit the corresponding original TCP message of TCP message The information whether put by analysis.
In embodiments of the present invention, when relevant parameter meets the first preset condition, i.e., when corresponding with TCP message is retransmitted When confirming that ACK number of character is less than first threshold, determine that the error message of the re-transmission TCP message is the letter for causing to retransmit by time-out Breath, that is to say, that the TCP message is to cause to retransmit due to time-out.
When the relevant parameter meets the second preset condition, i.e., when confirmation ACK number of character is more than or equal to described the One threshold value, and, when original TCP message is not put by analysis, determine that the error message for retransmitting TCP message is on analysis site Trip packet loss leads to the information retransmitted.
Step 304, the first out-of-order TCP message is extracted from the first TCP message, and counts the first random ordering TCP The TCP message random ordering number of message;
In embodiments of the present invention, first TCP message can be all TCP report obtained before obtaining current TCP message Text, first TCP message may include the first TCP message and the second TCP message, and the second TCP message may include obtaining first All TCP messages obtained before 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 one and move The process of state, for example, when the first TCP message got at analysis site includes 2, including current TCP message is i.e. in total 3 TCP messages are obtained, the first TCP message can be the 2nd TCP message, and the second TCP message may include the 1st TCP report Text;When continuing to get next TCP message at analysis site, first TCP message is 3, at this point, the first TCP message can To be the 3rd TCP message, the second TCP message may include the 1st and the 2nd TCP message;Continue to get TCP report subsequent Wen Shi, the division of the first TCP message and the second TCP message can with and so on.
In one preferred embodiment of the invention, first TCP message may include the first TCP message and the 2nd TCP report Text, the second TCP message may include all TCP messages obtained before obtaining first TCP message, then step 304 can be with Including following sub-step:
Sub-step S21 extracts the second transmission sequence number TSN, the 2nd IP from first TCP message and identifies IPID, with And the second transmission sequence number maximum of T SN is extracted from second TCP messageMAX, and most by second transmission sequence number Big value TSNMAXCorresponding IP mark IPID is denoted as the 2nd IP mark maximum value IPIDMAX
It should be noted that the second transmission sequence number maximum of T SNMAXIt is the transmission queue in the second all TCP messages The maximum value of number TSN, the 2nd IP identify maximum value IPIDMAXIt is the second transmission sequence number maximum of T SNMAXCorresponding IP mark IPID, can be from the second transmission sequence number maximum of T SNMAXIt is extracted in corresponding TCP message.
Sub-step S22, when the second transmission sequence number TSN is less than the second transmission sequence number maximum of T SNMAX, with And the 2nd IP mark IPID is less than the 2nd IP and identifies maximum value IPIDMAXWhen, extract the first TCP message conduct First out-of-order TCP message.
As an example, as shown in fig. 6, transmitting terminal send TCP message include (1,1), (2,2), (3,3), (4,4), (5, 5) and (6,6), the TCP message obtained at analysis site include (1,1), (2,2), (5,5), (3,3), (4,4) and (6,6), TCP message (4, the 4) moment is being got, first TCP message includes (1,1), (2,2), (5,5) and (3,3), then, the first TCP Message be (3,3), the second TCP message include (1,1), (2,2) and (5,5), at this point, extract the second transmission sequence number TSN with It is 3 that 2nd IP, which identifies IPID, the second transmission sequence number maximum of T SNMAXMaximum value IPID is identified with the 2nd IPMAXIt is 5, easily Know, meets the second transmission sequence number TSN less than the second transmission sequence number maximum of T SNMAX, and the 2nd IP mark IPID is less than the Two IP identify maximum value IPIDMAX, then extracting TCP message (3,3) is the first out-of-order message;When continuing to get at analysis site When (6,6), first TCP message include (1,1), (2,2), (5,5), (3,3) and (4,4), then, the first TCP message for (4, 4), the second TCP message includes (1,1), (2,2), (5,5) and (3,3), at this point, the second transmission sequence number TSN and second extracted It is 4 that IP, which identifies IPID, the second transmission sequence number maximum of T SNMAXMaximum value IPID is identified with the 2nd IPMAXIt is 5, it is same full The second transmission sequence number TSN of foot is less than the second transmission sequence number maximum of T SNMAX, and the 2nd IP mark IPID is marked less than the 2nd IP Know maximum value IPIDMAX, then extracting TCP message (4,4) is the first out-of-order message.
Sub-step S23 counts next transmission sequence number TSN from the second transmission sequence number TSN, until described second Transmission sequence number maximum of T SNMAXIn, the number of the corresponding TCP message of all transmission sequence number TSN;
The number of sub-step S24, the TCP message that statistics is obtained are random as the TCP message of the described first out-of-order TCP message Sequence number.
For example, it is assumed that at analysis site obtain TCP message include: (1,1), (2,2), (4,4) (5,5), (6, 6) ..., (15,15), (3,3).Referring to the extracting rule of the aforementioned first out-of-order message, it is known that be (3,3) the first out-of-order report Literary (and first TCP message).
The corresponding transmission sequence number TSN of first random ordering message (3,3) (and first TCP message) is the second transmission queue Number TSN, i.e. the second transmission sequence number TSN are 3, then next transmission sequence number TSN of the second transmission sequence number TSN is 4.
The embodiment of the present invention can from next transmission sequence number TSN of the transmission sequence number TSN of the first out-of-order message, until Second transmission sequence number maximum of T SNMAXIn, the number of the corresponding TCP message of all transmission sequence number TSN.
That is, statistics (1,1), (2,2), (4,4), (5,5), (6,6) ..., (15,15), (3,3) TCP report Text, the number of the corresponding TCP message of all transmission sequence number TSN in transmission sequence number TSN from 4 to 15.
It is recognised that (1,1), (2,2), (4,4), (5,5), (6,6) ..., (15,15), in (3,3) TCP message, pass In defeated queue number TSN from 4 to 15 the corresponding TCP message of all transmission sequence number TSN include (4,4), (5,5), (6,6) ..., (15,15), thus, the number for counting the TCP message of acquisition is 12, then, the corresponding TCP message of the first random ordering TCP message is random Sequence number is also 12.
Step 305, from the extracted first out-of-order TCP message, corresponding with the re-transmission TCP message second is obtained disorderly Sequence TCP message;
In practical applications, due to the first out-of-order TCP message, including TCP message acquired before acquisition re-transmission TCP message In all out-of-order TCP messages, thus, the first out-of-order TCP message may include 0,1,2 or 2 or more.
The embodiment of the present invention can obtain corresponding with re-transmission TCP message the from the extracted first out-of-order TCP message Two out-of-order TCP messages, specifically, the second out-of-order TCP message is identical, example with the transmission sequence number TSN for retransmitting TCP message Such as, if retransmitting TCP message is (3,21), then the corresponding second out-of-order TCP message is (3,3) with (3,21).
Step 306, when the relevant parameter meets third preset condition, also, the TCP of the described second out-of-order TCP message When packet out-ordering number is greater than or equal to second threshold, determine that the error message for retransmitting TCP message is in the analysis site The serious random ordering in upstream leads to the information retransmitted.
In embodiments of the present invention, third preset condition may include that confirmation ACK number of character is greater than or equal to the first threshold Value, and, original TCP message point by analysis.
The corresponding ACK number of confirmation character of TCP message is retransmitted more than or equal to first threshold when meeting, and retransmits TCP message Corresponding original TCP message point by analysis, also, the TCP message random ordering number of the second out-of-order TCP message is greater than or equal to the When two threshold values, it can determine that the error message of the re-transmission TCP message is to cause to retransmit in the serious random ordering in analysis site upstream Information.
In embodiments of the present invention, serious random ordering refers to that the TCP message random ordering number of the second out-of-order TCP message is more than or equal to Second threshold and cause retransmit situation.
Second threshold usually can be with value 3, certainly, and those skilled in the art can set second threshold according to actual needs Size.
As an example, as shown in Figure 7a, it is assumed that first threshold takes 3, the TCP message that transmitting terminal is sent include: (1,1), (2, 2), (3,3), (4,4) ..., (14,14), (15,15), (16,16) ... (3,21) receive at analysis site TCP message include: (1,1), (2,2), (4,4), (5,5) ..., (15,15), (3,3), (16,16) ..., (3, 21)。
Message (3,21) is to retransmit TCP message, and corresponding original TCP message is (3,3), is retransmitting TCP message (3,21) When putting by analysis, original TCP message (3,3) once point by analysis is monitored, also, not due to TCP message (3,3) It is normal to reach receiving end, then, a confirmation character ACK can be all sent when receiving end receives (4,4), (5,5), (6,6) To transmitting terminal, to inform transmitting terminal TCP message (3,3), there are no arrival, when TCP message (3,21) is put by analysis, statistics To for original TCP message (3,3) read really accord with ACK number be 3, meanwhile, second random ordering TCP message (3,3) TCP message Out-of-order number is 12, is more than or equal to 3, then can determine that retransmitting TCP message (3,21) is since original TCP message (3,3) exists Caused by the serious random ordering in analysis site upstream.
In one preferred embodiment of the invention, when relevant parameter meets third preset condition, also, the second random ordering When the TCP message random ordering number of TCP message is less than the second threshold, determine that the error message for retransmitting TCP message is to analyze Point downstream packet loss leads to the information retransmitted.
As an example, as shown in Figure 7b, it is assumed that first threshold takes 3, the TCP message that transmitting terminal is sent include: (1,1), (2, 2), (3,3), (4,4), (5,5), (6,6) ..., (20,20), (3,21), the TCP message received at analysis site includes (1,1), (2,2), (4,4), (3,3), (5,5), (6,6) ..., (20,20), (3,21).
Message (3,21) is to retransmit TCP message, and corresponding original TCP message is (3,3), is retransmitting TCP message (3,21) When putting by analysis, original TCP message (3,3) once point by analysis is monitored, also, not due to TCP message (3,3) It is normal to reach receiving end, then, when receiving end receive (4,4), (5,5) ..., (20,20) when can all send a confirmation Character ACK is to transmitting terminal, to inform transmitting terminal TCP message (3,3) there are no arrival, when TCP message (3,21) point by analysis When, it counts on and reads that accord with ACK number be 17 really for original TCP message (3,3), meanwhile, the TCP of the second out-of-order TCP message Packet out-ordering number is 1, less than 3, then can determine that retransmitting TCP message (3,21) is since original TCP message (3,3) is being divided Caused by analysis point downstream packet loss.
Since embodiment one and embodiment two have similarity, not exhaustive place is mutual in embodiment one or embodiment two Referring to.
Need it is bright, for embodiment of the method, for simple description, therefore, it is stated as it is a series of movement say group It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Referring to Fig. 8, a kind of structural block diagram of the acquisition device embodiment of TCP message error message of the present invention, tool are shown Body may include following module:
TCP message obtains module 401, for obtaining TCP message in real time in preset analysis site;Acquired TCP message Including current TCP message and first TCP message;
TCP message extraction module 402 is retransmitted, for extracting according to the current TCP message and the first TCP message Retransmit TCP message;
Relevant parameter obtains module 403, for obtaining the corresponding relevant parameter of the re-transmission TCP message;The association ginseng Number is included in the re-transmission TCP message by before the analysis site, confirmation character ACK corresponding with the re-transmission TCP message is a Number;
First error message determining module 404, described in determining when the relevant parameter meets the first preset condition The error message for retransmitting TCP message is the information for causing to retransmit by time-out;First preset condition includes the confirmation character ACK number is less than first threshold.
In one preferred embodiment of the invention, the relevant parameter includes working as described in re-transmission TCP message process Before analysis site, the information for retransmitting the corresponding original TCP message of TCP message and whether putting by analysis;Described device further include:
Second error message determining module, for determining described heavy when the relevant parameter meets the second preset condition The error message for passing TCP message is the information for causing to retransmit in analysis site upstream packet loss;Second preset condition includes Described ACK number of confirmation character is greater than or equal to the first threshold, and, the original TCP message is not by described point Analysis point.
In one preferred embodiment of the invention, described device further include:
First out-of-order TCP message extraction module, for extracting the first out-of-order TCP message from the first TCP message, and Count the TCP message random ordering number of the described first out-of-order TCP message;
Second out-of-order TCP message obtains module, for from the extracted first out-of-order TCP message, obtain with it is described heavy Pass the corresponding second out-of-order TCP message of TCP message;
Third error message determining module, for meeting third preset condition, also, described second when the relevant parameter When the TCP message random ordering number of out-of-order TCP message is greater than or equal to second threshold, the error letter for retransmitting TCP message is determined Breath is the information for causing to retransmit in the serious random ordering in analysis site upstream;The third preset condition includes the confirmation character ACK number is greater than or equal to the first threshold, and, the original TCP message passes through the analysis site.
In one preferred embodiment of the invention, described device further include:
4th error message determining module, for meeting the third preset condition when the relevant parameter, also, it is described When the TCP message random ordering number of second out-of-order TCP message is less than the second threshold, the error for retransmitting TCP message is determined Information is the information for causing to retransmit in analysis site downstream packet loss.
In one preferred embodiment of the invention, the re-transmission TCP message extraction module includes:
First transmission sequence number TSN and IP identifies IPID extracting sub-module, for extracting the from the current TCP message One transmission sequence number TSN, the first IP identifies IPID, and, the first transmission sequence number maximum is extracted from the first TCP message Value TSNMAX, and by the first transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the first IP mark maximum value IPIDMAX
TCP message extracting sub-module is retransmitted, for being less than the first transmission queue as the first transmission sequence number TSN Number maximum of T SNMAX, and, the first IP mark IPID is greater than the first IP and identifies maximum value IPIDMAXWhen, extract institute Current TCP message is stated as re-transmission TCP message;
Alternatively, for being greater than the first transmission sequence number maximum of T SN as the first transmission sequence number TSNMAX, with And the first IP mark IPID is less than the first IP and identifies maximum value IPIDMAXWhen, before extracting the current TCP message One TCP message is as re-transmission TCP message.
In one preferred embodiment of the invention, the first TCP message includes that the first TCP message and the 2nd TCP are reported Text, second TCP message include all TCP messages obtained before obtaining first TCP message, and described first is out-of-order TCP message extraction module may include:
Second transmission sequence number TSN and IP identifies IPID extracting sub-module, for extracting the from first TCP message Two transmission sequence number TSN, the 2nd IP identify IPID, and, the second transmission sequence number maximum is extracted from second TCP message Value TSNMAX, and by the second transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the 2nd IP mark maximum value IPIDMAX
Out-of-order TCP message extracting sub-module, for being less than the second transmission queue as the second transmission sequence number TSN Number maximum of T SNMAX, and, the 2nd IP mark IPID is less than the 2nd IP and identifies maximum value IPIDMAXWhen, extract institute The first TCP message is stated as the first out-of-order TCP message;
TCP message random ordering number statistic submodule, for counting next transmission from the second transmission sequence number TSN Queue number TSN, until the second transmission sequence number maximum of T SNMAXIn, the corresponding TCP message of all transmission sequence number TSN Number, and the number for the TCP message that statistics is obtained is as the TCP message random ordering number of the described first out-of-order TCP message.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of acquisition methods and a kind of TCP message error letter of TCP message error message provided by the present invention The acquisition device of breath, is described in detail, and specific case used herein carries out the principle of the present invention and embodiment It illustrates, the above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile for ability The those skilled in the art in domain, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, comprehensive Upper described, the contents of this specification are not to be construed as limiting the invention.

Claims (12)

1. a kind of acquisition methods of TCP message error message characterized by comprising
TCP message is obtained in real time in preset analysis site;Acquired TCP message includes current TCP message and first TCP report Text;
According to the current TCP message and the first TCP message, extracts and retransmit TCP message;
Obtain the corresponding relevant parameter of the re-transmission TCP message;The relevant parameter is included in the re-transmission TCP message by institute Before stating analysis site, ACK number of confirmation character corresponding with the re-transmission TCP message;
When the relevant parameter meets the first preset condition, determine that the error message for retransmitting TCP message is to be led by time-out Cause the information retransmitted;First preset condition includes that described ACK number of confirmation character is less than first threshold.
2. the method according to claim 1, wherein the relevant parameter includes when the re-transmission TCP message passes through Before crossing the analysis site, the information for retransmitting the corresponding original TCP message of TCP message and whether putting by analysis;The method Further include:
When the relevant parameter meets the second preset condition, determine that the error message for retransmitting TCP message is at described point Analysis point upstream packet loss leads to the information retransmitted;Second preset condition includes that described ACK number of confirmation character is greater than or equal to The first threshold, and, the original TCP message does not pass through the analysis site.
3. according to the method described in claim 2, it is characterized by further comprising:
The first out-of-order TCP message is extracted from the first TCP message, and counts the TCP message of the described first out-of-order TCP message Out-of-order number;
From the extracted first out-of-order TCP message, the corresponding with the re-transmission TCP message second out-of-order TCP message is obtained;
When the relevant parameter meets third preset condition, also, the TCP message random ordering number of the described second out-of-order TCP message When more than or equal to second threshold, determine that the error message for retransmitting TCP message is seriously out-of-order in the analysis site upstream Lead to the information retransmitted;The third preset condition includes that described ACK number of confirmation character is greater than or equal to the first threshold, And the original TCP message passes through the analysis site.
4. according to the method described in claim 3, it is characterized by further comprising:
When the relevant parameter meets the third preset condition, also, the TCP message random ordering of the described second out-of-order TCP message When number is less than the second threshold, determine that the error message for retransmitting TCP message is to lead in analysis site downstream packet loss Cause the information retransmitted.
5. method according to claim 1 or 2 or 3 or 4, which is characterized in that described according to the current TCP message and institute First TCP message is stated, extracting the step of retransmitting TCP message includes:
The first transmission sequence number TSN is extracted from the current TCP message, the first IP identifies IPID, and, from it is described formerly The first transmission sequence number maximum of T SN is extracted in TCP messageMAX, and by the first transmission sequence number maximum of T SNMAXIt is corresponding IP mark IPID be denoted as the first IP mark maximum value IPIDMAX
When the first transmission sequence number TSN is less than the first transmission sequence number maximum of T SNMAX, and, the first IP It identifies IPID and is greater than the first IP mark maximum value IPIDMAXWhen, the current TCP message is extracted as re-transmission TCP message;
Alternatively, when the first transmission sequence number TSN is greater than the first transmission sequence number maximum of T SNMAX, and, described One IP identifies IPID and is less than the first IP mark maximum value IPIDMAXWhen, extract the previous TCP report of the current TCP message Text is as re-transmission TCP message.
6. the method according to claim 3 or 4, which is characterized in that the first TCP message include the first TCP message and Second TCP message, second TCP message includes all TCP messages obtained before obtaining first TCP message, described The first out-of-order TCP message is extracted from the first TCP message, and the TCP message for counting the described first out-of-order TCP message is out-of-order The step of number includes:
The second transmission sequence number TSN, the 2nd IP is extracted from first TCP message identifies IPID, and, from described second The second transmission sequence number maximum of T SN is extracted in TCP messageMAX, and by the second transmission sequence number maximum of T SNMAXIt is corresponding IP mark IPID be denoted as the 2nd IP mark maximum value IPIDMAX
When the second transmission sequence number TSN is less than the second transmission sequence number maximum of T SNMAX, and, the 2nd IP It identifies IPID and is less than the 2nd IP mark maximum value IPIDMAXWhen, it extracts first TCP message and is reported as the first random ordering TCP Text;
Next transmission sequence number TSN from the second transmission sequence number TSN is counted, until second transmission sequence number is maximum Value TSNMAXIn, the number of the corresponding TCP message of all transmission sequence number TSN;
The number for the TCP message that statistics is obtained is as the TCP message random ordering number of the described first out-of-order TCP message.
7. a kind of acquisition device of TCP message error message characterized by comprising
TCP message obtains module, for obtaining TCP message in real time in preset analysis site;Acquired TCP message includes current TCP message and first TCP message;
TCP message extraction module is retransmitted, for extracting and retransmitting TCP according to the current TCP message and the first TCP message Message;
Relevant parameter obtains module, for obtaining the corresponding relevant parameter of the re-transmission TCP message;The relevant parameter is included in Before the re-transmission TCP message passes through the analysis site, ACK number of confirmation character corresponding with the re-transmission TCP message;
First error message determining module, for determining the re-transmission TCP when the relevant parameter meets the first preset condition The error message of message is the information for causing to retransmit by time-out;First preset condition includes described ACK number of confirmation character Less than first threshold.
8. device according to claim 7, which is characterized in that the relevant parameter includes when the re-transmission TCP message passes through Before crossing the analysis site, the information for retransmitting the corresponding original TCP message of TCP message and whether putting by analysis;Described device Further include:
Second error message determining module, for determining the re-transmission TCP when the relevant parameter meets the second preset condition The error message of message is the information for causing to retransmit in analysis site upstream packet loss;Second preset condition includes described true It reads and accords with ACK number more than or equal to the first threshold, and, the original TCP message does not pass through the analysis site.
9. device according to claim 8, which is characterized in that further include:
First out-of-order TCP message extraction module for extracting the first out-of-order TCP message from the first TCP message, and counts The TCP message random ordering number of described first out-of-order TCP message;
Second out-of-order TCP message obtains module, for obtaining and the re-transmission TCP from the extracted first out-of-order TCP message The corresponding second out-of-order TCP message of message;
Third error message determining module, for meeting third preset condition when the relevant parameter, also, described second is out-of-order When the TCP message random ordering number of TCP message is greater than or equal to second threshold, determine that the error message for retransmitting TCP message is Lead to the information retransmitted in the serious random ordering in analysis site upstream;The third preset condition includes the confirmation character ACK Number is greater than or equal to the first threshold, and, the original TCP message passes through the analysis site.
10. device according to claim 9, which is characterized in that further include:
4th error message determining module, for meeting the third preset condition, also, described second when the relevant parameter When the TCP message random ordering number of out-of-order TCP message is less than the second threshold, the error message for retransmitting TCP message is determined To lead to the information retransmitted in analysis site downstream packet loss.
11. according to device described in claim 7 or 8 or 9 or 10, which is characterized in that the re-transmission TCP message extraction module packet It includes:
First transmission sequence number TSN and IP identifies IPID extracting sub-module, passes for extracting first from the current TCP message Defeated queue number TSN, the first IP identify IPID, and, the first transmission sequence number maximum value is extracted from the first TCP message TSNMAX, and by the first transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the first IP mark maximum value IPIDMAX
TCP message extracting sub-module is retransmitted, for being less than first transmission sequence number most as the first transmission sequence number TSN Big value TSNMAX, and, the first IP mark IPID is greater than the first IP and identifies maximum value IPIDMAXWhen, work as described in extraction Preceding TCP message is as re-transmission TCP message;
Alternatively, for being greater than the first transmission sequence number maximum of T SN as the first transmission sequence number TSNMAX, and, institute It states the first IP mark IPID and is less than the first IP mark maximum value IPIDMAXWhen, extract the previous of the current TCP message TCP message is as re-transmission TCP message.
12. device according to claim 9 or 10, which is characterized in that the first TCP message includes the first TCP message With the second TCP message, second TCP message includes all TCP messages obtained before obtaining first TCP message, institute Stating the first out-of-order TCP message extraction module includes:
Second transmission sequence number TSN and IP identifies IPID extracting sub-module, passes for extracting second from first TCP message Defeated queue number TSN, the 2nd IP identify IPID, and, the second transmission sequence number maximum value is extracted from second TCP message TSNMAX, and by the second transmission sequence number maximum of T SNMAXCorresponding IP mark IPID is denoted as the 2nd IP mark maximum value IPIDMAX
Out-of-order TCP message extracting sub-module, for being less than second transmission sequence number most as the second transmission sequence number TSN Big value TSNMAX, and, the 2nd IP mark IPID is less than the 2nd IP and identifies maximum value IPIDMAXWhen, extract described the One TCP message is as the first out-of-order TCP message;
TCP message random ordering number statistic submodule, for counting next transmission queue from the second transmission sequence number TSN Number TSN, until the second transmission sequence number maximum of T SNMAXIn, the number of the corresponding TCP message of all transmission sequence number TSN, And the number for the TCP message for obtaining statistics is as the TCP message random ordering number of the 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 CN105141476A (en) 2015-12-09
CN105141476B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800519B (en) * 2017-11-20 2020-12-01 烽火通信科技股份有限公司 Retransmission method and retransmission system of data packet
CN112491655B (en) * 2020-11-20 2022-07-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

Also Published As

Publication number Publication date
CN105141476A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
Mazurczyk et al. Retransmission steganography and its detection
WO2019144836A1 (en) Data transmission method, apparatus and system
CN107645409B (en) Method and device for determining transmission fault reason of data
CN103763073B (en) A kind of method and terminal that packet loss retransmits
CN111835708A (en) Characteristic information analysis method and device
CN104486243B (en) Data transmission method, equipment and system
CN102572531B (en) Method and system for delimiting packet loss faults of internet protocol television (IPTV) network
CN106452688A (en) Beidou data lost message retransmission method and system
CN104641595A (en) Method and apparatus for delimiting problem
CN109067796A (en) A kind of data transmission method and device
CN115037700B (en) Complex network data packet transmission method, system, terminal and storage medium
CN105141476B (en) A kind of acquisition methods and device of TCP message error message
EP4104400A2 (en) Measuring latency and delay variation via deep packet inspection
WO2016095379A1 (en) Assistant positioning method and device for packet loss position and computer storage medium
US20150023189A1 (en) Packet analysis device and packet analyzing method
Mazurczyk et al. Hiding information in retransmissions
Ortega et al. Performance analysis of smart grid communication protocol DNP3 over TCP/IP in a heterogeneous traffic environment
CN110611644A (en) Data transmission method and device
CN103906111A (en) Problem determination method and device for general packet radio service network
CN102957580B (en) Flow statistical method and flow statistical equipment
US9363696B2 (en) Analyzing device, analyzing method, and analyzing program
CN106341348B (en) A kind of flow control methods and access network elements towards TCP traffic
CN109067922A (en) A kind of data transmission method and device
CN109474940A (en) Quality of service detection method and device
EP2023522B1 (en) Method and device for counting transmission times of data unit, transmission device and computer program

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