CN106941507B - Request message scheduling method and device - Google Patents

Request message scheduling method and device Download PDF

Info

Publication number
CN106941507B
CN106941507B CN201610005842.5A CN201610005842A CN106941507B CN 106941507 B CN106941507 B CN 106941507B CN 201610005842 A CN201610005842 A CN 201610005842A CN 106941507 B CN106941507 B CN 106941507B
Authority
CN
China
Prior art keywords
cache server
cdn cache
area network
local area
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610005842.5A
Other languages
Chinese (zh)
Other versions
CN106941507A (en
Inventor
丁向军
姚敏
董红
刘学源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610005842.5A priority Critical patent/CN106941507B/en
Publication of CN106941507A publication Critical patent/CN106941507A/en
Application granted granted Critical
Publication of CN106941507B publication Critical patent/CN106941507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Abstract

The invention provides a method and a device for scheduling request messages. Wherein, the method comprises the following steps: receiving a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network; acquiring a router address of a router for sending a scheduling request; and searching a local area network where the terminal is located according to the router address, scheduling a CDN cache server from the CDN cache server located in the local area network as a target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server. The invention solves the problem that the time delay for the terminal to acquire the resources is longer because the global load balancing GSLB device dispatches the resources in the wide area network server to the terminal in the local area network in the related technology.

Description

Request message scheduling method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for scheduling a request message.
Background
The Content Delivery Network (CDN) aims to add a set of Cache devices at a backbone Network entry, Cache Content obtained by a user from an internet server into the Cache of the set of devices, and enable subsequent users to access the same resources and to obtain the Content directly from the Cache of the Cache device without obtaining the Content from a source station. Therefore, the conditions of small bandwidth, network congestion and congestion of the gateway can be solved, and the response speed of the user for accessing the resources is improved. This is very useful for users and operators with bad network conditions, enhancing the user experience.
The current Global Load Balance (GSLB) device redirection system implements traffic allocation between servers in different regions on a wide area network (including the internet), and ensures that the best Server is used to serve the nearest client, thereby ensuring the access quality.
However, the global load balancing GSLB device and the CDN cache system are generally in the same wide area network, and are characterized in that the availability of a server can be determined by determining the load of the server, including data such as CPU occupancy and bandwidth occupancy, and at the same time, the link status between a user (visitor) and the server can be determined, and the server with the best link status is selected. Therefore, the global load balancing GSLB determines which server provides service by comprehensively judging the servers and the links, so as to guarantee the service quality of the remote server group, and basically realize the scheduling between the global load balancing GSLB and the servers in the wide area network.
Therefore, the scheduling condition between the global load balancing GSLB in the wide area network and the wide area network server is mainly realized in the related technology, and the server does not extend deeply into the local area network.
Aiming at the problem that in the related technology, the time delay for the terminal to acquire the resources is large because the global load balancing GSLB device schedules the resources in the wide area network server to the terminal in the local area network, an effective solution is not provided.
Disclosure of Invention
The invention provides a scheduling method and a scheduling device of a request message, which are used for at least solving the problem that in the related art, the time delay for a terminal to acquire resources is large because a global load balancing GSLB device schedules the resources in a wide area network server to the terminal in a local area network.
According to an aspect of the present invention, there is provided a method for scheduling a request message, including: receiving a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network; acquiring a router address of the router for sending the scheduling request; and searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server.
Optionally, before the receiving the scheduling request sent by the terminal through the router, the method further includes: receiving a registration request sent by the CDN cache server positioned in the local area network; storing information carrying one of the following relations in the registration request: a first mapping relationship between the router address and a local area network address segment of the local area network; a second mapping relationship among the router address, the local area network address segment, and a server address of the CDN cache server; and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
Optionally, when the registration request carries information indicating the first mapping relationship, the searching for the local area network where the terminal is located according to the router address includes: searching the local area network address segment having the first mapping relation with the router address; scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server from the CDN cache servers with server addresses located in the local area network address section to serve as the target CDN cache server.
Optionally, when the registration request carries information indicating the second mapping relationship, the searching for the local area network where the terminal is located according to the router address includes: searching the local area network address segment having the second mapping relation with the router address and the server address of the CDN cache server; scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server from the CDN cache servers with server addresses located in the local area network address section to serve as the target CDN cache server.
Optionally, when the registration request carries information indicating the third mapping relationship, the searching for the local area network where the terminal is located according to the router address includes: searching the local area network address segment having the third mapping relation with the router address and the state information of the CDN cache server; scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server of which the state information meets the preset condition from the CDN cache server of which the server address is positioned in the local area network address segment as the target CDN cache server.
Optionally, after sending the server address of the target CDN cache server to the terminal, the method further includes: judging whether the target CDN cache server contains the content accessed by the terminal; under the condition that the target CDN cache server is judged to contain the content accessed by the terminal, the content accessed by the terminal is sent to the terminal; under the condition that the target CDN cache server does not contain the content accessed by the terminal, sending a redirection request to a Global Server Load Balancing (GSLB) to obtain an address of an origin server containing the content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
Optionally, after receiving the registration request sent by the CDN cache server located in the local area network, the method further includes: after the register is successful, receiving a state updating message sent by the CDN cache server; when the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship; and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
Optionally, the scheduling, from the CDN cache server whose server address is located in the local network address segment, the one CDN cache server whose state information satisfies the predetermined condition as the target CDN cache server includes: judging whether the load of the CDN cache server positioned in the local area network address segment is smaller than a preset threshold value or not; if the load is smaller than the preset threshold value, taking the CDN cache server as the target CDN cache server; wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a CDN cache server Central Processing Unit (CPU) utilization rate, a CDN cache server storage utilization rate, a CDN cache server resource request bandwidth from a public network server and a CDN cache server service bandwidth.
According to another aspect of the present invention, there is provided a scheduling apparatus of a request message, including: the terminal comprises a first receiving module, a first sending module and a second receiving module, wherein the first receiving module is used for receiving a scheduling request sent by a terminal through a router, the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network; an obtaining module, configured to obtain a router address of the router used for sending the scheduling request; and the scheduling module is used for searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server.
Optionally, the apparatus further comprises: a second receiving module, configured to receive, before the scheduling request sent by the receiving terminal through a router, a registration request sent by the CDN cache server located in the local area network; a storage module, configured to store that the registration request carries information indicating one of the following relationships: a first mapping relationship between the router address and a local area network address segment of the local area network; a second mapping relationship among the router address, the local area network address segment, and a server address of the CDN cache server; and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
Optionally, the scheduling module includes: a first searching unit, configured to search, when the registration request carries information indicating the first mapping relationship, the local area network address segment having the first mapping relationship with the router address; and the first scheduling unit is used for scheduling the CDN cache server as the target CDN cache server from the CDN cache servers with server addresses located in the local area network address segment.
Optionally, the scheduling module further includes: a second searching unit, configured to search, when the registration request carries information indicating the second mapping relationship, the local area network address segment having the second mapping relationship with the router address and the server address of the CDN cache server; and the second scheduling unit is used for scheduling the CDN cache server as the target CDN cache server from the CDN cache servers with server addresses located in the local area network address segment.
Optionally, the scheduling module further includes: a third searching unit, configured to search, when the registration request carries information indicating the third mapping relationship, the local area network address segment having the third mapping relationship with the router address and the state information of the CDN cache server; and the third scheduling unit is used for scheduling the CDN cache server of which the state information meets the preset condition from the CDN cache server of which the server address is positioned in the local area network address segment as the target CDN cache server.
Optionally, the apparatus further comprises: the judging module is used for judging whether the target CDN cache server contains the content accessed by the terminal after the server address of the target CDN cache server is issued to the terminal; a sending module, configured to send the content accessed by the terminal to the terminal when it is determined that the target CDN cache server contains the content accessed by the terminal; the processing module is used for sending a redirection request to a Global Server Load Balancing (GSLB) to acquire an address of an origin server containing the content accessed by the terminal under the condition that the target CDN cache server does not contain the content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
Optionally, the apparatus further comprises: a third receiving module, configured to receive, after receiving the registration request sent by the CDN cache server located in the local area network and after successful registration, a state update message sent by the CDN cache server; when the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship; and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
Optionally, the third scheduling unit includes: the judging subunit is configured to judge whether a load of the CDN cache server located in the local area network address segment is smaller than a preset threshold; a setting subunit, configured to use the CDN cache server as the target CDN cache server when the load is smaller than the preset threshold; wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a CDN cache server Central Processing Unit (CPU) utilization rate, a CDN cache server storage utilization rate, a CDN cache server resource request bandwidth from a public network server and a CDN cache server service bandwidth.
According to the invention, a scheduling request sent by a receiving terminal through a router is adopted, wherein the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network; acquiring the router address of the router for sending the scheduling request; and searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from the CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server. That is to say, the present invention searches for the local area network where the terminal is located according to the router address connected between the wide area network and the local area network, and schedules a CDN cache server from the CDN cache server located in the local area network as the target CDN cache server, thereby implementing scheduling of the CDN cache server in the local area network by the wide area network, solving the problem of a relatively large time delay for acquiring resources by the terminal due to the global load balancing GSLB device scheduling resources in the wide area network server to the terminal located in the local area network in the related art, and further achieving an effect of shortening the time delay for acquiring resources by the terminal.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a scheduling method of a request message according to an embodiment of the present invention;
fig. 2 is a system block diagram of a wide area network GSLB for scheduling local area networks CDNs according to an embodiment of the present invention;
fig. 3 is a message diagram of local area network CDN registering with wide area network GSLB in an embodiment of the present invention;
FIG. 4 is a diagram of address one-to-one translation mapping according to an embodiment of the present invention;
FIG. 5 is a map of an address one-to-many translation according to an embodiment of the present invention;
FIG. 6 is a local area network CDN performance statistics data reporting diagram according to an embodiment of the present invention;
FIG. 7 is a flowchart of OTT service in WAN and LAN scenarios according to an embodiment of the present invention;
FIG. 8 is a block diagram of a local area network user request scheduling message flow according to an embodiment of the present invention;
fig. 9 is a block diagram of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 10 is a block diagram (one) of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 11 is a block diagram (ii) of the structure of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 12 is a block diagram (iii) of the structure of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 13 is a block diagram (iv) of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 14 is a block diagram (v) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 15 is a block diagram (six) of the structure of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 16 is a block diagram (seventh) of the structure of a scheduling apparatus of a request message according to an embodiment of the present invention;
fig. 17 is a schematic composition diagram of a wide area network and local area network scheduling control apparatus in an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In this embodiment, a method for scheduling a request message is provided, and fig. 1 is a flowchart of a method for scheduling a request message according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, receiving a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network;
step S104, obtaining the router address of the router used for sending the scheduling request;
step S106, searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from the CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server.
Optionally, in this embodiment, application scenarios of the scheduling method for the request message include, but are not limited to: under the condition that the wide area internal public global load balancing system GSLB and the CDN cache system in the local area network are separated from the internal network and the external network.
An application scenario of the scheduling method for the request message in this embodiment is described in detail below with reference to fig. 2. The wide area network is a public network, the local area network is a private network, and the router is a general network device router. As shown in fig. 2, the system includes a common global load balancing GSLB device, a general network device router, an intelligent terminal (Smart phone, PC, Android STB, PAD, etc.), a CDN cache system, a home CDN network manager, a SERVICE (SERVICE) node or a repository, etc.
The global load balancing GSLB device is responsible for reasonably deciding and scheduling the user request, finding the optimal CDN cache server to serve the user request, and the GSLB can manage the CDN cache servers in a plurality of private networks/local area networks.
The general network equipment router is network equipment which can complete the function of encapsulating and forwarding data frames based on MAC address identification. The switch may "learn" the MAC address and store it in an internal address table to allow the data frame to reach the destination address directly from the source address by establishing a temporary switching path between the originator and the target recipient of the data frame.
The general network equipment router is responsible for isolating a private network and a public network at the upper level of the private network, and can translate data information between different networks or network segments so that the different networks or network segments can mutually read the data of each other, thereby forming a larger network.
The smart terminal is generally a common embedded or computer device, such as a personal computer, a smart phone, an android set top box, a PAD, and other embedded computer system devices capable of performing internet activities.
CDN cache servers, also referred to as proxy caches, may be located at the edge of the network, at the "last kilometer" from the user. Meanwhile, the cache system is a mirror image point of the original content server of the content provider. Such an architecture enables CDN service providers to offer the best possible service experience on behalf of content providers to end users who cannot tolerate any delay in request response time.
A SERVICE (SERVICE) node or resource pool is generally an upper CDN node (regional cache or central cache) or an original content server provided on a content provider, where the server has specific content resources that it is responsible for delivering.
In the application scenario, a global load balancing GSLB device in a wide area network receives a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting to schedule a target content delivery network CDN cache server located in a local area network for the terminal, and the router is connected between the wide area network and the local area network; acquiring the router address of the router for sending the scheduling request; and searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from the CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server. That is to say, in this embodiment, a local area network where a terminal is located is searched according to a router address connected between a wide area network and a local area network, and a CDN cache server is scheduled from a CDN cache server located in the local area network as a target CDN cache server, so that scheduling of the CDN cache server in the local area network by the wide area network is implemented, a problem that resource acquisition delay of the terminal is large because a global load balancing GSLB device schedules resources in the wide area network server to the terminal located in the local area network in the related art is solved, and an effect of shortening resource acquisition delay of the terminal is achieved.
Optionally, in this embodiment, the terminal involved in the above steps may be, but is not limited to: a PC, a PAD smart phone, or a smart set-top box, without limitation.
In an optional embodiment, before receiving the scheduling request sent by the terminal through the router, the method further includes the following steps:
step S11, receiving a registration request sent by a CDN cache server located within the local area network;
step S12, storing that the registration request carries information indicating one of the following relationships: a first mapping relationship between the router address and a local area network address segment of the local area network; a second mapping relationship among the router address, the local area network address segment and the server address of the CDN cache server; and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
It should be noted that, in this embodiment, the first mapping relationship between the router address and the local area network address segment of the local area network includes, but is not limited to: a one-to-one mapping relationship; the second mapping relationship between the router address, the local area network address segment and the server address of the CDN cache server includes, but is not limited to: one-to-one or one-to-many mapping relations, specifically, a one-to-one mapping relation exists between a router address and a local area network address segment, and a one-to-one or one-to-many mapping relation exists between the local area network address segment and a CDN cache server; the third mapping relationship between the router address, the local area network address segment and the state information of the CDN cache server includes, but is not limited to: the router address and the local area network address segment are in one-to-one mapping relation, and the local area network address segment and the state information of the CDN cache server are in one-to-many mapping relation.
Through the steps, before the request message sent by the scheduling terminal, the registration request sent by the CDN cache server in the local area network is received as the basis of the wide area network GSLB for scheduling the CDN cache server in the local area network address section for the terminal, and the effect that the GSLB can accurately schedule the request to the CDN cache system of the corresponding local area network and the CDN cache system of the corresponding local area network services the terminal request is further realized.
In an optional embodiment, when the registration request carries information indicating the first mapping relationship, searching the local area network where the terminal is located according to the router address includes the following steps:
step S21, finding the lan address segment having the first mapping relation with the router address;
the method for dispatching a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server comprises the following steps:
step S22, the CDN cache server is scheduled from the CDN cache server whose server address is located in the local area network address segment as the target CDN cache server.
Optionally, in this embodiment, the local area network address segment is looked up through a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server is dispatched from the CDN cache server with the server address positioned in the local area network address segment as the target CDN cache server, or a CDN cache server is further found as the target CDN cache server by combining the mapping relation between the local area network address segment and the CDN cache server, or a CDN cache server is found as the target CDN cache server by combining the state information of the local area network address segment and the CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
Through the steps, the local area network address segment having the first mapping relation with the router address is searched, and the effect that the request can be accurately dispatched to the CDN cache system of the corresponding local area network and the CDN cache system of the corresponding local area network serves the terminal request is further achieved.
In an optional embodiment, when the registration request carries information indicating the second mapping relationship, searching the local area network where the terminal is located according to the router address includes:
step S31, searching the local area network address segment having the second mapping relationship with the router address and the server address of the CDN cache server;
the method for dispatching a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server comprises the following steps:
step S32, the CDN cache server is scheduled from the CDN cache server whose server address is located in the local area network address segment as the target CDN cache server.
Optionally, in this embodiment, the target CDN cache server is searched for serving the terminal through a second mapping relationship between the router address, the local area network address segment, and the server address of the CDN cache server, or the local area network address segment is searched according to a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server with the server address positioned in the local area network address segment is dispatched as the target CDN cache server, or, the router address, the local area network address segment and the state information of the CDN cache server look up a CDN cache server as the target CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
Through the steps, the local area network address segment having the second mapping relation with the router address and the server address of the CDN cache server are searched, the request is more accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
In an optional manner, when the registration request carries information indicating the third mapping relationship, the searching for the local area network where the terminal is located according to the router address includes:
step S41, searching the local area network address segment having the third mapping relationship with the router address and the state information of the CDN cache server;
the method for dispatching a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server comprises the following steps:
step S42, the CDN cache server whose state information meets the predetermined condition is scheduled from the CDN cache server whose server address is located in the local area network address segment as the target CDN cache server.
Optionally, in this embodiment, the target CDN cache server is searched for serving the terminal through a third mapping relationship between the router address, the local area network address segment, and the state information of the CDN cache server, or the local area network address segment is searched according to a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server with the server address positioned in the local area network address segment is dispatched as the target CDN cache server, or, a second mapping relation between the router address, the local area network address segment and the server address of the CDN cache server finds a CDN cache server as the target CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
Through the steps, the third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server is used for realizing the effect of more accurately dispatching the request to the CDN cache system of the corresponding local area network and serving the terminal request by the CDN cache system of the corresponding local area network.
The present embodiment will be described below with reference to specific examples.
The embodiment of the invention provides a method for realizing scheduling between an internal and external network-based global load balancing system and a private network cache system, which comprises the following steps:
step S51, after the local area network CDN is powered on, the information of the CDN needs to be reported to the GSLB for registration. The registration message includes a corresponding relationship between the CDN lan/lan address and the wan address of the router, and a status of the router. GSLB will save the mapping for later use.
Step S52, after the registration is successful, the CDN sends a heartbeat message to the GSLB for reporting, and if the CDN is abnormal, the GSLB updates the state of the CDN to control the scheduling.
Step S53, the local area network CDN may perform quasi-real-time statistical reporting on the heartbeat and the system data (cpu utilization, storage utilization, source return bandwidth, service bandwidth, etc.) to the GSLB according to its own operating state, so as to subsequently monitor the operating condition of the system.
Step S54, the personal PC or the intelligent terminal sends an http scheduling request to the GSLB; after receiving the request, the GSLB queries the mapping relation of the registration message ip according to the source ip (the wide area network ip of the router) of the request to find the local area network/local area network address of the CDN; the message is answered 302 to the intelligent terminal, wherein the location is the local area network/local area network address information including the CDN.
Step S55, the personal PC or the intelligent terminal sends a link establishment request to the local area network/CDN according to the location responded by 302; if the local area network/local area network CDN has the content, directly serving the user; otherwise, the HomeCDN returns the source to a service node of the wide area network, pulls down the content and serves the user while caching the content.
In an optional manner, after the server address of the target CDN cache server is delivered to the terminal, the method further includes the following steps:
step S61, determining whether the target CDN cache server contains content accessed by the terminal;
step S62, sending the content accessed by the terminal to the terminal when it is determined that the target CDN cache server contains the content accessed by the terminal;
step S63, sending a redirection request to the global server load balancing GSLB to obtain an address of an origin server containing content accessed by the terminal, when it is determined that the target CDN cache server does not contain content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
Optionally, in this embodiment, when it is determined that the target CDN cache server includes the content accessed by the terminal, the content accessed by the terminal is directly sent to the terminal; and under the condition that the target CDN cache server does not contain the content accessed by the terminal, sending a redirection request to a Global Server Load Balancing (GSLB) to acquire the address of an origin server containing the content accessed by the terminal, and acquiring the content accessed by the terminal from the origin server indicated by the address of the origin server.
It should be noted that, in this embodiment, when it is determined that the target CDN cache server does not include the content accessed by the terminal, the redirection request is sent to the global server load balancing GSLB to obtain another target CDN cache server that includes the content accessed by the terminal, without obtaining the content accessed by the terminal from the origin server indicated by the address of the origin server.
Through the steps, under the condition that the target CDN cache server does not contain the content accessed by the terminal, the content accessed by the terminal is obtained from the source server containing the content accessed by the terminal, and the effect that the terminal can efficiently and quickly obtain network resources in a local area network is further achieved.
In an optional manner, after receiving a registration request sent by a CDN cache server located within the local area network, the method further includes the following steps:
step S71, after the registration is successful, receiving a status update message sent by the CDN cache server; if the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship;
and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
Next, the above step S71 will be described by way of example with reference to specific examples.
For example, the embodiment of the global load balancing registration message from the local area network CDN to the public network GSLB: the local area network (i.e., private network) CDN actively sends a registration message to the GSLB when the power is turned on and restarted according to the configured address information of the GSLB, where the registration message at least contains a local area network address segment of the local area network CDN, and the local area network CDN continues to send keep-alive heartbeat to the GSLB after the registration is successful, so that the GSLB maintains the state of the local area network CDN, as shown in fig. 3.
For another example, in this embodiment, a one-to-one correspondence conversion relationship between a local network address of a local network CDN and a router external port address corresponding to the local network CDN is maintained on a GSLB: the router address is exemplified by a router public network address, and the CDN cache server address is exemplified by a CDN private network address. Through the mapping relationship (router public network address, CDN private network address, ID of the private network CDN, etc.), the GSLB finds a corresponding private network CDN cache server when performing scheduling, and redirects a user request to the private network CDN cache server, where the wan and lan addresses in this embodiment are in a one-to-one mapping relationship, as shown in fig. 4; and a status is maintained for each corresponding relation through heartbeat messages to indicate whether the entry is available or not, and the entry is not available after a certain time, and the GSLB ages and deletes the entry.
For another example, this embodiment also maintains, on the GSLB, a many-to-one correspondence conversion relationship embodiment between the local network address of the local network CDN and the external network port address of the router corresponding to the local network CDN: the router address information and the local area network CDN address information are not necessarily completely in a one-to-one correspondence as shown in fig. 4; as shown in fig. 5, at this time, the GSLB may find a plurality of CDN caches in the local area network according to a user request from the router, but the GSLB may select a CDN cache with the lightest load to serve the user, and maintain a state for each corresponding relationship through a heartbeat message to indicate whether the entry is available and unavailable for more than a certain time, and the GSLB may age and delete the entry.
Through the steps, the state updating message sent by the CDN cache server is received, so that the state information of the CDN cache server is updated in real time, the request can be accurately dispatched to a CDN cache system which can normally provide service for a corresponding local area network, and the user request is served by the CDN cache system of the corresponding local area network.
In an optional embodiment, the step of scheduling the CDN cache server whose state information satisfies the predetermined condition as the target CDN cache server from the CDN cache server whose server address is located in the local network address segment includes:
step S81, judging whether the load of the CDN cache server positioned in the local area network address segment is smaller than a preset threshold value;
step S82, if the load is smaller than the preset threshold, taking a CDN cache server as the target CDN cache server;
wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a Central Processing Unit (CPU) utilization rate of the CDN cache server, a storage utilization rate of the CDN cache server, a bandwidth of a resource request of the CDN cache server to a public network server and a service bandwidth of the CDN cache server.
It should be noted that the preset threshold value involved in the above step may be a load value corresponding to the lightest load of the CDN cache server located in the local area network address segment, and is not limited herein.
Optionally, in this embodiment, a manner of loading the state information of the CDN cache server involved in the above step into the third mapping relationship includes, but is not limited to: and loading the state information of the CDN cache server to the third mapping relation according to the ID address of the CDN cache server.
The above steps S81 to S82 will be exemplified below with reference to specific examples.
The embodiment provides an embodiment for maintaining local area network CDN performance statistics on GSLB: the local area network is a private network as an example, the router address is a router public network address as an example, and the local area network CDN cache server address is a private network CDN address as an example. The performance statistics data reported by the local area network CDN cache servers are obtained by finding the local area network CDN cache servers according to addresses in a router public network address and local area network address mapping table, where a plurality of local area network CDN cache servers may be deployed in one local area network, and then finding corresponding entries by comparing ID information in earlier-stage registered data with ID information of the local area network CDN cache servers in the performance data, so that the performance data is loaded into the public local area network address mapping table on the corresponding GSLB, as shown in fig. 6.
Through the steps, one target CDN cache server is selected from a plurality of CDN cache servers located in the local area network address segment according to the load of the CDN cache servers, so that the request can be accurately dispatched to the CDN cache servers in the corresponding local area networks, the corresponding local area network CDN cache servers serve the user request, and the user experience is improved.
The present invention will be illustrated with reference to specific examples.
It should be noted that the following exemplary local area networks take a private network as an example, and a wide area network and a public network as examples.
For example, a scene schematic diagram of a private network CDN user request scheduling in a hotel specifically implements the steps as shown in fig. 7, where each step described below corresponds to a corresponding sequence number in fig. 8, and represents a process of the private network CDN user request scheduling. The steps involved in fig. 7 and the steps in fig. 8 corresponding to the steps are as follows:
step S201, after the installation version of the private network/local area network CDN runs, the terminal UE automatically sends a registration message to the GSLB via the router, corresponding to step 1/2 in the scenario diagram 8.
Step S202, after receiving the message, GSLB needs to maintain the corresponding table of the CDN private network address and the router large network address as the strategy of user scheduling, and at the same time registers the successful response message for the intelligent terminal.
Step S203, the terminal sends a service (e.g. http) request to the GSLB via the router, as in step 3/4 in the scenario diagram 8; after receiving the message, the GSLB can inquire the corresponding item in the corresponding table according to the request source address, and if the state is normal, the GSLB directly dispatches the user to the corresponding private network CDN cache server.
Step S204, GSLB dispatches the response message of terminal 302, the location (location) has the destination address of the intelligent terminal to build the chain subsequently, also is the private network address of CDN. As in step 5/6 of the scenario diagram 8.
Step S205, after receiving 302, the terminal initiates a service request to a Home (Home) CDN according to the address information in the location, and performs a top link establishment with the private network/local area network CDN, as in step 7 in the scene fig. 8.
Step S206, if there is the requested resource content in the private network/local area network CDN, directly providing the user service through step 12 as in the scenario fig. 8.
Step S207, if the private network/local area network CDN does not have the requested resource content, the request redirection request is initiated to the GSLB again, and the request redirection request is sent back to the upper level service node through the wireless router as in step 8/9 in the scenario fig. 8.
In step S208, the GSLB sends the address information of the upper Service Node (Service Node) to the private network/local area network CDN through the location of the 302 message.
Step S209, the private network/local area network CDN extracts the location of 302, establishes a link with the upper level service node through the TCP, and sends an http request to the source.
Step S210, if the upper service node has content, the upper service node pushes the requested content to the CDN, for example, at step 10/11 in fig. 8 of the private network/local area network. The upper level node, if it has no content, may continue to pull content back to the upper level.
Step S211, the private network/local area network CDN provides a service to the terminal while receiving the resource pushed by the upper node, and the terminal may also normally watch OTT live broadcast or on-demand service, as in step 12 in fig. 8.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a scheduling apparatus for a request message is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 9 is a block diagram of a scheduling apparatus of a request message according to an embodiment of the present invention, as shown in fig. 9, the apparatus including:
1) a first receiving module 92, configured to receive a scheduling request sent by a terminal through a router, where the scheduling request is used to request that a target content delivery network CDN cache server located in a local area network is scheduled for the terminal, and the router is connected between a wide area network and the local area network;
2) an obtaining module 94, configured to obtain a router address of the router used for sending the scheduling request;
3) the scheduling module 96 is configured to search the local area network where the terminal is located according to the router address, schedule a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and send the server address of the target CDN cache server to the terminal, so that the terminal accesses content cached in the target CDN cache server.
Optionally, in this embodiment, application scenarios of the scheduling method for the request message include, but are not limited to: under the condition that the wide area internal public global load balancing system GSLB and the CDN cache system in the local area network are separated from the internal network and the external network.
An application scenario of the scheduling method for the request message in this embodiment is described in detail below with reference to fig. 2. The wide area network is a public network, the local area network is a private network, and the router is a general network device router. As shown in fig. 2, the system includes a common global load balancing GSLB device, a router, an intelligent terminal (Smart phone, PC, android stb, PAD, etc.), a CDN cache system, a CDN network manager, a SERVICE node or a resource pool, etc.
And the global load balancing GSLB global load balancing device is responsible for carrying out reasonable decision scheduling on the user request and finding out the optimal CDN cache server to serve the user request. GSLB can manage CDN cache servers in multiple private networks/local area networks
The general network equipment router is network equipment which can complete the function of encapsulating and forwarding data frames based on MAC address identification. The switch can "learn" the MAC address and store it in an internal address table, and by establishing a temporary switching path between the originator and the target recipient of the data frame, the data frame is directed from the source address to the destination address
The general network equipment router is responsible for isolating a private network and a public network at the upper level of the private network, and can translate data information between different networks or network segments so that the different networks or network segments can mutually read the data of each other, thereby forming a larger network.
The smart terminal is generally a common embedded or computer device, such as a personal computer, a smart phone, an android set top box, a PAD, and other embedded computer system devices capable of performing internet activities.
CDN cache routers, also referred to as proxy caches, may be located at the edge of the network, at the "last kilometer" from the user. Meanwhile, the cache system is a mirror image point of the original content server of the content provider. Such an architecture enables CDN service providers to offer the best possible service experience on behalf of content providers to end users who cannot tolerate any delay in request response time.
The SERVICE node or resource pool is generally an upper CDN node (regional cache or central cache) or an original content server provided on a content provider, and the server has a specific content resource that is responsible for delivery.
In the application scenario, a global load balancing system GSLB device in a wide area network receives a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting to schedule a target content delivery network CDN cache server located in a local area network for the terminal, and the router is connected between the wide area network and the local area network; acquiring the router address of the router for sending the scheduling request; and searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from the CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server. That is to say, in this embodiment, a local area network where a terminal is located is searched according to a router address connected between a wide area network and a local area network, and a CDN cache server is scheduled from a CDN cache server located in the local area network as a target CDN cache server, so that scheduling of the CDN cache server in the local area network by the wide area network is implemented, a problem that resource acquisition delay of the terminal is large because a global load balancing GSLB device schedules resources in the wide area network server to the terminal located in the local area network in the related art is solved, and an effect of shortening resource acquisition delay of the terminal is achieved.
Optionally, in this embodiment, the terminal involved in the above steps may be, but is not limited to: a PC, a PAD smart phone, or a smart set-top box, without limitation.
In an alternative implementation manner, fig. 10 is a block diagram (a) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 10, the apparatus includes, in addition to all modules involved in fig. 9:
1) a second receiving module 102, configured to receive, before the scheduling request sent by the receiving terminal through the router, a registration request sent by the CDN cache server located in the local area network;
2) a storage module 104, configured to store that the registration request carries information indicating one of the following relationships: a first mapping relationship between the router address and a local area network address segment of the local area network; a second mapping relationship among the router address, the local area network address segment and the server address of the CDN cache server; and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
It should be noted that, in this embodiment, the first mapping relationship between the router address and the local area network address segment of the local area network includes, but is not limited to: a one-to-one mapping relationship; the second mapping relationship between the router address, the local area network address segment and the server address of the CDN cache server includes, but is not limited to: one-to-one or one-to-many mapping relations, specifically, a one-to-one mapping relation exists between a router address and a local area network address segment, and a one-to-one or one-to-many mapping relation exists between the local area network address segment and a CDN cache server; the third mapping relationship between the router address, the local area network address segment and the state information of the CDN cache server includes, but is not limited to: the router address and the local area network address segment are in one-to-one mapping relation, and the local area network address segment and the state information of the CDN cache server are in one-to-many mapping relation.
By the device, before the request message sent by the scheduling terminal, the registration request sent by the CDN cache server in the local area network is received as the basis of the wide area network GSLB for scheduling the CDN cache server in the local area network address segment for the terminal, so that the effect that the GSLB can accurately schedule the request to the CDN cache system of the corresponding local area network and the CDN cache system of the corresponding local area network services the terminal request is further realized.
In an alternative implementation manner, fig. 11 is a block diagram (ii) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 11, the scheduling module 96 includes:
1) a first searching unit 112, configured to search the local area network address segment having the first mapping relationship with the router address when the registration request carries information indicating the first mapping relationship;
2) a first scheduling unit 114, configured to schedule the CDN cache server from the CDN cache servers whose server addresses are located in the local network address segment as the target CDN cache server.
Optionally, in this embodiment, the local area network address segment is looked up through a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server is dispatched from the CDN cache server with the server address positioned in the local area network address segment as the target CDN cache server, or a CDN cache server is further found as the target CDN cache server by combining the mapping relation between the local area network address segment and the CDN cache server, or a CDN cache server is found as the target CDN cache server by combining the state information of the local area network address segment and the CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
By the device, the local area network address segment having the first mapping relation with the router address is searched, and the effect that the request can be accurately dispatched to the CDN cache system of the corresponding local area network and the CDN cache system of the corresponding local area network serves the terminal request is further realized.
In an optional implementation manner, fig. 12 is a block diagram (three) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 12, the scheduling module 96 further includes:
1) a second searching unit 122, configured to search, when the registration request carries information indicating the second mapping relationship, the local area network address segment having the second mapping relationship with the router address and the server address of the CDN cache server;
2) a second scheduling unit 124, configured to schedule the CDN cache server from the CDN cache servers whose server addresses are located in the local network address segment as the target CDN cache server.
Optionally, in this embodiment, the target CDN cache server is searched for serving the terminal through a second mapping relationship between the router address, the local area network address segment, and the server address of the CDN cache server, or the local area network address segment is searched according to a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server with the server address positioned in the local area network address segment is dispatched as the target CDN cache server, or, the router address, the local area network address segment and the state information of the CDN cache server look up a CDN cache server as the target CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
By the device, the local area network address segment having the second mapping relation with the router address and the server address of the CDN cache server are searched, the request is more accurately dispatched to the CDN cache system of the corresponding local area network, and the terminal request is served by the CDN cache system of the corresponding local area network.
In an optional implementation manner, fig. 13 is a block diagram (four) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 13, the scheduling module 96 further includes:
1) a third searching unit 132, configured to search, when the registration request carries information indicating the third mapping relationship, the local area network address segment having the third mapping relationship with the router address and the state information of the CDN cache server;
2) a third scheduling unit 134, configured to schedule the CDN cache server whose state information meets the predetermined condition from the CDN cache server whose server address is located in the local area network address segment as the target CDN cache server.
Optionally, in this embodiment, the target CDN cache server is searched for serving the terminal through a third mapping relationship between the router address, the local area network address segment, and the state information of the CDN cache server, or the local area network address segment is searched according to a first mapping relationship between the router address and the local area network address segment of the local area network, after the local area network address segment is found, the CDN cache server with the server address positioned in the local area network address segment is dispatched as the target CDN cache server, or, a second mapping relation between the router address, the local area network address segment and the server address of the CDN cache server finds a CDN cache server as the target CDN cache server, the method and the device have the advantages that the request can be accurately dispatched to the CDN cache system of the corresponding local area network, and the CDN cache system of the corresponding local area network serves the terminal request.
By the device, the third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server is used for realizing the effect of more accurately dispatching the request to the CDN cache system of the corresponding local area network and serving the terminal request by the CDN cache system of the corresponding local area network.
In an optional implementation manner, fig. 14 is a block diagram (v) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 14, the apparatus includes, in addition to the modules shown in fig. 10:
1) a determining module 142, configured to determine whether the target CDN cache server includes content accessed by the terminal after the server address of the target CDN cache server is delivered to the terminal;
2) a sending module 144, configured to send the content accessed by the terminal to the terminal when it is determined that the target CDN cache server includes the content accessed by the terminal;
3) a processing module 146, configured to send a redirection request to the global server load balancing GSLB to obtain an address of an origin server that includes content accessed by the terminal, when it is determined that the target CDN cache server does not include the content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
Optionally, in this embodiment, when it is determined that the target CDN cache server includes the content accessed by the terminal, the content accessed by the terminal is directly sent to the terminal; and under the condition that the target CDN cache server does not contain the content accessed by the terminal, sending a redirection request to a Global Server Load Balancing (GSLB) to acquire the address of an origin server containing the content accessed by the terminal, and acquiring the content accessed by the terminal from the origin server indicated by the address of the origin server.
It should be noted that, in this embodiment, when it is determined that the target CDN cache server does not include the content accessed by the terminal, the redirection request is sent to the global server load balancing GSLB to obtain another target CDN cache server that includes the content accessed by the terminal, without obtaining the content accessed by the terminal from the origin server indicated by the address of the origin server.
By the device, under the condition that the target CDN cache server does not contain the content accessed by the terminal, the content accessed by the terminal is obtained from the source server containing the content accessed by the terminal, and the effect that the terminal can efficiently and quickly obtain network resources in a local area network is further achieved.
In an alternative implementation manner, fig. 15 is a block diagram (six) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 15, the apparatus includes, in addition to the modules shown in fig. 10:
1) a third receiving module 152, configured to receive, after receiving the registration request sent by the CDN cache server located in the local area network and after successful registration, a state update message sent by the CDN cache server;
if the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship;
and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
By the device, the state updating message sent by the CDN cache server is received, so that the state information of the CDN cache server is updated in real time, the request can be accurately dispatched to a CDN cache system which can normally provide service corresponding to a local area network, and the user request is served by the CDN cache system corresponding to the local area network.
In an alternative implementation manner, fig. 16 is a block diagram (seventh) of a structure of a scheduling apparatus of a request message according to an embodiment of the present invention, and as shown in fig. 16, the third scheduling unit 134 includes:
1) a determining subunit 162, configured to determine whether a load of the CDN cache server located in the local area network address segment is smaller than a preset threshold;
2) a setting subunit 164, configured to use the CDN cache server as the target CDN cache server when the load is smaller than the preset threshold;
wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a Central Processing Unit (CPU) utilization rate of the CDN cache server, a storage utilization rate of the CDN cache server, a bandwidth of a resource request of the CDN cache server to a public network server and a service bandwidth of the CDN cache server.
It should be noted that the preset threshold value involved in the above step may be a load value corresponding to the lightest load of the CDN cache server located in the local area network address segment, and is not limited herein.
Optionally, in this embodiment, a manner of loading the state information of the CDN cache server involved in the above step into the third mapping relationship includes, but is not limited to: and loading the state information of the CDN cache server to the third mapping relation according to the ID address of the CDN cache server.
By the device, a target CDN cache server is selected from a plurality of CDN cache servers in the local area network address segment according to the load of the CDN cache servers, so that the request can be accurately dispatched to the CDN cache servers in the corresponding local area networks, the corresponding local area network CDN cache servers serve the user request, and the user experience is improved.
The following describes embodiments of the present invention with reference to specific examples.
An embodiment of the present invention provides a scheduling control device between a wide area network and a local area network, and as shown in fig. 17, the scheduling control device includes:
1) the global redirection unit 172 processes an http request from a user, and performs 302 response to the user through a reasonable decision, so that the user is scheduled to a corresponding private network CDN proxy cache unit nearby; and also used for detecting the state of private network proxy cache and reported performance statistic data so as to provide the data for GSLB to carry out scheduling reference or data monitoring
2) The caching proxy unit 174 processes the redirected http request from the user, and determines whether to provide the service to the user directly according to the locally cached resource or further request the resource to the user from the serving node unit in a proxy manner according to the requested resource.
3) The service node unit 176 processes a resource request from a lower node, which is similar to a proxy cache unit or a resource source station server in a private network
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in a plurality of processors.
Example 3
The embodiment of the invention also provides a storage medium. For application scenarios and examples of this embodiment, reference may be made to embodiment 1 and embodiment 2, which are not described herein again. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, receiving a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting to schedule a target Content Delivery Network (CDN) cache server located in a local area network for the terminal, and the router is connected between a wide area network and the local area network;
s2, obtaining the router address of the router used for sending the scheduling request;
s3, finding the local area network where the terminal is located according to the router address, scheduling a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and issuing a server address of the target CDN cache server to the terminal, so that the terminal accesses content cached in the target CDN cache server.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Alternatively, in the present embodiment, the processor performs the above steps S1, S2, and S3 according to program codes already stored in the storage medium.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. A method for scheduling request messages, comprising:
receiving a scheduling request sent by a terminal through a router, wherein the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network;
acquiring a router address of the router for sending the scheduling request;
and searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server.
2. The method according to claim 1, wherein before the receiving the scheduling request sent by the terminal through the router, the method further comprises:
receiving a registration request sent by the CDN cache server positioned in the local area network;
storing information carrying one of the following relations in the registration request:
a first mapping relationship between the router address and a local area network address segment of the local area network;
a second mapping relationship among the router address, the local area network address segment, and a server address of the CDN cache server; and
and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
3. The method of claim 2, wherein when the registration request carries information indicating the first mapping relationship,
the searching the local area network where the terminal is located according to the router address comprises: searching the local area network address segment having the first mapping relation with the router address;
scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server from the CDN cache servers with server addresses located in the local area network address section to serve as the target CDN cache server.
4. The method of claim 2, wherein when the registration request carries information indicating the second mapping relationship,
the searching the local area network where the terminal is located according to the router address comprises: searching the local area network address segment having the second mapping relation with the router address and the server address of the CDN cache server;
scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server from the CDN cache servers with server addresses located in the local area network address section to serve as the target CDN cache server.
5. The method of claim 2, wherein when the registration request carries information indicating the third mapping relationship,
the searching the local area network where the terminal is located according to the router address comprises: searching the local area network address segment having the third mapping relation with the router address and the state information of the CDN cache server;
scheduling a CDN cache server from a CDN cache server located within the local area network as the target CDN cache server includes: and scheduling the CDN cache server of which the state information meets the preset condition from the CDN cache server of which the server address is positioned in the local area network address segment as the target CDN cache server.
6. The method of claim 1, wherein after sending the server address of the target CDN cache server to the terminal, further comprising:
judging whether the target CDN cache server contains the content accessed by the terminal;
under the condition that the target CDN cache server is judged to contain the content accessed by the terminal, the content accessed by the terminal is sent to the terminal;
under the condition that the target CDN cache server does not contain the content accessed by the terminal, sending a redirection request to a Global Server Load Balancing (GSLB) to obtain an address of an origin server containing the content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
7. The method according to claim 2, further comprising, after receiving the registration request sent by the CDN cache server located within the local area network:
after the register is successful, receiving a state updating message sent by the CDN cache server;
when the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship;
and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
8. The method of claim 5, wherein the scheduling the one CDN cache server with the status information meeting the predetermined condition from the CDN cache servers with server addresses located in the local area network address segment as the target CDN cache server comprises:
judging whether the load of the CDN cache server positioned in the local area network address segment is smaller than a preset threshold value or not;
if the load is smaller than the preset threshold value, taking the CDN cache server as the target CDN cache server;
wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a CDN cache server Central Processing Unit (CPU) utilization rate, a CDN cache server storage utilization rate, a CDN cache server resource request bandwidth from a public network server and a CDN cache server service bandwidth.
9. A scheduling apparatus for a request message, comprising:
the terminal comprises a first receiving module, a first sending module and a second receiving module, wherein the first receiving module is used for receiving a scheduling request sent by a terminal through a router, the scheduling request is used for requesting the terminal to schedule a target Content Delivery Network (CDN) cache server located in a local area network, and the router is connected between a wide area network and the local area network;
an obtaining module, configured to obtain a router address of the router used for sending the scheduling request;
and the scheduling module is used for searching the local area network where the terminal is located according to the router address, scheduling a CDN cache server from a CDN cache server located in the local area network as the target CDN cache server, and issuing the server address of the target CDN cache server to the terminal so that the terminal accesses the content cached in the target CDN cache server.
10. The apparatus of claim 9, further comprising:
a second receiving module, configured to receive, before the scheduling request sent by the receiving terminal through a router, a registration request sent by the CDN cache server located in the local area network;
a storage module, configured to store that the registration request carries information indicating one of the following relationships:
a first mapping relationship between the router address and a local area network address segment of the local area network;
a second mapping relationship among the router address, the local area network address segment, and a server address of the CDN cache server; and
and a third mapping relation among the router address, the local area network address segment and the state information of the CDN cache server, wherein the state information of the CDN cache server is used for indicating the use state of the CDN cache server.
11. The apparatus of claim 10, wherein the scheduling module comprises:
a first searching unit, configured to search, when the registration request carries information indicating the first mapping relationship, the local area network address segment having the first mapping relationship with the router address;
and the first scheduling unit is used for scheduling the CDN cache server as the target CDN cache server from the CDN cache servers with server addresses located in the local area network address segment.
12. The apparatus of claim 10, wherein the scheduling module further comprises:
a second searching unit, configured to search, when the registration request carries information indicating the second mapping relationship, the local area network address segment having the second mapping relationship with the router address and the server address of the CDN cache server;
and the second scheduling unit is used for scheduling the CDN cache server as the target CDN cache server from the CDN cache servers with server addresses located in the local area network address segment.
13. The apparatus of claim 10, wherein the scheduling module further comprises:
a third searching unit, configured to search, when the registration request carries information indicating the third mapping relationship, the local area network address segment having the third mapping relationship with the router address and the state information of the CDN cache server;
and the third scheduling unit is used for scheduling the CDN cache server of which the state information meets the preset condition from the CDN cache server of which the server address is positioned in the local area network address segment as the target CDN cache server.
14. The apparatus of claim 9, further comprising:
the judging module is used for judging whether the target CDN cache server contains the content accessed by the terminal after the server address of the target CDN cache server is issued to the terminal;
a sending module, configured to send the content accessed by the terminal to the terminal when it is determined that the target CDN cache server contains the content accessed by the terminal;
the processing module is used for sending a redirection request to a Global Server Load Balancing (GSLB) to acquire an address of an origin server containing the content accessed by the terminal under the condition that the target CDN cache server does not contain the content accessed by the terminal; and acquiring the content accessed by the terminal from the source server indicated by the address of the source server.
15. The apparatus of claim 10, further comprising:
a third receiving module, configured to receive, after receiving the registration request sent by the CDN cache server located in the local area network and after successful registration, a state update message sent by the CDN cache server;
when the state update message indicates that the CDN cache server changes from an abnormal unavailable state to a normal available state, adding a mapping relationship between a server address of the CDN cache server and the local network address segment to the second mapping relationship, and adding state information of the CDN cache server in the third mapping relationship;
and when the state updating message indicates that the CDN cache server is changed from the normal available state to the abnormal unavailable state, and the time in the abnormal unavailable state exceeds a preset threshold value, deleting the second mapping relation corresponding to the CDN cache server, and deleting the state information of the CDN cache server in the third mapping relation.
16. The apparatus of claim 13, wherein the third scheduling unit comprises:
the judging subunit is configured to judge whether a load of the CDN cache server located in the local area network address segment is smaller than a preset threshold;
a setting subunit, configured to use the CDN cache server as the target CDN cache server when the load is smaller than the preset threshold;
wherein, the load of the CDN cache server comprises at least one of the following: the CDN cache server comprises a CDN cache server Central Processing Unit (CPU) utilization rate, a CDN cache server storage utilization rate, a CDN cache server resource request bandwidth from a public network server and a CDN cache server service bandwidth.
CN201610005842.5A 2016-01-04 2016-01-04 Request message scheduling method and device Active CN106941507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610005842.5A CN106941507B (en) 2016-01-04 2016-01-04 Request message scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610005842.5A CN106941507B (en) 2016-01-04 2016-01-04 Request message scheduling method and device

Publications (2)

Publication Number Publication Date
CN106941507A CN106941507A (en) 2017-07-11
CN106941507B true CN106941507B (en) 2020-09-11

Family

ID=59469619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610005842.5A Active CN106941507B (en) 2016-01-04 2016-01-04 Request message scheduling method and device

Country Status (1)

Country Link
CN (1) CN106941507B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109167820A (en) * 2018-08-13 2019-01-08 彩讯科技股份有限公司 A kind of method for down loading of application program, device, storage medium and terminal
CN110445670B (en) * 2019-06-26 2022-05-17 网宿科技股份有限公司 Method and system for testing acceleration service effect of server
CN112311836A (en) * 2019-07-31 2021-02-02 华为技术有限公司 Method and related device for scheduling service node
CN112398884B (en) * 2019-08-14 2023-08-25 上海哔哩哔哩科技有限公司 Flow scheduling control method under mirror image back source scene, readable storage medium and computer equipment
CN110830564B (en) * 2019-10-30 2022-11-01 北京金山云网络技术有限公司 CDN scheduling method, device, system and computer readable storage medium
CN110996145A (en) * 2019-12-18 2020-04-10 北京达佳互联信息技术有限公司 Multimedia resource playing method, system, terminal equipment and server
CN113824750B (en) * 2020-06-19 2023-04-18 网宿科技股份有限公司 Data transmission method and data transmission system
CN113411390B (en) * 2021-06-16 2022-08-09 北京百度网讯科技有限公司 Scheduling method and device of content distribution network and electronic equipment
CN114071173A (en) * 2021-11-15 2022-02-18 北京百度网讯科技有限公司 Live broadcast scheduling method, device, system, electronic equipment and medium
CN114584808B (en) * 2022-03-01 2023-09-22 抖音视界有限公司 Video stream acquisition method, device, system, equipment and medium
CN114615237B (en) * 2022-03-22 2024-03-29 阿里巴巴(中国)有限公司 Streaming media communication method, system, equipment and storage medium
CN114827674B (en) * 2022-03-30 2023-09-05 北京奇艺世纪科技有限公司 Network resource display method, device and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262489B (en) * 2007-03-09 2011-03-16 中兴通讯股份有限公司 A content distribution network system and method
CN101425969B (en) * 2008-11-25 2010-12-08 华为技术有限公司 Scheduling method, apparatus and system
CN102215247B (en) * 2010-05-06 2014-12-03 华为技术有限公司 Network proximity load balancing method and device
CN102026290B (en) * 2010-12-16 2013-11-06 华为终端有限公司 Wireless mobile gateway and method for responding user access by same
CN102739712A (en) * 2011-04-08 2012-10-17 ***通信集团贵州有限公司 Method and system for network cache data distribution
EP2650795A1 (en) * 2012-04-13 2013-10-16 Integrity Digital Solutions, LLC. Content delivery and caching system
CN102891807B (en) * 2012-07-16 2015-10-28 北京东方网信科技股份有限公司 A kind of network traffic cache method and system based on positive guide

Also Published As

Publication number Publication date
CN106941507A (en) 2017-07-11

Similar Documents

Publication Publication Date Title
CN106941507B (en) Request message scheduling method and device
US11399293B2 (en) System and method of network policy optimization
US20220107848A1 (en) Edge service providing method and apparatus, and device
US8320916B2 (en) Method and apparatus for pre-fetching data in a mobile network environment using edge data storage
US20210351993A1 (en) Methods and apparatus for analytics function discovery
US20150264009A1 (en) Client-selectable routing using dns requests
WO2018001144A1 (en) Base station, and method, apparatus and system for responding to access request
CN110381162B (en) Service processing method and related device
CN105340244A (en) Dynamic content distribution network selection based on context from transient criteria
US11888946B2 (en) Methods, systems, and computer readable media for applying or overriding preferred locality criteria in processing network function (NF) discovery requests
CN113572835B (en) Data processing method, network element equipment and readable storage medium
US20150058441A1 (en) Efficient content caching management method for wireless networks
EP3917083A1 (en) Network device and method for searching for edge service implemented in network device
CN113572864A (en) Data processing method, network element equipment and readable storage medium
US10129079B2 (en) Telecommunications system and method
US11606415B2 (en) Method, apparatus and system for processing an access request in a content delivery system
US20230337041A1 (en) P-cscf registration and discovery mechanism
CN112583863B (en) HttpDNS scheduling method, device, medium and equipment
CN106878475B (en) Domain name addressing method and system
US20220094723A1 (en) Content delivery via device-to-device communication
CN109196843A (en) A kind of data cached requesting method and relevant device
JP2013179482A (en) Relay device and relay method
CN113132251A (en) Service scheduling method, device and storage medium
EP2950564B1 (en) Node of a telecommunication network for content delivery network traffic
US20240137731A1 (en) Systems and methods for providing dynamic edge-based multicast and broadcast service for content providers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant