Summary of the invention
The object of the present invention is to provide a kind of network accelerating method of carrying out at gateway and the gateway that uses described method, analyze by the request of data that user terminal is sent to the Internet, and according to predetermined network acceleration strategy the relevant data flow of described request of data is carried out network acceleration, thereby need to software that realize network acceleration be installed respectively at connected each user terminal, the operational efficiency of user terminal will can not be affected, and offer convenience for the upper net operation of user yet.
According to an aspect of the present invention, a kind of network accelerating method of carrying out at gateway is provided, comprise: when receiving the request of data that mails to the Internet from the user terminal that connects, extract the upper-layer protocol header of described request of data, determine whether the data flow that is used for sending described request of data and receives described data is carried out network acceleration according to the upper-layer protocol header that extracts, if and determined to carry out network acceleration, then according to predetermined network acceleration strategy described data flow would be carried out network acceleration.
Describedly determine whether that the operation of the data flow that sends described request of data and receive described data being carried out network acceleration can comprise: if determine that from the upper-layer protocol header that extracts described data flow is encrypting traffic, then determine described data flow not to be carried out network acceleration.
Described network accelerating method can also comprise: set in advance at least one acceleration strategy item, each acceleration strategy item comprise accelerate object and and Provisioning Policy, described acceleration is to liking file type, distance host or the telefile path of request, and described Provisioning Policy is at least one in multithreading acceleration strategy, P2P delivery acceleration strategy and the gateway buffer memory acceleration strategy.Wherein, describedly determine whether that the operation of the data flow that sends described request of data and receive described data being carried out network acceleration also comprises: use the upper-layer protocol header that extracts to search the acceleration strategy item of coupling from described at least one acceleration strategy item, if and found the acceleration strategy item of coupling, would then determine according to the Provisioning Policy in the acceleration strategy item of coupling described data flow to be carried out network acceleration.
Described network accelerating method can also comprise: set in advance at least one and forbid acceleration term, each forbids that acceleration term comprises the acceleration object.Wherein, describedly determine whether that the operation of the data flow that sends described request of data and receive described data being carried out network acceleration also comprises: use the upper-layer protocol header that extracts from described at least one forbid that the acceleration strategy item searches coupling forbid the acceleration strategy item, if and find coupling forbid the acceleration strategy item, then determine described data flow not to be carried out network acceleration.
When according to the network acceleration of gateway buffer memory acceleration strategy executing data stream, the data that can use the caching device buffer memory to receive from the remote access path, and the remote access path of recording described data, thereby when again receiving request to the data on the described remote access path from the arbitrary user terminal that connects, the data of buffer memory are sent to the user terminal that sends described request.
When according to the network acceleration of multithreading acceleration strategy executing data stream, can act on behalf of as the user terminal of the local endpoint of data flow and send described request of data to the remote endpoint of data flow.When the information of the size of the data that receive relevant request from described remote endpoint, can be from first byte of described data, carry out iteratively following operation, until receive the total data of request: start a plurality of threads, the described data of the certain limit that waits to receive to described remote endpoint request successively by described a plurality of threads, and the data of each scope that will receive from remote endpoint send to local endpoint.
When according to the network acceleration of P2P delivery acceleration strategy execution, at least one node of data content of request and the information of corresponding content fragment can be provided to the P2P Tracker server lookup of appointment, to the corresponding content fragment of part of nodes request that inquires, send respectively the information of other node and corresponding content fragment, the content fragment that will receive from the node of request and the user terminal that sends to the request msg content from the content fragment that other gateways receive at least one other gateway that connects.
Described network accelerating method can also comprise: if receive the information of P2P content node and content fragment from another gateway that connects, then according to the P2P agreement to the described content fragment of described content node request, and the content fragment that receives sent to described another gateway.
Can determine according to the content-length field in the http header size of the data of relevant request, the described data of the certain limit that can wait to receive by the Range field value request in the http header, the data of each scope of described reception have the Content-Range header.
According to a further aspect in the invention, a kind of method of carrying out network acceleration at gateway is provided, comprise, when receiving the request of data that mails to the Internet from the user terminal that connects, carry out following steps: the agency sends described request of data as the user terminal of the local endpoint of the data flow of the data that are used for sending described request of data and receiving request to the remote endpoint of described data flow, when the information of the size of the data that receive relevant request from described remote endpoint, from first byte of described data, carry out iteratively following operation, until receive the total data of request: start a plurality of threads, the described data of the certain limit that waits to receive to described remote endpoint request successively by described a plurality of threads, and the data of each scope that will receive from remote endpoint send to local endpoint.
Can determine according to the content-length field in the http header size of the data of relevant request, the described data of the certain limit that waits to receive by the Range field value request in the http header, the data of each scope of described reception have the Content-Range header.
According to a further aspect in the invention, a kind of method of carrying out network acceleration at gateway is provided, comprise, when receiving the request of data that mails to the Internet from the user terminal that connects, carry out following steps: provide at least one node of data content of request and the information of corresponding content fragment to the P2P Tracker server lookup of appointment, to the corresponding content fragment of part of nodes request that inquires, send respectively the information of other node and corresponding content fragment, the content fragment that will receive from the node of request and the user terminal that sends to the request msg content from the content fragment that other gateways receive at least one other gateway that connects.
Described method can also comprise: if receive the information of P2P content node and content fragment from another gateway that connects, then according to the P2P agreement to the described content fragment of described content node request, and the content fragment that receives sent to described another gateway.
The present invention also provides a kind of gateway of realizing above-mentioned network accelerating method.
Embodiment
The network accelerating method of carrying out at gateway of the present invention can realize that the combination in any that also can pass through software, firmware or hardware realizes by software module or the firmware of realizing described method logic are installed in gateway.
Below, describe with reference to the accompanying drawings embodiments of the invention in detail.
In order to realize network accelerating method of the present invention, pre-configured acceleration strategy on gateway, but when gateway receives the request of data that mails to the Internet from the user terminal that connects, according to the data flow execution network acceleration of acceleration strategy to being used for sending described request of data and receiving described data of configuration.For example, for the request of data that sends by http protocol, the whole conversation procedure execution network acceleration of gateway to being used for asking described data and receiving the data of asking; For the request of data that sends by File Transfer Protocol, gateway is also carried out the whole conversation procedure of setting up between user terminal and the distance host and is accelerated to process, and comprises the relevant session status of record, file path etc.Those of ordinary skills can realize the network acceleration of specific upper-layer protocol according to inventive concept of the present invention and the disclosed content of exemplary embodiment.
For the ease of acceleration strategy is set, can provide special-purpose user interface at gateway, thereby the user can set in advance the network acceleration strategy by described user interface.Can the network acceleration strategy be set respectively for specific acceleration object, thereby the acceleration strategy of different thicknesses granularity is provided.Described acceleration to as if file type, distance host or the telefile path of request, and described acceleration strategy is in multithreading acceleration strategy, P2P delivery acceleration strategy and the gateway buffer memory acceleration strategy at least one, but is not limited to these acceleration strategies.Certainly, the acceleration strategy of acquiescence can be set for the data flow that all can accelerate also, perhaps only partial data stream be arranged acceleration strategy, thereby the data flow that is not set up strategy is not performed network acceleration.
For example, the data flow that can be for download mp3, mp4 and jpg file arranges any acceleration strategy.Again for example, can be from the data flow of specific website or particular host downloading data content the multithreading acceleration strategy is set.Again for example, can be to the data flow of the particular download catalog request data content of a certain website any acceleration strategy (such as gateway buffer memory acceleration strategy) is set.
In addition, also can the sign whether opening network accelerates function be set at gateway, thereby opening network accelerates function if described sign is set to not, then any data flow is not carried out network acceleration.
In addition, can also forbid for the specific object setting of accelerating the strategy of network acceleration, thereby according to the acceleration strategy of forbidding that arranges specific data stream not carried out network acceleration.For example, can not arrange the data flow of access specific website is carried out network acceleration, perhaps not arrange the data flow of downloading particular type file (such as the jpg file) is carried out network acceleration.
Fig. 1 illustrates the schematic flow sheet of carrying out the method for network acceleration according to the gateway of exemplary embodiment of the present invention.
With reference to Fig. 1, when gateway receives the request of data that mails to the Internet from connected user terminal, at first extract the upper-layer protocol header from described request of data, to determine whether the data flow execution network acceleration to sending described request of data and receiving described data.According to exemplary embodiment of the present invention, gateway extracts the header of session layer or application layer protocol.For example, the user when user terminal inputs network address in browser
Http:// example.com/test.mp4The time, gateway will receive and comprise GET in the header
Http:// example.com/test.mp4HTTP request, the extraction agreement is that HTTP, distance host are that example.com, file path are the roots of example.com website, the file of request is the information such as test.mp4.
According to exemplary embodiment of the present invention, in the processing of determining being used for sending described request of data and receiving the data flow execution network acceleration of described data, gateway can be determined the data flow whether described data flow encrypts by the upper-layer protocol header that extracts.If determining described data flow is the data flow (for example, using the HTTPS agreement) of encrypting, then determine described data flow not to be carried out network acceleration.
According to another embodiment of the present invention, gateway sets in advance at least one and forbids acceleration term, and each forbids that acceleration term comprises the acceleration object, and described acceleration is to liking file type, distance host or the telefile path of request.At this moment, in the processing of determining being used for sending described request of data and receiving the data flow execution network acceleration of described data, the upper-layer protocol header that gateway use to extract from described at least one forbid that the acceleration strategy item searches coupling forbid the acceleration strategy item, if and find coupling forbid the acceleration strategy item, then determine described data flow not to be carried out network acceleration.Suppose that setting in advance the html file that HTTP is not related at gateway carries out network acceleration, then ought receive to comprise
Http:// example.com/intro.htmlHTTP when request, gateway is determined relevant to described HTTP request data flow execution network acceleration by above-mentioned processing.
According to a preferred embodiment of the invention, gateway sets in advance at least one acceleration strategy item, each acceleration strategy item comprise accelerate object and and Provisioning Policy, described acceleration object is file type, distance host or the telefile path of request as previously mentioned, and described Provisioning Policy is at least one in multithreading acceleration strategy, P2P delivery acceleration strategy and the gateway buffer memory acceleration strategy.Described determining whether the data flow that sends described request of data and receive described data is carried out in the processing of network acceleration, gateway uses the upper-layer protocol header that extracts to search the acceleration strategy item of coupling from described at least one acceleration strategy item, if and found the acceleration strategy item of coupling, would then determine according to the Provisioning Policy of acceleration strategy item indication described data flow to be carried out network acceleration.Suppose in gateway, to set in advance MP3 or MP4 file are carried out the multithreading acceleration strategy, then when comprising the HTTP request of http://example.com/test.mp4, can determine that according to above-mentioned processing the relevant data flow of described HTTP request is carried out multi-threaded network to be accelerated.Describe the processing that multi-threaded network accelerates in detail with reference to Fig. 2 after a while.
After this, if definite execution network acceleration to sending described request of data and receiving the data flow of described data, then gateway is carried out network acceleration according to the network acceleration strategy of coupling to described data flow.
According to another exemplary embodiment of the present invention, gateway according to predetermined network acceleration strategy (such as the network acceleration strategy of acquiescence) to as described in data flow carry out network acceleration.
Data flow shown in Fig. 2 left side is that the transfer of data when not carrying out network acceleration flows to, the processing of the schematically illustrated multithreading acceleration strategy according to exemplary embodiment of the present invention in right side.
Shown in Fig. 2 right side, when according to the network acceleration of multithreading acceleration strategy executing data stream, gateway proxy of the present invention sends described request of data as the user terminal of the local endpoint of data flow to the remote endpoint of data flow; When the information of the size of the data that receive relevant request from described remote endpoint, from first byte of described data, carry out iteratively following operation, until receive the total data of request: start a plurality of threads, the described data of the certain limit that waits to receive to described remote endpoint request successively by described a plurality of threads, and the data of each scope that will receive from remote endpoint send to local endpoint.
Suppose to receive the HTTP request that comprises http://example.com/test.mp4 from user terminal, gateway sends the HTTP request of http://example.com/test.mp4 separately as the agency of described user terminal by the Internet at this moment.When receiving the corresponding http response that comprises a part of data (such as 1200 byte datas), gateway determines also need download how many data by the content-length in the http response (3M), after this start for example 5 threads, sending range by these 5 threads respectively is 1201-2400,2401-3600, the HTTP request of 3601-4800 and 4801-6000, comprise the RANGE field that value is respectively above-mentioned scope in the header of described HTTP request), and when each range data that receives request from example.com (marking among the CONTENT-RANGE the header in http response), described http response is sent to user terminal again.Gateway sends be used to the request of data of asking follow-up each scope continuously by described a plurality of threads, and the http response that receives is transmitted to user terminal, until finish the reception of whole request msgs.
Fig. 3 illustrates the processing according to the P2P delivery acceleration strategy of exemplary embodiment of the present invention.
When according to the network acceleration of P2P delivery acceleration strategy execution, gateway of the present invention provides at least one node of data content of request and the information of corresponding content fragment to the P2PTracker server lookup of appointment; Gateway is to the corresponding content fragment of part of nodes request that inquires; Send respectively the information of other node and corresponding content fragment and the content fragment that will receive from the node of request and the user terminal that sends to the request msg content from the content fragment that other gateways receive at least one other gateway that connects.
In described other gateways each to the described content fragment of described content node request, and sends to described gateway with the content fragment that receives according to the P2P agreement when the gateway from described connection receives the information of P2P content node and content fragment.
As shown in Figure 3, user terminal 1, user terminal 2 are connected with user terminal respectively and are connected separately gateway 1, gateway 2 and gateway 3, and described 3 gateways are connected to each other.Suppose this moment, described 3 user terminals are all asked same data content.At this moment, gateway 1 at first can provide content node and the content fragment of described data content to P2P Tracker server lookup, suppose to inquire 3 content nodes, then gateway 1 is to first first content fragment of content node request, and the information of second content node and corresponding contents burst is sent to gateway 2, the information of the 3rd content node and corresponding contents burst is sent to gateway 3.After gateway 2 and gateway 3 each leisure receive the information of corresponding content node and content fragment, separately to the corresponding content fragment of corresponding content node request.When gateway 2 and gateway 3 receive corresponding content fragment separately, the content fragment that receives is sent to gateway 1.The content fragment that gateway 1 receives with the content fragment of its request and from other two gateways sends to user terminal 1 as the response of request of data.
Fig. 4 exemplarily illustrates the processing according to gateway buffer memory acceleration strategy of the present invention.
When according to the network acceleration of gateway buffer memory acceleration strategy executing data stream, the data of using the caching device buffer memory to receive from the remote access path, and the remote access path of recording described data, thereby when again receiving request to the data on the described remote access path from the arbitrary user terminal that connects, the data of buffer memory are sent to the user terminal that sends described request.
With reference to Fig. 4, when the network acceleration of the data flow of carrying out user terminal 1 request http://example.com/test.mp4 according to the gateway buffer memory acceleration strategy that arranges, gateway allows described HTTP request by to download test.mp4.When gateway receives the test.mp4 file, test.mp4 is buffered in its inner buffer device, and records the remote access path of described file, namely
Http:// example.com/test.mp4After this, when again receiving from user terminal 1 or the user terminal 2 that connects described gateway
Http:// example.com/test.mp4Request the time, gateway is packaged as the user terminal that http response sends to the described content of request with the test.mp4 of buffer memory.
Network accelerating method of the present invention can be carried out the transmission of data flow in conjunction with the multiple network acceleration strategy and accelerate to optimize.For example, can in conjunction with gateway buffer memory acceleration strategy and multi-thread transmission acceleration strategy, in the data content that starts the multi-thread transmission request, the data content that receives be buffered in the caching device.
The present invention also provides a kind of gateway be used to realizing described network accelerating method.
Can find out with reference to the exemplary embodiment description of this invention according to above-mentioned, the network accelerating method of realizing at gateway of the present invention can be carried out network acceleration to data flow on gateway, thereby need to software or browser plug-in that realize the network acceleration function be installed separately at user terminal, the system effectiveness to user terminal does not produce harmful effect in accelerator, for the user also provides convenience.
In addition, according to technical scheme of the present invention, can different thicknesses granularity, different network acceleration strategy be set to specific protocol type, particular file types, specific communications end points, neatly the network acceleration of executing data stream.
Although represent with reference to preferred embodiment and described the present invention, it should be appreciated by those skilled in the art that in the situation that does not break away from the spirit and scope of the present invention that are defined by the claims, can carry out various modifications and conversion to these embodiment.