Source returning method and system, computer equipment and storage medium
The method for managing IP addresses in CDNs addresses the inefficiency of random IP selection by ensuring stable and efficient content retrieval, improving live streaming quality.
Patent Information
- Application Number
- CN202411784309.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing content delivery network (CDN) nodes randomly select candidate IP addresses for content retrieval, which may include abnormal addresses, leading to inefficiencies in the content retrieval process.
A method for CDNs to manage IP addresses by checking if recorded IP addresses are not in an exception list and selecting candidate IP addresses based on their status and rate, ensuring stable and efficient content retrieval.
Ensures stable and efficient content retrieval by using valid IP addresses, reducing jumps in video playback and enhancing the quality of live streaming services.
Smart Images

Figure CN119854544A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a back-to-source method, system, computer device, and storage medium. Background Art
[0002] In the related art, when a content delivery network (CDN) node performs back-to-source, a candidate back-to-source IP address is randomly selected from candidate back-to-source IP addresses. The randomly selected candidate back-to-source IP address may be an abnormal back-to-source IP address, so how to improve the efficiency of back-to-source becomes a problem that needs to be solved. Summary of the invention
[0003] In view of this, embodiments of the present disclosure provide a method, system, computer device, and storage medium for returning to the source.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for returning to the source, the method comprising:
[0005] The target CDN node receives a request sent by the client, wherein the request indicates that video stream data corresponding to a target video stream identifier needs to be obtained, and the request includes: a target video stream identifier and a target acceleration domain name corresponding to the target video stream identifier;
[0006] When the target CDN node determines that it needs to obtain the video stream data corresponding to the target video stream identifier by going back to the source, a back-to-source association operation is performed. The back-to-source association operation includes:
[0007] When the target back-to-source IP address corresponding to the target acceleration domain name exists in the back-to-source IP address list recorded by the target CDN node and the target back-to-source IP address is not in the abnormal back-to-source IP address list, the target back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier;
[0008] When the target CDN node determines that the target back-to-source IP address corresponding to the target acceleration domain name does not exist in the back-to-source IP address list recorded by the target CDN node and there is a first candidate back-to-source IP address corresponding to the target acceleration domain name, the target first candidate back-to-source IP address is selected, and it is determined whether the target first candidate back-to-source IP address is in the abnormal back-to-source IP address list; when it is determined that the target first candidate back-to-source IP address is not in the abnormal back-to-source IP address list, the target first candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0009] In a possible implementation, it also includes:
[0010] When the target CDN node determines that the target first candidate return source IP address is in the abnormal return source IP address list, it determines whether the time duration that the target first candidate return source IP address is in the abnormal return source IP address list is greater than a preset time duration;
[0011] When the target CDN node determines that the duration of the target first candidate return-to-source IP address in the abnormal return-to-source IP address list is greater than the preset duration, the target first candidate return-to-source IP address is deleted from the abnormal return-to-source IP address list, and the target first candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0012] In a possible implementation, it also includes:
[0013] When the target CDN node determines that the duration of the first candidate return-to-source IP address in the abnormal return-to-source IP address list is not greater than the preset duration, it determines whether there is a second candidate return-to-source IP address corresponding to the target acceleration domain name;
[0014] When the target CDN node determines that there is a second candidate back-to-source IP address corresponding to the target acceleration domain name, it selects the target second candidate back-to-source IP address and determines whether the target second candidate back-to-source IP address is in the abnormal back-to-source IP address list;
[0015] When the target CDN node determines that the target second candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target second candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0016] In a possible implementation, it also includes:
[0017] When the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold, the target CDN node adds the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier to the back-source IP address list recorded by the target CDN node.
[0018] In a possible implementation, it also includes:
[0019] The target CDN node determines whether the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is abnormal;
[0020] If the target CDN node determines that the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is not abnormal, the target CDN node determines whether the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold;
[0021] If the target CDN node determines that the rate corresponding to the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is added to the abnormal back-source IP address list, and it is determined whether there is a third candidate back-source IP address corresponding to the target acceleration domain name;
[0022] When the target CDN node determines that there is a third candidate back-to-source IP address corresponding to the target acceleration domain name, it selects the target third candidate back-to-source IP address and determines whether the target third candidate back-to-source IP address is in the abnormal back-to-source IP address list;
[0023] When the target CDN node determines that the target third candidate back-to-source IP address is not in the abnormal back-to-source IP address list, the target third candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0024] In a possible implementation, the video stream data corresponding to the target video stream identifier is live stream data.
[0025] In a second aspect, an embodiment of the present disclosure provides a back-to-source system, the back-to-source system comprising: a client, a target CDN node;
[0026] The target CDN node is used to receive a request sent by a client, wherein the request indicates that video stream data corresponding to a target video stream identifier needs to be obtained, and the request includes: a target video stream identifier and a target acceleration domain name corresponding to the target video stream identifier; when it is determined that the video stream data corresponding to the target video stream identifier needs to be obtained by returning to the source, a return-to-source association operation is performed, and the return-to-source association operation includes: when a target return-to-source IP address corresponding to the target acceleration domain name exists in a return-to-source IP address list recorded by the target CDN node and the target return-to-source IP address is not in an abnormal return-to-source IP address list, the target return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier; when it is determined that the target return-to-source IP address corresponding to the target acceleration domain name does not exist in the return-to-source IP address list recorded by the target CDN node and a first candidate return-to-source IP address corresponding to the target acceleration domain name exists, a target first candidate return-to-source IP address is selected, and it is determined whether the target first candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target first candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target first candidate return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier.
[0027] In a possible implementation, the target CDN node is further used to determine whether the duration of the target first candidate back-to-source IP address in the abnormal back-to-source IP address list is greater than a preset duration when determining that the target first candidate back-to-source IP address is in the abnormal back-to-source IP address list; when determining that the duration of the target first candidate back-to-source IP address in the abnormal back-to-source IP address list is greater than the preset duration, delete the target first candidate back-to-source IP address from the abnormal back-to-source IP address list, and determine the target first candidate back-to-source IP address as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0028] In a possible implementation, the target CDN node is further used to determine whether there is a second candidate return-to-source IP address corresponding to the target acceleration domain name when it is determined that the duration of the first candidate return-to-source IP address in the abnormal return-to-source IP address list is not greater than a preset duration; when it is determined that there is a second candidate return-to-source IP address corresponding to the target acceleration domain name, select the target second candidate return-to-source IP address, and determine whether the target second candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target second candidate return-to-source IP address is not in the abnormal return-to-source IP address list, determine the target second candidate return-to-source IP address as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0029] In one possible implementation, the target CDN node is also used to add the back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier to the back-to-source IP address list recorded by the target CDN node when the status code corresponding to the received back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier is greater than the rate threshold.
[0030] In a possible implementation, the target CDN node is further used to determine whether a status code corresponding to a received back-source IP address for obtaining video stream data corresponding to a target video stream identifier is abnormal; if it is determined that the received status code corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is not abnormal, the target CDN node determines whether a rate corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is greater than a rate threshold; if it is determined that the rate corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is added to an abnormal back-source IP address list, and it is determined whether there is a third candidate back-source IP address corresponding to the target acceleration domain name; when it is determined that there is a third candidate back-source IP address corresponding to the target acceleration domain name, a target third candidate back-source IP address is selected, and it is determined whether the target third candidate back-source IP address is in the abnormal back-source IP address list; when the target CDN node determines that the target third candidate back-source IP address is not in the abnormal back-source IP address list, the target third candidate back-source IP address is determined as the back-source IP address for obtaining video stream data corresponding to the target video stream identifier.
[0031] In a possible implementation, the video stream data corresponding to the target video stream identifier is live stream data.
[0032] In a third aspect, an embodiment of the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0033] In a fourth aspect, an embodiment of 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 method of the first aspect or any corresponding implementation manner thereof.
[0034] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0035] The return-to-source method provided by the embodiment of the present disclosure, when there is a target return-to-source IP address corresponding to the target acceleration domain name in the return-to-source IP address list recorded by the target CDN node and the target return-to-source IP address is not in the abnormal return-to-source IP address list, the target return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier. Thus, when the client continuously requests video stream data corresponding to the same video stream identifier, if there is a target return-to-source IP address corresponding to the target acceleration domain name in the return-to-source IP address list recorded by the target CDN node and the target return-to-source IP address is not in the abnormal return-to-source IP address list, it can be directly returned to the source through the recorded target return-to-source IP address corresponding to the target acceleration domain name. It can be achieved that when the client continuously requests video stream data corresponding to the same video stream identifier, multiple video stream data corresponding to the same video stream identifier are returned to the source through the same return-to-source IP, that is, the target return-to-source IP address corresponding to the target acceleration domain name. There will be no jumps when displaying the screen corresponding to the video stream data. When the video stream data corresponding to the target video stream identifier is live stream data based on the HLS (HTTP Live streaming) protocol, and a certain amount of live stream data is divided into multiple ts (Transport Stream) slices, it can be achieved that multiple ts slices played by the client player are downloaded from the same slice server, and the pictures corresponding to the live stream data will not jump when displayed.
[0036] When it is determined that the target source IP address corresponding to the target acceleration domain name does not exist in the source IP address list recorded by the target CDN node and there is a first candidate source IP address corresponding to the target acceleration domain name, the target first candidate source IP address is selected, and it is determined whether the target first candidate source IP address is in the abnormal source IP address list; when it is determined that the target first candidate source IP address is not in the abnormal source IP address list, the target first candidate source IP address is determined as the source IP address for obtaining the video stream data corresponding to the target video stream identifier. Thus, when the target source IP address corresponding to the target acceleration domain name is not recorded, the normal target first candidate source IP address can be used for source return, to ensure the rate of source return, to ensure load balancing, and to improve the stability of video data transmission. When the video stream data corresponding to the target video stream identifier is live streaming data based on the HLS (HTTP Live streaming) protocol, the transmission speed stability of the live HLS can be improved, and the quality of users accessing HLS resources through CDN can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] 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.
[0038] Figure 1 is an example flow chart of the return-to-source method provided by an embodiment of the present disclosure;
[0039] Figure 2 is a flowchart of an example for obtaining a back-source IP address of video stream data corresponding to a target video stream identifier;
[0040] Figure 3 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] 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.
[0042] refer to Figure 1 , which shows an example flow chart of the return-to-source method provided by an embodiment of the present disclosure. The return-to-source method provided by an embodiment of the present disclosure may be executed by a target CDN node.
[0043] In step S101, the target CDN node receives a request sent by a client.
[0044] The target CDN node may be any CDN node to which the method provided in the embodiments of the present disclosure may be applied.
[0045] The request sent by the client indicates that the video stream data corresponding to the target video stream identifier needs to be obtained. The request includes: the target video stream identifier and the target acceleration domain name (url) corresponding to the target video stream identifier. The target acceleration domain name corresponding to the target video stream identifier can be provided
[0046] The back-to-source IP in the embodiment of the present disclosure specifically refers to the CDN back-to-source IP. The back-to-source IP is used to obtain the IP address of the content from the original server. The back-to-source IP is usually provided by the CDN service provider.
[0047] In a possible implementation, the video stream data corresponding to the target video stream identifier is live video stream data.
[0048] In step S102, when the target CDN node determines that it is necessary to obtain the video stream data corresponding to the target video stream identifier by going back to the source, a back-to-source association operation is performed.
[0049] In step S102, the target CDN node may determine whether the target CDN node needs to obtain the video stream data corresponding to the target video stream identifier by going back to the source. The target CDN node may determine whether the target CDN node has cached the video stream data corresponding to the target video stream identifier. If so, determine whether the cached video stream data of the video stream identifier is expired.
[0050] If the target CDN node has cached the video stream data corresponding to the target video stream identifier and it has not expired, it can be determined that there is no need to go back to the source to obtain the video stream data corresponding to the target video stream identifier.
[0051] If the target CDN node does not cache the video stream data corresponding to the target video stream identifier or the cached video stream data is expired, it can be determined that the video stream data corresponding to the target video stream identifier needs to be obtained by going back to the source.
[0052] The back-to-source association operation includes: step S1021 and step S1022.
[0053] In step S1021, when the target back-to-source IP address corresponding to the target acceleration domain name exists in the back-to-source IP address list recorded by the target CDN node and the target back-to-source IP address is not in the abnormal back-to-source IP address list, the target back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0054] After the target back-to-source IP is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier, the target CDN node can establish a connection with the server having the target back-to-source IP address. After the target CDN node can establish a connection with the server having the target back-to-source IP address, the target CDN node can receive the video stream data corresponding to the target video stream identifier from the server having the target back-to-source IP address.
[0055] In step S1022, when it is determined that the target back-to-source IP address corresponding to the target acceleration domain name does not exist in the back-to-source IP address list recorded by the target CDN node and there is a first candidate back-to-source IP address corresponding to the target acceleration domain name, the target first candidate back-to-source IP address is selected, and it is determined whether the target first candidate back-to-source IP address is in the abnormal back-to-source IP address list; when it is determined that the target first candidate back-to-source IP address is not in the abnormal back-to-source IP address list, the target first candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0056] After the target first candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier, the target CDN node can establish a connection with the server having the target first candidate back-to-source IP address. After the target CDN node can establish a connection with the server having the target first candidate back-to-source IP address, the target CDN node can receive the video stream data corresponding to the target video stream identifier from the server having the target first candidate back-to-source IP address.
[0057] In a possible implementation, in step S1022, when the first candidate back-to-source IP address corresponding to the target acceleration domain name is found from the current back-to-source IP address list, it can be determined that there is a first candidate back-to-source IP address corresponding to the target acceleration domain name. The current back-to-source IP address list includes a plurality of back-to-source IP addresses that can currently be used to obtain video stream data for the corresponding video stream identifier. The first candidate back-to-source IP address corresponding to the target acceleration domain name can be found from the back-to-source IP address list by performing a hash calculation based on the target acceleration domain name.
[0058] In step S1022, a first candidate back-to-source IP address corresponding to the target acceleration domain name may be randomly selected, and the randomly selected first candidate back-to-source IP address corresponding to the target acceleration domain name may be used as the target first candidate back-to-source IP address.
[0059] In step S1022, when it is determined that the target back-to-source IP address corresponding to the target acceleration domain name does not exist in the back-to-source IP address list recorded by the target CDN node, it is determined whether there is a back-to-source IP address that may be used to obtain the video stream data corresponding to the target video stream identifier, except for the back-to-source IP address that cannot currently be used to obtain the video stream data corresponding to the target video stream identifier.
[0060] It should be noted that in the embodiment of the present disclosure, when the target back-to-source IP address corresponding to the target acceleration domain name does not exist in the back-to-source IP address list recorded by the target CDN node, the back-to-source IP address that may be used to obtain the video stream data corresponding to the target video stream identifier, other than the back-to-source IP address that cannot currently be used to obtain the video stream data corresponding to the target video stream identifier, is called the first candidate back-to-source IP address. The selected first candidate back-to-source IP address is called the target first candidate back-to-source IP address.
[0061] In a possible implementation, for a back-to-source IP, whether the back-to-source IP is normal is determined based on the status code corresponding to the back-to-source IP that was most recently received by the target CDN node.
[0062] In another possible implementation, for a back-to-source IP, whether the back-to-source IP is normal is determined based on a status code corresponding to the back-to-source IP that was most recently received by the target CDN node and a rate corresponding to the back-to-source IP that was most recently determined.
[0063] The status code corresponding to the back-to-source IP is one of the following: a status code indicating that the target CDN node has successfully established a connection with the server with the back-to-source IP, a status code indicating that the target CDN node has failed to establish a connection with the server with the back-to-source IP, a 5xx status code, or a custom abnormal status code.
[0064] If the status code corresponding to the back-to-source IP received by the target CDN node most recently is one of the status codes indicating that the target CDN node failed to establish a connection with the server with the back-to-source IP, the 5xx status code, and the custom abnormal status code, then the back-to-source IP can be determined to be abnormal. Once the back-to-source IP is determined to be abnormal, the back-to-source IP can be added to the abnormal IP list.
[0065] In a possible implementation, for a back-to-source IP, each time the back-to-source IP is used to obtain video stream data, the rate corresponding to the back-to-source IP can be determined. Once it is determined that the rate corresponding to the back-to-source IP is not greater than the rate threshold, the back-to-source IP can be determined to be abnormal, and the back-to-source IP can be added to the abnormal back-to-source IP address list.
[0066] In a possible implementation, in order to calculate the rate corresponding to the back-to-source IP, the rate of obtaining video stream data from a source station with a back-to-source IP in multiple statistical time periods during the period of obtaining video stream data using the back-to-source IP. The rate of obtaining video stream data from a source station with a back-to-source IP in a statistical time period can be the target data volume corresponding to the video stream data obtained from the source station with the back-to-source IP in the statistical time period divided by the length of the statistical time period. Among them, the data volume of the video stream data obtained from the source station with the back-to-source IP in the statistical time period or the data volume of the video stream data obtained from the source station with the back-to-source IP in the statistical time period except for the data of the preset small file type. The average value of the rate of obtaining video stream data from the source station with the back-to-source IP in multiple statistical time periods is calculated, and the average value is determined as the rate corresponding to the back-to-source IP.
[0067] In a possible implementation, the method further includes: step S103.
[0068] In step S103, when it is determined that the target first candidate return-to-source IP address is in the abnormal return-to-source IP address list, it is determined whether the duration of the target first candidate return-to-source IP address in the abnormal return-to-source IP address list is greater than a preset duration; when it is determined that the duration of the target first candidate return-to-source IP address in the abnormal return-to-source IP address list is greater than the preset duration, the target first candidate return-to-source IP address is deleted from the abnormal return-to-source IP address list, and the target first candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0069] In a possible implementation, the method further includes: step S104.
[0070] In step S104, when it is determined that the duration of the first candidate return-to-source IP address in the abnormal return-to-source IP address list is not greater than the preset duration, it is determined whether there is a second candidate return-to-source IP address corresponding to the target acceleration domain name; when it is determined that there is a second candidate return-to-source IP address corresponding to the target acceleration domain name, the target second candidate return-to-source IP address is selected, and it is determined whether the target second candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target second candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target second candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0071] It should be noted that in the embodiment of the present disclosure, when it is determined that the duration of the first candidate return source IP address in the abnormal return source IP address list is not greater than the preset duration, the return source IP address that may be used to obtain the video stream data corresponding to the target video stream identifier, other than the return source IP address that cannot currently be used to obtain the video stream data corresponding to the target video stream identifier, is called the second candidate return source IP address. The selected second candidate return source IP address is called the target second candidate return source IP address.
[0072] In step S104, a second candidate back-to-source IP address may be randomly selected as the target second candidate back-to-source IP address.
[0073] In step S104, when it is determined that the duration of the first candidate back-to-source IP address in the list of abnormal back-to-source IP addresses is not greater than the preset duration, it is determined whether there is a back-to-source IP address that may be used to obtain the video stream data corresponding to the target video stream identifier, other than the back-to-source IP address that cannot currently be used to obtain the video stream data corresponding to the target video stream identifier.
[0074] In a possible implementation, the method further includes: step S105.
[0075] In step S105, when the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold, the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is added to the back-source IP address list recorded by the target CDN node.
[0076] In a possible implementation, the method further includes: step S106.
[0077] In step S106, it is determined whether the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is abnormal; if it is determined that the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is not abnormal, that is, normal, it is determined whether the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold; if it is determined that the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is added to the abnormal back-source IP address list, and it is determined whether there is a third candidate back-source IP address corresponding to the target acceleration domain name; when it is determined that there is a third candidate back-source IP address corresponding to the target acceleration domain name, the target third candidate back-source IP address is selected, and it is determined whether the target third candidate back-source IP address is in the abnormal back-source IP address list; when it is determined that the target third candidate back-source IP address is not in the abnormal back-source IP address list, the target third candidate back-source IP address is determined as the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0078] It should be noted that, in the embodiment of the present disclosure, when determining that the rate corresponding to the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is added to the abnormal back-source IP address list. The back-source IP address that may be used to obtain the video stream data corresponding to the target video stream identifier, except for the back-source IP address that cannot currently be used to obtain the video stream data corresponding to the target video stream identifier, is called the third candidate back-source IP address. The selected third candidate back-source IP address is called the target third candidate back-source IP address.
[0079] In step S106, a third candidate back-to-source IP address may be randomly selected as the target third candidate back-to-source IP address.
[0080] refer to Figure 2, which shows an example flowchart for obtaining a back-source IP address of video stream data corresponding to a target video stream identifier.
[0081] In this example, the target CDN node receives the request from the client. The target CDN node does not cache the video stream data corresponding to the target video stream identifier or the cached video stream data corresponding to the target video stream identifier has expired. The target CDN node determines whether the target back-to-source IP address is recorded. If the target back-to-source IP address is recorded, the target back-to-source IP address is used to return to the source, that is, the target back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier, and the back-to-source IP address of the video stream data corresponding to the target video stream identifier is obtained from the server having the target back-to-source IP address.
[0082] In this example, if the target back-to-source IP address is not recorded, determine whether there are other available back-to-source IP addresses. If there are other available back-to-source IP addresses, select the back-to-source IP. If the selected back-to-source IP is not in the abnormal IP list, use the selected back-to-source IP for back-to-source. If the selected back-to-source IP is in the abnormal IP list. If the duration in the abnormal IP list exceeds the threshold, use the selected back-to-source IP for back-to-source.
[0083] In this example, if the selected back-to-source IP is normal, that is, the status code corresponding to the received back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold, the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier is added to the back-to-source IP address list recorded by the target CDN node.
[0084] In this example, if the selected back-to-source IP is abnormal, that is, the status code corresponding to the received back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier is abnormal and / or the rate corresponding to the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier is added to the abnormal back-to-source IP address list, and it is determined whether there are other available back-to-source IP addresses, that is, whether there is a third candidate back-to-source IP address corresponding to the target acceleration domain name.
[0085] The embodiments of the present disclosure provide a back-to-source system. The system is used to implement the above embodiments and preferred implementations, and those that have been described will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware for a predetermined function. Although the system 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.
[0086] The back-to-source system includes: a client and a target CDN node;
[0087] The target CDN node is used to receive a request sent by a client, wherein the request indicates that video stream data corresponding to a target video stream identifier needs to be obtained, and the request includes: a target video stream identifier and a target acceleration domain name corresponding to the target video stream identifier; when it is determined that the video stream data corresponding to the target video stream identifier needs to be obtained by returning to the source, a return-to-source association operation is performed, and the return-to-source association operation includes: when a target return-to-source IP address corresponding to the target acceleration domain name exists in a return-to-source IP address list recorded by the target CDN node and the target return-to-source IP address is not in an abnormal return-to-source IP address list, the target return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier; when it is determined that the target return-to-source IP address corresponding to the target acceleration domain name does not exist in the return-to-source IP address list recorded by the target CDN node and a first candidate return-to-source IP address corresponding to the target acceleration domain name exists, a target first candidate return-to-source IP address is selected, and it is determined whether the target first candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target first candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target first candidate return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier.
[0088] In a possible implementation, the target CDN node is further used to determine whether the duration of the target first candidate back-to-source IP address in the abnormal back-to-source IP address list is greater than a preset duration when determining that the target first candidate back-to-source IP address is in the abnormal back-to-source IP address list; when determining that the duration of the target first candidate back-to-source IP address in the abnormal back-to-source IP address list is greater than the preset duration, delete the target first candidate back-to-source IP address from the abnormal back-to-source IP address list, and determine the target first candidate back-to-source IP address as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0089] In a possible implementation, the target CDN node is further used to determine whether there is a second candidate return-to-source IP address corresponding to the target acceleration domain name when it is determined that the duration of the first candidate return-to-source IP address in the abnormal return-to-source IP address list is not greater than a preset duration; when it is determined that there is a second candidate return-to-source IP address corresponding to the target acceleration domain name, select the target second candidate return-to-source IP address, and determine whether the target second candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target second candidate return-to-source IP address is not in the abnormal return-to-source IP address list, determine the target second candidate return-to-source IP address as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
[0090] In one possible implementation, the target CDN node is also used to add the back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier to the back-to-source IP address list recorded by the target CDN node when the status code corresponding to the received back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-to-source IP address used to obtain the video stream data corresponding to the target video stream identifier is greater than the rate threshold.
[0091] In a possible implementation, the target CDN node is further used to determine whether a status code corresponding to a received back-source IP address for obtaining video stream data corresponding to a target video stream identifier is abnormal; if it is determined that the received status code corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is not abnormal, the target CDN node determines whether a rate corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is greater than a rate threshold; if it is determined that the rate corresponding to the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address for obtaining video stream data corresponding to the target video stream identifier is added to an abnormal back-source IP address list, and it is determined whether there is a third candidate back-source IP address corresponding to the target acceleration domain name; when it is determined that there is a third candidate back-source IP address corresponding to the target acceleration domain name, a target third candidate back-source IP address is selected, and it is determined whether the target third candidate back-source IP address is in the abnormal back-source IP address list; when the target CDN node determines that the target third candidate back-source IP address is not in the abnormal back-source IP address list, the target third candidate back-source IP address is determined as the back-source IP address for obtaining video stream data corresponding to the target video stream identifier.
[0092] In a possible implementation, the video stream data corresponding to the target video stream identifier is live stream data.
[0093] In this embodiment, the system is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0094] The further functional description of each of the above units is the same as that of the above corresponding embodiments and will not be repeated here.
[0095] refer to Figure 3, which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, 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. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display 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 part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means.
[0101] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0102] 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.
[0103] A portion of the embodiments 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 invention 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 may be any available computer-readable storage medium or communication medium accessible to the computer.
[0104] 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 appended claims.
Claims
1. A method for returning to the source, characterized in that: The method comprises: The target CDN node receives a request sent by the client, wherein the request indicates that video stream data corresponding to a target video stream identifier needs to be obtained, and the request includes: a target video stream identifier and a target acceleration domain name corresponding to the target video stream identifier; When the target CDN node determines that it needs to obtain the video stream data corresponding to the target video stream identifier by going back to the source, a back-to-source association operation is performed. The back-to-source association operation includes: When the target back-to-source IP address corresponding to the target acceleration domain name exists in the back-to-source IP address list recorded by the target CDN node and the target back-to-source IP address is not in the abnormal back-to-source IP address list, the target back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier; When the target CDN node determines that the target back-to-source IP address corresponding to the target acceleration domain name does not exist in the back-to-source IP address list recorded by the target CDN node and a first candidate back-to-source IP address corresponding to the target acceleration domain name exists, the target first candidate back-to-source IP address is selected, and it is determined whether the target first candidate back-to-source IP address is in the abnormal back-to-source IP address list; when it is determined that the target first candidate back-to-source IP address is not in the abnormal back-to-source IP address list, the target first candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
2. The method according to claim 1, characterized in that The method further comprises: When the target CDN node determines that the target first candidate return source IP address is in the abnormal return source IP address list, it determines whether the time duration that the target first candidate return source IP address is in the abnormal return source IP address list is greater than a preset time duration; When the target CDN node determines that the duration of the target first candidate return-to-source IP address in the abnormal return-to-source IP address list is greater than the preset duration, the target first candidate return-to-source IP address is deleted from the abnormal return-to-source IP address list, and the target first candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
3. The method according to claim 2, characterized in that The method further comprises: When the target CDN node determines that the duration of the first candidate return-to-source IP address in the abnormal return-to-source IP address list is not greater than the preset duration, it determines whether there is a second candidate return-to-source IP address corresponding to the target acceleration domain name; When the target CDN node determines that there is a second candidate back-to-source IP address corresponding to the target acceleration domain name, it selects the target second candidate back-to-source IP address and determines whether the target second candidate back-to-source IP address is in the abnormal back-to-source IP address list; When the target CDN node determines that the target second candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target second candidate return-to-source IP address is determined as the return-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is normal and the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold, the target CDN node adds the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier to the back-source IP address list recorded by the target CDN node.
5. The method according to claim 4, characterized in that The method further comprises: The target CDN node determines whether the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is abnormal; If the target CDN node determines that the status code corresponding to the received back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is not abnormal, the target CDN node determines whether the rate corresponding to the back-source IP address for obtaining the video stream data corresponding to the target video stream identifier is greater than the rate threshold; If the target CDN node determines that the rate corresponding to the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is not greater than the rate threshold, the back-source IP address used to obtain the video stream data corresponding to the target video stream identifier is added to the abnormal back-source IP address list, and it is determined whether there is a third candidate back-source IP address corresponding to the target acceleration domain name; When the target CDN node determines that there is a third candidate back-to-source IP address corresponding to the target acceleration domain name, it selects the target third candidate back-to-source IP address and determines whether the target third candidate back-to-source IP address is in the abnormal back-to-source IP address list; When the target CDN node determines that the target third candidate back-to-source IP address is not in the abnormal back-to-source IP address list, the target third candidate back-to-source IP address is determined as the back-to-source IP address for obtaining the video stream data corresponding to the target video stream identifier.
6. The method according to any one of claims 1 to 5, characterized in that The video stream data corresponding to the target video stream identifier is live stream data.
7. A back-to-source system, characterized in that: The system comprises: a client and a target CDN node; The target CDN node is used to receive a request sent by a client, wherein the request indicates that video stream data corresponding to a target video stream identifier needs to be obtained, and the request includes: a target video stream identifier and a target acceleration domain name corresponding to the target video stream identifier; when it is determined that the video stream data corresponding to the target video stream identifier needs to be obtained by returning to the source, a return-to-source association operation is performed, and the return-to-source association operation includes: when a target return-to-source IP address corresponding to the target acceleration domain name exists in a return-to-source IP address list recorded by the target CDN node and the target return-to-source IP address is not in an abnormal return-to-source IP address list, the target return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier; when it is determined that the target return-to-source IP address corresponding to the target acceleration domain name does not exist in the return-to-source IP address list recorded by the target CDN node and a first candidate return-to-source IP address corresponding to the target acceleration domain name exists, a target first candidate return-to-source IP address is selected, and it is determined whether the target first candidate return-to-source IP address is in the abnormal return-to-source IP address list; when it is determined that the target first candidate return-to-source IP address is not in the abnormal return-to-source IP address list, the target first candidate return-to-source IP address is determined as a return-to-source IP address for obtaining video stream data corresponding to the target video stream identifier.
8. 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 method according to any one of claims 1 to 6 by executing the computer instructions.
9. 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 method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Resource acquisition method and device, equipment and storage medium
CN114629919A
CDN node back-to-source scheduling system and method, server and storage medium
CN115914398A
Redirection method, device and system based on HTTPS protocol
CN116846972A
Method and system for acquiring web pages
US20150341414A1
Service scheduling method and apparatus
WO2021023018A1