A request processing method, apparatus, device, storage medium, and computer program product
By updating the request address in the PCDN system and obtaining resources directly from the CDN edge nodes, the problem of long origin pull times when terminal nodes have no resources is solved, thus improving system efficiency.
Patent Information
- Application Number
- CN202410780845.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-06-17
AI Technical Summary
When terminal nodes in the PCDN system have no resources, the time to retrieve data from the source is long, resulting in poor operating efficiency.
After receiving the client's request in the PCDN system, the request address is updated based on the business identifier, and resources are obtained directly from the edge node of the CDN system, avoiding proxying back to the origin through a designated distribution node.
This improves the efficiency of the PCDN system in acquiring resources when there are no resources on the terminal node, reduces the time spent returning to the source, and enhances the system's operating efficiency.
Smart Images

Figure CN118827803B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the information processing technology in the field of communication, and in particular to a request processing method and device, equipment, storage medium and computer program product. BACKGROUND
[0002] In a traditional content delivery network (CDN), a content provider (such as a website, a video platform, etc.) stores and distributes content by establishing distributed server nodes around the world; a user acquires content by communicating with the nearest server node to improve access speed and reliability. At present, an Internet company needs to rely on a CDN for content distribution, and bandwidth cost has become a relatively high part of the operating cost of an Internet company (especially a video Internet company). In order to save bandwidth, some Internet companies have begun to use a peer-to-peer content delivery network (P2P CDN) to distribute business, also known as PCDN. When a user requests a certain resource, the PCDN system attempts to acquire the resource from other terminal nodes having the same resource, and if the resource is cached in the terminal node in the PCDN system, the terminal node provides the resource to the user; if all distribution nodes (i.e., terminals) do not cache the resource, the PCDN system performs source return to the CDN. The current PCDN generally uses a proxy source return mode, that is, a designated distribution node proxies the user to return to the source of the CDN, downloads the resource and provides it to the user. However, this mode has a long source return time and poor running efficiency. SUMMARY
[0003] To solve the above technical problems, the embodiments of the present application provide a request processing method, device, equipment, storage medium and computer program product, which solve the problem of long source return time of the related art for providing resources to users when all terminal nodes in a PCDN system do not have the requested resources, and improve the running efficiency.
[0004] To achieve the above object, the technical scheme of the embodiments of the present application is as follows:
[0005] A request processing method, the method comprising:
[0006] receiving a first acquisition request sent by a client for acquiring a service resource; wherein the first acquisition request includes a service identifier and a request address;
[0007] when it is determined based on the first acquisition request that a distribution node corresponding to a first server does not have a service resource corresponding to the service identifier, updating the request address based on the service identifier to obtain an updated address;
[0008] sending the updated address to the client, so that the client acquires the target service resource corresponding to the request address from a target edge node corresponding to the second server based on the updated address.
[0009] In the above scheme, the updating of the request address based on the service identifier to obtain an updated address comprises:
[0010] determining a first domain name corresponding to the service corresponding to the first acquisition request based on the service identifier;
[0011] determining the updated address based on the back-to-source domain name and the request address.
[0012] In the above scheme, the updating of the request address based on the service identifier to obtain an updated address comprises:
[0013] determining a category of the service corresponding to the first acquisition request based on the service identifier;
[0014] determining a second domain name corresponding to the service based on the category;
[0015] determining the updated address based on the second domain name and the request address.
[0016] In the above scheme, the method further comprises:
[0017] determining a request number of the service resource corresponding to each received acquisition request;
[0018] when the request number is greater than a target threshold, acquiring the service resource from the edge node and storing.
[0019] A request processing method, the method comprising:
[0020] receiving an updated address sent by a client; wherein the updated address is obtained by updating a request address in a first acquisition request for acquiring a service resource sent by the client based on a first server;
[0021] determining a target edge node from a plurality of edge nodes corresponding to a second server based on the updated address;
[0022] sending an identifier of the target edge node to the client, so that the client acquires a target service resource corresponding to the request address based on the identifier of the target edge node.
[0023] A request processing method, the method comprising:
[0024] receive a second acquisition request sent by a client and carrying an updated address and a service identifier; the updated address is obtained by updating a request address in a first acquisition request sent by the client and used to acquire a service resource, based on a first server;
[0025] when it is determined that the updated address has a target domain name matching the service identifier, process the updated address to obtain the request address;
[0026] based on the request address, send a target service resource corresponding to the request address to the client.
[0027] In the above scheme, when it is determined that the updated address has a target domain name matching the service identifier, the updated address is processed to obtain the request address, comprising:
[0028] when it is determined that the first level in the updated address has a first domain name matching the service identifier, the first domain name in the updated address is deleted by using a target address rewriting technology to obtain the request address; the target domain name includes the first domain name.
[0029] In the above scheme, when it is determined that the updated address has a target domain name matching the service identifier, the updated address is processed to obtain the request address, comprising:
[0030] when it is determined that the first level in the updated address has a second domain name matching the service identifier, the updated address is processed based on the second domain name to obtain the request address; the target domain name includes the second domain name.
[0031] A first request processing apparatus, comprising:
[0032] a first receiving unit configured to receive a first acquisition request sent by a client and used to acquire a service resource; the first acquisition request includes a service identifier and a request address;
[0033] a first processing unit configured to, when it is determined that a distribution node corresponding to a first server does not have a service resource corresponding to the service identifier, update the request address based on the service identifier to obtain an updated address;
[0034] a first sending unit configured to send the updated address to the client, so that the client acquires a target service resource corresponding to the request address from a target edge node corresponding to a second server based on the updated address.
[0035] A second request processing apparatus, comprising:
[0036] The second receiving unit is configured to receive an update address sent by a client; wherein the update address is obtained by updating a request address in a first acquisition request for acquiring a service resource sent by the client based on the first server;
[0037] The determining unit is configured to determine a target edge node from a plurality of edge nodes corresponding to the second server based on the update address;
[0038] The second sending unit is configured to send an identifier of the target edge node to the client, so that the client acquires a target service resource corresponding to the request address based on the identifier of the target edge node.
[0039] A third request processing apparatus, comprising:
[0040] The third receiving unit is configured to receive a second acquisition request sent by a client and carrying an update address and a service identifier; wherein the update address is obtained by updating a request address in a first acquisition request for acquiring a service resource sent by the client based on the first server;
[0041] The second processing unit is configured to process the update address to obtain the request address when the update address has a target domain name matching the service identifier.
[0042] The third sending unit is configured to send a target service resource corresponding to the request address to the client based on the request address.
[0043] A first server, comprising: a first processor, a first memory and a first communication bus;
[0044] The first communication bus is configured to realize the communication connection between the first processor and the first memory;
[0045] The first processor is configured to execute a request processing program in the first memory to realize the steps of the above request processing method.
[0046] A second server, comprising: a second processor, a second memory and a second communication bus;
[0047] The second communication bus is configured to realize the communication connection between the second processor and the second memory;
[0048] The second processor is configured to execute a request processing program in the second memory to realize the steps of the above request processing method.
[0049] A target edge node, comprising: a third processor, a third memory and a third communication bus;
[0050] The third communication bus is configured to realize communication connection between the third processor and the third memory.
[0051] The third processor is configured to execute a request processing program in the third memory to realize the steps of the request processing method.
[0052] A computer readable storage medium stores one or more programs, which can be executed by one or more processors to realize the steps of the request processing method.
[0053] A computer program product comprises a computer program, which realizes the request processing method when executed by a processor.
[0054] The request processing method, device, equipment, storage medium and computer program product provided by the embodiments of the present application can receive a first acquisition request sent by a client, the first acquisition request being used to acquire a service resource and comprising a service identifier and a request address, update the request address based on the service identifier to obtain an updated address when it is determined that the first server corresponding to the first acquisition request does not have a service resource corresponding to the service identifier in a distribution node, and send the updated address to the client, so that the client acquires a target service resource corresponding to the request address from a target edge node corresponding to a second server based on the updated address. In this way, when it is determined that the corresponding distribution node does not have the corresponding resource, the client can directly acquire the corresponding resource from the edge node corresponding to the CDN system, instead of providing the corresponding resource to the user in the manner of proxying the user to the CDN by the specified distribution node as in the related art, thereby solving the problem that the related art provides the resource to the user in the manner of long back-to-source time when the terminal node of the PCDN system does not have the corresponding resource, and improving the operation efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 A flowchart of a request processing method provided by an embodiment of the present application;
[0056] Figure 2 A flowchart of another request processing method provided by an embodiment of the present application;
[0057] Figure 3 A flowchart of another request processing method provided by an embodiment of the present application;
[0058] Figure 4 A flowchart of a request processing method provided by another embodiment of the present application;
[0059] Figure 5Another flowchart of a request processing method provided for another embodiment of the present application is shown in FIG. 6;
[0060] Figure 6 A schematic diagram of a PCDN source optimization system architecture corresponding to the request processing method provided for the embodiment of the present application is shown in FIG. 7;
[0061] Figure 7 A structural schematic diagram of a first request processing device provided for the embodiment of the present application is shown in FIG. 8;
[0062] Figure 8 A structural schematic diagram of a second request processing device provided for the embodiment of the present application is shown in FIG. 9;
[0063] Figure 9 A structural schematic diagram of a third request processing device provided for the embodiment of the present application is shown in FIG. 10;
[0064] Figure 10 A structural schematic diagram of a first server provided for the embodiment of the present application is shown in FIG. 11;
[0065] Figure 11 A structural schematic diagram of a second server provided for the embodiment of the present application is shown in FIG. 12;
[0066] Figure 12 A structural schematic diagram of a target edge node provided for the embodiment of the present application is shown in FIG. 13. DETAILED DESCRIPTION
[0067] 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.
[0068] It should be understood that the "embodiments of the present application" or "the foregoing embodiments" mentioned throughout the specification mean that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in the embodiments of the present application" or "in the foregoing embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. In various embodiments of the present application, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The serial number of the above-mentioned embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments.
[0069] When not specifically stated, the electronic device performs any step in the embodiments of the present application, which can be performed by the processor of the electronic device. It is also worth noting that the embodiments of the present application do not limit the order of the steps performed by the electronic device. In addition, the way of processing data in different embodiments can be the same method or different method. It should be noted that any step in the embodiments of the present application can be independently executed by the electronic device, that is, the electronic device can execute any step in the embodiments below without depending on the execution of other steps.
[0070] It should be understood that the specific embodiments described herein are merely intended to explain the present application and are not intended to limit the present application.
[0071] The embodiments of the present application provide a request processing method, which can be applied to a first server, referring to FIG. 1, the method can include the following steps: Figure 1
[0072] Step 101, receiving a first acquisition request sent by a client for acquiring a service resource.
[0073] In the first acquisition request, a service identifier and a request address are included.
[0074] In the embodiments of the present application, the client can refer to a client of a service resource acquisition request; the first server can refer to a PCDN scheduling system in a PCDN system. When the client needs to acquire a service corresponding to a service resource, the client can carry the service identifier of the service and the request address of the required access resource in the first acquisition request and send it to the PCDN scheduling system.
[0075] Step 102, when it is determined based on the first acquisition request that the first server does not have a service resource corresponding to the service identifier in the distribution node, updating the request address based on the service identifier to obtain an updated address.
[0076] The distribution node can refer to a PCDN distribution node (i.e., a terminal). Specifically, after the PCDN scheduling system receives the first acquisition request sent by the client, the PCDN scheduling system can query whether the target service resource corresponding to the service identifier (i.e., the service resource required by the client) exists in the PCDN distribution node corresponding to the PCDN scheduling system in response to the first acquisition request. If it is determined that the target service resource exists in a certain PCDN distribution node, the PCDN scheduling system returns the identifier of the corresponding PCDN distribution node to the client in a Hypertext Transfer Protocol (HTTP) 302 manner, and the client acquires the target service resource from the corresponding PCDN distribution node (terminal). If it is determined that the target service resource does not exist in all PCDN distribution nodes, the PCDN scheduling system can modify the request address according to the service identifier to obtain an updated address.
[0077] Step 103: sending the updated address to the client, so that the client acquires the target service resource corresponding to the request address from the target edge node corresponding to the second server based on the updated address.
[0078] In the embodiments of the present application, the second server can refer to a CDN fusion scheduling system in a CDN system. Specifically, the PCDN scheduling system can send the obtained updated address to the client in an HTTP 302 manner, and then the client can determine the target edge node from the CDN fusion scheduling system according to the updated address, and acquire the target service resource from the target edge node.
[0079] The request processing method provided by the embodiments of the present application can be applied to the second server. Referring to FIG. 8, the method can include the following steps:
[0080] Based on the foregoing embodiments, the embodiments of the present application provide a request processing method. The method can be applied to a second server. Referring to FIG. 8, the method can include the following steps: Figure 2
[0081] Step 201: receiving an updated address sent by a client.
[0082] The updated address is obtained by updating the request address in the first acquisition request sent by the client to acquire the service resource based on the first server.
[0083] In the embodiment of the present application, after the client receives the update address sent by the PCDN scheduling system, the client can initiate a resolution request for the update address to a local (Local) domain name server (Domain Name Server, DNS), and the Local DNS recursively resolves the update address to the CDN fusion scheduling system for resolution. In this way, the CDN fusion scheduling system can receive the update address sent by the client.
[0084] Step 202, determining a target edge node from a plurality of edge nodes corresponding to the second server based on the update address.
[0085] Specifically, after the CDN fusion scheduling system receives the update address sent by the client through the Local DNS, the CDN fusion scheduling system can process the update address and determine a target edge node capable of providing a target service resource from all CDN edge nodes. Of course, the identifier of the target edge node can be obtained.
[0086] Step 203, sending the identifier of the target edge node to the client, so that the client obtains the target service resource corresponding to the request address based on the identifier of the target edge node.
[0087] In the embodiment of the present application, the CDN fusion scheduling system can send the identifier of the determined target edge node to the client. Then, the client can obtain the target service resource from the target edge node corresponding to the identifier of the target edge node.
[0088] It should be noted that the same steps and the same content in the present embodiment and other embodiments are described with reference to the descriptions in other embodiments, and will not be described here.
[0089] The request processing method provided by the embodiment of the present application can be used to solve the problem of long back-to-source time in the related art when the terminal node of the PCDN system does not have the corresponding resource, and improve the operation efficiency.
[0090] Based on the foregoing embodiment, the embodiment of the present application provides a request processing method, which can be applied to a target edge node. As shown in Figure 3 The method can include the following steps:
[0091] Step 301, receiving a second acquisition request sent by a client and carrying an update address and a service identifier.
[0092] The updated address is obtained by the first server based on updating a request address in the first acquisition request sent by the client for acquiring the service resource.
[0093] In the embodiment of the present application, after receiving the identifier of the target edge node sent by the CDN fusion scheduling system, the client can send a second acquisition request including the updated address and the service identifier to the target edge node, and then the target edge node can receive the second acquisition request.
[0094] Step 302, when it is determined that the updated address has a target domain name matching the service identifier, processing the updated address to obtain a request address.
[0095] In the embodiment of the present application, the target edge node can process the updated address in the received second acquisition request, and when it is determined that the updated address has a target domain name matching the service identifier, delete the target domain name in the updated address to obtain the request address.
[0096] Step 303, based on the request address, sending the target service resource corresponding to the request address to the client.
[0097] The target edge node can synchronize the request address (i.e. the actual service domain name) to the CDN cache server corresponding to the target edge node through the CDN source return control module; then the CDN cache server returns the target service resource corresponding to the request address to the client.
[0098] It should be noted that the same steps and the same content in other embodiments in the present embodiment can refer to the description in other embodiments, and will not be described here.
[0099] The request processing method provided by the embodiments of the present application solves the problem of long source return time in the related art when the terminal node of the PCDN system does not have the corresponding resource, and improves the running efficiency.
[0100] Based on the foregoing embodiments, the embodiments of the present application provide a request processing method, which can include the following steps as shown in Figure 4 and Figure 5 The method can include the following steps:
[0101] Step 401, the first server receives a first acquisition request sent by the client for acquiring a service resource.
[0102] The service identifier and the request address are included in the first acquisition request.
[0103] In the embodiments of the present application, the request processing method in the present application can be applied to Figure 5 a corresponding PCDN source return optimization system architecture; as Figure 6 shown, the PCDN source return optimization system architecture can include a PCDN system and a CDN system; wherein the PCDN system can include a PCDN scheduling system and a plurality of PCDN distribution nodes; the CDN system can include a CDN fusion scheduling system and a plurality of CDN edge nodes; and each CDN edge node can include a source return control component and a CDN cache server.
[0104] It should be noted that the client hopes to request the service resource (http: / / A.com / demo.ts), initiates a DNS resolution request of the service domain name (A.com), and recursively resolves to the CDN fusion scheduling system by the Local DNS; the CDN fusion scheduling system judges whether the service domain name (A.com) is joined in the PCDN network; if yes, returns the PCDN scheduling system CNAME (htc.A.com); the client initiates a PCDN scheduling system CNAME (htc.A.com) domain name resolution request to the Local DNS; the Local DNS returns the resolution result to the client, and returns the IP of the PCDN scheduling system to the client (1.1.1.1) through the A record; and then, the client initiates an HTTP request (http: / / A.com / demo.ts) to the PCDN scheduling system. Wherein, the request address can refer to http: / / A.com / demo.ts.
[0105] It should be noted that, as Figure 4 shown, step 401 can be followed by step 402, or as Figure 5 shown, step 401 is followed by steps 403-404.
[0106] Step 402, when the first server determines that the first server does not have the service resource corresponding to the service identifier in the distribution node corresponding to the first server based on the first acquisition request, the first server determines the first domain name corresponding to the service corresponding to the first acquisition request based on the service identifier, and determines the update address based on the first domain name and the request address.
[0107] The first domain name can refer to a source domain name. In the embodiment of the present application, if the PCND system does not have a target service resource requested by a user, the PCND scheduling system rewrites a uniform resource locator (URL) requested by the client, adds a CDN source domain name (B.com) for the service domain name (A.com) to the original URL, and returns the rewritten URL, i.e., http: / / B.com / A.com / demo.ts, to the client in an HTTP 302 mode. The update address can refer to http: / / B.com / A.com / demo.ts.
[0108] In step 403, when the first server determines that the first server does not have a service resource corresponding to the service identifier in the distribution node corresponding to the first server based on the first acquisition request, the first server determines the category of the service corresponding to the first acquisition request based on the service identifier.
[0109] The PCND scheduling system can determine the category of the service based on the service identifier.
[0110] In step 404, the first server determines a second domain name corresponding to the service based on the category, and determines an update address based on the second domain name and the request address.
[0111] In the embodiment of the present application, the second domain name can refer to a group domain name. If a source domain name is configured for each service domain name, the number of CDN configuration items will be greatly increased, and the CDN running efficiency will be affected after the configuration file is loaded into the memory. Therefore, a group can be set for each category of service domain name, and a same source domain name can be used to perform source for the domain names in the group. When a user initiates a resource request to the PCND, if there is no cache, the PCND scheduling system determines whether the domain name is a group domain name (for example, *.A.com) based on the category of the service, and if yes, returns a rewritten URL through HTTP 302, i.e., a CDN source domain name (B.com) is added to the group domain name.
[0112] Specifically, the source control component in the CDN edge node sets a service domain name group (*.A.com), and configures a source domain name (B.com) for the domain name group. When the PCND system cannot provide a service, the client receives a URL returned by the PCND system and carrying the source domain name (B.com), and initiates a request http: / / B.com / *.A.com / demo.ts to the CDN edge node. The update address is http: / / B.com / *.A.com / demo.ts.
[0113] It should be noted that step 402 and step 404 can be followed by step 405.
[0114] Step 405, the first server sends the updated address to the client.
[0115] Step 406, the second server receives the updated address sent by the client.
[0116] The updated address is obtained by the first server based on the request address in the first acquisition request sent by the client for acquiring the service resource, and is sent to the client.
[0117] Step 407, the second server determines the target edge node from the plurality of edge nodes corresponding to the second server based on the updated address.
[0118] Step 408, the second server sends the identification of the target edge node to the client.
[0119] Step 409, the target edge node receives the second acquisition request sent by the client based on the identification of the target edge node, which carries the updated address and the service identification.
[0120] The identification of the target edge node is determined by the second server based on the updated address.
[0121] It should be noted that after step 409, step 410 or step 411 can be performed.
[0122] Step 410, when the target edge node determines that the first domain name in the updated address matches the service identification in the first level, the target edge node deletes the first domain name in the updated address using a target address rewriting technique to obtain the request address.
[0123] The target domain name includes the first domain name.
[0124] The target address rewriting technique can refer to a URL rewriting technique. Specifically, after receiving the second request of the client, the target edge node in the CDN edge node judges whether the first level domain name in the request address is a back-to-source domain name. If so, the back-to-source control component of the CDN is started, and then the back-to-source control component of the CDN uses the URL rewriting technique to remove the first level domain name and rewrite it as the actual service domain name, i.e. the URL is rewritten as http: / / A.com / demo.ts (i.e. the actual service domain name).
[0125] Step 411, when the target edge node determines that the second domain name in the updated address matches the service identification in the first level, the target edge node processes the updated address based on the second domain name to obtain the request address.
[0126] The target domain name includes the second domain name.
[0127] In the embodiment of the present application, the CDN back-to-source control component identifies the request domain name of the client, and if the first level is a back-to-source domain name (may also be referred to as a grouping domain name, i.e., each group corresponds to a back-to-source domain name), the request URL can be split according to the second domain name to identify the second-level domain name in the URL, i.e., the actual service business domain name can be identified, and then the URL is rewritten to the actual business domain name. The CDN back-to-source control module synchronizes the business domain name (*.A.com) information to the CDN cache server of the target edge node of the CDN.
[0128] It should be noted that step 401 can be followed by step 402, step 409 can be followed by step 410; step 401 can be followed by steps 403-404, step 409 can be followed by step 411; and step 410 and step 411 can be followed by step 412.
[0129] Step 412, the target edge node sends the target business resource corresponding to the request address to the client based on the request address.
[0130] In other embodiments of the present application, the method can further include the following steps:
[0131] Step 413, the first server determines the request number of the business resource corresponding to each received acquisition request.
[0132] Step 414, when the request number is greater than a target threshold, the first server acquires the business resource from the edge node and stores it.
[0133] In the embodiment of the present application, the PCDN scheduling system records the access number of the business resource, and when the target threshold is reached, the resource is downloaded from the CDN and cached. It should be noted that in addition to supporting domain name rewriting, the back-to-source control component of the CDN edge node also needs to perform operation and maintenance processing, such as operation and maintenance analysis data for user access logs, and data conversion is also needed, so that the logs generated by the user's back-to-source request are the logs of the real business domain name.
[0134] It should be noted that the PCDN scheduling system performs URL rewriting on the requests that need to be back-sourced, and the PCDN terminal node does not need to proxy the user to the CDN for back-sourcing, the user can directly access the CDN to obtain the required resource, which greatly improves the back-sourcing efficiency. Moreover, the CDN back-to-source control component can identify the back-to-source domain name and process the URL, which can reduce the configuration of the back-to-source domain name on the CDN side, reduce the configuration items, facilitate management, improve the CDN operation efficiency, and reduce the configuration time of the back-to-source domain name on the CDN side, and more efficiently support the distribution of business domain names. In addition, there is no need to modify the client side or the user's client, which is more convenient and flexible to implement.
[0135] It should be noted that the same steps and the same content in the embodiments and other embodiments are described with reference to the description of other embodiments, and will not be described here.
[0136] The request processing method provided by the embodiments of the present application can be used in the PCDN system, when it is determined that none of the corresponding distribution nodes has the resource corresponding to the request, the client can directly obtain the corresponding resource from the edge node corresponding to the CDN system, without the way of providing the corresponding resource to the user by the designated distribution node proxying the user to the CDN source in the related art, solving the problem of long source return time in the related art when none of the terminal nodes of the PCDN system has the resource corresponding to the request, and improving the running efficiency.
[0137] Based on the foregoing embodiments, the embodiments of the present application provide a first request processing device, which can be applied to Figure 1 、 4 and the request processing method provided by the embodiments of the first request processing device 5 can correspond to the request processing method provided by the embodiments of the first request processing device 5, as shown in Figure 7 The first request processing device 5 can include a first receiving unit 51, a first processing unit 52 and a first sending unit 53, wherein:
[0138] The first receiving unit 51 is configured to receive a first acquisition request for acquiring a service resource sent by a client; wherein the first acquisition request includes a service identifier and a request address;
[0139] The first processing unit 52 is configured to, when it is determined based on the first acquisition request that none of the distribution nodes corresponding to the first server has the service resource corresponding to the service identifier, update the request address based on the service identifier to obtain an updated address;
[0140] The first sending unit 53 is configured to send the updated address to the client, so that the client acquires the target service resource corresponding to the request address from the target edge node corresponding to the second server based on the updated address.
[0141] In other embodiments of the present application, the first processing unit 52 is further configured to perform the following steps:
[0142] determining a first domain name corresponding to the service corresponding to the first acquisition request based on the service identifier;
[0143] determining the updated address based on the first domain name and the request address.
[0144] In other embodiments of the present application, the first processing unit 52 is further configured to perform the following steps:
[0145] determining the category of the service corresponding to the first acquisition request based on the service identifier;
[0146] determine the second domain name corresponding to the service based on the category;
[0147] determine the update address based on the second domain name and the request address.
[0148] In other embodiments of the present application, the first processing unit 52 is further configured to perform the following steps:
[0149] determine the request times of the service resource corresponding to each received acquisition request;
[0150] when the request times are greater than the target threshold, acquire the service resource from the edge node and store it.
[0151] It should be noted that the specific implementation process of the steps performed by each unit in the embodiments of the present application can refer to the implementation process in the request processing method provided by the corresponding embodiments of Figure 1 、 4 and 5, which will not be described here.
[0152] The first request processing apparatus provided by the embodiments of the present application, when the PCDN system determines that none of the corresponding distribution nodes has the requested resource, the client can directly acquire the corresponding resource from the edge node corresponding to the CDN system, without the need for the designated distribution node to proxy the user to the CDN in the manner of back source to provide the corresponding resource to the user as in the related art, solving the problem of long back source time in the related art when none of the terminal nodes of the PCDN system has the requested resource to provide the resource to the user, and improving the running efficiency.
[0153] Based on the foregoing embodiments, the embodiments of the present application provide a second request processing apparatus, which can be applied in the request processing method provided by the corresponding embodiments of Figure 2 、 4 and 5, and with reference to Figure 8 , the second request processing apparatus 6 can include a second receiving unit 61, a determination unit 62, and a second sending unit 63, wherein:
[0154] The second receiving unit 61 is configured to receive an update address sent by a client; wherein the update address is obtained by a first server based on the request address in a first acquisition request sent by the client for acquiring a service resource, and sent to the client;
[0155] The determination unit 62 is configured to determine a target edge node from a plurality of edge nodes corresponding to a second server based on the update address;
[0156] The second sending unit 63 is configured to send an identifier of the target edge node to the client, so that the client acquires a target service resource corresponding to the request address based on the identifier of the target edge node.
[0157] It should be noted that the specific implementation process of the steps performed by each unit in the embodiments of the present application can refer to the implementation process in the request processing method provided by the corresponding embodiments of Figure 2 、 4 and 5, which will not be described here.
[0158] The second request processing apparatus provided by the embodiments of the present application can be used in the PCDN system, when it is determined that none of the corresponding distribution nodes has the corresponding resource, the client can directly obtain the corresponding resource from the edge node corresponding to the CDN system, without the way of providing the corresponding resource to the user by the designated distribution node proxying the user to the CDN source in the related art, which solves the problem of long source return time in the related art when the terminal node of the PCDN system has no corresponding resource, and improves the running efficiency.
[0159] Based on the foregoing embodiments, the embodiments of the present application provide a third request processing apparatus, which can be applied to Figures 3-5 the request processing method provided by the corresponding embodiments, referring to Figure 9 , the third request processing apparatus 7 can include a third receiving unit 71, a second processing unit 72 and a third sending unit 73, wherein:
[0160] The third receiving unit 71 is configured to receive a second acquisition request carrying an updated address and a service identifier sent by the client based on the identifier of the target edge node;
[0161] The updated address is obtained by updating the request address in the first acquisition request for acquiring the service resource sent by the client based on the first server; and the identifier of the target edge node is determined by the second server based on the updated address;
[0162] The second processing unit 72 is configured to process the updated address to obtain a request address when it is determined that the updated address has a target domain name matching the service identifier;
[0163] The third sending unit 73 is configured to send the target service resource corresponding to the request address to the client based on the request address.
[0164] In other embodiments of the present application, the second processing unit 72 is further configured to delete the first domain name in the updated address using the target address rewriting technology when it is determined that the first domain name in the first level of the updated address matches the service identifier, to obtain the request address; wherein the target domain name includes the first domain name.
[0165] In other embodiments of the present application, the second processing unit 72 is further configured to, when it is determined that the first level in the update address has a second domain name matching the service identifier, process the update address based on the second domain name to obtain a request address; and the target domain name includes the second domain name.
[0166] It should be noted that the specific implementation process of the steps performed by each unit in the embodiments of the present application can be referred to Figures 3-5 the implementation process in the request processing method provided by the corresponding embodiments, which will not be described here.
[0167] The third request processing device provided by the embodiments of the present application, when the PCDN system determines that none of the corresponding distribution nodes has a request for the corresponding resource, the client can directly obtain the corresponding resource from the edge node corresponding to the CDN system, without the need for the designated distribution node to proxy the user to the CDN source in the related art to provide the corresponding resource to the user, solving the problem of long source return time in the related art when the terminal node of the PCDN system has no request for the corresponding resource, and improving the running efficiency.
[0168] Based on the foregoing embodiments, the embodiments of the present application provide a first server, which can be applied to Figure 1 、 4 the request processing method provided by the corresponding embodiments of 5, with reference to Figure 10 , the first server 8 can include a first processor 81, a first memory 82 and a first communication bus 83, wherein:
[0169] The first communication bus 83 is configured to realize the communication connection between the first processor 81 and the first memory 82;
[0170] The first processor 81 is configured to execute the request processing program in the first memory 82 to realize the following steps:
[0171] receive a first acquisition request sent by a client for acquiring a service resource; wherein the first acquisition request includes a service identifier and a request address;
[0172] when it is determined based on the first acquisition request that the first server does not have a service resource corresponding to the service identifier in the corresponding distribution node, update the request address based on the service identifier to obtain an update address;
[0173] send the update address to the client, so that the client acquires a target service resource corresponding to the request address from a target edge node corresponding to a second server based on the update address.
[0174] In other embodiments of this application, the first processor 81 is used to execute the request processing program in the first memory 82 to update the request address based on the service identifier to obtain the updated address, so as to implement the following steps:
[0175] The first domain name corresponding to the business corresponding to the first acquisition request is determined based on the business identifier;
[0176] The update address is determined based on the first domain name and the request address.
[0177] In other embodiments of this application, the first processor 81 is used to execute the request processing program in the first memory 82 to update the request address based on the service identifier to obtain the updated address, so as to implement the following steps:
[0178] The category of the service corresponding to the first acquisition request is determined based on the service identifier;
[0179] Determine the second domain name corresponding to the business based on the category;
[0180] The update address is determined based on the second domain name and the request address.
[0181] In other embodiments of this application, the first processor 81 is used to execute a request handler in the first memory 82, and may also implement the following steps:
[0182] Determine the number of requests for the business resource corresponding to each received retrieval request;
[0183] When the number of requests exceeds the target threshold, business resources are retrieved from the edge nodes and stored.
[0184] It should be noted that a detailed description of the steps performed by the first processor can be found in [reference needed]. Figure 1 , 4 The request processing method provided in the embodiment corresponding to 5 will not be described again here.
[0185] The first server provided in the embodiments of this application allows the client to directly obtain the corresponding resources from the edge nodes of the CDN system when the PCDN system determines that none of the corresponding distribution nodes have the requested resources. This eliminates the need for the designated distribution nodes to proxy the user's request to the CDN origin in the related technologies. This solves the problem of long origin-fetching times in the related technologies when the terminal nodes of the PCDN system do not have the requested resources, and improves operating efficiency.
[0186] Based on the foregoing embodiments, embodiments of this application provide a second server, which can be applied to... Figure 2 , 4 In the request processing method provided in the embodiment corresponding to 5, refer toFigure 11 As shown in FIG. 1, the second server 9 can include a second processor 91, a second memory 92 and a second communication bus 93, wherein:
[0187] The second communication bus 93 is configured to realize the communication connection between the second processor 91 and the second memory 92;
[0188] The second processor 91 is configured to execute a request processing program in the second memory 92 to realize the following steps:
[0189] receiving an updated address sent by the client; wherein the updated address is obtained and sent to the client by the first server based on updating the request address in the first acquisition request sent by the client for acquiring the service resource;
[0190] Based on the updated address, determining a target edge node from a plurality of edge nodes corresponding to the second server;
[0191] sending the identifier of the target edge node to the client, so that the client acquires the target service resource corresponding to the request address based on the identifier of the target edge node.
[0192] It should be noted that the specific description of the steps executed by the second processor can refer to the request processing method provided in the embodiments corresponding to Figure 2 、 4 and 5, which will not be described here again.
[0193] The second server provided by the embodiments of the present application, when the PCDN system determines that none of the corresponding distribution nodes has the corresponding resource, the client can directly acquire the corresponding resource from the edge node corresponding to the CDN system, without the way of providing the corresponding resource to the user by the designated distribution node proxying the user to the CDN source as in the related art, solving the problem of long source time in the related art when none of the terminal nodes of the PCDN system has the corresponding resource, and improving the running efficiency.
[0194] Based on the foregoing embodiments, the embodiments of the present application provide a target edge node, which can be applied to Figures 3-5 the request processing method provided in the embodiments corresponding to Figure 12 As shown in FIG. 1, the target edge node 10 can include a third processor 1001, a third memory 1002 and a third communication bus 1003, wherein:
[0195] The third communication bus 1003 is configured to realize the communication connection between the third processor 1001 and the third memory 1002;
[0196] The third processor 1001 is configured to execute a request processing program in the third memory 1002 to implement the following steps:
[0197] receiving a second acquisition request carrying an updated address and a service identifier sent by the target edge node based on the identifier of the target edge node;
[0198] The updated address is obtained by updating the request address in the first acquisition request for acquiring the service resource sent by the client based on the first server; and the identifier of the target edge node is determined by the second server based on the updated address.
[0199] When it is determined that the updated address has a target domain name matching the service identifier, processing the updated address to obtain a request address;
[0200] Based on the request address, the target service resource corresponding to the request address is sent to the client.
[0201] In other embodiments of the present application, the third processor 1001 is configured to execute the request processing program in the third memory 1002 to implement the following steps when it is determined that the updated address has a target domain name matching the service identifier:
[0202] When it is determined that the first level in the updated address has a first domain name matching the service identifier, the first domain name in the updated address is deleted by using a target address rewriting technology to obtain a request address; wherein the target domain name includes the first domain name.
[0203] In other embodiments of the present application, the third processor 1001 is configured to execute the request processing program in the third memory 1002 to implement the following steps when it is determined that the updated address has a target domain name matching the service identifier:
[0204] When it is determined that the second level in the updated address has a second domain name matching the service identifier, the updated address is processed based on the second domain name to obtain a request address; wherein the target domain name includes the second domain name.
[0205] It should be noted that the specific description of the steps executed by the third processor can be referred to Figures 3-5 The request processing method provided in the corresponding embodiment will not be described here.
[0206] The target edge node provided by the embodiments of the present application, the PCDN system determines that the corresponding distribution node does not have the corresponding resource, the client can directly obtain the corresponding resource from the edge node corresponding to the CDN system, without the way of the related art that the designated distribution node agent user provides the corresponding resource to the user by proxying the user to the CDN, solves the problem of long time of the related art that the terminal node of the PCDN system does not request the corresponding resource, and improves the operation efficiency.
[0207] Based on the foregoing embodiments, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium stores one or more programs, the one or more programs can be executed by one or more processors to implement Figures 1-5 The steps of the request processing method provided by the corresponding embodiments.
[0208] Based on the foregoing embodiments, the embodiments of the present application provide a computer program product, comprising a computer program, the computer program can be executed by the first processor 81, the second processor 91 and the third processor 1001 to complete Figures 1-5 The steps of the request processing method provided by the corresponding embodiments.
[0209] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
[0210] The present application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowchart and / or block diagram. Figure 1 The device that implements the functions specified in one or more flows and / or blocks. Figure 1 The device that implements the functions specified in one or more flows and / or blocks.
[0211] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 The functions of a flow or multiple flows and / or a block or multiple blocks in accordance with the embodiments of this application can be implemented as computer program instructions on a computer readable medium. The instructions can be executed by a processor of a computer or other programmable data processing apparatus to provide the functions described herein. Figure 1
[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow Figure 1 The functions of a flow or multiple flows and / or a block or multiple blocks in accordance with the embodiments of this application can be implemented as computer program instructions on a computer readable medium. The instructions can be executed by a processor of a computer or other programmable data processing apparatus to provide the functions described herein. Figure 1
[0213] The above description is only specific implementation of the present application. The protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application. The protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A request processing method characterized by comprising: The method comprises: receiving a first acquisition request sent by a client for acquiring a target service resource; wherein the first acquisition request comprises a service identifier and a request address of the target service resource; when it is determined based on the first acquisition request that a distribution node corresponding to a first server does not have a target service resource corresponding to the service identifier, updating the request address based on the service identifier to obtain an updated address; sending the updated address to the client, so that the client acquires a target service resource corresponding to the request address from a target edge node corresponding to a second server based on the updated address; wherein the updating of the request address based on the service identifier to obtain an updated address comprises: determining a first domain name corresponding to a service corresponding to the first acquisition request based on the service identifier, determining the updated address based on the first domain name and the request address; or determining a category of the service corresponding to the first acquisition request based on the service identifier, determining a second domain name corresponding to the service based on the category, and determining the updated address based on the second domain name and the request address.
2. The method of claim 1, wherein, The method further comprises: determining the request times of the service resource corresponding to each acquisition request received; when the request times are greater than a target threshold, acquiring the service resource from the edge node and storing.
3. A request processing method characterized by, The method comprises: receiving an updated address sent by a client; wherein the updated address is obtained by a first server based on updating a request address in a first acquisition request sent by a client for acquiring a service resource, and is sent to the client; determining a target edge node from a plurality of edge nodes corresponding to a second server based on the updated address; sending an identifier of the target edge node to the client, so that the client acquires a target service resource corresponding to the request address based on the identifier of the target edge node; wherein the updated address is determined by the first server based on a first domain name and the request address, and the first domain name is determined based on a service identifier in the first acquisition request; or the updated address is determined by the first server based on a second domain name and the request address, and the second domain name is determined based on a category of a service corresponding to the first acquisition request, and the category of the service is determined based on the service identifier in the first acquisition request.
4. A request processing method characterized by, The method comprises: receiving a second acquisition request sent by a client based on an identifier of a target edge node, the second acquisition request carrying an updated address and a service identifier; wherein the updated address is obtained by a first server based on updating a request address in a first acquisition request sent by a client for acquiring a service resource; and the identifier of the target edge node is determined by a second server based on the updated address; when it is determined that the updated address has a target domain name matching the service identifier, processing the updated address to obtain the request address; based on the request address, sending a target service resource corresponding to the request address to the client; In the method, when it is determined that the target domain name in the update address matches the service identifier, the update address is processed to obtain the request address, including: when it is determined that a first domain name in a first level of the update address matches the service identifier, the first domain name in the update address is deleted by using a target address rewriting technology to obtain the request address, and the target domain name includes the first domain name; or, when it is determined that a second domain name in the first level of the update address matches the service identifier, the update address is processed based on the second domain name to obtain the request address, and the target domain name includes the second domain name.
5. A first request processing apparatus characterized by comprising: The apparatus comprises: The first receiving unit is configured to receive a first acquisition request for acquiring a service resource sent by a client, wherein the first acquisition request comprises a service identifier and a request address; The first processing unit is configured to update the request address based on the service identifier to obtain an update address when it is determined that the first server corresponding to the distribution node does not have the service resource corresponding to the service identifier based on the first acquisition request; The first sending unit is configured to send the update address to the client, so that the client acquires a target service resource corresponding to the request address from a target edge node corresponding to a second server based on the update address; The first processing unit is configured to determine a first domain name corresponding to a service corresponding to the first acquisition request based on the service identifier, determine the update address based on the first domain name and the request address, or determine a category of the service corresponding to the first acquisition request based on the service identifier, determine a second domain name corresponding to the service based on the category, and determine the update address based on the second domain name and the request address.
6. A second request processing apparatus characterized by comprising: The apparatus comprises: The second receiving unit is configured to receive an update address sent by a client, wherein the update address is obtained by a first server based on an update of a request address in a first acquisition request for acquiring a service resource sent by the client and sent to the client; The determining unit is configured to determine a target edge node from a plurality of edge nodes corresponding to a second server based on the update address; The second sending unit is configured to send an identifier of the target edge node to the client, so that the client acquires a target service resource corresponding to the request address based on the identifier of the target edge node; The update address is determined by the first server based on a first domain name and the request address, the first domain name is determined based on a service identifier in the first acquisition request, or the update address is determined by the first server based on a second domain name and the request address, the second domain name is determined based on a category of a service corresponding to the first acquisition request, and the category of the service is determined based on the service identifier in the first acquisition request.
7. A third request processing apparatus characterized by comprising: The apparatus comprises: The third receiving unit is configured to receive a second acquisition request carrying an updated address and a service identifier sent by the client based on an identifier of a target edge node; the updated address is obtained by updating a request address in a first acquisition request for acquiring a service resource sent by the client based on the first server; and the identifier of the target edge node is determined based on the updated address by the second server; The second processing unit is configured to process the updated address to obtain the request address when it is determined that the updated address has a target domain name matching the service identifier; The third sending unit is configured to send a target service resource corresponding to the request address to the client based on the request address; The second processing unit is configured to delete a first domain name in the updated address by using a target address rewriting technology to obtain the request address when it is determined that the first domain name in the first level of the updated address matches the service identifier, and the target domain name includes the first domain name; or the second processing unit is configured to process the updated address based on a second domain name to obtain the request address when it is determined that the second domain name in the first level of the updated address matches the service identifier, and the target domain name includes the second domain name.
8. A first server, characterized by, The first server comprises a first processor, a first memory and a first communication bus; The first communication bus is configured to realize communication connection between the first processor and the first memory; The first processor is configured to execute a request processing program in the first memory to realize the steps of the request processing method according to any one of claims 1-2.
9. A second server, characterized by The second server comprises a second processor, a second memory and a second communication bus; The second communication bus is configured to realize communication connection between the second processor and the second memory; The second processor is configured to execute a request processing program in the second memory to realize the steps of the request processing method according to claim 3.
10. An edge node, characterized by The edge node comprises a third processor, a third memory and a third communication bus; The third communication bus is configured to realize communication connection between the third processor and the third memory; The third processor is configured to execute a request processing program in the third memory to realize the steps of the request processing method according to claim 4.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, which can be executed by one or more processors to realize the steps of the request processing method according to any one of claims 1-2 or 3 or 4.
12. A computer program product comprising a computer program, characterized in that, The computer program realizes the request processing method according to any one of claims 1-2 or 3 or 4 when executed by the processor.
Citation Information
Patent Citations
Resource acquisition method and device, equipment and storage medium
CN117527809A