CN114513554A - Network access method, device, equipment, computer readable storage medium and system - Google Patents

Network access method, device, equipment, computer readable storage medium and system Download PDF

Info

Publication number
CN114513554A
CN114513554A CN202011164578.2A CN202011164578A CN114513554A CN 114513554 A CN114513554 A CN 114513554A CN 202011164578 A CN202011164578 A CN 202011164578A CN 114513554 A CN114513554 A CN 114513554A
Authority
CN
China
Prior art keywords
server
scheduling
client
access request
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011164578.2A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011164578.2A priority Critical patent/CN114513554A/en
Publication of CN114513554A publication Critical patent/CN114513554A/en
Pending legal-status Critical Current

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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The disclosure relates to a network access method, device, equipment, computer readable storage medium and system. According to the method, the client side sends the access request to the first server, the first server determines a target scheduling policy corresponding to the access request from one or more scheduling policies which are stored in advance and come from the scheduling server according to the access request of the client side, and sends the target scheduling policy to the client side, so that the client side can access network resources in the optimal cache server according to URLs included in the target scheduling policy. That is to say, after the client sends the access request to the first server, the client does not need to send the access request to the scheduling server, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved.

Description

Network access method, device, equipment, computer readable storage medium and system
Technical Field
The present disclosure relates to the field of information technology, and in particular, to a network access method, apparatus, device, computer-readable storage medium, and system.
Background
With the development of streaming media technology, accurate scheduling of traffic and cache hit rate have been essential important factors in Content Delivery Network (CDN) services.
In a CDN, a terminal sends an access request to an authoritative Domain Name System (DNS) server, which may send the terminal's access request to other DNS servers, e.g., a Local DNS server. Other DNS servers respond to the access request of the terminal, and feed back an Internet Protocol (IP) address of the scheduling server to the authoritative DNS server, and the authoritative DNS server feeds back the IP address of the scheduling server to the terminal. The terminal further sends an access request to the scheduling server according to the IP address of the scheduling server. The scheduling server feeds back a Uniform Resource Locator (URL) to the terminal according to the access request of the terminal, where the URL may point to the optimal cache server, and further, the terminal accesses the network Resource in the optimal cache server according to the URL.
Through the above process, the process from the initiation of the access request to the access of the network resource by the terminal is complex, which results in a long time required by the terminal to access the network resource and a low rate of the terminal to access the network resource, thereby reducing the user experience.
Disclosure of Invention
In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a network access method, apparatus, device, computer-readable storage medium, and system, so as to reduce the time required by a client to access a network resource, i.e., reduce the first packet time, and improve the rate at which the client accesses the network resource, thereby improving the user experience.
In a first aspect, an embodiment of the present disclosure provides a network access method, including:
a first server receives an access request of a client;
the first server determines a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client;
and the first server sends the target scheduling policy corresponding to the access request to the client.
Optionally, before the first server receives the access request of the client, the method further includes:
the first server receives one or more scheduling strategies sent by a second server, wherein the one or more scheduling strategies are acquired by the second server from the scheduling server;
the first server stores the one or more scheduling strategies in a storage space corresponding to the first server;
the first server determines a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client, and the method comprises the following steps:
and the first server determines a target scheduling policy associated with an optimal cache server from one or more scheduling policies from a scheduling server pre-stored in the storage space according to the access request of the client.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
Optionally, the first server and the second server are content distribution network nodes.
Optionally, the sending, by the first server, the target scheduling policy corresponding to the access request to the client includes:
and when at least one of a request parameter, a frame header and a request path of the access request of the client meets a preset condition, the first server sends a target scheduling policy corresponding to the access request to the client.
Optionally, the sending, by the first server, the target scheduling policy corresponding to the access request to the client includes:
and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
In a second aspect, an embodiment of the present disclosure provides a network access method, including:
the client sends an access request to a first server;
the client receives a target scheduling policy from the first server, the target scheduling policy being a scheduling policy corresponding to the access request that the first server determines from one or more scheduling policies pre-stored from a scheduling server.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server;
after the client receives the target scheduling policy from the first server, the method further comprises:
and the client accesses the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling strategy.
In a third aspect, an embodiment of the present disclosure provides a network access method, including:
the second server acquires one or more scheduling strategies from the scheduling server;
and the second server sends the one or more scheduling strategies to a first server, wherein the first server is used for storing the one or more scheduling strategies and determining a target scheduling strategy corresponding to an access request from the one or more scheduling strategies according to the access request of the client.
Optionally, the obtaining, by the second server, one or more scheduling policies from the scheduling server includes:
the second server periodically obtains one or more scheduling policies from a scheduling server.
In a fourth aspect, an embodiment of the present disclosure provides a network access apparatus, including:
the receiving module is used for receiving an access request of a client;
the determining module is used for determining a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client;
and the sending module is used for sending the target scheduling strategy corresponding to the access request to the client.
Optionally, the receiving module is further configured to: before receiving an access request of a client, receiving one or more scheduling policies sent by a second server, wherein the one or more scheduling policies are acquired by the second server from the scheduling server;
the network access device further comprises: a storage module; the scheduling policy module is used for storing the one or more scheduling policies in a storage space corresponding to the first server;
the determination module is specifically configured to: and according to the access request of the client, determining a target scheduling policy associated with the optimal cache server from one or more scheduling policies from the scheduling server pre-stored in the storage space.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
Optionally, the first server and the second server are content distribution network nodes.
Optionally, when the sending module sends the target scheduling policy corresponding to the access request to the client, the sending module is specifically configured to: and when at least one of a request parameter, a frame head and a request path of the access request of the client meets a preset condition, sending a target scheduling strategy corresponding to the access request to the client.
Optionally, when the sending module sends the target scheduling policy corresponding to the access request to the client, the sending module is specifically configured to: and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
In a fifth aspect, an embodiment of the present disclosure provides a network access apparatus, including:
the sending module is used for sending an access request to the first server;
a receiving module, configured to receive a target scheduling policy from the first server, where the target scheduling policy is a scheduling policy corresponding to the access request, and the scheduling policy is determined by the first server from one or more pre-stored scheduling policies from a scheduling server.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server; the network access device further comprises: and the access module is used for accessing the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling policy after the receiving module receives the target scheduling policy from the first server.
In a sixth aspect, an embodiment of the present disclosure provides a network access apparatus, including:
an obtaining module, configured to obtain one or more scheduling policies from a scheduling server;
and the sending module is used for sending the one or more scheduling policies to a first server, and the first server is used for storing the one or more scheduling policies and determining a target scheduling policy corresponding to the access request from the one or more scheduling policies according to the access request of the client.
Optionally, when the obtaining module obtains one or more scheduling policies from the scheduling server, the obtaining module is specifically configured to: one or more scheduling policies are periodically obtained from a scheduling server.
In a seventh aspect, an embodiment of the present disclosure provides a network access device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first, second or third aspect.
In an eighth aspect, the present disclosure provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the method of the first, second or third aspect.
In a ninth aspect, an embodiment of the present disclosure provides a network access system, including: the system comprises a client, a first server and a second server;
the second server is used for acquiring one or more scheduling strategies from the scheduling server; sending the one or more scheduling policies to a first server; the first server is used for storing the one or more scheduling strategies;
the client is used for sending an access request to the first server;
the first server is used for receiving an access request of a client; according to the access request of the client, determining a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server; sending a target scheduling policy corresponding to the access request to the client;
the client is used for receiving the target scheduling strategy sent by the first server.
Optionally, before the first server receives the access request of the client, the first server is further configured to: receiving one or more scheduling policies sent by a second server, wherein the one or more scheduling policies are acquired by the second server from the scheduling server; storing the one or more scheduling policies in a storage space corresponding to the first server; when the first server determines, according to the access request of the client, a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server, the first server is specifically configured to: and according to the access request of the client, determining a target scheduling policy associated with the optimal cache server from one or more scheduling policies from the scheduling server pre-stored in the storage space.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
Optionally, the first server and the second server are content distribution network nodes.
Optionally, when the first server sends the target scheduling policy corresponding to the access request to the client, the first server is specifically configured to: and when at least one of a request parameter, a frame head and a request path of the access request of the client meets a preset condition, sending a target scheduling strategy corresponding to the access request to the client.
Optionally, when the first server sends the target scheduling policy corresponding to the access request to the client, the first server is specifically configured to: and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
Optionally, after receiving the target scheduling policy from the first server, the client is further configured to: and accessing the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling strategy.
Optionally, when the second server obtains one or more scheduling policies from the scheduling server, the second server is specifically configured to: one or more scheduling policies are periodically obtained from a scheduling server.
According to the network access method, the device, the equipment, the computer readable storage medium and the system, the client sends the access request to the first server, the first server determines a target scheduling policy corresponding to the access request from one or more scheduling policies which are stored in advance from the scheduling server according to the access request of the client, and sends the target scheduling policy to the client, so that the client can access the network resource in the optimal cache server according to the URL included in the target scheduling policy. That is to say, after the client sends the access request to the first server, the client does not need to send the access request to the scheduling server, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a network access method provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an application scenario provided by the embodiment of the present disclosure;
fig. 3 is a flowchart of another network access method provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of another application scenario provided by the embodiment of the present disclosure;
fig. 5 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 6 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 7 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 8 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 9 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 10 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 11 is a flowchart of another network access method provided by the embodiments of the present disclosure;
fig. 12 is a schematic structural diagram of a network access device according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of another network access device provided in the embodiment of the present disclosure;
fig. 14 is a schematic structural diagram of another network access device provided in the embodiment of the present disclosure;
fig. 15 is a schematic structural diagram of another network access device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Generally, in a CDN, a terminal sends an access request to an authoritative Domain Name System (DNS) server, which may send the terminal's access request to other DNS servers, e.g., a Local DNS server. Other DNS servers respond to the access request of the terminal, and feed back an Internet Protocol (IP) address of the scheduling server to the authoritative DNS server, and the authoritative DNS server feeds back the IP address of the scheduling server to the terminal. The terminal further sends an access request to the scheduling server according to the IP address of the scheduling server. The scheduling server feeds back a Uniform Resource Locator (URL) to the terminal according to the access request of the terminal, where the URL may point to the optimal cache server, and further, the terminal accesses the network Resource in the optimal cache server according to the URL. Through the above process, the process from the initiation of the access request to the access of the network resource by the terminal is complex, which results in a long time required by the terminal to access the network resource and a low rate of the terminal to access the network resource, thereby reducing the user experience. To address this problem, embodiments of the present disclosure provide a network access method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a network access method provided in an embodiment of the present disclosure. The method comprises the following specific steps:
s101, the first server receives an access request of a client.
As shown in fig. 2, the client may be an application or a module in the terminal device 21, or the client may be the terminal device 21 itself. In particular, the client may send an access request to first server 22 requesting access to a network resource.
S102, the first server determines a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client.
The first server 22 may store one or more scheduling policies from the scheduling server locally or in a storage space corresponding to the first server 22. The storage space corresponding to the first server 22 may be a local storage space of the first server 22, or may also be a storage space outside the first server 22. For example, the storage space is a database, which may be integrated in the first server 22. Or the database may be another database server separate from the first server 22 to which the first server 22 may be communicatively connected.
When the first server 22 receives the access request from the client, the first server 22 may determine a target scheduling policy corresponding to the access request from one or more scheduling policies stored in advance from the scheduling server.
S103, the first server sends the target scheduling policy corresponding to the access request to the client.
Further, the first server 22 may send the target scheduling policy corresponding to the access request to the client. Specifically, the target scheduling policy may include a Uniform Resource Locator (URL). The URL may point to the optimal cache server. Further, the client accesses the network resource in the optimal cache server according to the URL.
According to the method and the device, the client side sends the access request to the first server, the first server determines a target scheduling policy corresponding to the access request from one or more scheduling policies which are stored in advance and come from the scheduling server according to the access request of the client side, and sends the target scheduling policy to the client side, so that the client side can access network resources in the optimal cache server according to URLs included in the target scheduling policy. That is to say, after the client sends the access request to the first server, the client does not need to send the access request to the scheduling server, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved.
Fig. 3 is a flowchart of another network access method provided in the embodiment of the present disclosure. The method comprises the following specific steps:
s301, the first server receives one or more scheduling policies sent by a second server, and the one or more scheduling policies are obtained by the second server from the scheduling server.
As shown in fig. 4, the second server 23 periodically sends a scheduling policy acquisition request to the scheduling server 24, and the scheduling server 24 sends one or more scheduling policies to the second server 23 as a response according to the scheduling policy acquisition request. Further, the second server 23 sends the one or more scheduling policies to the first server 22. Accordingly, the first server 22 receives the one or more scheduling policies sent by the second server 23.
Optionally, the first server and the second server are content distribution network nodes.
For example, the first server 22 and the second server 23 may be edge nodes in a Content Delivery Network (CDN). The scheduling server 24 may be a central node in the CDN.
S302, the first server stores the one or more scheduling strategies in a storage space corresponding to the first server.
When the first server 22 receives the one or more scheduling policies sent by the second server 23, the first server 22 may store the one or more scheduling policies in a storage space corresponding to the first server 22, which may be, for example, the database server 25. It is to be understood that the number of scheduling policies is not limited in this embodiment, and may be one or more. Alternatively, the number of scheduling policies may be increasing over time.
S303, the first server receives an access request of the client.
For example, a client in the terminal device 21 sends an access request to the first server 22, the access request requesting access to a network resource. Accordingly, the first server 22 may receive the access request of the client.
S304, the first server determines a target scheduling policy associated with an optimal cache server from one or more scheduling policies from a scheduling server pre-stored in the storage space according to the access request of the client.
For example, the access request sent by the client in the terminal device 21 to the first server 22 is used to request access to the network resource in the optimal cache server. In the case that the first server 22 receives the access request, the first server 22 may send the access request of the client to a storage space corresponding to the first server 22, for example, the database server 25. The database server 25 stores one or more scheduling policies from the scheduling server in advance. Further, the database server 25 may determine a target scheduling policy capable of pointing to the optimal cache server from one or more scheduling policies stored in advance according to the access request of the client. For example, each of the one or more pre-stored scheduling policies includes a URL, the database server 25 may sequentially detect the URL of each of the one or more scheduling policies, determine whether the URL of each scheduling policy may point to the optimal cache server, and use the scheduling policy corresponding to the URL capable of pointing to the optimal cache server as the target scheduling policy corresponding to the access request. Further, the first server 22 may send a query request to the database server 25, and the database server 25 feeds back the target scheduling policy corresponding to the access request to the first server 22 according to the query request, so that the first server 22 may obtain the target scheduling policy associated with the optimal cache server, that is, the target scheduling policy corresponding to the access request, from the database server 25.
Or in other embodiments, first server 22 may retrieve one or more scheduling policies pre-stored by database server 25 from database server 25. Further, the first server 22 sequentially detects the URL of each of the one or more scheduling policies, determines whether the URL of each scheduling policy can point to the optimal cache server, and uses the scheduling policy corresponding to the URL that can point to the optimal cache server as the target scheduling policy corresponding to the access request.
S305, the first server sends the target scheduling policy corresponding to the access request to the client.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
For example, first server 22 may send the target scheduling policy to the client. The target scheduling policy may include a URL therein. The URL may point to the optimal cache server. And further, the client accesses the network resource in the optimal cache server according to the URL.
In a possible implementation manner, the sending, by the first server, the target scheduling policy corresponding to the access request to the client includes: and when at least one of a request parameter, a frame header and a request path of the access request of the client meets a preset condition, the first server sends a target scheduling policy corresponding to the access request to the client.
For example, when receiving an access request from a client, the first server 22 may detect whether at least one of a request parameter, a frame header, and a request path of the access request satisfies a preset condition, and if at least one of the request parameter, the frame header, and the request path of the access request from the client satisfies the preset condition, the first server 22 may send a target scheduling policy corresponding to the access request to the client when the first server 22 queries the target scheduling policy corresponding to the access request from the database server 25. If at least one of the request parameter, the frame header, and the request path of the access request does not satisfy the preset condition, the first server 22 may not send the target scheduling policy corresponding to the access request to the client, or the first server 22 may not query the target scheduling policy corresponding to the access request from the database server 25.
In another possible implementation manner, the sending, by the first server, the target scheduling policy corresponding to the access request to the client includes: and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
For example, when the first server 22 acquires the target scheduling policy corresponding to the access request from the database server 25, the first server 22 may detect whether a domain name of the cache server pointed by the URL included in the target scheduling policy is a preset domain name. If the domain name of the cache server pointed by the URL included in the target scheduling policy is a preset domain name, the first server 22 may send the target scheduling policy corresponding to the access request to the client. If the domain name of the cache server pointed by the URL included in the target scheduling policy is not the preset domain name, the first server 22 may not send the target scheduling policy corresponding to the access request to the client.
In this embodiment, the first server detects whether at least one of a request parameter, a frame header, and a request path of an access request of a client meets a preset condition, or detects whether a domain name of a cache server pointed by a uniform resource locator included in a target scheduling policy is a preset domain name, so that the first server can send the target scheduling policy corresponding to the access request of the client to the client when at least one of the request parameter, the frame header, and the request path of the access request meets the preset condition, or the domain name of the cache server pointed by the uniform resource locator included in the target scheduling policy is the preset domain name. That is to say, when receiving an access request from a client, the first server does not feed back a target scheduling policy corresponding to the access request for all the access requests from the client, but feeds back the target scheduling policy corresponding to the access request to the client only when the access request from the client or the target scheduling policy corresponding to the access request meets a specific condition. Therefore, the first server can be compatible with differences of different clients, and the flexibility of the first server for processing access requests of different clients is improved.
In the above embodiment, the scheduling server 24 may specifically be a central scheduling policy server, and the second server 23 may be a proxy server, which is denoted as agent. The first server 22 may be a cache node, denoted as nginx. The storage space corresponding to the first server 22 may be a shared memory, which is denoted as sharedict. The signaling interaction process among the central scheduling policy server, agent, nginx, client, sharedict is shown in fig. 5, and the process includes the following steps:
s501, the agent sends a scheduling policy acquisition request to a central scheduling policy server regularly.
S502, the central scheduling policy server sends one or more scheduling policies to the agent as responses.
In this embodiment, an agent may asynchronously and periodically obtain a scheduling policy from a central scheduling policy server, where the scheduling policy may also be referred to as a scheduling configuration. Specifically, the central scheduling policy server sends one or more scheduling policies to the agent. Further, the agent may cache the one or more scheduling policies into nginx through a caching system.
S503, the agent sends the one or more scheduling strategies to nginx.
For example, the internal domain name of nginx is denoted xxx and the port of nginx is denoted 80. agent may send a request to the 80 port of internal domain name xxx of nginx, which may include the one or more scheduling policies, requesting nginx to store the one or more scheduling policies in sharedict.
S504, nginx stores the one or more scheduling policies to sharedict.
When nginx receives the request of agent, it parses the content (e.g., body) in the request according to the internal domain name to obtain one or more scheduling policies included in the request, and further, nginx writes the one or more scheduling policies into sharedict.
And S505, the client sends an access request to nginx.
S506, nginx sends a query request to sharedict.
And S507, the sharedict feeds back the target scheduling strategy to nginx.
And S508, nginx feeds back an http 302 response to the client.
For example, when nginx receives a target scheduling policy fed back by sharedict, nginx may parse the target scheduling policy and feed back an http 302 response to the client. In particular, the http 302 response may include the target scheduling policy.
For example, when nginx determines that at least one of a request parameter, a frame header, and a request path of an access request of a client satisfies a preset condition, or a domain name of a cache server pointed by a URL included in the target scheduling policy is a preset domain name, nginx feeds an http 302 response back to the client. If at least one of the request parameter, the frame header and the request path of the access request of the client does not meet the preset condition, or the domain name of the cache server pointed by the URL in the target scheduling policy is not the preset domain name, the nginx does not feed back the http 302 response to the client.
In this embodiment, the http 302 response may specifically include the following:
1) the response protocol is as follows: support is configurable, with default protocol following.
2) Response parameters: the method supports ignoring of original request parameters, reserving of part of original request parameters, deleting of part of original request parameters, user-defined authentication parameters and default support of transparent transmission of all original request parameters.
3) The response path is as follows: support overwriting in a specific format, by default: and transmitting the original path.
4) And responding to host: support is configurable, by default: and transmitting the original request domain name.
In addition, in this embodiment, optionally, after the client sends the access request to nginx, nginx may feed back an http 302 response to the client at the first time, and the client is not required to send a request, for example, a scheduling policy obtaining request, to the central scheduling policy server synchronously.
In this embodiment, the agent periodically and asynchronously sends a scheduling policy obtaining request to the central scheduling policy server, and obtains one or more scheduling policies (for example, 302 scheduling policies) from the central scheduling policy server, and at the same time, the agent sends a request to the 80 port of nginx, and stores the one or more scheduling policies in shared memory sharedict of nginx. When nginx receives an access request of a client, nginx only needs to query a shared memory, obtains a target scheduling strategy corresponding to the access request from the shared memory, and feeds back an http 302 response to the client. The client does not need to synchronously send a request to the central scheduling policy server to obtain the http 302 response, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time of a user, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved. Meanwhile, the hit rate of the system is improved, the user recovery rate is reduced, and CDN customers are met to a certain extent. High availability of the central 302 system is guaranteed. In addition, nginx may feed back the target scheduling policy corresponding to the access request to the client only when the access request of the client or the target scheduling policy corresponding to the access request meets a specific condition. Therefore, nginx can be compatible with differences of different clients, the flexibility of the nginx in processing access requests of the different clients is improved, and the functions of the center 302 system are different.
In some embodiments, nginx and agent may each be a CDN node. As shown in fig. 6, the signaling interaction between nginx, nginx and the scheduling server includes the following steps:
s601, the agent sends a scheduling policy acquisition request to the scheduling server.
The time at which agent sends the scheduling policy acquisition request to the scheduling server may be random.
S602, the scheduling server returns 302 a scheduling policy (e.g., one or more scheduling policies) to the agent.
S603, agent sends a request to the 80 port of nginx.
And S604, nginx writes the 302 scheduling strategy into the shared memory.
The implementation, specific principles and technical effects of S601-S604 are consistent with the above embodiments, and are not described herein again.
Fig. 7 shows a signaling interaction process among the client, nginx, and sharedict. The process comprises the following steps:
s701, the client sends a request (for example, an access request) to the 80 port of nginx.
S702, nginx sends a query request for querying the shared memory to sharedict.
S703, the sharedict returns the target scheduling strategy to nginx.
And S704, nginx feeds back an http 302 response to the client.
The implementation, specific principles and technical effects of S701-S704 are consistent with the above embodiments, and are not described herein.
In other embodiments, one or more scheduling policies in the scheduling server may be stored in a relay server. When the scheduling server fails, the services can be provided by the relay server. As shown in fig. 8, the signaling interaction process among the relay server, the client, nginx, and sharedict. The process comprises the following steps:
s801, the relay server sends a request to the 80 port of nginx.
For example, the request sent by the relay server to the 80 port of nginx may include one or more scheduling policies stored in the relay server.
S802, nginx writes one or more scheduling policies (e.g., one or more scheduling policies stored in a relay server) to the shared memory.
S803, the client sends an access request to the 80 port of nginx.
S804, nginx sends a query request for querying the shared memory to sharedict.
S805, sharedict returns the target scheduling strategy to nginx.
And S806, nginx feeds back an http 302 response to the client.
The implementation, specific principles and technical effects of S801-S806 are consistent with the above embodiments and are not described herein.
Fig. 9 is a flowchart of another network access method provided in the embodiment of the present disclosure. The method comprises the following specific steps:
s901, the client sends an access request to the first server.
As shown in fig. 2, the client may be an application or a module in the terminal device 21, or the client may be the terminal device 21 itself. In particular, the client may send an access request to first server 22 requesting access to a network resource.
S902, the client receives a target scheduling policy from the first server, wherein the target scheduling policy is a scheduling policy corresponding to the access request, and the scheduling policy is determined by the first server from one or more pre-stored scheduling policies from a scheduling server.
The first server 22 may store one or more scheduling policies from the scheduling server locally or in a storage space corresponding to the first server 22. The storage space corresponding to the first server 22 may be a local storage space of the first server 22, or may also be a storage space outside the first server 22. For example, the storage space is a database, which may be integrated in the first server 22. Or the database may be another database server separate from the first server 22 to which the first server 22 may be communicatively connected.
When the first server 22 receives the access request from the client, the first server 22 may determine a target scheduling policy corresponding to the access request from one or more scheduling policies stored in advance from the scheduling server.
The first server 22 may send the target scheduling policy corresponding to the access request to the client. So that the client can receive the target scheduling policy corresponding to the access request from the first server 22.
According to the method and the device, the client side sends the access request to the first server, the first server determines a target scheduling policy corresponding to the access request from one or more scheduling policies which are stored in advance and come from the scheduling server according to the access request of the client side, and sends the target scheduling policy to the client side, so that the client side can access network resources in the optimal cache server according to URLs included in the target scheduling policy. That is to say, after the client sends the access request to the first server, the client does not need to send the access request to the scheduling server, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved.
Fig. 10 is a flowchart of another network access method provided in the embodiment of the present disclosure. The method comprises the following specific steps:
s1001, the client sends an access request to the first server.
The implementation and specific principles of S1001 and S901 are the same, and are not described herein again.
S1002, the client receives a target scheduling policy from the first server, wherein the target scheduling policy is a scheduling policy corresponding to the access request and determined by the first server from one or more pre-stored scheduling policies from a scheduling server.
The implementation and specific principles of S1002 and S902 are the same, and are not described herein again.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
S1003, the client accesses the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling policy.
The first server 22 may send the target scheduling policy corresponding to the access request to the client. Specifically, the target scheduling policy may include a Uniform Resource Locator (URL). The URL may point to the optimal cache server. Further, the client accesses the network resource in the optimal cache server according to the URL.
Fig. 11 is a flowchart of another network access method provided in the embodiment of the present disclosure. The method comprises the following specific steps:
s1101, the second server acquires one or more scheduling strategies from the scheduling server.
Optionally, the obtaining, by the second server, one or more scheduling policies from the scheduling server includes: the second server periodically obtains one or more scheduling policies from a scheduling server.
As shown in fig. 4, the second server 23 periodically or periodically transmits a scheduling policy acquisition request to the scheduling server 24. The scheduling server 24 periodically or periodically transmits one or more scheduling policies to the second server 23 as a response according to the scheduling policy acquisition request.
S1102, the second server sends the one or more scheduling policies to a first server, and the first server is used for storing the one or more scheduling policies and determining a target scheduling policy corresponding to the access request from the one or more scheduling policies according to the access request of the client.
The second server 23 sends the one or more scheduling policies to the first server 22. When the first server 22 receives the one or more scheduling policies sent by the second server 23, the first server 22 may store the one or more scheduling policies in a storage space corresponding to the first server 22, which may be, for example, the database server 25. It is to be understood that the number of scheduling policies is not limited in this embodiment, and may be one or more. Alternatively, the number of scheduling policies may be increasing over time. The client in the terminal device 21 sends an access request to the first server 22, the access request requesting access to the network resource in the optimal cache server. In the case that the first server 22 receives the access request, the first server 22 may send the access request of the client to a storage space corresponding to the first server 22, for example, the database server 25. For example, the database server 25 stores one or more scheduling policies from the scheduling server in advance. Further, the database server 25 may determine a target scheduling policy capable of pointing to the optimal cache server from one or more scheduling policies stored in advance according to the access request of the client. For example, each of the one or more pre-stored scheduling policies includes a URL, the database server 25 may sequentially detect the URL of each of the one or more scheduling policies, determine whether the URL of each scheduling policy may point to the optimal cache server, and use the scheduling policy corresponding to the URL capable of pointing to the optimal cache server as the target scheduling policy corresponding to the access request. Further, the first server 22 may send a query request to the database server 25, and the database server 25 feeds back the target scheduling policy corresponding to the access request to the first server 22 according to the query request, so that the first server 22 may obtain the target scheduling policy associated with the optimal cache server, that is, the target scheduling policy corresponding to the access request, from the database server 25. Further, the first server 22 may send the target scheduling policy to the client. The target scheduling policy may include a URL therein. The URL may point to the optimal cache server. Further, the client accesses the network resource in the optimal cache server according to the URL.
According to the method and the device, the client side sends the access request to the first server, the first server determines a target scheduling policy corresponding to the access request from one or more scheduling policies which are stored in advance and come from the scheduling server according to the access request of the client side, and sends the target scheduling policy to the client side, so that the client side can access network resources in the optimal cache server according to URLs included in the target scheduling policy. That is to say, after the client sends the access request to the first server, the client does not need to send the access request to the scheduling server, so that the complexity of the whole process from the initiation of the access request to the access of the network resource by the client is reduced, the time required by the client to access the network resource, namely the first packet time, is reduced, the rate of the client to access the network resource is improved, and the user experience is improved.
Fig. 12 is a schematic structural diagram of a network access device according to an embodiment of the present disclosure. The network access means may in particular be the first server or an element in the first server as described above. The network access device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the network access method, as shown in fig. 12, the network access device 120 includes:
a receiving module 121, configured to receive an access request of a client;
a determining module 122, configured to determine, according to an access request of the client, a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server;
a sending module 123, configured to send the target scheduling policy corresponding to the access request to the client.
Optionally, the receiving module 121 is further configured to: before receiving an access request of a client, receiving one or more scheduling policies sent by a second server, wherein the one or more scheduling policies are acquired by the second server from the scheduling server;
the network access device 120 further includes: a storage module 124; the scheduling policy module is used for storing the one or more scheduling policies in a storage space corresponding to the first server;
the determining module 122 is specifically configured to: and according to the access request of the client, determining a target scheduling policy associated with the optimal cache server from one or more scheduling policies from the scheduling server pre-stored in the storage space.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
Optionally, the first server and the second server are content distribution network nodes.
Optionally, when the sending module 123 sends the target scheduling policy corresponding to the access request to the client, the sending module is specifically configured to: and when at least one of a request parameter, a frame head and a request path of the access request of the client meets a preset condition, sending a target scheduling strategy corresponding to the access request to the client.
Optionally, when the sending module 123 sends the target scheduling policy corresponding to the access request to the client, the sending module is specifically configured to: and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
The network access apparatus in the embodiment shown in fig. 12 may be configured to execute the technical solution of the above method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 13 is a schematic structural diagram of a network access device according to an embodiment of the present disclosure. The network access device may specifically be a client as described above. The network access device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the network access method, as shown in fig. 13, the network access device 130 includes:
a sending module 131, configured to send an access request to a first server;
a receiving module 132, configured to receive a target scheduling policy from the first server, where the target scheduling policy is a scheduling policy corresponding to the access request, and the scheduling policy is determined by the first server from one or more scheduling policies from a scheduling server stored in advance.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server; the network access device 130 further includes: an accessing module 133, configured to, after the receiving module 132 receives the target scheduling policy from the first server, access the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling policy.
The network access apparatus in the embodiment shown in fig. 13 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 14 is a schematic structural diagram of a network access device according to an embodiment of the present disclosure. The network access device may specifically be the second server or a component in the second server as described above. The network access device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the network access method, as shown in fig. 14, the network access device 140 includes:
an obtaining module 141, configured to obtain one or more scheduling policies from a scheduling server;
a sending module 142, configured to send the one or more scheduling policies to a first server, where the first server is configured to store the one or more scheduling policies, and determine, according to an access request of a client, a target scheduling policy corresponding to the access request from the one or more scheduling policies.
Optionally, when the obtaining module 141 obtains one or more scheduling policies from the scheduling server, the obtaining module is specifically configured to: one or more scheduling policies are periodically obtained from a scheduling server.
The network access device in the embodiment shown in fig. 14 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, and are not described herein again.
Fig. 15 is a schematic structural diagram of a network access device according to an embodiment of the present disclosure. The network access device may specifically be a first server, a client or a second server as described above. The network access device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the network access method, as shown in fig. 15, the network access device 150 includes: memory 151, processor 152, computer programs, and communications interface 153; wherein the computer program is stored in the memory 151 and is configured to be executed by the processor 152 for the network access method as described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the network access method described in the above embodiment.
In addition, the embodiment of the present disclosure further provides a network access system, which includes the first server, the client and the second server described in the above embodiment;
the second server is used for acquiring one or more scheduling strategies from the scheduling server; sending the one or more scheduling policies to a first server; the first server is used for storing the one or more scheduling strategies;
the client is used for sending an access request to the first server;
the first server is used for receiving an access request of a client; according to the access request of the client, determining a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server; sending a target scheduling policy corresponding to the access request to the client;
the client is used for receiving the target scheduling strategy sent by the first server.
Optionally, before the first server receives the access request of the client, the first server is further configured to: receiving one or more scheduling policies sent by a second server, wherein the one or more scheduling policies are acquired by the second server from the scheduling server; storing the one or more scheduling policies in a storage space corresponding to the first server; when the first server determines, according to the access request of the client, a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server, the first server is specifically configured to: and according to the access request of the client, determining a target scheduling policy associated with the optimal cache server from one or more scheduling policies from the scheduling server pre-stored in the storage space.
Optionally, the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to an optimal cache server.
Optionally, the first server and the second server are content distribution network nodes.
Optionally, when the first server sends the target scheduling policy corresponding to the access request to the client, the first server is specifically configured to: and when at least one of a request parameter, a frame head and a request path of the access request of the client meets a preset condition, sending a target scheduling strategy corresponding to the access request to the client.
Optionally, when the first server sends the target scheduling policy corresponding to the access request to the client, the method is specifically configured to: and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
Optionally, after receiving the target scheduling policy from the first server, the client is further configured to: and accessing the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling strategy.
Optionally, when the second server obtains one or more scheduling policies from the scheduling server, the second server is specifically configured to: one or more scheduling policies are periodically obtained from a scheduling server.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. A method of network access, the method comprising:
a first server receives an access request of a client;
the first server determines a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client;
and the first server sends the target scheduling policy corresponding to the access request to the client.
2. The method of claim 1, wherein before the first server receives the access request from the client, the method further comprises:
the first server receives one or more scheduling strategies sent by a second server, wherein the one or more scheduling strategies are acquired by the second server from the scheduling server;
the first server stores the one or more scheduling strategies in a storage space corresponding to the first server;
the first server determines a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client, and the method comprises the following steps:
and the first server determines a target scheduling policy associated with an optimal cache server from one or more scheduling policies from a scheduling server pre-stored in the storage space according to the access request of the client.
3. The method of claim 1, wherein the target scheduling policy comprises a uniform resource locator, and wherein the uniform resource locator points to an optimal cache server.
4. The method of claim 2, wherein the first server and the second server are content distribution network nodes.
5. The method of claim 1, wherein the sending, by the first server, the target scheduling policy corresponding to the access request to the client comprises:
and when at least one of a request parameter, a frame header and a request path of the access request of the client meets a preset condition, the first server sends a target scheduling policy corresponding to the access request to the client.
6. The method of claim 1, wherein the sending, by the first server, the target scheduling policy corresponding to the access request to the client comprises:
and when the first server determines that the domain name of the cache server pointed by the uniform resource locator in the target scheduling policy is a preset domain name, sending the target scheduling policy corresponding to the access request to the client.
7. A method of network access, the method comprising:
the client sends an access request to a first server;
the client receives a target scheduling policy from the first server, the target scheduling policy being a scheduling policy corresponding to the access request that the first server determines from one or more scheduling policies pre-stored from a scheduling server.
8. The method of claim 7, wherein the target scheduling policy comprises a uniform resource locator, the uniform resource locator pointing to an optimal cache server;
after the client receives the target scheduling policy from the first server, the method further comprises:
and the client accesses the network resource in the optimal cache server according to the uniform resource locator included in the target scheduling strategy.
9. A method of network access, the method comprising:
the second server acquires one or more scheduling strategies from the scheduling server;
and the second server sends the one or more scheduling strategies to a first server, wherein the first server is used for storing the one or more scheduling strategies and determining a target scheduling strategy corresponding to an access request from the one or more scheduling strategies according to the access request of the client.
10. The method of claim 9, wherein the second server obtains one or more scheduling policies from the scheduling server, comprising:
the second server periodically obtains one or more scheduling policies from a scheduling server.
11. A network access device, comprising:
the receiving module is used for receiving an access request of a client;
the determining module is used for determining a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server according to the access request of the client;
and the sending module is used for sending the target scheduling strategy corresponding to the access request to the client.
12. A network access device, comprising:
the sending module is used for sending an access request to the first server;
a receiving module, configured to receive a target scheduling policy from the first server, where the target scheduling policy is a scheduling policy corresponding to the access request, and the scheduling policy is determined by the first server from one or more pre-stored scheduling policies from a scheduling server.
13. A network access device, comprising:
an obtaining module, configured to obtain one or more scheduling policies from a scheduling server;
and the sending module is used for sending the one or more scheduling policies to a first server, and the first server is used for storing the one or more scheduling policies and determining a target scheduling policy corresponding to the access request from the one or more scheduling policies according to the access request of the client.
14. A network access device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-10.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
16. A network access system, the system comprising: the system comprises a client, a first server and a second server;
the second server is used for acquiring one or more scheduling strategies from the scheduling server; sending the one or more scheduling policies to a first server; the first server is used for storing the one or more scheduling strategies;
the client is used for sending an access request to the first server;
the first server is used for receiving an access request of a client; according to the access request of the client, determining a target scheduling policy corresponding to the access request from one or more pre-stored scheduling policies from a scheduling server; sending a target scheduling policy corresponding to the access request to the client;
the client is used for receiving the target scheduling strategy sent by the first server.
CN202011164578.2A 2020-10-27 2020-10-27 Network access method, device, equipment, computer readable storage medium and system Pending CN114513554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011164578.2A CN114513554A (en) 2020-10-27 2020-10-27 Network access method, device, equipment, computer readable storage medium and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011164578.2A CN114513554A (en) 2020-10-27 2020-10-27 Network access method, device, equipment, computer readable storage medium and system

Publications (1)

Publication Number Publication Date
CN114513554A true CN114513554A (en) 2022-05-17

Family

ID=81546658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011164578.2A Pending CN114513554A (en) 2020-10-27 2020-10-27 Network access method, device, equipment, computer readable storage medium and system

Country Status (1)

Country Link
CN (1) CN114513554A (en)

Similar Documents

Publication Publication Date Title
EP2294515B1 (en) Request routing using network computing components
US9794216B2 (en) Request routing in a networked environment
US8156243B2 (en) Request routing
US9251112B2 (en) Managing content delivery network service providers
US8468247B1 (en) Point of presence management in request routing
US9237114B2 (en) Managing resources in resource cache components
US9003035B1 (en) Point of presence management in request routing
US8732309B1 (en) Request routing utilizing cost information
WO2010051459A1 (en) Accessing peer browser caches
JP2017521929A (en) Remote information query method and server
CN109067936A (en) A kind of method and device of domain name mapping
US10455039B2 (en) Method and router for sending and processing data
CN114513554A (en) Network access method, device, equipment, computer readable storage medium and system
US11095605B1 (en) Request routing utilizing encoded DNS-based messaging parameters

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