CN103475593A - Data stream processing method and data stream processing device - Google Patents

Data stream processing method and data stream processing device Download PDF

Info

Publication number
CN103475593A
CN103475593A CN2013103646942A CN201310364694A CN103475593A CN 103475593 A CN103475593 A CN 103475593A CN 2013103646942 A CN2013103646942 A CN 2013103646942A CN 201310364694 A CN201310364694 A CN 201310364694A CN 103475593 A CN103475593 A CN 103475593A
Authority
CN
China
Prior art keywords
request
data message
circuit
message
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013103646942A
Other languages
Chinese (zh)
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.)
Beijing Star Net Ruijie Networks Co Ltd
Original Assignee
Beijing Star Net Ruijie Networks 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 Beijing Star Net Ruijie Networks Co Ltd filed Critical Beijing Star Net Ruijie Networks Co Ltd
Priority to CN2013103646942A priority Critical patent/CN103475593A/en
Publication of CN103475593A publication Critical patent/CN103475593A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The invention provides a data stream processing method and a data stream processing device. The method comprises the following steps: forwarding a handshake message of a data stream for intranet user equipment and opposite terminal equipment through a first line to realize the three times of handshake of the intranet user equipment and the opposite terminal equipment, and establishing first connection on the first line; receiving the first data request message of the data stream transmitted by the intranet user equipment; acquiring a diversion strategy corresponding to a protocol type of the data request message, and judging whether the data request message needs to be subjected to the diversion processing according to the diversion strategy; if the data request message needs to be subjected to the diversion processing, caching the data request message, performing the three times of headshake with the opposite terminal equipment through a second line again to establish second connection on the second line; forwarding the cached data request message to the opposite terminal equipment through the second connection.

Description

The processing method of data flow and device
Technical field
The present invention relates to the network communications technology, relate in particular to a kind of processing method and device of data flow.
Background technology
Along with the development of network, current most of company or network application place generally adopt multi-line as outlet, for example: respectively by fibre circuit and ADSL (Asymmetric Digital Subscriber Line) (Asymmetric Digital Subscriber Line; Be called for short: ADSL) circuit is as outlet, and wherein, a high-quality circuit (such as fibre circuit) can be applied the key of the characteristic sensitivities such as network transfer delay, shake for transmission; Another low quality circuit (for example adsl line) can be for transmitting peer-to-peer network (Peer to Peer; Be called for short: the down load application such as P2P).Therefore, according to above-mentioned situation, with regard to needs outlet gateway device, can carry out message routing according to application.
At present, the route selection based on application, need to identify concrete applied business at first message of data flow, the literary composition identification of reporting for the first time.For user datagram protocol (User Data Protocol; Be called for short: UDP) stream, due in the first message with the application layer load data, therefore, can pass through deep-packet detection (Deep Packet Inspection; Be called for short: DPI) technology identifies concrete applied business.But, for transmission control protocol (Transmission Control Protocol; Be called for short: TCP) stream, because three of fronts message is handshake message, without load characteristic, therefore, can't be identified by first message of DPI Technique on T CP stream, after certain message that can flow by TCP identifies concrete applied business, again routing, from server side, it likely thinks two connections, for the connection overtime disconnection owing to no longer including request message before routing again, for the connection after routing again owing to not shaking hands normally, be considered to illegal refusal, thereby cause cutout.
Summary of the invention
The invention provides a kind of processing method and device of data flow, for solving that prior art is shunted based on DPI Technique on T CP stream and the cutout problem that causes.
First aspect of the present invention is to provide a kind of processing method of data flow, comprising:
By the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of described Intranet user equipment and described opposite equip., and set up the first connection on described the first circuit;
Receive first request of data message of the described data flow of described Intranet user equipment transmission;
Obtain the distributing strategy corresponding with the protocol type of described request of data message, and according to described distributing strategy, judge whether described request of data message needs to shunt processing, need to shunt processing if judge described request of data message, the described request of data message of buffer memory, and re-start three-way handshake by the second circuit and described opposite equip., on described the second circuit, to set up the second connection;
By described second, connect the described request of data message repeating of buffer memory to described opposite equip..
Another aspect of the present invention is to provide a kind of processing unit of data flow, comprising:
The connection management module, for by the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of described Intranet user equipment and described opposite equip., and sets up the first connection on described the first circuit;
Receiver module, for receiving first request of data message of the described data flow that described Intranet user equipment sends;
The agreement distribution module, for obtaining the distributing strategy corresponding with the protocol type of described request of data message;
The shunting processing module, for according to described distributing strategy, judge whether described request of data message needs to shunt processing, need to shunt processing if judge described request of data message, the described request of data message of buffer memory;
Described connection management module is also for by the second circuit and described opposite equip., re-starting three-way handshake, on described the second circuit, to set up the second connection;
Sending module, for connecting the described request of data message repeating of buffer memory to described opposite equip. by described second.
Technique effect of the present invention is: by the first circuit, for Intranet user equipment and opposite equip. forward the handshake message of this data flow, to realize the three-way handshake of Intranet user equipment and opposite equip., and set up the first connection on the first circuit, when first request of data message of the data flow that receives the transmission of Intranet user equipment, can obtain the distributing strategy corresponding to protocol type of this request of data message, need to shunt processing if judge this request of data message according to this distributing strategy, this request of data message of buffer memory, and re-start three-way handshake by the second circuit and opposite equip., to set up the second connection on the second circuit, second to connect the request of data message repeating of buffer memory to opposite equip. by this.Owing to passing through the second circuit, again carry out three-way handshake with opposite equip., to set up second on the second circuit, connect, again the request of data message of buffer memory is transmitted to opposite equip. by the second connection, therefore guaranteed not there will be the cutout problem when data flow routing again, thereby effectively solved the cutout problem of being shunted based on DPI Technique on T CP stream in the prior art and causing.
The accompanying drawing explanation
The flow chart of an embodiment of the processing method that Fig. 1 is data flow of the present invention;
The flow chart of another embodiment of the processing method that Fig. 2 is data flow of the present invention;
The schematic flow sheet of another embodiment of the processing method that Fig. 3 is data flow of the present invention;
The processing method that Fig. 4 is data flow of the present invention based on network architecture schematic diagram;
The signaling process figure of another embodiment of the processing method that Fig. 5 is data flow of the present invention;
The also signaling process figure of an embodiment of the processing method that Fig. 6 is data flow of the present invention;
The structural representation of an embodiment of the processing unit that Fig. 7 is data flow of the present invention;
The structural representation of another embodiment of the processing unit that Fig. 8 is data flow of the present invention.
Embodiment
The flow chart of an embodiment of the processing method that Fig. 1 is data flow of the present invention, as shown in Figure 1, the method for the present embodiment comprises:
Step 101, by the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of this Intranet user equipment and this opposite equip., and set up the first connection on this first circuit.
Step 102, receive first request of data message of this data flow that this Intranet user equipment sends.
Step 103, obtain the distributing strategy corresponding with the protocol type of this request of data message, and according to this distributing strategy, judge whether this request of data message needs to shunt processing, need to shunt processing if judge this request of data message, this request of data message of buffer memory, and re-start three-way handshake by the second circuit and this opposite equip., on this second circuit, to set up the second connection.
In the present embodiment, the first circuit key application to characteristic sensitivities such as network transfer delay, shakes for transmission.The second circuit is used for transmitting the down load application such as P2P.
Step 104, by this, second connect this request of data message repeating of buffer memory to this opposite equip..
In the present embodiment, by the first circuit, for Intranet user equipment and opposite equip. forward the handshake message of this data flow, to realize the three-way handshake of Intranet user equipment and opposite equip., and set up the first connection on the first circuit, when first request of data message of the data flow that receives the transmission of Intranet user equipment, can obtain the distributing strategy corresponding with the protocol type of this request of data message, if according to this distributing strategy, judge this request of data message and need to shunt processing, this request of data message of buffer memory, and re-start three-way handshake by the second circuit and opposite equip., to set up the second connection on the second circuit, second to connect the request of data message repeating of buffer memory to opposite equip. by this.Owing to passing through the second circuit, again carry out three-way handshake with opposite equip., to set up second on the second circuit, connect, again the request of data message of buffer memory is transmitted to opposite equip. by the second connection, therefore guaranteed not there will be the cutout problem when data flow routing again, thereby effectively solved the cutout problem of being shunted based on DPI Technique on T CP stream in the prior art and causing.
The flow chart of another embodiment of the processing method that Fig. 2 is data flow of the present invention, as shown in Figure 2, the executive agent of the method is outlet device, the method comprises:
Step 201, by the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of this Intranet user equipment and this opposite equip., and set up the first connection on this first circuit.
Step 202, receive first request of data message of this data flow that this Intranet user equipment sends.
Step 203, judge whether the protocol type of this request of data message is HTTP or HTTPs agreement; If perform step 204; If not, perform step 208.
Step 204, according to the type of service of this request of data message, inquire about pre-configured configuration information, judge whether circuit corresponding to data type in this request of data message is this first circuit; If not, perform step 205; If perform step 207.
Wherein, this configuration information comprises type of service and corresponding circuit.
In the present embodiment, the general acquiescence of outlet device forwards the message received by the first circuit.
Step 205, this request of data message of buffer memory, and re-start three-way handshake by the second circuit and this opposite equip., on this second circuit, to set up the second connection.
Step 206, by this, second connect this request of data message repeating of buffer memory to this opposite equip..Finish.
Step 207, by this, first connect this request of data message repeating to this opposite equip..Finish.
Step 208, judge whether the type of service of this request of data message is the key business type.If the type of service of this request of data message is the key business type, perform step 205; If the type of service of this request of data message is non-key type of service, perform step 207.In the present embodiment, for instance, the key business type can refer to: office OA, mail etc.Non-key type of service can refer to: a sudden peal of thunder, PSSTREAM etc.In addition, also it should be noted that, which is key business, and which is non-key business, under different scenes, may be not quite alike, for example: under the environment of Internet bar, game can be key business, and under the environment of enterprise, game may be non-key business, and this depends on user's configuration.General, the business of optical fiber circuit is walked in configuration, is referred to as key business; And walk the business of adsl line, be non-key business.
In addition, in the present embodiment, when the agreement of this request of data message is http protocol or HTTPs agreement, its corresponding distributing strategy can adopt HTTP application shunting or HTTPs application shunting, can be according to the type of service of this request of data message, inquire about pre-configured configuration information, judge whether this request of data message needs to shunt processing.When the agreement of this request of data message is not http protocol and HTTPs agreement, the separation strategy of its correspondence can adopt TCP application shunting, according to the type of service of this request of data message, judges whether this request of data message needs to shunt processing.
In the present embodiment, by the first circuit, for Intranet user equipment and opposite equip. forward the handshake message of this data flow, to realize the three-way handshake of Intranet user equipment and opposite equip., and set up the first connection on the first circuit, when first request of data message of the data flow that receives the transmission of Intranet user equipment, can whether be key business according to the type of service of this request of data message, judge whether this request of data message needs to shunt processing, if need this request of data message of buffer memory, and re-start three-way handshake by the second circuit and opposite equip., to set up the second connection on the second circuit, second to connect the request of data message repeating of buffer memory to opposite equip. by this.Owing to passing through the second circuit, again carry out three-way handshake with opposite equip., to set up second on the second circuit, connect, again the request of data message of buffer memory is transmitted to opposite equip. by the second connection, therefore guaranteed not there will be the cutout problem when data flow routing again, thereby effectively solved the cutout problem of being shunted based on DPI Technique on T CP stream in the prior art and causing.Simultaneously, due to distributing strategy that can be corresponding according to the protocol type of request of data message, judge whether this request of data message is shunted, therefore, accurately realized efficiently the data flow of the applied business of appointment is diverted to corresponding circuit.
The schematic flow sheet of another embodiment of the processing method that Fig. 3 is data flow of the present invention, on above-mentioned basis embodiment illustrated in fig. 2, after step 201, the method also comprises:
Step 209, follow the tracks of the serial number information of the handshake message of this data flow, and record this first attribute information connected.
In the present embodiment, this first attribute information connected can comprise: expansion factor and tcp option etc.
A kind of specific implementation of step 205 is:
Step 205a, this request of data message of buffer memory, and according to the serial number information of the handshake message of this data flow, and this first attribute information connected, re-start three-way handshake by the second circuit and this opposite equip., to set up this second connection on this second circuit.
Alternatively, according to the serial number information of the handshake message of this data flow, and this first attribute information connected, by the second circuit and this opposite equip., re-start three-way handshake, take a kind of specific implementation of setting up this second connection on this second circuit as:
By this second circuit, send SYN connection request message to this opposite equip., this SYN connection request message comprises the serial number information of the handshake message of this data flow, and this first attribute information connected;
Receive the reply data bag that this opposite equip. returns, and the SYN message that carries the initial sequence number of this opposite equip.;
By this second circuit, send confirmation message to this opposite equip., to complete the three-way handshake with this opposite equip..
Wherein, the initial sequence number that the initial sequence number of this opposite equip. is the second connection.
The processing method that Fig. 4 is data flow of the present invention based on network architecture schematic diagram, as shown in Figure 4, this network architecture comprises: Intranet user equipment 11, outlet device 12 and opposite equip. 13.Wherein, Intranet is connected with outlet device 12 with equipment 11, and outlet device 12 is connected with opposite equip. 12 with the Internet by the first circuit, many second circuits.Opposite equip. 13 can be server, can comprise the server of services such as being specifically designed to webpage, game and video.In addition, the first circuit can be optical fiber, the key application for transmission to characteristic sensitivities such as network transfer delay, shakes.The second circuit can be adsl line, for transmitting the down load application such as P2P.
The signaling process figure of another embodiment of the processing method that Fig. 5 is data flow of the present invention, on above-mentioned basis embodiment illustrated in fig. 4, as shown in Figure 5, the method comprises:
Step 301, Intranet user equipment send the SYN request message to outlet device.
In the present embodiment, Intranet user equipment is initiated the TCP connection request, and it is beginning that a SYN request message is take in request, with TCP of mark, connects and starts and ask a three-way handshake protocol procedures of response.
Wherein, the sequence number of this SYN request message is CSEQ, and this sequence number CESQ is in order to mean the initiation sequence of user's message.
Step 302, outlet device, by the first circuit, are transmitted to opposite equip. by this SYN request message received, and connect to set up first of the first circuit, and record the initial sequence number that Intranet user equipment is corresponding, and the first attribute information connected.
In the present embodiment, the attribute information that records the first connection can comprise: logging timestamp, window expansion factor, the information such as SACK and maximum message size.
Step 303, outlet device receive by the first circuit the first request back message using that opposite equip. sends, and receive the SYN+ACK message of the SYN of opposite equip. initiation simultaneously, and record the initial sequence number of opposite equip..
Wherein, the sequence number of this first request back message using is CSEQ+1, and this CSEQ+1 is in order to mean the response sequence corresponding to initiation sequence.The sequence number of this SYN+ACK message is DSEQ, and this sequence number DSEQ is in order to mean the initial sequence number of opposite equip..
Step 304, outlet device by this first request back message using and SYN+ACK message repeating to Intranet user equipment.
Step 305, Intranet user equipment send the second request back message using to outlet device, for outlet device, by the first circuit, this second request back message using are transmitted to opposite equip..
Wherein, the sequence number DSEQ+1 of this second request back message using, this sequence number DSEQ+1 is in order to mean the response sequence corresponding to the initial sequence number of opposite equip..
In the present embodiment, above-mentioned three handshake message all pass through interface 1, and default route (the first circuit) is forwarded.
Step 306, Intranet user equipment send the request of data message to outlet device.
In the present embodiment, the sequence number of this request of data message is CSEQ+1, and hypothesis length is 11.
Step 307, outlet device receive this request of data message, and according to the type of service of this request of data message, need to shunt while processing this request of data message of buffer memory judging this request of data message.
Step 308, according to the initial sequence number corresponding to Intranet user equipment of record, the attribute information that the initial sequence number of opposite equip. and first connects, initiate SYN connection request message by this second circuit to opposite equip..
In the present embodiment, it should be noted that, this SYN connection request message has been used the original request initial sequence number CSEQ initiated of Intranet user equipment, and purpose is to carry out serial number space when it is necessary TCP header data transaction for back, reduces as far as possible conversion and calculates.
Step 309, opposite equip. receive this SYN connection request message, and return to the reply data bag, initiate the SYN message to complete the row journey of shaking hands of TCP simultaneously.
Wherein, the sequence number of this reply data bag is CSEQ+1.The sequence number of this SYN message is SSEQ, and this sequence number SSEQ initiates to connect the initial sequence number of opposite equip. for meaning Intranet user equipment.
In the present embodiment, to offer the initial sequence number DSEQ of the opposite end of Intranet user equipment be different for the initial sequence number SSEQ of opposite equip. and outlet device.
Step 310, outlet device are intercepted and captured this SYN message, and by the second circuit, to opposite equip., send confirmation message, complete the three-way handshake with opposite equip., to set up second on the second circuit, connect.
In the present embodiment, interface corresponding to this second connection is interface 2.
Step 311, outlet device carry out conversion process to the request of data message of buffer memory, and the request of data message after conversion process is sent to opposite equip. by the second connection.
In the present embodiment, the confirmation sequence number DSEQ+1 in the request of data message is converted to SSEQ+1.
Step 312, opposite equip. respond this request of data message, and return to the first response data message, and loopback the first response message.Wherein, the sequence number of this first response data message is SSEQ+1, and hypothesis length is 12.The sequence number of the first response message is CSEQ+11+1.
After step 313, outlet device receive the response data message, the sequence number SSEQ+1 in this first response data message is converted to DSEQ+1, and the first response data message after changing sends to Intranet user equipment.
Step 314, opposite equip. respond this request of data message, and return to the second response data message, and loopback the second response message.Wherein, the sequence number of this second response data message is SSEQ+12+1, and hypothesis length is 13.The sequence number of the second response message is CSEQ+11+1.
After step 315, outlet device receive the second response data message, sequence number SSEQ+12+1 in this second response data message is converted to DSEQ+12+1, and the second response data message after changing sends to Intranet user equipment.
The first response data message and the second response data message that step 316, Intranet user equipment interconnection are received are replied, and response message is sent to outlet device.The sequence number of this response message is DSEQ+12+13+1.
Step 317, outlet device are converted to SSEQ+12+13+1 by the sequence number DSEQ+12+13+1 in this response message, and the response message after conversion is sent to opposite equip..
In the present embodiment, it should be noted that, outlet device need to carry out the sequence number conversion to message, to keep two serial number space of sending out continuous.In above-mentioned process, owing to just two to four layers of message being modified, do not change application layer data, message is not carried out to copy process yet, therefore, effectively improved efficiency.
In the present embodiment, it is example that the electric donkey of take initiates a TCP stream, suppose the agreement shunting of unrealized electric donkey, adopt TCP application shunting, the first request message after the three-way handshake message (being above-mentioned request of data message) identifies concrete type of service, and judges according to this type of service whether this TCP stream needs the application shunting.If this TCP stream needs the application shunting,, from the path of respective application route, outlet device disguise as Intranet user equipment, set up TCP with opposite equip. and connect newly-built stream, follow-up and realize data interaction by newly-built stream and opposite equip..In addition.This TCP application shunting judges that shunting reaches the moment of outlet device constantly as the first request message, when not needing to apply shunting, when this type of service is key business, do not shunt processing.
The also message interaction flow chart of an embodiment of the processing method that Fig. 6 is data flow of the present invention, on above-mentioned basis embodiment illustrated in fig. 5, as shown in Figure 6, the method comprises:
Step 401, Intranet user equipment send the SYN request message to outlet device.
In the present embodiment, Intranet user equipment is initiated the TCP connection request, and it is beginning that a SYN request message is take in request, with TCP of mark, connects and starts and ask a three-way handshake protocol procedures of response.
Wherein, the sequence number of this SYN request message is CSEQ, and this CESQ is in order to mean the initiation sequence of user's message.
Step 402, outlet device, by the first circuit, are transmitted to opposite equip. by this SYN request message received, and to set up the first connection on the first circuit, and record the initial sequence number that Intranet user equipment is corresponding, and the first attribute information connected.
In the present embodiment, the attribute information that records the first connection can comprise: logging timestamp, window expansion factor, the information such as SACK and maximum message size.
Step 403, outlet device receive by the first circuit the first request back message using that opposite equip. sends, and receive the SYN+ACK message of the SYN of opposite equip. initiation simultaneously, and record the initial sequence number of opposite equip..
Wherein, the sequence number of this first request back message using is CSEQ+1, and this CSEQ+1 is in order to mean the response sequence corresponding to initiation sequence.The sequence number of this SYN+ACK message is DSEQ, and this DSEQ is in order to mean the initial sequence number of opposite equip..
Step 404, outlet device ask back message using and SYN+ACK message repeating to Intranet user equipment this.
Step 405, Intranet user equipment send the second request back message using to outlet device, for outlet device, by the first circuit, this second request back message using are transmitted to opposite equip..
Wherein, the sequence number of this second request back message using is DSEQ+1, and this DSEQ+1 is in order to mean the response sequence corresponding to the initial sequence number of opposite equip..
In the present embodiment, above-mentioned three handshake message all pass through interface 1, and default route (the first circuit) is forwarded.
Step 406, Intranet user equipment are initiated first GET request message of HTTP to outlet device.
Step 407, outlet device, according to type of service and the configuration information of a GET request message, do not need to shunt processing if judge a GET request message, by the first connection, the one GET request message are transmitted to opposite equip..
Step 408, Intranet user equipment are initiated second GET request message of HTTP to outlet device.
Wherein, the sequence number of the 2nd GET request message is CSEQ+X+1, and its acknowledged sequence number is DSEQ+Y+1.
Step 409, outlet device, according to the type of service of the 2nd GET request message, are inquired about pre-configured configuration information, if judge, the 2nd GET request message need to be shunted, buffer memory the 2nd GET request message.
In the present embodiment, for instance, take the first circuit as fibre circuit, the second circuit is that adsl line is example.When configuration information is when P2P downloads, during the configuration information that need to forward by adsl line, outlet device is identified the type of service of the 2nd GET request message, when identifying this type of service and being P2P downloading service type,, according to above-mentioned configuration information, judge the 2nd GET request message and need to be shunted.
Step 410, according to the initial sequence number corresponding to Intranet user equipment of record, the attribute information that the initial sequence number of opposite equip. and first connects, initiate SYN connection request message by this second circuit to opposite equip..
In the present embodiment, it should be noted that, this SYN connection request message has been used the original request initial sequence number CSEQ initiated of Intranet user equipment, and purpose is to carry out serial number space when it is necessary TCP header data transaction for back, reduces as far as possible conversion and calculates.
Step 411, opposite equip. receive this SYN connection request message, and return to the reply data bag, initiate the SYN message to complete the row journey of shaking hands of TCP simultaneously.
Wherein, the sequence number of this reply data bag is CSEQ+1.The sequence number of this SYN message is SSEQ.
In the present embodiment, to offer the initial sequence number DSEQ of the opposite end of Intranet user equipment be different for the initial sequence number SSEQ of opposite equip. and outlet device.
Step 412, outlet device are intercepted and captured this SYN message, and by the second circuit, to opposite equip., send confirmation message, complete the three-way handshake with opposite equip., to set up the second connection on the second circuit.
In the present embodiment, the interface that this second circuit is corresponding is interface 2.
Step 413, outlet device carry out conversion process to the 2nd GET request message of buffer memory, and the 2nd GET request message after conversion process is sent to opposite equip. by the second connection.
Step 414, opposite equip. respond the 2nd GET request message, and return to the response data message, and the return response message.Wherein, the sequence number of this response data message is SSEQ+1, and hypothesis length is 12.The sequence number of response message is CSEQ+X+11+1.
Step 415, outlet device are converted to DSEQ+Y+1 by the sequence number SSEQ+1 in this response data message, and the response data message after conversion is sent to Intranet user equipment.
It should be noted that, in prior art, comprised and repeatedly asked and respond in the whole process of the web page files that includes many images one of access, each request and response all need to set up an independent connection, a document and image are just transmitted in each connection, and the last time separates fully with request next time.And HTTP1.1 supports lasting the connection, on connecting, can transmit a TCP a plurality of HTTP requests and response, reduced consumption and the delay of setting up and closing connection.A plurality of requests of a web page files that includes many images and reply and can transmit in a connection.Therefore, a HTTP1.1 connects, and according to the data difference of its request, it may not belong to different business in the same time, such as: the HTTP1.1 that opens webpage foundation connects may request Applet, and JavaScript downloads flash etc.
In the present embodiment, with a fibre circuit (being above-mentioned the first circuit) and two adsl lines (being above-mentioned the second circuit), being respectively ADSL1 and ADSL2 is example, introduces in detail the technical scheme of the present embodiment.In above-mentioned HTTP 1.1 connects, when the type of service of above-mentioned the 2nd GET request message is web page browsing, in the time of can forwarding by ADSL1 when configuration information is web page browsing, need to be shunted, re-start three-way handshake, set up the second circuit (ADSL1), the 2nd GET request message is transmitted to opposite equip..If user's Intranet equipment also sends the 3rd GET request message or HTTP request message, its type is that P2P downloads, and in the time of can forwarding by ADSL2 when configuration information is P2P, need to shunt processing, re-start three-way handshake, set up the second circuit (ADSL2), the 3rd GET request message or HTTP request message are transmitted to opposite equip..
Therefore, by adopting above-mentioned HTTP application shunting, in therefore HTTP1.1 can being connected, common web page browsing business and downloading service is divided into two streams, and flow is assigned on suitable circuit.
Also it should be noted that, do not use this message of buffer cache in the processing procedure of all messages and upload to user's space, but directly being changed rear transmission, thereby effectively avoided the problem of application level proxy inefficiency.
One of ordinary skill in the art will appreciate that: realize that the hardware that all or part of step of above-mentioned each embodiment of the method can be relevant by program command completes.Aforesaid program can be stored in a computer read/write memory medium.This program, when carrying out, is carried out the step that comprises above-mentioned each embodiment of the method; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
The structural representation of an embodiment of the processing unit that Fig. 7 is data flow of the present invention, as shown in Figure 7, the device of the present embodiment comprises: connection management module 21, receiver module 22, agreement distribution module 23, shunting processing module 24 and sending module 25; Wherein, connection management module 21, for by the first circuit, is the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of this Intranet user equipment and this opposite equip., and sets up the first connection on this first circuit; Receiver module 22 is for first request of data message of this data flow of receiving this Intranet user equipment and sending; Agreement distribution module 23 is for obtaining the distributing strategy corresponding with the protocol type of this request of data message; Shunting processing module 24, for according to this distributing strategy, judges whether this request of data message needs to shunt processing, need to shunt processing if judge this request of data message, this request of data message of buffer memory; Connection management module 21 is also for by the second circuit and this opposite equip., re-starting three-way handshake, on this second circuit, to set up the second connection; Sending module 25 is for giving this opposite equip. by this second connection by this request of data message repeating of buffer memory.
The processing unit of the data flow of the present embodiment can execution graph 1 shown in the technical scheme of embodiment of the method, it realizes that principle is similar, repeats no more herein.
In the present embodiment, by the first circuit, for Intranet user equipment and opposite equip. forward the handshake message of this data flow, to realize the three-way handshake of Intranet user equipment and opposite equip., and set up the first connection on the first circuit, when first request of data message of the data flow that receives the transmission of Intranet user equipment, can be according to distributing strategy corresponding to the protocol type with this request of data message obtained, need to shunt processing if judge this request of data message, this request of data message of buffer memory, and re-start three-way handshake by the second circuit and opposite equip., to set up the second connection on the second circuit, second to connect the request of data message repeating of buffer memory to opposite equip. by this.Owing to passing through the second circuit, again carry out three-way handshake with opposite equip., to set up second on the second circuit, connect, be transmitted to opposite equip. at the request of data message to buffer memory by the second connection, therefore guaranteed not there will be the cutout problem when data flow routing again, thereby effectively solved the cutout problem of being shunted based on DPI Technique on T CP stream in the prior art and causing.
The structural representation of another embodiment of the processing unit that Fig. 8 is data flow of the present invention, on above-mentioned basis embodiment illustrated in fig. 7, as shown in Figure 8, shunting processing module 24 comprises: application identification unit 241 and first minute stream processing unit 242, wherein, application identification unit 241 is for obtaining the type of service with this request of data message; Within first minute, whether stream processing unit 242 is the key business type for the type of service that judges this request of data message, if the type of service of this request of data message is the key business type, this request of data message need to be shunted processing; If the type of service of this request of data message is non-key type of service, this request of data message does not need to shunt processing.
Further, shunting processing module 24 also comprises: configuration management element 243 and second minute stream processing unit 244; Wherein, configuration management element 243 is for storing pre-configured configuration information; Wherein, this configuration information comprises type of service and corresponding circuit; Second minute stream processing unit 244, for the type of service according to this request of data message, inquired about the pre-configured configuration information in this configuration management element 243, judges whether circuit corresponding to data type in this request of data message is this first circuit; If circuit corresponding to the data type in this request of data message is not this first circuit, this request of data message need to be shunted processing, and this second circuit circuit that is the correspondence of the type of service of this request of data message in this configuration information; If circuit corresponding to data type in this request of data message is this first circuit, this request of data message does not need to shunt processing.
Alternatively, this device also comprises: stream tracking module 26 is for the serial number information of the handshake message of following the tracks of this data flow, and records this first attribute information connected.
Alternatively, connection management module 21 is specifically for the serial number information of the handshake message according to this data flow, and this first attribute information connected, re-start three-way handshake by the second circuit and this opposite equip., to set up this second connection on this second circuit.
Alternatively, if sending module 25 is also judged this request of data message for this shunting processing module 24, do not need to shunt processing, by this second connection, by this request of data message repeating of buffer memory, give this opposite equip..
The processing unit of the data flow of the present embodiment can execution graph 2, the technical scheme of embodiment of the method shown in Fig. 3, Fig. 5 or Fig. 6, and it realizes that principle is similar, repeats no more herein.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to aforementioned each embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (13)

1. the processing method of a data flow, is characterized in that, comprising:
By the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of described Intranet user equipment and described opposite equip., and set up the first connection on described the first circuit;
Receive first request of data message of the described data flow of described Intranet user equipment transmission;
Obtain the distributing strategy corresponding with the protocol type of described request of data message, and according to described distributing strategy, judge whether described request of data message needs to shunt processing, need to shunt processing if judge described request of data message, the described request of data message of buffer memory, and re-start three-way handshake by the second circuit and described opposite equip., on described the second circuit, to set up the second connection;
By described second, connect the described request of data message repeating of buffer memory to described opposite equip..
2. the processing method of data flow according to claim 1, it is characterized in that, when the protocol type of described request of data message is not http protocol type and HTTPs protocol type, described according to described distributing strategy, judge that whether described request of data message needs to shunt processing, comprising:
Obtain the type of service of described request of data message, and judge whether the type of service of described request of data message is the key business type;
If the type of service of described request of data message is the key business type, described request of data message need to be shunted processing;
If the type of service of described request of data message is non-key type of service, described request of data message does not need to shunt processing.
3. the processing method of data flow according to claim 1, it is characterized in that, when the protocol type of described request of data message is http protocol type or HTTPs protocol type, described according to described distributing strategy, judge that whether described request of data message needs to shunt processing, comprising:
Obtain the type of service of described request of data message, and, according to the type of service of described request of data message, inquire about pre-configured configuration information, judge whether circuit corresponding to data type in described request of data message is described the first circuit; Wherein, described configuration information comprises type of service and corresponding circuit;
If circuit corresponding to the data type in described request of data message is not described the first circuit, described request of data message need to be shunted processing, and described the second circuit circuit that is the correspondence of the type of service of request of data message described in described configuration information;
If circuit corresponding to data type in described request of data message is described the first circuit, described request of data message does not need to shunt processing.
4. according to the processing method of the arbitrary described data flow of claims 1 to 3, it is characterized in that, before first request of data message of the described data flow that the described Intranet user equipment of described reception sends, described method also comprises:
Follow the tracks of the serial number information of the handshake message of described data flow, and record the described first attribute information connected.
5. the processing method of data flow according to claim 4, is characterized in that, describedly by the second circuit and described opposite equip., re-starts three-way handshake, on described the second circuit, to set up the second connection, comprising:
According to the serial number information of the handshake message of described data flow, and the described first attribute information connected, re-start three-way handshake by the second circuit and described opposite equip., to set up described the second connection on described the second circuit.
6. the processing method of data flow according to claim 5, it is characterized in that the serial number information of the described handshake message according to described data flow, and the described first attribute information connected, re-start three-way handshake by the second circuit and described opposite equip., comprising:
By described the second circuit, send SYN connection request message to described opposite equip., described SYN connection request message comprises the serial number information of the handshake message of described data flow, and the described first attribute information connected;
Receive the reply data bag that described opposite equip. returns, and the SYN message that carries the initial sequence number of described opposite equip.;
By described the second circuit, send confirmation message to described opposite equip., to complete the three-way handshake with described opposite equip..
7. according to the processing method of the arbitrary described data flow of claims 1 to 3, it is characterized in that, also comprise:
Do not need to shunt processing if judge described request of data message, connect described request of data message repeating to described opposite equip. by described first.
8. the processing unit of a data flow, is characterized in that, comprises;
The connection management module, for by the first circuit, be the handshake message of Intranet user equipment and opposite equip. transmitting data flow, to realize the three-way handshake of described Intranet user equipment and described opposite equip., and sets up the first connection on described the first circuit;
Receiver module, for receiving first request of data message of the described data flow that described Intranet user equipment sends;
The agreement distribution module, for obtaining the distributing strategy corresponding with the protocol type of described request of data message;
The shunting processing module, for according to described distributing strategy, judge whether described request of data message needs to shunt processing, need to shunt processing if judge described request of data message, the described request of data message of buffer memory;
Described connection management module is also for by the second circuit and described opposite equip., re-starting three-way handshake, on described the second circuit, to set up the second connection;
Sending module, for connecting the described request of data message repeating of buffer memory to described opposite equip. by described second.
9. the processing unit of data flow according to claim 8, is characterized in that, when the protocol type of described request of data message is not http protocol type and HTTPs protocol type, described shunting processing module comprises:
The application identification unit, for obtaining the type of service of described request of data message;
Whether first minute stream processing unit, be the key business type for the type of service that judges described request of data message, if the type of service of described request of data message is the key business type, described request of data message need to be shunted processing; If the type of service of described request of data message is non-key type of service, described request of data message does not need to shunt processing.
10. the processing unit of data flow according to claim 8, is characterized in that, when the protocol type of described request of data message is http protocol type or HTTPs protocol type, described shunting processing module comprises:
The application identification unit, for obtaining the type of service of described request of data message;
Configuration management element, for storing pre-configured configuration information; Wherein, described configuration information comprises type of service and corresponding circuit;
Second minute stream processing unit, for the type of service according to described request of data message, inquire about the pre-configured configuration information in described configuration management element, judges whether circuit corresponding to data type in described request of data message is described the first circuit; If circuit corresponding to the data type in described request of data message is not described the first circuit, described request of data message need to be shunted processing, and described the second circuit circuit that is the correspondence of the type of service of request of data message described in described configuration information; If circuit corresponding to data type in described request of data message is described the first circuit, described request of data message does not need to shunt processing.
11. according to Claim 8 to 10 arbitrary described data flow processing unit, it is characterized in that, also comprise;
The stream tracking module, for the serial number information of the handshake message of following the tracks of described data flow, and record the described first attribute information connected.
12. the processing unit of data flow according to claim 11, it is characterized in that, described connection management module is specifically for the serial number information of the handshake message according to described data flow, and the attribute information of described the first connection, re-start three-way handshake by the second circuit and described opposite equip., connect to set up described second on described the second circuit.
13. according to Claim 8 to 10 arbitrary described data flow processing unit, it is characterized in that, do not need to shunt processing if described sending module is also judged described request of data message for described shunting processing module, connect the described request of data message repeating of buffer memory to described opposite equip. by described second.
CN2013103646942A 2013-08-20 2013-08-20 Data stream processing method and data stream processing device Pending CN103475593A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103646942A CN103475593A (en) 2013-08-20 2013-08-20 Data stream processing method and data stream processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103646942A CN103475593A (en) 2013-08-20 2013-08-20 Data stream processing method and data stream processing device

Publications (1)

Publication Number Publication Date
CN103475593A true CN103475593A (en) 2013-12-25

Family

ID=49800298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103646942A Pending CN103475593A (en) 2013-08-20 2013-08-20 Data stream processing method and data stream processing device

Country Status (1)

Country Link
CN (1) CN103475593A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282231A (en) * 2015-09-11 2016-01-27 深信服网络科技(深圳)有限公司 Data drainage method, device, and system based on application types
CN105812266A (en) * 2014-12-31 2016-07-27 北京东土科技股份有限公司 Hardware configuration processing method and device for request message
CN105897849A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Cross-process service method and system and proxy server
CN106506400A (en) * 2016-11-04 2017-03-15 锐捷网络股份有限公司 A kind of data stream recognition method and outlet device
CN108206788A (en) * 2016-12-16 2018-06-26 中国移动通信有限公司研究院 The business recognition method and relevant device of a kind of flow

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645894A (en) * 2009-09-01 2010-02-10 成都市华为赛门铁克科技有限公司 Network agent realizing method and device
CN102065017A (en) * 2010-12-31 2011-05-18 成都市华为赛门铁克科技有限公司 Message processing method and device
CN102801824A (en) * 2012-08-28 2012-11-28 山石网科通信技术(北京)有限公司 Method and system for processing NAT equipment, NAPT equipment and TCP application drainage
CN103036789A (en) * 2012-12-18 2013-04-10 北京星网锐捷网络技术有限公司 Message sending method, message sending device and network output equipment
CN103250382A (en) * 2012-12-28 2013-08-14 华为技术有限公司 Distribution method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645894A (en) * 2009-09-01 2010-02-10 成都市华为赛门铁克科技有限公司 Network agent realizing method and device
CN102065017A (en) * 2010-12-31 2011-05-18 成都市华为赛门铁克科技有限公司 Message processing method and device
CN102801824A (en) * 2012-08-28 2012-11-28 山石网科通信技术(北京)有限公司 Method and system for processing NAT equipment, NAPT equipment and TCP application drainage
CN103036789A (en) * 2012-12-18 2013-04-10 北京星网锐捷网络技术有限公司 Message sending method, message sending device and network output equipment
CN103250382A (en) * 2012-12-28 2013-08-14 华为技术有限公司 Distribution method, apparatus and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812266A (en) * 2014-12-31 2016-07-27 北京东土科技股份有限公司 Hardware configuration processing method and device for request message
CN105812266B (en) * 2014-12-31 2018-10-23 北京东土科技股份有限公司 A kind of hardware configuration processing method and processing device of request message
CN105282231A (en) * 2015-09-11 2016-01-27 深信服网络科技(深圳)有限公司 Data drainage method, device, and system based on application types
CN105282231B (en) * 2015-09-11 2018-09-21 深信服网络科技(深圳)有限公司 Data drainage method, apparatus and system based on application type
CN105897849A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Cross-process service method and system and proxy server
CN106506400A (en) * 2016-11-04 2017-03-15 锐捷网络股份有限公司 A kind of data stream recognition method and outlet device
CN106506400B (en) * 2016-11-04 2019-12-06 锐捷网络股份有限公司 data stream identification method and outlet device
CN108206788A (en) * 2016-12-16 2018-06-26 中国移动通信有限公司研究院 The business recognition method and relevant device of a kind of flow
CN108206788B (en) * 2016-12-16 2021-07-06 中国移动通信有限公司研究院 Traffic service identification method and related equipment

Similar Documents

Publication Publication Date Title
CN101039309B (en) Link sharing service apparatus and communication method thereof
CN101588353B (en) Method, system and equipment for sharing files
CN104519036B (en) A kind of method and device for sending business request information
CN103475593A (en) Data stream processing method and data stream processing device
CN108259542A (en) The transmission method and device of resource
CN103931162B (en) The method and the network equipment of processing business
US20150127837A1 (en) Relay apparatus and data transfer method
MXPA06000670A (en) Method and system for providing a transmission link for streaming traffic.
CN104539902B (en) The remote access method and system of a kind of IPC
CN109495599A (en) Data transmission method and system, electronic device and computer readable storage medium
CN107959672A (en) A kind of transfer method of multicasting based on Darwin's streaming media server
JP2009194674A (en) Communication terminal device and control method of communication terminal device
CN105897853A (en) Peer-to-peer network connection method and device
KR100369900B1 (en) Method of Operating with Web Hard using CDN(Content Delivery Network)
CN107204923B (en) Protocol distribution method, system and router
JP2010154086A (en) Communication controller, communication control method of the communication controller, control program, and recording medium
CN102857574B (en) Information processing method and apparatus for Internet of Things
US20090028110A1 (en) Seamless Establishment and Maintenance of Network Connections for Mobile Applications
JP6500214B2 (en) Data distribution device and imaging device
JP2008060785A (en) Ip telephone communication recording system
KR100397673B1 (en) Method for the P2P Data Communication with CDN
WO2008050585A1 (en) Two-way communication system, server apparatus, relay apparatus, two-way communication method and program
CN105230074B (en) Video cache switching handling method, device and system
CN105812422B (en) File transmission method and device based on Internet of things
EP2031809B1 (en) Method for processing data streams in a telecommunication network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20131225