Content distribution processing method and apparatus, electronic device, and storage medium

CN116192955BActive Publication Date: 2026-09-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211697542.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-09-18
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

[0003]本发明实施例是提供一种内容分发的处理方法、装置、电子设备以及计算机可读存储介质,以解决或部分解决相关技术中节点机器资源消耗大、单点并发能力弱的问题

Benefits of technology

[0047]In this embodiment of the invention, a content delivery network may include edge nodes, parent nodes communicating with the edge nodes, and origin stations communicating with the parent nodes. During a client's content request process, the edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates a fragment request corresponding to the content request. Then, the parent node obtains the resource address corresponding to the content request from the origin station based on the fragment request, sends the fragment request to the origin station based on the resource address, receives the fragment file content corresponding to the fragment request sent by the origin station, and then the edge node receives the fragment file content sent by the parent node. The system retrieves the resource address and requests the corresponding target file content from the parent node based on the resource address. During content distribution, after the parent node initially requests the resource address from the origin server, it sends the resource address to the edge node for storage. With the implementation of fragmented content retrieval, in subsequent content distribution processes, the edge node can request the corresponding content from the parent node based on the recorded resource address. The parent node can then retrieve the corresponding content based on the resource address and return it. This effectively reduces the response operations between the parent node and the origin server, reduces the resource consumption of the node machine, and improves the single-point concurrency capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192955B_ABST
    Figure CN116192955B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a content distribution processing method and device, electronic equipment and storage medium, the method comprises: an edge node acquires the content request sent by a client, determines the file information corresponding to the content request, and generates a shard request corresponding to the content request if the file information meets the condition; the parent node acquires the resource address corresponding to the content request from the source station according to the shard request, sends the shard request to the source station according to the resource address, and receives the shard file content corresponding to the shard request sent by the source station; the edge node receives the shard file content and the resource address sent by the parent node, and requests the target file content corresponding to the content request from the parent node according to the resource address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of content distribution technology, and in particular to a content distribution processing method, a content distribution processing apparatus, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Content Delivery Networks (CDNs) work by caching resources from the origin server to nodes located near the customer's location or with fast network access. This allows customers to access resources directly from the nearest node, improving access speed, reducing pressure on the origin server, and optimizing the customer experience. However, during content distribution, duplicate requests can occur, consuming node resources, reducing single-point concurrent service capabilities, increasing origin bandwidth costs, and causing significant additional performance degradation due to the independence of requests. Summary of the Invention

[0003] The present invention provides a content distribution processing method, apparatus, electronic device, and computer-readable storage medium to solve or partially solve the problems of high node machine resource consumption and weak single-point concurrency capability in related technologies.

[0004] This invention discloses a content distribution processing method applied to a content distribution network, wherein the content distribution network includes at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes. The method includes:

[0005] The edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates a fragmentation request corresponding to the content request.

[0006] The parent node obtains the resource address corresponding to the content request from the origin server according to the sharding request, sends the sharding request to the origin server according to the resource address, and receives the sharded file content corresponding to the sharding request sent by the origin server.

[0007] The edge node receives the fragmented file content and the resource address sent by the parent node, and requests the target file content corresponding to the content request from the parent node based on the resource address.

[0008] Optionally, the edge node obtains the content request sent by the client and determines the file information corresponding to the content request, including:

[0009] The edge node obtains the content request sent by the client, determines the target file content corresponding to the content request, and obtains the file memory corresponding to the target file content.

[0010] Optionally, generating a fragmentation request corresponding to the content request if the file information meets the conditions includes:

[0011] If the file memory is greater than or equal to a preset memory threshold, then the file memory is divided to generate several fragment requests corresponding to the content request.

[0012] Optionally, after generating the fragment request corresponding to the content request, the method further includes:

[0013] The edge node sends the first sharding request to the parent node.

[0014] Optionally, the parent node obtains the resource address corresponding to the content request from the origin server according to the sharding request, sends the sharding request to the origin server according to the resource address, and receives the sharded file content corresponding to the sharding request sent by the origin server, including:

[0015] The parent node sends the first shard request to the origin server and receives a response header from the origin server for the first shard request, the response header including the resource address corresponding to the content request;

[0016] The parent node sends a first resource acquisition request for the resource address to the source server, and receives the first fragment file content corresponding to the first resource acquisition request from the source server.

[0017] Optionally, the edge node receives the fragmented file content and the resource address sent by the parent node, and returns the fragmented file content to the client, including:

[0018] The edge node receives the content of the first fragment file corresponding to the first fragment request returned by the parent node, and the resource address corresponding to the content request;

[0019] The edge node returns the content of the first fragment file to the client.

[0020] Optionally, requesting the target file content corresponding to the content request from the parent node based on the resource address includes:

[0021] The edge node sends the remaining shard requests (excluding the first shard request) and the resource address to the parent node in the order they correspond to the shard requests.

[0022] The parent node sends a second resource acquisition request for the resource address to the source station in turn, and receives the second fragment content corresponding to the second resource acquisition request sent by the source station in turn, and sends the second fragment content to the edge node.

[0023] This invention also discloses a content distribution processing apparatus applied to a content distribution network, the content distribution network including at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes, the apparatus comprising:

[0024] The request generation module located at the edge node is used to obtain the content request sent by the client, determine the file information corresponding to the content request, and generate a fragment request corresponding to the content request if the file information meets the conditions.

[0025] The file content acquisition module located in the parent node is used to obtain the resource address corresponding to the content request from the source station according to the fragmentation request, send the fragmentation request to the source station according to the resource address, and receive the fragmented file content corresponding to the fragmentation request sent by the source station.

[0026] The file content return module located at the edge node is used to receive the fragmented file content and the resource address sent by the parent node, and request the target file content corresponding to the content request from the parent node according to the resource address.

[0027] Optionally, the request generation module is specifically used for:

[0028] Obtain the content request sent by the client, determine the target file content corresponding to the content request, and obtain the file memory corresponding to the target file content.

[0029] Optionally, the request generation module is specifically used for:

[0030] If the file memory is greater than or equal to a preset memory threshold, then the file memory is divided to generate several fragment requests corresponding to the content request.

[0031] Optionally, the device further includes:

[0032] The request sending module located at the edge node is used to send the first shard request to the parent node;

[0033] Specifically, the file content acquisition module is used for:

[0034] The first fragment request is sent to the origin server, and a response header for the first fragment request is received from the origin server. The response header includes the resource address corresponding to the content request.

[0035] Send a first resource acquisition request for the resource address to the origin server, and receive the first fragment file content corresponding to the first resource acquisition request sent by the origin server.

[0036] Optionally, the file content return module is specifically used for:

[0037] Receive the content of the first shard file corresponding to the first shard request returned by the parent node, and the resource address corresponding to the content request;

[0038] The edge node returns the content of the first fragment file to the client.

[0039] Optionally, the file content return module is specifically used for:

[0040] According to the order of the fragmentation requests, the remaining fragmentation requests, except for the first fragmentation request, are sent to the parent node one by one along with the resource address;

[0041] The system sequentially sends a second resource acquisition request for the resource address to the source station, and sequentially receives the second fragment content corresponding to the second resource acquisition request sent by the source station, and sends the second fragment content to the edge node.

[0042] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0043] The memory is used to store computer programs;

[0044] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.

[0045] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.

[0046] The embodiments of the present invention have the following advantages:

[0047] In this embodiment of the invention, a content delivery network may include edge nodes, parent nodes communicating with the edge nodes, and origin stations communicating with the parent nodes. During a client's content request process, the edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates a fragment request corresponding to the content request. Then, the parent node obtains the resource address corresponding to the content request from the origin station based on the fragment request, sends the fragment request to the origin station based on the resource address, receives the fragment file content corresponding to the fragment request sent by the origin station, and then the edge node receives the fragment file content sent by the parent node. The system retrieves the resource address and requests the corresponding target file content from the parent node based on the resource address. During content distribution, after the parent node initially requests the resource address from the origin server, it sends the resource address to the edge node for storage. With the implementation of fragmented content retrieval, in subsequent content distribution processes, the edge node can request the corresponding content from the parent node based on the recorded resource address. The parent node can then retrieve the corresponding content based on the resource address and return it. This effectively reduces the response operations between the parent node and the origin server, reduces the resource consumption of the node machine, and improves the single-point concurrency capability. Attached Figure Description

[0048] Figure 1 This is a flowchart of the steps of a content distribution processing method provided in an embodiment of the present invention;

[0049] Figure 2 This is a structural block diagram of a content distribution processing device provided in an embodiment of the present invention;

[0050] Figure 3 This is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0051] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0052] As an example, the principle of a Content Delivery Network (CDN) is to use nodes at various levels of the CDN to cache resources from the origin server to nodes located near the customer's geographical location or with fast network access speeds. This allows customers to directly access resources from the nearest location, thereby improving access speed, reducing access pressure on the origin server, and optimizing the customer experience.

[0053] Optimization for hybrid scenarios involving shard requests and 302 redirect responses under CDN networks:

[0054] (1) CDN hierarchical sharding request

[0055] Currently, mainstream CDN providers all adopt a tiered deployment approach for their CDN nodes.

[0056] In other words, if the client requests an edge node and there is no cache on the edge node, it requests a parent node. If there is no cache on the parent node, it retrieves the cache from the client's origin server.

[0057] When requesting large files, it's crucial to minimize origin-fetching traffic and maximize hit rate while correctly responding to client requests. This is typically achieved through sharded storage. Specifically, when a large file request reaches a CDN edge node, the edge node splits the request into several fixed-size range requests. For example, if the requested file size is 100MB and each shard is set to 1MB, the edge node will split it into 100 shard requests (0-1MB, 1-2MB, ..., 99MB-100MB) and send them to the parent node. From the parent node's perspective, these 100 shard requests are independent and unrelated to each other.

[0058] (2) 302 Redirect Response

[0059] To improve the flexibility of response content, the client's origin server will use a 302 redirect to respond to client requests. Specifically, after the CDN parent node initiates a request back to the origin server, the origin server responds to the parent node with a 302 response and an appended Location header. The CDN parent node parses the Location header to obtain the final real URL (Uniform Resource Locator), and then initiates a second request to the real URL, receiving a 200 response from the origin server and obtaining the actual target file. In other words, under these conditions, for each client request, the CDN node needs to initiate two back-to-origin requests (one redirect response and one response containing the actual content).

[0060] For a scenario combining (1) and (2), each shard request requires two origin requests. For a 100M file with a 1M shard size, the cache is divided into 100 shards, and each shard request requires two requests. Therefore, for this file, 200 requests need to be sent to the origin server. This scenario has a drawback: for each shard request on the parent layer, a duplicate 302 redirect request needs to be sent, resulting in resource consumption of the node machine, reducing the single-point concurrent service capability, and increasing the origin bandwidth cost. If the origin 302 redirect requests are to be merged, the Location header information between independent shard requests needs to be shared on the parent node. Since each shard request is independent for the CDN parent node and the data structure is stored separately, if information between requests needs to be shared, the program needs to set up shared memory and lock the shared memory, which will cause a lot of additional performance loss. Therefore, the above solution also has a drawback.

[0061] One of the core inventive points of this invention is that during content distribution, edge nodes obtain content requests sent by clients, determine the file information corresponding to the content requests, and if the file information meets the conditions, generate a fragment request corresponding to the content requests. Then, the parent node obtains the resource address corresponding to the content requests from the origin server according to the fragment requests, and sends the fragment requests to the origin server according to the resource addresses. It also receives the fragment file content corresponding to the fragment requests sent by the origin server. Then, the edge node receives the fragment file content and resource addresses sent by the parent node, and requests the target file content corresponding to the content requests from the parent node according to the resource addresses. Thus, during content distribution, after the parent node requests the resource address from the origin server for the first time, it sends the resource address to the edge node for storage. With the fragment content acquisition achieved, in subsequent content distribution processes, the edge node can request the corresponding content from the parent node based on the recorded resource addresses. For the parent node, it can request the corresponding content based on the resource addresses and return it, effectively reducing the response operations between the parent node and the origin server, reducing the resource consumption of the node machines, and improving the single-point concurrency capability.

[0062] Reference Figure 1 This diagram illustrates a flowchart of a content distribution processing method provided in an embodiment of the present invention, applied to a content distribution network. The content distribution network includes at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes. Specifically, it may include the following steps:

[0063] Step 101: The edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates a fragmentation request corresponding to the content request.

[0064] Optionally, an edge cloud can consist of edge nodes, parent nodes, and an origin server. Edge nodes can be direct nodes communicating with user terminals, parent nodes can be nodes communicating with edge nodes (such as central nodes), and the origin server can be a resource repository for storing relevant data. During content distribution, edge nodes can receive requests from clients or user terminals and forward them to parent nodes. The parent nodes then retrieve the relevant data from the origin server and return it to the edge nodes, which in turn forward it to the clients or user terminals.

[0065] In this embodiment of the invention, for files that are not cached in the CDN network, the client can send a corresponding content request to the edge node to obtain the corresponding file content. Specifically, the edge node can obtain the content request sent by the client, determine the file information corresponding to the content request, and then determine whether the file information needs to be fragmented. If so, it can generate a fragment request corresponding to the content request to obtain the corresponding file content from the parent node through the fragment request.

[0066] In the specific implementation, the edge node can obtain the content request sent by the client, determine the target file content corresponding to the content request, and obtain the file memory corresponding to the target file content. If the file memory is greater than or equal to a preset memory threshold, it is divided according to the file memory to generate several fragment requests corresponding to the content request. If the file memory is less than the preset memory threshold, the content request can be directly sent to the parent node. The parent node retrieves the file content from the origin. The origin server can respond with a status code 302 and inform the parent node of the corresponding URL address through the Location response header. Then, the parent node parses the Location response header, initiates a request to the origin server for the URL address, and obtains the file content sent by the origin server after a 200 or 206 response. Finally, the file content is returned to the edge node.

[0067] For example, for a request for a 100MB file with a 1MB chunk size, the cache can divide it into 100 chunks. Edge nodes can generate 100 chunk requests and then use these 100 chunk requests to retrieve the corresponding chunk file content from the parent node. Specifically, when the file content for a content request needs to be retrieved via chunks, after generating the corresponding chunk requests, the edge node can first send the first chunk request to the parent node. This allows the parent node to retrieve the corresponding resource address from the origin server using the first chunk request, thereby reducing redundant retrieval processes based on the retrieved resource address.

[0068] Step 102: The parent node obtains the resource address corresponding to the content request from the origin server according to the sharding request, sends the sharding request to the origin server according to the resource address, and receives the sharded file content corresponding to the sharding request sent by the origin server.

[0069] In this embodiment of the invention, after receiving a sharding request from an edge node, the parent node can retrieve the file content from the origin based on the sharding request. Correspondingly, the origin server can respond with status code 302 and inform the parent node of the actual URL address (resource address) through the Location response header. The parent node can send the corresponding sharding request to the origin server through the resource address to obtain the sharding content corresponding to the sharding request. The origin server can extract the corresponding sharding file content according to the sharding request and return the sharding file content to the parent node, so that the parent node can return the sharding file content to the edge node.

[0070] In the specific implementation, for file content that needs to be obtained through fragmentation, the parent node can first send the first fragmentation request to the origin server and receive the response header sent by the origin server for the first fragmentation request. The response header includes the resource address corresponding to the content request. Then, it sends the first resource acquisition request for the resource address to the origin server and receives the first fragmented file content corresponding to the first resource acquisition request sent by the origin server. Simultaneously, the parent node can return the acquired resource address along with the content of the first shard file to the edge node. The edge node receives the content of the first shard file corresponding to the first shard request and the resource address corresponding to the content request returned by the parent node. At the same time, the edge node returns the content of the first shard file to the client. Thus, when obtaining the shard content corresponding to the first shard request, the parent node sends the acquired resource address to the edge node, and the edge node records the resource address. This allows the shard file content corresponding to the remaining shard requests to be obtained based on the resource address, reducing the process of the parent node repeatedly obtaining resource addresses from the origin server. This effectively reduces the response operations between the parent node and the origin server, reduces the resource consumption of the node machine, and improves the single-point concurrency capability.

[0071] Step 103: The edge node receives the fragmented file content and the resource address sent by the parent node, and requests the target file content corresponding to the content request from the parent node according to the resource address.

[0072] In this embodiment of the invention, after receiving the fragmented file content and resource address sent by the parent node, the edge node can, on the one hand, return the obtained fragmented file content to the client, and on the other hand, request the fragmented file content corresponding to other fragmented requests from the parent node based on the resource address, thereby obtaining all file content requested by the content request. Thus, during the content distribution process, after the parent node requests the resource address from the origin server for the first time, it sends the resource address to the edge node for storage. With the fragmented content acquisition achieved, in subsequent content distribution processes, the edge node can request the corresponding content from the parent node based on the recorded resource address. The parent node can then request the corresponding content based on the resource address and return it, effectively reducing the response operations between the parent node and the origin server, reducing the resource consumption of the node machine, and improving the single-point concurrency capability.

[0073] In the specific implementation, when the file content to be obtained needs to be retrieved through multiple shard requests, after obtaining the resource address through the first shard request, the edge node can sequentially send the remaining shard requests (excluding the first shard request) and their resource addresses to the parent node in the order they correspond. The parent node can then sequentially send a second resource retrieval request for the resource address to the origin server and sequentially receive the second shard content corresponding to the second resource retrieval request from the origin server. The parent node then sends the second shard content to the edge node. Thus, when the file content corresponding to the content request needs to be obtained through N shard requests, the corresponding resource address can be obtained through the first shard request. Then, for the remaining shard requests, the parent node can obtain the corresponding file content through the resource address recorded by the edge node. This reduces the number of interactions with the origin server to obtain the resource address by N-1 times, effectively reducing the response operations between the parent node and the origin server, reducing the resource consumption of the node machine, and improving the single-point concurrency capability.

[0074] It should be noted that the embodiments of the present invention include, but are not limited to, the examples described above. It is understood that those skilled in the art can make further settings according to actual needs under the guidance of the ideas in the embodiments of the present invention, and the present invention does not limit such settings.

[0075] In this embodiment of the invention, a content delivery network may include edge nodes, parent nodes communicating with the edge nodes, and origin stations communicating with the parent nodes. During a client's content request process, the edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates a fragment request corresponding to the content request. Then, the parent node obtains the resource address corresponding to the content request from the origin station based on the fragment request, sends the fragment request to the origin station based on the resource address, receives the fragment file content corresponding to the fragment request sent by the origin station, and then the edge node receives the fragment file content sent by the parent node. The system retrieves the resource address and requests the corresponding target file content from the parent node based on the resource address. During content distribution, after the parent node initially requests the resource address from the origin server, it sends the resource address to the edge node for storage. With the implementation of fragmented content retrieval, in subsequent content distribution processes, the edge node can request the corresponding content from the parent node based on the recorded resource address. The parent node can then retrieve the corresponding content based on the resource address and return it. This effectively reduces the response operations between the parent node and the origin server, reduces the resource consumption of the node machine, and improves the single-point concurrency capability.

[0076] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, an example is provided below for illustration:

[0077] By using request header passing between CDN edge nodes and parent nodes, the aim is to merge duplicate 302 responses caused by parent sharding requests, thereby improving node service capabilities, saving origin bandwidth, and enhancing single-point performance. The specific process includes:

[0078] For file requests that are not cached in the CDN network, after receiving the client request, the edge node determines that the request needs to be sharded and initiates the first sharding request to the parent node.

[0079] After receiving the first shard request, the parent node retrieves the first shard content of the file from the origin server. At this time, the origin server responds with a status code of 302 and informs the parent node of the real URL address through the Location response header.

[0080] The parent node parses the Location response header, sends a request to the origin server for the actual URL, receives a 200 or 206 response from the origin server, and obtains the actual file content.

[0081] The parent node responds to the edge node with the actual file, and at the same time brings the contents of the Location header from the 302 redirect response from the origin server to the edge node.

[0082] In the response to the first shard request at the edge node, the Location header content of the origin server is also obtained. This information is then carried in the request headers of subsequent shard requests and sent to the parent layer. The parent layer uses this information to obtain the final, real URL of the request, skipping the 302 response process from the origin server and directly requesting the actual URL.

[0083] Through the above process, after the first shard request on the CDN parent node receives a 302 redirect response, it records the real URL specified in the Location header of the response and sends it to the edge node. The CDN edge node records the real URL and passes it to the CDN parent node through the request header when requesting subsequent shards. The parent node then directly initiates a request to the real URL. In this optimized scenario, for a request containing N shards, the number of origin pulls can be reduced by N-1 compared to the original solution.

[0084] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0085] Reference Figure 2 This diagram illustrates a structural block diagram of a content distribution processing apparatus provided in an embodiment of the present invention. The apparatus is applied to a content distribution network, which includes at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes. Specifically, it may include the following modules:

[0086] The request generation module 201 located at the edge node is used to obtain the content request sent by the client, determine the file information corresponding to the content request, and generate a fragment request corresponding to the content request if the file information meets the conditions.

[0087] The file content acquisition module 202 located in the parent node is used to obtain the resource address corresponding to the content request from the source station according to the fragmentation request, send the fragmentation request to the source station according to the resource address, and receive the fragmented file content corresponding to the fragmentation request sent by the source station.

[0088] The file content return module 203 located at the edge node is used to receive the fragmented file content and the resource address sent by the parent node, and request the target file content corresponding to the content request from the parent node according to the resource address.

[0089] In one optional embodiment, the request generation module 201 is specifically used for:

[0090] Obtain the content request sent by the client, determine the target file content corresponding to the content request, and obtain the file memory corresponding to the target file content.

[0091] In one optional embodiment, the request generation module 201 is specifically used for:

[0092] If the file memory is greater than or equal to a preset memory threshold, then the file memory is divided to generate several fragment requests corresponding to the content request.

[0093] In one alternative embodiment, the device further includes:

[0094] The request sending module located at the edge node is used to send the first shard request to the parent node;

[0095] Specifically, the file content acquisition module 202 is used for:

[0096] The first fragment request is sent to the origin server, and a response header for the first fragment request is received from the origin server. The response header includes the resource address corresponding to the content request.

[0097] Send a first resource acquisition request for the resource address to the origin server, and receive the first fragment file content corresponding to the first resource acquisition request sent by the origin server.

[0098] In one optional embodiment, the file content return module 203 is specifically used for:

[0099] Receive the content of the first shard file corresponding to the first shard request returned by the parent node, and the resource address corresponding to the content request;

[0100] The edge node returns the content of the first fragment file to the client.

[0101] In one optional embodiment, the file content return module 203 is specifically used for:

[0102] According to the order of the fragmentation requests, the remaining fragmentation requests, except for the first fragmentation request, are sent to the parent node one by one along with the resource address;

[0103] The system sequentially sends a second resource acquisition request for the resource address to the source station, and sequentially receives the second fragment content corresponding to the second resource acquisition request sent by the source station, and sends the second fragment content to the edge node.

[0104] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0105] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described content distribution processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0106] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described content distribution processing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0107] Figure 3 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0108] The electronic device 300 includes, but is not limited to, components such as: a radio frequency unit 301, a network module 302, an audio output unit 303, an input unit 304, a sensor 305, a display unit 306, a user input unit 307, an interface unit 308, a memory 309, a processor 310, and a power supply 311. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptop computers, PDAs, in-vehicle terminals, wearable devices, and pedometers.

[0109] It should be understood that, in this embodiment of the invention, the radio frequency unit 301 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 310; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 301 can also communicate with networks and other devices through a wireless communication system.

[0110] The electronic device provides users with wireless broadband internet access through network module 302, such as helping users send and receive emails, browse web pages, and access streaming media.

[0111] The audio output unit 303 can convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into audio signals and output them as sound. Furthermore, the audio output unit 303 can also provide audio output related to specific functions performed by the electronic device 300 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, and a receiver, etc.

[0112] Input unit 304 is used to receive audio or video signals. Input unit 304 may include a graphics processing unit (GPU) 3041 and a microphone 3042. The GPU 3041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 306. The image frames processed by GPU 3041 can be stored in memory 309 (or other storage media) or transmitted via radio frequency unit 301 or network module 302. Microphone 3042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 301 in telephone call mode.

[0113] The electronic device 300 also includes at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 3061 according to the ambient light level, and the proximity sensor can turn off the display panel 3061 and / or backlight when the electronic device 300 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 305 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.

[0114] The display unit 306 is used to display information input by the user or information provided to the user. The display unit 306 may include a display panel 3061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0115] User input unit 307 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 307 includes a touch panel 3071 and other input devices 3072. Touch panel 3071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 3071). Touch panel 3071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 310, which receives and executes commands from the processor 310. In addition, touch panel 3071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch panel 3071, user input unit 307 may also include other input devices 3072. Specifically, other input devices 3072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0116] Furthermore, the touch panel 3071 can cover the display panel 3061. When the touch panel 3071 detects a touch operation on or near it, it transmits the information to the processor 310 to determine the type of touch event. Subsequently, the processor 310 provides corresponding visual output on the display panel 3061 according to the type of touch event. It is understood that in one embodiment, the touch panel 3071 and the display panel 3061 are implemented as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 3071 and the display panel 3061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.

[0117] Interface unit 308 serves as an interface for connecting external devices to electronic device 300. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 308 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 300, or it can be used to transmit data between electronic device 300 and external devices.

[0118] The memory 309 can be used to store software programs and various data. The memory 309 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 309 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0119] The processor 310 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 309, and by calling data stored in the memory 309, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 310.

[0120] The electronic device 300 may also include a power supply 311 (such as a battery) for supplying power to various components. Preferably, the power supply 311 can be logically connected to the processor 310 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.

[0121] In addition, the electronic device 300 includes some functional modules not shown, which will not be described in detail here.

[0122] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0124] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0127] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0130] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0131] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A processing method of content distribution, characterized by, Applied to a content delivery network, the content delivery network including at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes, the method includes: The edge node obtains the content request sent by the client, determines the file information corresponding to the content request, and if the file information meets the conditions, generates several fragment requests corresponding to the content request and sends the first fragment request to the parent node. The parent node obtains the resource address corresponding to the content request from the origin server according to the first shard request, sends the first shard request to the origin server according to the resource address, and receives the first shard file content corresponding to the first shard request sent by the origin server. The edge node receives the first fragment file content and the resource address sent by the parent node, and requests the fragment file content corresponding to the other fragment requests besides the first fragment request from the parent node according to the resource address; The parent node requests the fragmented file content from the origin server based on the resource address, and returns the fragmented file content to the edge node so that the edge node can obtain the target file content corresponding to the content request.

2. The method of claim 1, wherein, The edge node acquires the content request sent by the client and determines the file information corresponding to the content request, including: The edge node obtains the content request sent by the client, determines the target file content corresponding to the content request, and obtains the file memory corresponding to the target file content.

3. The method of claim 2, wherein, If the file information meets the conditions, then several fragment requests corresponding to the content request are generated, including: If the file memory is greater than or equal to a preset memory threshold, then the file memory is divided to generate several fragment requests corresponding to the content request.

4. The method of claim 1, wherein, The parent node obtains the resource address corresponding to the content request from the origin server based on the first shard request, and sends the first shard request to the origin server based on the resource address. It also receives the first shard file content corresponding to the first shard request from the origin server, including: The parent node sends the first shard request to the origin server and receives a response header from the origin server for the first shard request, the response header including the resource address corresponding to the content request; The parent node sends a first resource acquisition request for the resource address to the source server, and receives the first fragment file content corresponding to the first resource acquisition request from the source server.

5. The method according to claim 1, characterized in that, The edge node receives the content of the first fragment file and the resource address sent by the parent node, including: The edge node receives the content of the first fragment file corresponding to the first fragment request returned by the parent node, and the resource address corresponding to the content request; The edge node returns the content of the first fragment file to the client.

6. The method according to claim 5, characterized in that, The step of requesting the fragment file content corresponding to the remaining fragment requests (excluding the first fragment request) from the parent node based on the resource address includes: The edge node sends the remaining shard requests (excluding the first shard request) and the resource address to the parent node in the order they correspond to the shard requests. The parent node sends a second resource acquisition request for the resource address to the source station in turn, and receives the second fragment content corresponding to the second resource acquisition request sent by the source station in turn, and sends the second fragment content to the edge node.

7. A content distribution processing apparatus, characterized in that, An apparatus applied to a content delivery network, the content delivery network comprising at least edge nodes, parent nodes communicating with the edge nodes, and source stations communicating with the parent nodes, the apparatus comprising: The request generation module located at the edge node is used to obtain the content request sent by the client, determine the file information corresponding to the content request, and generate several fragment requests corresponding to the content request if the file information meets the conditions. The request sending module located at the edge node is used to send the first shard request to the parent node; The file content acquisition module located in the parent node is used to obtain the resource address corresponding to the content request from the source station according to the first fragment request, send the first fragment request to the source station according to the resource address, and receive the first fragment file content corresponding to the first fragment request sent by the source station. The file content return module located at the edge node is used to receive the first fragment file content and the resource address sent by the parent node, and request the fragment file content corresponding to the other fragment requests besides the first fragment request from the parent node according to the resource address; The parent node requests the fragmented file content from the origin server based on the resource address, and returns the fragmented file content to the edge node so that the edge node can obtain the target file content corresponding to the content request.

8. The apparatus according to claim 7, characterized in that, The request generation module is specifically used for: Obtain the content request sent by the client, determine the target file content corresponding to the content request, and obtain the file memory corresponding to the target file content.

9. The apparatus according to claim 8, characterized in that, The request generation module is specifically used for: If the file memory is greater than or equal to a preset memory threshold, then the file memory is divided to generate several fragment requests corresponding to the content request.

10. The apparatus according to claim 7, characterized in that, The file content acquisition module is specifically used for: The first fragment request is sent to the origin server, and a response header for the first fragment request is received from the origin server. The response header includes the resource address corresponding to the content request. Send a first resource acquisition request for the resource address to the origin server, and receive the first fragment file content corresponding to the first resource acquisition request sent by the origin server.

11. The apparatus according to claim 10, characterized in that, The file content return module is specifically used for: Receive the content of the first shard file corresponding to the first shard request returned by the parent node, and the resource address corresponding to the content request; The edge node returns the content of the first fragment file to the client.

12. The apparatus according to claim 11, characterized in that, The file content return module is specifically used for: According to the order of the fragmentation requests, the remaining fragmentation requests, except for the first fragmentation request, are sent to the parent node one by one along with the resource address; The system sequentially sends a second resource acquisition request for the resource address to the source station, and sequentially receives the second fragment content corresponding to the second resource acquisition request sent by the source station, and sends the second fragment content to the edge node.

13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-6.

14. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Source returning method, device and equipment of CDN node

    CN113472852A