WO2013182030A1 - 一种用于请求资源的方法、设备及系统 - Google Patents

一种用于请求资源的方法、设备及系统 Download PDF

Info

Publication number
WO2013182030A1
WO2013182030A1 PCT/CN2013/076687 CN2013076687W WO2013182030A1 WO 2013182030 A1 WO2013182030 A1 WO 2013182030A1 CN 2013076687 W CN2013076687 W CN 2013076687W WO 2013182030 A1 WO2013182030 A1 WO 2013182030A1
Authority
WO
WIPO (PCT)
Prior art keywords
user request
address
resource
server
user
Prior art date
Application number
PCT/CN2013/076687
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 华为技术有限公司
Publication of WO2013182030A1 publication Critical patent/WO2013182030A1/zh

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/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • the present invention relates to the field of network information transmission, and in particular, to a method, device, and system for requesting resources.
  • edge routers In order to improve the quality of network transmission services and improve user satisfaction, operators usually deploy cache devices to obtain and store network resources. When users request to obtain network resources, edge routers only need to redirect or forward user request packets to On the cache device, if the cache device stores the network resource requested by the user, the cache device directly sends the network resource to the user without acquiring the network resource server, because the cache device is closer to the user, thereby improving the network. The transmission speed of the resource.
  • each edge router needs to select a suitable cache device.
  • each edge All routers need to obtain the load of all cache devices or cache the device-to-user path and calculate the appropriate cache device. Therefore, the repetitive acquisition and calculation of each edge router not only increases the delay of data transmission but also increases the time. The loss of the system, at the same time, because each edge router independently selects a suitable cache device, the preference principles of the edge routers are inconsistent.
  • Embodiments of the present invention provide a method, device, and system for requesting resources to solve the problem that an edge router has a heavy burden due to the need to know the state information of the cache device. .
  • An embodiment of the present invention provides a method for requesting a resource, including:
  • the cache management device receives the user request packet forwarded by the edge router, where the The user request message includes a Uniform Resource Locator URL of the requested resource, and the source address of the user request message is an Internet Protocol IP address of the user who sends the user request message, and the destination address of the user request message
  • the user request packet is forwarded to the cache management device after the edge router determines that the user request packet meets the first forwarding rule, in order to provide the IP address of the server.
  • the cache management device sends an IP packet to the cache device, where the IP packet includes the URL, an IP address of the user, an IP address of the server, an identifier of the server, and the resource in the The local resource ID on the server.
  • the method further includes:
  • the cache management device When the session including the user request message is a transmission control protocol (TCP) session, the cache management device generates a second forwarding rule for the edge router, where the matching element of the second forwarding rule includes: the user request message The destination address of the text, the destination port number of the user request packet, the transport layer protocol number of the user request packet, the source address of the user request packet, and the source port number of the user request packet.
  • the forwarding destination device corresponding to the second forwarding rule is the cache device;
  • the cache management device sends the second forwarding rule to the edge router, where the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet; or, the first The matching element of the forwarding rule includes the URL.
  • An embodiment of the present invention provides a method for requesting a resource, including:
  • the edge router receives the user request message sent by the user;
  • the edge router After determining that the user request packet matches the first forwarding rule, the edge router forwards the user request packet to the cache management device, where the user request packet includes a uniform resource locator of the resource.
  • the source address of the user request message is the Internet Protocol IP address of the user who sent the user request message
  • the destination address of the user request message is the IP address of the server that provides the resource.
  • the method further includes:
  • the edge routing device receives a second forwarding rule sent by the cache management device, where the second forwarding
  • the matching element of the sending rule includes a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, a source address and a source address of the user request packet. a source port number of the user request packet, where the forwarding destination device corresponding to the second forwarding rule is the cache management device, and the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule ;
  • the edge router performs the first forwarding rule and the second forwarding rule according to the longest matching original 'J.
  • An embodiment of the present invention provides a method for sending a resource to a user, including:
  • the cache device receives the Internet Protocol IP packet sent by the cache management device, where the IP packet includes a Uniform Resource Locator URL of the resource, an IP address of the user, an IP address of a server providing the resource, and the server And an identifier of the local resource of the resource on the server;
  • the cache device determines that the cache device caches the resource according to the identifier of the server and the local resource identifier, the cache device sends a data packet carrying the resource to the user, where the The source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the method further includes:
  • the cache device determines, according to the identifier of the server and the local resource identifier, that the cache device does not cache the resource, the cache device requests the resource from the server according to the URL;
  • the cache device After obtaining the resource from the server, the cache device sends a data packet carrying the resource to the user, where the source address of the data packet is the IP address and the destination address of the server.
  • the user's IP address The embodiment of the invention provides a cache management device, which includes:
  • a first receiving unit configured to receive a user request message forwarded by the edge router, where the user request message includes a uniform resource locator URL of the requested resource, and the source address of the user request message is sent
  • the IP address of the user requesting the packet, the destination address of the user request packet is the IP address of the server providing the resource, and the user request packet is determined by the edge router to determine the user request report.
  • the text meets the first forwarding
  • the rule is forwarded to the cache management device;
  • a first determining unit configured to determine, according to a preset policy, a cache device
  • a request information sending unit configured to send an IP packet to the cache device after the first determining unit determines the cache device, where the IP packet includes the URL, an IP address of the user, and the The IP address of the server, the identity of the server, and the local resource identity of the resource on the server.
  • the method further includes:
  • a forwarding rule generating unit configured to: when the session including the user request message is a transmission control protocol TCP session, the cache management device generates a second forwarding rule for the edge router, and the matching element of the second forwarding rule The destination address of the user request packet, the destination port number of the user request packet, the transport layer protocol number of the user request packet, the source address of the user request packet, and the user request report a source port number of the file, where the forwarding destination device corresponding to the second forwarding rule is the cache device;
  • a rule sending unit configured to send the second forwarding rule generated by the forwarding rule generating unit to the edge router, where the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule .
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet; or, the first The matching element of the forwarding rule includes the URL.
  • An embodiment of the present invention provides an edge router, including:
  • a second receiving unit configured to receive a user request message sent by the user
  • a second sending unit configured to: after determining that the user request packet matches the first forwarding rule, forwarding the user request packet received by the second receiving unit to a cache management device, where the user request
  • the packet includes a Uniform Resource Locator (URL) of the resource
  • the source address of the user request packet is an Internet Protocol IP address of a user who sends the user request packet
  • the destination address of the user request packet is a provider.
  • the IP address of the server that describes the resource.
  • the method further includes:
  • a rule receiving unit configured to: when the session including the user request message is a transmission control protocol TCP session, the edge routing device receives a second forwarding rule sent by the cache management device, and the matching of the second forwarding rule
  • the element includes a destination address of the user request packet, a destination port number of the user request packet, and a transport layer protocol of the user request packet. a source address of the user request packet and a source port number of the user request packet, where the forwarding destination device corresponding to the second forwarding rule is the cache management device, and the second forwarding rule includes a matching More than the matching elements included in the first forwarding rule;
  • the rule execution unit is configured to execute the first forwarding rule and the second forwarding rule according to a longest matching principle.
  • An embodiment of the present invention provides a cache device, including:
  • a third receiving unit configured to receive an internet protocol IP packet sent by the cache management device, where the IP packet includes a uniform resource locator URL of the resource, an IP address of the user, and an IP of a server that provides the resource An address, an identifier of the server, and a local resource identifier of the resource on the server;
  • a third determining unit configured to determine, according to the identifier of the server and the local resource identifier in the IP packet received by the third receiving unit, whether the cache device caches the resource
  • a third sending unit configured to: when the third determining unit determines that the cache device caches the resource, send a data packet carrying the resource to the user, where a source address of the data packet is The IP address of the server, and the destination address is the IP address of the user.
  • the method further includes:
  • a third requesting unit configured to: when the third determining unit determines that the cache device does not cache the resource, request the resource from the server according to the URL;
  • a third data packet sending unit configured to send, according to the third requesting unit, the data packet that carries the resource to the user, where a source address of the data packet is the server IP address, the destination address is the IP address of the user.
  • An embodiment of the present invention provides a system for requesting a resource, including: a cache management device, a cache device, and an edge router.
  • the cache management device is configured to receive a user request packet forwarded by the edge router, where the user request packet includes a uniform resource locator URL of the requested resource, and the source address of the user request packet is a sending station.
  • the Internet Protocol (IP) address of the user requesting the message, the destination address of the user request message is an IP address of a server providing the resource, and the user request message is determined by the edge router to determine the user request
  • IP Internet Protocol
  • the packet is forwarded to the cache management device, and the cache device is determined according to the preset policy, and the IP packet is sent to the cache device, where the IP packet includes the URL and the user.
  • the cache device is configured to receive an internet protocol IP packet sent by the cache management device, where the IP packet includes a uniform resource locator URL of the resource, an IP address of the user, and an IP of a server that provides the resource. An address, an identifier of the server, and a local resource identifier of the resource on the server, determining, according to the identifier of the server and the local resource identifier, whether the cache device caches the resource, where the cache device When the cache device caches the resource, the cache device sends a data packet carrying the resource to the user, where the source address of the data packet is an IP address of the server, and the destination address is The IP address of the user;
  • the edge router is configured to receive a user request message sent by the user, and after determining that the user request message matches the first forwarding rule, forward the user request message to the cache management device.
  • the cache management device is further configured to: when the session that includes the user request packet is a transmission control protocol TCP session, the cache management device generates a second forwarding rule for the edge router, where
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet.
  • the source port number of the user request packet, the forwarding destination device corresponding to the second forwarding rule is the cache device, and the second forwarding rule is sent to the edge router, where the second The forwarding rule includes more matching elements than the matching elements included in the first forwarding rule.
  • the embodiments of the present invention provide a method, a device, and a system for requesting resources.
  • the cache management device locally manages each cache device, thereby reducing the burden on the edge routing device.
  • FIG. 1 is a schematic diagram of a method for requesting resources according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of another method for requesting resources according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a method for requesting a resource according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a cache management device according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another cache management device according to an embodiment of the present invention
  • FIG. 7 is an edge router according to an embodiment of the present invention; Schematic diagram of the structure;
  • FIG. 8 is a schematic structural diagram of another edge router according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a cache device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another cache device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a system for requesting resources according to an embodiment of the present invention. detailed description
  • An embodiment of the present invention provides a method for requesting a resource.
  • the execution body of the embodiment is a cache management device, and the method includes:
  • the cache management device receives the user request packet forwarded by the edge router.
  • the user request message includes a uniform resource locator of the requested resource (English name is Uniform Resource Locator, abbreviated as URL in English), and the source address of the user requesting the message is the user who sends the user request message.
  • the Internet Protocol English name is Internet Protocol, abbreviated as IP
  • the destination address of the user request packet is the IP address of the server that provides the resource.
  • the user request message is forwarded to the cache management device after the edge router determines that the user request message meets the first forwarding rule.
  • the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet.
  • the matching element of the first forwarding rule includes the IP address of the server, the destination port number of the user request packet, and the transport layer protocol number of the user request packet, as follows: IP address: IP address of the resource server, user request report The destination port number of the text: 80 (that is, the port number of the HTTP protocol), the transport layer protocol of the user request message: 6 (that is, the TCP protocol), the edge router receives the user request message, if the user requests the packet server IP Address, destination port The number and transport layer protocol are consistent with the first forwarding rule set above (ie, the message resource server
  • the user request message is sent to the cache management device.
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also within the scope of the present invention.
  • the cache management device determines the cache device according to a preset policy.
  • the cache management device determines that the cache device is configured according to the preset policy: the cache management device acquires resource configuration information of each cache device, and determines a cache device from each cache device according to the URL, where the resource configuration information includes a cache.
  • the URL of the resource stored in the device and the load information of the cache device are not limited thereto.
  • the cache management device sends an IP packet to the cache device.
  • the IP packet includes the URL, an IP address of the user, an IP address of the server, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is the domain name of the server or the IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the local resource identifier on is n344791935.shtml.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. This prevents the user from seeing the address information of the cache device, avoids exposing the cache device, and transparently transmits the information of the cache management device and the cache device to the user. At the same time, the attacker is prevented from attacking the cache device, and the information transmission is ensured. safety. Further, when the session including the user request message is a TCP session, the cache management device generates a second forwarding rule for the edge router.
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet. And the source port number of the user request message.
  • the cache management device sends the second forwarding rule to the edge router, where the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule.
  • the edge router performs the longest matching principle. Therefore, when a packet matches both the first forwarding rule and the second forwarding rule, the forwarding is performed according to the second forwarding rule.
  • the timer set by the cache management device is started when the cache management device sends the user request message to the cache device, and stops when the preset time is reached or exceeded, if the timer reaches or exceeds the preset time, The cache management device continues to send the user request message to the cache device, and the timer resets the preset time. Until the cache management device receives the acknowledgment response feedback, the cache management device sends the second forwarding rule to the edge router.
  • the forwarding destination device corresponding to the second forwarding rule is the cache device, and the edge router sends the packet matching the second forwarding rule to the cache device.
  • the user is receiving the cache device.
  • the response information is sent to the cache device.
  • the edge router selects the second forwarding rule according to the longest matching principle, and the response information matching the second forwarding rule is based on the response information.
  • the address information of the cache device is sent to the cache device, so that the edge router sends the response information replied by the user directly to the cache device, and does not need to go through the cache management device, thereby improving forwarding efficiency.
  • the longest matching principle is that the edge router searches for the first forwarding rule and the second forwarding rule, and selects the forwarding rule with the most matching elements.
  • the matching element of the second forwarding rule includes: a source address of the user request packet, a source port number of the user request packet, a destination address of the user request packet, a destination port number of the user request packet, and a user.
  • the destination address of the user request packet is the IP address of the server that provides the resource requested by the user request packet.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule that matches more elements.
  • the edge router needs to send the user request message to the cache management device when receiving the user request message, and the existence of the second forwarding rule causes the edge router to continue The user requests the message to be sent to the cache device. Therefore, after the edge router receives the connection end information sent by the user, the second forwarding rule needs to be deleted.
  • the cache management device centrally manages each cache device, and selects a suitable cache device for each edge router according to a unified principle, so that not only the consistency principle of the cache device is ensured, but also It reduces the delay of network resource transmission and reduces the loss of the system.
  • An embodiment of the present invention provides a method for requesting a resource.
  • the execution body of the embodiment is an edge router, and the method includes:
  • the edge router receives the user request packet sent by the user.
  • the user request packet includes a URL of the resource, and the source address of the user request packet is an Internet Protocol IP address of the user who sends the user request packet, and the destination address of the user request packet is a server that provides the resource. IP address.
  • the edge router After the user determines that the user request packet matches the first forwarding rule, the edge router forwards the user request packet to the cache management device.
  • the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request message.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet, as follows: IP address: IP address of the resource server, user request report The destination port number of the text: 80 (that is, the port number of the HTTP protocol), the transport layer protocol of the user request message: 6 (that is, the TCP protocol), the edge router receives the user request message, if the user requests the packet server IP When the address, the destination port number, and the transport layer protocol are the same as the first forwarding rule set by the above (that is, the IP address of the packet resource server, the destination port number is 80, and the transport layer protocol is 6), the user request packet is sent. To the cache management device.
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also Within the scope of protection of the present invention.
  • the cache management device when the session including the user request message is a TCP session, the cache management device generates a second forwarding rule for the edge router.
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet. And the source port number of the user request message.
  • the cache management device sends the second forwarding rule to the edge router, where the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule.
  • the edge router performs the longest matching principle. Therefore, when a packet matches both the first forwarding rule and the second forwarding rule, the forwarding is performed according to the second forwarding rule.
  • the timer set by the cache management device is started when the cache management device sends the user request message to the cache device, and stops when the preset time is reached or exceeded, if the timer reaches or exceeds the preset time, The cache management device continues to send the user request message to the cache device, and the timer resets the preset time. Until the cache management device receives the acknowledgment response feedback, the cache management device sends the second forwarding rule to the edge router.
  • the forwarding destination device corresponding to the second forwarding rule is the cache device, and specifically: after receiving the resource sent by the cache device, the user sends a response message to the cache device, where the response information is received by the edge router.
  • the edge router selects the second forwarding rule according to the longest matching principle, and sends the response information matching the second forwarding rule to the cache device according to the address information of the cache device, so that the edge router sends the response information of the user reply directly. To the cache device, there is no need to go through the cache management device, which improves the forwarding efficiency.
  • the longest matching principle is that the edge router searches for the first forwarding rule and the second forwarding rule, and selects the forwarding rule with the most matching elements.
  • the matching element of the second forwarding rule includes: a source address of the user request packet, a source port number of the user request packet, a destination address of the user request packet, a destination port number of the user request packet, and a user.
  • the destination address of the user request packet is the IP address of the server that provides the resource requested by the user request packet.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule that matches more elements.
  • the edge router needs to send the user request message to the cache management device when receiving the user request message, and the existence of the second forwarding rule causes the edge router to continue The user requests the message to be sent to the cache device. Therefore, after the edge router receives the connection end information sent by the user, the second forwarding rule needs to be deleted.
  • the cache management device centrally manages each cache device, and selects a suitable cache device for each edge router according to a unified principle, so that not only the consistency principle of the cache device is ensured, but also It reduces the delay of network resource transmission and reduces the loss of the system.
  • An embodiment of the present invention provides a method for sending a resource to a user.
  • the execution subject of the method is a cache device, and includes:
  • the cache device receives an IP packet sent by the cache management device.
  • the IP packet includes a URL of the resource, an IP address of the user, an IP address of a server that provides the resource, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is a domain name of the server or an IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the local resource identifier on is n344791935.shtml.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. In this way, the user can not see the address information of the cache device, and avoid exposing the cache device.
  • the cache management device and the cache device transparently transmit the information of the user, and at the same time, the attacker's attack on the cache device is avoided, and the security of the information transmission is ensured.
  • the cache device determines, according to the identifier of the server and the local resource identifier, whether the cache device caches the resource.
  • the cache device determines that the cache device caches the resource according to the identifier of the server and the local resource identifier, the cache device sends a data packet carrying the resource to the user.
  • the source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the cache device determines, according to the identifier of the server and the local resource identifier, that the cache device does not cache the resource, the cache device requests the resource from the server according to the URL.
  • the cache device After obtaining the resource from the server, the cache device sends a data packet carrying the resource to the user.
  • the source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the above method is used to centrally manage each cache device through the cache management device, and select a suitable cache device for each edge router according to a unified principle. This not only ensures the consistency of the cache device preference principle, but also reduces the network resource transmission. Delay and reduce system losses.
  • An embodiment of the present invention provides a method for requesting a resource. As shown in FIG. 4, the specific steps of the method are:
  • the cache management device receives the user request packet forwarded by the edge router.
  • the user request packet includes a URL of the requested resource, and the source address of the user request packet is an IP address of a user who sends the user request packet, and the destination address of the user request packet is a server that provides the resource. IP address.
  • the user request message is forwarded to the cache management device after the edge router determines that the user request message meets the first forwarding rule.
  • the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and the user.
  • the transport layer protocol number of the request message may include an IP address of the server, a destination port number of the user request packet, and the user.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet, as follows: IP address: IP address of the resource server, user request report The destination port number of the text: 80 (that is, the port number of the HTTP protocol), the transport layer protocol of the user request message: 6 (that is, the TCP protocol), the edge router receives the user request message, if the user requests the packet server IP The address, the destination port number, and the transport layer protocol are the same as the first forwarding rule set by the above (that is, the IP address of the message resource server, the destination port number is 80, and the transport layer protocol is 6), then the user request message is sent. To the cache management device.
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also within the scope of the present invention.
  • the cache management device acquires resource configuration information of each cache device.
  • the resource configuration information includes a URL of a resource stored in the cache device and load information of the cache device.
  • step S402 is not limited to be performed after the step S401, and the process of the cache management device acquiring the resource configuration information of the cache device in step S402 is relatively independent from the process in step S401, and there is no absolute sequence. Therefore, step S402 only needs to be performed before step S403.
  • the cache management device determines, according to the URL, a cache device from each cache device.
  • the cache management device determines that the cache device is configured according to the preset policy: the cache management device acquires resource configuration information of each cache device, and determines a cache device from each cache device according to the URL.
  • Embodiments of the invention are not limited thereto.
  • S404 The cache management device sends an IP packet to the cache device.
  • the IP packet includes the URL, an IP address of the user, an IP address of the server, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is the domain name of the server or the IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. This prevents the user from seeing the address information of the cache device, avoids exposing the cache device, and transparently transmits the information of the cache management device and the cache device to the user. At the same time, the attacker is prevented from attacking the cache device, and the information transmission is ensured. safety.
  • S405 The cache device sends a confirmation response feedback to the cache management device.
  • the cache management device When the session including the user request packet is a TCP session, the cache management device generates a second forwarding rule for the edge router, and sends the second forwarding rule to the edge router.
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet. And the source port number of the user request message.
  • the cache management device sends the second forwarding rule to the edge router, where the second forwarding rule includes more matching elements than the matching element included in the first forwarding rule.
  • the edge router performs the longest matching principle. Therefore, when a packet matches both the first forwarding rule and the second forwarding rule, the forwarding is performed according to the second forwarding rule.
  • the timer set by the cache management device is started when the cache management device sends the user request message to the cache device, and stops when the preset time is reached or exceeded, if the timer reaches or exceeds the preset time, The cache management device continues to send the user request message to the cache device, and the timer resets the preset time. Until the cache management device receives the acknowledgment response feedback, the cache management device sends the second forwarding rule to the edge router.
  • the cache device sends a data packet carrying the resource to the user according to the URL in the user request packet. Further, the cache device determines, according to the identifier of the server in the user request packet and the local resource identifier, whether the cache device caches the resource,
  • the data message carrying the resource is sent to the user
  • the resource is requested from the server according to the URL.
  • the cache device After obtaining the resource from the server, the cache device sends a data packet carrying the resource to the user.
  • the source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the cache device sends the data packet to the user, because the source address of the data packet is the IP address of the server, the user does not know that the cache management device and the target cache device exist in the process of acquiring the resource.
  • the transparent management of the information of the user by the cache management device and the cache device is realized, and the attacker's attack on the cache device is avoided, thereby ensuring the security of the information transmission.
  • the edge router receives response information sent by the user to the target cache device.
  • the edge router selects a second forwarding rule according to the longest matching principle, and sends response information that matches the second forwarding rule to the cache device according to the address information of the cache device.
  • the edge router sends the response information replied by the user directly to the cache device, and does not need to go through the cache management device, thereby improving the forwarding efficiency.
  • the longest matching principle is that the edge router searches for the first forwarding rule and the second forwarding rule, and selects the forwarding rule with the most matching elements.
  • the matching element of the second forwarding rule includes: a source address of the user request packet, a source port number of the user request packet, a destination address of the user request packet, a destination port number of the user request packet, and a user.
  • the destination address of the user request packet is the IP address of the server that provides the resource requested by the user request packet.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule with more matching elements.
  • the user sends a connection end message to the edge router.
  • the method embodiment further includes the following steps:
  • the edge router After receiving the connection end message, the edge router deletes the second forwarding rule.
  • the cache management device centrally manages each cache device, and selects a suitable cache device for each edge router according to a unified principle, so that not only the consistency principle of the cache device is ensured, but also It reduces the delay of network resource transmission and reduces the loss of the system.
  • the embodiment of the present invention provides a cache management device 500.
  • the method includes: a first receiving unit 501, configured to receive a user request packet forwarded by an edge router.
  • the user request packet includes the URL of the requested resource, and the source address of the user request packet is an Internet Protocol IP address of the user who sends the user request packet, and the destination address of the user request packet is the resource.
  • the IP address of the server, the user request message is forwarded to the cache management device after the edge router determines that the user request message meets the first forwarding rule.
  • the user request message is forwarded to the cache management device after the edge router determines that the user request message meets the first forwarding rule.
  • the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet, as follows: IP address: IP address of the resource server, user request report The destination port number of the text: 80 (that is, the port number of the HTTP protocol), the transport layer protocol of the user request message: 6 (that is, the TCP protocol), the edge router receives the user request message, if the user requests the packet server IP When the address, the destination port number, and the transport layer protocol are the same as the first forwarding rule set by the above (that is, the IP address of the packet resource server, the destination port number is 80, and the transport layer protocol is 6), the user request packet is sent. To the cache management device.
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also Within the scope of protection of the present invention.
  • the first determining unit 502 is configured to determine, according to a preset policy, a cache device.
  • the request information sending unit 503 is configured to send an IP packet to the cache device after the first determining unit 502 determines the cache device.
  • the IP packet includes the URL, an IP address of the user, an IP address of the server, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is the domain name of the server or the IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the local resource identifier on is n344791935.shtml.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. This prevents the user from seeing the address information of the cache device, avoids exposing the cache device, and transparently transmits the information of the cache management device and the cache device to the user. At the same time, the attacker is prevented from attacking the cache device, and the information transmission is ensured. safety.
  • the cache management device 500 further includes:
  • the forwarding rule generating unit 504 is configured to: when the session including the user request message is a transmission control protocol TCP session, the cache management device generates a second forwarding rule for the edge router.
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet. And the source port number of the user request packet, where the forwarding destination device corresponding to the second forwarding rule is the cache device.
  • the forwarding destination device corresponding to the second forwarding rule is the cache device,
  • the edge router sends the packet matching the second forwarding rule to the cache device.
  • the user sends a response message to the cache device after receiving the resource sent by the cache device.
  • the edge router selects the second forwarding rule according to the longest matching principle, and sends the response information matching the second forwarding rule to the cache device according to the address information of the cache device, so that the edge router replies the user.
  • the response information is sent directly to the cache device without the need to go through the cache management device, thereby improving forwarding efficiency.
  • the longest matching principle is that the edge router searches for the first forwarding rule and the second forwarding rule, and selects the forwarding rule with the most matching elements.
  • the matching element of the second forwarding rule includes: The source address, the source port number of the user request packet, the destination address of the user request packet, the destination port number of the user request packet, and the transport layer protocol of the user request packet.
  • the destination address of the user request packet is the IP address of the server that provides the resource requested by the user request packet.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule with more matching elements.
  • the rule sending unit 505 is configured to send the second forwarding rule generated by the forwarding rule generating unit to the edge router.
  • the second forwarding rule includes more matching elements than the matching elements included in the first forwarding rule.
  • the cache management device provided by the foregoing embodiment is configured to centrally manage each cache device by using the cache management device, and select a suitable cache device for each edge router according to a unified principle, so that not only the consistency principle of the cache device is ensured, but also It reduces the delay of network resource transmission and reduces the loss of the system.
  • An embodiment of the present invention provides an edge router 700. As shown in FIG. 7, the method includes: a second receiving unit 701, configured to receive a user request message sent by a user.
  • the user request packet includes a uniform resource locator URL of the resource, and the source address of the user request packet is an Internet Protocol IP address of the user that sends the user request packet, and the destination address of the user request packet is provided.
  • the IP address of the resource's server is provided.
  • the second sending unit 702 is configured to forward the user request message received by the second receiving unit 701 to the cache management device after determining that the user request message matches the first forwarding rule. If the IP address of the user is fixed, the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet, for example, an IP address: an IP address of the resource server, and a user request report.
  • the address, the destination port number, and the transport layer protocol are the same as the first forwarding rule set by the above (that is, the IP address of the message resource server, the destination port number is 80, and the transport layer protocol is 6), then the user request message is sent.
  • the cache management device that is, the IP address of the message resource server, the destination port number is 80, and the transport layer protocol is 6
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also within the scope of the present invention.
  • the edge router 700 further includes:
  • the rule receiving unit 703 is configured to: when the session including the user request message is a transmission control protocol TCP session, the edge routing device receives the second forwarding rule sent by the cache management device.
  • the matching element of the second forwarding rule includes: a destination address of the user request packet, a destination port number of the user request packet, a transport layer protocol number of the user request packet, and a source address of the user request packet. And the source port number of the user request message.
  • the rule execution unit 704 is configured to execute the first forwarding rule and the second forwarding rule according to the longest matching principle.
  • the longest matching principle is that the edge router searches for the first forwarding rule and the second forwarding rule, and selects the forwarding rule with the most matching elements.
  • the matching element of the second forwarding rule includes: a source address of the user request packet, a source port number of the user request packet, a destination address of the user request packet, a destination port number of the user request packet, and a user.
  • the destination address of the user request packet is the IP address of the server that provides the resource requested by the user request packet.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule that matches more elements.
  • the embodiment of the present invention provides a cache device 900, as shown in FIG. 9, including:
  • the third receiving unit 901 is configured to receive an internet protocol IP packet sent by the cache management device.
  • the IP packet includes a URL of the resource, an IP address of the user, an IP address of a server that provides the resource, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is a domain name of the server or an IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the local resource identifier on is n344791935.shtml.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. In this way, the user can not see the address information of the cache device, avoid exposing the cache device, and realize transparent transmission of the information of the cache management device and the cache device to the user, and at the same time, avoid attacks by the attacker on the cache device, and ensure information transmission. safety.
  • the third determining unit 902 is configured to determine, according to the identifier of the server and the local resource identifier in the IP packet received by the third receiving unit 901, whether the cache device caches the resource;
  • the third sending unit 903 is configured to: when the third determining unit 902 determines that the cache device caches the resource, send the data packet carrying the resource to the user.
  • the source address of the data packet is the IP address and the destination address of the server.
  • the IP address of the user is the IP address and the destination address of the server.
  • the cache device 900 further includes:
  • the third requesting unit 904 is configured to request the resource from the server according to the URL when the third determining unit 902 determines that the cache device does not cache the resource.
  • the third data packet sending unit 905 is configured to send, according to the third request unit 904, the data message carrying the resource to the user.
  • the source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the cache device provided by the foregoing embodiment not only ensures the consistency of the cache device preference principle, but also reduces the delay of network resource transmission and reduces system loss.
  • the embodiment of the present invention provides a system for requesting resources, as shown in FIG. 1 , including: a cache management device 1 100, a cache device 1 101, and an edge router 1 102.
  • the cache management device 1 100 is configured to receive a user request message forwarded by the edge router 1 101.
  • the user request packet includes the requested resource URL, and the source address of the user request packet is an IP address of a user who sends the user request packet, and the destination address of the user request packet is a server that provides the resource. IP address.
  • the user request message is forwarded to the cache management device after the edge router determines that the user request message meets the first forwarding rule.
  • the matching element of the first forwarding rule may include an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet.
  • the matching element of the first forwarding rule includes an IP address of the server, a destination port number of the user request packet, and a transport layer protocol number of the user request packet, as follows: IP address: IP address of the resource server, user request report The destination port number of the text: 80 (that is, the port number of the HTTP protocol), the transport layer protocol of the user request message: 6 (that is, TCP protocol), edge routing The device receives the user request message, if the server IP address, the destination port number, and the transport layer protocol of the user request message are consistent with the first forwarding rule set above (ie, the message resource server)
  • the user request packet is sent to the cache management device.
  • the matching element of the first forwarding rule may include the URL.
  • the embodiments of the present invention are not limited thereto, and other parameters that can be matched are also within the scope of the present invention.
  • the cache device 1 101 is configured to receive an Internet Protocol IP packet sent by the cache management device 1100, and determine, according to the identifier of the server and the local resource identifier, whether the cache device caches the resource, where the cache device determines the cache. When the device caches the resource, the cache device sends a data packet carrying the resource to the user.
  • the source address of the data packet is the IP address of the server, and the destination address is the IP address of the user.
  • the IP packet includes the URL, an IP address of the user, an IP address of the server, an identifier of the server, and a local resource identifier of the resource on the server.
  • the identifier of the server is the domain name of the server or the IP address of the server.
  • the local resource identifier of the resource on the server is the content on the right side of the rightmost "/" in the URL.
  • the identifier of the server is tv.sohu.com, that is, the domain name, and the resource is on the server.
  • the local resource identifier on is n344791935.shtml.
  • the IP packet When the identifier of the server is the IP address of the server, the IP packet includes the URL, the IP address of the user, the IP address of the server, the identifier of the server, and the local resource identifier of the resource on the server. It is understood that the IP packet carries two identical IP addresses of the server, or is understood to be that the IP packet carries only one IP address of the server.
  • the IP packet is actually used to request the user for the resource requested by the user request message, and the IP packet is used to indicate that the cache device sends the source address to the user as the IP address and destination address of the server. It is the IP address of the user and carries the data message of the resource. This prevents the user from seeing the address information of the cache device, avoids exposing the cache device, and transparently transmits the information of the cache management device and the cache device to the user. At the same time, the attacker is prevented from attacking the cache device, and the information transmission is ensured. safety.
  • the edge router 1 102 is configured to receive a user request message sent by the user, and after determining that the user request message matches the first forwarding rule, forward the user request message to the cache management device 1100.
  • the cache management device 1100 is further configured to: when the session including the user request message is a Transmission Control Protocol (TCP) session, the cache management device generates a second forwarding rule for the edge router.
  • TCP Transmission Control Protocol
  • the matching element of the second forwarding rule includes: a source address of the user request packet, a source port number of the user request packet, a destination address of the user request packet, and a destination port of the user request packet.
  • the transport layer protocol for the user request message is the IP address of the server that provides the resource requested by the user request message.
  • a set of optional values for the matching elements of the first forwarding rule are: server IP address, destination port number, and transport layer protocol. Therefore, the edge router selects a second forwarding rule that matches more elements.
  • each cache device is centrally managed by the cache management device, and a suitable cache device is selected for each edge router according to a unified principle. This not only ensures the consistency of the cache device preference principle, but also reduces the consistency. The delay of network resource transmission and the loss of the system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供一种用于请求资源的方法、设备及系统,涉及网络信息传输领域,通过緩存管理设备集中管理各个緩存设备,减少了边缘路由设备的负担。该方法包括:緩存管理设备接收边缘路由器转发的用户请求报文,其中,该用户请求报文是在该边缘路由器确定该用户请求报文符合第一转发规则后转发给该緩存管理设备的,该緩存管理设备根据预设的策略确定緩存设备,该緩存管理设备向该緩存设备发送IP报文,该IP报文包括该URL、该用户的IP地址、该服务器的IP地址、该服务器的标识和该资源在该服务器上的本地资源标识。本发明实施例用于请求资源。

Description

一种用于请求资源的方法、 设备及系统 技术领域
本发明涉及网络信息传输领域, 尤其涉及一种用于请求资源的方法、 设备及系统。
背景技术
由于宽带网络在世界各地的高速发展, 用户对网络资源 (音频、 视 频等) 的传输服务质量的要求也越来越高。
为了改善网络资源的传输服务质量, 提高用户的满意度, 运营商通 常会部署緩存设备获取并存储网络资源, 用户在请求获取网络资源时, 边缘路由器只需将用户请求报文重定向或者转发至緩存设备上, 若该緩 存设备存储有用户请求的网络资源, 则该緩存设备将该网络资源直接发 送给用户, 而不需要向网络资源服务器获取, 由于緩存设备距离用户更 近, 从而提高了网络资源的传输速度。
但是, 运营商在部署緩存设备时, 通常会部署多个緩存设备, 由于 每个緩存设备的资源緩存和负载各不相同, 因此, 边缘路由器需要选择 合适的緩存设备, 现有技术中, 各个边缘路由器都需要通过获取所有緩 存设备的负载或者緩存设备到用户的路径并通过计算来确定合适的緩存 设备, 这样, 各个边缘路由器重复性的获取与计算, 不仅增加了数据传 输的时延而且增加了系统的损耗, 同时, 由于各个边缘路由器独立选择 合适的緩存设备, 使得各边缘路由器的优选原则不一致。
发明内容
本发明的实施例提供一种用于请求资源的方法、 设备及系统, 以解 决边缘路由器因为需要获知緩存设备的状态信息而造成的负担较重的问 题。 。
为达到上述目的, 本发明的实施例采用如下技术方案:
本发明实施例提供一种用于请求资源的方法, 包括:
緩存管理设备接收边缘路由器转发的用户请求报文, 其中, 所述用 户请求报文包括被请求的资源的统一资源定位符 URL, 所述用户请求报 文的源地址为发送所述用户请求报文的用户的网际协议 IP地址, 所述用 户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述用户请 求报文是在所述边缘路由器确定所述用户请求报文符合第一转发规则后 转发给所述緩存管理设备的;
所述緩存管理设备根据预设的策略确定緩存设备;
所述緩存管理设备向所述緩存设备发送 IP报文,所述 IP报文包括所 述 URL、 所述用户的 IP地址、 所述服务器的 IP地址、 所述服务器的标 识和所述资源在所述服务器上的本地资源标识。
可选地, 所述方法还包括:
当包括所述用户请求报文的会话为传输控制协议 TCP会话时, 所述 緩存管理设备为所述边缘路由器生成第二转发规则, 所述第二转发规则 的匹配要素包括: 所述用户请求报文的目的地址、 所述用户请求报文的 目的端口号、 所述用户请求报文的传输层协议号、 所述用户请求报文的 源地址和所述用户请求报文的源端口号, 所述第二转发规则对应的转发 目的设备为所述緩存设备;
所述緩存管理设备将所述第二转发规则发送给所述边缘路由器, 其 中, 所述第二转发规则包括的匹配要素多于所述第一转发规则包括的匹 配要素。
可选地, 所述第一转发规则的匹配要素包括所述服务器的 IP地址、 所述用户请求报文的目的端口号和所述用户请求报文的传输层协议号; 或者, 所述第一转发规则的匹配要素包括所述 URL。
本发明实施例提供一种用于请求资源的方法, 包括:
边缘路由器接收用户发送的用户请求报文;
所述边缘路由器在确定所述用户请求报文与第一转发规则匹配后, 将所述用户请求报文转发给緩存管理设备, 其中, 所述用户请求报文包 括所述资源的统一资源定位符 URL, 所述用户请求报文的源地址为发送 所述用户请求报文的用户的网际协议 IP地址, 所述用户请求报文的目的 地址为提供所述资源的服务器的 IP地址。
可选地, 所述方法还包括:
当包括所述用户请求报文的会话为传输控制协议 TCP会话时, 所述 边缘路由设备接收所述緩存管理设备发送的第二转发规则, 所述第二转 发规则的匹配要素包括所述用户请求报文的目的地址、 所述用户请求报 文的目的端口号、 所述用户请求报文的传输层协议号、 所述用户请求报 文的源地址和所述用户请求报文的源端口号, 所述第二转发规则对应的 转发目的设备为所述緩存管理设备, 所述第二转发规则包括的匹配要素 多于所述第一转发规则包括的匹配要素;
所述边缘路由器按照最长匹配原贝 'J执行所述第一转发规则和第二转 发规则。
本发明实施例提供一种向用户发送资源的方法, 包括:
緩存设备接收緩存管理设备发送的网际协议 IP报文,所述 IP报文包 括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源 的服务器的 IP地址、 所述服务器的标识和所述资源在所述服务器上的本 地资源标识;
所述緩存设备根据所述服务器的标识和所述本地资源标识确定所述 緩存设备是否緩存有所述资源;
在所述緩存设备根据所述服务器的标识和所述本地资源标识确定所 述緩存设备緩存有所述资源时, 则所述緩存设备向所述用户发送携带所 述资源的数据报文, 所述数据报文的源地址为所述服务器的 IP地址, 目 的地址为所述用户的 IP地址。
可选地, 还包括:
在所述緩存设备根据所述服务器的标识和所述本地资源标识确定所 述緩存设备未緩存有所述资源时, 则所述緩存设备根据所述 URL向所述 服务器请求所述资源;
所述緩存设备在从所述服务器获取到所述资源后, 向所述用户发送 携带所述资源的数据报文, 所述数据报文的源地址为所述服务器的 IP地 址和目的地址为所述用户的 IP地址。 本发明实施例提供一种緩存管理设备, 包括:
第一接收单元, 用于接收边缘路由器转发的用户请求报文, 其中, 所述用户请求报文包括被请求的资源的统一资源定位符 URL, 所述用户 请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP地址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述 用户请求报文是在所述边缘路由器确定所述用户请求报文符合第一转发 规则后转发给所述緩存管理设备的;
第一确定单元, 用于根据预设的策略确定緩存设备;
请求信息发送单元, 用于在所述第一确定单元确定所述緩存设备后, 向所述緩存设备发送 IP报文, 所述 IP报文包括所述 URL、 所述用户的 IP地址、 所述服务器的 IP地址、 所述服务器的标识和所述资源在所述服 务器上的本地资源标识。
可选地, 还包括:
转发规则生成单元, 用于当包括所述用户请求报文的会话为传输控 制协议 TCP会话时, 所述緩存管理设备为所述边缘路由器生成第二转发 规则, 所述第二转发规则的匹配要素包括: 所述用户请求报文的目的地 址、 所述用户请求报文的目的端口号、 所述用户请求报文的传输层协议 号、 所述用户请求报文的源地址和所述用户请求报文的源端口号, 所述 第二转发规则对应的转发目的设备为所述緩存设备;
规则发送单元, 用于将所述转发规则生成单元生成的第二转发规则 发送给所述边缘路由器, 其中, 所述第二转发规则包括的匹配要素多于 所述第一转发规则包括的匹配要素。
可选地, 所述第一转发规则的匹配要素包括所述服务器的 IP地址、 所述用户请求报文的目的端口号和所述用户请求报文的传输层协议号; 或者, 所述第一转发规则的匹配要素包括所述 URL。 本发明实施例提供一种边缘路由器, 包括:
第二接收单元, 用于接收用户发送的用户请求报文;
第二发送单元, 用于在确定所述用户请求报文与第一转发规则匹配 后, 将所述第二接收单元接收的所述用户请求报文转发给緩存管理设备, 其中, 所述用户请求报文包括所述资源的统一资源定位符 URL, 所述用 户请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP 地 址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址。
可选地, 还包括:
规则接收单元, 用于当包括所述用户请求报文的会话为传输控制协 议 TCP会话时, 所述边缘路由设备接收所述緩存管理设备发送的第二转 发规则, 所述第二转发规则的匹配要素包括所述用户请求报文的目的地 址、 所述用户请求报文的目的端口号、 所述用户请求报文的传输层协议 号、 所述用户请求报文的源地址和所述用户请求报文的源端口号, 所述 第二转发规则对应的转发目的设备为所述緩存管理设备, 所述第二转发 规则包括的匹配要素多于所述第一转发规则包括的匹配要素;
规则执行单元, 用于按照最长匹配原则执行所述第一转发规则和第 二转发规则。
本发明实施例提供一种緩存设备, 包括:
第三接收单元, 用于接收緩存管理设备发送的网际协议 IP报文, 所 述 IP报文包括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源的服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识;
第三确定单元, 用于根据所述第三接收单元接收的所述 IP报文中的 所述服务器的标识和所述本地资源标识确定所述緩存设备是否緩存有所 述资源;
第三发送单元, 用于在所述第三确定单元确定所述緩存设备緩存有 所述资源时, 向所述用户发送携带所述资源的数据报文, 所述数据报文 的源地址为所述良务器的 IP地址, 目的地址为所述用户的 IP地址。
可选地, 还包括:
第三请求单元, 用于在所述第三确定单元确定所述緩存设备未緩存 有所述资源时, 根据所述 URL向所述服务器请求所述资源;
第三数据报文发送单元, 用于根据所述第三请求单元获取到所述资 源后, 向所述用户发送携带所述资源的数据报文, 所述数据报文的源地 址为所述服务器的 IP地址, 目的地址为所述用户的 IP地址。
本发明实施例提供一种用于请求资源的系统, 包括: 緩存管理设备、 緩存设备和边缘路由器,
所述緩存管理设备, 用于接收边缘路由器转发的用户请求报文, 其 中, 所述用户请求报文包括被请求的资源的统一资源定位符 URL, 所述 用户请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP地 址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述用户请求报文是在所述边缘路由器确定所述用户请求报文符合第一 转发规则后转发给所述緩存管理设备的, 根据预设的策略确定緩存设备, 并向所述緩存设备发送 IP报文, 所述 IP报文包括所述 URL、 所述用户 的 IP地址、 所述服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识;
所述緩存设备, 用于接收緩存管理设备发送的网际协议 IP报文, 所 述 IP报文包括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源的服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识, 根据所述服务器的标识和所述本地资源标识 确定所述緩存设备是否緩存有所述资源, 在所述緩存设备确定所述緩存 设备緩存有所述资源时, 则所述緩存设备向所述用户发送携带所述资源 的数据报文, 所述数据报文的源地址为所述服务器的 IP地址, 目的地址 为所述用户的 IP地址;
所述边缘路由器, 用于接收用户发送的用户请求报文, 并在确定所 述用户请求报文与第一转发规则匹配后, 将所述用户请求报文转发给緩 存管理设备。
可选地, 所述緩存管理设备, 还用于当包括所述用户请求报文的会 话为传输控制协议 TCP会话时, 所述緩存管理设备为所述边缘路由器生 成第二转发规则, 所述第二转发规则的匹配要素包括: 所述用户请求报 文的目的地址、 所述用户请求报文的目的端口号、 所述用户请求报文的 传输层协议号、 所述用户请求报文的源地址和所述用户请求报文的源端 口号, 所述第二转发规则对应的转发目的设备为所述緩存设备, 并将所 述第二转发规则发送给所述边缘路由器, 其中, 所述第二转发规则包括 的匹配要素多于所述第一转发规则包括的匹配要素。
本发明实施例提供一种用于请求资源的方法、 设备及系统, 通过緩 存管理设备集中管理各个緩存设备, 减少了边缘路由设备的负担。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的一种用于请求资源的方法示意图; 图 2为本发明实施例提供的另一种用于请求资源的方法示意图; 图 3为本发明实施例提供的另一种用于请求资源的方法示意图; 图 4为本发明实施例提供的一种用于请求资源的方法的流程示意图; 图 5为本发明实施例提供的一种緩存管理设备的结构示意图; 图 6为本发明实施例提供的另一种緩存管理设备的结构示意图; 图 7为本发明实施例提供的一种边缘路由器的结构示意图;
图 8为本发明实施例提供的另一种边缘路由器的结构示意图; 图 9为本发明实施例提供的一种緩存设备的结构示意图;
图 10为本发明实施例提供的另一种緩存设备的结构示意图; 图 1 1为本发明实施例提供的一种用于请求资源的系统的示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供一种用于请求资源的方法, 如图 1 所示, 该实施 例的执行主体为緩存管理设备, 该方法包括:
S 101、 緩存管理设备接收边缘路由器转发的用户请求报文。
其中, 该用户请求报文包括被请求的资源的统一资源定位符 (英文 全称为 Uniform Resource Locator, 英文缩写为 URL ) , 该用户请求 4艮文 的源地址为发送该用户请求报文的用户的网际协议 (英文全称为 Internet Protocol, 英文缩写为 IP )地址, 该用户请求报文的目的地址为提供该资 源的服务器的 IP地址。
另外, 该用户请求报文是在该边缘路由器确定该用户请求报文符合 第一转发规则后转发给该緩存管理设备的。
进一步地, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要 素可以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户 请求报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 如下: IP 地址: 资源服务器的 IP地址, 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) , 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的
IP地址、 目的端口号为 80 并且传输层协议为 6 ) 时, 则将该用户请求报 文发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
S 102、 该緩存管理设备根据预设的策略确定緩存设备。
优选地, 该緩存管理设备根据预设的策略确定緩存设备具体可以是: 该緩存管理设备获取各緩存设备的资源配置信息, 根据该 URL从各緩存 设备中确定緩存设备, 该资源配置信息包括緩存设备中存储的资源的 U R L以及该緩存设备的负载信息。 本发明实施例并不局限于此。
S 103、 该緩存管理设备向该緩存设备发送 IP报文。
其中, 该 IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地 址、 该服务器的标识和该资源在该服务器上的本地资源标识。 所述服务 器的标识为所述服务器的域名或所述服务器的 IP地址。 所述资源在所述 服务器上的本地资源标识为 URL中最右侧的 "/" 右边的内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以使用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。 更进一步地, 当包括该用户请求报文的会话为 TCP会话时, 该緩存 管理设备为该边缘路由器生成第二转发规则。
其中, 该第二转发规则的匹配要素包括: 该用户请求报文的目的地 址、 该用户请求报文的目的端口号、 该用户请求报文的传输层协议号、 该用户请求报文的源地址和该用户请求报文的源端口号。
该緩存管理设备将该第二转发规则发送给该边缘路由器, 其中, 该 第二转发规则包括的匹配要素多于该第一转发规则包括的匹配要素。 所 述边缘路由器执行最长匹配原则, 因此当一个报文与第一转发规则和第 二转发规则都匹配时, 则按照第二转发规则进行转发。
可选地, 緩存管理设备设置的定时器会在緩存管理设备向緩存设备 发送用户请求报文时启动, 并在达到或者超过预设时间时停止, 若在定 时器达到或者超过预设时间时, 还未接收到緩存设备发送的确认响应反 馈, 则緩存管理设备继续向该緩存设备发送用户请求报文, 此时, 该定 时器重置预设时间。 直至该緩存管理设备接收到确认响应反馈后, 緩存 管理设备才向边缘路由器发送第二转发规则。
另外, 该第二转发规则对应的转发目的设备为该緩存设备指的是, 边缘路由器将匹配该第二转发规则的报文发送到緩存设备, 本实施例中 具体为: 用户在接收到緩存设备发送的资源后, 会向该緩存设备发送响 应信息, 该响应信息在由边缘路由器接收到时, 边缘路由器按照最长匹 配原则选择第二转发规则, 将与该第二转发规则匹配的响应信息根据该 緩存设备的地址信息发送至緩存设备, 这样, 边缘路由器会将用户回复 的响应信息直接发送至緩存设备, 而不需要再经过緩存管理设备, 从而 提高了转发效率。
其中, 该最长匹配原则为边缘路由器查找第一转发规则和第二转发 规则, 并选择匹配元素最多的转发规则。 本实施例中, 由于第二转发规 则的匹配元素包括: 用户请求报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号和用户请求报文 的传输层协议。 用户请求报文的目的地址就是提供用户请求报文所请求 的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号和传输层协议, 因此, 边缘路由器会选择匹 配元素更多的第二转发规则。 但是, 由于用户发起对新资源的连接请求, 使得边缘路由器在接收 到用户请求报文时, 需要将该用户请求报文发送到緩存管理设备, 而第 二转发规则的存在会使得边缘路由器继续将用户请求报文发送至该緩存 设备, 因此, 在边缘路由器接收到用户发送的连接结束信息后, 需要删 除第二转发规则。
上述实施例提供的请求资源的方法, 通过緩存管理设备集中管理各 个緩存设备, 并按照统一的原则针对各个边缘路由器选择合适的緩存设 备, 这样, 不仅保证了对緩存设备优选原则的一致性, 同时减少了网络 资源传输的时延并减少了系统的损耗。
本发明实施例提供一种用于请求资源的方法, 如图 2 所示, 该实施 例的执行主体为边缘路由器, 该方法包括:
5201、 边缘路由器接收用户发送的用户请求报文。
其中, 该用户请求报文包括该资源的 URL, 该用户请求报文的源地 址为发送该用户请求报文的用户的网际协议 IP地址, 该用户请求报文的 目的地址为提供该资源的服务器的 IP地址。
5202、 该边缘路由器在确定该用户请求报文与第一转发规则匹配后, 将该用户请求报文转发给緩存管理设备。
其中, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要素可 以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户请求 报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 如下: IP 地址: 资源服务器的 IP地址、 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) 、 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的 IP地址、 目的端口号为 80 且传输层协议为 6 ) 时, 则将该用户请求报文 发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
进一步地, 当包括该用户请求报文的会话为 TCP会话时, 该緩存管 理设备为该边缘路由器生成第二转发规则。
其中, 该第二转发规则的匹配要素包括: 该用户请求报文的目的地 址、 该用户请求报文的目的端口号、 该用户请求报文的传输层协议号、 该用户请求报文的源地址和该用户请求报文的源端口号。
该緩存管理设备将该第二转发规则发送给该边缘路由器, 其中, 该 第二转发规则包括的匹配要素多于该第一转发规则包括的匹配要素。 所 述边缘路由器执行最长匹配原则, 因此当一个报文与第一转发规则和第 二转发规则都匹配时, 则按照第二转发规则进行转发。
可选地, 緩存管理设备设置的定时器会在緩存管理设备向緩存设备 发送用户请求报文时启动, 并在达到或者超过预设时间时停止, 若在定 时器达到或者超过预设时间时, 还未接收到緩存设备发送的确认响应反 馈, 则緩存管理设备继续向该緩存设备发送用户请求报文, 此时, 该定 时器重置预设时间。 直至该緩存管理设备接收到确认响应反馈后, 緩存 管理设备才向边缘路由器发送第二转发规则。
另外, 该第二转发规则对应的转发目的设备为该緩存设备, 具体为: 用户在接收到緩存设备发送的资源后, 会向该緩存设备发送响应信息, 该响应信息在由边缘路由器接收到时, 边缘路由器按照最长匹配原则选 择第二转发规则, 将与该第二转发规则匹配的响应信息根据该緩存设备 的地址信息发送至緩存设备, 这样, 边缘路由器会将用户回复的响应信 息直接发送至緩存设备, 而不需要再经过緩存管理设备, 从而提高了转 发效率。
其中, 该最长匹配原则为边缘路由器查找第一转发规则和第二转发 规则, 并选择匹配元素最多的转发规则。 本实施例中, 由于第二转发规 则的匹配元素包括: 用户请求报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号和用户请求报文 的传输层协议。 用户请求报文的目的地址就是提供用户请求报文所请求 的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号和传输层协议, 因此, 边缘路由器会选择匹 配元素更多的第二转发规则。 但是, 由于用户发起对新资源的连接请求, 使得边缘路由器在接收 到用户请求报文时, 需要将该用户请求报文发送到緩存管理设备, 而第 二转发规则的存在会使得边缘路由器继续将用户请求报文发送至该緩存 设备, 因此, 在边缘路由器接收到用户发送的连接结束信息后, 需要删 除第二转发规则。
上述实施例提供的请求资源的方法, 通过緩存管理设备集中管理各 个緩存设备, 并按照统一的原则针对各个边缘路由器选择合适的緩存设 备, 这样, 不仅保证了对緩存设备优选原则的一致性, 同时减少了网络 资源传输的时延并减少了系统的损耗。
本发明实施例提供一种向用户发送资源的方法, 如图 3 所示, 该方 法实施例的执行主题为緩存设备, 包括:
S301、 緩存设备接收緩存管理设备发送的 IP报文;
其中, 该 IP报文包括该资源的 URL、 该用户的 IP地址、 提供该资 源的服务器的 IP地址、 该服务器的标识和该资源在该服务器上的本地资 源标识。所述服务器的标识为所述服务器的域名或所述服务器的 I P地址。 所述资源在所述服务器上的本地资源标识为 URL中最右侧的 "/"右边的 内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以是用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。
S302、 该緩存设备根据该服务器的标识和该本地资源标识确定该緩 存设备是否緩存有该资源。
S303、 在该緩存设备根据该服务器的标识和该本地资源标识确定该 緩存设备緩存有该资源时, 则该緩存设备向该用户发送携带该资源的数 据报文。
其中, 该数据报文的源地址为该服务器的 IP地址、 目的地址为该用 户的 IP地址。
进一步地, 在该緩存设备根据该服务器的标识和该本地资源标识确 定该緩存设备未緩存有该资源时, 该緩存设备根据该 URL向该服务器请 求该资源。
该緩存设备在从该服务器获取到该资源后, 向该用户发送携带该资 源的数据报文, 该数据报文的源地址为该服务器的 IP地址、 目的地址为 该用户的 IP地址。
采用上述方法, 通过緩存管理设备集中管理各个緩存设备, 并按照 统一的原则针对各个边缘路由器选择合适的緩存设备, 这样, 不仅保证 了对緩存设备优选原则的一致性, 同时减少了网络资源传输的时延并减 少了系统的损耗。
本发明实施例提供一种用于请求资源的方法, 如图 4 所示, 该方法 具体步骤为:
S401、 緩存管理设备接收边缘路由器转发的用户请求报文。
其中, 该用户请求报文包括被请求的资源的 URL, 该用户请求报文 的源地址为发送该用户请求报文的用户的 IP地址, 该用户请求报文的目 的地址为提供该资源的服务器的 IP地址。
另外, 该用户请求报文是在该边缘路由器确定该用户请求报文符合 第一转发规则后转发给该緩存管理设备的。
进一步地, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要 素可以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户 请求报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 如下: IP 地址: 资源服务器的 IP地址、 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) 、 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的 IP地址、 目的端口号为 80 、 传输层协议为 6 ) 时, 则将该用户请求报文 发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
5402、 緩存管理设备获取各緩存设备的资源配置信息。
其中, 该资源配置信息包括緩存设备中存储的资源的 URL以及该緩 存设备的负载信息。
需要说明的是, 步骤 S402并不局限于在步骤 S401之后进行, 由于 步骤 S402 中緩存管理设备获取緩存设备的资源配置信息与步骤 S401 中 的过程是相对独立的过程并不存在绝对的先后顺序, 因此, 步骤 S402只 需在步骤 S403之前进行即可。
5403、 緩存管理设备根据该 URL从各緩存设备中确定緩存设备。 优选地, 该緩存管理设备根据预设的策略确定緩存设备具体可以是: 该緩存管理设备获取各緩存设备的资源配置信息, 根据该 URL从各緩存 设备中确定緩存设备。 本发明实施例并不局限于此。
5404、 緩存管理设备向该緩存设备发送 IP报文。
其中, 该 IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地 址、 该服务器的标识和该资源在该服务器上的本地资源标识。 所述服务 器的标识为所述服务器的域名或所述服务器的 IP地址。 所述资源在所述 服务器上的本地资源标识为 URL中最右侧的 "/" 右边的内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以使用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。
5405、 緩存设备向緩存管理设备发送确认响应反馈。
5406、 当包括该用户请求报文的会话为 TCP会话时, 緩存管理设备 为该边缘路由器生成第二转发规则, 并将该第二转发规则发送至边缘路 由器。
其中, 该第二转发规则的匹配要素包括: 该用户请求报文的目的地 址、 该用户请求报文的目的端口号、 该用户请求报文的传输层协议号、 该用户请求报文的源地址和该用户请求报文的源端口号。
该緩存管理设备将该第二转发规则发送给该边缘路由器, 其中, 该 第二转发规则包括的匹配要素多于该第一转发规则包括的匹配要素。 所 述边缘路由器执行最长匹配原则, 因此当一个报文与第一转发规则和第 二转发规则都匹配时, 则按照第二转发规则进行转发。
可选地, 緩存管理设备设置的定时器会在緩存管理设备向緩存设备 发送用户请求报文时启动, 并在达到或者超过预设时间时停止, 若在定 时器达到或者超过预设时间时, 还未接收到緩存设备发送的确认响应反 馈, 则緩存管理设备继续向该緩存设备发送用户请求报文, 此时, 该定 时器重置预设时间。 直至该緩存管理设备接收到确认响应反馈后, 緩存 管理设备才向边缘路由器发送第二转发规则。
5407、 緩存设备根据该用户请求报文中的 URL向该用户发送携带该 资源的数据报文。 进一步地, 緩存设备根据该该用户请求报文中的服务器的标识和该 本地资源标识确定该緩存设备是否緩存有该资源,
若确定该緩存设备緩存有该资源时, 则向该用户发送携带该资源的 数据报文;
若确定该緩存设备未緩存有该资源时, 则根据该 URL向该服务器请 求该资源。
该緩存设备在从该服务器获取到该资源后, 向该用户发送携带该资 源的数据报文, 该数据报文的源地址为该服务器的 IP地址、 目的地址为 该用户的 IP地址。
优选地, 緩存设备将该数据报文发送至用户时, 由于该数据报文的 源地址为该服务器的 IP地址, 用户并不知道在获取资源的过程中存在緩 存管理设备及目标緩存设备等设备, 实现了緩存管理设备及緩存设备对 用户的信息透明传输, 同时, 避免了攻击者对緩存设备的攻击, 保障了 信息传输的安全性。
5408、 边缘路由器接收用户向目标緩存设备发送的响应信息。
5409、 边缘路由器按照最长匹配原则选择第二转发规则, 将与该第 二转发规则匹配的响应信息根据该緩存设备的地址信息发送至緩存设 备。
这样, 边缘路由器会将用户回复的响应信息直接发送至緩存设备, 而不需要再经过緩存管理设备, 从而提高了转发效率。
其中, 该最长匹配原则为边缘路由器查找第一转发规则和第二转发 规则, 并选择匹配元素最多的转发规则。 本实施例中, 由于第二转发规 则的匹配元素包括: 用户请求报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号和用户请求报文 的传输层协议。 用户请求报文的目的地址就是提供用户请求报文所请求 的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号和传输层协议, 因此, 边缘路由器会选择匹 配元素更多的第二转发规则。
5410、 用户向边缘路由器发送连接结束消息。
另外, 由于用户发起对新资源的连接请求, 使得边缘路由器在接收 到用户请求报文时, 需要将该用户请求报文发送到緩存管理设备, 而第 二转发规则的存在会使得边缘路由器继续将用户请求报文发送至该緩存 设备, 因此, 在该方法实施例还包括以下步骤:
S41 1、 该边缘路由器在接收到该连接结束消息后, 删除第二转发规 则。
上述实施例提供的请求资源的方法, 通过緩存管理设备集中管理各 个緩存设备, 并按照统一的原则针对各个边缘路由器选择合适的緩存设 备, 这样, 不仅保证了对緩存设备优选原则的一致性, 同时减少了网络 资源传输的时延并减少了系统的损耗。
本发明实施例提供一种緩存管理设备 500, 如图 5所示, 包括: 第一接收单元 501, 用于接收边缘路由器转发的用户请求报文。 其中, 该用户请求报文包括被请求的资源的 URL, 该用户请求报文 的源地址为发送该用户请求报文的用户的网际协议 IP地址, 该用户请求 报文的目的地址为提供该资源的服务器的 IP地址, 该用户请求报文是在 该边缘路由器确定该用户请求报文符合第一转发规则后转发给该緩存管 理设备的。
另外, 该用户请求报文是在该边缘路由器确定该用户请求报文符合 第一转发规则后转发给该緩存管理设备的。
进一步地, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要 素可以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户 请求报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 如下: IP 地址: 资源服务器的 IP地址、 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) 、 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的 IP地址、 目的端口号为 80 并且传输层协议为 6 ) 时, 则将该用户请求报 文发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
第一确定单元 502, 用于根据预设的策略确定緩存设备。
请求信息发送单元 503,用于在该第一确定单元 502确定该緩存设备 后, 向该緩存设备发送 IP报文。
其中, 该 IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地 址、 该服务器的标识和该资源在该服务器上的本地资源标识。 所述服务 器的标识为所述服务器的域名或所述服务器的 IP地址。 所述资源在所述 服务器上的本地资源标识为 URL中最右侧的 "/" 右边的内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以使用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。
进一步地, 如图 6所示, 该緩存管理设备 500, 还包括:
转发规则生成单元 504,用于当包括该用户请求报文的会话为传输控 制协议 TCP会话时,该緩存管理设备为该边缘路由器生成第二转发规则。
其中, 该第二转发规则的匹配要素包括: 该用户请求报文的目的地 址、 该用户请求报文的目的端口号、 该用户请求报文的传输层协议号、 该用户请求报文的源地址和该用户请求报文的源端口号, 该第二转发规 则对应的转发目的设备为该緩存设备。
其中, 该第二转发规则对应的转发目的设备为该緩存设备指的是, 边缘路由器将匹配该第二转发规则的报文发送到緩存设备, 本实施例中 具体为: 用户在接收到緩存设备发送的资源后, 会向该緩存设备发送响 应信息, 该响应信息在由边缘路由器接收到时, 边缘路由器按照最长匹 配原则选择第二转发规则, 将与该第二转发规则匹配的响应信息根据该 緩存设备的地址信息发送至緩存设备, 这样, 边缘路由器会将用户回复 的响应信息直接发送至緩存设备, 而不需要再经过緩存管理设备, 从而 提高了转发效率。
其中, 该最长匹配原则为边缘路由器查找第一转发规则和第二转发 规则, 并选择匹配元素最多的转发规则, 本实施例中, 由于第二转发规 则的匹配元素包括: 用户请求报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号和用户请求报文 的传输层协议。 用户请求报文的目的地址就是提供用户请求报文所请求 的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号和传输层协议, 因此, 边缘路由器会选择匹 配元素更多的第二转发规则。
规则发送单元 505,用于将该转发规则生成单元生成的第二转发规则 发送给该边缘路由器。
其中, 该第二转发规则包括的匹配要素多于该第一转发规则包括的 匹配要素。
上述实施例提供的緩存管理设备, 通过该緩存管理设备集中管理各 个緩存设备, 并按照统一的原则针对各个边缘路由器选择合适的緩存设 备, 这样, 不仅保证了对緩存设备优选原则的一致性, 同时减少了网络 资源传输的时延并减少了系统的损耗。
本发明实施例提供一种边缘路由器 700, 如图 7所示, 包括: 第二接收单元 701, 用于接收用户发送的用户请求报文。
其中, 该用户请求报文包括该资源的统一资源定位符 URL, 该用户 请求报文的源地址为发送该用户请求报文的用户的网际协议 IP地址, 该 用户请求报文的目的地址为提供该资源的服务器的 IP地址。
第二发送单元 702,用于在确定该用户请求报文与第一转发规则匹配 后, 将该第二接收单元 701接收的该用户请求报文转发给緩存管理设备。 其中, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要素可 以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户请求 报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 例如, IP 地址: 资源服务器的 IP地址、 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) 、 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的 IP地址、 目的端口号为 80 、 传输层协议为 6 ) 时, 则将该用户请求报文 发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
进一步地, 如图 8所示, 该边缘路由器 700, 还包括:
规则接收单元 703,用于当包括该用户请求报文的会话为传输控制协 议 TCP会话时, 该边缘路由设备接收该緩存管理设备发送的第二转发规 则。
其中, 该第二转发规则的匹配要素包括: 该用户请求报文的目的地 址、 该用户请求报文的目的端口号、 该用户请求报文的传输层协议号、 该用户请求报文的源地址和该用户请求报文的源端口号。
规则执行单元 704,用于按照最长匹配原则执行该第一转发规则和第 二转发规则。
其中, 该最长匹配原则为边缘路由器查找第一转发规则和第二转发 规则, 并选择匹配元素最多的转发规则。 本实施例中, 由于第二转发规 则的匹配元素包括: 用户请求报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号和用户请求报文 的传输层协议。 用户请求报文的目的地址就是提供用户请求报文所请求 的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号和传输层协议, 因此, 边缘路由器会选择匹 配元素更多的第二转发规则。 通过采用上述实施例提供的边缘路由器, 不仅保证了对緩存设备优 选原则的一致性, 同时减少了网络资源传输的时延并减少了系统的损耗。
本发明实施例提供一种緩存设备 900, 如图 9所示, 包括:
第三接收单元 901, 用于接收緩存管理设备发送的网际协议 IP报文。 其中, 该 IP报文包括该资源的 URL、 该用户的 IP地址、 提供该资 源的服务器的 IP地址、 该服务器的标识和该资源在该服务器上的本地资 源标识。所述服务器的标识为所述服务器的域名或所述服务器的 I P地址。 所述资源在所述服务器上的本地资源标识为 URL中最右侧的 "/"右边的 内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以是用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。
第三确定单元 902, 用于根据该第三接收单元 901接收的该 IP报文 中的该服务器的标识和该本地资源标识确定该緩存设备是否緩存有该资 源;
第三发送单元 903,用于在该第三确定单元 902确定该緩存设备緩存 有该资源时, 向该用户发送携带该资源的数据报文.
其中, 该数据报文的源地址为该服务器的 IP地址、 目的地址为该用 户的 IP地址。
进一步地, 如图 10所示, 该緩存设备 900, 还包括:
第三请求单元 904,用于在该第三确定单元 902确定所述緩存设备未 緩存有所述资源时, 根据该 URL向该服务器请求该资源。
第三数据报文发送单元 905,用于根据该第三请求单元 904获取到该 资源后, 向该用户发送携带该资源的数据报文。
其中, 该数据报文的源地址为该服务器的 IP地址、 目的地址为该用 户的 IP地址。
采用上述实施例提供的緩存设备, 不仅保证了对緩存设备优选原则 的一致性, 同时减少了网络资源传输的时延并减少了系统的损耗。
需要说明的是, 所属本领域的技术人员可以清楚地了解到, 为描述 的方便和简洁, 上述描述的各个设备的具体工作过程, 可以参考前述方 法实施例中的对应过程, 在此不再赘述。
本发明实施例提供一种用于请求资源的系统, 如图 1 1所示, 包括: 緩存管理设备 1 100、 緩存设备 1 101和边缘路由器 1 102,
该緩存管理设备 1 100,用于接收边缘路由器 1 101转发的用户请求报 文。
其中, 该用户请求报文包括被请求的资源 URL, 该用户请求报文的 源地址为发送该用户请求报文的用户的 IP地址, 该用户请求报文的目的 地址为提供该资源的服务器的 IP地址。
另外, 该用户请求报文是在该边缘路由器确定该用户请求报文符合 第一转发规则后转发给该緩存管理设备的。
进一步地, 若该用户的 IP地址是固定的, 该第一转发规则的匹配要 素可以包括该服务器的 IP地址、 该用户请求报文的目的端口号和该用户 请求报文的传输层协议号。
示例地, 第一转发规则的匹配元素包括服务器的 IP地址、 用户请求 报文的目的端口号和该用户请求报文的传输层协议号, 如下: IP 地址: 资源服务器的 IP地址、 用户请求报文的目的端口号: 80 (即 HTTP协议 的端口号) 、 用户请求报文的传输层协议: 6 (即 TCP协议) , 边缘路由 器接收到用户请求报文, 若该用户请求报文的服务器 IP地址、 目的端口 号和传输层协议与上述设置的第一转发规则一致 (即报文资源服务器的
IP地址、 目的端口号为 80 、 传输层协议为 6 ) 时, 则将该用户请求报文 发送至緩存管理设备。
或者, 若该用户的 IP地址是变化的, 该第一转发规则的匹配要素可 以包括该 URL。 本发明实施例并不局限于此, 其他能够匹配的参数也在 本发明的保护范围内。
该緩存设备 1 101, 用于接收緩存管理设备 1 100发送的网际协议 IP 报文, 并根据该服务器的标识和该本地资源标识确定该緩存设备是否緩 存有该资源, 在该緩存设备确定该緩存设备緩存有该资源时, 则该緩存 设备向该用户发送携带该资源的数据报文, 该数据报文的源地址为该服 务器的 IP地址、 目的地址为该用户的 IP地址。
其中, 该 IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地 址、 该服务器的标识和该资源在该服务器上的本地资源标识。 所述服务 器的标识为所述服务器的域名或所述服务器的 IP地址。 所述资源在所述 服务器上的本地资源标识为 URL中最右侧的 "/" 右边的内容。
举 例 来 说 , 当 IP 报 文 包 括 的 URL 为 http:〃 tv.sohu.com/20120605/n344791935.shtml时, 则所述服务器的标识为 tv.sohu.com , 即域名, 所述资源在该服务器上的本地资源标识为 n344791935.shtml。
当所述服务器的标识为所述服务器的 IP地址时, IP报文包括该 URL、 该用户的 IP地址、 该服务器的 IP地址、 该服务器的标识和该资源在该服 务器上的本地资源标识应当被理解为该 IP报文携带了两个相同的该服务 器的 IP地址, 或者被理解为该 IP报文为了仅携带了一个该服务器的 IP 地址。
该 IP报文实际上是用于为用户请求所述用户请求报文所请求的资源 的, 并且该 IP报文用于指示该緩存设备向该用户发送源地址为该服务器 的 IP地址、 目的地址为该用户的 IP地址并且携带该资源的数据报文。 这 样可以使用户看不到緩存设备的地址信息, 避免暴露緩存设备, 实现了 緩存管理设备及緩存设备对用户的信息透明传输, 同时, 避免了攻击者 对緩存设备的攻击, 保障了信息传输的安全性。 该边缘路由器 1 102, 用于接收用户发送的用户请求报文, 并在确定 该用户请求报文与第一转发规则匹配后, 将该用户请求报文转发给緩存 管理设备 1 100。
进一步地, 该緩存管理设备 1 100, 还用于当包括该用户请求报文的 会话为传输控制协议 TCP会话时, 该緩存管理设备为该边缘路由器生成 第二转发规则。
其中, 在本实施例中, 该第二转发规则的匹配要素包括: 用户请求 报文的源地址、 用户请求报文的源端口号、 用户请求报文的目的地址、 用户请求报文的目的端口号、 用户请求报文的传输层协议。 用户请求报 文的目的地址就是提供用户请求报文所请求的资源的服务器的 IP地址。 第一转发规则的匹配元素的一组可选值为: 服务器 IP地址、 目的端口号 和传输层协议, 因此, 边缘路由器会选择匹配元素更多的第二转发规则。
采用上述实施例提供的系统, 通过緩存管理设备集中管理各个緩存 设备, 并按照统一的原则针对各个边缘路由器选择合适的緩存设备, 这 样, 不仅保证了对緩存设备优选原则的一致性, 同时减少了网络资源传 输的时延并减少了系统的损耗。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不 局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本 发明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种用于请求资源的方法, 其特征在于, 包括:
緩存管理设备接收边缘路由器转发的用户请求报文, 其中, 所述用 户请求报文包括被请求的资源的统一资源定位符 URL, 所述用户请求报 文的源地址为发送所述用户请求报文的用户的网际协议 IP地址, 所述用 户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述用户请 求报文是在所述边缘路由器确定所述用户请求报文符合第一转发规则后 转发给所述緩存管理设备的;
所述緩存管理设备根据预设的策略确定緩存设备;
所述緩存管理设备向所述緩存设备发送 IP报文,所述 IP报文包括所 述 URL、 所述用户的 IP地址、 所述服务器的 IP地址、 所述服务器的标 识和所述资源在所述服务器上的本地资源标识。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 当包括所述用户请求报文的会话为传输控制协议 TCP会话时, 所述 緩存管理设备为所述边缘路由器生成第二转发规则, 所述第二转发规则 的匹配要素包括: 所述用户请求报文的目的地址、 所述用户请求报文的 目的端口号、 所述用户请求报文的传输层协议号、 所述用户请求报文的 源地址和所述用户请求报文的源端口号, 所述第二转发规则对应的转发 目的设备为所述緩存设备;
所述緩存管理设备将所述第二转发规则发送给所述边缘路由器, 其 中, 所述第二转发规则包括的匹配要素多于所述第一转发规则包括的匹 配要素。
3、 根据权利要求 1或 2所述的方法, 其特征在于,
所述第一转发规则的匹配要素包括所述服务器的 IP地址、 所述用户 请求报文的目的端口号和所述用户请求报文的传输层协议号; 或者, 所 述第一转发规则的匹配要素包括所述 URL。
4、 一种用于请求资源的方法, 其特征在于, 包括:
边缘路由器接收用户发送的用户请求报文;
所述边缘路由器在确定所述用户请求报文与第一转发规则匹配后, 将所述用户请求报文转发给緩存管理设备, 其中, 所述用户请求报文包 括所述资源的统一资源定位符 URL, 所述用户请求报文的源地址为发送 所述用户请求报文的用户的网际协议 IP地址, 所述用户请求报文的目的 地址为提供所述资源的服务器的 IP地址。
5、 根据权利要求 4所述的方法, 其特征在于, 所述方法还包括: 当包括所述用户请求报文的会话为传输控制协议 TCP会话时, 所述 边缘路由设备接收所述緩存管理设备发送的第二转发规则, 所述第二转 发规则的匹配要素包括所述用户请求报文的目的地址、 所述用户请求报 文的目的端口号、 所述用户请求报文的传输层协议号、 所述用户请求报 文的源地址和所述用户请求报文的源端口号, 所述第二转发规则对应的 转发目的设备为所述緩存管理设备, 所述第二转发规则包括的匹配要素 多于所述第一转发规则包括的匹配要素;
所述边缘路由器按照最长匹配原贝 'J执行所述第一转发规则和第二转 发规则。
6、 一种向用户发送资源的方法, 其特征在于, 包括:
緩存设备接收緩存管理设备发送的网际协议 IP报文,所述 IP报文包 括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源 的服务器的 IP地址、 所述服务器的标识和所述资源在所述服务器上的本 地资源标识;
所述緩存设备根据所述服务器的标识和所述本地资源标识确定所述 緩存设备是否緩存有所述资源;
在所述緩存设备根据所述服务器的标识和所述本地资源标识确定所 述緩存设备緩存有所述资源时, 则所述緩存设备向所述用户发送携带所 述资源的数据报文, 所述数据报文的源地址为所述服务器的 IP地址, 目 的地址为所述用户的 IP地址。
7、 根据权利要求 6所述的方法, 其特征在于, 还包括:
在所述緩存设备根据所述服务器的标识和所述本地资源标识确定所 述緩存设备未緩存有所述资源时, 则所述緩存设备根据所述 URL向所述 服务器请求所述资源;
所述緩存设备在从所述服务器获取到所述资源后, 向所述用户发送 携带所述资源的数据报文, 所述数据报文的源地址为所述服务器的 IP地 址和目的地址为所述用户的 IP地址。
8、 一种緩存管理设备, 其特征在于, 包括:
第一接收单元, 用于接收边缘路由器转发的用户请求报文, 其中, 所述用户请求报文包括被请求的资源的统一资源定位符 URL, 所述用户 请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP地址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述 用户请求报文是在所述边缘路由器确定所述用户请求报文符合第一转发 规则后转发给所述緩存管理设备的;
第一确定单元, 用于根据预设的策略确定緩存设备;
请求信息发送单元, 用于在所述第一确定单元确定所述緩存设备后, 向所述緩存设备发送 IP报文, 所述 IP报文包括所述 URL、 所述用户的 IP地址、 所述服务器的 IP地址、 所述服务器的标识和所述资源在所述服 务器上的本地资源标识。
9、 根据权利要求 8所述的设备, 其特征在于, 还包括:
转发规则生成单元, 用于当包括所述用户请求报文的会话为传输控 制协议 TCP会话时, 所述緩存管理设备为所述边缘路由器生成第二转发 规则, 所述第二转发规则的匹配要素包括: 所述用户请求报文的目的地 址、 所述用户请求报文的目的端口号、 所述用户请求报文的传输层协议 号、 所述用户请求报文的源地址和所述用户请求报文的源端口号, 所述 第二转发规则对应的转发目的设备为所述緩存设备;
规则发送单元, 用于将所述转发规则生成单元生成的第二转发规则 发送给所述边缘路由器, 其中, 所述第二转发规则包括的匹配要素多于 所述第一转发规则包括的匹配要素。
10、 根据权利要求 8或 9所述的设备, 其特征在于, 所述第一转发 规则的匹配要素包括所述服务器的 IP地址、 所述用户请求报文的目的端 口号和所述用户请求报文的传输层协议号; 或者, 所述第一转发规则的 匹配要素包括所述 URL。
1 1、 一种边缘路由器, 其特征在于, 包括:
第二接收单元, 用于接收用户发送的用户请求报文;
第二发送单元, 用于在确定所述用户请求报文与第一转发规则匹配 后, 将所述第二接收单元接收的所述用户请求报文转发给緩存管理设备, 其中, 所述用户请求报文包括所述资源的统一资源定位符 URL, 所述用 户请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP 地 址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址。
12、 根据权利要求 1 1所述的设备, 其特征在于, 还包括: 规则接收单元, 用于当包括所述用户请求报文的会话为传输控制协 议 TCP会话时, 所述边缘路由设备接收所述緩存管理设备发送的第二转 发规则, 所述第二转发规则的匹配要素包括所述用户请求报文的目的地 址、 所述用户请求报文的目的端口号、 所述用户请求报文的传输层协议 号、 所述用户请求报文的源地址和所述用户请求报文的源端口号, 所述 第二转发规则对应的转发目的设备为所述緩存管理设备, 所述第二转发 规则包括的匹配要素多于所述第一转发规则包括的匹配要素;
规则执行单元, 用于按照最长匹配原则执行所述第一转发规则和第 二转发规则。
13、 一种緩存设备, 其特征在于, 包括:
第三接收单元, 用于接收緩存管理设备发送的网际协议 IP报文, 所 述 IP报文包括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源的服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识;
第三确定单元, 用于根据所述第三接收单元接收的所述 IP报文中的 所述服务器的标识和所述本地资源标识确定所述緩存设备是否緩存有所 述资源;
第三发送单元, 用于在所述第三确定单元确定所述緩存设备緩存有 所述资源时, 向所述用户发送携带所述资源的数据报文, 所述数据报文 的源地址为所述良务器的 IP地址, 目的地址为所述用户的 IP地址。
14、 根据权利要求 13所述的设备, 其特征在于, 还包括:
第三请求单元, 用于在所述第三确定单元确定所述緩存设备未緩存 有所述资源时, 根据所述 URL向所述服务器请求所述资源;
第三数据报文发送单元, 用于根据所述第三请求单元获取到所述资 源后, 向所述用户发送携带所述资源的数据报文, 所述数据报文的源地 址为所述服务器的 IP地址, 目的地址为所述用户的 IP地址。
15、 一种用于请求资源的系统, 其特征在于, 包括: 緩存管理设备、 緩存设备和边缘路由器,
所述緩存管理设备, 用于接收边缘路由器转发的用户请求报文, 其 中, 所述用户请求报文包括被请求的资源的统一资源定位符 URL, 所述 用户请求报文的源地址为发送所述用户请求报文的用户的网际协议 IP地 址, 所述用户请求报文的目的地址为提供所述资源的服务器的 IP地址, 所述用户请求报文是在所述边缘路由器确定所述用户请求报文符合第一 转发规则后转发给所述緩存管理设备的, 根据预设的策略确定緩存设备, 并向所述緩存设备发送 IP报文, 所述 IP报文包括所述 URL、 所述用户 的 IP地址、 所述服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识;
所述緩存设备, 用于接收緩存管理设备发送的网际协议 IP报文, 所 述 IP报文包括所述资源的统一资源定位符 URL、 所述用户的 IP地址、 提供所述资源的服务器的 IP地址、 所述服务器的标识和所述资源在所述 服务器上的本地资源标识, 根据所述服务器的标识和所述本地资源标识 确定所述緩存设备是否緩存有所述资源, 在所述緩存设备确定所述緩存 设备緩存有所述资源时, 则所述緩存设备向所述用户发送携带所述资源 的数据报文, 所述数据报文的源地址为所述服务器的 IP地址, 目的地址 为所述用户的 IP地址;
所述边缘路由器, 用于接收用户发送的用户请求报文, 并在确定所 述用户请求报文与第一转发规则匹配后, 将所述用户请求报文转发给緩 存管理设备。
16、 根据权利要求 15所述的系统, 其特征在于,
所述緩存管理设备还用于当包括所述用户请求报文的会话为传输控 制协议 TCP会话时, 所述緩存管理设备为所述边缘路由器生成第二转发 规则, 所述第二转发规则的匹配要素包括: 所述用户请求报文的目的地 址、 所述用户请求报文的目的端口号、 所述用户请求报文的传输层协议 号、 所述用户请求报文的源地址和所述用户请求报文的源端口号, 所述 第二转发规则对应的转发目的设备为所述緩存设备, 并将所述第二转发 规则发送给所述边缘路由器, 其中, 所述第二转发规则包括的匹配要素 多于所述第一转发规则包括的匹配要素。
PCT/CN2013/076687 2012-06-07 2013-06-04 一种用于请求资源的方法、设备及系统 WO2013182030A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210186516.0 2012-06-07
CN201210186516.0A CN103475626B (zh) 2012-06-07 2012-06-07 一种用于请求资源的方法、设备及系统

Publications (1)

Publication Number Publication Date
WO2013182030A1 true WO2013182030A1 (zh) 2013-12-12

Family

ID=49711364

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/076687 WO2013182030A1 (zh) 2012-06-07 2013-06-04 一种用于请求资源的方法、设备及系统

Country Status (2)

Country Link
CN (1) CN103475626B (zh)
WO (1) WO2013182030A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337808A (zh) * 2015-11-30 2016-02-17 网宿科技股份有限公司 数据传输的方法、装置及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888228A (zh) * 2015-12-15 2017-06-23 中国电信股份有限公司 用于内容加速的方法、会话控制器和系统
CN107370690B (zh) * 2016-05-13 2020-05-12 中国移动通信有限公司研究院 一种业务内容的传输方法、终端及网络侧设备
CN108023900B (zh) * 2016-10-31 2020-11-27 中国电信股份有限公司 透明缓存的实现方法以及系统
CN111835642B (zh) * 2019-04-19 2022-07-29 华为技术有限公司 业务处理方法及网络设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587928B1 (en) * 2000-02-28 2003-07-01 Blue Coat Systems, Inc. Scheme for segregating cacheable and non-cacheable by port designation
CN1946026A (zh) * 2006-10-20 2007-04-11 清华大学 基于移动存储设备的互联网络数据主动获取方法
CN101282281A (zh) * 2007-04-03 2008-10-08 华为技术有限公司 一种媒体分发系统、装置及流媒体播放方法
CN102130778A (zh) * 2010-10-22 2011-07-20 华为技术有限公司 一种iptv组播业务保护方法及系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805355A (zh) * 2006-01-16 2006-07-19 北京北方烽火科技有限公司 在移动流媒体系统多点组网中实现服务定向的方法
CN101242422B (zh) * 2007-02-06 2011-01-26 中国电信股份有限公司 适应多业务融合的内容分发网络系统和方法
CN101222424B (zh) * 2007-12-24 2011-02-09 中国电信股份有限公司 内容分发网络和该网络中基于内容的调度方法
CN101247367B (zh) * 2008-04-08 2011-03-23 中国电信股份有限公司 基于内容分发网络和对等网络的内容提供方法和系统
CN101431532A (zh) * 2008-12-15 2009-05-13 中国电信股份有限公司 一种内容路由方法、负载均衡设备和资源管理设备
US8204060B2 (en) * 2009-01-30 2012-06-19 Palo Alto Research Center Incorporated Method and system for facilitating forwarding a packet in a content-centric network
US8160015B2 (en) * 2009-10-27 2012-04-17 Qualcomm Incorporated Systems and methods for measuring and reducing latency of radio link flows
CN101789904A (zh) * 2010-02-04 2010-07-28 杭州华三通信技术有限公司 流量控制的方法及设备
CN101984637B (zh) * 2010-11-02 2014-06-11 中兴通讯股份有限公司 内容分发实现方法及系统
CN102291447B (zh) * 2011-08-05 2016-04-06 中国电信股份有限公司 内容分发网络负载调度方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587928B1 (en) * 2000-02-28 2003-07-01 Blue Coat Systems, Inc. Scheme for segregating cacheable and non-cacheable by port designation
CN1946026A (zh) * 2006-10-20 2007-04-11 清华大学 基于移动存储设备的互联网络数据主动获取方法
CN101282281A (zh) * 2007-04-03 2008-10-08 华为技术有限公司 一种媒体分发系统、装置及流媒体播放方法
CN102130778A (zh) * 2010-10-22 2011-07-20 华为技术有限公司 一种iptv组播业务保护方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337808A (zh) * 2015-11-30 2016-02-17 网宿科技股份有限公司 数据传输的方法、装置及系统
CN105337808B (zh) * 2015-11-30 2019-01-04 网宿科技股份有限公司 数据传输的方法、装置及系统

Also Published As

Publication number Publication date
CN103475626B (zh) 2017-03-08
CN103475626A (zh) 2013-12-25

Similar Documents

Publication Publication Date Title
Kutscher et al. Information-centric networking (ICN) research challenges
Detti et al. CONET: a content centric inter-networking architecture
EP3080973B1 (en) Proxy interception
JP6008467B2 (ja) コンテンツセントリックネットワーク上のセッションマイグレーション
US11882199B2 (en) Virtual private network (VPN) whose traffic is intelligently routed
WO2014019516A1 (zh) 一种报文转发的方法和设备
EP3032859B1 (en) Access control method and system, and access point
JP6395867B2 (ja) OpenFlow通信方法及びシステム、制御部、並びにサービスゲートウェイ
US20220045934A1 (en) Method and apparatus of automatic route optimization in a private virtual network for client devices of a local network
US20040179537A1 (en) Method and apparatus providing a mobile server function in a wireless communications device
CA2807793A1 (en) Load balancing and session persistence in packet networks
WO2008077299A1 (fr) Redirecteur, relais et système de configuration d'informations de routage et procédé de mise à jour
JP2006086800A (ja) ソースアドレスを選択する通信装置
WO2011137809A1 (zh) 一种内容分发网络中实现超文本传输协议重定向的方法、装置及系统
WO2014194580A1 (zh) 浏览器重定向方法及装置
WO2009012670A1 (fr) Procédé, dispositif et système permettant d'enregistrer un nouveau membre de groupe lors d'une gestion de clé multidiffusion
WO2013182030A1 (zh) 一种用于请求资源的方法、设备及系统
JP2012502544A (ja) IPv6ネットワーク内ホスト遮断及び探索方法
EP2938046A1 (en) Method for providing content to communication equipment via a mobile backhaul with an information-centric network (ICN) deployed as an overlay over IP and in-network caches
JP2016541048A (ja) サービスプロキシを使用してデータを転送する方法、デバイスおよびシステム
JP2019536355A (ja) ノードタイプに基づくデータストリーミングの支援制御
WO2014075485A1 (zh) 网络地址转换技术的处理方法、nat设备及bng设备
JP2011180820A (ja) データ転送管理装置、データ転送管理方法およびデータ転送管理プログラム
WO2012171315A1 (zh) 一种无线网络控制器分组域内容缓存系统及其实现方法
WO2012109867A1 (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: 13801390

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13801390

Country of ref document: EP

Kind code of ref document: A1