Source return processing method and device based on multi-process live broadcast architecture, and computing equipment

By introducing a return-source state machine into the live broadcast architecture, the problem of inefficient return-source processing in the CDN solution is solved, effective management and consistency of the return-source process is achieved, and user experience and service quality are improved.

CN119211364APending Publication Date: 2024-12-27SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411275431.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the existing live broadcast field, CDN solutions have inefficient efficiency in return-source processing, making it difficult to effectively manage return-source processes, resulting in limited service quality and user experience.

Method used

A return-return processing method based on a multi-process live broadcast architecture is designed. The return-return process is managed through the return-return state machine, and the appropriate CDN nodes and processes are selected for return-return to ensure the consistency of return-return.

Benefits of technology

Through the return-source state machine, the return-source path in the CDN cluster is optimized, the return-source consistency and efficiency are improved, and the user experience and service quality are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211364A_ABST
    Figure CN119211364A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a back-to-source processing method and device based on a multi-process live broadcast architecture and computing equipment, and the method comprises the steps: receiving a back-to-source request which is sent by a current process and aims at a target resource, and converting the state of a back-to-source state machine corresponding to the target resource into an initial state according to the back-to-source request; converting the back-to-source state machine from an initial state to a process back-to-source state, and determining a target process for processing the back-to-source request; if the current process is the target process, converting a back-to-source state machine from a process back-to-source state to a cluster back-to-source state, and determining a target CDN node from the CDN cluster; if the current node is the target CDN node, switching a back-to-source state machine from a cluster back-to-source state to a remote back-to-source state; and obtaining a back-to-source address, performing back-to-source according to the back-to-source address, and converting the state of the back-to-source state machine according to a back-to-source result. According to the method and the device, effective management of the back-to-source process is realized through the back-to-source state machine, and the back-to-source consistency is effectively ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and specifically to a method, device and computing equipment for back-to-source processing based on a multi-process live broadcast architecture. Background Art

[0002] In the existing live broadcast field, commonly used CDN solutions are based on Nginx or SRS, etc., and their commonality is that they all use a multi-process model to carry a large number of user and back-to-source requests. Back-to-source consistency is a key factor in CDN and edge computing to ensure service quality, data integrity and user experience. Usually, the downstream CDN will choose to converge back to the source. For the same resource, such as a live stream or a shard request, the CDN will usually choose a process of a CDN node in the cluster to initiate a back-to-source request, so that many user requests can be converged into one path, thereby reducing the back-to-source cost. How to effectively manage the back-to-source process has become an urgent problem to be solved. Summary of the invention

[0003] In view of the above problems, the present invention is proposed to provide a source return processing method, device and computing equipment based on a multi-process live broadcast architecture that overcome the above problems or at least partially solve the above problems.

[0004] According to one aspect of an embodiment of the present application, a method for back-to-source processing based on a multi-process live broadcast architecture is provided, including:

[0005] Receive a back-to-source request for a target resource sent by the current process, and convert the state of the back-to-source state machine corresponding to the target resource to the initial state according to the back-to-source request;

[0006] Convert the back-to-source state machine from the initial state to the process back-to-source state, and determine the target process for processing the back-to-source request;

[0007] If the current process is the target process, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state, and the target CDN node is determined from the CDN cluster;

[0008] If the current node is the target CDN node, the back-to-source state machine is converted from the cluster back-to-source state to the remote back-to-source state;

[0009] Get the back-to-source address, perform back-to-source according to the back-to-source address, and convert the state of the back-to-source state machine according to the back-to-source result.

[0010] Furthermore, converting the state of the back-to-source state machine corresponding to the target resource to the initial state according to the back-to-source request further includes:

[0011] According to the back-to-source request, check whether there is a back-to-source state machine corresponding to the target resource;

[0012] If there is a back-to-source state machine, the state of the back-to-source state machine is converted to the initial state;

[0013] If the back-to-source state machine does not exist, create a back-to-source state machine and initialize it to put it in the initial state.

[0014] Furthermore, the method further comprises:

[0015] If the current process is not the target process, the current process sends a back-to-source request to the target process to determine whether the target process has the target resource for back-to-source;

[0016] If it exists, the target resource obtained by retrieval is fed back to the user end, and the retrieval state machine is converted from the process retrieval state to the stream pulling success state;

[0017] If it does not exist, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state.

[0018] Furthermore, the method further comprises:

[0019] If the current node is not the target CDN node, the current process sends a back-to-source request to the target CDN node, which processes the request and converts the state of the back-to-source state machine based on the processing results.

[0020] Further, the back-to-source address includes a first back-to-source address;

[0021] Obtaining the back-to-source address, performing back-to-source according to the back-to-source address, and converting the state of the back-to-source state machine according to the back-to-source result further includes:

[0022] Obtain the first return source address returned by the preset interface, and perform return to the source according to the first return source address;

[0023] If the return to the source is successful according to the first return to the source address, the return to the source state machine is converted from the remote return to the source state to the stream pulling success state.

[0024] Furthermore, the return-to-source address further includes a second return-to-source address; and the method further includes:

[0025] If tracing back to the source according to the first tracing back to the source address fails and the number of failed retries is less than the preset number, the tracing back to the source state machine is converted from the remote tracing back to the source state to the default tracing back to the source table, and the second tracing back to the source address is obtained from the default tracing back to the source table, and tracing back to the source according to the second tracing back to the source address;

[0026] If the return to the source is successful according to the second return to the source address, the return to the source state machine is converted from the default return to the source state to the stream pulling success state;

[0027] If the return to the source according to the second return to the source address fails, the return to the source state machine is converted from the default return to the source state to the flow pulling failure state.

[0028] According to another aspect of an embodiment of the present application, a back-to-source processing device based on a multi-process live broadcast architecture is provided, including:

[0029] The initial module is adapted to receive a back-to-source request for a target resource sent by the current process, and convert the state of the back-to-source state machine corresponding to the target resource to an initial state according to the back-to-source request;

[0030] A processing module, adapted to convert the back-to-source state machine from an initial state to a process back-to-source state, and determine a target process for processing the back-to-source request; if the current process is the target process, convert the back-to-source state machine from the process back-to-source state to the cluster back-to-source state, and determine a target CDN node from the CDN cluster; if the current node is the target CDN node, convert the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state;

[0031] The result module is suitable for obtaining the return source address, returning to the source according to the return source address, and converting the state of the return source state machine according to the return source result.

[0032] According to another aspect of the embodiment of the present application, there is provided a computing device, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0033] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned back-to-source processing method based on the multi-process live broadcast architecture.

[0034] According to another aspect of the embodiments of the present application, a computer storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned source return processing method based on the multi-process live broadcast architecture.

[0035] According to another aspect of the embodiments of the present application, a computer program product is provided, including at least one executable instruction, which enables a processor to perform operations corresponding to the above-mentioned back-to-source processing method based on the multi-process live broadcast architecture.

[0036] According to the back-to-source processing method, device and computing equipment based on the multi-process live broadcast architecture provided by the embodiment of the present application, a back-to-source state machine is designed by fully analyzing the back-to-source process; after receiving the back-to-source request for the target resource sent by the current process, the state of the back-to-source state machine corresponding to the target resource is converted to the initial state according to the back-to-source request, and then converted to the process back-to-source state, and then converted to the cluster back-to-source state when the current process is the target process; when the current node is the target CDN node, it is converted to the remote back-to-source state, and then the back-to-source result of the back-to-source address is converted to the state of the back-to-source state machine; this scheme realizes effective management of the back-to-source process through the back-to-source state machine, can select the appropriate CDN node and the appropriate process in the CDN cluster to initiate the back-to-source, and effectively ensures the consistency of the back-to-source, and can effectively manage the back-to-source path of each resource.

[0037] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation method of the embodiment of the present application is listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only used for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the embodiments of the present application. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0039] Figure 1 A schematic diagram of a flow chart of a method for back-to-source processing based on a multi-process live broadcast architecture according to an embodiment of the present application is shown;

[0040] Figure 2 A schematic diagram of a flow chart of a method for back-to-source processing based on a multi-process live broadcast architecture according to another embodiment of the present application is shown;

[0041] Figure 3 A schematic diagram of the back-to-source process is shown;

[0042] Figure 4 A schematic diagram of state transition of the back-to-source state machine is shown;

[0043] Figure 5 A schematic diagram of the architecture of a single CDN cluster is shown;

[0044] Figure 6 A structural block diagram of a back-to-source processing device based on a multi-process live broadcast architecture according to an embodiment of the present application is shown;

[0045] Figure 7 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0046] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0047] First, the terms involved in one or more embodiments of the present application are explained.

[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 CDN distribution system is usually a tree-like structure that relies on layering and port multiplexing to improve the load capacity of the entire system. The edge-side 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] Nginx: is a high-performance HTTP and reverse proxy server, which is also widely used as a mail proxy server and load balancer. In the field of streaming media, Nginx is often used as a reverse proxy and load balancer to distribute traffic to multiple backend servers, while providing SSL / TLS encryption, caching, compression and other functions to optimize the transmission efficiency and security of video streams.

[0050] SRS (Simple Realtime Server): is an open source real-time streaming server. Its main function is to provide real-time streaming transmission services and support multiple streaming protocols such as RTMP, HLS, HTTP-FLV, WebRTC, etc. SRS can be used as the middle layer of the streaming server to receive the real-time stream from the encoder and forward it to the player. It also has advanced functions such as recording, transcoding, authentication, and monitoring.

[0051] Back-to-origin: refers to the process by which the client obtains the audio and video information of the requested stream from the CDN.

[0052] Cluster: refers to a collection of many CDN nodes deployed in the same area.

[0053] FLV (Flash Video) protocol: is a streaming media format; because the files it forms are extremely small and load very quickly, it makes it possible to watch video files on the Internet. Its appearance effectively solves the problem that after the video files are imported into Flash, the exported SWF files become huge in size and cannot be used well on the Internet.

[0054] HLSv7 protocol: It is a real-time streaming protocol based on HLS and fmp4. It divides the live stream into small HTTP-based file segments, each of which contains a short length of playable content, and the client only needs to download a part of the segments at a time. The advantage of this protocol is that it uses the standard HTTP protocol to transmit data and realizes adaptive bit rate.

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

[0056] Figure 1 A flow chart of a method for processing a source return based on a multi-process live broadcast architecture according to an embodiment of the present application is shown. Figure 1 As shown, the method comprises the following steps:

[0057] Step S101: receiving a back-to-source request for a target resource sent by the current process, and converting the state of a back-to-source state machine corresponding to the target resource to an initial state according to the back-to-source request.

[0058] The embodiment of the present application designs a return-to-source state machine including multiple states and multiple methods by fully analyzing the return-to-source process. Specifically, the return-to-source process can be divided into multiple sub-processes, including a process return-to-source sub-process, a cluster return-to-source sub-process, a remote return-to-source sub-process, and a default return-to-source table return-to-source sub-process. Corresponding return-to-source states can be set for multiple return-to-source sub-processes. In addition, corresponding states can be set for the start and end of the return-to-source process. Then the state of the return-to-source state machine may include the initial state, the process return-to-source state, the cluster return-to-source state, the remote return-to-source state, the default return-to-source table return-to-source state, the stream pulling success state, and the stream pulling failure state. The embodiment of the present application realizes the effective management and recording of the return-to-source process through the return-to-source state machine.

[0059] When the return-to-source request for the target resource reaches the return-to-source layer of the CDN node, a process is assigned to it for processing. The target resource can be the audio and video data of the live stream, or the audio and video fragment data of the live stream. After the return-to-source request is assigned to the current process, if the current process already has the target resource for return-to-source, the target resource obtained by return-to-source is directly fed back to the user end; if the current process does not have the return-to-source of the target resource, the current process will send a return-to-source request to the return-to-source control component. The return-to-source control component receives the return-to-source request sent by the current process, and converts the state of the return-to-source state machine corresponding to the target resource to the initial state according to the return-to-source request.

[0060] Step S102: convert the back-to-source state machine from the initial state to the process back-to-source state, and determine the target process for processing the back-to-source request.

[0061] After the transition to the initial state, the process back-to-source sub-process is entered, and the state of the back-to-source state machine also needs to change accordingly, converting the back-to-source state machine from the initial state to the process back-to-source state. Then, according to the resource identifier of the target resource, the algorithm is used to calculate it and determine a target process. The target process is the process used to process the back-to-source request.

[0062] Step S103: If the current process is the target process, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state, and a target CDN node is determined from the CDN cluster.

[0063] After determining the target process, determine whether the current process is the target process. If the current process is the target process, it means that the current process is the process used to process the back-to-source request. Then enter the cluster back-to-source sub-process and convert the back-to-source state machine from the process back-to-source state to the cluster back-to-source state. Then, according to the resource identifier of the target resource, it can be calculated through an algorithm to determine a target CDN node from the CDN cluster. The target CDN node is the node used to process the back-to-source request.

[0064] Step S104: If the current node is a target CDN node, the back-to-source state machine is converted from the cluster back-to-source state to the remote back-to-source state.

[0065] After determining the target CDN node, determine whether the current node is the target CDN node. If the current node is the target CDN node, it means that the current node is the node in the CND cluster used to process the back-to-source request. Then enter the remote back-to-source sub-process and convert the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state.

[0066] Step S105, obtaining a back-to-source address, performing back-to-source according to the back-to-source address, and converting the state of the back-to-source state machine according to the back-to-source result.

[0067] Specifically, the return source address may include the first return source address returned by the preset interface, and may also include the second return source address obtained from the default return source table. Return to the source according to the return source address; if the return to the source is successful, the state of the return to the source state machine is converted to the state of successful streaming; if the return to the source fails, the state of the return to the source state machine is converted to the state of failed streaming.

[0068] According to the back-to-source processing method based on the multi-process live broadcast architecture provided by the embodiment of the present application, a back-to-source state machine is designed by fully analyzing the back-to-source process; after receiving the back-to-source request for the target resource sent by the current process, the state of the back-to-source state machine corresponding to the target resource is converted to the initial state according to the back-to-source request, and then converted to the process back-to-source state, and then converted to the cluster back-to-source state when the current process is the target process; when the current node is the target CDN node, it is converted to the remote back-to-source state, and then the back-to-source result of the back-to-source address is converted to the state of the back-to-source state machine; this scheme realizes effective management of the back-to-source process through the back-to-source state machine, can select the appropriate CDN node and the appropriate process in the CDN cluster to initiate back-to-source, and effectively ensures the consistency of back-to-source, and can effectively manage the back-to-source path of each resource.

[0069] Figure 2 A flow chart of a back-to-source processing method based on a multi-process live broadcast architecture according to another embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:

[0070] Step S201, receiving a back-to-source request for a target resource sent by the current process.

[0071] The embodiment of the present application designs a back-to-source state machine including multiple states and multiple methods by fully analyzing the back-to-source process. The back-to-source state machine may specifically be a state machine implemented in the Go language. Figure 3 A schematic diagram of the back-to-source process is shown, Figure 3 As shown in the figure, the back-to-source process can be divided into multiple sub-processes, including the process back-to-source sub-process, the cluster back-to-source sub-process, the remote back-to-source sub-process, and the default back-to-source table back-to-source sub-process. When the user initiates the pull flow, the process back-to-source sub-process is entered; if the process back-to-source is successful, the back-to-source is successful; if the process back-to-source fails, the cluster back-to-source sub-process is entered; if the cluster back-to-source is successful, the back-to-source is successful; if the cluster back-to-source fails, the remote back-to-source sub-process is entered; if the remote back-to-source is successful, the back-to-source is successful; if the remote back-to-source fails, the default back-to-source table back-to-source sub-process is entered; if the default back-to-source table back-to-source is successful, the back-to-source is successful; if the default back-to-source table back-to-source fails, the back-to-source fails.

[0072] Then the state of the back-to-source state machine designed in the embodiment of the present application may include: the back-to-source state corresponding to multiple back-to-source sub-processes, the starting state and the ending state of the back-to-source process, wherein in any back-to-source state, a back-to-source request is initiated to a certain address. Specifically, the state of the back-to-source state machine may include the initial state (which can be expressed as init), the process back-to-source state (which can be expressed as local), the cluster back-to-source state (which can be expressed as cluster), the remote back-to-source state (which can be expressed as remote), the default back-to-source table back-to-source state (which can be expressed as default), the stream pulling success state (which can be expressed as alive) and the stream pulling failure state (which can be expressed as end). Among them, in the initial state, some specific business logic can be added according to the specific business scenario to achieve the adaptation of multiple business scenarios; the process back-to-source state indicates that it is in the process back-to-source sub-process; the cluster back-to-source state indicates that it is in the cluster back-to-source sub-process; the remote back-to-source state indicates that it is in the remote back-to-source sub-process; the default back-to-source table back-to-source state indicates that it is in the default back-to-source table back-to-source sub-process; the stream pulling success state indicates that the stream pulling is successful, that is, the back-to-source is successful; the stream pulling failure state indicates that the stream pulling fails, that is, the back-to-source fails. Multiple methods are also defined in the back-to-source state machine, which may include successful streaming (which can be expressed as alive), failed streaming (which can be expressed as end), the next state to be tried (which can be expressed as next), jumping from the current state (which can be expressed as skip), and the need to reset the back-to-source state machine (which can be expressed as reset). Figure 4 A state transition diagram of the back-to-source state machine is shown.

[0073] In the live broadcast scenario, the back-to-source request can be divided into a long link request (such as a request based on the flv protocol) and a short link request (such as a request based on the hlsv7 protocol). In the embodiment of the present application, for the back-to-source request of the long link, a back-to-source state machine is maintained in the dimension of each live stream; for the back-to-source request of the short link, a back-to-source state machine is maintained in the dimension of each shard of the live stream.

[0074] Figure 5 A schematic diagram of the architecture of a single CDN cluster is shown, Figure 5As shown, in the CDN cluster, the services within the CDN node are divided into different parts to implement different functions, currently mainly including the gateway layer (i.e., gateway), the cache layer, and the back-to-source layer. Among them, the gateway layer is used to carry user traffic and authentication, the cache layer is used to cache the audio and video data of the live stream or the audio and video fragment data of the live stream that is back-sourced, and the back-to-source layer is used to initiate a back-to-source request to other upper-layer clusters. Specifically, the embodiment of the present application may use a back-to-source state machine in the back-to-source control component. Among them, the back-to-source control component is mainly used to coordinate the data interaction between the CDN node and the source station. In the CDN architecture, when the required data is not available on the CDN node or the data has expired, it is necessary to initiate a back-to-source request to the source station to obtain the latest data. The back-to-source control component can play a management role in this process to ensure the consistency, efficiency, and security of the data.

[0075] like Figure 5 As shown, it is assumed that the CDN cluster contains 2 CDN nodes, namely CDN node 1 (i.e., cdn1) and CDN node 2 (i.e., cdn2), and the back-to-source layer of each CDN node contains 4 processes. If at this time a user terminal initiates a back-to-source request for the target resource based on the flv protocol to the gateway layer 2 in CDN node 2. After the back-to-source request reaches the back-to-source layer 2, it is assumed that the back-to-source request is assigned to process 1 of the back-to-source layer 2, that is, the current process is process 1. If process 1 already has the target resource for back-to-source, the target resource obtained by back-to-source will be directly fed back to the user terminal; if process 1 does not have the back-to-source of the target resource, the current process will initiate a back-to-source request to the back-to-source control component 2. The back-to-source control component 2 receives the back-to-source request sent by process 1.

[0076] Step S202: According to the back-to-source request, it is checked whether there is a back-to-source state machine corresponding to the target resource; if so, step S203 is executed; if not, step S204 is executed.

[0077] After the back-to-source control component 2 receives the back-to-source request sent by the process 1, it can query whether there is a back-to-source state machine corresponding to the target resource according to the back-to-source request.

[0078] Step S203: convert the state of the back-to-source state machine to the initial state.

[0079] If there is a back-to-source state machine corresponding to the target resource, the back-to-source state machine is reset to the failed state of pulling the stream, and then the next state to be tried is triggered to the initial state.

[0080] Step S204: Create a back-to-source state machine and initialize it to put it in an initial state.

[0081] If there is no back-to-source state machine corresponding to the target resource, a back-to-source state machine is created and initialized. At this time, its state is in the initial state.

[0082] Step S205 , converting the back-to-source state machine from the initial state to the process back-to-source state, and determining a target process for processing the back-to-source request.

[0083] After the transition to the initial state, the process back-to-source sub-process is entered, and the state of the back-to-source state machine also needs to change accordingly, and the back-to-source state machine is transitioned from the initial state to the process back-to-source state. The back-to-source control component 2 can calculate the target resource based on the resource identifier (such as the live stream name, etc.) through, for example, a consistent hashing algorithm, thereby determining a target process, which is the process used to process the back-to-source request.

[0084] Step S206, determine whether the current process is the target process; if so, execute step S207; if not, execute step S210.

[0085] The current process may be the target process or may not be the target process, and this needs to be judged so that the corresponding processing process can be executed according to whether it is the target process.

[0086] Step S207: convert the back-to-source state machine from the process back-to-source state to the cluster back-to-source state, and determine the target CDN node from the CDN cluster.

[0087] If the current process is the target process, it means that the target resource should be returned to the source by the current process (i.e., process 1), then the cluster return-to-source sub-process is entered, and the return-to-source state machine is skipped from the process return-to-source state to the cluster return-to-source state. The return-to-source control component 2 can calculate the target resource based on its resource identifier (such as the live stream name, etc.) through, for example, a consistent hashing algorithm, thereby determining a target CDN node from the CDN cluster. The target CDN node is the node used to process the return-to-source request.

[0088] Step S208, determine whether the current node is a target CDN node; if so, execute step S209; if not, execute step S211.

[0089] The current node may be a target CDN node or may not be a target CDN node, and this needs to be judged so as to execute a corresponding processing process according to whether it is a target CDN node.

[0090] Step S209: convert the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state.

[0091] If the current node is the target CDN node, it means that the target resource should be returned to the source layer (i.e., source layer 2) in the current node, and then the remote source return sub-process is entered to jump (skip) the source return state machine from the cluster source return state to the remote source return state.

[0092] Step S210: The current process sends a return-to-source request to the target process, so that the target process processes the return-to-source request.

[0093] If the current process is not the target process, it means that the target resource should be returned to the source by other processes, and the current process sends a return request to the target process. After the target process receives the return request, it determines whether the target process has the target resource for return; if so, the target resource obtained by return is fed back to the user end, and the return state machine is converted from the process return state to the stream pulling success state; if not, the return state machine is converted from the process return state to the cluster return state.

[0094] Assuming that the current process is process 1 and the target process is process 2, and the current process is not the target process, the back-to-source control component 2 can return information such as the IP and port of process 2 to process 1, and process 1 initiates a back-to-source request to process 2. After receiving the back-to-source request, if process 2 already has the target resource for back-to-source, it directly feeds back the target resource obtained from the back-to-source to the user end, and requests the back-to-source control component 2, and the back-to-source state machine in the back-to-source control component 2 jumps to the successful state of pulling the stream; if process 2 does not have the back-to-source of the target resource, it continues to initiate a back-to-source request to the back-to-source control component 2. Since the process back-to-source sub-process has been carried out once, the back-to-source state machine can jump (skip) to the cluster back-to-source state.

[0095] In step S211, the current process sends a back-to-source request to the target CDN node for processing by the target CDN node, and converts the state of the back-to-source state machine according to the processing situation.

[0096] If the current node is not the target CDN node, it means that the target resource should be back-sourced by other CDN nodes in the CDN cluster. The current process sends a back-source request to the target CDN node, which processes it and converts the state of the back-source state machine based on the processing results.

[0097] Assuming that the current node is CDN node 2, the current process is process 1, the target CDN node is CDN node 1, and the current node is not the target CDN node, then the back-to-source control component 2 in CDN node 2 returns the IP and port information of the back-to-source layer 1 in CDN node 1 to the requesting process, and the requesting process initiates a back-to-source request to the back-to-source layer 1. After a process in the back-to-source layer 1 receives the back-to-source request, if the process already has the target resource for back-to-source, the target resource obtained by back-to-source is directly returned to the back-to-source layer 2, and the back-to-source layer 2 requests the back-to-source control component 2, and the back-to-source state machine in the back-to-source control component 2 jumps to the successful stream pulling state; if the process does not have the back-to-source of the target resource, then the back-to-source layer 1 initiates a request to the back-to-source control component 1 to inquire where to go back to the source, that is, initiates a request to obtain the back-to-source address.

[0098] Step S212, obtaining a back-to-source address, performing back-to-source according to the back-to-source address, and converting the state of the back-to-source state machine according to the back-to-source result.

[0099] Among them, the return-to-source address may include the first return-to-source address returned by the preset interface. In step S212, the first return-to-source address returned by the preset interface is obtained, and the return-to-source is performed according to the first return-to-source address; if the return-to-source is successful according to the first return-to-source address, the return-to-source state machine is converted from the remote return-to-source state to the successful state of pulling the stream. The return-to-source address may also include a second return-to-source address obtained by querying from the default return-to-source table. If the return-to-source fails according to the first return-to-source address and the number of retries is less than the preset number, the return-to-source state machine is converted from the remote return-to-source state to the default return-to-source table return-to-source state, and the second return-to-source address is obtained from the default return-to-source table, and the return-to-source is performed according to the second return-to-source address; if the return-to-source is successful according to the second return-to-source address, the return-to-source state machine is converted from the default return-to-source table return-to-source state to the successful state of pulling the stream; if the return-to-source fails according to the second return-to-source address, the return-to-source state machine is converted from the default return-to-source table return-to-source state to the failed state of pulling the stream.

[0100] Assuming that the target resource needs to initiate a return to the source layer 1, and the return request is assigned to process 1 in the return layer 1, then process 1 needs to go through the steps described above from the initial state to the process return sub-process, and then to the cluster return sub-process again, and the return state machine corresponding to the target resource in the return control component 1 jumps to the remote return state. The return control component 1 can ask the preset interface where to return to the source next. Assuming that the preset interface returns two first return addresses, address a and address b, and returns the first return address to the return layer 1.

[0101] Then the back-to-source layer 1 will initiate back-to-source to address a and address b in turn. If the back-to-source is successful according to any of the addresses a and b, then a request is initiated to the back-to-source control component 1, and the back-to-source state machine corresponding to the target resource in the back-to-source control component 1 is converted from the remote back-to-source state to the successful stream pulling state. If both address a and address b fail, the back-to-source will continue to be retried. When the number of retries is less than the preset number (for example, the upper limit of the number of retries that can be made), the back-to-source layer 1 continues to request the back-to-source control component 1 and enters the default back-to-source table back-to-source sub-process. The back-to-source state machine in the back-to-source control component 1 jumps to the default back-to-source table back-to-source state. The back-to-source control component 1 queries the default back-to-source table to obtain the second back-to-source address and returns the second back-to-source address to the back-to-source layer 1, and the back-to-source layer 1 initiates the back-to-source. If the return to the source is successful according to the second return to the source address, the return to the source state machine is converted from the default return to the source state to the successful state of pulling the stream; if the return to the source also fails according to the second return to the source address, it means that all return to the source addresses have been tried but no request has been successful, then the return to the source state machine is converted from the default return to the source state to the failed state of pulling the stream.

[0102] According to the back-to-source processing method based on the multi-process live broadcast architecture provided by the embodiment of the present application, by fully analyzing the multiple sub-processes divided in the back-to-source process and the flow process of the sub-processes, the state of the designed back-to-source state machine may include the initial state, the process back-to-source state, the cluster back-to-source state, the remote back-to-source state, the default back-to-source table back-to-source state, the stream pulling success state and the stream pulling failure state; after receiving the back-to-source request for the target resource sent by the current process, according to the query result of the back-to-source state machine corresponding to the target resource, the state of the back-to-source state machine is converted to the initial state, and then converted to the process back-to-source state, and the execution is performed according to whether the current process is the target process and whether the current node is the target CDN node. The corresponding processing process is carried out, and the state of the back-to-source state machine is converted to the corresponding state according to the processing situation until the final back-to-source result is obtained. If the final back-to-source is successful, the state of the back-to-source state machine is converted to the state of successful streaming; if the final back-to-source fails, the state of the back-to-source state machine is converted to the state of failed streaming. This solution can use different dimensions to maintain the back-to-source state machine for back-to-source requests for long links and back-to-source requests for short links. The back-to-source state machine realizes effective management of the back-to-source process and back-to-source path of each resource, and can select the appropriate CDN node and the appropriate process in the CDN cluster to initiate back-to-source, effectively ensuring the consistency of back-to-source and optimizing the back-to-source processing method based on the multi-process live broadcast architecture.

[0103] Figure 6 FIG. 1 shows a structural block diagram of a source return processing device based on a multi-process live broadcast architecture according to an embodiment of the present application. Figure 6 As shown, the device includes: an initial module 610 , a processing module 620 and a result module 630 .

[0104] The initial module 610 is adapted to: receive a back-to-source request for a target resource sent by the current process, and convert the state of a back-to-source state machine corresponding to the target resource to an initial state according to the back-to-source request.

[0105] The processing module 620 is suitable for: converting the back-to-source state machine from the initial state to the process back-to-source state, and determining the target process for processing the back-to-source request; if the current process is the target process, converting the back-to-source state machine from the process back-to-source state to the cluster back-to-source state, and determining the target CDN node from the CDN cluster; if the current node is the target CDN node, converting the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state.

[0106] The result module 630 is adapted to: obtain a back-to-source address, perform back-to-source operation according to the back-to-source address, and convert the state of the back-to-source state machine according to the back-to-source result.

[0107] Optionally, the initial module 610 is further adapted to: query whether there is a back-to-source state machine corresponding to the target resource according to the back-to-source request; if there is a back-to-source state machine, convert the state of the back-to-source state machine to the initial state; if there is no back-to-source state machine, create a back-to-source state machine and initialize it so that its state is in the initial state.

[0108] Optionally, the processing module 620 is further adapted to: if the current process is not the target process, the current process sends a back-to-source request to the target process to determine whether the target process has target resources for back-to-source; if so, the target resources obtained by back-to-source are fed back to the user end, and the back-to-source state machine is converted from the process back-to-source state to the successful stream pulling state; if not, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state.

[0109] Optionally, the processing module 620 is further adapted to: if the current node is not the target CDN node, the current process sends a back-to-source request to the target CDN node, the target CDN node processes the request, and converts the state of the back-to-source state machine according to the processing result.

[0110] Optionally, the return source address includes a first return source address. The result module 630 is further adapted to: obtain the first return source address returned by the preset interface, perform return source according to the first return source address; if return source according to the first return source address is successful, convert the return source state machine from the remote return source state to the stream pulling success state.

[0111] Optionally, the return-to-source address also includes a second return-to-source address. The result module 630 is further adapted to: if the return-to-source according to the first return-to-source address fails and the number of retries is less than a preset number, the return-to-source state machine is converted from the remote return-to-source state to the default return-to-source table return-to-source state, and the second return-to-source address is obtained from the default return-to-source table, and the return-to-source is performed according to the second return-to-source address; if the return-to-source according to the second return-to-source address is successful, the return-to-source state machine is converted from the default return-to-source table return-to-source state to the stream pulling success state; if the return-to-source according to the second return-to-source address fails, the return-to-source state machine is converted from the default return-to-source table return-to-source state to the stream pulling failure state.

[0112] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.

[0113] According to the back-to-source processing device based on the multi-process live broadcast architecture provided by the embodiment of the present application, by fully analyzing the multiple sub-processes divided in the back-to-source process and the flow process of the sub-processes, the state of the designed back-to-source state machine may include the initial state, the process back-to-source state, the cluster back-to-source state, the remote back-to-source state, the default back-to-source table back-to-source state, the stream pulling success state and the stream pulling failure state; after receiving the back-to-source request for the target resource sent by the current process, according to the query result of the back-to-source state machine corresponding to the target resource, the state of the back-to-source state machine is converted to the initial state, and then converted to the process back-to-source state, and the execution is performed according to whether the current process is the target process and whether the current node is the target CDN node. The corresponding processing process is carried out, and the state of the back-to-source state machine is converted to the corresponding state according to the processing situation until the final back-to-source result is obtained. If the final back-to-source is successful, the state of the back-to-source state machine is converted to the state of successful streaming; if the final back-to-source fails, the state of the back-to-source state machine is converted to the state of failed streaming. This solution can use different dimensions to maintain the back-to-source state machine for back-to-source requests for long links and back-to-source requests for short links. The back-to-source state machine realizes effective management of the back-to-source process and back-to-source path of each resource, and can select the appropriate CDN node and the appropriate process in the CDN cluster to initiate back-to-source, effectively ensuring the consistency of back-to-source and optimizing the back-to-source processing method based on the multi-process live broadcast architecture.

[0114] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction or computer program, which enables a processor to perform operations corresponding to the source return processing method based on a multi-process live broadcast architecture in any of the above method embodiments.

[0115] An embodiment of the present application provides a computer program product, which includes at least one executable instruction or computer program, which enables a processor to perform operations corresponding to the source return processing method based on a multi-process live broadcast architecture in any of the above-mentioned method embodiments.

[0116] Figure 7 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.

[0117] like Figure 7 As shown, the computing device may include: a processor (processor) 702 , a communications interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0118] The processor 702, the communication interface 704, and the memory 706 communicate with each other via the communication bus 708. The communication interface 704 is used to communicate with other devices such as a client or other server network elements. The processor 702 is used to execute the program 710, which can specifically execute the relevant steps in the embodiment of the back-to-source processing method based on the multi-process live broadcast architecture for the computing device.

[0119] Specifically, the program 710 may include program codes, which include computer operation instructions.

[0120] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0121] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0122] Program 710 can be specifically used to enable processor 702 to execute the source return processing method based on the multi-process live broadcast architecture in any of the above-mentioned method embodiments. The specific implementation of each step in program 710 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned source return processing embodiment based on the multi-process live broadcast architecture, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0123] The algorithm and display provided herein are not inherently related to any specific computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present application embodiment described herein, and the above description of specific languages ​​is to disclose the best mode of implementation of the present application embodiment.

[0124] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0125] Similarly, it should be understood that in order to streamline the present disclosure and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed embodiments of the present application require more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the embodiment of the present application.

[0126] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0127] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the embodiments of the present application and to form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0128] The various component embodiments of the embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to the embodiments of the present application. The embodiments of the present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the embodiments of the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0129] It should be noted that the above embodiments illustrate rather than limit the embodiments of the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The embodiments of the present application may be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

Claims

1. A back-to-source processing method based on a multi-process live broadcast architecture, comprising: Receive a back-to-source request for a target resource sent by the current process, and convert the state of a back-to-source state machine corresponding to the target resource to an initial state according to the back-to-source request; Converting the back-to-source state machine from the initial state to the process back-to-source state, and determining a target process for processing the back-to-source request; If the current process is the target process, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state, and a target CDN node is determined from the CDN cluster; If the current node is the target CDN node, converting the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state; A back-to-source address is obtained, back-to-source is performed according to the back-to-source address, and the state of the back-to-source state machine is converted according to the back-to-source result.

2. According to the method of claim 1, converting the state of the back-to-source state machine corresponding to the target resource to the initial state according to the back-to-source request further comprises: According to the back-to-source request, query whether there is a back-to-source state machine corresponding to the target resource; If the back-to-source state machine exists, converting the state of the back-to-source state machine to an initial state; If the back-to-source state machine does not exist, a back-to-source state machine is created and initialized to be in an initial state.

3. The method according to claim 1, further comprising: If the current process is not the target process, the current process sends a return request to the target process to determine whether the target process has the target resource for return; If so, the target resource obtained by returning to the source is fed back to the user end, and the return-to-source state machine is converted from the process return-to-source state to the stream pulling success state; If not, the back-to-source state machine is converted from the process back-to-source state to the cluster back-to-source state.

4. The method according to claim 1, further comprising: If the current node is not the target CDN node, the current process sends a back-to-source request to the target CDN node, which processes the request and converts the state of the back-to-source state machine according to the processing result.

5. The method according to any one of claims 1 to 4, wherein the return-to-source address comprises a first return-to-source address; The obtaining of the back-to-source address, performing back-to-source operation according to the back-to-source address, and converting the state of the back-to-source state machine according to the back-to-source result further includes: Obtain a first return-to-source address returned by a preset interface, and perform return-to-source according to the first return-to-source address; If the return to the source according to the first return to the source address is successful, the return to the source state machine is converted from the remote return to the source state to the stream pulling success state.

6. The method according to claim 5, wherein the return-to-source address further comprises a second return-to-source address; the method further comprises: If tracing back to the source according to the first tracing back to the source address fails and the number of retries is less than the preset number, the tracing back to the source state machine is converted from the remote tracing back to the source state to the default tracing back to the source table state, and a second tracing back to the source address is obtained from the default tracing back to the source table, and tracing back to the source according to the second tracing back to the source address; If the return to the source according to the second return to the source address is successful, the return to the source state machine is converted from the return to the source state of the default return to the source table to the flow pulling success state; If the return to the source according to the second return to the source address fails, the return to the source state machine is converted from the return to the source state of the default return to the source table to the flow pulling failure state.

7. A back-to-source processing device based on a multi-process live broadcast architecture, comprising: An initial module, adapted to receive a back-to-source request for a target resource sent by a current process, and convert the state of a back-to-source state machine corresponding to the target resource to an initial state according to the back-to-source request; a processing module, adapted to convert the back-to-source state machine from the initial state to the process back-to-source state, and determine a target process for processing the back-to-source request; if the current process is the target process, convert the back-to-source state machine from the process back-to-source state to the cluster back-to-source state, and determine a target CDN node from the CDN cluster; If the current node is the target CDN node, converting the back-to-source state machine from the cluster back-to-source state to the remote back-to-source state; The result module is adapted to obtain a back-to-source address, perform back-to-source operation according to the back-to-source address, and convert the state of the back-to-source state machine according to the back-to-source result.

8. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the source return processing method based on the multi-process live broadcast architecture as described in any one of claims 1-6.

9. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the source return processing method based on a multi-process live broadcast architecture as described in any one of claims 1-6.

10. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the source return processing method based on a multi-process live broadcast architecture as described in any one of claims 1-6.

Citation Information

Cited By

  • Self-adaptive streaming media transmission system and method

    CN120390098A