Live broadcast transcoding task scheduling method, system and device and storage medium
By accurately calculating the predicted load of the live broadcast transcoding service and performing task scheduling, the problem of incompatibility between transcoding resources and tasks is solved, and resource utilization and operation and maintenance efficiency are improved.
Patent Information
- Application Number
- CN202510054042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-16
AI Technical Summary
In the live broadcast transcoding scenario, the change in the transcoding service load causes the allocated transcoding resources to be unable to fully utilize or meet the needs of the current transcoding task, resulting in waste of resources or service abnormalities.
By obtaining the number of real-time transcoding tasks and the average of the first transcoding parameters of the target transcoding service, and accurately calculate the predicted load of the target transcoding service based on the target transcoding information of the target video stream, the target transcoding task scheduling of the target video stream is performed based on the predicted load comparison.
The transcoding resource allocation is realized based on the adaptability of transcoding service load, which improves the utilization rate of transcoding resources, avoids resource waste and service abnormalities, and reduces operation and maintenance costs.
Smart Images

Figure CN120017871A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video transcoding technology, and in particular to a method, system, device and storage medium for scheduling live transcoding tasks. Background Art
[0002] At present, with the development of Internet video content, video transcoding has become an indispensable link in the audio and video content processing chain. Video transcoding services can convert original video files into videos of different formats, resolutions, and bit rates to meet the needs of various terminal devices and network environments. In the process of video transcoding, Kubernetes (an open source container orchestration platform) is usually used to uniformly schedule all resources in the transcoding service cluster. Corresponding transcoding resources are configured for different transcoding tasks, such as the number of CPU cores, memory, and GPUs, so as to make full use of physical machine resources and achieve mutual isolation between services.
[0003] However, the relevant transcoding task scheduling scheme uses a given resource quota to allocate fixed resources to the transcoding task process. In the live transcoding scenario, different CPU models and transcoding service iterations will cause changes in the transcoding service load, making the allocated transcoding resources unsuitable for the current transcoding task, which in turn causes the allocated transcoding resources to be unable to be fully utilized or unable to meet the transcoding requirements of the current transcoding task, resulting in a waste of transcoding resources or service anomalies, affecting the processing effect of the transcoding task. Summary of the invention
[0004] The embodiments of the present application provide a live transcoding task scheduling method, system, device and storage medium, which can configure transcoding resources according to the adaptability of the transcoding service load, improve the utilization rate of transcoding resources, and solve the technical problem of incompatibility between transcoding resources and transcoding tasks.
[0005] In a first aspect, an embodiment of the present application provides a method for scheduling live transcoding tasks, including:
[0006] In response to a received transcoding application of a target video stream, target transcoding parameter information contained in the transcoding application is extracted, the number of real-time transcoding tasks and a first transcoding parameter mean of the target transcoding service are obtained, and a second transcoding parameter mean is calculated based on the number of real-time transcoding tasks, the first transcoding parameter mean, and the target transcoding parameter information, wherein the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks that have been allocated to the target transcoding service;
[0007] Calculate the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor, where the predicted load represents the predicted transcoding load when the transcoding task of the target video stream is assigned to the target transcoding service, and the influencing factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load;
[0008] Based on the load threshold preset for the target transcoding service by comparing the predicted load, the transcoding task scheduling of the target video stream is performed according to the comparison result.
[0009] In a second aspect, an embodiment of the present application provides a live transcoding task scheduling system, including:
[0010] A first calculation module, configured to, in response to receiving a transcoding application for a target video stream, extract the target transcoding parameter information included in the transcoding application, obtain the real-time transcoding task quantity and the first transcoding parameter mean value of the target transcoding service, calculate the second transcoding parameter mean value based on the real-time transcoding task quantity, the first transcoding parameter mean value, and the target transcoding parameter information, and the first transcoding parameter mean value is calculated based on the transcoding parameters of the transcoding tasks already assigned to the target transcoding service;
[0011] A second calculation module, configured to calculate the predicted load of the target transcoding service based on the second transcoding parameter mean value and a preset influence factor, where the predicted load represents the transcoding load predicted when the transcoding task of the target video stream is assigned to the target transcoding service, and the influence factor is preset based on the influence trend of the corresponding transcoding parameter on the transcoding load;
[0012] A scheduling module, configured to compare the predicted load with the load threshold preset for the target transcoding service, and perform the transcoding task scheduling of the target video stream according to the comparison result.
[0013] In a third aspect, an embodiment of the present application provides a live transcoding task scheduling device, including:
[0014] A memory and one or more processors;
[0015] The memory is configured to store one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the live transcoding task scheduling method as described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are configured to execute the live transcoding task scheduling method as described in the first aspect when executed by a computer processor.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes instructions, and when the instructions run on a computer or a processor, the computer or the processor executes the live transcoding task scheduling method as described in the first aspect.
[0019] The embodiment of the present application extracts the target transcoding parameter information contained in the transcoding application in response to the received transcoding application of the target video stream, obtains the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, calculates the second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean and the target transcoding parameter information, the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks assigned to the target transcoding service; calculates the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influence factor, the predicted load represents the predicted transcoding load obtained when the transcoding task of the target video stream is assigned to the target transcoding service, the influence factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load; compares the predicted load with the load threshold preset by the target transcoding service, and schedules the transcoding tasks of the target video stream according to the comparison result. The above technical means are adopted to accurately calculate the predicted load of the target transcoding service by obtaining the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service in combination with the target transcoding information of the target video stream. Then, based on the predicted load adaptability, the transcoding task of the target video stream is scheduled to avoid the situation where the transcoding resources are not suitable for the current transcoding tasks, thereby making full use of the transcoding resources, improving the utilization rate of transcoding resources, and reducing the transcoding operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of a live transcoding task scheduling method provided by an embodiment of the present application;
[0021] Figure 2 It is the influence trend of different transcoding parameters on transcoding load in the embodiment of the present application;
[0022] Figure 3 is a calculation flow chart of load prediction in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a fitting curve of a normalized influence coefficient and a transcoding load in an embodiment of the present application;
[0024] Figure 5 is a scheduling flow chart of transcoding tasks in an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of a live broadcast transcoding task scheduling system provided by an embodiment of the present application;
[0026] Figure 7 It is a structural diagram of a live transcoding task scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0028] The live transcoding task scheduling method provided by the present application aims to obtain the number of real-time transcoding tasks of the target transcoding service and the mean value of the first transcoding parameter, and accurately calculate the predicted load of the target transcoding service in combination with the target transcoding information of the target video stream. Then, based on the predicted load adaptability, the transcoding task scheduling of the target video stream is performed to avoid the situation where the transcoding resources are not suitable for the current transcoding tasks, thereby making full use of the transcoding resources.
[0029] In relevant transcoding service application scenarios, problems such as poor resource utilization, low scalability, and complex management are often encountered. In order to solve this problem, the open source container orchestration platform Kubernetes is often introduced on the basis of the physical cluster, combined with virtualization technology, to uniformly schedule and process all resources in the cluster. The common processing method is to assign corresponding resources to different business PODs, such as the number of CPU cores, memory, and GPUs, so as to make full use of physical machine resources and isolate businesses from each other.
[0030] Although the current container orchestration platform Kubernetes has provided a relatively powerful resource scheduling mechanism for reasonable resource allocation, such as allocating resources to business processes in the form of given resource quotas. For example, the CPU transcoding process often allocates a certain amount of CPU resources, and the resources can be set to fluctuate within a certain range. However, it is still not fully adaptable in the live transcoding scenario. In the CPU transcoding service, different CPU models and transcoding business iterations will cause changes in the service load, which will lead to the inability to fully utilize the allocated resources or to meet the transcoding needs, resulting in resource waste or service abnormalities, so it is necessary to optimize for such scenarios.
[0031] Based on this, a live transcoding task scheduling method of an embodiment of the present application is provided to solve the technical problem of incompatibility between transcoding resources and transcoding tasks. In particular, for scenarios where the performance of transcoding cluster machines is not uniform and the transcoding process load fluctuates during the development iteration process, transcoding task scheduling is used to achieve automatic and adaptive transcoding load quota management and improve the utilization rate of the cluster's allocated resources.
[0032] Example:
[0033] Figure 1 A flowchart of a live transcoding task scheduling method provided in an embodiment of the present application is given. The live transcoding task scheduling method provided in this embodiment can be executed by a live transcoding task scheduling device, which can be implemented by software and / or hardware. The live transcoding task scheduling device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the live transcoding task scheduling device can be a processing device such as a transcoding control center device and a server host.
[0034] The following description is made by taking the live broadcast transcoding task scheduling device as an example of the subject of the live broadcast transcoding task scheduling method. Figure 1 , the live broadcast transcoding task scheduling method specifically includes:
[0035] S110. In response to a received transcoding application for a target video stream, extract target transcoding parameter information contained in the transcoding application, obtain the number of real-time transcoding tasks and a first transcoding parameter mean of the target transcoding service, and calculate a second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean, and the target transcoding parameter information, wherein the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks assigned to the target transcoding service.
[0036] When scheduling transcoding tasks, this application predicts and controls the transcoding load of the transcoding service by introducing a load prediction model, thereby rationally utilizing the transcoding resources allocated to the transcoding service, reducing manual intervention, and improving resource utilization while achieving automatic and adaptive adjustment of the transcoding load, thereby improving transcoding operation and maintenance efficiency.
[0037] When a new video stream transcoding application is received, the video stream is defined as the target video stream. First, key information is extracted from the transcoding application of the target video stream, such as bit rate, frame rate, resolution, number of parallel transcoding tasks, etc. This information will be used for subsequent calculations and resource allocation and is defined as target transcoding parameter information.
[0038] On the other hand, according to the transcoding application, several transcoding services for processing the transcoding tasks of the current target video stream are determined, which are defined as target transcoding services. The target transcoding service can be selected based on different information such as the transcoding version. By querying the number of real-time transcoding tasks currently being processed by the target transcoding service and calculating the mean of the transcoding parameters of the transcoding tasks being executed, it is defined as the first transcoding parameter mean. The first transcoding parameter mean can be obtained by counting and calculating the average values of each transcoding parameter in the transcoding tasks assigned to the target transcoding service (such as average resolution, average bit rate, etc.). These parameters reflect the overall load characteristics of the current target service.
[0039] Furthermore, based on the above-mentioned number of real-time transcoding tasks, the first transcoding parameter mean and the target transcoding parameter information, a corresponding calculation formula (such as weighted average) is used to combine the target transcoding parameter information with the current number of real-time transcoding tasks and the first transcoding parameter mean to calculate the second transcoding parameter mean. The second transcoding parameter mean is used to estimate the load that the service may face if the transcoding task of the target video stream is assigned to the target transcoding service. The second transcoding parameter mean is thus comprehensively calculated to facilitate subsequent accurate load prediction of the target transcoding service. Depending on the different types of transcoding parameters, there will be a corresponding number of multiple second transcoding parameter means. The second transcoding parameter mean calculation formula is as follows:
[0040]
[0041] Among them, Bj avg represents the mean value of the second transcoding parameter, n is the number of real-time transcoding tasks, It can be obtained by n times the first transcoding parameter mean and the target transcoding parameter information. For different types of transcoding parameters, the second transcoding parameter mean is calculated by referring to the above formula.
[0042] For example, in the video stream transcoding scenario, the transcoding framework includes different modules such as the media stream control center, the transcoding control center, and the transcoding service. Among them, the media stream control center is a module for direct communication between the viewer end and the anchor end, which is responsible for receiving the uplink video stream collected by the anchor end, and receiving the downlink video stream transcoded by the transcoding service to the viewer end. The media stream control center is responsible for inter-process communication through the general processing module, sending transcoding application requests to the transcoding control center, and forwarding the video stream through the video transcoding module.
[0043] The transcoding control center is the core processing module for transcoding tasks, which is mainly divided into: the configuration management module, which is responsible for receiving the configuration information issued by the background configuration center. The relevant configuration of the load model of the target transcoding service is issued by the configuration center, and then the load model and related configuration information are issued to the target transcoding service; the transcoding task scheduling module is used to receive the transcoding application initiated by the media stream control center and allocate appropriate transcoding services; the transcoding service management module is mainly responsible for transcoding service management and handling service online and offline.
[0044] The transcoding service is the actual undertaker of the transcoding task. It is mainly divided into three modules; the general processing module is responsible for inter-process communication, responsible for initiating registration requests to the transcoding control center and maintaining communication; the transcoding module is the actual processing module of the transcoding task, responsible for receiving the host's upstream video stream forwarded by the media stream control center and transcoding it, and outputting the transcoded video stream to reply to the media stream control center; the load update module is a newly introduced module, responsible for the timed update of the relevant load conditions of the process / physical machine, by using the load model issued by the configuration center to calculate and collect the above-mentioned real-time transcoding task quantity and the first transcoding parameter mean when the transcoding task is initiated, so as to characterize the relevant load conditions of the current transcoding service. The number of real-time transcoding tasks and the first transcoding parameter mean are reported to the transcoding control center, and the load prediction of the corresponding target transcoding service can be carried out based on the live transcoding task scheduling method of this application, so as to schedule the transcoding tasks of the target transcoding service.
[0045] Specifically, before obtaining the number of real-time transcoding tasks and the first transcoding parameter mean value of the target transcoding service, the method further includes:
[0046] The load model is sent to the target transcoding service to collect the number of real-time transcoding tasks and the average value of the first transcoding parameter of the target transcoding service based on the load model.
[0047] The transcoding control center pre-configures the load model of the target transcoding service to use each load model to collect the corresponding number of real-time transcoding tasks and the mean value of the first transcoding parameter of the target transcoding service, and then reports the above-mentioned number of real-time transcoding tasks and the mean value of the first transcoding parameter to the transcoding control center for subsequent scheduling of the target video stream transcoding tasks.
[0048] In addition, after sending the load model to the target transcoding service, it also includes:
[0049] The model parameters of the load model are configured for the target transcoding service according to the processor model and transcoding version information of the target transcoding service.
[0050] According to the processor model (such as CPU model) and transcoding version information (such as transcoding software version) of the target transcoding service, the model parameters of the load model are configured for the target transcoding service. These parameters are specific and configured according to actual needs to ensure that the load model can accurately reflect the load conditions of the service in a specific hardware and software environment, so as to collect the corresponding number of transcoding tasks and the first transcoding parameter mean and report them to the transcoding control center. By configuring the model parameters of the load model according to the processor model and transcoding version information of the target transcoding service, it can be ensured that the model can accurately reflect the load conditions of the transcoding service in different hardware and software environments. This enhances the adaptability and accuracy of the model.
[0051] S120. Calculate the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor. The predicted load represents the transcoding load predicted when the transcoding task of the target video stream is assigned to the target transcoding service. The influencing factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load.
[0052] For the transcoding control center, after determining the second transcoding parameter mean, the load prediction is also performed through the load model configured by the configuration center. The predicted load is calculated by combining the second transcoding parameter mean and the preset influence factor (the influence factor reflects the specific influence of different transcoding parameters on the transcoding load). The predicted load is a quantitative indicator used to evaluate the load level faced by the target service if the transcoding task of the target video stream is assigned to this target service.
[0053] The impact factor is determined based on the ratio of the impact trend information of the corresponding transcoding parameter on the transcoding load to the total impact trend, and all total impact trends represent the sum of the impact trend information of different transcoding parameters on the transcoding load.
[0054] Prior to this, we received input videos with different transcoding parameters, specified the input frame rate, the number of transcoding tasks, etc., and then output the transcoded video stream to simulate the transcoding process of a normal video stream. Then, we used an orthogonal experiment to test the transcoding load when different parameters were changed. For example, the impact of transcoding load under different numbers of transcoding streams and different transcoding frame rates. Figure 2 As shown in the figure, by simulating the impact trend of the transcoding load, the influencing factors of the corresponding transcoding parameters can be determined. The main transcoding parameters include bit rate, frame rate, resolution, number of parallel transcoding tasks, etc. After testing, the relationship between different parameters and transcoding load can be obtained, that is, the above-mentioned influencing factors.
[0055] From the above test results, it can be inferred that a single transcoding parameter and the load show a nearly linear change trend. For the construction of a multi-parameter model, the parameters can be normalized to the range of [0,1], and the influence factor of each parameter is determined by the slope of its influence on the load. The specific calculation method is as follows: If the influence trend of the frame rate on the load is A 1 The impact trend of parallel transcoding amount on transcoding load is A 2 Similarly, the influence trends of other transcoding parameters on load are A 3 , A 4 , A k , then for the transcoding parameter A among the k transcoding parameters j The calculation result of its impact factor is
[0056]
[0057] Further, refer to Figure 3 , calculating the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor, including:
[0058] S1201, normalize the second transcoding parameter mean to obtain a normalized transcoding parameter;
[0059] S1202: Calculate a normalized influence coefficient based on the normalized transcoding parameter and a preset influence factor, and calculate a predicted load of a target transcoding service based on the normalized influence coefficient.
[0060] For the second transcoding parameter mean value B of the corresponding transcoding parameter obtained javg , and normalize them to quantify the impact of different types of second transcoding parameter means on the predicted load. It is understandable that different transcoding parameters have different dimensions, and direct comparison or calculation is unreasonable. Therefore, it is necessary to normalize these second transcoding parameter means to eliminate the impact of the dimension so that different parameters can be compared and calculated. The normalization method can be to configure corresponding normalized influence factors corresponding to different types of transcoding parameter means (according to the impact of different types of transcoding parameters on the transcoding load), and then weightedly calculate the normalized transcoding parameters of the second transcoding parameter means. In addition, the minimum-maximum normalization (Min-Max Normalization) or Z-score normalization method can also be used. Min-maximum normalization linearly transforms the original data to the [0,1] interval, while Z-score normalization is based on the mean and standard deviation of the data for standardization.
[0061] Optionally, normalizing the second transcoding parameter mean to obtain a normalized transcoding parameter includes:
[0062] A maximum transcoding parameter corresponding to the second transcoding parameter mean value in the target transcoding service is obtained, and a ratio of the second transcoding parameter mean value to the maximum transcoding parameter is used as a normalized transcoding parameter.
[0063] Assume that the maximum value of the transcoding parameter in the target transcoding service is B jmax , then the normalized second transcoding parameter mean B javg Corrected to ω j :
[0064]
[0065] Further, the predicted load of the target transcoding service is calculated based on the normalized impact coefficient, including:
[0066] The normalized influence coefficient is input into a pre-built load prediction formula to output the predicted load of the target transcoding service. The load prediction formula is constructed based on fitting different values of the normalized influence coefficient with the corresponding transcoding load values.
[0067] Furthermore, since there are multiple different types of transcoding parameters, there will be multiple corresponding influencing factors. and normalized transcoding parameter ω j Assuming there are K transcoding parameters, the normalized influence coefficient τ is calculated based on the normalized transcoding parameters and the preset influence factors:
[0068]
[0069] The predicted load is further calculated based on the following load prediction formula:
[0070] load=ae bτ+c
[0071] Where load represents the predicted load, and a, b, and c are constant terms. The load prediction formula is constructed by fitting the different values of the actual normalized influence coefficients and the corresponding transcoding load values. Figure 4 As shown in FIG. 1 , for different values of the normalized influence coefficients tested and the corresponding transcoding load values, a load prediction formula is obtained through function fitting. It is subsequently configured to the transcoding control center and can be used for load prediction of the load model.
[0072] It should be noted that the transcoding control center can also send the load model and corresponding influencing factors, load prediction formulas, etc. to the target transcoding service based on the machine model and transcoding version of the target transcoding service. The target transcoding service can use the above load prediction formula to calculate its own transcoding load in real time and report it to the transcoding control center for processing related business logic.
[0073] S130 , comparing the predicted load with a preset load threshold of the target transcoding service, and scheduling the transcoding task of the target video stream according to the comparison result.
[0074] Furthermore, based on the above predicted load, the calculated predicted load is compared with the preset load threshold of the target transcoding service. This threshold is a safety limit used to prevent service overload. Then, scheduling is performed according to the comparison result. If the predicted load is lower than the load threshold, the transcoding task of the target video stream can be assigned to this target transcoding service. If the predicted load is higher than the load threshold, other available transcoding services are searched or the load of the current service is reduced before allocation. In addition, resources (such as CPU, GPU) can be added to expand the processing capacity of the target transcoding service, thereby achieving the purpose of load control.
[0075] Optionally, for the target transcoding service, the target transcoding information of the target video stream can be obtained, and the pre-configured load model can be used to calculate the predicted load, and then combined with the pre-set load threshold, it can be determined whether the transcoding task of the target video stream can be accepted. In this way, the load model is configured separately by the transcoding control center and the target transcoding service to achieve the disaster recovery effect of transcoding task scheduling.
[0076] By introducing a load model for load control, we can solve the problem of resource waste or service anomalies caused by the inability to fully utilize the allocated resources or to meet transcoding requirements, and fully utilize the resources. At the same time, by improving the load model and feedback mechanism, we can avoid manual intervention and adjustment of the overall resource distribution of the cluster during business iteration, realize an automated and adaptive adjustment mechanism, improve operation and maintenance efficiency, and reduce operation and maintenance costs.
[0077] For example, refer to Figure 5 The target transcoding service of this application achieves the purpose of load control by uniformly using the load model to calculate the relevant load conditions and combining the timing reporting mechanism to always control the load of the transcoding task at a reasonable level. The specific interaction timing is as follows Figure 5As shown in the figure. When the target transcoding service initiates service registration to the transcoding control center, it will attach the CPU model and transcoding version information of the machine it starts. The transcoding control center identifies the service process registration, and sends the corresponding version of the load model and model parameters in the configuration center to the target transcoding service according to the carried transcoding version and CPU model. The target transcoding service regularly collects the real-time load of the process / machine (i.e., the number of real-time transcoding tasks and the mean of the first transcoding parameter) and reports it to the transcoding control center. The transcoding control center receives the real-time transcoding task number and the mean of the first transcoding parameter updated by the transcoding service and maintains them in memory. When the transcoding control center receives the transcoding application, it will extract the target transcoding parameter information in the transcoding application, such as the target video stream resolution, frame rate, bit rate, etc., and combine the real-time transcoding task number and the mean of the first transcoding parameter of the target transcoding service to perform load prediction. The predicted load is compared with the load threshold to determine whether to send the transcoding task of the target video stream to the target transcoding service. After determining to send the transcoding task of the target video stream to the target transcoding service, the target transcoding service receives the transcoding task, performs transcoding, and notifies the transcoding control center of the transcoding result, thereby completing the transcoding task of the current target video stream.
[0078] In the above, by responding to the transcoding application of the received target video stream, extracting the target transcoding parameter information contained in the transcoding application, obtaining the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, calculating the second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean and the target transcoding parameter information, the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks assigned to the target transcoding service; calculating the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influence factor, the predicted load represents the predicted transcoding load obtained when the transcoding task of the target video stream is assigned to the target transcoding service, the influence factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load; comparing the predicted load with the load threshold preset by the target transcoding service, and scheduling the transcoding task of the target video stream according to the comparison result. Using the above technical means, by obtaining the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, the predicted load of the target transcoding service is accurately calculated in combination with the target transcoding information of the target video stream. Then, based on the predicted load adaptability, the transcoding task of the target video stream is scheduled to avoid the situation where the transcoding resources are not suitable for the current transcoding tasks, thereby making full use of the transcoding resources, improving the utilization rate of transcoding resources, and reducing the transcoding operation and maintenance costs.
[0079] Based on the above embodiments, Figure 6 A schematic diagram of the structure of a live transcoding task scheduling system provided by this application. Figure 6The live broadcast transcoding task scheduling system provided in this embodiment specifically includes: a first calculation module 21, a second calculation module 22 and a scheduling module 23.
[0080] The first calculation module 21 is configured to respond to the received transcoding application of the target video stream, extract the target transcoding parameter information contained in the transcoding application, obtain the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, and calculate the second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean and the target transcoding parameter information, wherein the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks assigned to the target transcoding service;
[0081] The second calculation module 22 is configured to calculate the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor, wherein the predicted load represents the transcoding load predicted when the transcoding task of the target video stream is assigned to the target transcoding service, and the influencing factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load;
[0082] The scheduling module 23 is configured to compare the load threshold preset by the target transcoding service based on the predicted load, and schedule the transcoding task of the target video stream according to the comparison result.
[0083] Specifically, before obtaining the number of real-time transcoding tasks and the first transcoding parameter mean value of the target transcoding service, the method further includes:
[0084] The load model is sent to the target transcoding service to collect the number of real-time transcoding tasks and the average value of the first transcoding parameter of the target transcoding service based on the load model.
[0085] After sending the load model to the target transcoding service, the following steps are also included:
[0086] The model parameters of the load model are configured for the target transcoding service according to the processor model and transcoding version information of the target transcoding service.
[0087] Specifically, the impact factor is determined based on the ratio of the impact trend information of the corresponding transcoding parameter on the transcoding load to the total impact trend, and all total impact trends represent the sum of the impact trend information of different transcoding parameters on the transcoding load.
[0088] Calculating the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor includes:
[0089] Normalizing the second transcoding parameter mean to obtain a normalized transcoding parameter;
[0090] A normalized influence coefficient is calculated based on the normalized transcoding parameter and a preset influence factor, and a predicted load of a target transcoding service is calculated based on the normalized influence coefficient.
[0091] Normalizing the second transcoding parameter mean to obtain a normalized transcoding parameter, including:
[0092] A maximum transcoding parameter corresponding to the second transcoding parameter mean value in the target transcoding service is obtained, and a ratio of the second transcoding parameter mean value to the maximum transcoding parameter is used as a normalized transcoding parameter.
[0093] The predicted load of the target transcoding service is calculated based on the normalized impact coefficient, including:
[0094] The normalized influence coefficient is input into a pre-built load prediction formula to output the predicted load of the target transcoding service. The load prediction formula is constructed based on fitting different values of the normalized influence coefficient with the corresponding transcoding load values.
[0095] In the above, by responding to the transcoding application of the received target video stream, extracting the target transcoding parameter information contained in the transcoding application, obtaining the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, calculating the second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean and the target transcoding parameter information, the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks assigned to the target transcoding service; calculating the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influence factor, the predicted load represents the predicted transcoding load obtained when the transcoding task of the target video stream is assigned to the target transcoding service, the influence factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load; comparing the predicted load with the load threshold preset by the target transcoding service, and scheduling the transcoding task of the target video stream according to the comparison result. Using the above technical means, by obtaining the number of real-time transcoding tasks and the first transcoding parameter mean of the target transcoding service, the predicted load of the target transcoding service is accurately calculated in combination with the target transcoding information of the target video stream. Then, based on the predicted load adaptability, the transcoding task of the target video stream is scheduled to avoid the situation where the transcoding resources are not suitable for the current transcoding tasks, thereby making full use of the transcoding resources, improving the utilization rate of transcoding resources, and reducing the transcoding operation and maintenance costs.
[0096] The live broadcast transcoding task scheduling system provided in the embodiment of the present application can be configured to execute the live broadcast transcoding task scheduling method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0097] Based on the above practical example, the present application embodiment also provides a live transcoding task scheduling device, referring to Figure 7, the live transcoding task scheduling device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the live transcoding task scheduling method described in any embodiment of the present application (for example, the first calculation module, the second calculation module and the scheduling module in the live transcoding task scheduling system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizing the above-mentioned live transcoding task scheduling method. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The above-mentioned live transcoding task scheduling device can be configured to execute the live transcoding task scheduling method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.
[0098] On the basis of the above embodiments, the embodiments of the present application further provide a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute a live transcoding task scheduling method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the non-volatile computer-readable storage medium provided in the embodiments of the present application, whose computer-executable instructions are not limited to the live transcoding task scheduling method described above, may also execute the related operations in the live transcoding task scheduling method provided in any embodiment of the present application.
[0099] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the live transcoding task scheduling method described in each embodiment of the present application.
Claims
1. A method for scheduling live transcoding tasks, characterized in that: include: In response to a received transcoding application of a target video stream, extract target transcoding parameter information contained in the transcoding application, obtain the number of real-time transcoding tasks and a first transcoding parameter mean of a target transcoding service, and calculate a second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean, and the target transcoding parameter information, wherein the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks that have been allocated to the target transcoding service; Calculate the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor, wherein the predicted load represents the transcoding load predicted when the transcoding task of the target video stream is assigned to the target transcoding service, and the influencing factor is pre-set based on the influence trend of the corresponding transcoding parameter on the transcoding load; The predicted load is compared with a preset load threshold of the target transcoding service, and the transcoding task of the target video stream is scheduled according to the comparison result.
2. The method for scheduling live transcoding tasks according to claim 1, characterized in that: The calculating the predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor includes: Normalizing the second transcoding parameter mean to obtain a normalized transcoding parameter; A normalized influence coefficient is calculated based on the normalized transcoding parameter and a preset influence factor, and a predicted load of the target transcoding service is calculated based on the normalized influence coefficient.
3. The method for scheduling live transcoding tasks according to claim 2, characterized in that: The step of normalizing the second transcoding parameter mean to obtain a normalized transcoding parameter includes: A maximum transcoding parameter corresponding to the second transcoding parameter mean value in the target transcoding service is obtained, and a ratio of the second transcoding parameter mean value to the maximum transcoding parameter is used as a normalized transcoding parameter.
4. The method for scheduling live transcoding tasks according to claim 2, characterized in that: The calculating the predicted load of the target transcoding service based on the normalized influence coefficient includes: The normalized influence coefficient is input into a pre-constructed load prediction formula, and the predicted load of the target transcoding service is output. The load prediction formula is constructed based on fitting different values of the normalized influence coefficient and corresponding transcoding load values.
5. The method for scheduling live transcoding tasks according to claim 1, characterized in that: The impact factor is determined based on the ratio of the impact trend information of the corresponding transcoding parameter on the transcoding load to the total impact trend, and all total impact trends represent the sum of the impact trend information of different transcoding parameters on the transcoding load.
6. The method for scheduling live transcoding tasks according to claim 1, characterized in that: Before obtaining the number of real-time transcoding tasks and the first transcoding parameter mean value of the target transcoding service, the method further includes: A load model is sent to the target transcoding service to collect the number of real-time transcoding tasks and the mean value of the first transcoding parameter of the target transcoding service based on the load model.
7. The method for scheduling live transcoding tasks according to claim 6, characterized in that: After sending the load model to the target transcoding service, the method further includes: The model parameters of the load model are configured for the target transcoding service according to the processor model and transcoding version information of the target transcoding service.
8. A live broadcast transcoding task scheduling system, characterized in that: include: A first calculation module is configured to, in response to a received transcoding application of a target video stream, extract target transcoding parameter information contained in the transcoding application, obtain the number of real-time transcoding tasks and a first transcoding parameter mean of a target transcoding service, and calculate a second transcoding parameter mean based on the number of real-time transcoding tasks, the first transcoding parameter mean, and the target transcoding parameter information, wherein the first transcoding parameter mean is calculated based on the transcoding parameters of the transcoding tasks that have been allocated to the target transcoding service; a second calculation module, configured to calculate a predicted load of the target transcoding service based on the second transcoding parameter mean and a preset influencing factor, wherein the predicted load represents a predicted transcoding load when the transcoding task of the target video stream is assigned to the target transcoding service, and the influencing factor is pre-set based on an influencing trend of the corresponding transcoding parameter on the transcoding load; The scheduling module is configured to compare the predicted load with a preset load threshold of the target transcoding service, and schedule the transcoding task of the target video stream according to the comparison result.
9. A live broadcast transcoding task scheduling device, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the live transcoding task scheduling method as described in any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, they are configured to execute the live broadcast transcoding task scheduling method as described in any one of claims 1-7.
11. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the live broadcast transcoding task scheduling method as described in any one of claims 1-7.