Method, apparatus, device, storage medium and program product for providing a live stream

CN122554655APending Publication Date: 2026-08-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-08-11

AI Technical Summary

Benefits of technology

[0011]本公开实施例提供的提供直播流的方法、装置、电子设备、计算机可读存储介质及计算机程序产品,首先,响应于接收到目标设备针对目标直播流的获取请求,读取目标直播流的热度参考值;然后,响应于热度参考值小于或者等于第一参考值阈值,从本地的候选处理实例中确定目标处理实例;最后,利用目标处理实例拉取目标直播流,并将目标直播流提供至目标设备。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554655A_ABST
    Figure CN122554655A_ABST
Patent Text Reader

Abstract

This disclosure provides methods, apparatus, devices, storage media, and program products for providing live streams, relating to artificial intelligence fields such as streaming media transmission, content delivery networks, and intelligent scheduling. One specific implementation of the method includes: in response to receiving a request from a target device to acquire a target live stream, reading a popularity reference value of the target live stream; in response to the popularity reference value being less than or equal to a first reference value threshold, determining a target processing instance from local candidate processing instances; using the target processing instance to pull the target live stream, and providing the target live stream to the target device. This approach implements a differentiated instance allocation strategy based on the popularity of the live stream, enabling shorter and more efficient allocation paths for low-popularity live streams. Therefore, while ensuring load balancing, it can reduce resource overhead and improve allocation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to artificial intelligence fields such as streaming media transmission, content delivery networks, and intelligent scheduling, and particularly to methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for providing live streams. Background Technology

[0002] In the field of streaming media technology, a Content Delivery Network (CDN) is typically used to build a service architecture to improve content delivery efficiency. CDNs can cache content at widely distributed edge nodes, enabling users to access the data they need from the nearest node. This effectively reduces transmission latency, improves bandwidth utilization, and ultimately significantly optimizes the overall distribution efficiency and user experience of streaming media.

[0003] For example, in the specific scenario of live streaming service, users can send a live stream fetch request to the edge node of the CDN (CDN node for short) through their client. When the edge node receives this request, it forwards it to a processing instance on a physical or virtual server deployed internally. This processing instance is responsible for fetching the raw stream data from the live stream data source, and after processing such as local transcoding, encapsulation, or protocol conversion, it distributes the processed live stream data to the user's client, thus completing the process of providing the live streaming media.

[0004] Therefore, under this technological background, how to schedule and allocate instances more efficiently and with higher quality is a matter of concern and urgent need. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for providing live streams.

[0006] In a first aspect, embodiments of this disclosure propose a method for providing a live stream, comprising: in response to receiving a request from a target device for obtaining a target live stream, reading a popularity reference value of the target live stream; in response to the popularity reference value being less than or equal to a first reference value threshold, determining a target processing instance from local candidate processing instances; using the target processing instance to retrieve the target live stream, and providing the target live stream to the target device.

[0007] Secondly, embodiments of this disclosure propose an apparatus for providing a live stream, comprising: a popularity reference value reading unit configured to read a popularity reference value of the target live stream in response to receiving a request from a target device for acquiring the target live stream; a first instance determination unit configured to determine a target processing instance from local candidate processing instances in response to the popularity reference value being less than or equal to a first reference value threshold; and a first instance utilization unit configured to utilize the target processing instance to retrieve the target live stream and provide the target live stream to the target device.

[0008] Thirdly, embodiments of this disclosure provide an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the method of providing a live stream as described in any implementation of the first aspect.

[0009] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions that enable a computer, when executed, to implement a method for providing a live stream as described in any implementation of the first aspect.

[0010] Fifthly, embodiments of this disclosure provide a computer program product including a computer program that, when executed by a processor, enables the provision of a live stream as described in any implementation of the first aspect.

[0011] The method, apparatus, electronic device, computer-readable storage medium, and computer program product for providing a live stream provided in this disclosure firstly reads a popularity reference value of the target live stream in response to receiving a request from a target device for obtaining a target live stream; then, in response to the popularity reference value being less than or equal to a first reference value threshold, a target processing instance is determined from local candidate processing instances; finally, the target processing instance is used to retrieve the target live stream and provides the target live stream to the target device.

[0012] This disclosure implements a differentiated instance allocation strategy based on the popularity of live streams, enabling shorter and more efficient allocation paths for low-popularity live streams. This reduces resource overhead and improves allocation efficiency while ensuring load balancing.

[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0014] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is an exemplary system architecture to which this disclosure can be applied; Figure 2 A flowchart illustrating a process for providing a live stream, as provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating another process for providing a live stream, as provided in this embodiment of the disclosure; Figure 4 A flowchart illustrating the process of providing a live stream in a specific application scenario, as provided in this embodiment of the disclosure; Figure 5 A structural block diagram of an apparatus for providing a live stream, provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device suitable for performing a method of providing a live stream, provided as an embodiment of the present disclosure. Detailed Implementation

[0015] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding; these should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0016] Furthermore, in the technical solutions disclosed herein, if information involving user personal information (e.g., live streams provided by individual users) is involved, the acquisition, storage, use, processing, transportation, provision, and disclosure of such information shall comply with relevant laws and regulations and shall not violate public order and good morals.

[0017] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the methods, apparatuses, electronic devices, and computer-readable storage media for providing live streams can be applied.

[0018] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a CDN node 110. The CDN node 110 may consist of servers 105, 106, and 107. Accordingly, each of servers 105, 106, and 107 may include one or more "processing instances" to complete the process of pulling and providing the live stream. For example, server 105 may include processing instances 121, 122...12N, where N is a positive integer.

[0019] Network 104 serves as a medium for providing communication links between terminal devices 101, 102, and 103 and CDN node 110, as well as between servers 105, 106, and 107 within CDN node 110. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0020] Users can use terminal devices 101, 102, and 103 to interact with CDN node 110 via network 104 (or more specifically, terminal devices 101, 102, and 103 can interact with servers 105, 106, and 107 within CDN node 110) to receive or send messages, etc. Various applications for communication between the terminal devices 101, 102, and 103 and CDN node 110 can be installed. These applications include online live streaming applications, cloud storage applications, and instant messaging applications.

[0021] Terminal devices 101, 102, and 103, and servers 105, 106, and 107 can all be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices, and can be implemented as multiple software programs or software modules, or as a single software program or software module; no specific limitation is made here. When servers 105, 106, and 107 are hardware, they can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When servers are software, they can be implemented as multiple software programs or software modules, or as a single software program or software module; no specific limitation is made here.

[0022] CDN node 110 can provide various services through its built-in applications. Taking an online live streaming application that can provide online streaming media services and live streams as an example, CDN node 110 can achieve the following effects when running this online live streaming application: First, if CDN node 110 receives a request for obtaining a target live stream from terminal devices 101, 102, and 103 through network 104, it can respond by reading the popularity reference value of the target live stream; then, if the popularity reference value is less than or equal to a first reference value threshold, CDN node 110 determines the target processing instance from its local candidate processing instances; finally, CDN node 110 uses the target processing instance to pull the target live stream and provides the target live stream to the target device.

[0023] It should be understood that when CDN node 110 acts as the "executor" of the method for providing live streams, the device providing the live stream is generally also located in server 105. However, it should also be noted that in some scenarios, if terminal devices 101, 102, and 103 also possess sufficient computing power and resources and are deployed in a manner similar to CDN nodes, terminal devices 101, 102, and 103 can also perform the aforementioned calculations that were originally assigned to server 105 through the online live streaming applications installed on them, thereby outputting the same results as server 105. Especially when multiple terminal devices with different computing capabilities exist simultaneously, but the online live streaming application determines that the terminal device it is using has strong computing power and sufficient remaining computing resources, it can allow the terminal device to perform the aforementioned calculations, thereby appropriately reducing the computing pressure on server 105. Accordingly, the device providing the live stream may also be located in terminal devices 101, 102, and 103.

[0024] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0025] Please refer to Figure 2 , Figure 2 A flowchart of a process for providing a live stream, provided for an embodiment of this disclosure, includes process 200.

[0026] Process 200 specifically includes the following steps: Step 201: In response to receiving a request from the target device to acquire the target live stream, read the popularity reference value of the target live stream; In embodiments of this disclosure, this step is intended to be performed by the entity executing the method of providing the live stream (e.g., Figure 1The CDN node 110 shown, in some scenarios, can also be specifically referred to as the scheduling server, scheduling unit, etc. within the CDN node 110, upon receiving a request from the target device (e.g., Figure 1 The terminal devices 101, 102, and 103 shown in the diagram respond to the request to obtain the target live stream and read the popularity reference value of the target live stream.

[0027] For example, a user can use user terminal devices 101, 102, 103 (or a client deployed or installed on them) to indicate the target live stream they wish to obtain or receive by providing, for example, domain name information or Internet Protocol (IP) address.

[0028] The heat reference value can be pre-calculated, determined, and generated by the executing entity or a third-party device outside the executing entity.

[0029] Taking the executing entity as an example, it can determine the popularity reference value of the live stream based on at least one of the following indicators: the frequency of user requests for the live stream, the concurrency scale of the live stream, the bandwidth scale, the growth trend, and the basic domain name level over a period of time.

[0030] For example, the implementing entity can provide these metrics to the corresponding evaluation model, which can then use this model to determine the live stream's score for each dimension based on its specific performance in the dimensions that need to be monitored and referenced (i.e., the metric values, the range of values ​​the metric fall into, etc.). Then, through weighted summation and other methods, the scores are aggregated into a corresponding popularity reference value.

[0031] For example, taking request frequency as an example, if the executing entity refers to request frequency alone, the specific value of request frequency can be used as the reference value for popularity.

[0032] In some embodiments, the popularity reference value can be bound to the aforementioned "time period" window. For example, the executing entity can periodically acquire the indicator and determine the popularity reference value within that period in order to dynamically acquire the popularity reference value and ensure its timeliness.

[0033] It should be noted that if the popularity reference information is generated and maintained locally by the executing entity, then the executing entity can directly obtain the popularity reference information from the local storage device. However, in different scenarios, if the popularity reference information is generated and maintained by a device other than the executing entity, then the executing entity can also obtain it from these non-local storage devices (e.g., Figure 1The information can be obtained from the terminal devices 101, 102, and 103 shown. The local storage device can be a data storage module located within the execution entity, such as a server hard drive. In this case, the heat reference information can be quickly read locally. The non-local storage device can also be any other electronic device configured to store data, such as user terminals. In this case, the execution entity can obtain the required heat reference information by sending an acquisition command to the electronic device.

[0034] As discussed above, in order to enable the implementing entity to differentiate and adjust the instance determination strategy based on "popularity", the live stream can be divided into three standards: cold stream, warm stream, and hot stream, according to the corresponding popularity and popularity reference value from low to high.

[0035] Accordingly, after determining the standards, a first reference threshold and a second reference threshold can be determined and preset to quantify these three cases. For example, based on the standard for cold flow, a first reference threshold can be determined, and live streams with corresponding heat reference values ​​less than or equal to this first reference threshold can be identified and classified as "cold flow." Similarly, a second reference threshold with a corresponding value greater than the first reference threshold can be determined and preset to classify warm flow and hot flow cases.

[0036] For example, if the popularity reference value of a live stream is greater than a first reference threshold and less than or equal to a second reference threshold, then the live stream can be identified as a "warm" stream. Similarly, if the popularity reference value of a live stream is greater than a second reference threshold, then the live stream can be identified as a "hot" stream.

[0037] Next, in this step, the executing entity can determine, based on the specific circumstances of the heat reference value, whether the target live stream corresponds to a cold stream, a warm stream, or a hot stream. If the heat reference value corresponding to the target live stream is less than or equal to the first reference value threshold, i.e., the target live stream is a "cold stream," the executing entity can respond by selecting to execute step 202.

[0038] Step 202: Determine the target processing instance from the local candidate processing instances; In embodiments of this disclosure, based on step 201, if the target live stream is a "cold stream," the executing entity can directly allocate a target processing instance to the target live stream from the perspective of "processing instances." For example, the executing entity can read all available processing instances provided by its locally deployed processing devices (e.g., physical servers or virtualized servers deployed within the CDN node that form the CDN node) as candidate processing instances and determine the target processing instance from them.

[0039] For example, the executing entity selects the candidate processing instance with the lowest current load among the candidate processing instances as the target processing instance.

[0040] In other words, for "cold flows," the executing entity can directly and globally select processing instances based on the status of the processing instances themselves, without first considering the load and usage of processing devices (such as the physical servers mentioned above). This reduces resource consumption during allocation and improves allocation efficiency by saving the selection process for processing devices.

[0041] In some embodiments, to achieve load balancing among processing instances, during this global selection of processing instances, the execution entity can choose to determine the target processing instance from local candidate processing instances using consistent hashing. For example, the execution entity can construct a hash ring based on candidate processing devices and determine the candidate processing instance that should be used as the target processing instance from the hash ring using hashing. Thus, by using hashing, the candidate processing instances can be evenly distributed and scheduled, ensuring load balancing among the target processing instances in the system.

[0042] In some implementations, to ensure the quality of candidate processing instances and prevent faulty or insufficiently capable instances from being selected and affecting allocation quality, the execution entity can first read the local processing instance's operational metrics. These metrics may include at least one of the following: system resource status (e.g., CPU utilization, memory utilization, storage utilization), service status (e.g., availability, live stream retrieval capability, decoding capability), application layer health status (e.g., availability of the associated application implementing the functionality, sufficient available threads), and continuity performance (e.g., whether the processing instance has been able to continuously respond to requests over a period of time).

[0043] Then, the executing entity can determine the aforementioned candidate processing instances from the processing instances based on operational metrics.

[0044] In practice, the implementing entity can determine the corresponding scores for these operational indicators by using their specific values, similar to how the heat reference values ​​were determined above. Then, these scores can be used directly or weighted to determine their corresponding health scores. Finally, using the corresponding health score threshold, processing instances that are greater than or equal to the threshold are identified as candidate processing instances that can be used for subsequent allocation and selection of target processing instances.

[0045] Step 203: Use the target processing instance to pull the target live stream and provide the target live stream to the target device.

[0046] In the embodiments of this disclosure, based on step 202, this step aims to enable the execution entity to utilize the target processing instance to complete the actions of pulling and providing the target live stream. That is, after determining the target processing instance based on step 202, the execution entity can locate and schedule the target device's request for acquiring the target live stream to the target processing instance, so as to utilize the target processing instance to complete actions such as pulling, decoding, and providing the live stream, thereby completing the process of providing the live stream to the target device.

[0047] The method for providing a live stream provided in this disclosure firstly reads a popularity reference value of the target live stream in response to receiving a request from a target device for the target live stream; then, in response to the popularity reference value being less than or equal to a first reference value threshold, a target processing instance is determined from local candidate processing instances; finally, the target processing instance is used to pull the target live stream and provides it to the target device. This approach implements a differentiated instance allocation strategy based on the popularity of the live stream, enabling shorter and more efficient allocation paths for low-popularity live streams. Therefore, it can reduce resource overhead and improve allocation efficiency while ensuring load balancing.

[0048] In some embodiments, in order to ensure the quality of allocation and scheduling, and to ensure that the target processing instance can complete the task processing as expected after being allocated and scheduled to pull (or pull) and provide tasks for the target live stream, the executing entity may also choose to estimate the updated operating metrics of the target processing instance after the target live stream is provided to the target device using the target processing instance.

[0049] For example, the executing entity can estimate and simulate the possible operating state of the target processing instance after assigning the task of providing the target live stream to it based on the current operating metrics of the target processing instance (e.g., based on the functions and resource size involved in the target live stream, to estimate the updated operating metrics).

[0050] Then, the executing entity can determine the stress level of the target processing instance based on the updated operational metrics. In practice, this process can be similar to the process of screening and determining candidate processing instances described above. After the executing entity determines the corresponding quantitative value (e.g., health score) by updating the operational metrics, it uses the preset stress level corresponding to the numerical range in which the quantitative value falls as the stress level of the target processing instance (when assigned the task of pulling and providing the target live stream).

[0051] It should be understood that during this process, the executing entity can also choose to actually read the current state of the target processing instance's operating metrics once, and use this as a benchmark to determine the updated operating metrics. This can avoid evaluation errors caused by adding new tasks or the untimely updating of previous operating metrics, thereby ensuring the accuracy of the evaluation while reducing the pressure of continuous updating and maintenance of the target processing instance's operating metrics.

[0052] Next, if the pressure level is greater than or equal to a threshold (for example, it can be pre-set based on the assumption that the processing instance is under excessive processing pressure and has a high risk of overload), the executing entity can respond by selecting a new target processing instance and using this new target processing instance to replace the original target processing instance to complete the processes of pulling and providing the target live stream. This simulates the process and prevents the target processing instance from becoming overloaded.

[0053] In some embodiments, to improve selection efficiency during the process of re-determining the target processing instance, the executing entity may first attempt to find a new target processing instance from the processing device where the target processing instance is located to replace the current, old target processing instance. For example, the executing entity can select the candidate processing instance with the lowest pressure level after deploying and allocating the pull and delivery tasks of the target live stream from the candidate instances that the processing device where the target processing instance is located can provide, using the aforementioned method of determining the "pressure level". This allows the executing entity to complete the search and replacement of processing instances through communication and detection of a single processing device, which can improve replacement efficiency while saving computing resources.

[0054] In some optional implementations of this embodiment, the executing entity may also similarly determine whether the target processing instance can be re-identified in the processing device where the target processing instance is located based on the comparison between the "lowest pressure level" and the level threshold.

[0055] Accordingly, if a new target processing instance can be re-identified, the executing entity can, as discussed above, use the re-identified new target processing instance to retrieve the target live stream and provide the target live stream to the target device.

[0056] In some optional implementations of this embodiment, if the target processing instance cannot be re-determined in the processing device where the target processing instance is located, for example, if the "lowest pressure level" mentioned above is also greater than or equal to the level threshold, then in such a case, the executing entity can choose to re-determine a new target processing instance from a processing device other than the processing device where the target processing instance is located, so as to avoid overload caused by using the old target processing instance.

[0057] Accordingly, in such a case, the executing entity can first remove candidate processing instances from the candidate processing instances that belong to the same processing device as the target processing instance, and obtain the processing result. Then, the target processing instance is re-determined from the processing result.

[0058] For example, after obtaining the processing results described above, the executing entity can use the hash operation described above, in a consistent hashing manner, to find a new target processing instance in other processing devices to replace the previously identified old target processing instance. This allows the executing entity to schedule tasks globally, across processing device instances, when it is difficult for individual processing devices to achieve load balancing and avoid overload, ensuring smooth task execution and preventing task blockages caused by overload.

[0059] In some embodiments, for the aforementioned "warm stream," i.e., the target live stream whose corresponding heat reference value is greater than a first reference value threshold and less than or equal to a second reference value threshold, the executing entity may first determine the number of locally available candidate processing devices. That is, the number of available candidate processing devices (at least one of the aforementioned available candidate processing instances) that can be used to allocate and schedule the target live stream. If the executing entity has at least two such candidate processing devices locally, the executing entity may, in response, determine the target processing device from the candidate devices.

[0060] Then, the executing entity selects the target processing instance from the candidate processing instances included in the target processing device.

[0061] Therefore, for warm streams with higher traffic and popularity than cold streams, the execution entity allocates and schedules instances in a two-level, two-dimensional manner, using processing devices and instances, so as to perform more accurate and granular global scheduling for live streams with higher traffic and popularity.

[0062] In some optional implementations of this embodiment, for temperature flow, the executing entity can choose to use consistent hashing to complete the selection and allocation process when selecting a target processing device from at least two candidate processing devices and when selecting a target processing instance from the candidate processing instances of the target processing device, so as to maintain load balance between and within the processing devices.

[0063] For example, when an execution entity determines a target processing device from candidate devices based on a heat reference value greater than a first reference threshold and less than or equal to a second reference threshold, and at least two candidate processing devices exist locally, the execution entity can determine the target processing device from the candidate devices through a consistent hash operation. This achieves "load balancing" among the various target processing devices deployed and configured within the execution entity.

[0064] In some embodiments, for the aforementioned "hot stream" scenario, to avoid excessive aggregation of these streams on a single processing instance, for example, by hashing the domain name of the target live stream and aggregating requests from different users for the same target live stream onto a single processing instance, the execution entity can, upon detecting that the target live stream is a hot stream, distribute the tasks of pulling and providing the hot stream across at least two or more processing instances by "distributing the processing instances" to balance the load among the processing instances and ensure load balancing.

[0065] To make this easier to understand, it can also be combined with Figure 3 Please provide an explanation. Figure 3 A flowchart of another process for providing a live stream as provided in an embodiment of this disclosure, including process 300.

[0066] Process 300 specifically includes the following steps: Step 301: In response to receiving a request from the target device to acquire the target live stream, read the popularity reference value of the target live stream; Specifically, step 301 is actually the same as the content discussed in step 201 above. The same parts can be found in the discussion of step 201 above, and will not be repeated here.

[0067] Accordingly, if the heat reference value is greater than the second reference value threshold, the executing entity can respond by choosing to continue executing step 302.

[0068] Step 302: Determine the target processing instance group from the candidate processing instance group; Specifically, the candidate processing instance group can be obtained in advance by combining the aforementioned candidate processing instances. For example, candidate processing instance A, candidate processing instance B, candidate processing instance C, and candidate processing instance D can be divided in advance into a candidate processing instance group consisting of candidate processing instance A and candidate processing instance B, and another candidate processing instance group consisting of candidate processing instance C and candidate processing instance D.

[0069] Accordingly, candidate processing instances within the same candidate processing instance group can share the same target cache (e.g., a cache for storing the pixel content of the fetched target live stream). That is, each candidate processing instance in the same candidate processing instance group shares the same target cache for storing the fetched target live stream. This avoids wasting resources by repeatedly fetching the target live stream among candidate processing instances.

[0070] The executing entity can then determine the target processing instance group from the candidate processing instance group. For example, the executing entity can construct a hash ring with the "candidate processing instance group" and determine the target processing instance group to be assigned to the target live stream using hash operations.

[0071] In some embodiments, candidate processing instances in the same candidate processing instance group may come from different, at least two, candidate processing devices, thereby enabling the global utilization efficiency of candidate processing devices to be improved by combining and utilizing instances across candidate processing devices.

[0072] In some embodiments, if the target live stream is a hot stream, it may be allowed to select and assign at least two target processing instance groups to provide users with the process of pulling and providing the target live stream. This ensures the ability to provide "hot streams".

[0073] Next, after determining the target processing instance group in step 302 above, the executing entity can utilize the target processing instance group to pull and provide the target live stream by assigning the task of pulling and providing the target live stream to the target processing instance group. For example, the executing entity can read the running status of each processing instance in the target processing instance group and select the processing instance with the lowest "pressure level" as the target processing instance for the current target device to provide the target live stream.

[0074] In some embodiments, for a target processing instance group, the executing entity may also choose to select the target processing instance actually used to pull and provide the target live stream from it by hashing, so as to achieve load balancing in the "group". Therefore, in order to better illustrate this situation, process 300 is illustrated in this way, instead of directly ending process 300 with a step such as "using the target processing instance group to pull the target live stream and providing the target live stream to the target device" after step 302. Instead, a specific implementation of "using the target processing instance group to pull the target live stream and providing the target live stream to the target device" is provided more specifically. That is, steps 303-305 below can be understood as a specific implementation of "using the target processing instance group to pull the target live stream and providing the target live stream to the target device".

[0075] Accordingly, after step 302 in process 300, the executing entity can continue to execute the following step 303.

[0076] Step 303: Generate allocation reference information by combining the request and auxiliary information; Specifically, in such cases, to prevent the hash results from allocating the same target live stream to a single target processing instance, the executing entity can use auxiliary information to ensure that each retrieval request for the same target live stream is different during hashing, thereby preventing retrieval requests for the same target live stream sent by different target devices from being hashed to the same target processing instance.

[0077] In some embodiments, the executing entity may choose to acquire auxiliary information including at least one of the following: the device identifier of the target device, the request identifier of the acquisition request, the session identifier of the target session for receiving the acquisition request, and a perturbation value (e.g., randomly generated), and combine them with the acquisition request to form allocation reference information that is also for the target live stream but differs from each other (because it includes information from the device or random perturbation values, so that "difference information" that can be used for reference can be provided outside the target live stream based on this content), so that they can be "shattered" in the hashing process.

[0078] Step 304: Based on the allocation reference information, determine the target processing instance from the target processing instance group; Specifically, the executing entity can use the allocation reference information as hash input and use hash operations (e.g., consistent hashing) to allocate corresponding target processing instances to each target device, so that the acquisition requests of different devices for the same target live stream can be scattered within the target processing instance group and responded to using multiple target processing instances in the target processing instance group.

[0079] Step 305: Use the target processing instance to pull the target live stream and provide the target live stream to the target device.

[0080] Specifically, after the allocation is completed, the executing entity can, as discussed above, use the target processing instance that was allocated to the target device and obtained the request to pull the target live stream and provide the target live stream to the target device, which will not be repeated here.

[0081] Therefore, the executing entity can distribute reference information and use hash operations to distribute requests for hot flow while balancing the load among the processing instances in the target processing instance group.

[0082] In some embodiments, if only one target processing instance group is allowed to be used by the executing entity, then in the process of determining the target processing instance group as described in step 302 above, the executing entity may hash based solely on the “target live stream” so that all requests for obtaining the target live stream are located and assigned to the same target processing instance group.

[0083] In some embodiments, if the executing entity is allowed to utilize at least two candidate processing instance groups simultaneously, that is, if the executing entity is allowed to use at least two target processing instance groups simultaneously, then in a similar manner, during the process of determining the target processing instance group, by adding auxiliary information, it is possible to allocate acquisition requests corresponding to the same target live stream to different target processing instance groups through hashing.

[0084] In such cases, in some embodiments, to control the number of target processing instance groups, in addition to adjusting the candidate processing instance groups included in the hash ring, the executing entity can also "guide" the hash result by adding fixed "auxiliary information." For example, if X target processing instance groups are allowed, the executing entity can determine X identifiers and, by adding these identifiers (e.g., adding them sequentially and cyclically in order of arrangement), guide the range of target processing instance groups into which the hash result should fall during the hashing process.

[0085] Furthermore, in such a scenario, the executing entity can, as discussed above, extend the shared target cache to the "group" level. This means configuring candidate processing instance groups to share the same target cache for storing the pulled target live streams. This allows target processing instance groups serving the same target live stream to share the cache and the pulled target live streams, avoiding duplicate streaming between "groups" and saving computational resources.

[0086] To enhance understanding, this disclosure also provides a specific implementation scheme based on a particular application scenario. Please refer to this scheme for ease of discussion. Figure 4 . Figure 4 A flowchart of a process for providing a live stream in a specific application scenario, provided for an embodiment of this disclosure, includes process 400.

[0087] In addition, for ease of understanding, please refer to the following: Figure 1 The architecture 100 shown illustrates process 400. For example, in process 400, a user (not shown) can use terminal device 101 to request live stream 410 from CDN node 110.

[0088] In CDN node 110, at least server 105 and server 106 can be deployed, and processing instance 121, processing instance 122 and processing instance 133 can be provided in server 105, and processing instance 421, processing instance 422 and processing instance 423 can be provided in server 106.

[0089] It should be understood that the number of servers included in the CDN node 110 mentioned above, and the number of processing instances included in the servers, are choices made only for illustrative purposes and are not intended to limit the quantity of these contents.

[0090] In process 400, terminal device 101 can first send a request 411 to CDN node 110 by executing S401, so as to request live stream 410 as the target live stream.

[0091] Next, after receiving the request 411, CDN node 110 can first execute S402 to read the popularity reference value 413 of the live stream 410.

[0092] To better understand this disclosure, process 400 is shown to illustrate the cases where the live stream 410 is a cold stream, a warm stream, and a hot stream.

[0093] First, if the live stream 410 is a "warm stream", that is, the popularity reference value 413 is greater than the first reference value threshold and less than or equal to the second reference value threshold, then in this case, the CDN node 110 can choose to execute S403 to select a target server from the server 105 and server 106, which are the above-mentioned candidate processing devices. For example, the selected "target processing device" and "target server" can be server 105.

[0094] Then, CDN node 110 can continue to execute S404 to select a target processing instance from the processing instances 121, 122 and 123 deployed in server 105 as candidate processing instances. For example, the target processing instance selected in process 400 can be processing instance 123.

[0095] Then, CDN node 110 can execute S408 to pull live stream 410 using processing instance 123. For example, it can pull live stream 410 from the external source of live stream 410 (not shown in the figure) to CDN node 110 and provide live stream 410 to terminal device 101.

[0096] Next, if the live stream 410 is a "cold stream", that is, the popularity reference value 413 is less than or equal to the first reference value threshold, then in this case, CDN node 110 can choose to execute S406 instead of S403 to directly select the target processing instance from all candidate processing instances, that is, processing instance 121, processing instance 122, processing instance 123, processing instance 421, processing instance 422, and processing instance 423.

[0097] For example, for ease of discussion, in process 400, the target processing instance determined and selected by CDN node 110 based on S406 can also be "processing instance 123". This allows CDN node 110 to subsequently pull live stream 410 by executing S408 as discussed above, and provide live stream 410 to terminal device 101.

[0098] Next, if the live stream 410 is a "hot stream", that is, the popularity reference value 413 is greater than the second reference value threshold, then in this case, CDN node 110 can choose to execute S407 instead of S403 and S406 to select the target processing instance group from the processing instance groups 431, 432 and 433 that can be used as the above-mentioned candidate processing.

[0099] For example, processing instance group 431 may include processing instance 121 and processing instance 421, processing instance group 432 may include processing instance 122 and processing instance 422, and processing instance group 433 may include processing instance 123 and processing instance 423.

[0100] For example, after S407, CDN node 110 can select processing instance group 433 as the target processing instance group, and continue to pull live stream 410 using instance group 433 by executing S409, and provide live stream 410 to terminal device 101.

[0101] It should be understood that, since in process 400, after exemplarily selecting S404 and S406, processing instance 123 is determined as the target processing instance, for the purpose of clarity, only... Figure 4 The example illustrates the process of using processing instance 123 to pull live stream 410 and provide live stream 410 to terminal device 101 (i.e., S408), but does not provide a detailed example of the execution process of S409.

[0102] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an apparatus for providing live streams, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0103] like Figure 5 As shown, the apparatus 500 for providing a live stream in this embodiment may include: a popularity reference value reading unit 501, a first instance determination unit 502, and a first instance utilization unit 503. The popularity reference value reading unit 501 is configured to read the popularity reference value of the target live stream in response to receiving a request from the target device for acquiring the target live stream; the first instance determination unit 502 is configured to determine a target processing instance from local candidate processing instances in response to the popularity reference value being less than or equal to a first reference value threshold; and the first instance utilization unit 503 is configured to use the target processing instance to retrieve the target live stream and provide the target live stream to the target device.

[0104] In this embodiment, the specific processing of the heat reference value reading unit 501, the first instance determination unit 502, and the first instance utilization unit 503 in the device 500 providing the live stream, and the resulting technical effects, can be referred to respectively. Figure 2 The relevant descriptions of steps 201-203 in the corresponding embodiments will not be repeated here.

[0105] In some optional implementations of this embodiment, the first instance determination unit 502 is further configured to determine the target processing instance from the local candidate processing instances through a consistent hash operation in response to the heat reference value being less than or equal to the first reference value threshold.

[0106] In some optional implementations of this embodiment, the apparatus 500 further includes: a running index reading unit, configured to read running indexes of local processing instances, wherein the running indexes include at least one of system resource status, service status, application layer health status, and continuity performance; and a candidate instance determination unit, configured to determine candidate processing instances from the processing instances based on the running indexes.

[0107] In some optional implementations of this embodiment, the apparatus 500 further includes: an updated performance index estimation unit configured to estimate the updated performance index of the target processing instance after the target live stream is provided to the target device using the target processing instance; a stress level determination unit configured to determine the stress level of the target processing instance based on the updated performance index; a first instance re-determination unit configured to re-determine the target processing instance from the processing device where the target processing instance is located in response to the stress level being greater than or equal to a level threshold; and a second instance utilization unit configured to, in response to the ability to re-determine the target processing instance in the processing device where the target processing instance is located, use the re-determined target processing instance to pull the target live stream and provide the target live stream to the target device.

[0108] In some optional implementations of this embodiment, the apparatus 500 further includes: a candidate processing instance adjustment unit, configured to remove candidate processing instances belonging to the same processing device as the target processing instance from the candidate processing instances in response to the inability to re-determine the target processing instance in the processing device where the target processing instance is located, thereby obtaining a processing result; and a second instance re-determination unit, configured to re-determine the target processing instance from the processing result.

[0109] In some optional implementations of this embodiment, the apparatus 500 further includes: a processing device determining unit, configured to determine a target processing device from the candidate devices in response to a heat reference value being greater than a first reference value threshold and less than or equal to a second reference value threshold, and at least two candidate processing devices existing locally, wherein the value of the second reference value threshold is greater than the first reference value threshold, and the candidate processing devices include at least one candidate processing instance; and a third instance determining unit, configured to determine a target processing instance from the candidate processing instances included in the target processing device.

[0110] In some optional implementations of this embodiment, the processing device determination unit is further configured to determine the target processing device from the candidate devices through a consistent hash operation in response to a heat reference value being greater than a first reference value threshold and less than or equal to a second reference value threshold, and at least two candidate processing devices existing locally.

[0111] In some optional implementations of this embodiment, the apparatus 500 further includes: an instance group determination unit, configured to determine a target processing instance group from the candidate processing instance group in response to a heat reference value being greater than a second reference value threshold, wherein the value of the second reference value threshold is greater than a first reference value threshold, and each candidate processing instance in the candidate processing instance group shares the same target cache for storing the pulled target live stream; and an instance group utilization unit, configured to utilize the target processing instance group to pull the target live stream and provide the target live stream to the target device.

[0112] In some optional implementations of this embodiment, the instance group utilization unit includes: an allocation reference information generation subunit, configured to generate allocation reference information by combining an acquisition request and auxiliary information, wherein the auxiliary information includes at least one of the following: a device identifier of the target device, a request identifier of the acquisition request, a session identifier of the target session for receiving the acquisition request, and a perturbation value; an instance determination subunit, configured to determine a target processing instance from the target processing instance group based on the allocation reference information; and an instance utilization subunit, configured to use the target processing instance to pull the target live stream and provide the target live stream to the target device.

[0113] In some optional implementations of this embodiment, the candidate processing instance groups share the same target cache for storing the pulled target live stream.

[0114] In some optional implementations of this embodiment, the candidate processing instances included in the same candidate processing instance group come from at least two different local candidate processing devices.

[0115] This embodiment is a device embodiment corresponding to the method embodiment described above. The device for providing live streams provided in this embodiment implements a differentiated instance allocation strategy based on the popularity of the live stream, enabling shorter and more efficient allocation paths to be used for low-popularity live streams. Therefore, while ensuring load balancing, it can reduce resource overhead and improve allocation efficiency.

[0116] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0117] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0118] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded into random access memory (RAM) 603 from storage unit 608. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0119] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0120] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the method of providing a live stream. For example, in some embodiments, the method of providing a live stream may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method of providing a live stream described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method of providing a live stream by any other suitable means (e.g., by means of firmware).

[0121] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0122] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0124] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0125] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0126] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are hosting products within the cloud computing service ecosystem to address the management difficulties and weak business scalability inherent in traditional physical hosts and Virtual Private Servers (VPS) services. Servers can also be categorized as distributed system servers or servers incorporating blockchain technology.

[0127] According to the technical solution of this disclosure, a differentiated instance allocation strategy is implemented based on the popularity of the live stream, enabling shorter and more efficient allocation paths to be used for low-popularity live streams. This reduces resource overhead and improves allocation efficiency while ensuring load balancing.

[0128] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.

[0129] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for providing a live stream, comprising: In response to receiving a request from the target device to acquire the target live stream, the popularity reference value of the target live stream is read. In response to the heat reference value being less than or equal to a first reference value threshold, a target processing instance is determined from the local candidate processing instances; The target processing instance is used to retrieve the target live stream and provide the target live stream to the target device.

2. The method of claim 1, wherein, The step of determining a target processing instance from local candidate processing instances in response to the heat reference value being less than or equal to a first reference value threshold includes: In response to the heat reference value being less than or equal to the first reference value threshold, the target processing instance is determined from the local candidate processing instances through a consistent hash operation.

3. The method according to claim 1, further comprising: Read the runtime metrics of the local processing instance, wherein the runtime metrics include at least one of system resource status, service status, application layer health status, and continuity performance; Based on the operational metrics, the candidate processing instances are determined from the processing instances.

4. The method according to claim 3, further comprising: The estimated update operation metrics of the target processing instance after the target live stream is provided to the target device using the target processing instance; The stress level of the target processing instance is determined based on the updated operational metrics. In response to the pressure level being greater than or equal to the level threshold, the target processing instance is re-determined from the processing device where the target processing instance is located; In response to the ability to re-determine the target processing instance in the processing device where the target processing instance is located, the target live stream is pulled using the re-determined target processing instance, and the target live stream is provided to the target device.

5. The method according to claim 4, further comprising: In response to the inability to re-identify the target processing instance in the processing device where the target processing instance is located, the candidate processing instances that belong to the same processing device as the target processing instance are removed from the candidate processing instances to obtain a processing result; The target processing instance is redefined in the processing result.

6. The method according to claim 1, further comprising: In response to the heat reference value being greater than a first reference value threshold and less than or equal to a second reference value threshold, and at least two candidate processing devices existing locally, a target processing device is determined from the candidate devices, wherein the value of the second reference value threshold is greater than the first reference value threshold, and the candidate processing devices include at least one of the candidate processing instances; The target processing instance is determined from the candidate processing instances included in the target processing device.

7. The method of claim 6, wherein, The step of determining the target processing device from the candidate devices in response to the heat reference value being greater than a first reference value threshold and less than or equal to a second reference value threshold, and the existence of at least two candidate processing devices locally, includes: In response to the heat reference value being greater than a first reference value threshold and less than or equal to a second reference value threshold, and at least two candidate processing devices existing locally, a target processing device is determined from the candidate devices through a consistent hash operation.

8. The method according to any one of claims 1-7, further comprising: In response to the popularity reference value being greater than the second reference value threshold, a target processing instance group is determined from the candidate processing instance group, wherein the value of the second reference value threshold is greater than the first reference value threshold, and each candidate processing instance in the candidate processing instance group shares the same target cache for storing the pulled target live stream; The target processing instance group is used to pull the target live stream and provide the target live stream to the target device.

9. The method of claim 8, wherein, The step of using the target processing instance group to pull the target live stream and providing the target live stream to the target device includes: By combining the acquisition request and auxiliary information, allocation reference information is generated, wherein the auxiliary information includes at least one of the following: the device identifier of the target device, the request identifier of the acquisition request, the session identifier of the target session for receiving the acquisition request, and a perturbation value. Based on the allocation reference information, the target processing instance is determined from the target processing instance group; The target processing instance is used to retrieve the target live stream and provide the target live stream to the target device.

10. The method of claim 8, wherein, The candidate processing instance groups share the same target cache for storing the retrieved target live stream.

11. The method of claim 8, wherein, The candidate processing instances included in the same candidate processing instance group are from at least two different candidate processing devices locally.

12. An apparatus for providing a live stream, comprising: The popularity reference value reading unit is configured to read the popularity reference value of the target live stream in response to receiving a request from the target device for acquiring the target live stream; The first instance determination unit is configured to determine the target processing instance from the local candidate processing instances in response to the heat reference value being less than or equal to a first reference value threshold. The first instance utilization unit is configured to use the target processing instance to pull the target live stream and provide the target live stream to the target device.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of providing a live stream as described in any one of claims 1-11.

14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of providing a live stream as claimed in any one of claims 1-11.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method of providing a live stream according to any one of claims 1-11.