CN107104997A - A kind of reorientation method, terminal and system - Google Patents
A kind of reorientation method, terminal and system Download PDFInfo
- Publication number
- CN107104997A CN107104997A CN201610096473.5A CN201610096473A CN107104997A CN 107104997 A CN107104997 A CN 107104997A CN 201610096473 A CN201610096473 A CN 201610096473A CN 107104997 A CN107104997 A CN 107104997A
- Authority
- CN
- China
- Prior art keywords
- terminal
- caching servers
- web caching
- redirected
- request message
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Abstract
The embodiment of the invention discloses a kind of reorientation method, terminal and system, method includes terminal and sends the request message of n times first to external network server, wherein, N is more than or equal to 1, and the first request message is used for terminal and accesses data from external network server request first;Terminal receives the M secondary response information that Web caching servers are sent, wherein, M is more than or equal to 1, and response message is corresponding with the first request message;Terminal parses response header according to each response message;Terminal is redirected to Web caching servers according to each response header.
Description
Technical field
The present invention relates to the communications field, more particularly to a kind of reorientation method, terminal and system.
Background technology
Under normal circumstances, user is connected to Internet internets by LAN, to realize access Web page
Face simultaneously obtains information needed.However, with number of users in LAN the content for increasing, obtaining information not
It is disconnected abundant, user's request frequency of operator's outlet bandwidth and up-link is added, local is also increased
Link stress between net and Internet.In order to reduce the link stress between LAN and Internet, lead to
It is standing to put the Web caching servers for prestoring internet hot spots content, user is visited using the mode of redirection
Ask that the message redirecting of Web page, to Web caching servers, data is obtained to realize from caching server
Resource.In order to ensure Web caching servers stable operation, it is necessary to be tested simultaneously its redirection function
Analysis.
In the prior art, the process of the redirection function of analysis Web caching servers includes:Web caching clothes
Business device filters out URL (URL, the Uniform Resource of at least one external network server
Locator) address;Terminal repeatedly accesses above-mentioned URL addresses, be redirected to Web caching servers and under
Carry the corresponding file data that prestores;Packet capturing is carried out to the data in Web caching servers and terminal, and obtained
Obtain packet capturing data;By analyzing packet capturing data, and then analyze the redirection work(of Web caching servers
Energy.
However, due to Web caching servers prestore file data it is larger cause terminal downloads prestore file when
Between it is longer, add the time that terminal downloads the corresponding file data that prestores by Web caching servers.
The content of the invention
In order to solve the above technical problems, the embodiment of the present invention is expected to provide a kind of reorientation method, terminal and is
System, can improve the detection speed of redirection function and intelligent in test.
The technical proposal of the invention is realized in this way:
In a first aspect, the embodiment of the present invention provides a kind of reorientation method, including:Terminal is to external network server
The request message of n times first is sent, wherein, N is more than or equal to 1, and the first request message is used for terminal from outer net
Server request first accesses data;Terminal receives the M secondary response information that Web caching servers are sent,
Wherein, M is more than or equal to 1, and response message is corresponding with the first request message;Terminal is according to each response message
Parse response header;Terminal is redirected to Web caching servers according to each response header.
Further, head response information includes destination address and conditional code, correspondingly, and terminal is rung according to each
Answer header to be redirected to Web caching servers, specifically include:Terminal is identifying that each destination address refers to
During to Web caching servers, terminal is completed according to destination address and conditional code and is redirected to Web caching clothes
Business device.
Further, it is redirected in terminal according to each response header after Web caching servers, side
Method also includes:Terminal sends N and M to Web caching servers, so that Web caching servers are to end
The power that is redirected to that Web caching servers are redirected at end is detected.
Further, it is redirected in terminal according to each response header after Web caching servers, side
Method also includes:Terminal sends the second request message to Web caching servers, wherein, the second request message is used
In terminal data are accessed from Web caching servers request first;Terminal receives Web caching servers and sent
First access data.
Second aspect, the embodiment of the present invention provides a kind of terminal, including:Transmitting element, receiving unit, solution
Analyse unit and redirect unit, wherein:Transmitting element, is asked for sending n times first to external network server
Message, wherein, N is more than or equal to 1, and the first request message is used for terminal and visited from external network server request first
Ask data;Receiving unit, after sending the request message of n times first to external network server in transmitting element,
Receive the M secondary response information that Web caching servers are sent, wherein, M is more than or equal to 1, response message with
First request message correspondence;Resolution unit, the response message for being received according to each receiving unit is parsed
Respond header;Unit is redirected, the response header for being parsed according to each resolution unit is redirected
To Web caching servers.
Further, head response information includes destination address and conditional code, correspondingly, redirects unit, tool
Body is used for when the destination address for identifying that each resolution unit is parsed points to Web caching servers, according to
Destination address and conditional code complete terminal and are redirected to Web caching servers.
Further, transmitting element, is additionally operable to be redirected to according to each response header in redirection unit
After Web caching servers, N and M are sent to Web caching servers, so as to Web buffer services
The power that is redirected to that device is redirected to Web caching servers to terminal is detected.
Further, transmitting element, is additionally operable to be redirected to according to each response header in redirection unit
After Web caching servers, the second request message is sent to Web caching servers, wherein, the second request
Message is used for terminal and accesses data from Web caching servers request first;Receiving unit, is additionally operable to sending
Unit is sent to Web caching servers after the second request message, receives what Web caching servers were sent
First accesses data.
The third aspect, the embodiment of the present invention provides a kind of Redirectional system, including terminal, Web buffer services
Device and external network server, wherein:Terminal, for sending N number of first request message to external network server, its
In, N is more than or equal to 1, and the first request message is used for terminal and accesses data from external network server request first;
The M response message that Web caching servers are sent is received, wherein, M is more than or equal to 1;Rung according to each
Information is answered to parse response header;Web caching servers are redirected to according to each response header;
Web caching servers, for when monitoring that terminal sends the first request message to external network server, to end
End sends response message;External network server, the first request message sent for receiving terminal.
Further, Web caching servers, specifically include monitoring server and caching child servers, wherein:
Server is monitored, for monitoring terminal whether to external network server the first request message of transmission, and in monitoring
During to terminal to external network server the first request message of transmission, response message is sent to terminal;Cache sub-services
Device, for when receiving terminal the second request message of transmission, sending first to terminal and accessing data.
Further, terminal, is additionally operable to send N and M to Web caching servers;Web caching clothes
Business device, is additionally operable to the number X that statistical monitoring sends the first request message to terminal to external network server, and certainly
Body sends the number Y of response message to terminal, wherein, X is more than or equal to 1, Y and is more than or equal to 1;According to M,
N, X and Y are redirected to Web caching servers to terminal and carry out fault location detection.
Further, terminal, is additionally operable to send N and M to Web caching servers;Web caching clothes
Business device, is additionally operable to according to N and M, Web caching servers are redirected to terminal is redirected to power
Detected.
The embodiments of the invention provide a kind of reorientation method, terminal and system, including terminal is to outer net service
Device sends the request message of n times first, wherein, N is more than or equal to 1, and the first request message is used for terminal from outer
Network server request first accesses data;Terminal receives the M secondary response information that Web caching servers are sent,
Wherein, M is more than or equal to 1, and response message is corresponding with the first request message;Terminal is parsed according to response message
Go out to respond header;Terminal is redirected to Web caching servers according to response header.Using above-mentioned technology
Implementation, can improve the detection speed of redirection function and intelligent in test.
Brief description of the drawings
Fig. 1 is a kind of connected mode schematic diagram of Web caching servers in the prior art;
Fig. 2 is the schematic flow sheet one of reorientation method provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet two of reorientation method provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet three of reorientation method provided in an embodiment of the present invention;
Fig. 5 is the schematic flow sheet four of reorientation method provided in an embodiment of the present invention;
Fig. 6 is the schematic flow sheet five of reorientation method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation of Redirectional system provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear
Chu, it is fully described by.
Fig. 1 is a kind of connected mode schematic diagram of Web caching servers in the prior art.As shown in figure 1,
Terminal 101, Web caching servers 102 and external network server 103 are connected with interchanger 104.Its
In, terminal 101 is with Web caching servers 102 under same LAN, and Web caching servers 102 are
The internet information that the terminal that is stored with 101 is often accessed.Under normal circumstances, terminal 101 is accessing internet
When, the message that request accesses internet is sent by external network server 103.Web caching servers 102
The up-link exported by operator is monitored in real time to terminal 101, if Web caching servers 102
Detect terminal 101 to ask to access the message of internet by external network server 103, for example, sent out to internet
Play download request, using redirecting technique, such as redirecting techniques of HTTP 302, guiding terminal 101 to
The request of Web caching servers 102 needs the content accessed so that terminal 101 is without passing through external network server
103 access internet, you can obtain the content for needing to access.
It can be seen that the localization that the setting of Web caching servers 102 realizes internet hot spots content is deposited
Storage, reduces the time delay of terminal access internet content in LAN.Because Web caching servers 102 are adopted
Realize that customer flow is guided with redirecting technique, thereby it is ensured that it is to ensure that Web delays to be redirected to power index
Deposit the key of the stable operation of server 102.And in the prior art, because Web caching servers prestore file
Data are larger cause terminal downloads prestore file time it is longer, add terminal and pass through Web caching servers
The time of the corresponding file data that prestores is downloaded, speed that analysis redirects is reduced and intelligent.
Embodiment one
Fig. 2 is the schematic flow sheet one of reorientation method provided in an embodiment of the present invention, with reference to shown in Fig. 2,
This method can include:
Step 201:Terminal sends the request message of n times first to external network server, wherein, N is more than or equal to
1, the first request message is used for terminal and accesses data from external network server request first;
Wherein, first the data that data, i.e. terminal are expected to obtain from internet using external network server are accessed.
In actual applications, the form of the first request message is including a variety of, for example, the lattice of the first request message
Formula can be:
GET/HTTP/1.1
Accept:text/html.application/xhtml+xml.*/*
X-HttpWatch-RID:53811-1005
Accept-Language:en-US
Rser-Agent:Mozilla/5.0(compatible;MSIE 10.0;Windows NT
6.1;WOW64;Trident/7.0)
Accept-Encoding:gzip,deflate
Host:www.baidu.com
DNT:1
Connection:Keep-Alive
Cookie:H_PS_PSSID=16669_16716_1433_14601_17155_12657_12824_1286
7_16938_17000
Certainly, the first request message format also includes extended formatting, and the embodiment of the present invention is to the first request message
Form be not particularly limited.
You need to add is that, to ensure that the first request message sent during terminal test to external network server can
Go out net from operator's outbound, it is necessary to send the request message of n times first, such as 10 to external network server
It is secondary, 100, it is 1000 inferior, so as to ensure the accuracy that terminal analysis is redirected.
Preferably, terminal by transmission control protocol (TCP, Transfer Control Protocol) set up with
The connection of external network server;And connected using TCP to external network server the first request message of transmission, wherein,
First request message is asked including HTTP (HTTP, Hyper Text Transfer Protocol).
Step 202:Terminal receives the M secondary response information that Web caching servers are sent, wherein, M is more than
Equal to 1, response message is corresponding with the first request message;
Wherein, response message, including head response (Response Header) information, response text message etc.,
First is obtained from Web caching servers for guiding terminal and access data, that is, be redirected to Web caching clothes
Business device.For example, in practical application, response message includes HTTP 302 and redirects bag, wherein, 302 reset
To i.e. 302 redirect are represented and temporarily redirected (temporary redirect) packet.
In actual applications, Web caching servers can in real time be monitored to the message that terminal is sent.Eventually
End sends the first request message, Web when needing to obtain the first access data from internet to external network server
Caching server can return to response message when monitoring terminal the first request message of transmission to terminal, so as to
Terminal is redirected to Web caching servers.
It is to be appreciated that terminal is after the TCP connections of disconnection and external network server, could be slow with Web
Deposit server to be attached, and receive the response message of Web caching servers transmission.
Step 203:Terminal parses response header according to each response message;
Through actual measurement, if the complete response message that terminal parsing Web caching servers are sent, is generally needed
Want 2 minutes or so;If terminal only parses the response header in the response message of Web caching servers transmission,
It is usually only necessary to 0.1 second or so, so, substantially increases the time that terminal redirects test.
Step 204:Terminal is redirected to Web caching servers according to each response header.
It is to be appreciated that response message includes response header, response text message etc., and in response message
Head response information include terminal redirect test needed for information, such as destination address, conditional code,
Therefore, the head response in the response message that terminal is only sent to Web caching servers is parsed, without
Whole response text in resolution response information is whole file data, it is possible to realize that terminal redirects test.
Consequently, it is possible to be far smaller than the size of response message due to responding the size of header so that terminal parsing rings
The time of information is answered to greatly reduce, while avoiding terminal largely tests the stream brought to Web caching servers
Measure pressure.
Exemplarily, head response information includes destination address and conditional code, correspondingly, and terminal is rung according to each
Answer header to be redirected to Web caching servers, specifically include:Terminal is identifying that each destination address refers to
During to Web caching servers, terminal is completed according to destination address and conditional code and is redirected to Web caching clothes
Business device.
In actual applications, conditional code is used for the mark for characterizing the passage that terminal is redirected to Web caching servers
Know, terminal receives conditional code, that is, illustrate that terminal needs to be redirected to Web caching servers, and destination address
That is the address of Web caching servers, therefore, terminal can complete terminal weight according to destination address and conditional code
It is directed to Web caching servers.
You need to add is that, the information needed for when destination address is redirected for terminal is generally carried in sound
Answer address (Location) field in header.For example, if response header is:
HTTP/1.1302Moved Temporarily
Date:Wed,02Sep 201509:27:59GMT
Content-Type:text/html
Content-Length:215
Connection:Keep-Alive
Location:heeps://www.baidu.com/
Server:BWS/1.1
X-UA-Compatible:IE=Edge, chrome=1
Set-cookie:DB_LAST_QID=13201064592551329076;Path=/;Max-Age=1
<html>
<head><title>302Found</title></head>
<Body bgcolor=" white ">
<center><hl>302Found</h1></center>
<hr><center>pr-nginx_1-0-244_BRANCH Branch
Time:Mon Aug 2414:55:36CST 2015</center>
</body>
</html>
Wherein, the location field in response header is:Location:https://www.baidu.com/,
So, the destination address that terminal redirects test is:https://www.baidu.com/。
Understandably, if destination address points to Web caching servers, illustrate that Web caching servers are pre-
The terminal that is first stored with expects the data obtained;If destination address is not directed to Web caching servers, illustrate
Web caching servers do not prestore the data that terminal is expected to obtain.
Further, with reference to shown in Fig. 3, step 205 is also included after step 204, is specially:
Step 205:Terminal sends N and M to Web caching servers, so as to Web caching servers
The power that is redirected to that Web caching servers are redirected to terminal is detected.
Understandably, because N is the number of times that terminal sends the first request message to external network server, M is eventually
End receives the number of times that Web caching servers send response message, therefore, and terminal sends M and N to Web
Caching server, is redirected so that Web caching servers obtain terminal by calculating M and N ratio
Power is redirected to Web caching servers, so as to realize the redirection function of analysing terminal.
Further, with reference to shown in Fig. 4, step 206 and step 207 are also included after step 204,
Specially:
Step 206:Terminal sends the second request message to Web caching servers, wherein, the second request disappears
Ceasing is used for terminal from Web caching servers request the first access data;
Step 207:Terminal receives the first access data that Web caching servers are sent.
It should be noted that terminal is after realization is redirected to Web caching servers, Web can be passed through
Caching server asks the first access data, without the data obtained using external network server from internet,
So, the time delay of terminal access internet content in LAN is reduced.
Understandably, terminal is after the first access data are obtained, it is possible to use first, which accesses data, carries out institute
The data service or communication service needed.
In practical application, above-mentioned steps can compile autotest program to realize by composing software.Wherein,
Composing software includes many kinds, for example, Git softwares.Git softwares are that a distributed version control of increasing income is soft
Part, possesses efficient bottom distributed storage architecture, using the teaching of the invention it is possible to provide run in windows platform environment
The running environment of Linux command, wherein, common Linux command includes ls orders, cd orders, cat lives
Make, curl orders, the order such as wget.Realized by the autotest program of compiling by poorly efficient packet capturing side
Method is that artificial sampling detection method is changed into terminal request and retest is with statistical test result automatically, such as
This, improves the analysis speed of redirection function and intelligent, not only reduces manpower consumption's cost, also keep away
The error of artificial statistics is exempted from, to realize that fault fast positioning in Web caching server O&Ms and solution are carried
Detection basis is supplied.It is, of course, also possible to be realized using other composing softwares, the embodiment of the present invention is to this
It is not particularly limited.
Embodiment two
Fig. 5 is the schematic flow sheet four of reorientation method provided in an embodiment of the present invention, with reference to shown in Fig. 5,
This method can include:
Step 501:Terminal pre-sets execution times N;
Wherein, N is the loop test that terminal is pre-set, for example, can be 10 times, 100,1000 times
Deng.Certainly, presetting execution number of times can be configured according to actual needs, and the embodiment of the present invention is not done to this
It is specific to set.
You need to add is that, to ensure that the first request message sent during terminal test to external network server can
Go out net from operator's outbound, it is necessary to send multiple first request message to external network server, therefore, eventually
End pre-sets execution times N.
Step 502:Terminal sends the first request message to external network server;
Step 503:Terminal receives the response message that Web caching servers are sent, wherein, response message with
First request message correspondence;
In practical application, terminal can realize that receiving Web caching servers sends by the order such as wget
Response message.
In addition, terminal can store the response message received every time by temporary log file, with after an action of the bowels
It is continuous to carry out corresponding statistical analysis.
Step 504:Terminal parses response header according to response message;
It should be noted that head response information includes destination address and conditional code, wherein, destination address includes
The destination address of Web caching servers is pointed to, and points to the destination address of other servers.
Step 505:Terminal parses destination address and conditional code according to response header;
Step 506:Terminal is when identifying that destination address points to Web caching servers, according to destination address
Terminal, which is completed, with conditional code is redirected to Web caching servers;
Step 507:Terminal recognition performs whether number of times meets and pre-sets execution times N, be unsatisfactory for it is pre-
When execution times N is first set, step 502- steps 506 are continued executing with;Execution number of times is pre-set in satisfaction
During N, step 508 is performed;
Step 508:Terminal statistics completes to be redirected to the number of times M of Web caching servers;
Step 509:Terminal sends N and M to Web caching servers, so as to Web caching servers
The power that is redirected to that Web caching servers are redirected to terminal is detected.
It is to influence the key index of Web caching server stable operations due to being redirected to power, by calculating
Power is redirected to analyze the operation conditions of Web caching servers.
In practical application, step 501- steps 509 can compile autotest program come real by composing software
It is existing.Wherein, composing software includes many kinds, for example, Git softwares.It is real by the autotest program of compiling
Show and poorly efficient packet snapping method i.e. sampling Detection method is changed into terminal request and retest is to unite automatically
Test result is measured, in this way, improving analysis is redirected to the speed of power and intelligent.It is, of course, also possible to
Realized using other composing softwares, the embodiment of the present invention is not particularly limited to this.
Embodiment three
Fig. 6 is the schematic flow sheet five of reorientation method provided in an embodiment of the present invention, with reference to shown in Fig. 6,
This method can include:
Step 600:Terminal pre-sets execution times N;
Step 601:Web caching servers are monitored in real time to terminal;
Step 602:Terminal is set up and is connected with the TCP of external network server, and is connected and taken to outer net using TCP
Business device sends HTTP request;
Specifically, terminal can obtain the URL addresses that user inputs by the browser of itself, pass through domain name
System (DNS, Domain Name System) is parsed to URL addresses, and obtains external network server
Procotol (IP, Internet Protocol) address, and then cause terminal and external network server to set up TCP
Connection.
Wherein, HTTP request is used for terminal to external network server request data, is regarded for example, it may be downloading
Frequency or music sources, or open webpage connection etc..
Step 603:Web caching servers monitor terminal to external network server send HTTP request when,
Response message is sent to terminal.
Wherein, response message, including response header, response text message etc., for guiding terminal from
Web caching servers obtain data, that is, are redirected to Web caching servers.For example, in practical application,
Response message includes HTTP 302 and redirects bag, wherein, 302 redirect, i.e. 302 redirect, represent temporary
When redirect packet.
Step 604:Terminal parses response header according to response message;
It should be understood that response message includes response header, response text message etc., and in response message
Head response information include terminal redirect test needed for information, such as destination address, conditional code,
Therefore, terminal only receives the response header in the response message of Web caching servers transmission, without connecing
The whole response text received in response message is whole file data, it is possible to realize that terminal redirects test.
Consequently, it is possible to be far smaller than the size of response message due to responding the size of header so that terminal, which is received, rings
The time of information is answered to greatly reduce, while avoiding terminal largely tests the stream brought to Web caching servers
Measure pressure.
Through actual measurement, if terminal receives the complete response message that Web caching servers are sent, generally need
Want 2 minutes or so;If terminal only receives the response header in the response message of Web caching servers transmission,
It is usually only necessary to 0.1 second or so, so, substantially increases the time that terminal redirects test.
Step 605:Terminal parses destination address and conditional code according to response header;
You need to add is that, destination address is generally carried for the information needed for terminal redirects test
Respond address (Location) field in header.For example, the location field in response header
For:Location:https://www.baidu.com/, then, terminal redirects the destination address of test
For:https://www.baidu.com/。
Step 606:Terminal is when identifying that destination address points to Web caching servers, according to destination address
Terminal, which is completed, with conditional code is redirected to Web caching servers;
Understandably, if destination address is corresponding with Web caching servers, Web caching servers are illustrated
It is previously stored with the data that terminal is expected to obtain;If destination address is not corresponding with Web caching servers, say
Bright Web caching servers do not prestore the data that terminal is expected to obtain.
Step 607:Terminal sends the second HTTP message to Web caching servers;
Step 608:Terminal receives the data resource that Web caching servers are sent.
Step 609:Terminal recognition performs whether number of times meets and pre-sets execution times N, be unsatisfactory for it is pre-
When execution times N is first set, step 602- steps 608 are continued executing with;Execution number of times is pre-set in satisfaction
During N, step 610 is performed;
Step 610:Terminal statistics completes to be redirected to the number of times M of Web caching servers;
Step 611:Terminal sends N and M to Web caching servers, so as to Web caching servers
The power that is redirected to that Web caching servers are redirected to terminal is detected.
Wherein, data resource is corresponding to the second HTTP message.If for example, the second HTTP message be to
Web caching servers ask video resource, then the data resource that Web caching servers are sent is to regard accordingly
Frequency resource.
The embodiments of the invention provide a kind of reorientation method, sent by only receiving Web caching servers
Response header in response message so that terminal is redirected to Web caching clothes according to head response information realization
It is engaged in device, realizes and the detection speed of redirection function is improved in test and intelligent.
Example IV
Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention, with reference to shown in Fig. 7, the end
End includes:Transmitting element 701, receiving unit 702, resolution unit 703 and redirection unit 704, wherein:
Transmitting element 701, for sending the request message of n times first to external network server, wherein, N is more than
It is used for terminal from external network server request the first access data equal to 1, first request message;
Receiving unit 702, for sending the request message of n times first to external network server in transmitting element 701
Afterwards, the M secondary response information that Web caching servers are sent is received, wherein, M is more than or equal to 1, response
Information is corresponding with the first request message;
Resolution unit 703, the response message for being received according to each receiving unit 702 parses head response
Information;
Unit 704 is redirected, the response header for being parsed according to each resolution unit 703 is redirected
To Web caching servers.
Further, head response information includes destination address and conditional code, correspondingly, redirects unit 704,
During specifically for pointing to Web caching servers in the destination address for identifying that each resolution unit is parsed, root
Terminal, which is completed, according to destination address and conditional code is redirected to Web caching servers.
Further, transmitting element 701, are additionally operable to redirecting unit 704 according to each response header
It is redirected to after Web caching servers, N and M is sent to Web caching servers, so as to Web
The power that is redirected to that caching server is redirected to Web caching servers to terminal is detected.
Further, transmitting element 701, are additionally operable to redirecting unit 704 according to each response header
It is redirected to after Web caching servers, the second request message is sent to Web caching servers, wherein,
Second request message is used for terminal and accesses data from Web caching servers request first;Receiving unit 702,
It is additionally operable to after transmitting element 701 sends the second request message to Web caching servers, receives Web
The first access data that caching server is sent.
It should be noted that above-mentioned terminal includes running such as computer, flat board in windows platform environment
The terminals such as computer, the embodiment of the present invention is not particularly limited to the type of terminal.
Embodiment five
Fig. 8 is a kind of structural representation of Redirectional system provided in an embodiment of the present invention, with reference to shown in Fig. 8,
The Redirectional system includes:Terminal 801, Web caching servers 802 and external network server 803, wherein:
Terminal 801, for sending the request message of n times first to external network server 803, wherein, N is more than
It is used for terminal from the request of external network server 803 first access data equal to 1, first request message;Receive Web
The M secondary response information that caching server 802 is sent, wherein, M is more than or equal to 1;Believed according to every secondary response
Breath parses response header;Web caching servers 802 are redirected to according to each response header;
Web caching servers 802, for monitoring terminal 801 to the transmission of external network server 803 first
During request message, response message is sent to terminal 801;
External network server 803, the first request message sent for receiving terminal 801.
It should be noted that terminal 801 includes running such as computer, flat board in windows platform environment
The terminals such as computer, the embodiment of the present invention is not particularly limited to the type of terminal.
Further, Web caching servers 802, specifically include monitoring server and caching child servers,
Wherein:Server is monitored, is disappeared for whether monitoring terminal 801 to send the first request to external network server 803
Breath, and when monitoring that terminal sends the first request message to external network server, response letter is sent to terminal
Breath;Child servers are cached, for when receiving the second request message of transmission of terminal 801, to terminal 801
Send first and access data.
Further, terminal 801, are additionally operable to send N and M to Web caching servers 802;Web
Caching server 802, is additionally operable to statistical monitoring and sends the first request to terminal 801 to external network server 803
The number X of message, and itself the number Y of response message is sent to terminal 801, wherein, X is more than or equal to
1, Y is more than or equal to 1;Web caching servers are redirected to terminal 801 according to M, N, X and Y
802 carry out fault location detection.
You need to add is that, in actual network O&M, the factor that influence is redirected is included a lot, such as:
Do not wrapped in the change, the DPI equipment faults of output user's request, the output data of DPI equipment that monitor link
Include the factors such as whole requests of terminal.
In practical application, if the execution number of times that pre-sets of terminal is N, i.e., first is sent to external network server
The number of times of request message;The number of times that terminal statistics completes to be redirected to Web caching servers is M;Web
Caching server count the first request message that the terminal monitored is sent to external network server number of times X,
The number of times for the response message that Web caching servers are sent to terminal is Y, then, analysis below can be passed through
Method carries out automated analysis investigation to the various failures of Web caching servers, so that it is guaranteed that Web is cached
Server stable operation:
A, X are less than N, then the factor that influence is redirected to power is DPI equipment output request not complete or DPI
Equipment fault;
B, X are equal to N, then the output of DPI equipment is normal;
C, X are less than Y, then Web caching servers are abnormal;
D, X are equal to Y, but Y is less than M, then shows network environmental factors (such as packet loss, routing device plan
Skip over filter etc.) cause to be redirected to power it is low.
Further, terminal 801, are additionally operable to send N and M to Web caching servers 802;Web
Caching server 802, is additionally operable to according to N and M, and Web caching servers are redirected to terminal 801
802 power that is redirected to is detected.
Understandably, because N is the number of times that terminal sends the first request message to external network server, M is eventually
End receives the number of times that Web caching servers send response message, and therefore, Web caching servers can basis
M and N ratio is redirected to power obtain that terminal is redirected to Web caching servers, so that real
The redirection function of existing analysing terminal.
It is to influence the key index of Web caching server stable operations due to being redirected to power, by calculating
Power is redirected to analyze the operation conditions of Web caching servers.
For example, if the number of times that terminal sends the first request message to external network server is 100 times, terminal
Receive Web caching servers and send the number of times of response message for 99 times, then terminal is redirected to Web and delayed
The power that is redirected to for depositing server is 99%, and due to being redirected to, power is higher, illustrates the redirection of terminal
Function is up;If the number of times that terminal sends the first request message to external network server is 100 times, eventually
End receives Web caching servers and sends the number of times of response message for 55 times, then terminal is redirected to Web
The power that is redirected to of caching server is 55%, and due to being redirected to, power is relatively low, illustrates resetting for terminal
Broken down to function, its failure cause includes:Monitor change, the deep packet of output user's request of link
Do not include in detection (DPI, Deep Packet Inspection) equipment fault, the output data of DPI equipment
Whole requests of terminal, Web caching servers are abnormal, or network environment poor (such as packet loss, routing device
Policy filtering) etc..
It is, of course, also possible to be analyzed by other method, the embodiment of the present invention is not particularly limited to this.
In actual applications, above-mentioned transmitting element 701, receiving unit 702, resolution unit 703, redirection
Unit 704 can be by the processor realization in terminal, specially central processing unit (CPU), microprocessor
(MPU), digital signal processor (DSP) or field programmable gate array (FPGA) etc. are realized, eventually
Memory can also be included in end, the memory can be connected by system bus with processor, wherein, deposit
Reservoir is used to store executable program code, and the program code includes computer-managed instruction, and memory may
High-speed RAM memory is included, it is also possible to also including nonvolatile memory, for example, at least one disk
Memory.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can using hardware embodiment, software implementation or combine software and
The form of the embodiment of hardware aspect.Moreover, the present invention can be used wherein includes calculating one or more
The computer-usable storage medium of machine usable program code (includes but is not limited to magnetic disk storage and optical storage
Device etc.) on the form of computer program product implemented.
The present invention is with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Flow chart and/or block diagram describe.It should be understood that can be by computer program instructions implementation process figure and/or side
Each flow and/or square frame in block diagram and flow and/or the knot of square frame in flow chart and/or block diagram
Close.Can provide these computer program instructions to all-purpose computer, special-purpose computer, Embedded Processor or
The processor of other programmable data processing devices is to produce a machine so that by computer or other can
The instruction of the computing device of programming data processing equipment is produced for realizing in one flow or multiple of flow chart
The device for the function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices
In the computer-readable memory worked in a specific way so that be stored in the computer-readable memory
Instruction, which is produced, includes the manufacture of instruction, and the instruction is realized in one flow of flow chart or multiple flows and/or side
The function of being specified in one square frame of block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made
Obtain and perform series of operation steps on computer or other programmable devices to produce computer implemented place
Reason, so that the instruction performed on computer or other programmable devices is provided for realizing in flow chart one
The step of function of being specified in flow or multiple flows and/or one square frame of block diagram or multiple square frames.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the protection model of the present invention
Enclose.
Claims (12)
1. a kind of reorientation method, it is characterised in that including:
Terminal sends the request message of n times first to external network server, wherein, the N is more than or equal to 1, institute
Stating the first request message is used for the terminal from external network server request the first access data;
The terminal receives the M secondary response information that Web caching servers are sent, wherein, the M is more than
Equal to 1, the response message is corresponding with first request message;
The terminal parses response header according to each response message;
The terminal is redirected to the Web caching servers according to each response header.
2. according to the method described in claim 1, it is characterised in that the head response information includes destination
Location and conditional code, correspondingly, the terminal are redirected to the Web according to each response header and delayed
Server is deposited, is specifically included:
The terminal is when identifying that each destination address points to the Web caching servers, according to institute
State destination address and the conditional code completes the terminal and is redirected to the Web caching servers.
3. according to the method described in claim 1, it is characterised in that in the terminal according to each sound
Header is answered to be redirected to after the Web caching servers, methods described also includes:
The terminal sends the N and the M to the Web caching servers, so as to the Web
The power that is redirected to that caching server is redirected to the Web caching servers to the terminal is examined
Survey.
4. according to the method described in claim 1, it is characterised in that in the terminal according to each sound
Header is answered to be redirected to after the Web caching servers, methods described also includes:
The terminal sends the second request message to the Web caching servers, wherein, second request
Message is used for the terminal and accesses data from Web caching servers request described first;
The terminal receives the first access data that the Web caching servers are sent.
5. a kind of terminal, it is characterised in that including:Transmitting element, receiving unit, resolution unit and reset
To unit, wherein:
The transmitting element, for sending the request message of n times first to external network server, wherein, the N
More than or equal to 1, first request message is used for the terminal and accessed from external network server request first
Data;
The receiving unit, for sending the request message of n times first to external network server in the transmitting element
Afterwards, the M secondary response information that Web caching servers are sent is received, wherein, the M is more than or equal to 1,
The response message is corresponding with first request message;
The resolution unit, for parsing sound according to the response message that the receiving unit is received every time
Answer header;
The redirection unit, for the response header weight parsed according to each resolution unit
It is directed to the Web caching servers.
6. terminal according to claim 5, it is characterised in that the head response information includes destination
Location and conditional code, correspondingly, the redirection unit, specifically for identifying each resolution unit
When the destination address that parses points to the Web caching servers, according to the destination address and described
Conditional code completes the terminal and is redirected to the Web caching servers.
7. terminal according to claim 5, it is characterised in that the transmitting element, is additionally operable in institute
Redirection unit is stated to be redirected to after the Web caching servers according to each response header, will
The N and the M are sent to the Web caching servers, so that the Web caching servers are to institute
State terminal and be redirected to the power that is redirected to of the Web caching servers and detected.
8. terminal according to claim 5, it is characterised in that the transmitting element, is additionally operable in institute
Redirection unit is stated to be redirected to after the Web caching servers according to each response header, to
The Web caching servers send the second request message, wherein, second request message is used for the end
End accesses data from Web caching servers request described first;
The receiving unit, being additionally operable to please to Web caching servers transmission second in the transmitting element
Ask after message, receive the first access data that the Web caching servers are sent.
9. a kind of Redirectional system, it is characterised in that including terminal, Web caching servers and outer net service
Device, wherein:
The terminal, for sending the request message of n times first to the external network server, wherein, the N
More than or equal to 1, first request message is used for the terminal and accessed from external network server request first
Data;The M secondary response information that Web caching servers are sent is received, wherein, the M is more than or equal to 1;
Response header is parsed according to each response message;It is redirected to according to each response header
The Web caching servers;
The Web caching servers, for monitoring the terminal to external network server transmission first
During request message, response message is sent to the terminal;
The external network server, for receiving first request message that the terminal is sent.
10. system according to claim 9, it is characterised in that the Web caching servers, tool
Body includes monitoring server and caching child servers, wherein:
The monitoring server, for monitoring whether the terminal asks to external network server transmission first
Message, and when monitoring that the terminal sends first request message to the external network server, to
The terminal sends the response message;
The caching child servers, for when receiving the terminal and sending the second request message, to described
Terminal sends described first and accesses data.
11. system according to claim 9, it is characterised in that
The terminal, is additionally operable to send the N and the M to the Web caching servers;
The Web caching servers, are additionally operable to statistical monitoring and are sent to the terminal to the external network server
The number X of first request message, and itself the number Y of response message is sent to the terminal, wherein, institute
X is stated more than or equal to 1, the Y is more than or equal to 1;According to the M, the N, the X and the Y
The Web caching servers are redirected to the terminal and carry out fault location detection.
12. system according to claim 9, it is characterised in that
The terminal, is additionally operable to send the N and the M to the Web caching servers;
The Web caching servers, are additionally operable to according to the N and the M, and the terminal is redirected
The power that is redirected to the Web caching servers is detected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610096473.5A CN107104997A (en) | 2016-02-22 | 2016-02-22 | A kind of reorientation method, terminal and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610096473.5A CN107104997A (en) | 2016-02-22 | 2016-02-22 | A kind of reorientation method, terminal and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107104997A true CN107104997A (en) | 2017-08-29 |
Family
ID=59658299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610096473.5A Pending CN107104997A (en) | 2016-02-22 | 2016-02-22 | A kind of reorientation method, terminal and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107104997A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150725A (en) * | 2018-07-09 | 2019-01-04 | 网宿科技股份有限公司 | Traffic grooming method and server |
CN111901396A (en) * | 2020-07-08 | 2020-11-06 | 厦门网宿有限公司 | Resource request response method, redirection server and decision distribution server |
CN112866325A (en) * | 2019-11-28 | 2021-05-28 | 北京金山云网络技术有限公司 | Resource file transmission method and device, upper layer in CDN and edge node |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102202418A (en) * | 2011-02-23 | 2011-09-28 | 华为技术有限公司 | Method for establishing service and method, equipment and system for providing service |
CN102594877A (en) * | 2012-01-19 | 2012-07-18 | 网宿科技股份有限公司 | Method and system for combining redirected download request and agency service to accelerate network service |
CN102668518A (en) * | 2011-12-02 | 2012-09-12 | 华为技术有限公司 | Content distribution network routing method, system, and user terminal |
CN102891807A (en) * | 2012-07-16 | 2013-01-23 | 北京东方网信科技股份有限公司 | Network flow cache method and system based on active guidance |
WO2015106279A2 (en) * | 2014-01-13 | 2015-07-16 | Qualcomm Incorporated | Uplink pilot channel positioning for circuit switched fallback |
WO2016000114A1 (en) * | 2014-06-30 | 2016-01-07 | 华为技术有限公司 | Method, system and related devices for making statistics on redirection performance indicators |
-
2016
- 2016-02-22 CN CN201610096473.5A patent/CN107104997A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102202418A (en) * | 2011-02-23 | 2011-09-28 | 华为技术有限公司 | Method for establishing service and method, equipment and system for providing service |
CN102668518A (en) * | 2011-12-02 | 2012-09-12 | 华为技术有限公司 | Content distribution network routing method, system, and user terminal |
CN102594877A (en) * | 2012-01-19 | 2012-07-18 | 网宿科技股份有限公司 | Method and system for combining redirected download request and agency service to accelerate network service |
CN102891807A (en) * | 2012-07-16 | 2013-01-23 | 北京东方网信科技股份有限公司 | Network flow cache method and system based on active guidance |
WO2015106279A2 (en) * | 2014-01-13 | 2015-07-16 | Qualcomm Incorporated | Uplink pilot channel positioning for circuit switched fallback |
WO2016000114A1 (en) * | 2014-06-30 | 2016-01-07 | 华为技术有限公司 | Method, system and related devices for making statistics on redirection performance indicators |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150725A (en) * | 2018-07-09 | 2019-01-04 | 网宿科技股份有限公司 | Traffic grooming method and server |
CN109150725B (en) * | 2018-07-09 | 2021-07-16 | 网宿科技股份有限公司 | Traffic grooming method and server |
CN112866325A (en) * | 2019-11-28 | 2021-05-28 | 北京金山云网络技术有限公司 | Resource file transmission method and device, upper layer in CDN and edge node |
CN112866325B (en) * | 2019-11-28 | 2023-05-16 | 北京金山云网络技术有限公司 | Resource file transmission method and device, upper layer and edge node in CDN |
CN111901396A (en) * | 2020-07-08 | 2020-11-06 | 厦门网宿有限公司 | Resource request response method, redirection server and decision distribution server |
CN111901396B (en) * | 2020-07-08 | 2021-08-06 | 厦门网宿有限公司 | Resource request response method, redirection server and decision distribution server |
US11799987B2 (en) | 2020-07-08 | 2023-10-24 | Xiamen Wangsu Co., Ltd. | Method for responding to resource request, redirect server, and decision delivery server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8510469B2 (en) | Measuring attributes of client-server applications | |
US9456019B2 (en) | Web page load time prediction and simulation | |
CN105335293B (en) | A kind of automatization test system and method based on interface concurrent | |
CN103067214B (en) | For testing the method for web site performance, client, server and system | |
CN103257989B (en) | Web page download time is analyzed | |
US6976063B1 (en) | Method and system for dynamically configuring a server computer | |
CN110457199A (en) | The method and apparatus of performance test | |
CN103560932A (en) | Wireless sensor network remote protocol conformance testing system and method | |
CN107133161B (en) | Method and device for generating client performance test script | |
EP3078180B1 (en) | Performance metric of a system conveying web content | |
CN110224896B (en) | Network performance data acquisition method and device and storage medium | |
CN105024872A (en) | Network performance test method and device | |
CN103825783A (en) | Test method and device | |
CN105068876A (en) | Method for acquiring mobile phone APP performance data based on distributed true phones | |
CN109274669A (en) | One kind bypassing WAF reverse proxy method based on online traffic mirroring | |
CN107124430A (en) | Pagejack monitoring method, device, system and storage medium | |
CN107104997A (en) | A kind of reorientation method, terminal and system | |
CN108696579A (en) | A kind of request responding method, device and electronic equipment | |
CN104883298A (en) | Business quality detection method and router | |
CN115150377A (en) | Method and device for calling and processing simulation interface | |
Rizothanasis et al. | Identifying user actions from HTTP (S) traffic | |
US20160308706A1 (en) | Correlating web traffic events to a web page session | |
CN107707433A (en) | A kind of method and computer equipment from network platform test operation flow | |
CN106886397A (en) | Information collecting method, gateway device and server | |
Uzun et al. | End-to-end internet speed analysis of mobile networks with mapReduce |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170829 |