Resource processing method, device and equipment based on hybrid CDN system
By introducing CDN hybrid nodes into the CDN system and optimizing the resource processing process, the problem of high bandwidth costs in the edge and parent layer in the existing CDN system is solved, and the effect of reducing costs and improving service quality is achieved.
Patent Information
- Application Number
- CN202311706557.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2043-12-12
AI Technical Summary
When processing resources, the edge bandwidth cost and parent layer bandwidth cost are high, resulting in increased costs and poor service quality.
The CDN hybrid node is introduced, and the resource processing process is optimized by mixing pull conditions and mixing push conditions, so that the CDN edge nodes can obtain resources from the CDN hybrid node, rather than directly obtaining them from the CDN parent layer node, thereby transferring part of the parent layer bandwidth to the CDN hybrid node.
It reduces the bandwidth cost of the CDN parent layer, improves resource processing flexibility and service quality, and avoids the quality damage caused by the use of cheap resources to external services.
Smart Images

Figure CN117714384B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of cloud computing technology, and in particular to a resource processing method, device and equipment based on a hybrid CDN system. Background Art
[0002] Content Delivery Network (CDN) is a distributed network technology based on the Internet. CDN caches resource content on edge servers around the world, allowing users to obtain the required content faster, thereby increasing access speed and saving source site bandwidth pressure and costs.
[0003] CDN systems are generally multi-layered. The layer closest to the user terminal is called the edge layer, and the layer between the edge layer and the source station is called the parent layer. User requests will first hit the edge layer node, and the edge node consumes edge bandwidth for external services. If the edge layer node does not cache the corresponding resource, it needs to request the resource from the parent layer node, and this process will consume the external bandwidth of the parent layer node. The CDN bandwidth cost is mainly composed of the above-mentioned edge bandwidth cost and parent layer bandwidth cost. Summary of the invention
[0004] The present disclosure provides a resource processing method, apparatus and device based on a hybrid CDN system.
[0005] According to one aspect of the present disclosure, a resource processing method based on a hybrid CDN system is provided, which is executed by a CDN edge node in the hybrid CDN system, wherein the hybrid CDN system further includes a CDN parent node and a CDN hybrid node; the method includes:
[0006] In response to the user request, the CDN parent node is requested for resources, and the CDN parent node determines whether the user request satisfies the hybrid pull condition of the back-to-origin CDN hybrid node;
[0007] When the user request satisfies the hybrid pull condition, the first resource to be accessed is obtained from the CDN hybrid node.
[0008] According to one aspect of the present disclosure, a resource processing method based on a hybrid CDN system is provided, which is performed by a CDN hybrid node in the hybrid CDN system, wherein the hybrid CDN system further includes a CDN edge node and a CDN parent node; the method includes:
[0009] When the user request obtained by the CDN edge node meets the hybrid pull condition of the back-to-source CDN hybrid node, determine the first resource to be accessed;
[0010] Feedback the first resource to be accessed to the CDN edge node.
[0011] According to one aspect of the present disclosure, a resource processing device based on a hybrid CDN system is provided, which is configured in a CDN edge node in the hybrid CDN system, wherein the hybrid CDN system further includes a CDN parent node and a CDN hybrid node; the device includes:
[0012] The inquiry request module is used to request resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request meets the hybrid pull condition of the back-to-source CDN hybrid node;
[0013] The first resource acquisition module is used to acquire the first resource to be accessed from the CDN hybrid node when the user request meets the hybrid pull condition.
[0014] According to one aspect of the present disclosure, a resource processing device based on a hybrid CDN system is provided, which is configured in a CDN hybrid node in the hybrid CDN system, wherein the hybrid CDN system further includes a CDN edge node and a CDN parent node; the device includes:
[0015] A first resource determination module, configured to determine a first resource to be accessed when a user request obtained by a CDN edge node satisfies a hybrid pull condition of a back-to-source CDN hybrid node;
[0016] The first resource feedback module is used to feedback the first resource to be accessed to the CDN edge node.
[0017] According to one aspect of the present disclosure, there is provided a hybrid CDN system, comprising a CDN edge node, a CDN parent node and a CDN hybrid node;
[0018] The CDN edge node is used to request resources from the CDN parent node in response to a user request;
[0019] The CDN parent node is used to determine whether the user request meets the hybrid pull condition of the back-to-source CDN hybrid node;
[0020] The CDN hybrid node is used to feed back the first resource to be accessed to the CDN edge node when the user request meets the hybrid pull condition.
[0021] According to another aspect of the present disclosure, there is provided an electronic device, the electronic device comprising:
[0022] at least one processor; and
[0023] a memory communicatively connected to the at least one processor; wherein,
[0024] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method provided by any embodiment of the present disclosure.
[0025] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided by any embodiment of the present disclosure.
[0026] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method provided according to any embodiment of the present disclosure is implemented.
[0027] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0029] Figure 1a is a flow chart of a resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0030] Figure 1b It is a structural diagram of a hybrid CDN system provided according to an embodiment of the present disclosure;
[0031] Figure 1c It is a structural diagram of a hybrid CDN system in the related technology;
[0032] Figure 2a is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0033] Figure 2b is an interactive schematic diagram of a resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0034] Figure 3 is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0035] Figure 4a is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0036] Figure 4bis an interactive schematic diagram of a resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0037] Figure 5a is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0038] Figure 5b is a service diagram of an XCDN center provided according to an embodiment of the present disclosure;
[0039] Figure 6 It is a structural schematic diagram of a resource processing device based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0040] Figure 7 It is a structural schematic diagram of a resource processing device based on a hybrid CDN system provided according to an embodiment of the present disclosure;
[0041] Figure 8 It is a block diagram of an electronic device used to implement the resource processing method based on a hybrid CDN system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] Figure 1a The present invention provides a flowchart of a resource processing method based on a hybrid CDN system according to an embodiment of the present invention. The method is applicable to the case where a portion of the parent layer bandwidth is transferred to a CDN hybrid node. The method can be executed by a resource processing device based on a hybrid CDN system, which can be implemented in software and / or hardware and can be integrated into an electronic device. Figure 1a As shown, the method is executed by a CDN edge node in a hybrid CDN system. The hybrid CDN system also includes a CDN parent node and a CDN hybrid node. The resource processing method based on the hybrid CDN system of this embodiment may include:
[0043] S101, in response to a user request, requesting resources from a CDN parent node, and the CDN parent node determining whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node;
[0044] S102: When the user request satisfies the hybrid pull condition, obtain the first resource to be accessed from the CDN hybrid node.
[0045] Figure 1b is a structural diagram of a hybrid CDN system provided according to an embodiment of the present disclosure, with reference to Figure 1bThe hybrid CDN system may include a CDN edge node 01, a CDN parent node 02, and a CDN hybrid node 03, wherein the CDN hybrid node 03 serves as a heterogeneous storage node for the CDN edge node 01. The CDN edge node 01 can not only obtain resource data by returning to the source through the CDN parent node 02, but also bidirectional data interaction can be performed between the CDN edge node 01 and the CDN hybrid node 03. The CDN edge node 01 can store resource data heterogeneously to the CDN hybrid node, so that other CDN edge nodes can download the resource data from the CDN hybrid node 03 without returning the resource data from the CDN parent node. Figure 1b and Figure 1c Compared with a CDN system that only includes CDN edge nodes and CDN parent layer nodes but does not include CDN hybrid nodes, by introducing CDN hybrid nodes, part of the parent layer bandwidth can be transferred to CDN hybrid nodes. It should be noted that the hybrid CDN system can be referred to as the XCDN system, and the CDN hybrid node can be referred to as the XCDN node.
[0046] In the embodiment of the present disclosure, the hybrid pull condition is used to characterize whether the user request satisfies the condition of obtaining resource data from the CDN hybrid node, that is, whether the user request satisfies the condition of returning to the source CDN hybrid node. Exemplarily, whether the user request satisfies the hybrid pull condition can be determined by whether the user request carries a CDN hybrid tag or whether there are resources to be accessed in the CDN hybrid node.
[0047] Specifically, the CDN edge node requests resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request meets the hybrid pull conditions. If the user request meets the hybrid pull conditions, the first resource to be accessed is obtained from the CDN hybrid node; if the user request does not meet the hybrid pull conditions, the CDN parent node obtains the resource to be accessed from the source site and feeds it back to the CDN edge node.
[0048] The technical solution provided by the embodiment of the present disclosure obtains a hybrid CDN system by introducing a CDN hybrid node into the CDN system. When a user request meets the hybrid pull condition, the CDN edge node obtains the first resource to be accessed from the CDN hybrid node without obtaining it from the CDN parent node, thereby transferring part of the parent layer bandwidth to the CDN hybrid node, thereby improving the flexibility of resource processing.
[0049] In an optional implementation, the method further includes: when the user request satisfies the hybrid pull condition, also obtaining the metadata of the resource to be accessed fed back by the CDN parent node; after obtaining the first resource to be accessed from the CDN hybrid node, it also includes: using the metadata of the resource to be accessed to verify the first resource.
[0050] The meta information of the resource to be accessed may be the MD5 value of the resource to be accessed. When the user request meets the hybrid pull condition, the CDN parent node may also feed back the meta information of the resource to be accessed to the CDN edge node. After the CDN edge node obtains the first resource to be accessed from the CDN hybrid node, it may also use the meta information of the resource to be accessed to verify the first resource. Specifically, the MD5 value of the first resource may be calculated, and the MD5 value may be compared with the meta information obtained in advance from the CDN parent node. If the comparison is consistent, the first resource verification passes; if the comparison is inconsistent, the first resource verification fails and is unsafe.
[0051] It should also be noted that the CDN parent node can also determine whether the user request meets the hybrid pull condition in combination with the meta information of the resource to be accessed; if the CDN parent node does not have the meta information of the resource to be accessed, the user request does not meet the hybrid pull condition; otherwise, the user request meets the hybrid pull condition. By determining whether the user request meets the hybrid pull condition in combination with the meta information of the resource to be accessed, the efficiency of determining the hybrid pull condition can be improved, and by using the meta information of the resource to be accessed to verify the first resource obtained from the CDN hybrid node, the accuracy and integrity of the first resource can be improved.
[0052] In the present disclosure, CDN edge nodes and CDN parent layer nodes can form a CDN node cache system as an access layer, which is responsible for receiving and processing user requests and determining whether user requests meet the hybrid pull conditions, that is, controlling whether user requests return to the source CDN hybrid node, thereby improving service quality, data security, etc.
[0053] In an optional implementation, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid node. By converting a portion of the parent layer bandwidth into the cheaper bandwidth of the CDN hybrid node, the bandwidth cost can be reduced, thereby achieving the effect of reducing the bandwidth cost.
[0054] Figure 2a 1 is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure. In the embodiment of the present disclosure, the method is executed by a CDN edge node in a hybrid CDN system, and the hybrid CDN system further includes a CDN parent node and a CDN hybrid node; the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node. Figure 2a The resource processing method based on the hybrid CDN system of this embodiment may include:
[0055] S201, in response to a user request, requesting resources from a CDN parent node, and the CDN parent node determining whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node;
[0056] S202, when the user request meets the hybrid pull condition, request the CDN hybrid center for the resource to be accessed, and the CDN hybrid center determines the first CDN hybrid edge node where the resource to be accessed is located, and returns the address of the first CDN hybrid edge node;
[0057] S203: Acquire a first resource to be accessed from the first CDN hybrid edge node using the address of the first CDN hybrid edge node.
[0058] Among them, CDN hybrid nodes include CDN hybrid centers and CDN hybrid edge nodes (which can be called XCDN edge miners). CDN hybrid centers are used to process query requests and push requests of CDN hybrid edge nodes. Exemplarily, CDN hybrid centers can maintain the IP addresses and real-time status of CDN hybrid edge nodes, maintain hybrid resource indexes of resources cached by CDN hybrid nodes, facilitate querying the cache status and location of resources, and schedule CDN hybrid edge nodes.
[0059] Specifically, the CDN edge node requests resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request meets the hybrid pull condition; if so, the CDN parent node can return the metadata of the resource to be accessed to the CDN edge node, and the CDN edge node requests the resource to be accessed from the CDN hybrid center, and the CDN hybrid center determines the CDN hybrid edge node where the resource to be accessed is located as the first CDN hybrid edge node, and returns the address of the first CDN hybrid edge node to the CDN edge node; the CDN edge node uses the address of the first CDN hybrid edge node to request resources from the first CDN hybrid edge node, and obtains the first resource fed back by the first CDN hybrid edge node. The CDN hybrid center can further improve the resource processing efficiency by uniformly scheduling the resources in each CDN hybrid edge node.
[0060] In an optional implementation, requesting the resource to be accessed from the CDN hybrid center, the CDN hybrid center determining the first CDN hybrid edge node where the resource to be accessed is located, and returning the address of the first CDN hybrid edge node, includes: requesting the resource to be accessed from the CDN hybrid center, the CDN hybrid center determining the first CDN hybrid edge node where the resource to be accessed is located based on a hybrid resource index, and returning the address of the first CDN hybrid edge node; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0061] The CDN hybrid center has a hybrid resource index, which is generated based on the resources in each CDN hybrid edge node and may include a cache relationship between the CDN hybrid edge node and the resource. The CDN hybrid center can determine the resource to be accessed based on the hybrid resource index, select the first CDN hybrid edge node where the resource to be accessed is located from each CDN hybrid edge node, and obtain the address of the first CDN hybrid edge node. By maintaining the hybrid resource index, the CDN hybrid center can improve the efficiency of determining the first CDN hybrid edge node, thereby further improving the efficiency of resource processing.
[0062] The technical solution provided by the embodiment of the present disclosure can further improve resource processing efficiency by uniformly scheduling resources in each CDN hybrid edge node through a CDN hybrid center and maintaining a resource index of each CDN hybrid edge node in the CDN hybrid center.
[0063] In an optional implementation, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid edge node.
[0064] Among them, the unit bandwidth cost of CDN hybrid edge nodes is even lower, and external services can be provided using X86 servers based on different network access types such as public network dedicated lines, public network aggregation, NAT1, NAT4, and edge resources embedded with dedicated SDKs. By converting part of the parent layer bandwidth into a cheaper CDN hybrid edge bandwidth, the bandwidth cost can be reduced. In addition, the present disclosure reduces the bandwidth cost by diverting the CDN parent layer bandwidth, so it is not limited by the bottleneck of the edge hit rate. Since user requests are served by CDN edge nodes, the cheap resources of CDN hybrid edge nodes only provide services as bypass caches of CDN edge nodes, and also avoids the stability problem of directly providing external services by cheap resources.
[0065] In an optional implementation, when the CDN hybrid center determines that there is no CDN hybrid edge node with the resource to be accessed, it re-requests the resource from the CDN parent node so that the CDN parent node feeds back the resource to be accessed.
[0066] In the embodiment of the present disclosure, if the CDN hybrid center determines that there is no resource to be accessed in the hybrid resource index, it can be determined that there is no CDN hybrid edge node with the resource to be accessed, and the CDN edge node can re-request the resource from the CDN parent node, so that the CDN parent node obtains the resource to be accessed from the source station and feeds back the resource to be accessed to the CDN edge node.
[0067] In an optional implementation, when the first CDN hybrid edge node does not return the resource to be accessed, the resource is requested again from the CDN parent node, so that the CDN parent node feeds back the resource to be accessed.
[0068] If the first CDN hybrid edge node does not return the resource to be accessed, the CDN edge node may request the resource from the CDN parent node again, so that the CDN parent node obtains the resource to be accessed from the source station and feeds back the resource to be accessed to the CDN edge node.
[0069] In the case that the CDN edge node cannot obtain the resource to be accessed through the CDN hybrid node, it can also re-access the CDN parent node to obtain the resource data. The above disaster recovery logic can further improve the success rate of resource processing and ensure the stability of user request processing.
[0070] It should also be noted that the circuit breaker logic can be added. When the number of failed requests for the same user reaches the threshold, the CDN hybrid center can be no longer requested; if multiple requests from different users fail to access the CDN center, the CDN hybrid center can be no longer requested for a period of time, and asynchronous detection and recovery logic can be added to control the latency of user requests.
[0071] Figure 2b is an interactive schematic diagram of a resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure, with reference to Figure 2b , the CDN edge node determines whether it is necessary to enable the XCDN back to source according to the configuration. If necessary, the CDN edge node carries the XCDN back to source mark when it goes back to the upstream; the CDN parent node determines whether the resource to be accessed hits the resource metadata. If the resource to be accessed does not hit or the resource type cannot use XCDN back to source, it directly spits out the resource data of the resource to be accessed, otherwise it spits out the metadata of the resource to be accessed, that is, it meets the hybrid pull condition; when the hybrid pull condition is met, the CDN edge node requests the XCDN center to schedule the API interface, and the XCDN center determines whether there is an available XCDN edge node with the corresponding resource. If there is, it is selected as the first XCDN edge node, and the address of the first XCDN edge node is fed back to the CDN edge node; the CDN edge node requests the first resource from the first XCDN edge node through the HTTP GET interface; the first XCDN edge node determines whether the first resource exists, and if so, it is fed back to the CDN edge node. In addition, if the CDN edge node cannot obtain the first resource, it can re-access the CDN parent node to enable the CDN parent node to obtain resource data from the source station.
[0072] Figure 3 1 is a flowchart of another resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure. In the embodiment of the present disclosure, the method is executed by a CDN edge node in the hybrid CDN system, and the hybrid CDN system also includes a CDN parent node and a CDN hybrid node. Figure 3 The resource processing method based on the hybrid CDN system of this embodiment may include:
[0073] S301, in response to a user request, requesting resources from a CDN parent node, and the CDN parent node determining whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node;
[0074] If the user request meets the mixed pull condition, continue to execute S302; otherwise, jump to execute S303;
[0075] S302, obtaining a first resource to be accessed from a CDN hybrid node;
[0076] S303, obtaining a second resource to be accessed fed back by the CDN parent node;
[0077] S304: When the user request satisfies the hybrid push condition, the second resource is pushed to the CDN hybrid node for storage.
[0078] In the embodiment of the present disclosure, the hybrid pull condition is used to characterize whether the user request satisfies the condition of obtaining resource data from the CDN hybrid node; the hybrid push condition is used to characterize whether the user request satisfies the condition of pushing new resources obtained from the CDN parent node to the CDN hybrid node for caching, that is, it is used to characterize whether the user request satisfies the bypass caching condition.
[0079] In the embodiment of the present disclosure, the CDN edge node requests resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request meets the hybrid pull condition. If the user request meets the hybrid pull condition, the first resource to be accessed is obtained from the CDN hybrid node.
[0080] If the user request does not meet the hybrid pull condition, the CDN parent node obtains the second resource to be accessed (i.e., the new resource) from the source station and feeds it back to the CDN edge node. The CDN edge node obtains the second resource from the CDN parent node and determines whether the second resource meets the hybrid push condition. Exemplarily, whether the user request meets the hybrid push condition can be determined by whether the user request carries the CDN hybrid mark. If the user request meets the hybrid push condition, the CDN edge node also pushes the second resource to the CDN hybrid node for storage, so that when other CDN edge nodes need to access the second resource, they can directly obtain it from the CDN hybrid node without having to obtain it from the CDN parent node.
[0081] The technical solution provided by the embodiment of the present disclosure obtains a hybrid CDN system by introducing a CDN hybrid node in the CDN system. When a user request meets the hybrid pull condition, the CDN edge node obtains the first resource to be accessed from the CDN hybrid node without obtaining it from the CDN parent node, thereby transferring a portion of the parent layer bandwidth to the CDN hybrid node. When a user request does not meet the hybrid pull condition, the CDN edge node obtains the second resource to be accessed from the CDN parent node, and determines whether the second resource meets the hybrid push condition. When the hybrid push condition is met, the second resource is also cached in the CDN hybrid node for subsequent access, thereby realizing the transfer of a portion of the parent layer bandwidth to the CDN hybrid node.
[0082] Figure 4a The flowchart of another resource processing method based on a hybrid CDN system is provided according to an embodiment of the present disclosure. In the embodiment of the present disclosure, the method is executed by a CDN edge node in a hybrid CDN system, and the hybrid CDN system further includes a CDN parent node and a CDN hybrid node; the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node. Figure 4a The resource processing method based on the hybrid CDN system of this embodiment may include:
[0083] S401, in response to a user request, requesting resources from a CDN parent node, and the CDN parent node determining whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node;
[0084] If the user request meets the mixed pull condition, continue to execute S402; otherwise, jump to execute S403;
[0085] S402, obtaining a first resource to be accessed from a CDN hybrid node;
[0086] S403, obtaining the second resource to be accessed fed back by the CDN parent node;
[0087] S404, when the user request satisfies the hybrid sub-condition, sending a push request to the CDN hybrid center, the CDN hybrid center determines whether the push request satisfies the push sub-condition, and when the push request satisfies the push sub-condition, allocates a second CDN hybrid edge node to the push request;
[0088] S405, push the second resource to the second CDN hybrid edge node, and synchronize the push status to the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index if the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0089] Among them, the hybrid push condition may include a hybrid sub-condition and a push sub-condition. The hybrid sub-condition is used to characterize whether the user request needs to go back to the source CDN hybrid node, and the push sub-condition is used to characterize whether the user request satisfies the bypass cache situation. For example, it can be determined whether the user request hits the hybrid resource index, whether there is a second resource to be accessed in the second CDN hybrid node, etc. to determine whether the user request meets the push sub-condition.
[0090] Specifically, the CDN edge node requests resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request meets the hybrid pull condition; if not, the CDN parent node obtains the second resource to be accessed (i.e., the new resource) from the source station, and feeds the second resource back to the CDN edge node. The CDN edge node also determines whether the user request meets the hybrid sub-condition. If the hybrid sub-condition is met, a push request is sent to the CDN hybrid center, and the CDN hybrid center determines whether the push request meets the push sub-condition. If the push sub-condition is met, a second CDN hybrid edge node is allocated, and the address of the second CDN hybrid edge node is fed back; the CDN edge node uses the address of the second CDN hybrid edge node to push the second resource to the cache in the second CDN hybrid edge node. It should be noted that if the user request does not meet the hybrid sub-condition or does not meet the push sub-condition, the operation is terminated, and there is no need to push the second resource to the bypass cache.
[0091] By judging whether the user request satisfies the hybrid sub-condition and the push sub-condition, if both are satisfied, it is determined that the user request satisfies the hybrid push condition, a second CDN hybrid edge node is allocated, and the address of the second CDN hybrid edge node is fed back to the CDN edge node, so that the CDN edge node caches the second resource in the second CDN hybrid edge node, which can improve the cache efficiency of the second resource, thereby further improving the resource processing efficiency. It should be noted that the CDN hybrid center also updates the hybrid resource index according to the cache status of the second resource.
[0092] In an optional implementation, when the user request carries a CDN hybrid tag, it is determined that the user request satisfies the hybrid sub-condition; and it is determined whether the push request satisfies the push sub-condition based on the bandwidth and / or storage space of the CDN hybrid edge node.
[0093] In the embodiment of the present disclosure, when a CDN hybrid node needs to be returned to the source, a CDN hybrid tag can be added to the user request. If the user request carries a CDN hybrid tag, the user request satisfies the hybrid sub-condition; otherwise, the hybrid sub-condition is not satisfied, and there is no need to cache the second resource in the bypass cache. In combination with the bandwidth and storage space of each CDN hybrid edge node, it is determined whether the second resource needs to be pushed to the CDN hybrid edge node. For example, a preset bandwidth threshold and storage space threshold can be used to determine whether there is a CDN hybrid edge node with an available bandwidth greater than the bandwidth threshold and an available storage space greater than the storage space threshold. If so, it can be determined that the push sub-condition is satisfied, and a CDN hybrid edge node with a larger available bandwidth and a larger available storage space can be selected as the second CDN hybrid edge node. By determining whether the hybrid sub-condition is satisfied and whether the push sub-condition is satisfied, the push efficiency of resources can be further improved, thereby further improving the resource processing efficiency.
[0094] In an optional implementation, the second resource fed back by the CDN parent node is obtained through the first thread, and the second resource is pushed to the CDN hybrid node for storage through the second thread; the first thread and the second thread are asynchronous.
[0095] The acquisition of the second resource and the cache push process of the second resource are performed asynchronously, so that the cache push does not affect the processing of the user request, thereby maintaining the stability of the user request.
[0096] The technical solution provided by the embodiment of the present disclosure obtains a hybrid CDN system by introducing a CDN hybrid node into the CDN system. When the user request does not meet the hybrid pull condition, the CDN edge node obtains the second resource to be accessed from the CDN parent node, and determines whether the user request meets the hybrid sub-condition. When the hybrid sub-condition is met, a push request is sent to the CDN hybrid center. The CDN hybrid center determines whether the push request meets the push sub-condition, and when the push sub-condition is met, a second CDN hybrid edge node is determined, so that the CDN edge node pushes the second resource to the second CDN hybrid edge node, thereby storing the second resource in the bypass cache for subsequent access, thereby realizing the transfer of a part of the parent layer bandwidth to the bypass cache.
[0097] Figure 4b is an interactive schematic diagram of a resource processing method based on a hybrid CDN system provided according to an embodiment of the present disclosure, with reference to Figure 4bIn the case where the user request does not meet the hybrid pull conditions, the CDN edge node can obtain the second resource from the CDN parent node. The CDN edge node determines whether it needs to be pushed to the XCDN according to the configuration. If necessary, it requests the push API interface of the XCDN center. The XCDN center determines whether it needs to be pushed to the XCDN edge node. If necessary, it selects the second XCDN edge node and feeds back the address of the second XCDN edge node. The CDN edge node pushes the second resource to the second XCDN edge node through the HTTP PUT interface. The second XCDN edge node processes the PUT request. After the second resource is transmitted, an index is established locally, and the deployment result is reported to the XCDN center. The XCDN center updates the hybrid resource index.
[0098] Figure 5a The present invention provides a flowchart of a resource processing method based on a hybrid CDN system according to an embodiment of the present invention. The method is applicable to the case where a portion of the parent layer bandwidth is transferred to a CDN hybrid node. The method can be executed by a resource processing device based on a hybrid CDN system, which can be implemented in software and / or hardware and can be integrated into an electronic device. The method is executed by a CDN hybrid node in a hybrid CDN system, and the hybrid CDN system also includes a CDN edge node and a CDN parent layer node. Figure 5a The resource processing method based on the hybrid CDN system of this embodiment may include:
[0099] S501, when the user request obtained by the CDN edge node meets the hybrid pull condition of the source CDN hybrid node, determine the first resource to be accessed;
[0100] S502: Feedback the first resource to be accessed to the CDN edge node.
[0101] Among them, the hybrid CDN system includes CDN edge nodes, CDN parent nodes and CDN hybrid nodes. The CDN edge node requests resources from the CDN parent node in response to user requests. The CDN parent node determines whether the user request meets the hybrid pull condition of the source CDN hybrid node. If the hybrid pull condition is met, the CDN edge node requests resources from the CDN hybrid node. The CDN hybrid node determines the first resource to be accessed and feeds back the first resource to the CDN edge node. If the hybrid pull condition is not met, the CDN parent node obtains the second resource to be accessed from the source station and feeds back the second resource to the CDN edge node. Through the CDN hybrid system including the CDN hybrid node, part of the parent layer bandwidth of the CDN edge node is transferred to the CDN hybrid node, so that the CDN edge node can obtain the second resource to be accessed from the CDN hybrid node.
[0102] In an optional implementation, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid node.
[0103] Among them, the unit bandwidth cost of CDN hybrid edge nodes is lower. By converting part of the parent layer bandwidth into the cheaper CDN hybrid edge bandwidth, the bandwidth cost can be reduced. In addition, the present disclosure reduces the bandwidth cost by diverting the CDN parent layer bandwidth, so it is not limited by the bottleneck of the edge hit rate. Since user requests are served by CDN edge nodes, the cheap resources of CDN hybrid edge nodes only serve as bypass caches of CDN edge nodes, and also avoids the stability problem of directly serving external services with cheap resources.
[0104] The technical solution provided by the embodiment of the present disclosure obtains a hybrid CDN system by introducing a CDN hybrid node into the CDN system. When a user request meets the hybrid pull condition, the CDN hybrid node determines the first resource to be accessed and feeds back the first resource to the CDN edge node, thereby transferring a portion of the parent layer bandwidth to the CDN hybrid node, thereby improving the flexibility of resource processing and taking into account both bandwidth costs and the stability of external services.
[0105] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node; the method is performed by the CDN hybrid center; the determining the first resource to be accessed includes: determining the first CDN hybrid edge node where the resource to be accessed is located, and feeding back the address of the first CDN hybrid edge node, so that the CDN edge node uses the address of the first CDN hybrid edge node to obtain the first resource to be accessed from the first CDN hybrid edge node. Exemplarily, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid edge node.
[0106] Among them, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node. Specifically, when the user request meets the hybrid pull condition, the CDN edge node requests the resource to be accessed from the CDN hybrid center, and the CDN hybrid center determines the CDN hybrid edge node where the resource to be accessed is located as the first CDN hybrid edge node, and returns the address of the first CDN hybrid edge node to the CDN edge node, and the CDN edge node uses the address of the first CDN hybrid edge node to request the resource from the first CDN hybrid edge node, and the first CDN hybrid edge node feeds back the first resource to the CDN edge node. The CDN hybrid center can further improve the resource processing efficiency by uniformly scheduling the resources in each CDN hybrid edge node.
[0107] In an optional implementation, determining the first CDN hybrid edge node where the resource to be accessed is located, and feeding back the address of the first CDN hybrid edge node, includes: determining the first CDN hybrid edge node where the resource to be accessed is located based on a hybrid resource index, and feeding back the address of the first CDN hybrid edge node; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0108] In the embodiment of the present disclosure, the CDN hybrid center can determine the resource to be accessed based on the hybrid resource index, select the first CDN hybrid edge node where the resource to be accessed is located from each CDN hybrid edge node, and obtain the address of the first CDN hybrid edge node. The CDN hybrid center can improve the efficiency of determining the first CDN hybrid edge node by maintaining the hybrid resource index, thereby further improving the resource processing efficiency.
[0109] In an optional embodiment, the method further includes: when the user request does not meet the hybrid pull condition and the CDN edge node obtains the second resource to be accessed from the CDN parent node, determining whether the user request meets the hybrid push condition, and storing the second resource in the CDN hybrid node if the hybrid push condition is met.
[0110] Among them, the hybrid push condition is used to characterize whether the user request satisfies the situation of pushing the new resource obtained from the CDN parent node to the CDN hybrid node for caching. If the user request does not meet the hybrid pull condition, the CDN edge node obtains the second resource from the CDN parent node and determines whether the second resource meets the hybrid push condition; if the hybrid push condition is met, the CDN hybrid node also obtains the second resource pushed by the CDN edge node and stores the second resource, so that when other CDN edge nodes need to access the second resource, they can directly obtain it from the CDN hybrid node without obtaining it from the CDN parent node, thereby reducing the parent layer bandwidth.
[0111] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node, and the method is executed by the CDN hybrid center; determining whether the user request satisfies the hybrid push condition, and if the hybrid push condition is satisfied, storing the second resource in the CDN hybrid node, including: obtaining a push request sent by the CDN edge node if the user request satisfies the hybrid sub-condition; determining whether the push request satisfies the push sub-condition, and if the push sub-condition is satisfied, allocating a second CDN hybrid edge node to the push request, so that the CDN edge node pushes the second resource to the second CDN hybrid edge node, and synchronizes the push status with the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index if the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0112] Among them, the hybrid push condition may include a hybrid sub-condition and a push sub-condition. The hybrid sub-condition is used to characterize whether the user request needs to return to the source CDN hybrid node, and the push sub-condition is used to characterize whether the user request satisfies the bypass cache situation.
[0113] Specifically, if the user request does not meet the hybrid pull condition, the CDN parent node determines the second resource to be accessed and feeds back the second resource to the CDN edge node. The CDN edge node also determines whether the user request meets the hybrid sub-condition. If the hybrid sub-condition is met, a push request is sent to the CDN hybrid center. The CDN hybrid center determines whether the push request meets the push sub-condition. If the push sub-condition is met, the CDN hybrid center allocates a second CDN hybrid edge node and feeds back the address of the second CDN hybrid edge node to the CDN edge node, so that the CDN edge node uses the address of the second CDN hybrid edge node to push the second resource to the second CDN hybrid edge node for cache. By judging whether the user request meets the hybrid sub-condition and the push sub-condition, if both are met, the CDN hybrid center allocates a second CDN hybrid edge node for the push request, and feeds back the address of the second CDN hybrid edge node to the CDN edge node, so that the CDN edge node caches the second resource in the second CDN hybrid edge node, which can improve the cache efficiency of the second resource, thereby further improving the resource processing efficiency.
[0114] In an optional implementation, when the user request carries a CDN hybrid tag, it is determined that the user request satisfies the hybrid sub-condition; and it is determined whether the push request satisfies the push sub-condition based on the bandwidth and / or storage space of the CDN hybrid edge node.
[0115] In the embodiment of the present disclosure, when there is a need to return to the source CDN hybrid node, a CDN hybrid tag can be added to the user request. If the user request carries the CDN hybrid tag, the user request satisfies the hybrid sub-condition; otherwise, the hybrid sub-condition is not satisfied. Combined with the bandwidth and storage space of each CDN hybrid edge node, it is determined whether the second resource needs to be pushed to the CDN hybrid edge node. By determining whether the hybrid sub-condition is satisfied and whether the push sub-condition is satisfied, the push efficiency of the resource can be further improved, thereby further improving the resource processing efficiency.
[0116] Figure 5b This is a service diagram of an XCDN center provided according to an embodiment of the present disclosure, with reference to Figure 5b, the XCDN center may include a state-aware service cluster, an index service cluster, and a scheduling service. When the user request meets the hybrid pull conditions, the CDN edge node requests resources from the scheduling service and carries the XCDN tag in the protocol; the scheduling service performs a consistent hash search through the index service cluster and returns a list of XCDN edge nodes that have the resources to be accessed; if the return is empty, it means that no XCDN edge node has the resource; the scheduling service can also query the status of each XCDN edge node that has the resources to be accessed through the state-aware service cluster, obtain the XCDN edge node that has the resources to be accessed and is active, select it as the first XCDN edge node, and feed back the address of the first XCDN edge node to the CDN edge node, so that the CDN edge node uses the address to request the first resource from the first XCDN edge node.
[0117] In the case where the user request does not meet the hybrid pull condition, the CDN edge node can obtain the second resource from the CDN parent node and send a push request for the second resource to the scheduling service. The scheduling service selects a suitable second XCDN edge node through the state-aware service cluster and feeds back the address of the second XCDN edge node to the CDN edge node, so that the CDN edge node uses the address to push the second resource to the second XCDN edge node cache. The scheduling service also obtains the cache status of the second resource, and in the case of the cache cost of the second resource, updates the hybrid resource index through the index service cluster.
[0118] Figure 6 The present invention is a schematic diagram of a resource processing device based on a hybrid CDN system according to an embodiment of the present invention. This embodiment is applicable to the case where a portion of the parent layer bandwidth is transferred to a CDN hybrid node. The device can be implemented in software and / or hardware. The device can be configured in a CDN edge node in the hybrid CDN system, and the hybrid CDN system also includes a CDN parent layer node and a CDN hybrid node. Figure 6 As shown, the resource processing device 600 based on the hybrid CDN system of this embodiment may include:
[0119] The inquiry request module 610 is used to request resources from the CDN parent node in response to the user request, and the CDN parent node determines whether the user request satisfies the hybrid pull condition of the back-to-source CDN hybrid node;
[0120] The first resource acquisition module 620 is used to acquire the first resource to be accessed from the CDN hybrid node when the user request meets the hybrid pull condition.
[0121] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node;
[0122] The first resource acquisition module 620 includes:
[0123] A resource request unit, configured to request a resource to be accessed from a CDN hybrid center, wherein the CDN hybrid center determines a first CDN hybrid edge node where the resource to be accessed is located, and returns an address of the first CDN hybrid edge node;
[0124] The first resource acquisition unit is configured to acquire a first resource to be accessed from the first CDN hybrid edge node by using the address of the first CDN hybrid edge node.
[0125] In an optional implementation manner, the resource request unit is specifically configured to:
[0126] A request is made to a CDN hybrid center for the resource to be accessed, and the CDN hybrid center determines the first CDN hybrid edge node where the resource to be accessed is located based on a hybrid resource index, and returns the address of the first CDN hybrid edge node; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0127] In an optional implementation, the resource processing device 600 based on the hybrid CDN system further includes:
[0128] The meta information acquisition module is used to obtain the meta information of the resource to be accessed fed back by the CDN parent node when the user request meets the hybrid pull condition;
[0129] The first resource verification module is used to verify the first resource using the meta-information of the resource to be accessed.
[0130] In an optional implementation, the resource processing device 600 based on the hybrid CDN system further includes a resource re-request module, and the resource re-request module is specifically used to:
[0131] When the CDN hybrid center determines that there is no CDN hybrid edge node with the resource to be accessed, re-request the resource from the CDN parent node so that the CDN parent node feeds back the resource to be accessed; or
[0132] In the case that the first CDN hybrid edge node does not return the resource to be accessed, the resource is requested from the CDN parent node again, so that the CDN parent node feeds back the resource to be accessed.
[0133] In an optional implementation, the resource processing device 600 based on the hybrid CDN system further includes a resource push module, and the resource push module includes:
[0134] A second resource acquisition unit, configured to acquire a second resource to be accessed fed back by a CDN parent node when a user request does not satisfy a hybrid pull condition;
[0135] The second resource pushing unit is used to push the second resource to the CDN hybrid node for storage when the user request meets the hybrid push condition.
[0136] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node;
[0137] The second resource pushing unit includes:
[0138] A push request subunit, configured to send a push request to a CDN hybrid center when a user request satisfies a hybrid sub-condition, and the CDN hybrid center determines whether the push request satisfies the push sub-condition, and allocates a second CDN hybrid edge node to the push request when the push request satisfies the push sub-condition;
[0139] The resource push subunit is used to push the second resource to the second CDN hybrid edge node and synchronize the push status with the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index when the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0140] In an optional implementation, when the user request carries a CDN hybrid tag, determining that the user request satisfies the hybrid sub-condition;
[0141] According to the bandwidth and / or storage space of the CDN hybrid edge node, it is determined whether the push request satisfies the push sub-condition.
[0142] In an optional implementation, the second resource fed back by the CDN parent node is obtained through the first thread, and the second resource is pushed to the CDN hybrid node for storage through the second thread; the first thread and the second thread are asynchronous.
[0143] In an optional implementation, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid edge node.
[0144] The technical solution of the disclosed embodiment adjusts the traditional CDN back-to-source architecture, and transfers the parent-layer bandwidth of a portion of CDN edge nodes back-to-source upstream nodes to the more affordable XCDN, effectively reducing the CDN parent-layer bandwidth cost. The corresponding data verification and disaster recovery logic are designed using the processing power of edge CDN nodes to ensure the stability of customer request processing and avoid the quality damage caused by using cheap resources for external services; the massive resource index construction, resource deployment and state perception capabilities of the XCDN center and XCDN edge nodes are used to provide a cheap bypass cache for the CDN edge node cache system, realizing the push of new resources and the pull of old resources.
[0145] Figure 7 The present invention is a schematic diagram of a resource processing device based on a hybrid CDN system according to an embodiment of the present invention. This embodiment is applicable to the case where a portion of the parent layer bandwidth is transferred to a CDN hybrid node. The device can be implemented in software and / or hardware. The device can be configured in a CDN hybrid node in the hybrid CDN system, and the hybrid CDN system also includes a CDN edge node and a CDN parent layer node. Figure 7 As shown, the resource processing device 700 based on the hybrid CDN system of this embodiment may include:
[0146] A first resource determination module 710, configured to determine a first resource to be accessed when the user request obtained by the CDN edge node satisfies the hybrid pull condition of the back-to-source CDN hybrid node;
[0147] The first resource feedback module 720 is configured to feedback the first resource to be accessed to the CDN edge node.
[0148] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node; the device is configured in the CDN hybrid center;
[0149] The first resource determination module 710 is specifically used for:
[0150] The first CDN hybrid edge node where the to-be-accessed resource is located is determined, and the address of the first CDN hybrid edge node is fed back, so that the CDN edge node uses the address of the first CDN hybrid edge node to obtain the first resource to be accessed from the first CDN hybrid edge node.
[0151] In an optional implementation manner, the first resource determination module 710 is specifically configured to:
[0152] The first CDN hybrid edge node where the to-be-accessed resource is located is determined based on the hybrid resource index, and the address of the first CDN hybrid edge node is fed back; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0153] In an optional implementation manner, the resource processing device 700 based on the hybrid CDN system further includes:
[0154] The second resource push module is used to determine whether the user request meets the hybrid push condition when the user request does not meet the hybrid pull condition and the CDN edge node obtains the second resource to be accessed from the CDN parent node, and store the second resource in the CDN hybrid node if the hybrid push condition is met.
[0155] In an optional implementation, the CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node, and the device is configured in the CDN hybrid center;
[0156] The second resource push module includes:
[0157] A push request subunit, used to obtain a push request sent by a CDN edge node when a user request satisfies a hybrid sub-condition;
[0158] The node allocation subunit is used to determine whether the push request satisfies the push sub-condition, and if the push sub-condition is met, allocate a second CDN hybrid edge node to the push request, so that the CDN edge node pushes the second resource to the second CDN hybrid edge node, and synchronizes the push status with the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index if the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
[0159] In an optional implementation, when the user request carries a CDN hybrid tag, determining that the user request satisfies the hybrid sub-condition;
[0160] According to the bandwidth and / or storage space of the CDN hybrid edge node, it is determined whether the push request satisfies the push sub-condition.
[0161] In an optional implementation, the unit bandwidth cost of the CDN parent node is higher than the unit bandwidth cost of the CDN hybrid edge node.
[0162] The technical solution of the disclosed embodiment adjusts the traditional CDN back-to-source architecture, and transfers the parent-layer bandwidth of a portion of CDN edge nodes back-to-source upstream nodes to the more affordable XCDN, effectively reducing the CDN parent-layer bandwidth cost. The corresponding data verification and disaster recovery logic are designed using the processing power of edge CDN nodes to ensure the stability of customer request processing and avoid the quality damage caused by using cheap resources for external services; the massive resource index construction, resource deployment and state perception capabilities of the XCDN center and XCDN edge nodes are used to provide a cheap bypass cache for the CDN edge node cache system, realizing the push of new resources and the pull of old resources.
[0163] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0164] According to an embodiment of the present disclosure, the present disclosure also provides a hybrid CDN system, including a CDN edge node, a CDN parent node and a CDN hybrid node; the CDN edge node is used to request resources from the CDN parent node in response to a user request; the CDN parent node is used to determine whether the user request meets the hybrid pull condition of the back-to-source CDN hybrid node; the CDN hybrid node is used to feedback the first resource to be accessed to the CDN edge node when the user request meets the hybrid pull condition.
[0165] The hybrid CDN system is mainly composed of three parts: CDN node cache system, XCDN center and XCDN edge node. The CDN node cache system is the access layer, responsible for receiving and processing user requests, controlling whether to return to the source XCDN, and ensuring service quality and data security; the XCDN center is responsible for the maintenance and scheduling of XCDN edge node resources; the XCDN edge node is responsible for providing resource data access functions, reporting resources, and reporting its own bandwidth information for scheduling by the XCDN center.
[0166] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0167] Figure 8 It is a block diagram of an electronic device used to implement the resource processing method based on a hybrid CDN system according to an embodiment of the present disclosure.
[0168] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0169] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0170] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0171] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a resource processing method based on a hybrid CDN system. For example, in some embodiments, the resource processing method based on a hybrid CDN system may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the resource processing method based on the hybrid CDN system described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the resource processing method based on the hybrid CDN system in any other appropriate manner (for example, by means of firmware).
[0172] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0173] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0174] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0175] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0176] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0177] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0178] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.
[0179] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0180] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0181] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A resource processing method based on a hybrid CDN system, which is executed by a CDN edge node in the hybrid CDN system, wherein the hybrid CDN system further includes a CDN parent node and a CDN hybrid node; CDN hybrid nodes are heterogeneous storage nodes of CDN edge nodes; The CDN edge node and the CDN hybrid node perform bidirectional data interaction; the method includes: In response to a user request, a resource is requested from a CDN parent node, and the CDN parent node determines whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node in combination with the meta information of the resource to be accessed; wherein the hybrid pull condition is that the user request carries a CDN hybrid tag and the CDN parent node has the meta information of the resource to be accessed; When the user request satisfies the hybrid pull condition, obtaining the first resource to be accessed from the CDN hybrid node; When the user request does not meet the hybrid pull condition, the second resource to be accessed is obtained and fed back by the CDN parent node from the source station; When the user request meets the hybrid push conditions, the second resource is pushed to the CDN hybrid node for storage, so that when other CDN edge nodes need to access the second resource, they can directly obtain it from the CDN hybrid node without having to obtain it from the CDN parent node.
2. The method according to claim 1, wherein: The CDN hybrid nodes include a CDN hybrid center and a CDN hybrid edge node; The obtaining the first resource to be accessed from the CDN hybrid node includes: Requesting the resource to be accessed from the CDN hybrid center, the CDN hybrid center determining the first CDN hybrid edge node where the resource to be accessed is located, and returning the address of the first CDN hybrid edge node; The first resource to be accessed is acquired from the first CDN hybrid edge node using the address of the first CDN hybrid edge node.
3. The method according to claim 2, wherein: Requesting the CDN hybrid center for the resource to be accessed, and the CDN hybrid center determining the first CDN hybrid edge node where the resource to be accessed is located, and returning the address of the first CDN hybrid edge node, including: A request is made to a CDN hybrid center for the resource to be accessed, and the CDN hybrid center determines the first CDN hybrid edge node where the resource to be accessed is located based on a hybrid resource index, and returns the address of the first CDN hybrid edge node; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
4. The method according to claim 1, further comprising: When the user request meets the hybrid pull conditions, the metadata of the resource to be accessed fed back by the CDN parent node is also obtained; After obtaining the first resource to be accessed from the CDN hybrid node, the method further includes: The first resource is verified using the meta-information of the resource to be accessed.
5. The method according to claim 2, further comprising: When the CDN hybrid center determines that there is no CDN hybrid edge node with the resource to be accessed, re-request the resource from the CDN parent node, so that the CDN parent node feeds back the resource to be accessed; or, In the case that the first CDN hybrid edge node does not return the resource to be accessed, the resource is requested again from the CDN parent node, so that the CDN parent node feeds back the resource to be accessed.
6. The method according to claim 1, wherein: The CDN hybrid nodes include a CDN hybrid center and a CDN hybrid edge node; When the user request satisfies the hybrid push condition, the second resource is pushed to the CDN hybrid node for storage, including: When the user request satisfies the hybrid sub-condition, a push request is sent to the CDN hybrid center, and the CDN hybrid center determines whether the push request satisfies the push sub-condition, and when the push request satisfies the push sub-condition, a second CDN hybrid edge node is allocated to the push request; The second resource is pushed to the second CDN hybrid edge node, and the push status is synchronized with the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index when the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
7. The method according to claim 6, wherein: In the case where the user request carries a CDN hybrid tag, determining that the user request satisfies the hybrid sub-condition; According to the bandwidth and / or storage space of the CDN hybrid edge node, it is determined whether the push request satisfies the push sub-condition.
8. The method according to claim 1, wherein: The second resource fed back by the CDN parent node is obtained through the first thread, and the second resource is pushed to the CDN hybrid node for storage through the second thread; the first thread and the second thread are asynchronous.
9. The method according to any one of claims 2 to 8, wherein: The unit bandwidth cost of CDN parent nodes is higher than that of CDN hybrid edge nodes.
10. A resource processing method based on a hybrid CDN system, executed by a CDN hybrid node in the hybrid CDN system, wherein the hybrid CDN system further comprises a CDN edge node and a CDN parent node; CDN hybrid nodes are heterogeneous storage nodes of CDN edge nodes; The CDN edge node and the CDN hybrid node perform bidirectional data interaction; the method includes: When the user request obtained by the CDN edge node and the meta information of the resource to be accessed meet the hybrid pull condition of the source CDN hybrid node, determine the first resource to be accessed; wherein the hybrid pull condition is that the user request carries a CDN hybrid tag and the CDN parent node has the meta information of the resource to be accessed; Feedback the first resource to be accessed to the CDN edge node; When the user request does not meet the hybrid pull condition and the CDN edge node obtains the second resource to be accessed from the CDN parent node, it is determined whether the user request meets the hybrid push condition, and when the hybrid push condition is met, the second resource is stored in the CDN hybrid node, so that when other CDN edge nodes need to access the second resource, they can directly obtain it from the CDN hybrid node without obtaining it from the CDN parent node; wherein the second resource is obtained by the CDN parent node from the source station when the user request does not meet the hybrid pull condition.
11. The method according to claim 10, wherein: The CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node; the method is performed by the CDN hybrid center; The determining of the first resource to be accessed includes: The first CDN hybrid edge node where the to-be-accessed resource is located is determined, and the address of the first CDN hybrid edge node is fed back, so that the CDN edge node uses the address of the first CDN hybrid edge node to obtain the first resource to be accessed from the first CDN hybrid edge node.
12. The method according to claim 11, wherein: Determining a first CDN hybrid edge node where the to-be-accessed resource is located, and feeding back an address of the first CDN hybrid edge node, includes: The first CDN hybrid edge node where the to-be-accessed resource is located is determined based on the hybrid resource index, and the address of the first CDN hybrid edge node is fed back; wherein the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
13. The method according to claim 10, wherein: The CDN hybrid node includes a CDN hybrid center and a CDN hybrid edge node, and the method is performed by the CDN hybrid center; Determining whether the user request satisfies a hybrid push condition, and if the hybrid push condition is satisfied, storing the second resource in a CDN hybrid node, includes: When the user request meets the hybrid sub-condition, the push request sent by the CDN edge node is obtained; Determine whether the push request satisfies the push sub-condition, and if the push sub-condition is met, allocate a second CDN hybrid edge node to the push request, so that the CDN edge node pushes the second resource to the second CDN hybrid edge node, and synchronizes the push status with the CDN hybrid center, so that the CDN hybrid center updates the hybrid resource index if the push is successful; the hybrid resource index is generated based on the resources in each CDN hybrid edge node.
14. The method according to claim 13, wherein: In the case where the user request carries a CDN hybrid tag, determining that the user request satisfies the hybrid sub-condition; According to the bandwidth and / or storage space of the CDN hybrid edge node, it is determined whether the push request satisfies the push sub-condition.
15. The method according to any one of claims 11 to 14, wherein: The unit bandwidth cost of CDN parent nodes is higher than that of CDN hybrid edge nodes.
16. A resource processing device based on a hybrid CDN system, configured in a CDN edge node in the hybrid CDN system, wherein the hybrid CDN system further comprises a CDN parent node and a CDN hybrid node; CDN hybrid nodes are heterogeneous storage nodes of CDN edge nodes; The CDN edge node and the CDN hybrid node perform two-way data interaction; the device includes: A consultation request module, used to request resources from a CDN parent node in response to a user request, and the CDN parent node determines whether the user request satisfies a hybrid pull condition of a back-to-source CDN hybrid node in combination with the meta information of the resource to be accessed; wherein the hybrid pull condition is that the user request carries a CDN hybrid tag and the CDN parent node has the meta information of the resource to be accessed; A first resource acquisition module, configured to acquire a first resource to be accessed from a CDN hybrid node when a user request satisfies a hybrid pull condition; Resource push module, including: A second resource acquisition unit is used to acquire the second resource to be accessed that is acquired and fed back by the CDN parent node from the source station when the user request does not meet the hybrid pull condition; The second resource pushing unit is used to push the second resource to the CDN hybrid node for storage when the user request meets the hybrid push conditions, so that other CDN edge nodes can directly obtain the second resource from the CDN hybrid node without obtaining it from the CDN parent node when other CDN edge nodes need to access the second resource.
17. A resource processing device based on a hybrid CDN system, configured in a CDN hybrid node in the hybrid CDN system, wherein the hybrid CDN system further comprises a CDN edge node and a CDN parent node; CDN hybrid nodes are heterogeneous storage nodes of CDN edge nodes; The CDN edge node and the CDN hybrid node perform two-way data interaction; the device includes: A first resource determination module, configured to determine a first resource to be accessed when the user request obtained by the CDN edge node and the meta information of the resource to be accessed meet the hybrid pull condition of the source CDN hybrid node; wherein the hybrid pull condition is that the user request carries a CDN hybrid tag and the CDN parent node has the meta information of the resource to be accessed; A first resource feedback module, configured to feedback a first resource to be accessed to the CDN edge node; The second resource push module is used to determine whether the user request meets the hybrid push condition when the user request does not meet the hybrid pull condition and the CDN edge node obtains the second resource to be accessed from the CDN parent node, and if the hybrid push condition is met, store the second resource in the CDN hybrid node, so that when other CDN edge nodes need to access the second resource, they can directly obtain it from the CDN hybrid node without obtaining it from the CDN parent node; wherein the second resource is obtained by the CDN parent node from the source station when the user request does not meet the hybrid pull condition.
18. A hybrid CDN system, comprising a CDN edge node, a CDN parent node and a CDN hybrid node; CDN hybrid nodes are heterogeneous storage nodes of CDN edge nodes; Two-way data interaction between CDN edge nodes and CDN hybrid nodes; The CDN edge node is used to request resources from the CDN parent node in response to a user request; The CDN parent node is used to determine whether the user request meets the hybrid pull condition of the source CDN hybrid node in combination with the meta information of the resource to be accessed; wherein the hybrid pull condition is that the user request carries a CDN hybrid tag and the CDN parent node has the meta information of the resource to be accessed; The CDN hybrid node is used to feedback the first resource to be accessed to the CDN edge node when the user request meets the hybrid pull condition; when the user request does not meet the hybrid pull condition and the CDN edge node obtains the second resource to be accessed from the CDN parent node, determine whether the user request meets the hybrid push condition, and store the second resource in the CDN hybrid node when the hybrid push condition is met, so that other CDN edge nodes can directly obtain the second resource from the CDN hybrid node when they need to access the second resource without obtaining it from the CDN parent node; wherein the second resource is obtained by the CDN parent node from the source station when the user request does not meet the hybrid pull condition.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 15.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-15.
21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Data transmission method and data transmission system
CN113824750A
Data transmission method and data transmission system
CN113824751A