Data pre-fetching method, device and computer equipment for CDN edge node

By generating prefetch tasks in streaming scenarios and pre-storing real-time streaming data, the problems of low hit rate and long first-screen duration in streaming scenarios are solved, and a higher hit rate and shorter first-screen duration are achieved.

CN119232968BActive Publication Date: 2025-03-21BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411730035.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-21
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In streaming scenarios, video files have low hit rate and long first-screen duration.

Method used

When no access request for the target channel is monitored, a prefetch task is generated, the real-time code stream data of the target channel is obtained, and pre-stored to the target edge node of the CDN in order to return the real-time code stream data in response to the data acquisition request.

Benefits of technology

This improves the hit rate when the user requests to obtain the video file and reduces the length of the first screen when the user obtains the video to watch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232968B_ABST
    Figure CN119232968B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and discloses a data pre-fetching method, device and computer equipment for CDN edge nodes, wherein the method comprises: generating a pre-fetching task when no access request for a target channel is detected; determining a target channel matching the pre-fetching task among multiple channels of the source station; acquiring real-time code stream data of the target channel based on the pre-fetching duration indicated by the pre-fetching task; pre-storing the real-time code stream data to a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request. The present disclosure can realize the pre-fetching of real-time code stream data through the edge node of the CDN in a streaming media scenario, thereby improving the hit rate when users request to obtain video files, and reducing the first screen duration when users obtain and watch videos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data pre-fetching method, device and computer equipment for a CDN edge node. Background Art

[0002] CDN (Content Delivery Network) is a distributed network of servers deployed around the world to accelerate content transmission and delivery services on the Internet. When a user requests to access a website or application, CDN will select the server closest to the user to provide content based on the user's location, thereby reducing loading time and increasing website performance.

[0003] like Figure 1 The following is a diagram of the CDN architecture, where the working principle of CDN is to cache the static resources of the website (such as pictures, videos, CSS, JavaScript files, etc.) on servers located in different geographical locations. When users request to access these resources, CDN will try to pull the user request to the nearest edge node and transmit the content to the user instead of loading it directly from the source station. This can greatly reduce the load on the customer's original server while reducing network congestion, reducing latency, increasing page loading speed, and improving user experience.

[0004] CDN Prefetch is a pre-caching behavior for uncached resources. In CDN, if a file is not cached, the first request for the file will not hit the cache. If you want the first request to hit the cache, you can use the capabilities provided by the CDN vendor to cache the source site's content in advance on the CDN node.

[0005] In the CDN industry, there is a field where video technology is widely used, referred to as the streaming media scenario. In this scenario, data can be distributed on the network through a specific protocol to spread videos. For example, online live broadcasts of events and TV series on demand are all based on this scenario. However, for streaming media scenarios, since video files cannot be pre-cached, the video file hit rate is low and the first screen duration (the time from when the user clicks to play to when the screen appears, that is, the time required to pull the first video file segment) is long. Summary of the invention

[0006] In view of this, the present disclosure provides a data pre-fetching method, apparatus and computer equipment for a CDN edge node to solve the problems of low hit rate of video files and long first screen time in a streaming media scenario.

[0007] In a first aspect, the present disclosure provides a method for pre-fetching data at a CDN edge node, the method comprising:

[0008] When no access request for the target channel is detected, a pre-fetch task is generated;

[0009] determining a target channel matching the pre-fetch task from among a plurality of channels of the source station;

[0010] Based on the prefetching duration indicated by the prefetching task, real-time stream data of the target channel is acquired;

[0011] The real-time code stream data is pre-stored in a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request.

[0012] A data pre-fetching device for a CDN edge node is provided, the device comprising:

[0013] A first acquisition module generates a pre-fetch task when no access request for a target channel is detected;

[0014] A determination module determines a target channel matching the pre-fetch task from among multiple channels of the source station;

[0015] A second acquisition module acquires the real-time code stream data of the target channel based on the pre-fetching duration indicated by the pre-fetching task;

[0016] The pre-storage module pre-stores the real-time code stream data to a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request.

[0017] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data prefetching method for a CDN edge node of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data pre-fetching method for a CDN edge node of the first aspect or any corresponding embodiment thereof.

[0019] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the data pre-fetching method for a CDN edge node of the first aspect or any corresponding embodiment thereof.

[0020] In the disclosed embodiment, first, when no access request for the target channel is detected, a pre-fetch task can be generated, and the real-time code stream data of the target channel can be obtained in the source station of the CDN. Then, the real-time code stream data can be pre-stored in the target edge node in the CDN, so that the target edge node returns the real-time code stream data in response to the data acquisition request, thereby realizing the pre-fetching of the real-time code stream data through the edge node of the CDN in the streaming media scenario, thereby improving the hit rate when the user requests to obtain the video file and reducing the first screen time when the user obtains the video to watch. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 This is the architecture diagram of CDN;

[0023] Figure 2 This is a schematic diagram of how the HLS protocol works on CDN;

[0024] Figure 3 It is a flowchart of a data pre-fetching method for a CDN edge node according to an embodiment of the present disclosure;

[0025] Figure 4 is a schematic diagram of target edge node 1 performing a pre-fetch task;

[0026] Figure 5 is a schematic diagram of operating the prefetch task through the Prefetch module in the edge node;

[0027] Figure 6 is a flow chart of another method for pre-fetching data at a CDN edge node according to an embodiment of the present disclosure;

[0028] Figure 7 This is a schematic diagram of spreading the pulled real-time code stream data;

[0029] Figure 8 is a structural block diagram of a data pre-fetching device for a CDN edge node according to an embodiment of the present disclosure;

[0030] Fig. 9 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0032] In conjunction with the application scenarios on which the execution of the data pre-fetching method of the CDN edge node depends, the application scenarios are described here.

[0033] CDN (Content Delivery Network) is a distributed server network deployed around the world to accelerate content transmission and delivery services on the Internet. When a user requests to access a website or application, CDN will select the server closest to the user to provide content based on the user's location, thereby reducing loading time and increasing website performance.

[0034] The working principle of CDN is to cache the static resources of the website (such as pictures, videos, CSS, JavaScript files, etc.) on servers located in different geographical locations. When users request to access these resources, CDN will try to pull the user request to the nearest node and transmit the content to the user instead of loading it directly from the source station. This can greatly reduce the load on the customer's original server while reducing network congestion, reducing latency, increasing page loading speed, and improving user experience.

[0035] CDN Prefetch is a pre-caching behavior for uncached resources. In CDN, if a file is not cached, the first request for the file will not hit the cache. If you want the first request to hit the cache, you can use the capabilities provided by the CDN vendor to cache the source site's content in advance on the CDN node.

[0036] In the CDN industry, there is a field where video technology is widely used, referred to as the streaming media scenario. In this scenario, data can be distributed on the network through a specific protocol to spread videos. For example, online live broadcasts of events and TV series on demand are all based on this scenario. However, for streaming media scenarios, since video files cannot be pre-cached, the video file hit rate is low and the first screen duration (the time from when the user clicks to play to when the screen appears, that is, the time required to pull the first video file segment) is long.

[0037] For example, in order to support the business characteristics of streaming media scenarios, the HLS (resource type is M3U8) protocol can often be used, such as Figure 2 The figure shows the working principle of the HLS protocol on CDN. The HLS protocol is a simple streaming protocol. It updates its own video stream by continuously appending the latest video file slice (xx.ts) at the end of the M3U8 file, so as to achieve the effect of live video and on-demand video. This feature brings a problem. For users who visit for the first time, the latest slice must be uncached in all nodes around the world. This phenomenon is very unfavorable for the speed racing scenario when CDN customers access cold streams. That is, from the customer's perspective, the first screen duration, hit rate and other indicators will be very bad.

[0038] Based on this, the embodiment of the present disclosure provides a data pre-fetching method for CDN edge nodes. First, when no access request for the target channel is detected, a pre-fetching task can be generated, and the real-time code stream data of the target channel can be obtained in the source station of the CDN. Then, the real-time code stream data can be pre-stored in the target edge node in the CDN, so that the target edge node returns the real-time code stream data in response to the data acquisition request, thereby realizing the pre-fetching of real-time code stream data through the edge node of the CDN in the streaming media scenario, thereby improving the hit rate when the user requests to obtain the video file, and reducing the first screen time when the user obtains the video to watch.

[0039] According to an embodiment of the present disclosure, a video annotation method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0041] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0042] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0043] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0044] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0045] According to an embodiment of the present disclosure, an embodiment of a data prefetching method for a CDN edge node is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] In this embodiment, a data pre-fetching method for a CDN edge node is provided, which can be used for the above-mentioned CDN (hereinafter referred to as CDN). Figure 3 is a flow chart of a data pre-fetching method for a CDN edge node according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:

[0047] Step S301: When no access request to a target channel is detected, a pre-fetch task is generated.

[0048] Step S302: determining a target channel matching the pre-fetch task from among multiple channels of the source station.

[0049] Step S303: acquiring the real-time code stream data of the target channel based on the pre-fetching duration indicated by the pre-fetching task.

[0050] In the disclosed embodiments, the pre-fetching tasks may be applied to a CDN racing scenario and an actual application scenario, respectively. The racing scenario is a scenario in which various CDN vendors compete with each other in terms of acceleration performance, service quality, etc., and the actual application scenario is used to indicate a scenario in which a customer's source station uses CDN to provide services to users.

[0051] Considering that when CDN vendors provide services to customers, the customer may be a multimedia platform, the customer's original server (i.e. Figure 1The source station in the video often provides multiple channels for users to browse. For example, the channels provided by the customer may include live broadcast, screening room, knowledge, hot spots, games, entertainment, music, food, sports, fashion, etc. Here, the target channel may include channels corresponding to the streaming media scene, such as live broadcast, screening room, etc.

[0052] In order to improve the hit rate when users request to obtain video files in streaming media scenarios, pre-fetch tasks can be generated based on the target channel to continuously pull HLS video segments from the source station within a certain period of time to obtain real-time code stream data, and cache the real-time code stream data in the edge node of the CDN waiting for users to obtain it. It should be understood that in order to improve the hit rate and reduce the first screen time when users obtain data, it is necessary to generate a pre-fetch task for the target channel before the user sends an access request for the target channel, that is, when no access request for the target channel is detected, a pre-fetch request is generated through the edge node to create a pre-fetch task based on the pre-fetch request.

[0053] Step S304: pre-store the real-time code stream data in a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to the data acquisition request.

[0054] In the embodiment of the present disclosure, the target edge node includes an edge node in the CDN that can initiate an access request for the target channel. When determining the target edge node, the edge node that has access rights to the target channel can be determined in the CDN. For example, if region A has access rights to the target channel, then the edge node deployed in region A can be determined as the target node.

[0055] Next, the pre-fetched real-time code stream data may be stored in a pre-storage unit of the target edge node, and the real-time code stream data may be returned to the user in response to the user's access request, wherein the pre-storage unit may include a Prefetch module.

[0056] Here, if Figure 4 The target edge node 1 (i.e. Figure 4 Schematic diagram of CDN edge node 1) performing prefetch tasks, wherein, after receiving the prefetch request containing the fetch address / media / playlist.m3u8 sent by the CDN manager, the Prefetch module can be triggered to establish a prefetch task. When executing the prefetch task, the Prefetch module can continuously obtain the latest HLS video segments (i.e., the latest HLS video segments of the target channel) from the source station within the prefetch duration indicated by the prefetch task. Figure 4 / media / 1.ts- / media / x.ts) in and cache them.

[0057] Next, the real-time code stream data of the target channel can be returned to the user in response to the user's access request for the target channel. Here, the first screen duration of the access request can be reduced to 100ms-300ms, and the hit rate can reach 100%.

[0058] It can be seen from the above description that in the embodiment of the present disclosure, first, when no access request for the target channel is detected, a pre-fetch task can be generated, and the real-time code stream data of the target channel can be obtained in the source station of the CDN. Then, the real-time code stream data can be pre-stored in the target edge node in the CDN, so that the target edge node returns the real-time code stream data in response to the data acquisition request, thereby realizing the pre-fetching of real-time code stream data through the edge node of the CDN in the streaming media scenario, thereby improving the hit rate when the user requests to obtain the video file, and reducing the first screen time when the user obtains the video to watch.

[0059] In some optional embodiments, the above Figure 3 The corresponding embodiments also include:

[0060] After detecting a performance test task for the CDN, the prefetching duration corresponding to the prefetching task is adjusted based on the test duration of the tested task.

[0061] In the disclosed embodiment, the performance test task may be a task issued by a customer for testing CDN performance. The performance test task typically includes a test duration for executing the task. During the test duration, the tester may initiate an access request for a target channel in an edge node of the CDN to test the hit rate of the visual access request and the corresponding first screen duration.

[0062] It should be understood that the test duration of the performance test task can be adjusted according to the customer's test requirements. Therefore, in order to ensure the pre-fetching of the real-time code stream of the target channel during the test, the pre-fetching duration of the pre-fetching task can be adjusted to be greater than or equal to the test duration.

[0063] In addition, in an actual application scenario, the above step S5021 includes:

[0064] Step a1: Detect a candidate channel that generates a real-time code stream among multiple channels.

[0065] Step a2: Analyze the traffic data of the candidate channels to obtain the target channel.

[0066] In the embodiments of the present disclosure, it is considered that in actual application scenarios, CDNs often have poor cache data for cold stream data, where cold stream data is used to indicate content with low access volume, low popularity, and not often requested by users. It should be understood that cold stream data is also the focus of testing in racing scenarios, so pre-fetching tasks for cold stream data can also be set in racing scenarios.

[0067] When determining the cold flow data, the target channel generating the cold flow data may be determined first. Specifically, the above step a2 includes:

[0068] (1) Obtain the preset flow value.

[0069] (2) Analyze the traffic data of the candidate channels and obtain a target channel whose historical traffic value does not exceed the preset traffic value.

[0070] In the disclosed embodiment, for a customer who has been operating for a period of time, all channels in a streaming media scenario in which the user can generate real-time code stream data can be obtained, and all the channels can be determined as channels to be selected.

[0071] Considering that the channels to be selected usually include popular channels with large visits and unpopular channels with small visits, the traffic data of the channels to be selected can be analyzed to obtain the unpopular channels that generate cold flow data, and the unpopular channels can be determined as the target channels.

[0072] Specifically, the traffic data of the selected channel can be analyzed through multiple dimensional indicators. For example, the dimensional indicators can include: playback volume, user interaction rate, content popularity, etc. Here, you can compare the playback volume of videos of similar themes to understand the traffic performance of a channel in different channels, so as to judge whether it is unpopular, or judge whether the selected channel is unpopular by the completion rate of the video. You can also use interactive indicators such as comment rate, forwarding rate, like rate and dislike rate to comprehensively judge the user's interaction rate, so as to determine the selected channel with a low user interaction rate as a unpopular channel. You can also judge whether the selected channel is a unpopular channel based on the tracking of hot content by the selected channel, fan operation, update frequency, etc.

[0073] In the embodiments of the present disclosure, the CDN racing scenario and the actual application scenario can be distinguished, so as to distinguish the target channels corresponding to the pre-fetching tasks according to the different scenarios, and formulate different pre-fetching tasks for different scenarios according to the target channels, so as to improve the hit rate when users request to obtain video files in each scenario and reduce the first screen time when users obtain and watch videos.

[0074] In some optional implementations, the above step S502 further includes:

[0075] When executing the pre-fetch task, in response to a pre-fetch request for real-time code stream data of a target channel, the timing of the pre-fetch duration is cleared to reset the pre-fetch task.

[0076] In the embodiment of the present disclosure, when no access request for the target channel is detected, a prefetch request for the target channel can be initiated in real time at any edge node in the CDN, and the server can push the prefetch task to the Prefetch module in response to the prefetch request, so that the Prefetch module obtains the real-time code stream data that may exist in the target channel based on the prefetch task.

[0077] When implementing it, Figure 5 The diagram is a schematic diagram of operating a prefetch task through a Prefetch module in an edge node, wherein firstly, it is possible to check whether there is a prefetch task for the target channel in the Prefetch module.

[0078] If the search result is not found, a prefetch task can be created in the Prefetch module, wherein the prefetch task can include a task identifier (the task identifier can be used to indicate the address of the target channel) and a prefetch duration (i.e. Figure 5 It should be understood that real-time code stream data of multiple target channels can be pre-fetched simultaneously through one pre-fetch task. Specifically, the sub-pre-fetch tasks corresponding to each target channel can be added to the task list of the Prefetch module, so that each sub-pre-fetch task can be executed in parallel / sequentially based on the task list.

[0079] If the search result is that a prefetch task is found, the prefetch task can be reset, that is, the prefetch duration of the prefetch task is cleared to zero, so as to achieve the purpose of resetting the task. For example, if the prefetch duration corresponding to the prefetch task is 180s, when the prefetch task is executed to 168s, a prefetch request for the target channel is received. At this time, the prefetch duration can be cleared to zero to reset the prefetch duration of the prefetch task to 180s.

[0080] In an embodiment of the present disclosure, before detecting a prefetch request for a target channel initiated by an edge node and pushing a prefetch task to the edge node in response to the prefetch request, it is possible to detect whether a prefetch request corresponding to the target channel exists in the edge node, and when it is determined that it exists, the timing of the prefetch duration is cleared to reset the prefetch task without re-establishing the prefetch task, thereby improving resource utilization, reducing task delays and maintaining task continuity.

[0081] In this embodiment, another CDN edge node data pre-fetching method is provided, which can be used for the above CDN. Figure 6 is a flow chart of another method for pre-fetching data at a CDN edge node according to an embodiment of the present disclosure. Figure 6 As shown, the process includes the following steps:

[0082] Step S601: When no access request for the target channel is detected, a pre-fetch task is generated. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.

[0083] Step S602: Determine a target channel that matches the pre-fetch task from among multiple channels of the source station. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.

[0084] Step S603: acquiring the real-time code stream data of the target channel based on the pre-fetching duration indicated by the pre-fetching task.

[0085] Step S604: pre-store the real-time code stream data in a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to the data acquisition request.

[0086] Specifically, the above step S604 includes:

[0087] Step S6041: determine a first edge node that sends a pre-fetch task in the CDN, and determine a second edge node associated with the first edge node.

[0088] Step S6042: determine a target edge node according to the first edge node and the second edge node.

[0089] Step S6043, pre-store the real-time code stream data into the pre-storage unit of the target edge node.

[0090] In the disclosed embodiment, considering that in the above-mentioned racing scenario, testers often do not test only one edge node in order to obtain a more comprehensive test result for the entire CDN performance, therefore, the real-time stream data of the pulled target channel in the CDN can be diffused among multiple edge nodes.

[0091] Here, first, the edge node that sends the pre-fetch task can be determined as the first edge node, and the second edge node associated with the first edge node can be calculated. Specifically, when calculating the second edge node, the edge node that has access rights to the target channel can be determined in the CDN. For example, if region B has access rights to the target channel, then the edge node deployed in region B can be determined as the second edge node.

[0092] In addition, considering that the access distance factor is usually considered when initiating a test, an edge node whose geographical location meets the matching condition with the first edge node can also be determined as the target node. For example, if the geographical location of the target object is located in country X, then the edge node arranged in the country can be determined as the second edge node.

[0093] Alternatively, all other edge nodes in the CDN may be determined as second edge nodes corresponding to the first edge node, so as to improve the overall pre-fetching effect of the CDN.

[0094] Here, if Figure 7 The figure shows a schematic diagram of spreading the pulled real-time code stream data, wherein CDN edge node 1 is the first edge node, CDN edge node 2 is the second edge node associated with CDN edge node 1, and CDN edge node 1 can spread the pre-fetched latest fragments to CDN edge node 2 in real time.

[0095] In the disclosed embodiments, considering that in the above-mentioned racing scenario, testers often do not test only one edge node in order to obtain a more comprehensive test result for the entire CDN performance, the real-time code stream data of the pulled target channel in the CDN can be diffused among multiple edge nodes, thereby achieving the effect of real-time pre-fetching of the entire network in the CDN, and further improving key indicators such as the first screen duration and hit rate of the entire network.

[0096] In summary, in the disclosed embodiment, first, when no access request for the target channel is detected, a pre-fetch task can be generated, and the real-time code stream data of the target channel can be obtained in the source station of the CDN. Then, the real-time code stream data can be pre-stored in the target edge node in the CDN, so that the target edge node returns the real-time code stream data in response to the data acquisition request, thereby realizing the pre-fetching of the real-time code stream data through the edge node of the CDN in the streaming media scenario, thereby improving the hit rate when the user requests to obtain the video file, and reducing the first screen time when the user obtains the video to watch.

[0097] In this embodiment, a data pre-fetching device for a CDN edge node is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0098] This embodiment provides a data pre-fetching device for a CDN edge node, such as Figure 8 As shown, including:

[0099] A first acquisition module 801 is used to generate a pre-fetch task when no access request for a target channel is detected;

[0100] The second acquisition module 802 is used to acquire the real-time stream data of the target channel from the source station of the CDN;

[0101] The pre-storage module 803 is used to pre-store the real-time code stream data to a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request.

[0102] In some optional implementations, the second acquisition module 802 is further configured to:

[0103] Determining a target channel matching the pre-fetch task among a plurality of channels of the source station;

[0104] Based on the prefetch duration indicated by the prefetch task, the real-time code stream data of the target channel is acquired.

[0105] In some optional implementations, the second acquisition module 802 is further configured to:

[0106] After detecting a performance test task for the CDN, the prefetching duration corresponding to the prefetching task is adjusted based on the test duration of the test task.

[0107] In some optional implementations, the second acquisition module 802 is further configured to:

[0108] Detecting a candidate channel for generating a real-time code stream among the multiple channels;

[0109] The target channel is obtained by analyzing the traffic of the candidate channel.

[0110] In some optional implementations, the second acquisition module 802 is further configured to:

[0111] Get the preset flow value;

[0112] Based on the analysis of the traffic data of the candidate channel, a target channel whose historical traffic value does not exceed the preset traffic value is obtained.

[0113] In some optional implementations, the second acquisition module 802 is further configured to:

[0114] When executing the pre-fetch task, in response to a pre-fetch request for the real-time code stream data of the target channel, the timing of the pre-fetch duration is cleared to reset the pre-fetch task.

[0115] In some optional implementations, the pre-storage module 803 is further used to:

[0116] Determining, in the CDN, a first edge node that sends the pre-fetch task, and determining a second edge node associated with the first edge node;

[0117] Determine a target edge node according to the first edge node and the second edge node;

[0118] The real-time code stream data is pre-stored in a pre-storage unit of the target edge node.

[0119] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0120] The data pre-fetching device of the CDN edge node in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0121] The present disclosure also provides a computer device having the above Figure 8 The data pre-fetching device of the CDN edge node is shown.

[0122] See also Fig. 9 , Fig. 9 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0123] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0124] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0125] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0126] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0127] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0128] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0129] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0130] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0131] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0132] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0133] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0134] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the accompanying description.

Claims

1. A data pre-fetching method for a CDN edge node, characterized in that: The method comprises: When no access request for the target channel is detected, a pre-fetch task is generated; Determine a target channel matching the pre-fetch task among a plurality of channels of the source station; Based on the prefetch duration indicated by the prefetch task, acquiring the real-time stream data of the target channel; Pre-storing the real-time code stream data in a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request; Wherein, determining a target channel matching the pre-fetch task from among the multiple channels of the source station comprises: Detecting a candidate channel for generating a real-time code stream among the multiple channels; Analyze the traffic of the candidate channel to obtain a target channel; The analyzing the traffic of the candidate channel to obtain the target channel includes: Get the preset flow value; Analyze the traffic data of the selected channel to obtain a target channel whose historical traffic value does not exceed the preset traffic value; The step of pre-storing the real-time code stream data to a target edge node in the CDN includes: Determining, in the CDN, a first edge node that sends the pre-fetch task, and determining a second edge node associated with the first edge node; Determine a target edge node according to the first edge node and the second edge node; The real-time code stream data is pre-stored in a pre-storage unit of the target edge node.

2. The method according to claim 1, characterized in that The method further comprises: After detecting a performance test task for the CDN, the prefetching duration corresponding to the prefetching task is adjusted based on the test duration of the test task.

3. The method according to claim 1, characterized in that The method further comprises: When executing the pre-fetch task, in response to a pre-fetch request for the real-time code stream data of the target channel, the timing of the pre-fetch duration is cleared to reset the pre-fetch task.

4. A data pre-fetching device for a CDN edge node, characterized in that: The device comprises: A first acquisition module generates a pre-fetch task when no access request for a target channel is detected; A determination module determines a target channel matching the pre-fetch task from among multiple channels of a source station, wherein determining the target channel matching the pre-fetch task from among multiple channels of the source station comprises: detecting a candidate channel generating a real-time code stream from among the multiple channels; analyzing based on the traffic of the candidate channel to obtain the target channel; analyzing based on the traffic of the candidate channel to obtain the target channel comprises: acquiring a preset traffic value; analyzing based on the traffic data of the candidate channel to obtain a target channel whose historical traffic value does not exceed the preset traffic value; A second acquisition module, based on the pre-fetching duration indicated by the pre-fetching task, acquires the real-time code stream data of the target channel; A pre-storage module pre-stores the real-time code stream data to a target edge node in the CDN, wherein the target edge node is used to return the real-time code stream data in response to a data acquisition request, and the pre-storing of the real-time code stream data to the target edge node in the CDN includes: determining a first edge node that sends the pre-fetch task in the CDN, and determining a second edge node associated with the first edge node; determining a target edge node according to the first edge node and the second edge node; and pre-storing the real-time code stream data in a pre-storage unit of the target edge node.

5. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data prefetching method for a CDN edge node according to any one of claims 1 to 3 by executing the computer instructions.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data pre-fetching method for a CDN edge node according to any one of claims 1 to 3.

7. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the data pre-fetching method for a CDN edge node according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Content distribution method and device, storage medium and electronic equipment

    CN113873302A

  • Multi-source station channel automatic back-to-source method and device

    CN114501056A