Request processing method and apparatus based on content delivery network, device, and medium
By deploying different role configuration information in CDN nodes and processing access requests according to hierarchical relationships, the problem that CDN node configuration cannot meet the needs of different domain names is solved, and a more stable origin pull link and efficient data transmission are achieved.
Patent Information
- Application Number
- PCT/CN2025/079507
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-02-27
- Publication Date
- 2026-01-02
AI Technical Summary
The existing CDN node configuration cannot meet the access requirements for different domain names, resulting in an unstable CDN origin pull link.
Configure different roles (edge layer, middle layer, and origin layer) in CDN nodes, and determine their roles according to the hierarchical relationship of CDN nodes in different transmission links, triggering the corresponding configuration information to take effect in order to handle access requests.
It improves the overall performance and efficiency of CDN, reduces data transmission latency, increases content distribution speed, and enhances network scalability and fault tolerance.
Smart Images

Figure CN2025079507_02012026_PF_FP_ABST
Abstract
Description
Request processing method, device and equipment based on content delivery network and medium
[0001] Cross-reference of related applications
[0002] The present application claims priority to the Chinese patent application No. 202410866480.3, filed on June 28, 2024, and entitled "Request processing method, device and equipment based on content delivery network and medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the field of network communication, and particularly relates to a request processing method, device and equipment based on a content delivery network and medium. BACKGROUND
[0004] Content Delivery Network (CDN) is an abbreviation. It is a distributed server network deployed all over the world, used to accelerate content transmission and delivery services on the Internet. When a user requests to access a website or application, CDN can select the nearest server to the user to provide content according to the user's location, thereby reducing loading time and increasing website performance. SUMMARY
[0005] The present application provides a request processing method, device and equipment based on a content delivery network and medium.
[0006] In a first aspect, the present application provides a request processing method based on a content delivery network. The method is applied to a CDN node in a content delivery network, and the method comprises:
[0007] Obtaining an access request, wherein the access request carries a target domain name requested to be accessed;
[0008] In response to the access request, obtaining a first role corresponding to the current CDN node in a target transmission link, wherein the target transmission link is determined from the CDN network by using the target domain name, the CDN network comprises a plurality of CDN nodes, the CDN nodes are deployed with configuration information corresponding to each role, and the role is determined according to the hierarchical relationship of the CDN node in different transmission links
[0009] Triggering the first configuration information corresponding to the first role to take effect, and processing the access request based on the first configuration information to obtain a first processing result.
[0010] In a second aspect, the present application provides a request processing device based on a content delivery network, comprising:
[0011] an acquisition module, configured to acquire an access request, wherein the access request carries a target domain name of a request access;
[0012] a response module, configured to respond to the access request, and acquire a first role corresponding to a current CDN node in a target transmission link, wherein the target transmission link is determined from a CDN network by using the target domain name, the CDN network comprises a plurality of CDN nodes, each of the CDN nodes is deployed with configuration information corresponding to each role, and the role is determined according to hierarchical information of the CDN node in different transmission links
[0013] a processing module, configured to trigger the first configuration information corresponding to the first role to take effect, and process the access request based on the first configuration information to obtain a first processing result.
[0014] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method in the first aspect or any of the corresponding implementation manners.
[0015] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method in the first aspect or any of the corresponding implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0017] FIG. 1 is a schematic diagram of a system framework according to some embodiments of the present application;
[0018] FIG. 2 is a flowchart of a request processing method based on a content distribution network according to some embodiments of the present application;
[0019] FIG. 3 is a flowchart of a transmission link including a single CDN node according to some embodiments of the present application;
[0020] FIG. 4 is a flowchart of a transmission link including a plurality of CDN nodes according to some embodiments of the present application;
[0021] FIG. 5 is a flowchart of a transmission link including two CDN nodes according to some embodiments of the present application;
[0022] FIG. 6 is a flow diagram of a request processing method based on a content distribution network according to some embodiments of the present application;
[0023] FIG. 7 is a structural block diagram of a request processing apparatus based on a content distribution network according to an embodiment of the present application;
[0024] FIG. 8 is a hardware structure diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In the CDN network, when ensuring that the client accesses different domain names, the CDN node needs to be able to make different responses and behaviors according to the corresponding configuration. However, the existing CDN node configuration may not meet the access requirements for different domain names. Thus, the CDN source link is not fixed.
[0026] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0027] According to the embodiments of the present application, a request processing method, apparatus, device and medium based on a content distribution network are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] FIG. 1 is a network architecture diagram provided by an embodiment of the present application. As shown in FIG. 1, the network architecture includes a client, a plurality of CDN nodes, and a source server. Each CDN node is deployed with a plurality of role configuration information, including an edge layer, a middle layer, and a source layer. The edge layer (L-Edge) is responsible for processing access-side configurations. It can return specific header information to the client according to specific conditions of the request, or respond to specific HTTP status codes. In addition, L-Edge can also perform security-related configurations such as anti-stealing link authentication. The middle layer (L-Middle) is a layer that processes some common configurations between L-Edge and L-Last. It is responsible for processing configuration contents common to both L-Edge and L-Last layers, such as configuring cache keys, specifying cache policies, etc. The source layer (L-Last) is responsible for processing source-related configurations. It is responsible for configuring source requests, such as appending source request header information, rewriting source URLs, etc. In the L-Last layer, the returned content can be processed again to ensure compliance with business requirements, and the result is returned to the user.
[0029] Specifically, the client sends an access request, for example, the client sends an access request through a browser or other application, which contains the target domain name to be accessed, such as "www.abc.com / index.html". The client's request is first sent to the local DNS server, which performs DNS resolution operation according to the target domain name to obtain the IP address corresponding to the target domain name. After the local DNS server returns the IP address corresponding to the target domain name, the client sends a request to the IP address. This IP address usually points to a load balancer of the CDN network. The load balancer selects a suitable CDN node to process the request according to the location of the client, network conditions, etc. The load balancer selects a suitable CDN node to process the request according to certain algorithms and strategies, such as the number of hops from the client, network delay, node load, etc. Once the CDN node is selected, the CDN node determines which layer to enable according to its position in the entire CDN link. According to the above configuration information, the CDN link can be divided into edge layer, middle layer and source layer. The selected CDN node will execute corresponding processing according to its role in the CDN link. The edge layer is responsible for processing access-side configurations, the middle layer is responsible for processing common configurations, and the source layer is responsible for processing source-related configurations. The CDN node generates a response according to the processing result, and returns the response to the client through the network.
[0030] It should be noted that the complex CDN configuration is decomposed into different role configurations, i.e., edge layer, intermediate layer, and source return layer configurations, which can more clearly manage and organize configuration information. Each layer is responsible for a specific function. At the same time, the abstracted hierarchy allows more flexible configuration of the CDN. According to specific needs, different role configurations can be added, modified, or deleted without affecting the functions of other roles. In addition, different roles can be optimized for their specific functions. The edge layer can focus on handling access-side requirements, the intermediate layer can optimize cache strategies, and the source return layer can handle source-related configurations. This can improve the overall performance and efficiency of the CDN, reduce data transmission delay, and improve content distribution speed.
[0031] A request processing method based on a content distribution network is provided in the embodiment. The method is applied to a CDN node in the content distribution network. FIG. 2 is a flowchart of a request processing method based on a content distribution network according to an embodiment of the present application. As shown in FIG. 2, the flow includes the following steps:
[0032] In step S101, an access request is obtained, wherein the access request carries a target domain name of a request access.
[0033] In the embodiment of the present application, the access request can be sent directly by the client, or forwarded by the previous CDN node of the current CDN node. The access request carries the target domain name of the request access. The target domain name is the domain name of the website or resource that the client wants to access, for example, "www.example.com".
[0034] It should be noted that the current CDN node and the previous CDN node belong to the target transmission link, and the target transmission link is determined from the CDN network according to the target domain name. In the CDN network, the transmission link is determined through DNS resolution.
[0035] Here's an example: Assuming the target domain is www.example.com, when a client accesses this domain, it first sends a DNS query request to its local DNS server. The local DNS server first checks its cache; if a resolution result for the domain exists, it returns it directly. Otherwise, the local DNS server sends a query request to the root DNS server. The root DNS server returns the corresponding authoritative DNS server address based on the domain's top-level domain (e.g., .com). After obtaining the authoritative DNS server address, the local DNS server sends a query request to the authoritative DNS server. The authoritative DNS server returns the IP address of the load balancer in the CDN network. After obtaining the IP address, the local DNS server sends a query request to the load balancer. The load balancer selects a CDN node in the CDN network based on algorithms (e.g., optimal path) and strategies, and returns its IP address to the local DNS server. The local DNS server returns the obtained node IP address to the user device. After the user device establishes a connection with the selected node, it sends an access request. Upon receiving the access request, the CDN node selects a matching transmission path using a routing algorithm. The path is optimized based on factors such as network topology, link quality, and traffic load.
[0036] Step S102: Respond to the access request and obtain the first role corresponding to the current CDN node in the target transmission link. The target transmission link is determined from the CDN network using the target domain name. The CDN network includes multiple CDN nodes, and each CDN node has configuration information corresponding to a role. The role is determined according to the hierarchical relationship of the CDN node in different transmission links.
[0037] It should be noted that the transmission link can be abstracted into three layers: the edge layer, the middle layer, and the origin layer. Since different CDN nodes play different roles in different transmission links, the configurations corresponding to the edge layer, middle layer, and origin layer are distributed to each CDN node. Each CDN node can then determine which configuration to enable based on its own role.
[0038] By configuring the roles of the edge layer, the intermediate layer and the origin-pull layer to each CDN node, the functions and roles of each node can be flexibly adjusted according to the changes of network environment and requirements. Configuring the role of the edge layer to the node closest to the user can realize the fast caching and distribution of static content, reducing the request delay of the user to the remote server. In this way, the loading speed and response efficiency of the content can be greatly improved. Configuring the role of the intermediate layer to the node at the intermediate position between the user and the content source server can cache and distribute dynamic content, reducing the request times and bandwidth consumption to the source server. In this way, the bandwidth cost can be effectively reduced, and the throughput of the whole network can be improved. In addition, by adopting the role configuration of the edge layer, the intermediate layer and the origin-pull layer, a multi-level distributed architecture can be realized in the CDN network. In this way, the scalability and fault tolerance of the network can be improved, and the stability and reliability of the whole network can be ensured.
[0039] In the embodiment of the present application, the first role of the current CDN node in the target transmission link is obtained, including the following steps A1-A2:
[0040] Step A1, detecting the hierarchical relationship of the current CDN node in the target transmission link to obtain a detection result.
[0041] Specifically, the hierarchical relationship of the current CDN node in the target transmission link is detected to obtain a detection result, including: obtaining the hierarchical structure of the target transmission link; based on the hierarchical structure, detecting whether there is a CDN node of other hierarchical level associated with the current CDN node in the target transmission link to obtain a detection result.
[0042] The target transmission link includes the transmission path from the current CDN node to the source station server. In the target transmission link, whether there is a CDN node of other hierarchical level associated with the current CDN node is detected in sequence. The detection can be performed by querying the configuration or routing table of the CDN network. According to the detection result, the CDN node information of other hierarchical level associated with the current CDN node in the target transmission link is obtained.
[0043] Step A2, determining the first role of the current CDN node in the target transmission link based on the detection result.
[0044] Specifically, the first role of the current CDN node in the target transmission link is determined based on the detection result, including:
[0045] If the detection result is that there is no CDN node of the previous hierarchical level and no CDN node of the next hierarchical level, it is determined that the first role of the current CDN node in the content distribution network is the edge layer, the intermediate layer and the origin-pull layer;
[0046] As shown in FIG. 3, only CDN node 1 exists in the target transmission link, CDN node 1 does not exist CDN nodes of the upper level, and does not exist CDN nodes of the lower level, thus CDN node 1 needs to undertake three roles, i.e. edge layer, intermediate layer and source layer. For CDN node 1, it needs to process user requests, cache and distribute static contents (edge layer role), acquire dynamic contents and cache and distribute (intermediate layer role), and acquire contents from a source server and distribute to other nodes (source layer role).
[0047] Alternatively, if the detection result is that the current CDN node does not exist CDN nodes of the upper level, and exists multiple CDN nodes of the lower level, it is determined that the first role of the current CDN node in the content distribution network is edge layer.
[0048] As shown in FIG. 4, the target transmission link includes CDN node 1, CDN node 2 to CDN node N, CDN node 1 does not exist CDN nodes of the upper level, and exists multiple CDN nodes of the lower level, thus CDN node 1 is at the edge position of the target transmission link, thus the role undertaken by the CDN node 1 is edge layer.
[0049] Alternatively, if the detection result is that the current CDN node exists CDN nodes of the upper level, and exists CDN nodes of the lower level, it is determined that the first role of the current CDN node in the content distribution network is intermediate layer.
[0050] As shown in FIG. 4, the target transmission link includes CDN node 1, CDN node 2, CDN node 3 to CDN node N, CDN node 2 and node 3 both exist CDN nodes of the upper level, and exist CDN nodes of the lower level, thus CDN node 2 and CDN node 3 are at the intermediate position of the target transmission link, thus the role undertaken by the CDN node 1 is intermediate layer.
[0051] Alternatively, if the detection result is that the current CDN node exists multiple CDN nodes of the upper level, and does not exist CDN nodes of the lower level, it is determined that the first role of the current CDN node in the content distribution network is source layer.
[0052] As shown in FIG. 4, the target transmission link includes CDN node 1, CDN node 2 to CDN node N, CDN node N exists multiple CDN nodes of the upper level, and does not exist CDN nodes of the lower level, thus CDN node N is at the end position of the target transmission link, thus the role undertaken by the CDN node 1 is source layer.
[0053] Or, the detection result is that the current CDN node does not exist a CDN node of the upper level and exists a CDN node of the lower level, and it is determined that the first role of the current CDN node in the content distribution network is the edge layer and the intermediate layer.
[0054] As shown in FIG. 5, the target transmission link includes two nodes of CDN node 1 and CDN node 2, the CDN node 1 does not exist a CDN node of the upper level and exists a CDN node of the lower level, so the CDN node 1 is at the edge position of the target transmission link, but it has only one CDN node of the lower level, so the CDN node 1 undertakes the role of the edge layer and the intermediate layer.
[0055] Or, the detection result is that the current CDN node exists a CDN node of the upper level and does not exist a CDN node of the lower level, and it is determined that the first role of the current CDN node in the content distribution network is the intermediate layer and the source return layer.
[0056] As shown in FIG. 5, the target transmission link includes two nodes of CDN node 1 and CDN node 2, the CDN node 2 exists a CDN node of the upper level and does not exist a CDN node of the lower level, so the CDN node 2 is at the end position of the target transmission link, but it has only one CDN node of the upper level, so the CDN node 2 undertakes the role of the intermediate layer and the source return layer.
[0057] In step S103, the first configuration information corresponding to the first role is triggered to take effect, and the access request is processed based on the first configuration information to obtain a first processing result.
[0058] In the embodiment of the present application, processing the access request based on the first configuration information to obtain a first processing result includes the following steps B1-B2:
[0059] In step B1, a processing strategy matched with the access request is obtained from the first configuration information.
[0060] Specifically, the configuration information corresponding to different roles includes preset processing strategies and routing rules. Among them, the configuration information corresponding to the edge layer includes a processing strategy, which is used to determine how to process the request on the access side. For example, a specific response header can be defined in the edge layer configuration to respond to specific header information of the client. In addition, a specific HTTP status code can be configured to process the request, such as redirecting the request or returning error information. Anti-hotlinking authentication strategy can also be configured to limit that only requests meeting specific conditions can access the content.
[0061] The configuration information corresponding to the intermediate layer contains processing strategies for processing common configurations. For example, a cache key can be configured to determine the content of the cache. A cache strategy can be configured, such as setting the expiration time of the cache or the update strategy of the cache.
[0062] The configuration information corresponding to the back-to-source layer also contains processing strategies. For example, a back-to-source request header can be added to add specific identification information when back-to-source. A back-to-source URL rewriting can be performed to redirect the request to a different source station. Advanced strategies for back-to-source can also be configured, such as load balancing or failover. These strategies can be customized as needed to meet specific requirements.
[0063] Step B2, processing the access request according to the processing strategy to obtain a first processing result.
[0064] In an embodiment of the present application, the target transmission link includes CDN node 1, CDN node 2 and CDN node 3, at this time the first role corresponding to CDN node 1 is the edge layer, when CDN node 1 receives an access request from a client, for example: www.abc.com / index.html, CDN node 1 processes the following according to the processing strategy associated with the edge layer: checks whether there is a cache of the content. If there is a cache and the cache content is still valid, CDN node 1 can directly respond to the client request and return the cache content. If there is no cache or the cache has expired, CDN node 1 performs the next step of processing, such as checking and processing specific header information, such as setting specific fields of the response header. Perform specific HTTP status code processing, such as returning a redirect or error response code according to the configuration. Perform specific security authentication operations, such as anti-hotlinking, etc.
[0065] In an embodiment of the present application, the target transmission link includes CDN node 1, CDN node 2 and CDN node 3, at this time the first role corresponding to CDN node 2 is the intermediate layer, indicating that the access request currently received is processed by the CDN node of the edge layer and sent, at this time the CDN node 2 of the intermediate layer will pass the request to the intermediate layer for further processing. The main task of CDN node 2 is to process some common configurations of the edge layer and the back-to-source layer, such as: configuring a cache key: the intermediate layer will determine the key of the cache according to the specific parameters or rules of the request, in order to perform more accurate cache control. In addition, CDN node 2 will determine the validity period of the cache, the type of the cache, etc. according to the configuration. In addition to processing common configurations, the intermediate layer does not perform direct content processing or back-to-source operation on the access request.
[0066] In an embodiment of the present application, the target transmission link includes CDN node 1, CDN node 2 and CDN node 3, at this time, the first role corresponding to CDN node 3 is the source layer, which indicates that the current received access request is sent after being processed by the CDN nodes of the edge layer and the intermediate layer, at this time, the main task of the CDN node of the source layer includes: adding a source request header, that is, the CDN node of the source layer needs to add some specific header information, such as the request source identifier, in the request forwarded to the source server. Alternatively, the CDN node of the source layer needs to rewrite the URL of the source request according to some rules or configurations to adapt to the needs of the source server. The main role of the source layer is to send the request that the edge layer cannot respond to the source server, and return the obtained content to the edge layer, further process and return to the client.
[0067] In an embodiment of the present application, the target transmission link includes CDN node 1 and CDN node 2, at this time, the first role corresponding to CDN node 1 is the edge layer and the intermediate layer. CDN node 1 in the target transmission link assumes the roles of the edge layer and the intermediate layer, so it will trigger the edge layer and the intermediate layer corresponding configuration information to take effect. First, when receiving an access request, CDN node 1 will process according to the edge layer configuration information. The edge layer configuration information defines the processing strategy, including defining specific response headers, configuring specific HTTP status codes and anti-piracy authentication strategies, etc. According to the configuration information, CDN node 1 will add specific response header information, such as setting cache strategy or redirecting request. In addition, CDN node 1 can also verify whether the request source meets the specific conditions according to the anti-piracy authentication strategy, only the request meeting the conditions can access the content. Then, CDN node 1 will process the request according to the intermediate layer configuration information. The intermediate layer configuration information includes processing strategies, such as cache key, cache strategy, etc. According to the configuration information, CDN node 1 will determine the cached content and set the cache expiration time or cache update strategy. After completing the processing of the edge layer and the intermediate layer, CDN node 1 will pass the processing result to CDN node 2. CDN node 2 continues subsequent processing.
[0068] In an embodiment of the present application, the target transmission link includes CDN node 1 and CDN node 2, and at this time, the first role corresponding to CDN node 2 is the intermediate layer and the source layer. After CDN node 1 receives the request of the client, CDN node 1 performs preliminary processing according to the configuration information, such as parsing the request, checking the edge layer configuration, and the like. Then, CDN node 1 forwards the request to CDN node 2. In CDN node 2, since it plays the role of the intermediate layer and the source layer, the first configuration information corresponding to the intermediate layer and the source layer is triggered to take effect. According to the intermediate layer configuration information, CDN node 2 can perform some common processing strategies, such as cache setting, cache key configuration, and the like. These common processing strategies will be applied to all requests passing through CDN node 2. Next, CDN node 2 processes the request according to the source layer configuration information. According to the configuration, CDN node 2 will append the source request header, perform source URL rewriting, configure the advanced strategy of the source, and the like. These processing strategies can be customized according to actual needs. After the processing is completed, CDN node 2 sends the processing result to the source server to perform the actual source operation. The source server will perform corresponding operations according to the processing result, such as providing the content of the request, returning specific response headers, and the like. CDN node 2 returns the result obtained from the source server to CDN node 1. Finally, CDN node 1 further processes the returned result according to the edge layer configuration information. CDN node 1 can define specific response headers, configure specific HTTP status codes, and the like according to the configuration. Finally, CDN node 1 returns the processing result to the client.
[0069] In an embodiment of the present application, when the target transmission link includes CDN node 1, the first role assumed by CDN node 1 includes the edge layer, the source layer, and the intermediate layer. The client sends an access request to CDN node 1. The edge layer of CDN node 1 starts processing the request according to the configuration information. According to the processing strategy of the configuration, specific response headers can be added, specific HTTP status codes can be set, or anti-stealing link authentication can be performed. The processing result is passed to the intermediate layer of CDN node 1. The intermediate layer processes the request according to the configuration information, such as determining the cache key, setting the cache strategy. The processing result is further passed to the source layer of CDN node 1. The source layer processes according to the configuration information, such as appending the source request header, performing source URL rewriting, or configuring the advanced strategy of the source. The processing result is passed to the source server, and the source server performs corresponding processing according to the processing result. The source server returns the final processing result to CDN node 1. After CDN node 1 receives the response of the source server, it determines whether to cache the response result according to the cache strategy of the intermediate layer, and CDN node 1 returns the final processing result to the client.
[0070] The embodiments of the present application deploy configuration information of different roles in the CDN node. When the CDN node processes the access request, the corresponding role of the CDN node in the target transmission link is determined according to the hierarchical relationship of the CDN node in different transmission links, and the corresponding configuration information of the role is triggered to take effect, so as to ensure the stability of the link and improve the efficiency and reliability of data transmission. Or in other words, a more stable source return link can be realized, and the efficiency and reliability of data transmission are improved. The problem that the existing CDN node configuration may not meet the access demand for different domain names, resulting in unstable CDN source return link, is solved. In other words, the embodiments of the present application deploy configuration information of different roles in the CDN node. When the CDN node processes the access request, the corresponding role of the CDN node in the transmission link is determined according to the hierarchical relationship of the CDN node in different transmission links, and the corresponding configuration information of the role is triggered to take effect, so as to ensure the stability of the link and improve the efficiency and reliability of data transmission. The problem that the existing CDN node configuration may not meet the access demand for different domain names, resulting in unstable CDN source return link, is solved.
[0071] In the embodiments of the present application, after the access request is processed based on the first configuration information to obtain the first processing result, as shown in FIG. 6, the method further includes:
[0072] Step S201, detecting whether there is update information for the target transmission link, wherein the update information is triggered according to the load condition of the target transmission link.
[0073] Specifically, the transmission link in the CDN network will face different load conditions, such as network congestion, node load overload, etc. In order to provide better service quality, it is necessary to monitor the load condition of the target transmission link in real time. The monitoring can cover bandwidth utilization, delay, packet loss rate and other indicators. Once the load condition of the target transmission link exceeds the preset threshold or reaches the condition of triggering the update, the generation of the update information will be triggered. These conditions can be set according to specific business requirements and performance indicators. For example, when the bandwidth utilization exceeds 80% or the delay exceeds 100ms, the generation of the update information is triggered. After the generation of the update information is triggered, the management system or intelligent scheduling system in the CDN network will generate corresponding update information according to the load condition of the target transmission link.
[0074] Step S202, if there is update information of the target transmission link, determining the changed target transmission link according to the update information.
[0075] The current target transmission link is analyzed, including link topology structure, device configuration, transmission performance and other aspects. This helps to determine the part that needs to be changed and the part that is affected. According to the update information and the current link analysis, the range of change is determined. This involves the change of part of the CDN nodes of the link.
[0076] In step S203, a second role corresponding to the current CDN node in the changed target transmission link is obtained, and second configuration information corresponding to the second role is triggered to take effect.
[0077] Specifically, the position of the CDN node in the changed target transmission link is obtained, and the second role corresponding to the current CDN node in the changed target transmission link is determined according to the position. The second configuration information corresponding to the second role is determined from the pre-set configuration information corresponding to a plurality of different roles, and the second configuration information is taken effect.
[0078] In step S204, the access request is processed based on the second configuration information to obtain a second processing result, and the first processing result is updated by using the second processing result.
[0079] The method provided by the embodiments of the present application can obtain the update information about the transmission link in real time by detecting the load condition of the target transmission link. In this way, the change and state of the link can be effectively monitored and identified, which helps to improve the reliability and performance of the transmission link. Secondly, according to the obtained update information, the changed target transmission link can be accurately determined. The transmission path can be adjusted in time to optimize the efficiency and quality of network transmission. By obtaining the second role corresponding to the CDN node in the changed target transmission link, the role of the current node can be understood. In this way, the CDN node can be more finely managed and configured to adapt to the requirements of different roles. If the second role is inconsistent with the first role, that is, the role has changed, the second configuration information corresponding to the second role can be taken effect. In this way, the parameters and functions of the node can be flexibly configured and adjusted according to the requirements of different roles, and the adaptability and flexibility of the system can be improved. The access request is processed according to the second configuration information, which can be personalized according to the requirements of different roles. The first processing result is updated by using the second processing result, which can improve the accuracy and effect of processing.
[0080] In the embodiments of the present application, after the access request is processed based on the first configuration information to obtain the first processing result, the method further comprises: determining a receiving device according to the first role; and sending the access request and the first processing result to the receiving device.
[0081] In the embodiments of the present application, a request processing device based on a content distribution network is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also implemented and conceived.
[0082] The embodiment provides a request processing device based on a content distribution network, as shown in Figure 7, comprising:
[0083] The acquisition module 701 is used for acquiring an access request, wherein the access request carries a target domain name of a request access;
[0084] The response module 702 is used for responding to the access request, acquiring a first role corresponding to a current CDN node in a target transmission link, wherein the target transmission link is determined from the CDN network by using the target domain name, the CDN network comprises a plurality of CDN nodes, the CDN nodes are deployed with configuration information corresponding to each role, and the role is determined according to hierarchical information of the CDN node in different transmission links;
[0085] The processing module 703 is used for triggering the first configuration information corresponding to the first role to take effect, and processing the access request based on the first configuration information to obtain a first processing result.
[0086] In the embodiment of the application, the response module 72 comprises:
[0087] The detection submodule is used for detecting a hierarchical relationship of the current CDN node in the target transmission link to obtain a detection result;
[0088] The determination submodule is used for determining the first role of the current CDN node in the target transmission link based on the detection result.
[0089] In the embodiment of the application, the detection submodule is used for acquiring a hierarchical structure of the target transmission link; and based on the hierarchical structure, detecting whether there is a CDN node of other levels associated with the current CDN node in the target transmission link to obtain a detection result.
[0090] In the embodiment of the present application, the determining sub-module is configured to determine the first role of the current CDN node in the content distribution network as the edge layer, the intermediate layer and the source return layer if the detection result is that the current CDN node does not exist the CDN node of the upper level and does not exist the CDN node of the next level; or, the detection result is that the current CDN node does not exist the CDN node of the upper level and exists the CDN node of the next level, then the first role of the current CDN node in the content distribution network is determined as the edge layer; or, the detection result is that the current CDN node exists the CDN node of the upper level and exists the CDN node of the next level, then the first role of the current CDN node in the content distribution network is determined as the intermediate layer; or, the detection result is that the current CDN node exists the CDN node of the upper level and does not exist the CDN node of the next level, then the first role of the current CDN node in the content distribution network is determined as the source return layer; or, the detection result is that the current CDN node does not exist the CDN node of the upper level and exists one CDN node of the next level, then the first role of the current CDN node in the content distribution network is determined as the edge layer and the intermediate layer; or, the detection result is that the current CDN node exists one CDN node of the upper level and does not exist the CDN node of the next level, then the first role of the current CDN node in the content distribution network is determined as the intermediate layer and the source return layer.
[0091] In the embodiment of the present application, the processing module 73 is configured to acquire the processing strategy matched with the access request from the first configuration information; and process the access request according to the processing strategy to obtain the first processing result.
[0092] In the embodiment of the present application, the apparatus further comprises an updating module configured to detect whether there is update information for the target transmission link, wherein the update information is triggered according to the load condition of the target transmission link; if there is the update information of the target transmission link, determine the changed target transmission link according to the update information; acquire the second role corresponding to the changed target transmission link of the current CDN node, and trigger the second configuration information corresponding to the second role to take effect; process the access request based on the second configuration information to obtain the second processing result, and update the first processing result by using the second processing result.
[0093] In the embodiment of the present application, the apparatus further comprises a sending module configured to determine the receiving device according to the first role; and send the access request and the first processing result to the receiving device.
[0094] Referring to FIG. 8, FIG. 8 is a structural diagram of a computer device according to an optional embodiment of the present application. As shown in FIG. 8, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses, and can be mounted on a common main board or mounted in other manners as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory, if needed. Also, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). One processor 10 is taken as an example in FIG. 8.
[0095] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.
[0096] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0097] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created by use of the computer device according to the display of the landing page of the applet, and the like. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0098] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the memory 20 can further include a combination of the above kinds of memories.
[0099] The computer device also comprises a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0100] The embodiments of the present application also provide a computer readable storage medium, the method according to the embodiments of the present application can be implemented in hardware, firmware, or be implemented as computer code recorded in a storage medium, or be implemented through network downloading and originally stored in a remote storage medium or a non-transitory machine readable storage medium and to be stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general computer, a special processor or programmable or special hardware. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor or the hardware, the method shown in the above embodiments is implemented.
[0101] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A request processing method based on a content delivery network, wherein the method is applied to a CDN node in the content delivery network, the method comprising: Obtain an access request, wherein the access request carries the target domain name to be accessed; In response to the access request, obtain the first role corresponding to the current CDN node in the target transmission link, wherein the target transmission link is determined from the CDN network using the target domain name, the CDN network includes multiple CDN nodes, and the CDN nodes deploy configuration information corresponding to each role, the role being determined according to the hierarchical relationship of the CDN nodes in different transmission links; The first configuration information corresponding to the first role is triggered to take effect, and the access request is processed based on the first configuration information to obtain the first processing result.
2. The method according to claim 1, wherein obtaining the first role corresponding to the current CDN node in the target transmission link includes: The hierarchical relationship of the current CDN node in the target transmission link is detected to obtain the detection result; Based on the detection results, the first role of the current CDN node in the target transmission link is determined.
3. The method according to claim 2, wherein detecting the hierarchical relationship of the current CDN node in the target transmission link to obtain a detection result includes: Obtain the hierarchical structure of the target transmission link; Based on the hierarchical structure, the system detects whether there are other CDN nodes associated with the current CDN node in the target transmission link, and obtains the detection result.
4. The method according to claim 2, wherein determining the first role of the current CDN node in the target transmission link based on the detection result includes: If the detection result is that the current CDN node does not have a CDN node at the upper level and does not have a CDN node at the lower level, then the first role of the current CDN node in the content delivery network is determined to be the edge layer, the middle layer, and the origin layer. Alternatively, if the detection result is that the current CDN node does not have a CDN node at the next higher level, but has multiple CDN nodes at the next lower level, then the first role of the current CDN node in the content delivery network is determined to be the edge layer. Alternatively, if the detection result shows that the current CDN node has a CDN node at the upper level and a CDN node at the lower level, then the first role of the current CDN node in the content delivery network is determined to be the middle layer. Alternatively, if the detection result shows that the current CDN node has multiple upper-level CDN nodes and no lower-level CDN nodes, then the first role of the current CDN node in the content delivery network is determined to be the origin layer. Alternatively, if the detection result is that the current CDN node does not have a CDN node at the next higher level, but has a CDN node at the next lower level, then the first role of the current CDN node in the content delivery network is determined to be the edge layer and the middle layer. Alternatively, if the detection result shows that the current CDN node has a CDN node at the next higher level and no CDN node at the next lower level, then the first role of the current CDN node in the content delivery network is determined to be the middle layer and the origin layer.
5. The method according to claim 1, wherein processing the access request based on the first configuration information to obtain a first processing result includes: Obtain the processing strategy that matches the access request from the first configuration information; The access request is processed according to the processing strategy to obtain the first processing result.
6. The method according to claim 1, wherein after processing the access request based on the first configuration information to obtain a first processing result, the method further includes: Detect whether there is any update information for the target transmission link, wherein the update information is triggered based on the load status of the target transmission link; If there is updated information for the target transmission link, then the changed target transmission link is determined based on the updated information; Obtain the second role of the current CDN node in the changed target transmission link, and trigger the second configuration information corresponding to the second role to take effect; The access request is processed based on the second configuration information to obtain a second processing result, and the first processing result is updated using the second processing result.
7. The method according to claim 1, wherein after processing the access request based on the first configuration information to obtain a first processing result, the method further includes: The receiving device is determined based on the first role; The access request and the first processing result are sent to the receiving device.
8. A request processing apparatus based on a content delivery network, wherein the apparatus comprises: The acquisition module is used to acquire access requests, wherein the access request carries the target domain name to be accessed; The response module is used to respond to the access request and obtain the first role corresponding to the current CDN node in the target transmission link. The target transmission link is determined from the CDN network using the target domain name. The CDN network includes multiple CDN nodes, and each CDN node has configuration information corresponding to a role deployed in it. The role is determined according to the hierarchical information of the CDN node in different transmission links. The processing module is used to trigger the first configuration information corresponding to the first role to take effect, and to process the access request based on the first configuration information to obtain a first processing result.
9. A computer device comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium, wherein computer instructions are stored on the computer-readable storage medium for causing a computer to perform the method of any one of claims 1 to 7.
Citation Information
Patent Citations
CDN (Content Delivery Network) system node configuration method and device, equipment and storage medium
CN114466031A
CDN (Content Delivery Network) and automatic scheduling method for upper layer returning requests of nodes of CDN
CN114500460A
Multi-level cdn caching method and system, storage medium and electronic equipment
CN115883562A
Media Distribution in a Content Delivery Network
US20110214059A1
Data processing for role assessment and course recommendation
US20200027050A1