Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, and
It is not used in the restriction present invention.
Such as the schematic flow sheet that Fig. 1 is the TCP transmission method in one embodiment, the TCP transmission method of figure, including following
Step:
S11:Obtain the message confirmation number of the TCP response messages received by network side;
S12:Obtain the newest confirmation number of server;
S13:If the message confirms number newest confirmation number for being equal to the server, increase the TCP response messages
Duplicate answer count value;
S14:If the duplicate answer count value is equal to predetermined threshold value, TCP response messages pair described in local cache are improved
The transmission priority of the tcp data message answered.
If identification field ACK (Acknowledgment Number) value in the header of tcp data message is 1, it is determined that
The tcp data message is TCP response messages, and the message of TCP response messages confirms number serial number for being corresponding tcp data message
Plus tcp data message data length.The Serial No. 2001 of such as tcp data message, data length is 1000, then for
The tcp data message, the identification field ACK value in the header of tcp data message is 1, and the tcp data message is TCP response reports
Text, and the message confirmation number of the TCP response messages is 3001.In the present embodiment, server is base station TCP server, for protecting
The newest confirmation number of TCP response messages is deposited, the newest confirmation number of server is the newest confirmation of TCP response messages in server
Number.If the message confirms number newest confirmation number for being equal to server, illustrate that the corresponding tcp data message of TCP response messages is needed
Retransmit, then base station increases the duplicate answer count value of the TCP response messages, TCP connections each time have a repetition
Response count value, for representing in a TCP connection, the repetition of the TCP message transmission received in a stage should
Number of times is answered, the size of duplicate answer count value decides whether that trigger data message retransmission is processed, and the duplicate answer count value is
Base station is arranged, and for the number of times that monitoring base station receives same TCP response messages, if such as base station have received message, confirmation number is
1001 TCP response messages 1 time, then be set to 1 by duplicate answer count value, if base station have received message confirmation number for 1001
TCP response messages 2 times, then be set to 2 by duplicate answer count value.
If the duplicate answer count value is equal to predetermined threshold value, illustrate that the TCP response messages duplicate answer repeatedly (can
Can exceed that twice), then the transmission priority of the corresponding tcp data message of TCP response messages described in local cache is improved in base station.
Such as predetermined threshold value is 4 times, if the multiple response count value of the TCP response messages is 4 times, equal to predetermined threshold value, then shows institute
TCP response message duplicate answers 4 times are stated, is a urgent tcp data message, in the local cache of base station, have its normal
Transmission priority, the normal priority that sends usually first uploads the less tcp data message of serial number, then uploads sequence successively
The larger tcp data message of row number.For the TCP response messages that duplicate answer count value is equal to predetermined threshold value, base station will
The transmission priority of the corresponding tcp data message of the TCP response messages is improved, for example, can be by TCP response messages correspondence
The priority of tcp data message arrange higher than the priority for sending other packets in buffer queue, with it is preferential upload it is described
The corresponding tcp data message of TCP response messages.Or the transmission priority of the current tcp data message is improved into a deciding grade and level
Not, one-level is for example improved, to shorten the times waiting for transmission such as the corresponding tcp data message of the TCP response messages.If base station from
The response message that network side is received is not TCP response messages, then do not do above-mentioned process, is sent directly to lateral terminal of eating dishes without rice or wine.
Such as Fig. 2, in one embodiment, if the message confirms number newest confirmation number for being equal to the server, increase
It is further comprising the steps of after the duplicate answer count value of the TCP response messages:
S131:Detect that the corresponding tcp data message of the TCP response messages whether there is in local cache;
S132:If so, will be present in the corresponding TCP for successfully having uploaded of the TCP response messages of local cache
Data message is discharged.
If the message of the TCP response messages confirms that a number corresponding packet is present in local cache, show the TCP
Response message is the message of duplicate answer, will need to upload successful packet and discharge from local cache, while abandoning
The TCP response messages, without the need for being sent to side of eating dishes without rice or wine.So with the load pressure of alleviation local cache, it is to avoid excessive to take locally
The internal memory of caching, is conducive to the quick transmission of other tcp data messages, has saved network bandwidth resources, reduces unnecessary sky
Port transmission.
Such as Fig. 3, in one embodiment, the newest confirmation number of server is obtained afterwards, it is further comprising the steps of:
S23:If the message of the TCP response messages confirms number newest confirmation number for being more than the server, detection is described
The corresponding tcp data message of newest confirmation number of server whether there is in local cache;
S24:If so, then by the newest confirmation number of the server be set to TCP response messages message confirm number, and will
The corresponding tcp data message for successfully having uploaded of newest confirmation number for being present in the server of local cache is released
Put.
For example, the sequence number range for being currently available for the tcp data message of re-transmission is 1001~3001, then server is most
It is new to confirm number to be 1001, if the message of the TCP response messages that base station receives from network side confirms number to be 2001, then illustrate
The message of the TCP response messages confirms number newest confirmation number for being more than server, illustrates the newest confirmation correspondence of server
Tcp data message be successfully uploaded to network side.Then the newest confirmation number renewal of the server is adjusted to TCP and is answered by base station
The message for answering message confirms number, and will be present in that the newest confirmation number of the server of local cache is corresponding successfully to be uploaded
Tcp data message discharged.If the message of the TCP response messages that base station receives from network side confirm number for 1 or
501, then illustrate that the TCP response messages belong to late response message, without the need for carrying out retransmission process by base station, it is forwarded directly to sky
Mouth side, it is ensured that normal TCP connections interaction.Base station discharges the tcp data message of transmission success from local cache, delays
The load pressure of solution local cache, improves the utilization rate of Internet resources, is conducive to the quick transmission of follow-up tcp data message.
Such as Fig. 4, further, the newest confirmation number of the server is set to into the message confirmation number of TCP response messages,
And will be present in the corresponding tcp data message for successfully having uploaded of the newest confirmation number of the server of local cache and released
It is further comprising the steps of after putting:
S241:By the duplicate answer count value zero setting of the TCP response messages;
S242:The corresponding tcp data message of the TCP response messages is sent to terminal.
The message for judging the TCP response messages confirms number newest confirmation number for being more than the server afterwards, illustrates institute
State that the corresponding tcp data message of TCP response messages is only requested to be transmitted once, be not emergency data, then by the TCP responses
The duplicate answer count value zero setting of message, then sends the corresponding tcp data message of the TCP response messages to terminal.For example,
The newest confirmation number of server is 1001, when the message confirmation number of TCP response messages is 2001, it is seen that the newest confirmation of server
Number corresponding tcp data message is successfully uploaded, base station will the corresponding tcp data message of TCP response messages send to terminal.
The tcp data message replied first is sent directly to terminal by base station, has saved Internet resources, improves data transmission efficiency, is had
Beneficial to the transmission of follow-up tcp data message, it is beneficial to improve operation benefits and Consumer's Experience.
Such as Fig. 5, in one embodiment, the newest confirmation number of server is obtained afterwards, comprise the following steps:
S33:If the message of the TCP response messages confirms number newest confirmation number for being less than the server, send described
The corresponding tcp data message of TCP response messages is to terminal.
After obtaining the message confirmation number and the newest confirmation number of the server of TCP response messages, if the TCP responses
The message of message confirms number newest confirmation number for being less than the server, at this moment directly by the corresponding TCP of the TCP response messages
Data message is sent to terminal, without the need for carrying out retransmission process by base station.The message of such as TCP response messages confirms
2001, the newest confirmation number of server lags behind server most for the corresponding tcp data message of 3001, TCP response messages
It is new to confirm number corresponding tcp data message, belong to late response, the transmission method for the tcp data message of late response,
Without the need for the additional treatments retransmitted by base station, directly the tcp data message transmissions of late response net is saved into terminal
Network resource, improves the efficiency of transmission of backward packet, is conducive to the transmission of follow-up data bag.
Such as Fig. 6, in one embodiment, the message confirmation number of the TCP response messages received by network side is obtained before, bag
Include following steps:
S111:Receive the tcp data message of side upload of eating dishes without rice or wine;
S112:Obtain the serial number of the tcp data message, and according to the order of serial number by the tcp data message
Insertion local cache, for network side Fast retransmission;
S113:The tcp data message is sequentially transferred to into normal priority transmit queue.
Eat dishes without rice or wine side upload tcp data message to base station, base station by eat dishes without rice or wine side upload tcp data message insert in order
In entering local cache, tcp data message is pressed into serial number and data length arrangement, form orderly data message, can be improved
Side of eating dishes without rice or wine uploads the efficiency that tcp data message and base station receive tcp data message.
Such as Fig. 7, in one embodiment, the serial number of the tcp data message is obtained, and according to the order of serial number by institute
It is further comprising the steps of after stating the packet insertion local cache of tcp data message:
S1121:Obtain each tcp data sequence of message number of the tcp data message data stream in local cache;
S1122:If there is out of order, the out of order tcp data message data stream of acquisition in the serial number of tcp data message data stream
Each tcp data sequence of message number;
S1123:The out of order tcp data message data stream is adjusted according to the tcp data header information
It is whole.
Tcp data message data stream includes several tcp data messages, and in local cache, base station is by tcp data message
Packet press serial number order arrangement after, obtain again in order arrangement after, according to each tcp data sequence of message number judge
Tcp data message data stream with the presence or absence of out of order, if there is each tcp data of out of order, out of order tcp data message data stream
Sequence of message number, they are arranged in order again.Again in order arrangement can follow following rule:Second tcp data report
Literary serial number is equal to the length of first tcp data sequence of message number plus first tcp data sequence of message number, the 3rd
The serial number of tcp data sequence of message number is equal to the serial number of second tcp data sequence of message number and adds second tcp data
The length of sequence of message number, by that analogy, does not repeat.
Illustrate below by an instantiation.
For example, each tcp data sequence of message number of out of order section of tcp data message data stream is 1001 (data lengths
1000), 3001 (data lengths 2000), 2001 (data lengths 1000), according to serial number and data length these are rearranged
Tcp data message, the tcp data message sequence after arrangement is:... 1001 (data lengths 1000), 2001 (data lengths
1000), 3001 (data lengths 2000), 5001 ..., tcp data message data stream is stored in order after local cache, first
Obtain high priority and send data queue's number of data packets, it is preferential to send current in high priority packets toward network side server
The most front tcp data message of order.Just can by transmit queue of the tcp data transmission method in the local cache of base station
Ensure the order of tcp data message as far as possible so that the tcp data of base station strictly can in the correct order be uploaded to service
Device, reduces number of retransmissions, is conducive to improving the efficiency of transmission of server.
The TCP transmission method of the present invention describes base station and receives TCP response messages and the method for being processed from network side,
Fig. 8 is the applied environment figure of TCP transmission, including side of eating dishes without rice or wine, network side and base station, when side of eating dishes without rice or wine uploads tcp data message to net
During network side, base station is first put into tcp data message in local cache, and then base station is sent to network side according to normal priority,
Base station decides whether to retransmit the corresponding tcp data message of TCP response messages according to the TCP response messages received from network side.Institute
It can be network side server to state server, and the terminal can be lateral terminal of eating dishes without rice or wine, and side of eating dishes without rice or wine is by the Transmission Control Protocol of base station to network
Side transmission data, using Transmission Control Protocol for the transmission process of data is applicable to each standard base station such as 2G, 3G or 4G, especially fits
For LTE (Long Term Evolution, Long Term Evolution) base station.Above-mentioned TCP transmission method, simple structure is flexible, the suitability
By force, local cache be used for ensure data according to priority order send and data retransmit, it is possible to decrease the read-write pressure of base station and
Offered load pressure, to reduce be responsible for the time delay brought of re-transmission tcp data message by side of eating dishes without rice or wine under general scene, can improve
Communication efficiency, and compatibility data transfer end to end, even if burst empties local cache, also will not cause negatively to data transfer
Affect, be particularly suited for the transport layer data interactive system of LTE base station, maintenance cost is low, algorithm benefit big, highly versatile.
Above-mentioned TCP transmission method, can be applicable to mobile communication technology field, by obtaining the TCP received by network side
The message of response message confirms number and obtains the newest confirmation number of server, judge the message confirmation number of TCP response messages with
And the relation of the newest confirmation number of server, if the message confirms number newest confirmation number for being equal to the server, increase
The duplicate answer count value of the TCP response messages, if the duplicate answer count value is equal to predetermined threshold value, improves local slow
The transmission priority of the corresponding tcp data messages of TCP response messages described in depositing, illustrates the corresponding TCP of the TCP response messages
Data message is the emergency data that need to be again uploaded to network side, and by base station the transmission priority of the emergency data is improved, excellent
First transmit the tcp data message so that the tcp data message is timely transmitted.In data transmission procedure, due to ring of eating dishes without rice or wine
Border is complicated and changeable, situations such as channel bit error rate is high and shakes big, easily affects data to retransmit, therefore, how to reduce ring of eating dishes without rice or wine
Data retransmission delay time is particularly important under border.The TCP transmission method is by adopting base station TCP agreement in local cache
Emergency data carries out retransmission process, and deep analysis can be carried out to TCP response messages, and needs transmission in time according to actual transmissions
Data, disclosure satisfy that more urgent data transfer demands, lift the data transmission performance that mobile communication connection networks, and possess spirit
Activity and adaptability.Avoid in TCP processing datas, strictly sequentially transmission data, affect to retransmit promptness rate.The TCP transmission
Method, by Transmission Control Protocol mobile communication technology internal agreement is combined so that the service quality of base station is improved so that data transfer exists
Can also obtain transmitting in time and accurately under severe environment of eating dishes without rice or wine, improve Consumer's Experience and operation economic benefit.
If Fig. 9 is the structure schematic diagram that the TCP transmission device in one embodiment is tied, the TCP transmission device of Fig. 9 includes:
Message confirmation acquisition module 100, the message for obtaining the TCP response messages received by network side is confirmed
Number;
Newest confirmation acquisition module 200, for obtaining the newest confirmation number of server;
First identification module 300, if confirming number newest confirmation number for being equal to the server for the message, increases institute
State the duplicate answer count value of TCP response messages;
Priority improves module 400, if being equal to predetermined threshold value for the duplicate answer count value, in improving local cache
The transmission priority of the corresponding tcp data message of the TCP response messages.
Figure 10 be one embodiment in the first identification module 300 structural representation, first identification module 300 of Figure 10
Including:
Detection module 301, for detecting that the corresponding tcp data message of the TCP response messages whether there is in local slow
Deposit;
Release module 302, if for being present in local cache, will be present in the TCP response messages of local cache
The corresponding tcp data message for successfully having uploaded is discharged.
Figure 11 is the structural representation of the TCP transmission device in one embodiment, and the TCP transmission device of Figure 11 also includes:
Second identification module 310, if the message confirmation number for the TCP response messages is newest more than the server
Confirmation number, the corresponding tcp data message of newest confirmation number for detecting the server whether there is in local cache;
Newest confirmation setup module 410, if being present in local cache, the newest confirmation number of the server is arranged
Message for TCP response messages confirms number that and it is corresponding to will be present in the newest confirmation number of the server of local cache
The tcp data message for successfully uploading is discharged.
In one embodiment, Figure 12 is referred to, the TCP transmission device of Figure 12 also includes:
Duplicate answer count value zero setting module 411, for by the duplicate answer count value zero setting of the TCP response messages;
Sending module 412, for sending the corresponding tcp data message of the TCP response messages to terminal.
Figure 13 is the structural representation of the TCP transmission device in one embodiment, and the TCP transmission device of Figure 13 includes:
3rd identification module 320, if the message confirmation number for the TCP response messages is newest less than the server
Confirmation number, sends the corresponding tcp data message of the TCP response messages to terminal.
Figure 14 is the structural representation of the TCP transmission device in one embodiment, and the TCP transmission device of Figure 14 also includes:
Tcp data Receive message module 500, for receiving the tcp data message of side upload of eating dishes without rice or wine;
Tcp data packet storage module 600, for obtaining the serial number of the tcp data message, and according to serial number
The tcp data message is inserted local cache by order, for network side Fast retransmission;
Tcp data message sending module 700, sends for the tcp data message to be sequentially transferred to into normal priority
Queue.
Figure 15 be one embodiment in tcp data packet storage module 600 schematic diagram, tcp data message in Figure 15
Memory module 600 includes:
Serial number acquisition module 601, for obtaining local cache in tcp data message data stream each tcp data report
Literary serial number;
Out of order processing module 602, if the serial number for tcp data message data stream has out of order, the out of order TCP of acquisition
Each tcp data sequence of message number of data message data flow;
Adjusting module 603, for according to the tcp data header information by the out of order tcp data message number
It is adjusted according to stream.
The TCP transmission device of the present invention is corresponded with the TCP transmission method of the present invention, in above-mentioned TCP transmission method
The technical characteristic and its advantage of embodiment elaboration hereby give notice that suitable for the embodiment of TCP transmission device.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply each technical characteristic in example be possible to combination be all described, as long as but there is no lance in the combination of these technical characteristics
Shield, all should be the scope of this specification record.
Embodiment described above only expresses several embodiments of the present invention, and its description is more concrete and detailed, but not
Therefore the restriction to the scope of the claims of the present invention can be interpreted as.It should be pointed out that for one of ordinary skill in the art comes
Say, without departing from the inventive concept of the premise, some deformations and improvement can also be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be defined by claims.