Live broadcast back-to-source detection method, system and device and storage medium

By counting flow records in the back-to-origin controller of CDN nodes, identifying and processing repeated back-to-origins, it solves the problem of resource waste and cost increase caused by repeated back-to-origins in the CDN cluster, achieves effective back-to-origin detection and processing, and reduces costs. The cost of live data distribution.

CN118612470APending Publication Date: 2024-09-06SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410890372.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In current live broadcast data distribution, CDN's cross-cluster return-to-origin path may lead to repeated return-to-origin behavior, resulting in a waste of resources and increased costs.

Method used

Statistics flow records in the back-to-origin controller of the CDN node, obtains flow records of the entire CDN cluster through background threads, identifies and records repeated back-to-origins, determines the target node, switches error back-to-origins to the target node for processing, and differentiates by imitating back-to-origin requests. And disconnect the error back to the source.

Benefits of technology

Effectively detect and handle repeated back-to-origins in CDN clusters to avoid resource waste, reduce back-to-origin costs, and improve system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612470A
    Figure CN118612470A
Patent Text Reader

Abstract

The invention discloses a live broadcast back-to-source detection method, which is applied to a CDN (Content Delivery Network) node, and comprises the following steps: counting all flow records passing through the current CDN node in a back-to-source controller of the current CDN node; accessing other CDN nodes of the current CDN cluster through a background thread of the back-to-source controller, obtaining a flow record of each other CDN node, and obtaining a flow record of the whole CDN cluster; and according to the flow record of the CDN cluster, identifying a repeated back source, and recording the repeated back source in a log. The invention also discloses a live broadcast back-to-source detection system, an electronic device and a computer readable storage medium. Therefore, the repeated back-to-source in the CDN cluster can be effectively detected through the flow record counted in the back-to-source controller of each CDN node, so that the repeated back-to-source can be processed in time, and the waste of resources is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of live broadcast data distribution, and in particular to a live broadcast source return detection method, system, electronic device and computer-readable storage medium. Background Art

[0002] CDN (Content Delivery Network) is the main solution for live broadcast data distribution. The services in CDN are divided into different components to implement different functions, including the gateway layer and the back-to-source layer. The gateway layer is used to carry user traffic and authentication, and the back-to-source layer is used to initiate back-to-source requests to the upper-layer cluster.

[0003] In order to reduce costs, downstream CDNs usually choose to converge back to the source. For the same resource, such as a live stream or a shard request, CDNs usually choose a process on a machine in the cluster to initiate a back-to-source request. This can converge many user requests into one path, thereby reducing back-to-source costs.

[0004] However, the cross-cluster back-to-source path of current streaming media is dynamically planned by the central service, and repeated back-to-source behavior may occur due to different reasons. For example, network fluctuations cause nodes to go online or offline, the central service plans two back-to-source nodes in the same cluster for back-to-source, and access to the central service fails, resulting in back-to-source through static configuration. Therefore, CDN services need a way to detect these repeated back-to-sources and handle them in a timely manner, thereby reducing the back-to-source cost. Summary of the invention

[0005] The main purpose of this application is to propose a live broadcast source return detection method, system, electronic device and computer-readable storage medium, aiming to solve the problem of how to effectively detect duplicate source returns and handle them in a timely manner, thereby reducing the source return cost.

[0006] To achieve the above purpose, the embodiment of the present application provides a live broadcast back-to-source detection method, which is applied in a CDN node. The method includes:

[0007] Counting all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node;

[0008] Accessing other CDN nodes in the current CDN cluster through a background thread of the back-to-origin controller, obtaining the flow record of each of the other CDN nodes, and obtaining the flow record of the entire CDN cluster;

[0009] Duplicate back-to-source traffic is identified based on the flow records of the CDN cluster and recorded in the log.

[0010] Optionally, after identifying repeated return to the source, the method further includes:

[0011] Determine a target CDN node corresponding to the repeated return to the source according to a preset algorithm, wherein the target CDN node is a CDN node in the CDN cluster selected according to the algorithm to process the return to the source request corresponding to the repeated return to the source;

[0012] Determine an erroneous back-to-source in the repeated back-to-source according to the target CDN node;

[0013] The error is switched back to the target CDN node for processing.

[0014] Optionally, counting all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node includes:

[0015] The status and return-to-source mode of each flow passing through the current CDN node are recorded. The status includes online, keep-alive, and offline. The return-to-source mode includes process return-to-source, cluster return-to-source, and remote return-to-source.

[0016] Optionally, the identifying repeated back-to-source according to the flow record of the CDN cluster includes:

[0017] Obtaining a remote back-to-source record of each flow from the flow record of the CDN cluster;

[0018] If a certain flow has remote back-to-source records in two or more CDN nodes in the CDN cluster, the remote back-to-source records are marked as duplicate back-to-source.

[0019] Optionally, determining the wrong origin in the repeated origin return according to the target CDN node includes:

[0020] Acquire multiple remote back-to-source records corresponding to the repeated back-to-source, and a remote back-to-source processing node in the CDN cluster corresponding to each remote back-to-source record;

[0021] When the processing node is not the target CDN node, it is determined that the remote back-to-origin corresponding to the processing node is an erroneous back-to-origin.

[0022] Optionally, switching the error back to the source to the target CDN node for processing includes:

[0023] The origin controller in the processing node corresponding to the error origination initiates a simulated origination request to the origination layer of the target CDN node, wherein the simulated origination request carries special parameters to distinguish it from the user origination request;

[0024] The error is disconnected from the source in the processing node.

[0025] In addition, to achieve the above purpose, the embodiment of the present application also provides a live broadcast back-to-source detection system, which is applied to a CDN node. The system includes:

[0026] A statistics module, used to count all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node;

[0027] An acquisition module, configured to access other CDN nodes of the current CDN cluster through a background thread of the back-to-origin controller, acquire the flow record of each of the other CDN nodes, and obtain the flow record of the entire CDN cluster;

[0028] The identification module is used to identify repeated back-to-source according to the flow records of the CDN cluster and record them in the log.

[0029] To achieve the above-mentioned purpose, an embodiment of the present application further provides an electronic device, which includes: a memory, a processor, and a live broadcast source return detection program stored in the memory and executable on the processor, wherein the live broadcast source return detection program implements the live broadcast source return detection method as described above when executed by the processor.

[0030] To achieve the above objectives, an embodiment of the present application further provides a computer-readable storage medium, on which a live broadcast source return detection program is stored. When the live broadcast source return detection program is executed by a processor, the live broadcast source return detection method as described above is implemented.

[0031] To achieve the above-mentioned purpose, an embodiment of the present application further provides a computer program product, on which a live broadcast source return detection program is stored, and when the live broadcast source return detection program is executed by a processor, the live broadcast source return detection method as described above is implemented.

[0032] The live broadcast source return detection method, system, electronic device and computer-readable storage medium proposed in the embodiments of the present application can effectively detect duplicate source returns in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node, so as to handle the duplicate source returns in time and avoid waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 An application environment architecture diagram for implementing various embodiments of the present application;

[0034] Figure 2 This is a typical live broadcast back-source architecture diagram in this application;

[0035] Figure 3 This is a flow chart of a live broadcast back-to-source detection method proposed in the first embodiment of the present application;

[0036] Figure 4 for Figure 3 A detailed flow chart of step S204;

[0037] Figure 5 This is a flow chart of a live broadcast source return detection method proposed in the second embodiment of the present application;

[0038] Figure 6 for Figure 5 A detailed flow chart of step S308;

[0039] Figure 7 for Figure 5 A detailed flow chart of step S310;

[0040] Figure 8 This is a flow chart of a live broadcast source return detection method proposed in the third embodiment of the present application;

[0041] Fig. 9 A schematic diagram of the hardware architecture of an electronic device proposed in the fourth embodiment of the present application;

[0042] Fig.10 This is a module diagram of a live broadcast back-to-source detection system proposed in the fifth embodiment of the present application;

[0043] Fig.11 This is a module diagram of a live broadcast back-to-source detection system proposed in the sixth embodiment of the present application;

[0044] Fig.12 This is a module diagram of a live broadcast back-to-source detection system proposed in the seventh embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0046] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0047] The following is an explanation of the terms used in this application:

[0048] CDN (Content Delivery Network): is a new type of content service system based on IP network. Through the strategic construction and deployment of widely distributed edge servers, supplemented by relevant load balancing and central platform scheduling strategies, it can enable visiting users to access the available edge servers nearby and obtain the required content, thereby improving cache hit rate and response speed. The general CDN architecture is a tree-like structure that relies on layering and port multiplexing to improve the load capacity of the entire system. The edge CDN node close to the user obtains real-time media streams or static files from the source station through layers of back-to-source according to the decision of the scheduling system, thereby providing services to users.

[0049] Streaming: Collect audio and video data from the client, encode it, and encapsulate it using a transmission protocol before transmitting it to the server. The server here is the source station in the CDN architecture.

[0050] Pulling stream: The process in which the client pulls the live media stream to the local computer through the specified source address.

[0051] Back-to-origin: refers to the process by which the client obtains the audio and video information of the requested media stream from the CDN. When a client requests to access a resource, if the resource is not cached on the CDN node, the CDN node will go back to the origin site to obtain the resource.

[0052] Cluster: A collection of many CDN nodes deployed in the same region.

[0053] See also Figure 1 , Figure 1 The present invention is an application environment architecture diagram for implementing various embodiments of the present invention. The present invention can be applied to application environments including, but not limited to, a streaming end 2, a streaming end 4, and a CDN 6.

[0054] The streaming end 2 is a client on the streaming side, such as a client where the anchor is located, and is used to encapsulate the audio and video data of the live broadcast room and push the encapsulated live media stream to the CDN 6.

[0055] The stream pulling end 4 is a client on the stream pulling side, such as a client where the audience is located, and is used to obtain the live media stream from the CDN 6 and play it after parsing.

[0056] The client may be a terminal device such as a PC (Personal Computer), a mobile phone, a tablet computer, a portable computer, a wearable device, etc.

[0057] The CDN 6 is used to receive the live media stream pushed by the streaming end 2, distribute and retweet it, and receive the streaming request from the streaming end 4 and perform back-to-source processing.

[0058] like Figure 2 The following is a typical live broadcast source backhaul architecture diagram. Figure 2 A CDN cluster of the CDN is shown in FIG. 1 , wherein the CDN cluster includes a plurality of CDN nodes. Figure 2 In the example, three CDN nodes are used for explanation. Generally, the CDN includes an origin station and multiple CDN clusters. The CDN nodes include but are not limited to a gateway layer and an origin layer. The gateway layer is used to accept user requests and provide functions such as authentication and traffic convergence. The origin layer is used to process services that go back to the upper node.

[0059] In order to carry user traffic from all over the country, the CDN generally adopts a distributed tree-like back-to-source architecture. A typical back-to-source path is: the user accesses a CDN node in the CDN cluster closest to him, such as Figure 2 CDN node A in the CDN cluster, CDN node A then initiates a back-to-source request to a CDN node in the secondary cluster, and finally the CDN node in the secondary cluster initiates a back-to-source request to the origin site, and the origin site returns the audio and video data until it is transparently transmitted to the user.

[0060] In a CDN cluster, for the same resource, such as a live stream or a shard request, a process of a CDN node in the cluster is usually selected to initiate a back-to-source request. This can converge many user requests into one path, thereby reducing the back-to-source cost. For example, Figure 2 CDN nodes A, B, and C in the CDN cluster all converge the back-to-origin request to a process of back-to-origin layer A of CDN node A for processing, and then back-to-origin layer A initiates a back-to-origin request to a CDN node in the upper-layer cluster.

[0061] Embodiment 1

[0062] like Figure 3 As shown, it is a flowchart of a live broadcast source return detection method proposed in the first embodiment of the present application. It can be understood that the flowchart in the embodiment of the present method is not used to limit the order of executing the steps. As needed, some steps in the flowchart can also be added or deleted. The method is described below with the CDN node as the execution subject.

[0063] The method comprises the following steps:

[0064] S200: Count all flow records passing through the CDN node in the back-to-origin controller of the current CDN node.

[0065] In the above live broadcast back-to-source architecture, the status of a single stream is divided into: online, keep-alive, offline, etc. Among them, the online means that a user has requested the stream, the keep-alive means that the user is watching the stream, and the offline means that all users have disconnected the request for the stream. In a CDN node, the back-to-source methods that a single stream may include are divided into: process back-to-source, cluster back-to-source, remote back-to-source, etc. The process back-to-source means that a process of the back-to-source layer of the CDN node is selected by a process selection algorithm (such as a consistent hashing algorithm) to process the back-to-source request. The cluster back-to-source means that a process of the back-to-source layer in other CDN nodes within the CDN cluster is selected by the process selection algorithm to process the back-to-source request. The remote back-to-source is also called the public network back-to-source, which means that the query interface is used to obtain the back-to-source of a certain CDN node in the upper-layer CDN cluster to which this back-to-source request should go.

[0066] In this embodiment, the flow record includes the status and return-to-source method of each flow passing through the CDN node, the status includes but is not limited to online, keep-alive, and offline, and the return-to-source method includes but is not limited to process return-to-source, cluster return-to-source, and remote return-to-source.

[0067] In the live broadcast back-to-source architecture, the back-to-source layer of each CDN node also corresponds to a business module, called a back-to-source controller (Controller, Cr for short). Figure 2 (not shown in the figure). After receiving the return request, the return layer asks the return controller where to return to the source. The return controller obtains the return address and returns it to the return layer. The return layer initiates a return request to the return layer of the CDN node corresponding to the return address. In other words, the return controller can count all the flow records of the return layer passing through the current node. For example, the return controller A corresponding to the return layer A has all the flow records passing through the return layer A.

[0068] Specifically, if the retrieval layer successfully returns to the source address provided by the retrieval controller, the retrieval layer will initiate an alive notification of successful retrieval to the retrieval controller. After receiving the notification, the retrieval controller will mark the stream as online stream pulling state. In addition, according to the different retrieval addresses, the stream pulling is further marked as process retrieval, cluster retrieval, remote retrieval, etc. When a user of a stream requests to actively disconnect the link, the retrieval layer will initiate an unpull notification of retrieval disconnection to the retrieval controller. After receiving the notification, the retrieval controller will reduce the number of users of this stream by 1. When a stream has no user access for a period of time, the retrieval controller will delete the record of this stream.

[0069] S202, accessing other CDN nodes of the current CDN cluster through a background thread of the back-to-origin controller, obtaining the flow record of each of the other CDN nodes, and obtaining the flow record of the entire CDN cluster.

[0070] In this embodiment, a background thread is initiated in each of the back-to-source controllers, the purpose of which is to access and obtain the flow records of other CDN nodes in the CDN cluster. For example, the back-to-source controller A corresponding to the back-to-source layer A will initiate a request to the back-to-source controller B and the back-to-source controller C corresponding to the back-to-source layer B and the back-to-source layer C to obtain the flow records of CDN node B and CDN node C (that is, back-to-source layer B and back-to-source layer C). In this way, the back-to-source controller corresponding to each back-to-source layer has the flow records of the entire CDN cluster.

[0071] S204: Identify repeated back-to-source according to the flow record of the CDN cluster, and record it in a log.

[0072] Based on the flow records of the entire CDN cluster, the back-to-source controller can easily determine which flow has remote back-to-source records in two or more CDN nodes in a circular manner. Such remote back-to-source records can be marked as a repeated back-to-source and recorded in the log for alarm.

[0073] For more details, see Figure 4 , is a detailed flow chart of the above step S204. It can be understood that the flow chart is not used to limit the order of executing the steps. Some steps in the flow chart can be added or deleted as needed. In this embodiment, the step S204 specifically includes:

[0074] S2040: Obtain a remote back-to-source record of each flow from the flow record of the CDN cluster.

[0075] S2042: If a certain flow has remote back-to-source records in two or more CDN nodes in the CDN cluster, the remote back-to-source records are marked as duplicate back-to-source.

[0076] Under normal circumstances, the return-to-source request corresponding to each flow in the CDN cluster should be converged to the same process of the return-to-source layer of the same CDN node for processing. Therefore, if a flow has remote return-to-source records in two or more CDN nodes in the CDN cluster, it means that the return-to-source request corresponding to the flow is assigned to multiple processes of multiple CDN nodes for processing, which causes repeated return-to-source. In this embodiment, according to the remote return-to-source record of each flow in the flow record of the CDN cluster, the repeated return-to-source can be discovered in time.

[0077] S2044: Record the repeated return-to-source information in a log for use as an alarm.

[0078] The live broadcast source return detection method proposed in this embodiment can effectively detect repeated source returns in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node, so as to handle the repeated source returns in time and avoid waste of resources.

[0079] Embodiment 2

[0080] like Figure 5 As shown, it is a flowchart of a live broadcast source return detection method proposed in the second embodiment of the present application. In the second embodiment, the live broadcast source return detection method further includes steps S306-S310 on the basis of the above-mentioned first embodiment. It can be understood that the flowchart in the embodiment of this method is not used to limit the order of executing the steps. Some steps in the flowchart can also be added or deleted as needed.

[0081] The method comprises the following steps:

[0082] S300: Count all flow records passing through the CDN node in the back-to-origin controller of the current CDN node.

[0083] In this embodiment, the flow record includes the status and return-to-source method of each flow passing through the CDN node, the status includes but is not limited to online, keep-alive, and offline, and the return-to-source method includes but is not limited to process return-to-source, cluster return-to-source, and remote return-to-source.

[0084] S302: Access other CDN nodes in the current CDN cluster through a background thread of the back-to-origin controller, obtain the flow record of each of the other CDN nodes, and obtain the flow record of the entire CDN cluster.

[0085] In this embodiment, each back-to-source controller initiates a background thread, the purpose of which is to access and obtain the flow records of other CDN nodes in the CDN cluster. In this way, the back-to-source controller corresponding to each back-to-source layer has the flow records of the entire CDN cluster.

[0086] S304: Identify repeated back-to-source according to the flow record of the CDN cluster, and record it in a log.

[0087] Based on the flow records of the entire CDN cluster, the back-to-source controller can easily determine which flow has remote back-to-source records in two or more CDN nodes in a circular manner. Such remote back-to-source records can be marked as a repeated back-to-source and recorded in the log for alarm.

[0088] S306: Determine the target CDN node corresponding to the repeated return to the source according to a preset algorithm.

[0089] Specifically, the target CDN node is a CDN node in the CDN cluster selected according to the process selection algorithm to process the return-to-source request corresponding to the repeated return-to-source. Only the remote return-to-source of the flow processed by the target CDN node is the correct return-to-source, otherwise it is an incorrect return-to-source.

[0090] S308: Determine an erroneous back-to-source in the repeated back-to-source according to the target CDN node.

[0091] For more details, see Figure 6 , is a detailed flowchart of the above step S308. It can be understood that the flowchart is not used to limit the order of executing the steps. As needed, some steps in the flowchart can be added or deleted. In this embodiment, the step S308 specifically includes:

[0092] S3080: Obtain multiple remote back-to-source records corresponding to the repeated back-to-source, and a remote back-to-source processing node in the CDN cluster corresponding to each remote back-to-source record.

[0093] Since the repeated return to the source indicates that the flow has remote return to the source records in two or more CDN nodes, multiple remote return to the source records corresponding to the repeated return to the source can be obtained from the flow record. Then, the processing node of the remote return to the source corresponding to each remote return to the source record in the CDN cluster is further obtained. For example, for a flow X, according to the flow record of the CDN cluster, it can be determined that the flow X has a repeated return to the source, and two remote return to the source records corresponding to the repeated return to the source can be obtained, one of which is a remote return to the source A processed by CDN node A in the CDN cluster, and the other remote return to the source B processed by CDN node B in the CDN cluster, then CDN node A and CDN node B are the processing nodes of these two remote return to the source respectively.

[0094] S3082: When the processing node is not the target CDN node, determine that the remote back-to-origin corresponding to the processing node is an erroneous back-to-origin.

[0095] Since the remote back-to-source for the stream in the CDN cluster should be processed by the same CDN node, that is, the target CDN node, when the processing node is the target CDN node, it means that the remote back-to-source corresponding to the processing node is a correct back-to-source; when the processing node is not the target CDN node, it means that the remote back-to-source corresponding to the processing node is an incorrect back-to-source.

[0096] For example, assuming that the remote back-to-source for the stream X should be processed by CDN node A, that is, CDN node A is the target CDN node, then the remote back-to-source A is a correct back-to-source, and the remote back-to-source B is an incorrect back-to-source.

[0097] Back to Figure 5 , S310, switching the error back to the source to the target CDN node for processing.

[0098] For more details, see Figure 7 , is a detailed flowchart of the above step S310. It can be understood that the flowchart is not used to limit the order of executing the steps. Some steps in the flowchart can be added or deleted as needed. In this embodiment, the step S310 specifically includes:

[0099] S3100: A back-to-origin controller in the processing node corresponding to the error back-to-origin initiates a simulated back-to-origin request to the back-to-origin layer of the target CDN node.

[0100] For the correct return to the source, it should remain unchanged. For the error return to the source, after the return to the source controller in the corresponding processing node finds that the remote return to the source should be processed by the target CDN node, it initiates a mock return to the source layer of the target CDN node. The mock return to the source request will also carry preset special parameters, which are used to distinguish the mock return to the source request from the user return to the source request.

[0101] S3102: disconnect the error back to the source in the processing node.

[0102] After initiating the simulated back-to-source request to the back-to-source layer of the target CDN node and successfully starting the back-to-source, the back-to-source controller of the processing node will also actively disconnect the original remote back-to-source, that is, the error back-to-source, thereby solving the duplicate back-to-source problem.

[0103] The live broadcast source return detection method proposed in this embodiment can effectively detect duplicate source returns in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node. In addition, the duplicate source returns can be processed in a timely manner, and the wrong source returns in the duplicate source returns can be switched to the correct CDN node for convergence processing, thereby avoiding waste of resources and reducing source return costs.

[0104] Embodiment 3

[0105] like Figure 8As shown, it is a flowchart of a live broadcast source return detection method proposed in the third embodiment of the present application. In the third embodiment, the live broadcast source return detection method further includes step S412 on the basis of the first embodiment or the second embodiment described above. It can be understood that the flowchart in the embodiment of the method is not used to limit the order of executing the steps. Some steps in the flowchart can also be added or deleted as needed.

[0106] The method comprises the following steps:

[0107] S400: Count all flow records passing through the CDN node in the back-to-origin controller of the current CDN node.

[0108] In this embodiment, the flow record includes the status and return-to-source method of each flow passing through the CDN node, the status includes but is not limited to online, keep-alive, and offline, and the return-to-source method includes but is not limited to process return-to-source, cluster return-to-source, and remote return-to-source.

[0109] S402: Access other CDN nodes in the current CDN cluster through a background thread of the back-to-origin controller, obtain the flow record of each of the other CDN nodes, and obtain the flow record of the entire CDN cluster.

[0110] In this embodiment, each back-to-source controller initiates a background thread, the purpose of which is to access and obtain the flow records of other CDN nodes in the CDN cluster. In this way, the back-to-source controller corresponding to each back-to-source layer has the flow records of the entire CDN cluster.

[0111] S404: Identify repeated back-to-source according to the flow record of the CDN cluster, and record it in a log.

[0112] Based on the flow records of the entire CDN cluster, the back-to-source controller can easily determine which flow has remote back-to-source records in two or more CDN nodes in a circular manner. Such remote back-to-source records can be marked as a repeated back-to-source and recorded in the log for alarm.

[0113] S406: Determine the target CDN node corresponding to the repeated return to the source according to a preset algorithm.

[0114] Specifically, the target CDN node is a CDN node in the CDN cluster selected according to the process selection algorithm to process the return-to-source request corresponding to the repeated return-to-source. Only the remote return-to-source of the flow processed by the target CDN node is the correct return-to-source, otherwise it is an incorrect return-to-source.

[0115] S408: Determine an erroneous back-to-source in the repeated back-to-source according to the target CDN node.

[0116] Specifically, multiple remote back-to-source records corresponding to the repeated back-to-source and a remote back-to-source processing node corresponding to each remote back-to-source record in the CDN cluster are obtained. When the processing node is not the target CDN node, the remote back-to-source corresponding to the processing node is determined to be an incorrect back-to-source.

[0117] S410: Switch the error back to the source and transfer it to the target CDN node for processing.

[0118] Specifically, the back-to-source controller in the processing node corresponding to the error back-to-source initiates a simulated back-to-source request to the back-to-source layer of the target CDN node. The simulated back-to-source request also carries a preset special parameter, which is used to distinguish the simulated back-to-source request from the user back-to-source request. In addition, the error back-to-source is disconnected in the processing node.

[0119] S412: Detect whether the current back-to-source strategy is reasonable according to the repeated back-to-source information recorded in the log, so as to adjust the unreasonable back-to-source strategy.

[0120] After the duplicate back-to-source alarm goes online, it can also detect whether the change of the back-to-source policy is reasonable. In this embodiment, if the number of duplicate back-to-source identified increases greatly within a preset time period after the back-to-source policy is changed, for example, the increase or increase rate reaches a preset threshold, then the back-to-source policy is determined to be unreasonable. Thereby, it can help developers to find problems in time and adjust the back-to-source policy. For example, assuming that after changing to the current version of the back-to-source policy, the number of duplicate back-to-source identified within one day increases by 50%, it means that the current version of the back-to-source policy is unreasonable and needs to be adjusted.

[0121] On the contrary, if within the preset time period after the change to the back-to-source strategy, the number of identified repeated back-to-source decreases, or the number of repeated back-to-source increases slightly, for example, the increase or increase rate does not reach the preset threshold, then it can be determined that the back-to-source strategy is more reasonable. Of course, in a preferred embodiment, the changed back-to-source strategy should reduce the number of identified repeated back-to-sources and reduce the back-to-source cost.

[0122] The live broadcast source return detection method proposed in this embodiment can effectively detect the repeated source return in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node. In addition, the repeated source return can be processed in a timely manner, and the wrong source return in the repeated source return can be switched to the correct CDN node for convergence processing, thereby avoiding waste of resources and reducing the source return cost. In addition, by detecting the repeated source return status after changing the source return strategy, it is possible to timely determine whether the change of the source return strategy is reasonable, timely discover problems and adjust the strategy, and avoid cost losses due to unreasonable strategies.

[0123] Embodiment 4

[0124] like Fig. 9 FIG. 2 is a schematic diagram of the hardware architecture of an electronic device 20 according to the fourth embodiment of the present application. In this embodiment, the electronic device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can be interconnected via a system bus. It should be noted that Fig. 9 Only an electronic device 20 having components 21-23 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead. In this embodiment, the electronic device 20 may be the CDN node.

[0125] The memory 21 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 21 can be an internal storage unit of the electronic device 20, such as a hard disk or memory of the electronic device 20. In other embodiments, the memory 21 can also be an external storage device of the electronic device 20, such as a plug-in hard disk equipped on the electronic device 20, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 21 can also include both the internal storage unit of the electronic device 20 and its external storage device. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed on the electronic device 20, such as the program code of the live broadcast back-source detection system 60, etc. In addition, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.

[0126] In some embodiments, the processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 22 is generally used to control the overall operation of the electronic device 20. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data, such as running the live broadcast source detection system 60.

[0127] The network interface 23 may include a wireless network interface or a wired network interface. The network interface 23 is generally used to establish a communication connection between the electronic device 20 and other electronic devices.

[0128] Embodiment 5

[0129] like Fig.10 As shown, a module diagram of a live broadcast source return detection system 60 is proposed in the fifth embodiment of the present application. The live broadcast source return detection system 60 can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment.

[0130] In this embodiment, the live broadcast source detection system 60 includes:

[0131] The statistics module 600 is used to count all flow records passing through the CDN node in the back-to-origin controller of the current CDN node.

[0132] The acquisition module 602 is used to access other CDN nodes in the current CDN cluster through a background thread of the back-to-origin controller, acquire the flow record of each of the other CDN nodes, and obtain the flow record of the entire CDN cluster.

[0133] The identification module 604 is used to identify repeated back-to-source according to the flow records of the CDN cluster and record them in the log.

[0134] The specific functions of the above modules are described in the first embodiment and will not be repeated here.

[0135] The live broadcast back-to-source detection system proposed in this embodiment can effectively detect duplicate back-to-sources in the CDN cluster and issue an alarm through the flow records counted in the back-to-source controller of each CDN node, so as to handle the duplicate back-to-sources in a timely manner and avoid waste of resources.

[0136] Embodiment 6

[0137] like Fig.11 FIG. 6 is a schematic diagram of a module of a live broadcast source detection system 60 according to the sixth embodiment of the present application. In this embodiment, the live broadcast source detection system 60 includes a processing module 606 in addition to the statistical module 600, the acquisition module 602, and the identification module 604 in the fifth embodiment.

[0138] The processing module 606 is used to determine the target CDN node corresponding to the repeated back-to-source according to a preset algorithm, determine the wrong back-to-source in the repeated back-to-source according to the target CDN node, and switch the wrong back-to-source to the target CDN node for processing.

[0139] The target CDN node is a CDN node in the CDN cluster selected according to the algorithm to process the return-to-source request corresponding to the repeated return-to-source.

[0140] The specific functions of the above modules are described in the second embodiment above and will not be repeated here.

[0141] The live broadcast source return detection system proposed in this embodiment can effectively detect duplicate source returns in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node. In addition, the duplicate source returns can be processed in a timely manner, and the wrong source returns in the duplicate source returns can be switched to the correct CDN node for convergence processing, thereby avoiding waste of resources and reducing source return costs.

[0142] Embodiment 7

[0143] like Fig.12 FIG. 6 is a schematic diagram of a module of a live broadcast source return detection system 60 proposed in the seventh embodiment of the present application. In this embodiment, the live broadcast source return detection system 60 includes a detection module 608 in addition to the statistics module 600, acquisition module 602, identification module 604, and processing module 606 in the sixth embodiment.

[0144] The detection module 608 is used to detect whether the current back-to-source strategy is reasonable according to the repeated back-to-source information recorded in the log, so as to adjust the unreasonable back-to-source strategy.

[0145] The specific functions of the above modules are described in the third embodiment above and will not be described again here.

[0146] The live broadcast source return detection system proposed in this embodiment can effectively detect the repeated source return in the CDN cluster and issue an alarm through the flow records counted in the source return controller of each CDN node. In addition, it can also handle the repeated source return in a timely manner, and switch the wrong source return in the repeated source return to the correct CDN node for convergence processing, thereby avoiding waste of resources and reducing the source return cost. In addition, by detecting the repeated source return status after changing the source return strategy, it is possible to timely determine whether the change of the source return strategy is reasonable, timely discover problems and adjust the strategy, and avoid cost losses due to unreasonable strategies.

[0147] Embodiment 8

[0148] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores a live broadcast source return detection program, and the live broadcast source return detection program can be executed by at least one processor so that the at least one processor performs the steps of the live broadcast source return detection method as described above.

[0149] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, referred to as SMC), a secure digital (Secure Digital, referred to as SD) card, a flash card, etc. equipped on the computer device. Of course, the computer-readable storage medium may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the live broadcast back-source detection method in the embodiment. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.

[0150] Embodiment 9

[0151] The present application also provides a computer program product, which stores a live broadcast source return detection program, and the live broadcast source return detection program can be executed by at least one processor to enable the at least one processor to perform the steps of the live broadcast source return detection method as described above.

[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0153] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0154] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0155] The above are only preferred embodiments of the embodiments of the present application, and are not intended to limit the patent scope of the embodiments of the present application. Any equivalent structure or equivalent process transformation made using the description and drawings of the embodiments of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the embodiments of the present application.

Claims

1. A live broadcast back-to-source detection method, applied to a content distribution network CDN node, characterized in that: The method comprises: Counting all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node; Accessing other CDN nodes in the current CDN cluster through a background thread of the back-to-origin controller, obtaining the flow record of each of the other CDN nodes, and obtaining the flow record of the entire CDN cluster; Duplicate back-to-source traffic is identified based on the flow records of the CDN cluster and recorded in the log.

2. The live broadcast source detection method according to claim 1, characterized in that: After identifying the repeated return to the source, the method further includes: Determine a target CDN node corresponding to the repeated return to the source according to a preset algorithm, wherein the target CDN node is a CDN node in the CDN cluster selected according to the algorithm to process the return to the source request corresponding to the repeated return to the source; Determine an erroneous back-to-source in the repeated back-to-source according to the target CDN node; The error is switched back to the target CDN node for processing.

3. The live broadcast source detection method according to claim 1, characterized in that: The counting of all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node includes: The status and return-to-source mode of each flow passing through the current CDN node are recorded. The status includes online, keep-alive, and offline. The return-to-source mode includes process return-to-source, cluster return-to-source, and remote return-to-source.

4. The live broadcast source detection method according to claim 1 or 3, characterized in that: The identifying repeated back-to-source according to the flow record of the CDN cluster includes: Obtaining a remote back-to-source record of each flow from the flow record of the CDN cluster; If a certain flow has remote back-to-source records in two or more CDN nodes in the CDN cluster, the remote back-to-source records are marked as duplicate back-to-source.

5. The live broadcast source detection method according to claim 2, characterized in that: The determining the wrong return source in the repeated return source according to the target CDN node includes: Acquire multiple remote back-to-source records corresponding to the repeated back-to-source, and a remote back-to-source processing node in the CDN cluster corresponding to each remote back-to-source record; When the processing node is not the target CDN node, it is determined that the remote back-to-origin corresponding to the processing node is an erroneous back-to-origin.

6. The live broadcast source detection method according to claim 2 or 5, characterized in that: The switching the error back to the source to the target CDN node for processing includes: The origin controller in the processing node corresponding to the error origination initiates a simulated origination request to the origination layer of the target CDN node, wherein the simulated origination request carries special parameters to distinguish it from the user origination request; The error is disconnected from the source in the processing node.

7. A live broadcast source detection system, characterized in that: Applied in a content distribution network CDN node, the system includes: A statistics module, used to count all flow records passing through the current CDN node in the back-to-origin controller of the current CDN node; An acquisition module, configured to access other CDN nodes of the current CDN cluster through a background thread of the back-to-origin controller, acquire the flow record of each of the other CDN nodes, and obtain the flow record of the entire CDN cluster; The identification module is used to identify repeated back-to-source according to the flow records of the CDN cluster and record them in the log.

8. An electronic device, characterized in that: The electronic device includes: a memory, a processor, and a live broadcast source return detection program stored in the memory and executable on the processor, wherein the live broadcast source return detection program implements the live broadcast source return detection method according to any one of claims 1 to 6 when executed by the processor.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a live broadcast source return detection program, and when the live broadcast source return detection program is executed by the processor, the live broadcast source return detection method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product stores a live broadcast source return detection program, and when the live broadcast source return detection program is executed by a processor, the live broadcast source return detection method according to any one of claims 1 to 6 is implemented.