WO2015061938A1 - 一种重定向数据业务代理的方法、设备及系统 - Google Patents

一种重定向数据业务代理的方法、设备及系统 Download PDF

Info

Publication number
WO2015061938A1
WO2015061938A1 PCT/CN2013/086050 CN2013086050W WO2015061938A1 WO 2015061938 A1 WO2015061938 A1 WO 2015061938A1 CN 2013086050 W CN2013086050 W CN 2013086050W WO 2015061938 A1 WO2015061938 A1 WO 2015061938A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
server
requested
request message
client
Prior art date
Application number
PCT/CN2013/086050
Other languages
English (en)
French (fr)
Inventor
夏林瑾
夏渊
周军平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/086050 priority Critical patent/WO2015061938A1/zh
Priority to EP13896670.0A priority patent/EP3054650A4/en
Priority to CN201380003610.0A priority patent/CN104904182A/zh
Priority to KR1020167013725A priority patent/KR20160075698A/ko
Priority to JP2016526859A priority patent/JP2016541048A/ja
Publication of WO2015061938A1 publication Critical patent/WO2015061938A1/zh
Priority to US15/140,314 priority patent/US20160241664A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, device, and system for redirecting a data service agent.
  • the embodiment of the invention provides a method for redirecting a data service agent, which can improve the efficiency of data acquisition in a scenario requiring redirection, thereby reducing network delay.
  • Embodiments of the present invention also provide corresponding devices and systems.
  • the sending, by the data server indicated by the new path, the second data request message includes:
  • Sending a second data request message to another data server indicated by the new path; correspondingly, the receiving the requested data sent by the data server corresponding to the new path includes:
  • the sending, by the data server corresponding to the new path, the second data request message includes:
  • Sending the second data request message to the data server indicated by the new path; correspondingly, the receiving the requested data sent by the data server corresponding to the new path includes:
  • the sending unit is further configured to send the requested data to the client, so that the user acquires the requested data.
  • the receiving unit is configured to receive the requested data sent by the another data server.
  • the sending unit is configured to send a second data request message to the data server indicated by the new path;
  • the proxy server further includes:
  • a first connection establishing unit configured to establish a transmission control protocol TCP connection with the user end and the data server before the sending unit forwards the first data request message to the data server.
  • the proxy server further includes:
  • a third aspect of the present invention provides a proxy server, including: an input device, an output device, a processor, and a memory,
  • the input device is configured to receive a first data request message sent by the user end, where the output device is configured to forward a first data request message sent by the user end to the data server, where the input device is configured to receive The data storage path carried in the first data request message sent by the user end, and the first data request message is forwarded to the data server, where the data storage path is a storage path of the data requested by the user end, a data request message is sent to the number of the output devices, and is further configured to receive a redirect response message sent by the data server, where the redirect response message carries a new path of the requested data store;
  • the processor is configured to generate a second data request message according to the redirect response message, where the output device is further configured to indicate to the new path according to the new path of the requested data storage
  • the data server sends a second data request message, where the second data request message is used to request data requested by the client from the data server indicated by the new path;
  • the input device is further configured to receive data requested by the user that is sent by the data server indicated by the new path;
  • the output device is further configured to send the requested data to the client, so that the user acquires the requested data.
  • the output device is configured to send a second data request message to the data server indicated by the new path;
  • the input device is configured to receive the requested data sent by the data server, where the requested data is stored in a file path indicated by the new path.
  • the processor is further configured to: before forwarding the first data request message to the data server, The client establishes a Transmission Control Protocol TCP connection with the data server.
  • the processor is further configured to establish a transmission control protocol TCP connection with the user end and the data server before forwarding the first data request message to the data server.
  • the user terminal sends a first data request message to the proxy server, the data storage path carried in the first data request message, and the data storage path is a storage path of data requested by the user terminal;
  • the proxy server is the proxy server described in the above technical solution.
  • the embodiment of the present invention uses the data storage path carried in the first data request message sent by the received user end to forward the first data request message to the data server, where the data storage path is the data requested by the user end.
  • the first data request message is used to request the data server to request the data requested by the client; and receive a redirect response message sent by the data server, where the redirect response message carries the a new path of the requested data store; transmitting, according to the new path of the requested data store, a second data request message to the data server indicated by the new path, the second data request message being used to The data server indicated by the new path requests data requested by the client; receiving the message sent by the data server indicated by the new path Data requested by the client, and sending the requested data to the client, so that the client obtains the requested data.
  • the method for redirecting the data service agent provided by the embodiment of the present invention may be performed by the proxy server in the redirection process.
  • Request data and send the obtained data to the client, thereby improving the efficiency of data acquisition, thereby reducing network latency.
  • FIG. 7 is a schematic diagram of another embodiment of a proxy server according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another embodiment of a proxy server according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of another embodiment of a proxy server according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for redirecting a data service agent, which can improve the efficiency of data acquisition in a scenario requiring redirection, thereby reducing network delay.
  • Embodiments of the present invention also provide corresponding devices and systems. The details are described below separately.
  • an embodiment of a method for redirecting a data service agent includes:
  • the data server when the storage location of the data requested by the client changes, for example: not in the original server, or in the original server, but not in the original folder, the data server sends the data server to the proxy server.
  • the response message is redirected to inform the client of the new path of the currently stored data of the requested data.
  • the proxy server indicated by the new path After receiving the data request message, the proxy server indicated by the new path sends the requested data to the proxy server, and after receiving the data requested by the client, the proxy server sends the data requested by the client. To the client.
  • the embodiment of the present invention adopts the first data request message carried according to the received user end.
  • a data storage path the first data request message is forwarded to the data server, where the data storage path is a storage path of data requested by the user, and the first data request message is used to request the data server Determining data requested by the client; receiving a redirect response message sent by the data server, where the redirect response message carries a new path of the requested data store; and a new path according to the requested data store Transmitting, to the data server indicated by the new path, a second data request message, where the second data request message is used to request data requested by the user end from the data server indicated by the new path; And the requested data sent by the data server indicated by the new path, and sending the data requested by the user end to the user end, so that the user end acquires the requested data.
  • the method for redirecting the data service agent provided by the embodiment of the present invention may be performed by the proxy server in the redirection process.
  • Request data and send the obtained data to the client, thereby improving the efficiency of data acquisition, thereby reducing network latency.
  • the data sending to the data server indicated by the new path is sent.
  • the second data request message may include:
  • the new path indicates a new data server storing the data, so that the proxy server sends a second data request message to the new data server indicated by the new path.
  • the requested data is then received from the new data server.
  • the data server domain name that originally stored the data requested by the client is www.abc.com.
  • the proxy server is redirected.
  • Responding to the new path of the requested data store carried in the message knowing that the requested data is stored in the data server with the domain name www.def.com, then sending the second data to the data server of www.def.com Data request message, then, receiving from domain name is The requested data sent by the data server of www.def.com.
  • the data server indicated by the new path is Sending the second data request message may include:
  • the receiving the requested data sent by the data server corresponding to the new path may include:
  • the requested data is stored under a file path indicated by the new path.
  • the proxy server learns that the data is in the file path named /456 according to the new path of the requested data storage carried in the redirect response message, and then sends the second data request message to the data server again. Requesting the requested data under the file path named /456.
  • the first data request message is forwarded to the data server.
  • the method may further include:
  • TCP Transmission Control Protocol
  • the proxy server establishes a TCP connection with the client and the data server to transmit data through the TCP protocol.
  • the method may further include:
  • the proxy server when the new path indicates that the requested data is currently stored on another data server, the proxy server needs to establish a TCP connection with the other data server to facilitate post-data. Data communication.
  • the proxy server establishes a first TCP connection with the client and the first data server.
  • the client client initiates a TCP connection with the first data server server 1, and the proxy server PROXY establishes a TCP connection with the client and server1 respectively.
  • S105-S110 The client sends a first data request message to the proxy server, and the proxy server forwards the first data request message to the first data server.
  • the first data request message is used to request data requested by the client from the first data server.
  • the first data request message sent by the user end carries the storage path of the data requested by the client, and the proxy server forwards the first data request message according to the storage path.
  • client initiates an HTTP request to the Client www.abc.com to the first data server serverl, proxy server according to the www .abc.com, to forward the first data request message serverl.
  • the first data server serverl responds with 30*(302/303/307) and indicates in the response header field location that the destination host to be redirected is www.def.com.
  • the proxy server establishes a second TCP connection with the second data server.
  • the second data request message is used to request the data requested by the client from the second data server.
  • the second data request message carries the information of the requested data, so that the second data server The requested data will be found.
  • the proxy server returns data requested by the client to the client.
  • the client initiates a TCP connection with the HTTP server, and the proxy server establishes a TCP connection with the client and the server respectively.
  • the client sends a first data request message to the proxy server, and the proxy server forwards the first data request message to the data server.
  • the first data request message is used to request the data requested by the client from the proxy server.
  • the first data request message sent by the user end carries the storage path of the data requested by the client, and the proxy server forwards the first data request message according to the storage path.
  • the client client initiates an HTTP request to www.abc.com/123 to the HTTP server.
  • the proxy server forwards the first data request message to the server according to www.abc.com/123.
  • the data server sends a redirect response message to the proxy server, where the redirect response message carries the new path of the requested data store.
  • the data server determines that the data requested in the first data request message is in the data server, but is not stored in the original file path, and finds the file path currently stored by the requested data, for example: the current storage path is Www.abc.com/456, then carry www.abc.com/456 in the redirect response message.
  • the data server responds with 30*(302/303/307) and indicates in the response header field location that it needs to be redirected to the host's www.abc.com/456 file path;
  • the proxy server sends a second data request message to the data server.
  • the proxy server initiates a request to the data server for the requested data in the www.abc.com/456 file path.
  • the second data request carries the information of the requested data, such that the second data server finds the requested data.
  • the data server returns the requested data to the proxy server.
  • the proxy server returns the data requested by the client to the client.
  • the proxy server releases the TCP connection.
  • the proxy server removes the TCP connection between the client and the HTTP server to release the link resources, thereby improving the utilization efficiency of the link resources.
  • the method for redirecting the data service agent provided by the embodiment of the present invention may be used by the proxy server to proxy the client during the redirection process. Request data, and send the obtained data to the client, thereby improving the efficiency of data acquisition, thereby reducing network latency.
  • the client client initiates a request for data in the network.
  • the HTTP layer of the client encapsulates the HTTP request packet, and the TCP layer is encapsulated and network interconnected according to the protocol stack.
  • IP Internet Protocol, IP
  • the request sent by the client is transmitted to the protocol stack of the proxy server PROXY. Because it is interacting with the client, the server server side of the PROXY protocol stack will create a stack for communication with the server during the TCP link establishment process. Socket, the packet is parsed and reassembled by TCP/IP and parsed in the HTTP layer;
  • the HTTP request needs to be sent by the proxy to the network server.
  • the client side of the proxy protocol stack encapsulates the data and fragments based on the protocol stack structure layer by layer.
  • the socket on the client side is established in the TCP link establishment process; HTTP request Entering the protocol stack of the web server, the IP/TCP/HTTP layer processing is consistent with PROXY.
  • the HTTP server resolves the request packet of the network server. When the object path is obtained, the object data that the client client needs to obtain is not in the path of the file, or even the current server. At this point, the HTTP transaction uplink packet processing process ends.
  • PROXY parses the redirected response from the web server and initiates a new TCP connection between the redirected server (which can be the original server or another data server) and initiates the acquisition on this TCP connection.
  • the PROXY proxy data server will return the correct response data to the client client based on the connection between the PROXY server side and the client client and then parse and display it. At this point, the HTTP transaction downlink processing flow optimized by the proxy through redirection ends.
  • an embodiment of a proxy server provided by an embodiment of the present invention includes:
  • the receiving unit 301 is configured to receive a first data request message sent by the UE.
  • the sending unit 302 is configured to: according to the first data sent by the UE received by the receiving unit 301, The data storage path carried in the message is forwarded, and the first data request message is forwarded to the data server, where the data storage path is a storage path of data requested by the user end, and the first data request message is used for Determining, by the data server, the data requested by the client;
  • the receiving unit 301 is further configured to receive a redirect response message sent by the data server, where the redirect response message carries a new path of the requested data store;
  • the sending unit 302 is further configured to send, according to the new path of the requested data storage, the second data request message generated by the generating unit to the data server indicated by the new path, where the second The data request message is used to request data requested by the client from the data server indicated by the new path;
  • the receiving unit 301 is further configured to receive the requested data sent by the data server indicated by the new path;
  • the sending unit 302 is further configured to send the requested data to the client, so that the client obtains the requested data.
  • the receiving unit 301 receives the first data request message sent by the user end, and the sending unit 302 sends the data storage path carried in the first data request message sent by the user end received by the receiving unit 301 to the data server. Forwarding the first data request message, where the data storage path is a storage path of data requested by the client, and the first data request message is used to request data requested by the client from the data server.
  • the receiving unit 301 further receives a redirect response message sent by the data server, where the redirect response message carries a new path of the requested data storage; and the generating unit 303 receives the location according to the receiving unit 301.
  • Decoding a response message generating a second data request message, where the second data request message is used to request data requested by the user end from the data server indicated by the new path; Describe a new path of the requested data store, and send the health to the data server indicated by the new path.
  • the second data request message generated by the unit; the receiving unit 301 further receiving the requested data sent by the data server indicated by the new path; the sending unit 302 further sending the The requested data is such that the client obtains the requested data.
  • the proxy server needs to send the request to the data server again.
  • the proxy server provided by the embodiment of the present invention can request the client to request data in the redirection process, and send the acquired data to the client. , thereby improving the efficiency of data acquisition, thereby reducing network latency.
  • the sending unit 302 is configured to send a second data request message to another data server indicated by the new path.
  • the receiving unit 301 is configured to receive the requested data sent by the another data server.
  • the sending unit 302 is configured to send a second data request message to the data server indicated by the new path.
  • the receiving unit 301 is configured to receive the requested data sent by the data server, where the requested data is stored in a file path indicated by the new path.
  • the proxy server 30 further includes:
  • the first connection establishing unit 304 is configured to establish a transmission control protocol TCP connection with the user end and the data server before the sending unit forwards the first data request message to the data server.
  • the proxy server further includes:
  • the second connection establishing unit 305 is configured to establish a TCP connection with the another data server before the sending unit sends the second data request message to another data server indicated by the new path.
  • the invention also provides a computer storage medium, the medium storing a program, the program execution time package Some or all of the steps in the method of redirecting the data service agent are included.
  • FIG. 9 is a schematic structural diagram of a proxy server 30 according to an embodiment of the present invention.
  • the proxy server 30 can include an input device 310, an output device 320, a processor 330, and a memory 340.
  • Memory 340 can include read only memory and random access memory and provides instructions and data to processor 330. A portion of memory 340 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • Memory 340 stores the following elements, executable modules or data structures, or a subset thereof, or their extended set:
  • Operation instructions Includes various operation instructions for implementing various operations.
  • Operating System Includes a variety of system programs for implementing basic services and handling hardware-based tasks.
  • the processor 330 performs the following operations by calling an operation instruction stored in the memory 340 (the operation instruction can be stored in the operating system):
  • the first data request message sent by the user end is received by the input device 310, and the first data request message sent by the user end to the data server is forwarded by the output device 320, and the first data request message sent by the user terminal is received by the input device 310.
  • a data storage path where the first data request message is used to request data requested by the client from the data server, and forward the first data request message to a data server, where the data storage path is The storage path of the data requested by the user end, the output device 320 receives the redirect response message sent by the data server, and the redirect response message carries the new path of the requested data storage, and the output device 320 is configured by the output device 320.
  • the data server transmits the path indicated by the requested data, the said data transmission request to the user side via an output device 320, so that the user terminal acquires the requested data.
  • the proxy server requests the client to request data in the redirection process, and the acquired data is obtained. Sent to the client to improve the efficiency of data acquisition, thereby reducing Network latency.
  • the processor 330 controls the operation of the proxy server 30, which may also be referred to as a CPU (Central Processing Unit).
  • Memory 340 can include read only memory and random access memory and provides instructions and data to processor 330. A portion of memory 340 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the components of the proxy server 30 are coupled together by a bus system 350.
  • the bus system 350 may include a power bus, a control bus, and a status signal bus in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 350 in the figure.
  • Processor 330 may be an integrated circuit chip with signal processing capabilities.
  • the instruction in the form of implementation is completed.
  • the processor 330 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware. Component.
  • the methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or carried out.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in a decoding processor.
  • the software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 340, and the processor 330 reads the information in the memory 340 and combines the hardware to perform the steps of the above method.
  • the output device 320 is configured to send a second data request message to another data server indicated by the new path.
  • the input device 310 is configured to receive the requested data sent by the another data server.
  • the output device 320 is configured to send a second data request message to the data server indicated by the new path.
  • the input device 310 is configured to receive the requested data sent by the data server, The requested data is stored under the file path indicated by the new path.
  • the processor 330 is configured to establish a transmission control protocol TCP connection with the user end and the data server before forwarding the first data request message to the data server.
  • the processor 330 is further configured to establish a transmission control protocol TCP connection with the user end and the data server before forwarding the first data request message to the data server.
  • an embodiment of a data acquisition system provided by an embodiment of the present method includes: a client 20, a proxy server 30, and a data server 40;
  • the user terminal 20 sends a first data request message to the proxy server 30, the data storage path carried in the first data request message, and the data storage path is a storage path of data requested by the client,
  • the first data request message is used to request the data server to request the data requested by the client;
  • the proxy server 30 is configured to forward the first data request message to the data server according to the data storage path carried in the received first data request message sent by the user end, where the data storage path is requested by the user end a storage path of the data, receiving a redirect response message sent by the data server, where the redirect response message carries a new path of the requested data storage, according to the new path of the requested data storage,
  • the data server indicated by the new path sends a second data request message, where the second data request message is used to request data requested by the client from the data server indicated by the new path, and receive the new path And indicating, by the indicated data server, the requested data, and sending the requested data to the client, so that the client acquires the requested data.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD, etc.

Abstract

本发明公开了一种重定向数据业务代理的方法,包括:根据接收的用户端发送的第一数据请求消息中携带的数据存储路径,向数据服务器转发所述第一数据请求消息;接收所述数据服务器发送的重定向响应消息,所述重定向响应消息中携带所述所请求的数据存储的新路径;根据所述所请求的数据存储的新路径,向所述新路径所指示的数据服务器发送第二数据请求消息;接收所述新路径所指示的数据服务器发送的所述用户端所请求的数据,并向所述用户端发送所述所请求的数据。本发明实施例提供的重定向数据业务代理的方法,可以由代理服务器在重定向过程中代理用户端请求数据,并将获取到的数据发送给用户端,从而提高数据获取的效率,从而降低了网络时延。

Description

一种重定向数据业务代理的方法、 设备及系统 技术领域
本发明涉及通信技术领域, 具体涉及一种重定向数据业务代理的方法、设 备及系统。
背景技术
在互联网中用户端通过统一资源定位符( Uniform Resource Locator, URL ) 作为地址来寻找服务器并获得所需的数据, 但目标服务器的网络互连协议 ( Internet Protocol, IP )地址并不是一成不变的, 服务器上存储的数据的路径 也会随着存储位置的改变而改变,当用户端想要获取的数据的存储位置发生变 化,例如:不在原始服务器或者虽然在原始服务器但不在原来存储的文件路径; 当用户端请求数据时,服务器会向终端发送一个重定向响应消息,通过此重定 向响应消息告知用户端所请求的数据更新后的存储路径,用户端再向这个新路 径重新发送数据请求, 以获得需要的数据。
在对现有技术的研究和实践过程中, 本发明的发明人发现, 当数据的存储 路径发生变化后, 用户端获得数据时, 增加了一次请求过程, 从而增加了网络 时延, 降低了用户的体验。
发明内容
本发明实施例提供一种重定向数据业务代理的方法,可以在需要重定向的 场景中, 提高数据获取的效率, 从而降低了网络时延。 本发明实施例还提供了 相应的设备及系统。
本发明第一方面提供一种重定向数据业务代理的方法, 包括:
根据接收的用户端发送的第一数据请求消息中携带的数据存储路径,向数 据服务器转发所述第一数据请求消息,所述数据存储路径为所述用户端所请求 的数据的存储路径,所述第一数据请求消息用于向所述数据服务器请求所述用 户端所请求的数据;
接收所述数据服务器发送的重定向响应消息,所述重定向响应消息中携带 所述所请求的数据存储的新路径; 根据所述所请求的数据存储的新路径,向所述新路径所指示的数据服务器 发送第二数据请求消息,所述第二数据请求消息用于向所述新路径所指示的数 据服务器请求所述用户端所请求的数据;
接收所述新路径所指示的数据服务器发送的所述用户端所请求的数据,并 向所述用户端发送所述所请求的数据, 以使所述用户端获取所述所请求的数 据。
结合第一方面,在第一种可能的实现方式中, 所述向所述新路径所指示的 数据服务器发送第二数据请求消息, 包括:
向所述新路径所指示的另一数据服务器发送第二数据请求消息; 对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 包括:
接收所述另一数据服务器发送的所述所请求的数据。
结合第一方面,在第二种可能的实现方式中, 所述向所述新路径对应的数 据服务器发送第二数据请求消息, 包括:
向所述新路径所指示的所述数据服务器发送第二数据请求消息; 对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 包括:
接收所述数据服务器发送的所述所请求的数据,所述所请求的数据存储在 所述新路径所指示的文件路径下的。
结合第一方面、第一方面第一种或第二种可能的实现方式中,在第三种可 能的实现方式中, 所述向数据服务器转发所述第一数据请求消息的步骤之前, 所述方法还包括:
与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
结合第一方面第一种或第三种可能的实现方式,在第四种可能的实现方式 中,所述向所述新路径所指示的另一数据服务器发送第二数据请求消息的步骤 之前, 所述方法还包括:
与所述另一数据服务器建立 TCP连接。
本发明第二方面提供一种代理服务器, 包括: 接收单元, 用于接收用户端发送的第一数据请求消息;
发送单元,用于根据所述接收单元接收的用户端发送的第一数据请求消息 中携带的数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据 存储路径为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于 向所述数据服务器请求所述用户端所请求的数据;
所述接收单元,还用于接收所述数据服务器发送的重定向响应消息, 所述 重定向响应消息中携带所述所请求的数据存储的新路径;
生成单元, 用于根据所述接收单元接收的所述重定向响应消息, 生成第二 数据请求消息;
所述发送单元,还用于根据所述所请求的数据存储的新路径, 向所述新路 径所指示的数据服务器发送所述生成单元生成的所述第二数据请求消息,所述 第二数据请求消息用于向所述新路径所指示的数据服务器请求所述用户端所 请求的数据;
所述接收单元,还用于接收所述新路径所指示的数据服务器发送的所述用 户端所请求的数据;
所述发送单元,还用于向所述用户端发送所述所请求的数据, 以使所述用 户端获取所述所请求的数据。
结合第二方面, 在第一种可能的实现方式中,
所述发送单元,用于向所述新路径所指示的另一数据服务器发送第二数据 请求消息;
所述接收单元, 用于接收所述另一数据服务器发送的所述所请求的数据。 结合第二方面, 在第二种可能的实现方式中,
所述发送单元,用于向所述新路径所指示的所述数据服务器发送第二数据 请求消息;
所述接收单元, 用于接收所述数据服务器发送的所述所请求的数据, 所述 所请求的数据存储在所述新路径所指示的文件路径下的。
结合第二方面、第二方面第一种或第二种可能的实现方式,在第三种可能 的实现方式中, 所述代理服务器还包括:
第一连接建立单元,用于在所述发送单元向数据服务器转发所述第一数据 请求消息之前, 与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
结合第二方面第一种或第三种可能的实现方式,在第四种可能的实现方式 中,
所述代理服务器还包括:
第二连接建立单元,用于在所述发送单元向所述新路径所指示的另一数据 服务器发送第二数据请求消息之前, 与所述另一数据服务器建立 TCP连接。
本发明第三方面提供一种代理服务器, 包括: 输入设备、 输出设备、 处理 器和存储器,
其中, 所述输入设备, 用于接收用户端发送的第一数据请求消息; 所述输出设备, 用于转发用户端发送给数据服务器的第一数据请求消息; 所述输入设备,用于根据接收的用户端发送的第一数据请求消息中携带的 数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储路径 为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于向所述数 所述输出设备,还用于接收所述数据服务器发送的重定向响应消息, 所述 重定向响应消息中携带所述所请求的数据存储的新路径;
所述处理器, 用于根据所述重定向响应消息, 生成第二数据请求消息; 所述输出设备,还用于根据所述所请求的数据存储的新路径, 向所述新路 径所指示的数据服务器发送第二数据请求消息,所述第二数据请求消息用于向 所述新路径所指示的数据服务器请求所述用户端所请求的数据;
所述输入设备,还用于接收所述新路径所指示的数据服务器发送的所述用 户端所请求的数据;
所述输出设备,还用于向所述用户端发送所述所请求的数据, 以使所述用 户端获取所述所请求的数据。
结合第三方面, 在第一种可能的实现方式中,
所述输出设备,用于向所述新路径所指示的另一数据服务器发送第二数据 请求消息;
所述输入设备, 用于接收所述另一数据服务器发送的所述所请求的数据。 结合第三方面, 在第二种可能的实现方式中,
所述输出设备,用于向所述新路径所指示的所述数据服务器发送第二数据 请求消息;
所述输入设备, 用于接收所述数据服务器发送的所述所请求的数据, 所述 所请求的数据存储在所述新路径所指示的文件路径下的。
结合第三方面、 第三方面第一种或第二种, 在第三种可能的实现方式中, 所述处理器,还用于向数据服务器转发所述第一数据请求消息之前, 与所 述用户端和所述数据服务器建立传输控制协议 TCP连接。
结合第三方面第一种或第三种, 在第四种可能的实现方式中,
所述处理器,还用于向数据服务器转发所述第一数据请求消息之前, 与所 述用户端和所述数据服务器建立传输控制协议 TCP连接。
本发明第四方面提供一种数据获取系统, 包括: 用户端、 代理服务器和数 据服务器;
所述用户端向代理服务器发送第一数据请求消息,所述第一数据请求消息 中携带的数据存储路径,所述数据存储路径为所述用户端所请求的数据的存储 路径;
所述数据服务器存储有用户端所请求的数据;
所述代理服务器为上述技术方案所述的代理服务器。
本发明实施例采用根据接收的用户端发送的第一数据请求消息中携带的 数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储路径 为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于向所述数 据服务器请求所述用户端所请求的数据;接收所述数据服务器发送的重定向响 应消息, 所述重定向响应消息中携带所述所请求的数据存储的新路径; 根据所 述所请求的数据存储的新路径,向所述新路径所指示的数据服务器发送第二数 据请求消息,所述第二数据请求消息用于向所述新路径所指示的数据服务器请 求所述用户端所请求的数据;接收所述新路径所指示的数据服务器发送的所述 用户端所请求的数据, 并向所述用户端发送所述所请求的数据, 以使所述用户 端获取所述所请求的数据。与现有技术中在重定向场景中用户端需要再次向数 据服务器发送一次请求过程相比,本发明实施例提供的重定向数据业务代理的 方法, 可以由代理服务器在重定向过程中代理用户端请求数据, 并将获取到的 数据发送给用户端, 从而提高数据获取的效率, 从而降低了网络时延。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例, 对于本领域技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他的附图。
图 1是本发明实施例中重定向数据业务代理的方法的一实施例示意图; 图 2是本发明实施例中重定向数据业务代理的方法的另一实施例示意图; 图 3是本发明实施例中重定向数据业务代理的方法的另一实施例示意图; 图 4是本发明实施例中重定向数据业务代理的方法的另一实施例示意图; 图 5是本发明实施例中重定向数据业务代理的方法的另一实施例示意图; 图 6是本发明实施例中代理服务器的一实施例示意图;
图 7是本发明实施例中代理服务器的另一实施例示意图;
图 8是本发明实施例中代理服务器的另一实施例示意图;
图 9是本发明实施例中代理服务器的另一实施例示意图;
图 10是本发明实施例中数据获取系统的一实施例示意图。
具体实施方式
本发明实施例提供一种重定向数据业务代理的方法,可以在需要重定向的 场景中, 提高数据获取的效率, 从而降低了网络时延。 本发明实施例还提供了 相应的设备及系统。 以下分別进行详细说明。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 参阅图 1 , 本发明实施例提供的重定向数据业务代理的方法的一实施例包 括:
101、根据接收的用户端发送的第一数据请求消息中携带的数据存储路径, 向数据服务器转发所述第一数据请求消息,所述数据存储路径为所述用户端所 请求的数据的存储路径,所述第一数据请求消息用于向所述数据服务器请求所 述用户端所请求的数据。
当用户端与数据服务器间的通信需要由代理服务器来辅助完成时,用户端 向数据服务器请求数据时,需要在数据请求消息中携带所请求的数据的存储路 径, 这样, 代理服务器就可以根据该存储路径, 找到对应的数据服务器, 将该 数据请求消息发送给该数据服务器。
102、 接收所述数据服务器发送的重定向响应消息, 所述重定向响应消息 中携带所述所请求的数据存储的新路径。
本发明实施例中, 当用户端所请求的数据的存储位置发生变动, 例如: 不 在原来的服务器, 或者在原来的服务器, 但不存储在原来的文件夹下时, 数据 服务器都会向代理服务器发送重定向响应消息,以通知用户端所请求的数据当 前存存储的新路径。
103、 根据所述所请求的数据存储的新路径, 向所述新路径所指示的数据 服务器发送第二数据请求消息,所述第二数据请求消息用于向所述新路径所指 示的数据服务器请求所述用户端所请求的数据。
代理服务器直接根据所请求的数据存储的新路径,向该新路径所指示的服 务器发送数据请求消息。
104、 接收所述新路径所指示的数据服务器发送的所述用户端所请求的数 据, 并向所述用户端发送所述所请求的数据, 以使所述用户端获取所述所请求 的数据。
新路径所指示的代理服务器接收到数据请求消息后,会将所请求的数据发 送给代理服务器,代理服务器接收到所述用户端所请求的数据后, 就会将该用 户端所请求的数据发送给用户端。
本发明实施例采用根据接收的用户端发送的第一数据请求消息中携带的 数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储路径 为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于向所述数 据服务器请求所述用户端所请求的数据;接收所述数据服务器发送的重定向响 应消息, 所述重定向响应消息中携带所述所请求的数据存储的新路径; 根据所 述所请求的数据存储的新路径,向所述新路径所指示的数据服务器发送第二数 据请求消息,所述第二数据请求消息用于向所述新路径所指示的数据服务器请 求所述用户端所请求的数据;接收所述新路径所指示的数据服务器发送的所述 所请求的数据, 并向所述用户端发送所述用户端所请求的数据, 以使所述用户 端获取所述所请求的数据。与现有技术中在重定向场景中用户端需要再次向数 据服务器发送一次请求过程相比,本发明实施例提供的重定向数据业务代理的 方法, 可以由代理服务器在重定向过程中代理用户端请求数据, 并将获取到的 数据发送给用户端, 从而提高数据获取的效率, 从而降低了网络时延。
可选地, 在上述图 1对应的实施例的基础上, 本发明实施例提供的重定向 数据业务代理的方法的一可选实施例中,所述向所述新路径所指示的数据服务 器发送第二数据请求消息, 可以包括:
向所述新路径所指示的另一数据服务器发送第二数据请求消息;
对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 可以包括:
接收所述另一数据服务器发送的所述所请求的数据。
本发明实施例中, 当数据存储的位置不在原来的服务器时,新路径会指示 存储数据的新数据服务器, 这样,代理服务器就会向新路径所指示的新数据服 务器发送第二数据请求消息, 然后从该新数据服务器上接收所述所请求的数 据。
例如: 原来存储用户端所请求的数据的数据服务器域名为 www.abc.com, 数据存储位置变动后,该数据目前存储在域名为 www.def.com的数据服务器上 , 那么代理服务器根据重定向响应消息中携带的所请求的数据存储的新路径,得 知所述所请求的数据存储在域名为 www.def.com的数据服务器后, 就会向 www.def.com的数据服务器发送第二数据请求消息 , 然后, 接收来自域名为 www.def.com的数据服务器发送的所述所请求的数据。
可选地, 在上述图 1对应的实施例的基础上, 本发明实施例提供的重定向 数据业务代理的方法的另一可选实施例中,所述向所述新路径所指示的数据服 务器发送第二数据请求消息, 可以包括:
向所述新路径所指示的所述数据服务器发送第二数据请求消息;
对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 可以包括:
接收所述数据服务器发送的所述所请求的数据,所述所请求的数据存储在 所述新路径所指示的文件路径下的。
本发明实施例中, 当所述所请求的数据还在原来的数据服务器上,但不存 储在原来的文件路径下,例如:由原来命名为 /123的文件路径变动到命名为 /456 的文件路径下,那么代理服务器根据重定向响应消息中携带的所述所请求的数 据存储的新路径, 获知数据在命名为 /456的文件路径下, 就会再次向该数据服 务器发送第二数据请求消息,请求命名为 /456的文件路径下的所述所请求的数 据。
可选地,在上述任一实施例的基石出上, 本发明实施例提供的重定向数据业 务代理的方法的另一可选实施例中,所述向数据服务器转发所述第一数据请求 消息的步骤之前, 所述方法还可以包括:
与所述用户端和所述数据服务器建立传输控制协议( Transmission Control Protocol , TCP )连接。
本发明实施例中, 代理服务器与用户端和所述数据服务器建立 TCP连接, 才能通过 TCP协议传输数据。
可选地,在上述任一实施例的基石出上, 本发明实施例提供的重定向数据业 务代理的方法的另一可选实施例中,所述向所述新路径所指示的另一数据服务 器发送第二数据请求消息的步骤之前, 所述方法还可以包括:
与所述另一数据服务器建立 TCP连接。
本发明实施例中,当新路径指示所请求的数据目前存储在另一数据服务器 上时, 代理服务器需要先与该另一数据服务器建 TCP连接, 以方便进行后数据 的数据通信。
为了便于理解, 下面以两个应用场景为例,说明本发明实施例中重定向数 据业务代理的过程:
参阅图 2, 重定向到不同数据服务器的应用场景:
S100、 代理服务器与用户端和第一数据服务器建立第一 TCP连接。
用户端 Client发起与第一数据服务器 server 1的 TCP建链, 代理服务器 PROXY分別与 client和 serverl建立 TCP连接。
S105-S110, 用户端向代理服务器发送第一数据请求消息, 代理服务器向 第一数据服务器转发所述第一数据请求消息。
第一数据请求消息用于向第一数据服务器请求用户端所请求的数据。 用户端发送的第一数据请求消息中携带用户端所请求的数据的存储路径, 代理服务器根据该存储路径转发所述第一数据请求消息。
例如:用户端 Client向第一数据服务器 serverl发起到 www.abc.com的 HTTP 请求, 代理服务器根据 www.abc.com, 向 serverl转发第一数据请求消息。
S115、第一数据服务器向代理服务器发送重定向响应消息,所述重定向响 应消息中携带所述所请求的数据存储的新路径。
第一数据服务器确定第一数据请求消息中所请求的数据已经不存储在本 数据服务器后, 查找到所述所请求的数据目前存储的位置, 例如: 目前的存储 路径为 www.def.com , 则在所述重定向响应消息中携带 www.def.com。
第一数据服务器 serverl响应 30*(302/303/307),并在响应头域 location中注 明需要重定向的目的主机为 www.def.com。
S 120、 代理服务器与第二数据服务器建立第二 TCP连接。
代理服务器根据重定向响应消息中携带的新路径,确定所述所请求的数据 目前存储在第二数据服务器, 则代理服务器 PROXY与第二数据服务器 server2 建链。
S 125、 代理服务器向第二数据服务器发送第二数据请求消息。
第二数据请求消息用于向第二数据服务器请求用户端所请求的数据。 第二数据请求消息中携带所请求的数据的信息, 这样, 第二数据服务器就 会查找到所述所请求的数据。
S130、 第二数据服务器向代理服务器返回所述用户端所请求的数据。
S140、 代理服务器向用户端返回用户端所请求的数据。
S 145, 代理服务器释放第二 TCP连接。
代理服务器 PROXY接收来自第二数据服务器 server2的数据后, 拆除与
HTTP server2之间的 TCP连接, 以释放链路资源, 从而提高链路资源的利用效 率。
S150、 代理服务器释放第一 TCP连接。 serverl之间的 TCP连接, 以释放链路资源, 从而提高链路资源的利用效率。
本发明应用场景中描述了用户端所请求的数据不存储在原来的第一数据 服务器的情况,这样,第一数据服务器就会向代理服务器发送一个重定向响应, 以通知代理服务器用户端所请求的数据现在存储的数据服务器的路径信息,也 就是第二数据服务器的路径信息,从而使代理服务器可以向第二数据服务器请 求用户端所请求的数据。与现有技术中在重定向场景中用户端需要再向数据服 务器发送一次请求过程相比, 本发明实施例提供的重定向数据业务代理的方 法, 可以由代理服务器在重定向过程中代理用户端请求数据, 并将获取到的数 据发送给用户端, 从而提高数据获取的效率, 从而降低了网络时延。
参阅图 3, 重定向到相同数据服务器的应用场景:
S200、 代理服务器与用户端和数据服务器建立 TCP连接。
Client发起与 HTTP server 的 TCP建链, 代理服务器分別与 client和 server建 立 TCP连接。
S205-S210, 户端向代理服务器发送第一数据请求消息, 代理服务器向数 据服务器转发所述第一数据请求消息。
第一数据请求消息用于向代理服务器请求用户端所请求的数据。
用户端发送的第一数据请求消息中携带用户端所请求的数据的存储路径, 代理服务器根据该存储路径转发所述第一数据请求消息。
例如: 用户端 Client向 HTTP server发起对 www.abc.com/123的 HTTP请求, 代理服务器根据 www.abc.com/123向 server转发第一数据请求消息。
S215、数据服务器向代理服务器发送重定向响应消息,所述重定向响应消 息中携带所述所请求的数据存储的新路径。
数据服务器确定第一数据请求消息中所请求的数据在本数据服务器,但已 经不存储在原来的文件路径下, 查找到所述所请求的数据目前存储的文件路 径, 例如: 目前的存储路径为 www.abc.com/456, 则在所述重定向响应消息中 携带 www.abc.com/456。
数据服务器响应 30*(302/303/307), 并在响应头域 location中注明需要重定 向到本主机的 www.abc.com/456文件路径下;
S220、 代理服务器向数据服务器发送第二数据请求消息。
第二数据请求消息用于向数据服务器 www.abc.com/456文件路径请求用户 端所请求的数据。
代理服务器向数据服务器发起对 www.abc.com/456文件路径中所述所请求 的数据的请求。
第二数据请求中携带所请求的数据的信息, 这样, 第二数据服务器就会查 找到所述所请求的数据。
S225、 数据服务器向代理服务器返回所请求的数据。
S230、 代理服务器向用户端返回用户端所请求的数据。
S235、 代理服务器释放 TCP连接。
代理服务器分別拆除与 client和 HTTP server之间的 TCP连接, 以释放链路 资源, 从而提高链路资源的利用效率。
与现有技术中在重定向场景中用户端需要再向数据服务器发送一次请求 过程相比, 本发明实施例提供的重定向数据业务代理的方法, 可以由代理服务 器在重定向过程中代理用户端请求数据, 并将获取到的数据发送给用户端,从 而提高数据获取的效率, 从而降低了网络时延。
当本发明实施例中的数据是超文本传输协议 (Hypertext transfer protocol, HTTP)数据时, 从用户端到代理服务器再到数据服务器的数据封装过程可以 为: 参阅图 4, 重定向场景下 HTTP请求通过代理服务器 PROXY协议栈流程:
①箭头: 用户端 client发起对网络中数据的请求, 由 client的 HTTP层封装 HTTP请求报文, 按照协议栈往下经过 TCP层的分片封装、 网络互连协议
( Internet Protocol, IP )层分片封装; client发出的请求经过传输进入代理服务 器 PROXY的协议栈, 由于是与 client交互, 在 TCP建链过程 PROXY协议栈的服 务器 server侧会创建与之通信的栈 socket, 报文经过 TCP/IP解封装和重组后在 HTTP层被解析;
②箭头: HTTP请求需要由代理再发送给网络服务器, 由代理协议栈的 client侧基于协议栈结构一层一层封装数据和分片, 同样 client侧的 socket在 TCP 建链过程已建立; HTTP请求进入网络服务器的协议栈中, IP/TCP/HTTP层处 理与 PROXY—致。 在智能重定向场景中, 网络服务器的 HTTP层解析请求报文 获取对象路径时发现用户端 client需要获取的对象数据已经不在本文件路径 下, 甚至已不在当前服务器。 到此 HTTP事务上行报文处理流程结束。
参阅图 5, 重定向场景下 HTTP响应通过代理服务器 PROXY协议栈流程: ①箭头: 在重定向场景中, 数据服务器的 HTTP层解析请求报文获取对象 路径时发现用户端 client需要获取的对象数据已经不在本文件路径下, 甚至已 不在当前服务器。 因此网络服务器发出重定向响应报文;
②箭头: PROXY解析来自网络服务器的重定向响应后发起与重定向后的 服务器 (可以是原来的服务器,也可以是其他的数据服务器)之间的新 TCP连接, 并在此 TCP连接上发起获取新路径下数据内容的 HTTP请求;
③箭头: 新路径的网络服务器基于请求内容找到要获取的对象后封装 HTTP响应返回给 PROXY;
④箭头: PROXY代理数据服务器基于 PROXY的 server侧与用户端 Client的 连接上将获取到的正确的响应数据后返回给用户端 client解析和显示。 到此被 代理通过重定向优化的 HTTP事务下行处理流程结束。
参阅图 6, 本发明实施例提供的代理服务器的一实施例包括:
接收单元 301 , 用于接收用户端发送的第一数据请求消息;
发送单元 302,用于根据所述接收单元 301接收的用户端发送的第一数据请 求消息中携带的数据存储路径, 向数据服务器转发所述第一数据请求消息, 所 述数据存储路径为所述用户端所请求的数据的存储路径,所述第一数据请求消 息用于向所述数据服务器请求所述用户端所请求的数据;
所述接收单元 301 , 还用于接收所述数据服务器发送的重定向响应消息, 所述重定向响应消息中携带所述所请求的数据存储的新路径;
生成单元 303 , 用于根据所述接收单元 301接收的所述重定向响应消息, 生 成第二数据请求消息;
所述发送单元 302, 还用于根据所述所请求的数据存储的新路径, 向所述 新路径所指示的数据服务器发送所述生成单元生成的所述第二数据请求消息, 所述第二数据请求消息用于向所述新路径所指示的数据服务器请求所述用户 端所请求的数据;
所述接收单元 301 , 还用于接收所述新路径所指示的数据服务器发送的所 述所请求的数据;
所述发送单元 302, 还用于向所述用户端发送所述所请求的数据, 以使所 述用户端获取所述所请求的数据。
本发明实施例中, 接收单元 301接收用户端发送的第一数据请求消息; 发 送单元 302根据所述接收单元 301接收的用户端发送的第一数据请求消息中携 带的数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储 路径为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于向所 述数据服务器请求所述用户端所请求的数据; 所述接收单元 301还接收所述数 据服务器发送的重定向响应消息,所述重定向响应消息中携带所述所请求的数 据存储的新路径;生成单元 303根据所述接收单元 301接收的所述重定向响应消 息, 生成第二数据请求消息, 所述第二数据请求消息用于向所述新路径所指示 的数据服务器请求所述用户端所请求的数据; 所述发送单元 302还根据所述所 请求的数据存储的新路径,向所述新路径所指示的数据服务器发送所述生成单 元生成的所述第二数据请求消息; 所述接收单元 301还接收所述新路径所指示 的数据服务器发送的所述所请求的数据; 所述发送单元 302还向所述用户端发 送所述所请求的数据, 以使所述用户端获取所述所请求的数据。 与现有技术中 在重定向场景中用户端需要再向数据服务器发送一次请求过程相比,本发明实 施例提供的代理服务器, 可以在重定向过程中代理用户端请求数据, 并将获取 到的数据发送给用户端, 从而提高数据获取的效率, 从而降低了网络时延。
在上述图 6对应的实施例的基础上, 本发明实施例提供的代理服务器的另 一实施例中,
所述发送单元 302, 用于向所述新路径所指示的另一数据服务器发送第二 数据请求消息;
所述接收单元 301 , 用于接收所述另一数据服务器发送的所述所请求的数 据。
在上述图 6对应的实施例的基础上, 本发明实施例提供的代理服务器的另 一实施例中,
所述发送单元 302, 用于向所述新路径所指示的所述数据服务器发送第二 数据请求消息;
所述接收单元 301 , 用于接收所述数据服务器发送的所述所请求的数据, 所述所请求的数据存储在所述新路径所指示的文件路径下的。
在上述图 6对应的实施例的基础上, 参阅图 7, 本发明实施例提供的代理服 务器的另一实施例中,
所述代理服务器 30还包括:
第一连接建立单元 304, 用于在所述发送单元向数据服务器转发所述第一 数据请求消息之前, 与所述用户端和所述数据服务器建立传输控制协议 TCP连 接。
在上述图 6对应的实施例的基石出上, 参阅图 8, 本发明实施例提供的代理 服务器的另一实施例中, 所述代理服务器还包括:
第二连接建立单元 305 , 用于在所述发送单元向所述新路径所指示的另一 数据服务器发送第二数据请求消息之前, 与所述另一数据服务器建立 TCP连 接。 本发明还提供一种计算机存储介质, 该介质存储有程序, 该程序执行时包 括上述重定向数据业务代理的方法中的部分或者全部步骤。
图 9是本发明实施例代理服务器 30的结构示意图。 代理服务器 30可包括输 入设备 310、 输出设备 320、 处理器 330和存储器 340。
存储器 340可以包括只读存储器和随机存取存储器,并向处理器 330提供指 令和数据。 存储器 340的一部分还可以包括非易失性随机存取存储器 ( NVRAM )。
存储器 340存储了如下的元素, 可执行模块或者数据结构, 或者它们的子 集, 或者它们的扩展集:
操作指令: 包括各种操作指令, 用于实现各种操作。
操作系统: 包括各种系统程序, 用于实现各种基础业务以及处理基于硬件 的任务。
在本发明实施例中,处理器 330通过调用存储器 340存储的操作指令(该操 作指令可存储在操作系统中), 执行如下操作:
通过输入设备 310接收用户端发送的第一数据请求消息,通过输出设备 320 转发用户端发送给数据服务器的第一数据请求消息, 通过输入设备 310根据接 收的用户端发送的第一数据请求消息中携带的数据存储路径,所述第一数据请 求消息用于向所述数据服务器请求所述用户端所请求的数据,向数据服务器转 发所述第一数据请求消息,所述数据存储路径为所述用户端所请求的数据的存 储路径, 通过输出设备 320接收所述数据服务器发送的重定向响应消息, 所述 重定向响应消息中携带所述所请求的数据存储的新路径, 通过输出设备 320根 据所述所请求的数据存储的新路径,向所述新路径所指示的数据服务器发送第 二数据请求消息,所述第二数据请求消息用于向所述新路径所指示的数据服务 器请求所述用户端所请求的数据, 通过输入设备 310接收所述新路径所指示的 数据服务器发送的所述所请求的数据, 通过输出设备 320向所述用户端发送所 述所请求的数据, 以使所述用户端获取所述所请求的数据。
与现有技术中在重定向场景中用户端需要再向数据服务器发送一次请求 过程相比,本发明实施例提供的由代理服务器在重定向过程中代理用户端请求 数据, 并将获取到的数据发送给用户端, 从而提高数据获取的效率, 从而降低 了网络时延。
处理器 330控制代理服务器 30的操作, 处理器 330还可以称为 CPU ( Central Processing Unit, 中央处理单元)。 存储器 340可以包括只读存储器和随机存取 存储器, 并向处理器 330提供指令和数据。存储器 340的一部分还可以包括非易 失性随机存取存储器 (NVRAM )。 具体的应用中, 代理服务器 30的各个组件 通过总线系统 350耦合在一起, 其中总线系统 350除包括数据总线之外,还可以 包括电源总线、控制总线和状态信号总线等。 但是为了清楚说明起见, 在图中 将各种总线都标为总线系统 350。
上述本发明实施例揭示的方法可以应用于处理器 330中,或者由处理器 330 实现。 处理器 330可能是一种集成电路芯片, 具有信号的处理能力。 在实现过 件形式的指令完成。 上述的处理器 330可以是通用处理器、 数字信号处理器 ( DSP )、 专用集成电路(ASIC )、 现成可编程门阵列 (FPGA )或者其他可编 程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件。 可以实现或者执行 本发明实施例中的公开的各方法、 步骤及逻辑框图。通用处理器可以是微处理 器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方 法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬 件及软件模块组合执行完成。 软件模块可以位于随机存储器, 闪存、 只读存储 器, 可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存 储介质中。 该存储介质位于存储器 340, 处理器 330读取存储器 340中的信息, 结合其硬件完成上述方法的步骤。
可选地, 所述输出设备 320, 用于向所述新路径所指示的另一数据服务器 发送第二数据请求消息;
所述输入设备 310, 用于接收所述另一数据服务器发送的所述所请求的数 据。
可选地, 所述输出设备 320, 用于向所述新路径所指示的所述数据服务器 发送第二数据请求消息;
所述输入设备 310, 用于接收所述数据服务器发送的所述所请求的数据, 所述所请求的数据存储在所述新路径所指示的文件路径下的。
可选地, 所述处理器 330, 用于向数据服务器转发所述第一数据请求消息 之前, 与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
可选地, 所述处理器 330, 还用于向数据服务器转发所述第一数据请求消 息之前, 与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
参阅图 10, 本法实施例提供的数据获取系统的一实施例包括: 用户端 20、 代理服务器 30和数据服务器 40;
所述用户端 20向代理服务器 30发送第一数据请求消息,所述第一数据请 求消息中携带的数据存储路径,所述数据存储路径为所述用户端所请求的数据 的存储路径,所述第一数据请求消息用于向所述数据服务器请求所述用户端所 请求的数据;
所述数据服务器 40存储有用户端所请求的数据;
代理服务器 30,用于根据接收的用户端发送的第一数据请求消息中携带的 数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储路径 为所述用户端所请求的数据的存储路径,接收所述数据服务器发送的重定向响 应消息, 所述重定向响应消息中携带所述所请求的数据存储的新路径,根据所 述所请求的数据存储的新路径,向所述新路径所指示的数据服务器发送第二数 据请求消息,所述第二数据请求消息用于向所述新路径所指示的数据服务器请 求所述用户端所请求的数据,接收所述新路径所指示的数据服务器发送的所述 所请求的数据, 并向所述用户端发送所述所请求的数据, 以使所述用户端获取 所述所请求的数据。 本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。
以上对本发明实施例所提供的重定向数据业务代理的方法、设备以及系统 述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围 上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种重定向数据业务代理的方法, 其特征在于, 包括:
根据接收的用户端发送的第一数据请求消息中携带的数据存储路径,向数 据服务器转发所述第一数据请求消息,所述数据存储路径为所述用户端所请求 的数据的存储路径,所述第一数据请求消息用于向所述数据服务器请求所述用 户端所请求的数据;
接收所述数据服务器发送的重定向响应消息,所述重定向响应消息中携带 所述所请求的数据存储的新路径;
根据所述所请求的数据存储的新路径,向所述新路径所指示的数据服务器 发送第二数据请求消息,所述第二数据请求消息用于向所述新路径所指示的数 据服务器请求所述用户端所请求的数据;
接收所述新路径所指示的数据服务器发送的所述用户端所请求的数据,并 向所述用户端发送所述所请求的数据, 以使所述用户端获取所述所请求的数 据。
2、根据权利要求 1所述的方法, 其特征在于, 所述向所述新路径所指示的 数据服务器发送第二数据请求消息, 包括:
向所述新路径所指示的另一数据服务器发送第二数据请求消息; 对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 包括:
接收所述另一数据服务器发送的所述所请求的数据。
3、根据权利要求 1所述的方法, 其特征在于, 所述向所述新路径对应的数 据服务器发送第二数据请求消息, 包括:
向所述新路径所指示的所述数据服务器发送第二数据请求消息; 对应的, 所述接收所述新路径对应的数据服务器发送的所述所请求的数 据, 包括:
接收所述数据服务器发送的所述所请求的数据,所述所请求的数据存储在 所述新路径所指示的文件路径下的。
4、 根据权利要求 1-3任一所述的方法, 其特征在于, 所述向数据服务器转 发所述第一数据请求消息的步骤之前, 所述方法还包括:
与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
5、 根据权利要求 2或 4所述的方法, 其特征在于, 所述向所述新路径所 指示的另一数据服务器发送第二数据请求消息的步骤之前, 所述方法还包括: 与所述另一数据服务器建立 TCP连接。
6、 一种代理服务器, 其特征在于, 包括:
接收单元, 用于接收用户端发送的第一数据请求消息;
发送单元,用于根据所述接收单元接收的用户端发送的第一数据请求消息 中携带的数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据 存储路径为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于 向所述数据服务器请求所述用户端所请求的数据;
所述接收单元,还用于接收所述数据服务器发送的重定向响应消息, 所述 重定向响应消息中携带所述所请求的数据存储的新路径;
生成单元, 用于根据所述接收单元接收的所述重定向响应消息, 生成第二 数据请求消息;
所述发送单元,还用于根据所述所请求的数据存储的新路径, 向所述新路 径所指示的数据服务器发送所述生成单元生成的所述第二数据请求消息,所述 第二数据请求消息用于向所述新路径所指示的数据服务器请求所述用户端所 请求的数据;
所述接收单元,还用于接收所述新路径所指示的数据服务器发送的所述用 户端所请求的数据;
所述发送单元,还用于向所述用户端发送所述所请求的数据, 以使所述用 户端获取所述所请求的数据。
7、 根据权利要求 6所述的代理服务器, 其特征在于,
所述发送单元,用于向所述新路径所指示的另一数据服务器发送第二数据 请求消息;
所述接收单元, 用于接收所述另一数据服务器发送的所述所请求的数据。
8、 根据权利要求 6所述的代理服务器, 其特征在于, 所述发送单元,用于向所述新路径所指示的所述数据服务器发送第二数据 请求消息;
所述接收单元, 用于接收所述数据服务器发送的所述所请求的数据, 所述 所请求的数据存储在所述新路径所指示的文件路径下的。
9、 根据权利要求 6-8任一所述的代理服务器, 其特征在于, 所述代理服 务器还包括:
第一连接建立单元,用于在所述发送单元向数据服务器转发所述第一数据 请求消息之前, 与所述用户端和所述数据服务器建立传输控制协议 TCP连接。
10、 根据权利要求 7或 9所述的代理服务器, 其特征在于, 所述代理服务 器还包括:
第二连接建立单元,用于在所述发送单元向所述新路径所指示的另一数据 服务器发送第二数据请求消息之前, 与所述另一数据服务器建立 TCP连接。
11、 一种代理服务器, 其特征在于, 包括: 输入设备、 输出设备、 处理器 和存储器,
其中, 所述输入设备, 用于接收用户端发送的第一数据请求消息; 所述输出设备, 用于转发用户端发送给数据服务器的第一数据请求消息; 所述输入设备,用于根据接收的用户端发送的第一数据请求消息中携带的 数据存储路径, 向数据服务器转发所述第一数据请求消息, 所述数据存储路径 为所述用户端所请求的数据的存储路径,所述第一数据请求消息用于向所述数 据服务器请求所述用户端所请求的数据;
所述输出设备,还用于接收所述数据服务器发送的重定向响应消息, 所述 重定向响应消息中携带所述所请求的数据存储的新路径;
所述处理器, 用于根据所述重定向响应消息, 生成第二数据请求消息; 所述输出设备,还用于根据所述所请求的数据存储的新路径, 向所述新路 径所指示的数据服务器发送第二数据请求消息,所述第二数据请求消息用于向 所述新路径所指示的数据服务器请求所述用户端所请求的数据;
所述输入设备,还用于接收所述新路径所指示的数据服务器发送的所述用 户端所请求的数据; 所述输出设备,还用于向所述用户端发送所述所请求的数据, 以使所述用 户端获取所述所请求的数据。
12、 根据权利要求 11所述的代理服务器, 其特征在于,
所述输出设备,用于向所述新路径所指示的另一数据服务器发送第二数据 请求消息;
所述输入设备, 用于接收所述另一数据服务器发送的所述所请求的数据。
13、 根据权利要求 11所述的代理服务器, 其特征在于,
所述输出设备,用于向所述新路径所指示的所述数据服务器发送第二数据 请求消息;
所述输入设备, 用于接收所述数据服务器发送的所述所请求的数据, 所述 所请求的数据存储在所述新路径所指示的文件路径下的。
14、 根据权利要求 11-13任一所述的代理服务器, 其特征在于,
所述处理器,还用于向数据服务器转发所述第一数据请求消息之前, 与所 述用户端和所述数据服务器建立传输控制协议 TCP连接。
15、 根据权利要求 12或 14所述的代理服务器, 其特征在于,
所述处理器,还用于向数据服务器转发所述第一数据请求消息之前, 与所 述用户端和所述数据服务器建立传输控制协议 TCP连接。
16、 一种数据获取系统, 其特征在于, 包括: 用户端、 代理服务器和数据 服务器;
所述用户端向代理服务器发送第一数据请求消息,所述第一数据请求消息 中携带的数据存储路径,所述数据存储路径为所述用户端所请求的数据的存储 路径;
所述数据服务器存储有用户端所请求的数据;
所述代理服务器为上述权利要求 6-10任一项所述的代理服务器。
PCT/CN2013/086050 2013-10-28 2013-10-28 一种重定向数据业务代理的方法、设备及系统 WO2015061938A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
PCT/CN2013/086050 WO2015061938A1 (zh) 2013-10-28 2013-10-28 一种重定向数据业务代理的方法、设备及系统
EP13896670.0A EP3054650A4 (en) 2013-10-28 2013-10-28 METHOD, DEVICE AND SYSTEM FOR RETRIEVING A DATA SERVICE PROXY
CN201380003610.0A CN104904182A (zh) 2013-10-28 2013-10-28 一种重定向数据业务代理的方法、设备及系统
KR1020167013725A KR20160075698A (ko) 2013-10-28 2013-10-28 데이터 서비스 프록시를 리디렉트하기 위한 방법, 장치 및 시스템
JP2016526859A JP2016541048A (ja) 2013-10-28 2013-10-28 サービスプロキシを使用してデータを転送する方法、デバイスおよびシステム
US15/140,314 US20160241664A1 (en) 2013-10-28 2016-04-27 Method, device, and system for redirecting data by using service proxy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/086050 WO2015061938A1 (zh) 2013-10-28 2013-10-28 一种重定向数据业务代理的方法、设备及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/140,314 Continuation US20160241664A1 (en) 2013-10-28 2016-04-27 Method, device, and system for redirecting data by using service proxy

Publications (1)

Publication Number Publication Date
WO2015061938A1 true WO2015061938A1 (zh) 2015-05-07

Family

ID=53003074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086050 WO2015061938A1 (zh) 2013-10-28 2013-10-28 一种重定向数据业务代理的方法、设备及系统

Country Status (6)

Country Link
US (1) US20160241664A1 (zh)
EP (1) EP3054650A4 (zh)
JP (1) JP2016541048A (zh)
KR (1) KR20160075698A (zh)
CN (1) CN104904182A (zh)
WO (1) WO2015061938A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311975A (zh) * 2019-06-28 2019-10-08 北京奇艺世纪科技有限公司 一种数据请求处理方法及装置
CN113973139A (zh) * 2021-10-20 2022-01-25 北京沃东天骏信息技术有限公司 一种消息处理的方法和装置
CN115361268A (zh) * 2022-08-19 2022-11-18 湖北天融信网络安全技术有限公司 重定向方法、装置、电子设备及计算机可读存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8560604B2 (en) 2009-10-08 2013-10-15 Hola Networks Ltd. System and method for providing faster and more efficient data communication
US9241044B2 (en) 2013-08-28 2016-01-19 Hola Networks, Ltd. System and method for improving internet communication by using intermediate nodes
US11057446B2 (en) 2015-05-14 2021-07-06 Bright Data Ltd. System and method for streaming content from multiple servers
US11190374B2 (en) 2017-08-28 2021-11-30 Bright Data Ltd. System and method for improving content fetching by selecting tunnel devices
EP4187881A1 (en) 2017-08-28 2023-05-31 Bright Data Ltd. Improving content fetching by selecting tunnel devices grouped according to geographic location
LT3780557T (lt) * 2019-02-25 2023-03-10 Bright Data Ltd. Turinio parsisiuntimo, naudojant url bandymų mechanizmą, sistema ir būdas
CN115150475A (zh) * 2021-03-31 2022-10-04 贵州白山云科技股份有限公司 一种调度方法、装置、介质及设备
CN114710548B (zh) * 2022-03-22 2024-04-05 阿里巴巴(中国)有限公司 报文转发方法及装置
CN117349550A (zh) * 2023-10-10 2024-01-05 上海数禾信息科技有限公司 一种埋点数据获取方法、装置、计算机设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1421081A (zh) * 1999-11-08 2003-05-28 Mci全球通讯公司 在ip电话网中用于动态网关选择的方法和系统
CN1890942A (zh) * 2003-12-10 2007-01-03 国际商业机器公司 重定向对万维网服务的客户端请求的方法
CN101350833A (zh) * 2007-07-16 2009-01-21 国际商业机器公司 在代理服务器环境中管理远程主机可见性的方法和系统
CN102143204A (zh) * 2010-11-26 2011-08-03 华为技术有限公司 一种内容分发网络中实现超文本传输协议重定向的方法、装置及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4176359B2 (ja) * 2002-03-01 2008-11-05 株式会社エヌ・ティ・ティ・ドコモ データ取得方法、中継装置、プログラムおよび記録媒体
US9032096B2 (en) * 2003-12-17 2015-05-12 Cisco Technology, Inc. Reducing the impact of network latency on application performance
US8984164B2 (en) * 2010-11-09 2015-03-17 Usablenet Inc. Methods for reducing latency in network connections and systems thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1421081A (zh) * 1999-11-08 2003-05-28 Mci全球通讯公司 在ip电话网中用于动态网关选择的方法和系统
CN1890942A (zh) * 2003-12-10 2007-01-03 国际商业机器公司 重定向对万维网服务的客户端请求的方法
CN101350833A (zh) * 2007-07-16 2009-01-21 国际商业机器公司 在代理服务器环境中管理远程主机可见性的方法和系统
CN102143204A (zh) * 2010-11-26 2011-08-03 华为技术有限公司 一种内容分发网络中实现超文本传输协议重定向的方法、装置及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3054650A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311975A (zh) * 2019-06-28 2019-10-08 北京奇艺世纪科技有限公司 一种数据请求处理方法及装置
CN113973139A (zh) * 2021-10-20 2022-01-25 北京沃东天骏信息技术有限公司 一种消息处理的方法和装置
CN115361268A (zh) * 2022-08-19 2022-11-18 湖北天融信网络安全技术有限公司 重定向方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
US20160241664A1 (en) 2016-08-18
CN104904182A (zh) 2015-09-09
EP3054650A4 (en) 2016-10-12
JP2016541048A (ja) 2016-12-28
EP3054650A1 (en) 2016-08-10
KR20160075698A (ko) 2016-06-29

Similar Documents

Publication Publication Date Title
WO2015061938A1 (zh) 一种重定向数据业务代理的方法、设备及系统
CN109067914B (zh) Web服务的代理方法、装置、设备及存储介质
CN109412946B (zh) 一种确定回源路径的方法、装置、服务器及可读存储介质
US8224966B2 (en) Reproxying an unproxied connection
KR102308269B1 (ko) 프록시 기반 네트워크 통신들에서의 제어 데이터의 전송
CN108432194B (zh) 一种拥塞处理的方法、主机及系统
KR20150121713A (ko) 네트워크 노드 기능을 제공하기 위한 네트워크 노드들 사이의 할당 리소스
CN110620802B (zh) 一种负载均衡方法和装置
WO2014067311A1 (zh) 资源订阅方法及装置
US11489810B2 (en) Intelligently routing a response packet along a same connection as a request packet
US8539099B2 (en) Method for providing on-path content distribution
JP2019536355A (ja) ノードタイプに基づくデータストリーミングの支援制御
CN111629030A (zh) 基于边缘计算平台的通信处理方法、装置、介质及设备
WO2010133097A1 (zh) 微技系统的数据共享方法、服务器以及数据共享系统
WO2023151264A1 (zh) 负载均衡方法、装置、节点及存储介质
US9900368B2 (en) Method for optimising downloading of data
US7564848B2 (en) Method for the establishing of connections in a communication system
US10136375B2 (en) Method for service data management, apparatus, and system
WO2019243890A2 (en) Multi-port data transmission via udp
CN112165449B (zh) web应用实时权限的控制方法、电子装置和存储介质
US11223567B2 (en) Transmission control protocol session mobility
WO2015167375A1 (en) Method and tcp proxy for supporting communication between a client device and a server node
EP3107352B1 (en) Information transfer method, system and apparatus
Lever Bidirectional Remote Procedure Call on RPC-over-RDMA Transports
WO2017198135A1 (zh) 一种用户溯源的方法、装置及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13896670

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016526859

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2013896670

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013896670

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20167013725

Country of ref document: KR

Kind code of ref document: A