Summary of the invention
The object of the present invention is to provide a kind of network accelerating method performed on gateway and the gateway using described method, analyzed by request of data user terminal being sent to the Internet, and the data flow relevant to described request of data according to predetermined network acceleration strategy performs network acceleration, thus do not need, at connected each user terminal, the software realizing network acceleration is installed respectively, the operational efficiency of user terminal can not be affected, also for user's online operation offers convenience.
According to an aspect of the present invention, a kind of network accelerating method performed on gateway is provided, comprise: when receiving from the user terminal connected the request of data mailing to the Internet, extract the upper-layer protocol header of described request of data, according to extract upper-layer protocol header determine whether to for send described request of data and receive described data data flow perform network acceleration, and if determine to perform network acceleration, then according to predetermined network acceleration strategy, network acceleration is performed to described data flow.
Described determining whether can comprise the operation of the data flow execution network acceleration sending described request of data and receive described data: if determine that described data flow is encrypting traffic from the upper-layer protocol header extracted, then determine not perform network acceleration to described data flow.
Described network accelerating method can also comprise: pre-set at least one acceleration strategy item, each acceleration strategy item comprise accelerate object and and Provisioning Policy, described acceleration to as if the file type of request, distance host or telefile path, described Provisioning Policy is at least one in multithreading acceleration strategy, P2P delivery acceleration strategy and gateway caches acceleration strategy.Wherein, described determining whether also comprises the operation of the data flow execution network acceleration sending described request of data and receive described data: use the upper-layer protocol header extracted to search the acceleration strategy item of coupling from least one acceleration strategy item described, and if find the acceleration strategy item of coupling, then determine to perform network acceleration according to the Provisioning Policy in the acceleration strategy item of coupling to described data flow.
Described network accelerating method can also comprise: pre-set at least one and forbid acceleration term, eachly forbids that acceleration term comprises acceleration object.Wherein, describedly determine whether that performing the operation of network acceleration to the data flow sending described request of data and receive described data also comprises: use the upper-layer protocol header that extracts from described at least one forbid that acceleration strategy item searches coupling forbid acceleration strategy item, and if what find coupling forbids acceleration strategy item, then determine not perform network acceleration to described data flow.
When performing the network acceleration of data flow according to gateway caches acceleration strategy, can use caching device buffer memory distally access path receive data, and record the remote access path of described data, thus when again receiving the request to the data described remote access path from the arbitrary user terminal connected, the data of buffer memory are sent to the user terminal sending described request.
When performing the network acceleration of data flow according to multithreading acceleration strategy, the user terminal can acted on behalf of as the local endpoint of data flow sends described request of data to the remote endpoint of data flow.When receiving the information of size of the data about request from described remote endpoint, can from the first character joint of described data, perform following operation iteratively, until receive the total data of request: start multiple thread, waited the described data of the certain limit received by described multiple thread successively to described remote endpoint request, and the data of each scope received from remote endpoint are sent to local endpoint.
When according to the strategy execution network acceleration of P2P delivery acceleration, the information of at least one node of the data content of request and corresponding content fragment can be provided to the P2PTracker server lookup of specifying, to the corresponding content fragment of part of nodes request inquired, other node and the information of corresponding content fragment is sent respectively, the content fragment that the node from request is received and the user terminal being sent to request msg content from the content fragment that other gateways receive at least one other gateway connected.
Described network accelerating method can also comprise: if receive the information of P2P content node and content fragment from another gateway connected, then according to P2P agreement to content fragment described in described content node request, and the content fragment of reception is sent to another gateway described.
The size of the data about request can be determined according to the content-length field in http header, wait the described data of the certain limit received by the Range field value request in http header, the data of each scope of described reception have Content-Range header.
According to a further aspect in the invention, a kind of method performing network acceleration on gateway is provided, comprise, when receiving from the user terminal connected the request of data mailing to the Internet, perform following steps: agency sends described request of data as the user terminal of local endpoint of the data flow for sending described request of data and receiving the data of asking to the remote endpoint of described data flow, when receiving the information of size of the data about request from described remote endpoint, from the first character joint of described data, perform following operation iteratively, until receive the total data of request: start multiple thread, waited the described data of the certain limit received successively to described remote endpoint request by described multiple thread, and the data of each scope received from remote endpoint are sent to local endpoint.
The size of the data about request can be determined according to the content-length field in http header, waited the described data of the certain limit received by the Range field value request in http header, the data of each scope of described reception have Content-Range header.
According to a further aspect in the invention, a kind of method performing network acceleration on gateway is provided, comprise, when receiving from the user terminal connected the request of data mailing to the Internet, perform following steps: the information that at least one node of the data content of request and corresponding content fragment are provided to the P2PTracker server lookup of specifying, to the corresponding content fragment of part of nodes request inquired, other node and the information of corresponding content fragment is sent respectively at least one other gateway connected, the content fragment that node from request is received and the user terminal being sent to request msg content from the content fragment that other gateways receive.
Described method can also comprise: if receive the information of P2P content node and content fragment from another gateway connected, then according to P2P agreement to content fragment described in described content node request, and the content fragment of reception is sent to another gateway described.
The present invention also provides a kind of gateway realizing above-mentioned network accelerating method.
Embodiment
The network accelerating method performed at gateway of the present invention is by installing the software module or firmware realization that realize described method logic in a gateway, and the combination in any also can passing through software, firmware or hardware realizes.
Below, embodiments of the invention are described in detail with reference to the accompanying drawings.
In order to realize network accelerating method of the present invention, pre-configured acceleration strategy on gateway, but gateway from connect user terminal receive the request of data mailing to the Internet time, according to configuration acceleration strategy to for send described request of data and receive described data data flow perform network acceleration.Such as, for the request of data sent by http protocol, the whole conversation procedure of gateway to the data for asking described data and receiving request performs network acceleration; For the request of data sent by File Transfer Protocol, gateway also performs the whole conversation procedure set up between user terminal and distance host and accelerates process, comprises session status, file path etc. that record is relevant.Those of ordinary skill in the art are content disclosed in inventive concept of the present invention and exemplary embodiment, can realize the network acceleration of specific upper-layer protocol.
For the ease of arranging acceleration strategy, special user interface can be provided at gateway, thus user pre-sets network acceleration strategy by described user interface.Network acceleration strategy can be set respectively for specific acceleration object, thus the acceleration strategy of different thicknesses granularity is provided.Described acceleration to as if the file type of request, distance host or telefile path, and described acceleration strategy is at least one in multithreading acceleration strategy, P2P delivery acceleration strategy and gateway caches acceleration strategy, but is not limited to these acceleration strategies.Certainly, the acceleration strategy of acquiescence also can be set for the data flow all can accelerated, or only acceleration strategy be arranged to partial data stream, thus the data flow not being set up strategy is not performed network acceleration.
Such as, the data flow that can be for downloading mp3, mp4 and jpg file arranges any one acceleration strategy.Again such as, can be multithreading acceleration strategy is set from the data flow of specific website or particular host downloading data content.Again such as, the data flow that can be to the particular download catalog request data content of a certain website arranges any one acceleration strategy (as gateway caches acceleration strategy).
In addition, the mark whether opening network accelerates function also can be set on gateway, if thus described mark is set to not opening network acceleration function, then not to any data flow execution network acceleration.
In addition, the strategy forbidding network acceleration can also be set for the specific object accelerated, thus forbid that acceleration strategy does not carry out network acceleration to specific data stream according to what arrange.Such as, can arrange and network acceleration not performed to the data flow of access specific website, or setting does not carry out network acceleration to the data flow downloading particular type file (as jpg file).
Fig. 1 illustrates that the gateway according to exemplary embodiment of the present invention performs the schematic flow sheet of the method for network acceleration.
With reference to Fig. 1, when gateway receives from connected user terminal the request of data mailing to the Internet, first upper-layer protocol header is extracted from described request of data, to determine whether sending described request of data and receiving the data flow execution network acceleration of described data.According to exemplary embodiment of the present invention, gateway extracts the header of session layer or application layer protocol.Such as, when the user of user terminal inputs network address in a browser
http:// example.com/test.mp4time, gateway will receive header and comprise GET
http:// example.com/test.mp4hTTP request, the root that extraction agreement is HTTP, distance host is example.com, file path is example.com website, the file of request is the information such as test.mp4.
According to exemplary embodiment of the present invention, determine to for send described request of data and receive described data data flow perform network acceleration process in, gateway by extract upper-layer protocol header determine the data flow whether described data flow encrypts.If determine that described data flow is the data flow (such as, using HTTPS agreement) of encryption, then determine not perform network acceleration to described data flow.
According to another embodiment of the present invention, gateway pre-sets at least one and forbids acceleration term, eachly forbids that acceleration term comprises acceleration object, described acceleration to as if the file type of request, distance host or telefile path.Now, determine to for send described request of data and receive described data data flow perform network acceleration process in, gateway use the upper-layer protocol header that extracts from described at least one forbid that acceleration strategy item searches coupling forbid acceleration strategy item, and if what find coupling forbids acceleration strategy item, then determine not perform network acceleration to described data flow.Suppose to pre-set on gateway and network acceleration is not carried out to the html file that HTTP relates to, then comprise when receiving
http:// example.com/intro.htmlhTTP request time, by above-mentioned process, gateway determines that relevant to described HTTP request data flow performs network acceleration.
According to a preferred embodiment of the invention, gateway pre-sets 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 gateway caches acceleration strategy.Determine whether sending described request of data and receiving in the process of data flow execution network acceleration of described data described, gateway uses the upper-layer protocol header extracted to search the acceleration strategy item of coupling from least one acceleration strategy item described, and if find the acceleration strategy item of coupling, then determine to perform network acceleration according to the Provisioning Policy of acceleration strategy item instruction to described data flow.Suppose to pre-set in a gateway and multithreading acceleration strategy is performed to MP3 or MP4 file, then when comprising the HTTP request of http://example.com/test.mp4, can determine that the data flow relevant to described HTTP request performs multi-threaded network and accelerate according to above-mentioned process.The process of multi-threaded network acceleration is described after a while in detail with reference to Fig. 2.
After this, if determine that then gateway performs network acceleration according to the network acceleration strategy of coupling to described data flow to sending described request of data and receiving the execution network acceleration of data flow of described data.
According to another exemplary embodiment of the present invention, gateway according to predetermined network acceleration strategy (the network acceleration strategy as acquiescence) to as described in data flow perform network acceleration.
The data flow illustrated on the left of Fig. 2 is that transfer of data when not carrying out network acceleration flows to, and right side schematically shows the process of the multithreading acceleration strategy according to exemplary embodiment of the present invention.
As shown in the right side of fig 2, when performing the network acceleration of data flow according to multithreading acceleration strategy, 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 receiving the information of size of the data about request from described remote endpoint, from the first character joint of described data, perform following operation iteratively, until receive the total data of request: start multiple thread, waited the described data of the certain limit received by described multiple thread successively to described remote endpoint request, and the data of each scope received from remote endpoint are sent to local endpoint.
Suppose to receive from user terminal the HTTP request comprising http://example.com/test.mp4, now gateway is as the agency of described user terminal, is sent the HTTP request of http://example.com/test.mp4 separately by the Internet.When receiving the corresponding http response comprising a part of data (as 1200 byte datas), gateway determines also need to download how many data by the content-length (3M) in http response, after this such as 5 threads are started, sending range respectively by these 5 threads is 1201-2400, 2401-3600, the HTTP request of 3601-4800 and 4801-6000, the RANGE field that value is respectively above-mentioned scope is comprised) in the header of described HTTP request, and when receiving each range data (the marking in the CONTENT-RANGE in the header in http response) of request from example.com, described http response is sent to user terminal again.Gateway sends the request of data for asking follow-up each scope continuously by described multiple thread, and the http response of reception is transmitted to user terminal, until complete the reception of whole request msg.
Fig. 3 illustrates the process of the P2P delivery acceleration strategy according to exemplary embodiment of the present invention.
When according to the strategy execution network acceleration of P2P delivery acceleration, gateway of the present invention provides the information of at least one node of the data content of request and corresponding content fragment to the P2PTracker server lookup of specifying; Gateway is to the corresponding content fragment of part of nodes request inquired; Other node and the information of corresponding content fragment is sent respectively at least one other gateway connected, and the content fragment that the node from request is received and the user terminal sending to request msg content from the content fragment that other gateways receive.
Each when receiving the information of P2P content node and content fragment from the gateway of described connection in other gateways described, according to P2P agreement to content fragment described in described content node request, and sends to described gateway by the content fragment of reception.
As shown in Figure 3, user terminal 1, user terminal 2 and user terminal 3 are connected respective gateway 1, gateway 2 and gateway 3 respectively, and described 3 gateways are connected to each other.Suppose now, described 3 user terminals all ask same data content.Now, first gateway 1 can provide content node and the content fragment of described data content to P2PTracker server lookup, suppose to inquire 3 content nodes, then gateway 1 is to first content node request, first content fragment, 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 each leisure of gateway 3 receive the information of corresponding content node and content fragment, respectively towards the corresponding content fragment of corresponding content node request.When gateway 2 and gateway 3 receive corresponding content fragment separately, the content fragment of reception is sent to gateway 1.The content fragment that gateway 1 is asked and the content fragment that receives from other two gateways send to user terminal 1 as the response of request of data.
Fig. 4 exemplarily illustrates the process according to gateway caches acceleration strategy of the present invention.
When performing the network acceleration of data flow according to gateway caches acceleration strategy, use the caching device buffer memory distally data that receive of access path, and record the remote access path of described data, thus when again receiving the request to the data described remote access path from the arbitrary user terminal connected, the data of buffer memory are sent to the user terminal sending described request.
With reference to Fig. 4, when performing user terminal 1 according to the gateway caches acceleration strategy arranged and asking the network acceleration of the data flow of http://example.com/test.mp4, gateway allows described HTTP request pass through to download test.mp4.When gateway receives 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.mp4.After this, when again receiving from the user terminal 1 or user terminal 2 that connect described gateway
http:// example.com/test.mp4request time, the test.mp4 of buffer memory is packaged as http response and sends to the user terminal of asking described content by gateway.
Network accelerating method of the present invention can perform acceleration optimization in conjunction with multiple network acceleration strategy to the transmission of data flow.Such as, in conjunction with gateway caches acceleration strategy and multi-thread transmission acceleration strategy, while the data content starting multi-thread transmission request, the data content of reception can be buffered in caching device.
The present invention also provides a kind of gateway for 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 realized at gateway of the present invention can perform network acceleration to data flow on gateway, thus do not need, at user terminal, the software or browser plug-in that realize network acceleration function are installed separately, in accelerator, harmful effect is not produced, for user also provides facility to the system effectiveness of user terminal.
In addition, according to technical scheme of the present invention, different thicknesses granularity, different network acceleration strategies can be set to specific protocol type, particular file types, specific communications end points, perform the network acceleration of data flow neatly.
Although show and describe the present invention with reference to preferred embodiment, it should be appreciated by those skilled in the art that when not departing from the spirit and scope of the present invention be defined by the claims, various amendment and conversion can be carried out to these embodiments.