Method, apparatus and medium for processing content delivery network back source request
By generating access identifiers from the origin server and distributing them to the CDN server, the problem of complex domain name creation for CDN service providers is solved, and domain name configuration is automated and operation and maintenance are simplified.
Patent Information
- Application Number
- CN202310567586.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-05-18
AI Technical Summary
In existing technologies, the accelerated domain name creation business of content delivery network (CDN) service providers is complex and cannot be converged, resulting in a cumbersome domain name creation process and high maintenance difficulty.
The origin server receives origin requests from the CDN server, generates an access identifier, and sends it to the CDN server. This decouples the CDN server from the business domain name and sends the access identifier directly to the origin server, avoiding direct origin requests from the CDN server.
It simplifies the domain name creation process, reduces the complexity of domain name creation, improves domain name configuration efficiency, and realizes automated convergence of business domain names and simplifies operation and maintenance.
Smart Images

Figure CN116527632B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of communication, and particularly relates to a content delivery network source return request processing method and device, equipment and medium. BACKGROUND
[0002] For current Internet services, if different content delivery network (Content Delivery Network, abbreviated as: CDN) service providers need to be continuously and efficiently configured with acceleration domain names in real time, an OpenAPI for automatic creation of domain names aligned with CDN service providers is usually used, and a general solution is to create domain names based on a minimum function template domain name.
[0003] At present, for the services of pictures, downloads, on-demand and the like, the corresponding source station has global coverage, and therefore, after configuring an acceleration domain name on the CDN side, the subsequent problem of adapting the acceleration domain name needs to be solved on the source station, which finally leads to complex and non-convergent domain name creation services. SUMMARY
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a content delivery network source return request processing method, device, equipment and medium.
[0005] According to one aspect of an embodiment of the present disclosure, a content delivery network source return request processing method is provided, the method being applied to a source station server, the source station server being in communication connection with a plurality of CDN servers, and the method comprising:
[0006] receiving a source return request carrying an access identifier, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, the target acceleration domain name being generated by a target CDN server according to preset configuration information, and the target service provider identifier being a target service provider identifier of the target CDN server;
[0007] querying a target source station corresponding to the target acceleration domain name, and acquiring source station configuration information corresponding to the target source station;
[0008] generating a target access identifier of the target source station based on the source station configuration information;
[0009] sending the target access identifier to a target CDN server corresponding to the target service provider identifier, wherein the target CDN server acquires target resources from the target source station according to the target access identifier.
[0010] According to another aspect of the embodiments of the present disclosure, a method for processing a CDN source request is also provided. The method is applied to a target CDN server, which is any one of servers in communication connection with a source server. The method comprises:
[0011] receiving a service request from a client, wherein the service request carries an original access identifier of a service to be accessed by the client;
[0012] in response to the service request, obtaining service information of the service to be accessed by using the original access identifier, and generating a target acceleration domain name based on the service information and preset configuration information corresponding to the target CDN server;
[0013] generating a source request based on the target acceleration domain name and a target service provider identifier of the target CDN server, and sending the source request to the source server;
[0014] receiving a target access identifier fed back by the source server based on the source request, and obtaining a target resource from the target source by using the target access identifier.
[0015] According to another aspect of the embodiments of the present disclosure, a device for processing a CDN source request is also provided. The device comprises:
[0016] a first receiving module configured to receive a source request carrying an access identifier, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, the target acceleration domain name is generated by a target CDN server according to preset configuration information, and the target service provider identifier is a target service provider identifier of the target CDN server;
[0017] a querying module configured to query a target source corresponding to the target acceleration domain name, and obtain source configuration information corresponding to the target source;
[0018] a first generating module configured to generate a target access identifier of the target source based on the source configuration information;
[0019] a sending module configured to send the target access identifier to a target CDN server corresponding to the target service provider identifier, wherein the target CDN server obtains a target resource from the target source according to the target access identifier.
[0020] According to another aspect of the embodiments of the present disclosure, a device for processing a CDN source request is also provided. The device comprises:
[0021] The second receiving module is configured to receive a service request from a client, wherein the service request carries an original access identifier of a service to be accessed by the client.
[0022] The response module is configured to, in response to the service request, acquire service information of the service to be accessed by using the original access identifier, and generate a target acceleration domain name based on the service information and preset configuration information corresponding to a target CDN server.
[0023] The second generating module is configured to generate a source retrieval request based on the target acceleration domain name and a target service provider identifier of the target CDN server, and send the source retrieval request to the source station server.
[0024] The processing module is configured to receive a target access identifier fed back by the source station server based on the source retrieval request, and acquire target resources from a target source station by using the target access identifier.
[0025] According to another aspect of the embodiments of the present disclosure, a storage medium is provided, which includes a stored program, and the program performs the above steps when running.
[0026] According to another aspect of the embodiments of the present disclosure, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is configured to store a computer program; and the processor is configured to execute the steps in the above method by running the program stored in the memory.
[0027] The embodiments of the present disclosure further provide a computer program product including instructions, which, when running on a computer, cause the computer to execute the steps in the above method.
[0028] The above technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art: the method provided by the embodiments of the present disclosure receives a source retrieval request of a CDN server by a source station server, decouples the CDN server from a service domain name, does not need the CDN server to directly send a source retrieval request to the source station, but uniformly issues an access identifier of the source station to the CDN server by the source station server, thereby solving the problem that different source stations cannot converge in the domain name creation and adaptation process. BRIEF DESCRIPTION OF DRAWINGS
[0029] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0031] Figure 1 A flowchart of a content distribution network back-to-source request processing method provided by an embodiment of the present disclosure is shown in FIG. 4.
[0032] Figure 2 A flowchart of a content distribution network back-to-source request processing method provided by another embodiment of the present disclosure is shown in FIG. 5.
[0033] Figure 3 A schematic diagram of a back-to-source request processing process provided by an embodiment of the present disclosure is shown in FIG. 6.
[0034] Figure 4 A block diagram of a content distribution network back-to-source request processing apparatus provided by an embodiment of the present disclosure is shown in FIG. 7.
[0035] Figure 5 A block diagram of a content distribution network back-to-source request processing apparatus provided by another embodiment of the present disclosure is shown in FIG. 8.
[0036] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 9. DETAILED DESCRIPTION
[0037] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will combine the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure, and do not constitute an improper limitation on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the protection scope of the present disclosure.
[0038] It should be noted that, in this document, the terms such as "first" and "second" and the like are merely used to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Also, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0039] The embodiments of the present disclosure provide a content distribution network source request processing method, device, equipment and medium. The method provided by the embodiments of the present disclosure can be applied to any required electronic device, for example, a server, a terminal and the like, which are not specifically limited here. For the convenience of description, the electronic device is referred to as electronic device hereinafter.
[0040] According to an aspect of the embodiments of the present disclosure, a method embodiment of a content distribution network source request processing method is provided. Figure 1 A flowchart of a content distribution network source request processing method provided by the embodiments of the present disclosure is shown in Figure 1 The method comprises the following steps:
[0041] In step S11, a source request carrying an access identifier is received, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, and the target acceleration domain name is generated by a target CDN server according to preset configuration information, and the target CDN server is a CDN server corresponding to the target service provider identifier.
[0042] The method provided by the embodiments of the present disclosure is applied to a source station server, and the source station server is in communication connection with a plurality of CDN servers. The source station server can be understood as a 302 server of the source station. The 302 in the 302 server represents temporary transfer. Since the acceleration domain name carried by the source request sent by the CDN server is temporarily replaced, the 302 server of the source station is added to temporarily receive the source request of the CDN server, and the access identifier of the corresponding source station is returned to the CDN server. In this way, the problem that the domain name creation service of different service source stations cannot converge is solved.
[0043] Specifically, when performing the source retrieval, the CDN server no longer needs to directly retrieve the related service source station, but retrieves the 302 server of the source station. In this way, the complexity of the domain name creation process is reduced, and the CDN server is decoupled from the service domain name, so that the CDN server does not need to directly retrieve the related service source station, and the difficulty of service operation and maintenance is converged after the service domain name is inflated.
[0044] In the embodiment of the present disclosure, the CDN server receives a service request sent by a client, the service request carrying an original resource identifier (Uniform Resource Locator, abbreviated as URL) of a service currently to be accessed by the client, and the CDN server needs to perform source retrieval based on the original resource identifier, that is, configure a target acceleration domain name by using preset configuration information and service information of the service to be accessed, the preset configuration information being pre-configured on the CDN server by a source station server, and the preset configuration information including an authentication parameter, a server address of the source station server, and the like. After the target CDN server completes the configuration of the target acceleration domain name, the target CDN server generates a source retrieval request by using the target acceleration domain name and a server identifier of the target CDN server, and sends the source retrieval request to the source station server.
[0045] In the embodiment of the present disclosure, the source station server receives the source retrieval request, extracts the target acceleration domain name and the target service provider identifier from the source retrieval request, and takes the CDN server corresponding to the target service provider identifier as the target CDN server. The source station server subsequently analyzes the target acceleration domain name, and finally feeds back an access identifier to the CDN server, so that the CDN server obtains corresponding resources by using the access identifier.
[0046] Step S12, querying a target source station corresponding to the target acceleration domain name, and obtaining source station configuration information corresponding to the target source station.
[0047] In the embodiment of the present disclosure, before querying the target source station corresponding to the target acceleration domain name, the method further includes the following steps A1-A2:
[0048] Step A1, detecting whether the target acceleration domain name carries signature information.
[0049] Step A2, in the case where the target acceleration domain name carries the signature information, determining that the target acceleration domain name supports authentication access, and verifying the signature information to obtain a verification result.
[0050] In the embodiment of the present disclosure, after the source station server obtains the target acceleration domain name, the source station server detects whether the target acceleration domain name carries signature information. If the target acceleration domain name carries the signature information, it indicates that the target acceleration domain name needs to support authentication access, and at this time, the source station server needs to verify the signature information.
[0051] As an example, the verification process can be: the source station server acquires the public key of the target CDN server, then decrypts the signature information using the public key to obtain decrypted signature information. Then, the decrypted signature information is calculated using the same encryption algorithm as the target CDN server. The obtained calculation result is verified with the signature information to obtain a verification result. If the calculation result is consistent with the signature information, the verification result is verified. If the calculation result is inconsistent with the signature information, the verification result is not verified.
[0052] In the embodiments of the present disclosure, if the target acceleration domain name does not carry the signature information, it means that the target acceleration domain name does not need to be authenticated and can be directly sourced to the corresponding source station.
[0053] In the embodiments of the present disclosure, the target source station corresponding to the target acceleration domain name is queried, and the source station configuration information corresponding to the target source station is acquired, including the following steps B1-B2:
[0054] Step B1, in the case where the verification result is verified, the target acceleration domain name is matched with the target scheduling rule, and the source station indicated by the target scheduling rule is taken as the target source station.
[0055] In the embodiments of the present disclosure, in the case where the verification result is verified, a plurality of scheduling rules currently configured in the source station server are acquired, and the scheduling rules include but are not limited to different CDN service providers or business types. Based on this, the field carried by the target acceleration domain name is matched with the current scheduling rule, the hit scheduling rule is determined as the target scheduling rule, and the source station indicated by the target scheduling rule is taken as the target source station.
[0056] As an example, the current scheduling rule includes: CDN-01—source station K, CDN-02—source station M, CDN-03—source station N, and the service provider field carried by the target acceleration domain name is "CDN-02". At this time, it can be determined that the hit scheduling rule is "CDN-02—source station M", and the source station M is taken as the target source station.
[0057] Step B2, read the source station configuration information corresponding to the target source station, wherein the source station configuration information includes: authentication algorithm, authentication parameter, source station address corresponding to the target source station and source host.
[0058] In the embodiment of the present disclosure, after determining the target source station to which the CDN server is to return the source, the source station server reads the source station configuration information corresponding to the target source station, wherein the source station configuration information includes: an authentication algorithm, an authentication parameter, a source station address corresponding to the target source station, and a source return host. The authentication parameter is specific information relied on by the source station when performing signature, and the source return host is a domain name address that needs to be accessed by the CDN server when returning the source. In addition, the authentication algorithms configured by different source stations are different.
[0059] Step S13, generating a target access identifier of the target source station based on the source station configuration information.
[0060] In the embodiment of the present disclosure, after obtaining the source station configuration information, the source station server generates a target access identifier by using the source station configuration information. Specifically, the source station server performs signature on the authentication parameter, the source station address corresponding to the target source station, and the source return host by using the authentication algorithm, to generate a url that can access the target source station, that is, the target access identifier. The authentication algorithm can be: Tos V1 Sign, OSS MBuckt, OBS Sign, etc.
[0061] Step S14, sending the target access identifier to the target CDN server corresponding to the target service provider identifier, wherein the target CDN server acquires target resources from the target source station according to the target access identifier.
[0062] In the embodiment of the present disclosure, after generating the target access identifier, the source station server sends the target access identifier to the target CDN server, and the target CDN server initiates an access request to the target source station based on the target access identifier, to acquire corresponding target resources.
[0063] The method provided by the embodiment of the present disclosure receives the source return request of the CDN server by the source station server, decouples the CDN server from the business domain name, does not need the CDN server to directly send the source return request to the source station, but uniformly issues an access identifier of the source station to the CDN server by the source station server, so as to solve the problem that different source stations cannot converge in the domain name creation and adaptation process.
[0064] Figure 2 A flowchart of a content distribution network source return request processing method provided by the embodiment of the present disclosure is shown in FIG. 1. Figure 2 As shown in the figure, the method can include the following steps:
[0065] Step S21, receiving a business request from a client, wherein the business request carries an original access identifier of a business to be accessed by the client.
[0066] The method provided by the embodiments of the present disclosure is applied to a target CDN server, which is any one server in communication connection with the source station server. When a user wants to access the resource of a service, the service request can be sent by the client. Specifically, the client first acquires the current home information, then determines the to-be-accessed service, and acquires the original domain name of the to-be-accessed service, for example, the to-be-accessed service of the client is X, and the original domain name is X-aaa-com. Finally, the original access identifier (Uniform Resource Locator, URL for short) is generated based on the original domain name and the home information, and the original access identifier is carried in the service request and sent to the target CDN server. The to-be-accessed service can be a video service, a picture service, a music service, and the like.
[0067] In the embodiments of the present disclosure, after the target CDN server receives the service request sent by the client, the original access identifier can be extracted from the service request. Subsequently, the service information of the to-be-accessed service is acquired through the original access identifier, and the original access identifier is rewritten by using the service information to generate the target acceleration domain name used for source returning.
[0068] In step S22, the service information of the to-be-accessed service is acquired by using the original access identifier in response to the service request, and the target acceleration domain name is generated based on the service information and the preset configuration information corresponding to the target CDN server.
[0069] In the embodiments of the present disclosure, the target CDN server acquires the service information of the to-be-accessed service by using the original access identifier in response to the service request, and the service information includes the service type, the service service Key, and the like.
[0070] It should be noted that the service information is acquired by using the original access identifier, on the one hand, the service information can be used to determine whether the to-be-accessed service meets the source returning condition of the source station server. On the other hand, in the case of meeting the source returning condition of the source station server, the service information can be used to configure the acceleration domain name.
[0071] In the embodiments of the present disclosure, the target acceleration domain name is generated based on the service information and the preset configuration information corresponding to the target CDN server, including the following steps C1-C3:
[0072] In step C1, the service information is used to detect whether the to-be-accessed service meets the domain name creation rule of the source station server, and a detection result is obtained.
[0073] In the embodiments of the present disclosure, the target CDN server is configured with a plurality of service types currently supported by the source station server for creating an acceleration domain name, based on which, whether the to-be-accessed service matches the service type stored by the target CDN server is determined by using the service type in the service information, and whether the service information has a demand for authentication access is determined, to obtain a detection result. Specifically, the following cases are included:
[0074] (1) If any one of the service types stored by the target CDN server in the service type in the service information matches, and the service information has a demand for authentication access, the detection result is that the to-be-accessed service supports accessing the source station server, and carries an authentication access identifier.
[0075] (2) If any one of the service types stored by the target CDN server in the service type in the service information does not match, the detection result is that the to-be-accessed service does not support accessing the source station server.
[0076] (3) If any one of the service types stored by the target CDN server in the service type in the service information does not match, the detection result is that the to-be-accessed service does not support accessing the source station server.
[0077] In the embodiments of the present disclosure, if the detection result is that the to-be-accessed service supports accessing the source station server and carries an authentication access identifier, and the detection result is that the to-be-accessed service supports accessing the source station server and does not carry an authentication access identifier, the current process can continue to be executed. If the to-be-accessed service does not support accessing the source station server, the current process is terminated.
[0078] Step C2, obtaining a target domain name creation template corresponding to the detection result, wherein the target domain name creation template includes a plurality of configuration items.
[0079] In the embodiments of the present disclosure, obtaining the target domain name creation template corresponding to the detection result includes: in the case that the detection result is that the to-be-accessed service supports accessing the source station server and does not carry an authentication access identifier, taking the original domain name creation template as the target domain name creation template.
[0080] In the embodiments of the present disclosure, if the detection result is that the to-be-accessed service supports accessing the source station server and does not carry an authentication access identifier, it means that the to-be-accessed service does not need to be signed when it is sourced back, at this time, the original domain name creation template can be directly taken as the target domain name creation template. The original domain name creation template is as follows: {service type abbreviation} {CDN service provider identifier} {service provider product type abbreviation} - {service service key} - {service service key2} - {source station address}. {second-level domain name}.
[0081] In the embodiments of the present disclosure, the target domain name is created by using the detection result, including: in the case that the detection result is that the to-be-accessed service supports the access source station server and carries the authentication access identifier, generating signature information by using the authentication access identifier, and carrying the signature information in the original domain name creation template to obtain the target domain name creation template.
[0082] In the embodiments of the present disclosure, if the detection result is that the to-be-accessed service supports the access source station server and does not carry the authentication access identifier, it indicates that the to-be-accessed service needs to be signed when the source station is returned, at this time, the signature information can be directly generated by using the authentication access identifier, and the signature information is carried in the original domain name creation template to obtain the domain name creation template: {service type abbreviation} {CDN service provider identifier} {service provider product type abbreviation} {service service key} - {service service key2} - sign - {source station address}. {second-level domain name}.
[0083] It should be noted that the service type abbreviation can be: p (representing picture service), v (representing video service), and the like. The service provider product type abbreviation can be used to distinguish different product types of the service provider, for example, the service provider K can adopt a default value of null for the general product type, and for example, the product type abbreviation of the service provider J is "j". The service service key / key2 is the service information defined by the service when applying for the domain name, and the sign indicates whether the accelerated domain name supports authentication access. The source station address indicates different source return addresses that need to be configured by the CDN server, such as sg indicating the regional A standard picture source station address p-9j-sg.xxxxxxx.com, and the like, wherein 9 is the CDN service provider identifier of the service provider J, and j is the service provider product type abbreviation of the service provider J.
[0084] Step C3, obtaining the data content corresponding to each configuration item, and writing the data content into the target domain name creation template to obtain the target accelerated domain name.
[0085] In the embodiments of the present disclosure, after obtaining the target domain name configuration template, the data content of the configuration items such as {service type abbreviation}, {service service key}, {service service key2} can be obtained from the service information, and the data content of the configuration items such as {CDN service provider identifier}, {service provider product type abbreviation}, {source station address} can be obtained from the preset configuration information of the target CDN server. The obtained data content is written into the target domain name creation template to obtain the target accelerated domain name.
[0086] In addition, the non-authentication accelerated domain names (i.e., the accelerated domain names without carrying the sign) under the same second-level domain name are placed in the same property, and the cache is shared by default. The authentication accelerated domain names (i.e., the accelerated domain names carrying the sign) under the same second-level domain name are placed in the same property, and the cache is shared by default. The authentication domain name and the non-authentication domain name do not share the cache.
[0087] As an example: the picture service of the non-authenticated back-to-source sg standard source station of the service provider H, the acceleration domain name is: p16h-test-demo.test.com, wherein 16 is the CDN service provider identifier of the service provider H, and h is the service provider product type abbreviation of the service provider H.
[0088] It should be noted that in order to provide static cache domain name caching, non-authenticated / authenticated domain names under the same second-level domain name can be required to be placed in different properties. The CDN service provider can create the second-level domain name of the service that appears for the first time in the early stage, and the service side only needs to determine whether the corresponding property exists, and if so, it is placed in the property, and if not, it can be manually configured. In the later stage, the automatic creation of the first property forms a closed loop.
[0089] The domain name creation method provided by the embodiments of the present disclosure realizes automatic domain name creation under the scenario of whether the service needs to configure authentication and global distribution of the source station, and does not need to manually configure the domain name. At the same time, the timeliness of domain name creation is shortened from N days to minute granularity. Therefore, by providing a standardized acceleration domain name configuration template, not only the domain name configuration efficiency is improved, but also the specific domain name of the service is realized, that is, through the configuration item of the domain name, the characteristics of the domain name, such as the source station address, the CDN service provider, whether to bring authentication, etc. can be known.
[0090] Step S23, generating a back-to-source request based on the target acceleration domain name and the target service provider identifier of the target CDN server, and sending the back-to-source request to the source station server.
[0091] In the embodiments of the present disclosure, the target CDN server generates an access identifier based on the configured target acceleration domain name (x-cdn-host) and the target service provider identifier (x-cdn-vendor) of the target CDN server, adds the access identifier to the back-to-source request, and sends it to the source station server. The source station server receives the back-to-source request and extracts the target acceleration domain name and the target service provider identifier from the back-to-source request. The source station server analyzes the target acceleration domain name later, and finally feeds back the access identifier to the CDN server.
[0092] Step S24, receiving the target access identifier fed back by the source station server based on the back-to-source request, and using the target access identifier to obtain the target resource from the target source station.
[0093] In the embodiment of the present disclosure, the target resource is obtained from the target source station by using the target access identifier, and the method comprises the following steps: generating an access request based on the target access identifier; and sending the access request to the source station cache, so that the source station cache determines a target access strategy by using the target access identifier, and accesses the target source station to obtain the target resource according to the target access strategy.
[0094] In the embodiment of the present disclosure, after the target CDN server generates the access request based on the target access identifier, the access request is first sent to the source station cache, the source station cache determines the resource type of the resource to be accessed by using the target access identifier, and determines the target access strategy according to the resource type. For example, in the case that the resource type is an external network public resource type, the target access strategy can be direct access. Or in the case that the resource type is a non-external network public resource type, the target access strategy is to verify the target access identifier, and after the verification is passed, the target source station can be accessed. Finally, the target source station is accessed according to the target access strategy to obtain the target resource.
[0095] In the embodiment of the present disclosure, the process of verifying the target access identifier comprises: the source station cache verifies the signature information in the target access identifier, and after the signature information is verified, the source station cache re-signs the target access identifier according to the pre-agreed signature algorithm and independent authentication parameters, and at this time, the re-signed target access identifier is sent to the storage gateway, and the storage gateway finally determines that the non-external network public resource can be accessed after verifying the signature.
[0096] The method provided by the embodiment of the present disclosure further determines the resource type of the resource to be accessed by the target access identifier by using the source station cache, so as to determine the final target access strategy. If it is a non-external network public resource type, it needs to be re-signed and verified, so as to ensure the security of access.
[0097] Figure 3 A schematic diagram of a processing process of a source return request provided by the embodiment of the present disclosure is shown in FIG. 1, which comprises the following steps: Figure 3
[0098] Step 1: the client sends a service request to the CDN server, wherein the service request carries an original access identifier of a business to be accessed by the client.
[0099] Step 2: the CDN server receives and responds to the service request, obtains business information of the business to be accessed by using the original access identifier, and generates a target acceleration domain name based on the business information and preset configuration information corresponding to the target CDN server.
[0100] Step 3: the CDN server generates an access identifier based on the target acceleration domain name and a target service provider identifier of the target CDN server, adds the access identifier to the source return request, and sends the source return request to the source station server.
[0101] Step 4, the source station server receives the source return request and extracts the access identifier carrying the target acceleration domain name and the target service provider identifier from the source return request.
[0102] Step 5, the source station server queries the target source station corresponding to the target acceleration domain name and obtains the source station configuration information corresponding to the target source station.
[0103] Step 6, the source station server generates the target access identifier of the target source station based on the source station configuration information and sends the target access identifier to the CDN server.
[0104] Step 7, the CDN server generates an access request based on the target access identifier; sends the access request to the source station cache, so that the source station cache determines the target access strategy by using the target access identifier and accesses the target source station to obtain the target resource according to the target access strategy.
[0105] Figure 4 A block diagram of a content distribution network source return request processing device provided by the embodiment of the present disclosure is provided, which can be realized by software, hardware or combination of both to be part or all of an electronic device. As shown in the figure, the device comprises: Figure 4
[0106] The first receiving module 41 is configured to receive a source return request carrying an access identifier, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, the target acceleration domain name is generated by a target CDN server according to preset configuration information, and the target CDN server is a CDN server corresponding to the target service provider identifier.
[0107] The query module 42 is configured to query a target source station corresponding to the target acceleration domain name and obtain source station configuration information corresponding to the target source station.
[0108] The first generation module 43 is configured to generate a target access identifier of the target source station based on the source station configuration information.
[0109] The sending module 44 is configured to send the target access identifier to the target CDN server corresponding to the target service provider identifier, wherein the target CDN server obtains a target resource from the target source station according to the target access identifier.
[0110] In the embodiment of the present disclosure, the content distribution network source return request processing device further comprises a detection module configured to detect whether the target acceleration domain name carries signature information; in the case that the target acceleration domain name carries the signature information, it is determined that the target acceleration domain name supports authentication access, and the signature information is verified to obtain a verification result.
[0111] In the embodiments of the present disclosure, the query module 42 is configured to, in a case where the verification result is a verification pass, acquire a target scheduling rule matched by the target acceleration domain name, and take a source station indicated by the target scheduling rule as a target source station; and read source station configuration information corresponding to the target source station, wherein the source station configuration information comprises an authentication algorithm, an authentication parameter, a source station address corresponding to the target source station, and a back-to-source host.
[0112] Figure 5 A block diagram of a content distribution network back-to-source request processing apparatus provided in the embodiments of the present disclosure is shown in FIG. 4. The apparatus can be partially or entirely implemented as an electronic device by software, hardware, or a combination of both. As shown in FIG. 4, the apparatus comprises: Figure 5
[0113] The second receiving module 51 is configured to receive a service request from a client, wherein the service request carries an original access identifier of a service to be accessed by the client.
[0114] The response module 52 is configured to, in response to the service request, acquire service information of the service to be accessed by using the original access identifier, and generate a target acceleration domain name based on the service information and preset configuration information corresponding to a target CDN server.
[0115] The second generating module 53 is configured to generate a back-to-source request based on the target acceleration domain name and a target service provider identifier of the target CDN server, and send the back-to-source request to a source station server.
[0116] The processing module 54 is configured to receive a target access identifier fed back by the source station server based on the back-to-source request, and acquire a target resource from the target source station by using the target access identifier.
[0117] In the embodiments of the present disclosure, the generating module 53 is configured to detect whether the service to be accessed meets a domain name creation rule of the source station server by using the service information, to obtain a detection result; acquire a target domain name creation template corresponding to the detection result, wherein the target domain name creation template comprises a plurality of configuration items; acquire data content corresponding to each configuration item, and write the data content into the target domain name creation template to obtain the target acceleration domain name.
[0118] In the embodiments of the present disclosure, the generating module 53 is specifically configured to, in a case where the detection result is that the service to be accessed supports access to the source station server and does not carry an authentication access identifier, take an original domain name creation template as a target domain name creation template.
[0119] The generating module 53 is specifically configured to, in a case where the detection result is that the service to be accessed supports access to the source station server and carries the authentication access identifier, generate signature information by using the authentication access identifier, and carry the signature information in the original domain name creation template to obtain the domain name creation template.
[0120] In the embodiments of the present disclosure, the processing module 54 is configured to generate an access request based on the target access identifier, and send the access request to the source station cache, so that the source station cache determines a target access strategy by using the target access identifier, and accesses the target source station to obtain the target resource according to the target access strategy.
[0121] The embodiments of the present disclosure also provide an electronic device, such as Figure 6 As shown in the figure, the electronic device can include a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete mutual communication through the communication bus 1504.
[0122] The memory 1503 is configured to store a computer program.
[0123] The processor 1501 is configured to execute the computer program stored in the memory 1503, so as to realize the steps of the above-mentioned embodiments.
[0124] The communication bus mentioned in the above terminal can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0125] The communication interface is configured to realize communication between the above-mentioned terminal and other devices.
[0126] The memory can include a random access memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0127] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0128] In yet another embodiment provided by the present disclosure, a computer readable storage medium is also provided, which stores instructions thereon, when executed by a computer, cause the computer to perform the processing method of the content distribution network source request according to any one of the above embodiments.
[0129] In yet another embodiment provided by the present disclosure, a computer program product containing instructions is also provided, which, when executed by a computer, cause the computer to perform the processing method of the content distribution network source request according to any one of the above embodiments.
[0130] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk), etc.
[0131] The above merely provides preferred embodiments of the present disclosure, but not for limiting the protection scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall fall within the protection scope of the present disclosure.
[0132] The above merely provides specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Accordingly, the present disclosure will not be limited to these embodiments shown herein, but is to be accorded the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing origin requests in a content delivery network, characterized in that, The method is applied to a source station server in communication connection with a plurality of CDN servers, and comprises the following steps: receiving a source return request carrying an access identifier, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, and the target service provider identifier is a target service provider identifier of a target CDN server; querying a target source station corresponding to the target acceleration domain name, and acquiring source station configuration information corresponding to the target source station; generating a target access identifier of the target source station based on the source station configuration information; sending the target access identifier to a target CDN server corresponding to the target service provider identifier, wherein the target CDN server acquires target resources from the target source station according to the target access identifier; the target acceleration domain name is generated by the target CDN server in the following manner: detecting whether a to-be-accessed service of a client meets domain name creation rules of the source station server by using service information of the to-be-accessed service, and obtaining a detection result; acquiring a target domain name creation template corresponding to the detection result, wherein the target domain name creation template comprises a plurality of configuration items; acquiring data content corresponding to each configuration item, and writing the data content into the target domain name creation template to obtain a target acceleration domain name; the acquiring of the target domain name creation template corresponding to the detection result comprises: in a case where the detection result is that the to-be-accessed service supports access to the source station server and does not carry an authentication access identifier, taking an original domain name creation template as the target domain name creation template; in a case where the detection result is that the to-be-accessed service supports access to the source station server and carries an authentication access identifier, generating signature information by using the authentication access identifier, and carrying the signature information in the original domain name creation template to obtain the target domain name creation template; the target acceleration domain name comprises a second-level domain name, and the method further comprises: in a case where the target acceleration domain name does not carry the authentication access identifier, placing the target acceleration domain name under a first group by the target CDN server, the second-level domain names of acceleration domain names under the first group being the same and default sharing cache; in a case where the target acceleration domain name carries the authentication access identifier, placing the target acceleration domain name under a second group by the target CDN server, the second-level domain names of acceleration domain names under the second group being the same and default sharing cache; wherein the acceleration domain names under the first group and the acceleration domain names under the second group do not share cache.
2. The method of claim 1, wherein, Before querying the target source station corresponding to the target acceleration domain name, the method further comprises: detecting whether the target acceleration domain name carries signature information; in a case where the target acceleration domain name carries the signature information, determining that the target acceleration domain name supports authentication access, and verifying the signature information to obtain a verification result.
3. The method of claim 2, wherein, the querying of the target source station corresponding to the target acceleration domain name and the acquiring of the source station configuration information corresponding to the target source station comprise: In a case where the verification result is a verification pass, a target scheduling rule matched by the target acceleration domain name is acquired, and a source station indicated by the target scheduling rule is taken as a target source station; Source station configuration information corresponding to the target source station is read, where the source station configuration information includes an authentication algorithm, an authentication parameter, a source station address corresponding to the target source station, and a back-to-source host.
4. A processing method of a content distribution network source request, characterized in that, The method is applied to a target CDN server, which is any one of servers in communication connection with a source station server, and the method includes: receiving a service request from a client, where the service request carries an original access identifier of a service to be accessed by the client; in response to the service request, acquiring service information of the service to be accessed by using the original access identifier, and generating a target acceleration domain name based on the service information and preset configuration information corresponding to the target CDN server; generating a back-to-source request based on the target acceleration domain name and a target service provider identifier of the target CDN server, and sending the back-to-source request to the source station server; receiving a target access identifier fed back by the source station server based on the back-to-source request, and acquiring target resources from a target source station by using the target access identifier; the generating of the target acceleration domain name based on the service information and the preset configuration information corresponding to the target CDN server includes: detecting whether the service to be accessed meets a domain name creation rule of the source station server by using the service information, to obtain a detection result; acquiring a target domain name creation template corresponding to the detection result, where the target domain name creation template includes multiple configuration items; acquiring data content corresponding to each configuration item, and writing the data content into the target domain name creation template to obtain a target acceleration domain name; the acquiring of the target domain name creation template corresponding to the detection result includes: in a case where the detection result is that the service to be accessed supports access to the source station server and does not carry an authentication access identifier, taking an original domain name creation template as the target domain name creation template; in a case where the detection result is that the service to be accessed supports access to the source station server and carries an authentication access identifier, generating signature information by using the authentication access identifier, and carrying the signature information in the original domain name creation template to obtain the target domain name creation template; the target acceleration domain name includes a second-level domain name, and the method further includes: in a case where the target acceleration domain name does not carry an authentication access identifier, placing the target acceleration domain name under a first group, the second-level domain names of acceleration domain names under the first group being the same and default sharing cache; in a case where the target acceleration domain name carries the authentication access identifier, placing the target acceleration domain name under a second group, the second-level domain names of acceleration domain names under the second group being the same and default sharing cache; wherein the acceleration domain names under the first group and the acceleration domain names under the second group do not share cache.
5. The method of claim 4, wherein, the acquiring of target resources from the target source station by using the target access identifier includes: generating an access request based on the target access identifier; sending the access request to a source station cache, so that the source station cache determines a target access policy by using the target access identifier, and accesses the target source station according to the target access policy to obtain the target resource.
6. A processing apparatus for origin request in a content delivery network, characterized in that, Comprise: The first receiving module is used for receiving a back-to-source request carrying an access identifier, wherein the access identifier comprises a target acceleration domain name and a target service provider identifier, and the target service provider identifier is a target service provider identifier of a target CDN server; The query module is used for querying a target source station corresponding to the target acceleration domain name, and obtaining source station configuration information corresponding to the target source station; The first generating module is used for generating a target access identifier of the target source station based on the source station configuration information; The sending module is used for sending the target access identifier to a target CDN server corresponding to the target service provider identifier, wherein the target CDN server obtains a target resource from the target source station according to the target access identifier; The target acceleration domain name is generated by the target CDN server in the following manner: Detecting whether the to-be-accessed service meets a domain name creation rule of the source station server by using service information of the to-be-accessed service of the client, obtaining a detection result, obtaining a target domain name creation template corresponding to the detection result, wherein the target domain name creation template comprises a plurality of configuration items, obtaining data content corresponding to each configuration item, and writing the data content into the target domain name creation template to obtain a target acceleration domain name; The target domain name creation template corresponding to the detection result is obtained in the following manner: In a case where the detection result is that the to-be-accessed service supports accessing the source station server and does not carry an authentication access identifier, an original domain name creation template is taken as the target domain name creation template; In a case where the detection result is that the to-be-accessed service supports accessing the source station server and carries an authentication access identifier, signature information is generated by using the authentication access identifier, and the signature information is carried in the original domain name creation template to obtain the target domain name creation template; The target acceleration domain name comprises a second-level domain name, and the device is further used for: In a case where the target acceleration domain name does not carry the authentication access identifier, placing the target acceleration domain name under a first group by the target CDN server, the second-level domain names of acceleration domain names under the first group are the same, and the acceleration domain names under the first group share a cache by default; In a case where the target acceleration domain name carries the authentication access identifier, placing the target acceleration domain name under a second group by the target CDN server, the second-level domain names of acceleration domain names under the second group are the same, and the acceleration domain names under the second group share a cache by default; The acceleration domain names under the first group and the acceleration domain names under the second group do not share a cache.
7. A processing apparatus for origin request in a content delivery network, characterized in that, Comprise: The second receiving module is used for receiving a service request from a client, wherein the service request carries an original access identifier of a to-be-accessed service of the client; The response module is configured to, in response to the service request, acquire service information of the service to be accessed by using the original access identifier, and generate a target acceleration domain name based on the service information and preset configuration information corresponding to the target CDN server. The second generation module is configured to generate a source retrieval request based on the target acceleration domain name and a target service provider identifier of the target CDN server, and send the source retrieval request to the source station server. The processing module is configured to receive a target access identifier fed back by the source station server based on the source retrieval request, and acquire target resources from a target source station by using the target access identifier. The response module is configured to detect whether the service to be accessed meets domain name creation rules of the source station server by using the service information, to obtain a detection result, acquire a target domain name creation template corresponding to the detection result, where the target domain name creation template includes a plurality of configuration items, acquire data content corresponding to each configuration item, and write the data content into the target domain name creation template to obtain a target acceleration domain name. The response module is configured to, in a case where the detection result is that the service to be accessed supports access to the source station server and does not carry an authentication access identifier, use an original domain name creation template as the target domain name creation template; and in a case where the detection result is that the service to be accessed supports access to the source station server and carries an authentication access identifier, generate signature information by using the authentication access identifier, and carry the signature information in the original domain name creation template to obtain the target domain name creation template. The target acceleration domain name includes a second-level domain name, and the apparatus is further configured to: In a case where the target acceleration domain name does not carry the authentication access identifier, place the target acceleration domain name under a first group, where acceleration domain names under the first group have the same second-level domain name and share a cache by default. In a case where the target acceleration domain name carries the authentication access identifier, place the target acceleration domain name under a second group, where acceleration domain names under the second group have the same second-level domain name and share a cache by default. The acceleration domain names under the first group and the acceleration domain names under the second group do not share a cache.
8. A storage medium, characterized by The storage medium includes a stored program, where the program performs the method in any one of claims 1 to 5 when running.
9. An electronic device, comprising: The apparatus includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory is configured to store a computer program. The processor is configured to perform the method in any one of claims 1 to 5 by running the program stored in the memory.
Citation Information
Patent Citations
Resource acquisition method and device, equipment and storage medium
CN115695580A