Video transcoding task scheduling method and device, storage medium and equipment

By predicting the transcoding latency and quality of video transcoding tasks in heterogeneous computing resources, determining task performance, and selecting the most efficient processing unit for allocation, the problem of rational allocation of video transcoding tasks in heterogeneous computing resources is solved, and task performance is improved.

CN121887995APending Publication Date: 2026-04-17CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
Filing Date
2026-01-06
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In heterogeneous computing resources, how to rationally allocate video transcoding tasks to balance transcoding latency and transcoding quality, and maximize task efficiency?

Method used

By acquiring task information of video transcoding tasks, the transcoding latency and transcoding quality of video transcoding tasks on different processing units are predicted. Based on this information, task performance is determined, and the processing unit with the highest performance is selected for task allocation.

Benefits of technology

It improves the performance of video transcoding tasks on heterogeneous computing resources, and realizes the rational allocation of transcoding tasks and the maximization of performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121887995A_ABST
    Figure CN121887995A_ABST
Patent Text Reader

Abstract

The invention provides a video transcoding task scheduling method and device, a storage medium and equipment, and the method comprises the steps: obtaining the task information of a video transcoding task, predicting the transcoding time delay and transcoding quality of the video transcoding task on different processing units based on video parameters contained in the task information, and obtaining the transcoding time delay and transcoding quality of the video transcoding task; the task efficiency of the video transcoding task on different processing units is determined based on the transcoding time delay and the transcoding quality of the video transcoding task on different processing units, so that the video transcoding task is allocated based on the task efficiency of the video transcoding task on different processing units. The scheduling method can be applied to allocation of video transcoding tasks in heterogeneous computing resources, and the task efficiency of the video transcoding tasks is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of video processing technology, and in particular to a method and apparatus for scheduling video transcoding tasks, as well as a storage medium and device. Background Technology

[0002] In related technologies, video transcoding is a common video processing task. Typically, video transcoding tasks can be processed by a CPU (Central Processing Unit) or a VPU (Video Processing Unit). However, with the development and application of heterogeneous computing resources, more and more video processing systems are adopting heterogeneous computing resources. Since heterogeneous computing resources usually contain multiple processing resources, such as CPUs and VPUs, how to schedule and allocate video transcoding tasks among heterogeneous computing resources is a technical problem that needs to be solved. Summary of the Invention

[0003] The purpose of this disclosure is to provide a method, apparatus, storage medium, and device for scheduling video transcoding tasks, for scheduling and allocating video transcoding tasks in heterogeneous computing resources.

[0004] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0005] According to a first aspect of this disclosure, a method for scheduling a video transcoding task is provided. The method includes: acquiring task information of the video transcoding task, the task information including video parameters; predicting the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters; determining the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units; and determining the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units.

[0006] In some exemplary embodiments of this disclosure, each processing unit includes one or more parameter configurations; before predicting the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters, the method further includes: for each processing unit, selecting the parameter configuration with the fastest transcoding speed from one or more parameter configurations corresponding to the processing unit as the parameter configuration of the processing unit.

[0007] In some exemplary embodiments of this disclosure, the task information further includes video access frequency; determining the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units includes: determining the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, and the video access frequency.

[0008] In some exemplary embodiments of this disclosure, the task information further includes the maximum allowed transcoding latency of the video transcoding task; determining the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, and the video access frequency, includes: determining processing units whose transcoding latency is less than or equal to the maximum transcoding latency as candidate processing units based on the transcoding latency of the video transcoding task on different processing units; and determining the task performance of the candidate processing units based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing units, and the video access frequency.

[0009] In some exemplary embodiments of this disclosure, determining the task performance of the candidate processing unit based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing unit, and the video access frequency, includes: weighting the transcoding quality of the candidate processing unit based on the video access efficiency to obtain a first performance index; performing a difference operation on the maximum transcoding latency and the transcoding latency of the candidate processing unit to obtain a second performance index; and determining the task performance of the video transcoding task on the candidate processing unit based on the first performance index and the second performance index.

[0010] In some exemplary embodiments of this disclosure, determining the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units includes: determining the maximum task performance of the video transcoding task based on the task performance of the video transcoding task on different processing units; traversing each parameter configuration of each processing unit, and calculating the task performance and transcoding latency of the video transcoding task under the parameter configuration of the processing unit based on the video parameters; updating the maximum task performance based on the calculated task performance in response to the calculated transcoding latency being less than or equal to the maximum allowed transcoding latency of the video transcoding task and the task performance being greater than the maximum task performance; after completing the traversal, determining the processing unit corresponding to the updated maximum task performance as the target processing unit, and determining the parameter configuration of the target processing unit when the maximum task performance is obtained as the target parameter configuration of the target processing unit.

[0011] In some exemplary embodiments of this disclosure, determining the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units includes: determining the processing unit with the highest task performance as the target processing unit based on the task performance of the video transcoding task on different processing units.

[0012] According to a second aspect of this disclosure, a scheduling apparatus for video transcoding tasks is provided, comprising: The first acquisition module is used to acquire task information for the video transcoding task, the task information including video parameters.

[0013] The first prediction module is used to predict the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters.

[0014] The first determining module is used to determine the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units.

[0015] The second determining module is used to determine the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units.

[0016] In some exemplary embodiments of this disclosure, each processing unit includes one or more parameter configurations; the video transcoding task scheduling device may further include: a configuration selection module, used to select, for each processing unit, the parameter configuration with the fastest transcoding speed from one or more parameter configurations corresponding to the processing unit as the parameter configuration of the processing unit.

[0017] In some exemplary embodiments of this disclosure, the task information further includes video access frequency; a first determining module is used to determine the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, and the video access frequency.

[0018] In some exemplary embodiments of this disclosure, the task information further includes the maximum allowed transcoding latency of the video transcoding task; a first determining module is configured to determine, based on the transcoding latency of the video transcoding task on different processing units, processing units whose transcoding latency is less than or equal to the maximum transcoding latency as candidate processing units; and to determine the task performance of the candidate processing units based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing units, and the video access frequency.

[0019] In some exemplary embodiments of this disclosure, a first determining module is configured to perform weighted processing on the transcoding quality of the candidate processing unit based on the video access efficiency to obtain a first performance index; perform a difference operation on the maximum transcoding delay and the transcoding delay of the candidate processing unit to obtain a second performance index; and determine the task performance of the video transcoding task on the candidate processing unit based on the first performance index and the second performance index.

[0020] In some exemplary embodiments of this disclosure, the second determining module is configured to determine the maximum task performance of the video transcoding task based on the task performance of the video transcoding task on different processing units; traverse each parameter configuration of each processing unit, and calculate the task performance and transcoding latency of the video transcoding task under the parameter configuration of the processing unit based on the video parameters; in response to the calculated transcoding latency being less than or equal to the maximum allowed transcoding latency of the video transcoding task and the task performance being greater than the maximum task performance, update the maximum task performance based on the calculated task performance; after completing the traversal, determine the processing unit corresponding to the updated maximum task performance as the target processing unit, and determine the parameter configuration of the target processing unit when the maximum task performance is obtained as the target parameter configuration of the target processing unit.

[0021] In some exemplary embodiments of this disclosure, the second determining module is used to determine the processing unit with the highest task performance as the target processing unit based on the task performance of the video transcoding task on different processing units.

[0022] According to a third aspect of this disclosure, an electronic device is provided, including a processor and a memory, the memory being used to store executable instructions of the processor; wherein the processor is configured to perform the method described in any one of the first aspects by executing the executable instructions.

[0023] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the first aspects above.

[0024] The video transcoding task scheduling method, apparatus, storage medium, and device provided in this disclosure acquire task information for the video transcoding task. Based on the video parameters contained in the task information, they predict the transcoding latency and quality of the video transcoding task on different processing units. Based on the transcoding latency and quality of the video transcoding task on different processing units, they determine the task performance of the video transcoding task on different processing units, and then allocate the video transcoding task based on the task performance of the video transcoding task on different processing units. This scheduling method can be applied to the allocation of video transcoding tasks in heterogeneous computing resources, improving the task performance of video transcoding tasks.

[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0027] Figure 1 A flowchart of a video transcoding task scheduling method according to an embodiment of the present disclosure is shown; Figure 2 A flowchart of another video transcoding task scheduling method according to an embodiment of this disclosure is shown; Figure 3 A flowchart of another video transcoding task scheduling method according to an embodiment of this disclosure is shown; Figure 4 This is a schematic diagram of a method for determining an initialization allocation scheme provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of a task redistribution method provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of an application scenario provided by an embodiment of this disclosure; Figure 7 A schematic diagram of a video transcoding task scheduling device is shown in an embodiment of the present disclosure; Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0028] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0029] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0030] To facilitate understanding, some terms involved in the embodiments of this disclosure will be explained first.

[0031] CPU: The core computing and control component of a computer system, it performs data processing, logical operations, and system resource scheduling by executing instruction sequences. The CPU adopts a general-purpose computing architecture, featuring multi-stage pipelines, multi-core parallelism, and branch prediction, making it suitable for processing non-dedicated computing tasks such as operating system instructions and application programs. In multimedia processing scenarios, the CPU can perform audio and video processing through software encoding and decoding.

[0032] VPU: A coprocessor or hardware acceleration module dedicated to accelerating video data processing, which can work in conjunction with the CPU. VPUs achieve hardware-level optimization of operations such as video encoding and decoding, resolution conversion, and frame rate adjustment through fixed-function circuits (such as H.264 / H.265 codecs) or programmable computing arrays (such as AI (artificial intelligence) acceleration cores).

[0033] VBR (Variable Bit Rate): A coding strategy that dynamically adjusts the data compression rate, allocating bit resources in real time according to the complexity of the media content. It is widely used in video streaming, audio compression, and other fields. Compared to Fixed Bit Rate (CBR), VBR increases the bit rate during high dynamic range periods of video / audio to ensure quality, and decreases the bit rate during static periods to save storage space, achieving a balance between coding efficiency and quality.

[0034] DASH (Dynamic Adaptive Streaming over HTTP): An adaptive streaming media transmission protocol based on HTTP. It divides media content into multiple segments and stores them with multiple bitrate versions (representations). The client dynamically selects the optimal bitrate version based on real-time network conditions (such as bandwidth and latency) and terminal performance (such as decoding capabilities and buffer status), achieving a balance between smooth playback and adaptive picture quality.

[0035] In related technologies, Dynamic Adaptive Streaming (DASH) technology based on HTTP requires generating multiple transcoded versions (representations) of the same video content with different bitrates and resolutions. This process involves large-scale video transcoding computation. To optimize bandwidth utilization and video quality, Variable Bit Rate (VBR) coding technology is widely used in modern streaming technologies. However, VBR transcoding complexity is significantly higher than Constant Bit Rate (CBR) coding, and computational requirements change dynamically with the video content. In this context, the rational allocation of video transcoding tasks is crucial, especially in heterogeneous computing architectures where the transcoding efficiency of different processing units varies significantly. Therefore, how to schedule tasks to balance transcoding latency and quality, maximizing task performance, is the core focus of task scheduling.

[0036] To address the aforementioned problems in related technologies, this disclosure provides a method, apparatus, storage medium, and device for scheduling video transcoding tasks. By predicting the transcoding latency and quality of video transcoding tasks on different processing units, and based on these latency and quality, the task performance of video transcoding tasks on different processing units is determined. Therefore, based on the task performance of video transcoding tasks on different processing units, video transcoding tasks are allocated, achieving a reasonable allocation of video transcoding tasks and improving their overall performance.

[0037] The following examples illustrate the solutions provided in this disclosure.

[0038] Figure 1A flowchart illustrating a video transcoding task scheduling method according to an embodiment of this disclosure is shown. This method can be executed by an electronic device, which can be any device with video transcoding capabilities. For example, in some examples, the electronic device can be equipped with multiple different processing units, which may include one or more homogeneous processing units, or one or more heterogeneous processing units, such as one or more CPUs and one or more VPUs. In some examples, each processing unit on the electronic device can independently complete the video transcoding task.

[0039] like Figure 1 As shown, in some embodiments, the video transcoding task scheduling method provided in this disclosure may include the following steps.

[0040] In step S101, the task information of the video transcoding task is obtained, including video parameters.

[0041] The task information referred to in this embodiment includes at least the video parameters of the video to be transcoded, but is not limited to video parameters. For example, in some implementations, the task information may also include at least one of the maximum allowed transcoding latency of the video transcoding task and the video access frequency. The video access frequency refers to the number of times the video is accessed or played per unit time.

[0042] In some implementations, video parameters may include one or more of video length, frame rate, resolution, and bit rate. However, they are not limited to the parameters listed herein.

[0043] In some exemplary embodiments, the task information referred to in these embodiments can be received through a preset human-machine interface. For example, in some examples, the user can configure the task information through a configuration interface provided by the electronic device, and the electronic device can obtain the user-configured task information from the configuration interface. Of course, this is only an example of how to obtain task information, and not the only limitation.

[0044] In step S103, based on video parameters, the transcoding latency and transcoding quality of the video transcoding task are predicted on different processing units.

[0045] In some implementations, each processing unit on the electronic device can be configured with a fixed parameter configuration. In this case, the transcoding latency and transcoding quality of the video transcoding task on different processing units (such as one or more CPUs with different parameter configurations, and one or more VPUs with different parameter configurations) can be predicted directly based on the video parameters carried in the task information.

[0046] In other implementations, each processing unit on the electronic device can be configured with one or more optional parameter configurations. When performing a transcoding task, a parameter configuration can be selected from one or more parameter configurations as the parameter configuration for the processing unit. For example, in some examples, before predicting the transcoding latency and transcoding quality of a video transcoding task on different processing units based on video parameters, the parameter configuration with the fastest transcoding speed can be selected from one or more parameter configurations corresponding to each processing unit as the parameter configuration for that processing unit. This allows the task performance of the processing unit under the condition of fastest transcoding speed to be calculated.

[0047] The transcoding speed corresponding to different parameter configurations can be obtained by collecting and statistically analyzing the transcoding speeds of different parameter configurations in actual transcoding tasks. Alternatively, it can be predicted by a pre-defined first prediction model. The input to the first prediction model can be, for example, multiple parameter configurations of the same processing unit, and the output can be the transcoding speed corresponding to each parameter configuration. The first prediction model can be trained using model training methods provided by relevant technologies. The training samples can be, for example, multiple parameter configurations of the processing unit, and the sample labels can be, for example, the transcoding speed corresponding to each parameter configuration.

[0048] In the embodiments of this disclosure, there are various methods for predicting the transcoding latency and transcoding quality of video transcoding tasks on different processing units based on video data.

[0049] For example, in some cases, regression analysis can be used to predict the transcoding latency and quality of video transcoding tasks on different processing units. The regression analysis model can be represented as follows: (1) (2) (3) in, This represents the bit rate when video transcoding task i is on processing unit j, and the parameters of processing unit j are configured as parameter configuration k. This indicates the video quality when video transcoding task i is performed on processing unit j, and the parameters of processing unit j are configured as parameter configuration k. This represents the transcoding latency when video transcoding task i is on processing unit j and the parameters of processing unit j are configured as parameter configuration k. , , , representing the parameters fitted by parameter configuration k for processing unit j in the regression analysis. The bitrate after transcoding when the resolution of the transcoded video is higher than the current resolution of the video. This refers to the quality of the transcoded video when the resolution is higher than the current resolution of the original video. This is the bitrate value for the highest resolution video transcoding requested for video transcoding task i.

[0050] It should be noted that, to ensure prediction accuracy, a corresponding regression analysis model can be trained separately for each parameter of each processing unit. Before using the regression analysis model to predict the transcoding latency and quality of a video transcoding task on a certain processing unit (such as a CPU or VPU), the transcoding latency, video quality, bitrate, and other parameters can be obtained by transcoding the video under different resolutions and parameter configurations of that processing unit. The regression analysis model can then be trained using these parameters to obtain the regression analysis model of that processing unit under different parameter configurations, as well as the regression analysis model in the model. , , The value of .

[0051] It should also be noted that, in some embodiments, the transcoding quality referred to in the present disclosure can be expressed as the video quality described above, or as the video quality described above. Divide by The video quality representation obtained at a unit bit rate is not specifically limited in this embodiment of the disclosure.

[0052] For example, in other examples, pre-trained artificial intelligence (AI) models (such as the XGBoost model) can be used to predict the transcoding latency and quality of video transcoding tasks on different processing units.

[0053] Similar to regression analysis models, in some implementations, a separate AI model can be trained for each parameter of each processing unit. The training samples for this AI model can be video parameters of the video, such as bitrate, resolution, video length, and frame rate. The sample labels are transcoding latency and transcoding quality. For example, in some examples, the above AI model can be represented as follows: (4) in, For processing unit j, the XGBoost model is trained with parameter configuration k. Let i be the video bitrate before transcoding. For video resolution, For video length, This refers to the video frame rate.

[0054] In step S105, the task performance of the video transcoding task on different processing units is determined based on the transcoding latency and transcoding quality of the video transcoding task on different processing units.

[0055] In some implementations, the performance of a video transcoding task on different processing units can be determined directly based on the transcoding latency and transcoding quality of the video transcoding task on each processing unit.

[0056] In other implementations, processing units whose transcoding latency is less than or equal to the maximum transcoding latency required by the video transcoding task can be identified from the electronic device as candidate processing units based on the transcoding latency of the video transcoding task on each processing unit. Further, the task performance of the video transcoding task on the candidate processing units is determined based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing units.

[0057] In the embodiments of this disclosure, there can be various methods for determining task performance.

[0058] For example, in some exemplary implementations, the task performance of the video transcoding task on the processing unit can be calculated using the following expression: (5) Where a and b are weighting coefficients, which are constants. This refers to the transcoding delay of processing unit j for video transcoding task i under parameter configuration k. This refers to the transcoding quality of processing unit j for video transcoding task i, given parameter configuration k. In some examples, This can be understood as video quality per unit bit rate, and its expression is: (6) For example, in other exemplary embodiments, the performance of the video transcoding task on different processing units / candidate processing units can be determined based on the transcoding latency and transcoding quality of the video transcoding task on different processing units / candidate processing units, as well as the video access frequency, as expressed below: (7) in, This represents the performance of processing unit j for video transcoding task i, given parameter configuration k. This represents the maximum allowed transcoding latency for the video transcoding task. It can be represented as follows: (8) in, This indicates the video access frequency. In other words, in some implementations, the transcoding quality of the processing unit (which can also be a candidate processing unit if pre-selected) can be weighted based on video access efficiency to obtain a first performance index (i.e., The second performance index (i.e., the difference between the maximum allowed transcoding latency of the video transcoding task and the transcoding latency of the processing unit / candidate processing unit) is obtained. and The difference between the two performance indicators is used to determine the performance of the video transcoding task on the processing unit / candidate processing unit. The transcoding quality of the processing unit is weighted by video access efficiency, aiming to increase the transcoding quality of videos with high access frequency and decrease the transcoding quality of videos with low access frequency, thus achieving a trade-off between video quality and video transcoding efficiency.

[0059] In step S107, the target processing unit for executing the video transcoding task is determined based on the task performance of the video transcoding task on different processing units.

[0060] For example, in some cases, the processing unit with the highest task performance can be identified as the target processing unit based on the task performance of the video transcoding task across different processing units. The video transcoding task is then processed by the target processing unit.

[0061] according to Figure 1 In this embodiment, the video transcoding task scheduling method provided by this disclosure obtains the task information of the video transcoding task, predicts the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters contained in the task information, and determines the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units. Thus, based on the task performance of the video transcoding task on different processing units, the scheduling and allocation of the video transcoding task in heterogeneous computing resources can be realized, which is beneficial to improving the task performance of the video transcoding task.

[0062] Figure 2 A flowchart illustrating another video transcoding task scheduling method according to an embodiment of this disclosure is shown. Figure 2 In the illustrated embodiment, each processing unit may include one or more parameter configurations. Initially, each processing unit uses the parameter configuration with the fastest transcoding speed corresponding to that processing unit as its initial parameter configuration, and calculates the task performance of the video transcoding task under different processing units. In this case, the method for determining the target processing unit to perform the video transcoding task based on the task performance of the video transcoding task on different processing units may include the following steps.

[0063] In step S201, the maximum task performance of the video transcoding task is determined based on the task performance of the video transcoding task on different processing units.

[0064] In step S203, each parameter configuration of each processing unit is traversed, and based on the video parameters, the task performance and transcoding latency of the video transcoding task under each parameter configuration of each processing unit are calculated.

[0065] In step S205, in response to the calculated transcoding delay being less than or equal to the maximum transcoding delay allowed for the video transcoding task and the task performance being greater than the maximum task performance, the maximum task performance is updated based on the calculated task performance.

[0066] In step S207, after the traversal is completed, the processing unit corresponding to the updated maximum task performance is determined as the target processing unit, and the parameter configuration of the target processing unit when it obtains the maximum task performance is determined as the target parameter configuration of the target processing unit.

[0067] For example, suppose an electronic device contains two processing units: a CPU and a VPU. The CPU has three selectable parameter configurations: A1, A2, and A3. The VPU also has three selectable parameter configurations: B1, B2, and B3. The CPU has the fastest transcoding speed when using parameter configuration A1, while the VPU has the fastest transcoding speed when using parameter configuration B1. Initially, we use A1 as the CPU's parameter configuration and B1 as the VPU's parameter configuration, and calculate the performance of the video transcoding task on both the CPU and VPU. Assuming the video transcoding task has a performance of 50% on the CPU and 30% on the VPU, we define 50% as the maximum performance.

[0068] Furthermore, the CPU parameter configuration is switched to parameter configuration A2, and the task performance and transcoding latency of the video transcoding task are calculated when the CPU obtains parameter configuration A2. The task performance can be calculated using the following expression, and the transcoding latency can be calculated using... Figure 1 The method in the embodiments predicts this.

[0069] (9)

[0070] in, The transcoding latency of video transcoding task i on the processing unit that achieves maximum task performance (CPU in this example, parameter configured as A1). This represents the transcoding latency of video transcoding task i under the l-th parameter configuration of processing unit j. In this example, it represents the transcoding latency of video transcoding task i under the CPU parameter configuration A2. The meaning and calculation method can be found in expression (8), and will not be repeated here.

[0071] If the video transcoding task's CPU performance is less than 50% at this time, for example, 20%, then the maximum performance remains unchanged. If the video transcoding task's CPU performance is greater than or equal to 50%, for example, 60%, and the transcoding latency is less than or equal to the maximum allowed transcoding latency (i.e., ... , If the maximum allowed transcoding latency for the video transcoding task is set, then the maximum task performance is updated to 60%. Then, the CPU parameter configuration is switched to parameter configuration A3, and the above task performance calculation and maximum task performance update process are repeated.

[0072] After iterating through all CPU parameter configurations, the process continues by iterating through the VPU parameter configurations. For example, the VPU parameter configuration can be switched to configuration B2, and the task performance and transcoding latency of the video transcoding task when the VPU obtains configuration B2 are calculated. Assuming the maximum task performance is updated to 60% after iterating through all CPU parameter configurations, if the task performance of the video transcoding task on the VPU is less than 60% at this point, for example, 20%, then the maximum task performance remains unchanged. If the task performance of the video transcoding task on the VPU is greater than or equal to 60%, for example, 70%, and the transcoding latency is less than or equal to the maximum allowed transcoding latency of the video transcoding task, then the maximum task performance is updated to 70%. Then, the VPU parameter configuration is switched to configuration B3, and the above calculation of task performance and the update process of the maximum task performance are repeated to obtain the updated maximum task performance, for example, 70%.

[0073] After completing the traversal of all parameter configurations for the CPU and VPU, the processing unit corresponding to the maximum task performance obtained in the final update, such as the VPU, is determined as the target processing unit. The parameter configuration of the target processing unit when it achieves the maximum task performance (such as parameter configuration B2) is determined as the target parameter configuration of the target processing unit.

[0074] according to Figure 2In this embodiment, for each processing unit on the electronic device, the parameter configuration with the fastest transcoding speed is first used as the initial parameter configuration for the processing unit. The task efficiency and transcoding latency of the video transcoding task on each processing unit are calculated, and the maximum task efficiency is determined with transcoding speed as the priority. Then, using this maximum task efficiency as a reference, each parameter configuration of each processing unit is traversed, and the task efficiency of the video transcoding task under each parameter configuration of each processing unit is determined. The maximum task efficiency is continuously updated while meeting the requirement of maximum transcoding latency, resulting in the processing unit and parameter configuration corresponding to the achievement of maximum task efficiency. This facilitates the rapid and accurate search for a task allocation scheme that meets the maximum transcoding latency requirement and maximizes task efficiency. Furthermore, when determining the optimal allocation scheme, the differences in parameter configurations of different processing units are fully considered, improving the accuracy of task allocation.

[0075] Figure 3 A flowchart of another video transcoding task scheduling method according to an embodiment of this disclosure is shown.

[0076] In step S301, a video segment is selected and transcoded by each processing unit in the electronic device to obtain the transcoding delay and transcoding quality.

[0077] In step S303, a regression analysis module and / or XGBoost model are configured for each parameter of each processing unit, and trained using the data obtained in step S301 to obtain the trained regression analysis module and / or XGBoost model.

[0078] In step S305, the task information of the video transcoding task is obtained, and parameters such as video parameters, maximum transcoding latency, and video access frequency are parsed to obtain them.

[0079] In step S307, the initial parameter configuration of each processing unit is initialized.

[0080] In step S309, for each processing unit, the corresponding regression analysis module and / or XGBoost model are configured with the video parameter input and initial parameters. Based on the model output, the task performance of the video transcoding task on each processing unit is calculated, and the one with the highest task performance is determined as the initial allocation scheme.

[0081] for example, Figure 4 This is a schematic diagram illustrating a method for determining an initialization allocation scheme provided in an embodiment of this disclosure. For example... Figure 4 As shown. In some examples, the initial allocation scheme can be determined using the following method.

[0082] In step S401, the parameter configuration of each processing unit is initialized to the parameter configuration with the fastest transcoding speed corresponding to that processing unit.

[0083] In step S403, the task efficiency of the video transcoding task under the allocation scheme to each processing unit is calculated.

[0084] Each video transcoding task is assigned to a specific allocation scheme on each processing unit.

[0085] In step S405, the allocation schemes are sorted according to task performance to form a queue.

[0086] In step S407, the allocation scheme with the highest task efficiency is selected.

[0087] In step S409, it is determined whether the scheme meets the constraint of maximum transcoding delay. If yes, step S411 is executed; otherwise, step S413 is executed.

[0088] In step S411, the scheme is used as the initial allocation scheme, and all schemes are removed from the queue.

[0089] In step S413, the scheme is removed from the queue.

[0090] In step S415, it is determined whether the queue is empty. If it is, step S416 is executed; otherwise, the process proceeds to step S407.

[0091] In step S417, the process ends.

[0092] In step S311, the task efficiency of the video transcoding task on each parameter configuration of each processing unit is calculated, and the allocation scheme with the highest task efficiency and the transcoding latency meeting the maximum transcoding latency requirement is selected as the final scheme.

[0093] Example, Figure 5 This is a schematic diagram of a task redistribution method provided in an embodiment of this disclosure. Figure 5 As shown. In some examples, video transcoding tasks can be redistributed using the following methods.

[0094] In step S501, the task performance and transcoding latency of the video transcoding task under each parameter configuration of each processing unit are calculated.

[0095] The allocation of video transcoding tasks to each parameter configuration in each processing unit is based on an allocation scheme.

[0096] In step S503, all allocation schemes are sorted according to task efficiency to form a queue.

[0097] In step S505, a scheme is extracted from the queue.

[0098] In step S507, it is determined whether the task performance of the proposed scheme is greater than that of the initial allocation scheme and meets the maximum transcoding latency requirement. If so, step S509 is executed; otherwise, step S511 is executed.

[0099] In step S509, the initial allocation scheme is updated to this scheme, and the scheme is removed from the queue.

[0100] In step S511, the scheme is removed from the queue.

[0101] In step S513, it is determined whether the queue is empty. If it is, step S515 is executed; otherwise, the process jumps to step S505 to continue execution.

[0102] In step S515, the process ends.

[0103] Example, Figure 6 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. In this scenario, the electronic device is equipped with i CPUs and i VPUs, each CPU and VPU having multiple selectable parameter configurations. For example... Figure 6 As shown, upon receiving a transcoding request (including task information for the video transcoding task), initial parameter configurations can be selected for each CPU and VPU. Initial task allocation is then performed under these initial parameter configurations. During task allocation initialization, the task performance and transcoding latency of the video transcoding task on each CPU and VPU need to be calculated. The allocation scheme that maximizes task performance and whose transcoding latency is less than or equal to the maximum allowed transcoding latency of the video transcoding task is selected as the initial allocation scheme.

[0104] Further task reallocation is performed, iterating through each parameter configuration of each CPU and each parameter configuration of each VPU to determine the task performance and transcoding latency of the video transcoding task under each CPU's parameter configuration, and the task performance and transcoding latency under each VPU's parameter configuration. If the task performance of the iterated scheme is greater than that of the initial allocation scheme and satisfies the maximum transcoding latency constraint, the initial allocation scheme is updated to that scheme. This process continues until the end of the iteration, obtaining the scheme with the highest task performance that also satisfies the maximum transcoding latency constraint, and then assigning tasks according to this scheme.

[0105] Figure 6 The implementation method and beneficial effects of the embodiments can be found in [reference]. Figures 1-5 Any of the embodiments described herein will not be repeated here.

[0106] Figure 7 This diagram illustrates a scheduling apparatus for a video transcoding task according to an embodiment of the present disclosure. Figure 7As shown, in some embodiments, the video transcoding task scheduling device (hereinafter referred to as scheduling device) 700 may include: The first acquisition module 701 is used to acquire task information of the video transcoding task, the task information including video parameters.

[0107] The first prediction module 702 is used to predict the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters.

[0108] The first determining module 703 is used to determine the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units.

[0109] The second determining module 704 is used to determine the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units.

[0110] In some exemplary embodiments of this disclosure, each processing unit includes one or more parameter configurations; the video transcoding task scheduling device may further include: a configuration selection module, used to select, for each processing unit, the parameter configuration with the fastest transcoding speed from one or more parameter configurations corresponding to the processing unit as the parameter configuration of the processing unit.

[0111] In some exemplary embodiments of this disclosure, the task information further includes video access frequency; a first determining module 703 is used to determine the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, and the video access frequency.

[0112] In some exemplary embodiments of this disclosure, the task information further includes the maximum allowed transcoding latency of the video transcoding task; the first determining module 703 is used to determine, based on the transcoding latency of the video transcoding task on different processing units, processing units whose transcoding latency is less than or equal to the maximum transcoding latency as candidate processing units; and to determine the task performance of the candidate processing units based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing units, and the video access frequency.

[0113] In some exemplary embodiments of this disclosure, the first determining module 703 is used to perform weighted processing on the transcoding quality of the candidate processing unit based on the video access efficiency to obtain a first performance index; perform a difference operation on the maximum transcoding delay and the transcoding delay of the candidate processing unit to obtain a second performance index; and determine the task performance of the video transcoding task on the candidate processing unit based on the first performance index and the second performance index.

[0114] In some exemplary embodiments of this disclosure, the second determining module 704 is configured to determine the maximum task performance of the video transcoding task based on the task performance of the video transcoding task on different processing units; traverse each parameter configuration of each processing unit, and calculate the task performance and transcoding latency of the video transcoding task under the parameter configuration of the processing unit based on the video parameters; in response to the calculated transcoding latency being less than or equal to the maximum allowed transcoding latency of the video transcoding task and the task performance being greater than the maximum task performance, update the maximum task performance based on the calculated task performance; after completing the traversal, determine the processing unit corresponding to the updated maximum task performance as the target processing unit, and determine the parameter configuration of the target processing unit when the maximum task performance is obtained as the target parameter configuration of the target processing unit.

[0115] In some exemplary embodiments of this disclosure, the second determining module 704 is used to determine the processing unit with the highest task performance as the target processing unit based on the task performance of the video transcoding task on different processing units.

[0116] Figure 7 The execution method and beneficial effects of the scheduling device in the embodiment can be found in [reference needed]. Figures 1-6 Any of the embodiments described herein will not be repeated here.

[0117] In some embodiments, this disclosure also provides an electronic device including a processor and a memory, the memory being used to store executable instructions of the processor; wherein the processor is configured to perform the method in any of the above method embodiments by executing the executable instructions.

[0118] Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Referring below... Figure 8 To describe an electronic device 800 according to this embodiment of the present invention. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0119] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810 (included in one or more processors), at least one storage unit 820 (included in one or more memories), and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).

[0120] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention.

[0121] Storage unit 820 may include readable media in the form of volatile storage units, such as random access memory (RAM) 821 and / or cache memory 822, and may further include read-only memory (ROM) 823.

[0122] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0123] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0124] Electronic device 800 can also communicate with one or more external devices 840 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0125] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0126] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.

[0127] A program product for implementing the above-described method according to embodiments of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, 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 thereof.

[0129] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0130] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0131] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0132] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0133] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0134] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A method for scheduling video transcoding tasks, characterized in that, include: Obtain task information for the video transcoding task, the task information including video parameters; Based on the video parameters, predict the transcoding latency and transcoding quality of the video transcoding task on different processing units; Based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, the task performance of the video transcoding task on different processing units is determined. Based on the performance of the video transcoding task on different processing units, the target processing unit for executing the video transcoding task is determined.

2. The method according to claim 1, characterized in that, Each processing unit includes one or more parameter configurations; Before predicting the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters, the method further includes: For each processing unit, the parameter configuration with the fastest transcoding speed is selected from one or more parameter configurations corresponding to the processing unit as the parameter configuration of the processing unit.

3. The method according to claim 2, characterized in that, The task information also includes video access frequency; The process of determining the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units includes: Based on the transcoding latency and quality of the video transcoding task on different processing units, and the video access frequency, the task performance of the video transcoding task on different processing units is determined.

4. The method according to claim 3, characterized in that, The task information also includes the maximum allowed transcoding latency for the video transcoding task; The determination of the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units, and the video access frequency, includes: Based on the transcoding latency of the video transcoding task on different processing units, processing units with transcoding latency less than or equal to the maximum transcoding latency are identified as candidate processing units. The task performance of the candidate processing unit is determined based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing unit, as well as the video access frequency.

5. The method according to claim 4, characterized in that, The step of determining the task performance of the candidate processing unit based on the transcoding latency and transcoding quality of the video transcoding task on the candidate processing unit, and the video access frequency, includes: The transcoding quality of the candidate processing units is weighted based on the video access efficiency to obtain a first performance index. The second performance index is obtained by performing a difference operation between the maximum transcoding delay and the transcoding delay of the candidate processing unit; Based on the first performance index and the second performance index, the performance of the video transcoding task on the candidate processing unit is determined.

6. The method according to any one of claims 2-5, characterized in that, The step of determining the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units includes: Based on the task performance of the video transcoding task on different processing units, determine the maximum task performance of the video transcoding task. Iterate through each parameter configuration of each processing unit, and calculate the task performance and transcoding latency of the video transcoding task under the parameter configuration of the processing unit based on the video parameters; In response to the calculated transcoding latency being less than or equal to the maximum allowed transcoding latency of the video transcoding task and the task performance being greater than the maximum task performance, the maximum task performance is updated based on the calculated task performance; After completing the traversal, the processing unit corresponding to the updated maximum task performance is determined as the target processing unit, and the parameter configuration of the target processing unit when obtaining the maximum task performance is determined as the target parameter configuration of the target processing unit.

7. The method according to claim 1, characterized in that, The step of determining the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units includes: Based on the task performance of the video transcoding task on different processing units, the processing unit with the highest task performance is determined as the target processing unit.

8. A scheduling device for video transcoding tasks, characterized in that, include: The first acquisition module is used to acquire task information of the video transcoding task, the task information including video parameters; The first prediction module is used to predict the transcoding latency and transcoding quality of the video transcoding task on different processing units based on the video parameters. The first determining module is used to determine the task performance of the video transcoding task on different processing units based on the transcoding latency and transcoding quality of the video transcoding task on different processing units. The second determining module is used to determine the target processing unit for executing the video transcoding task based on the task performance of the video transcoding task on different processing units.

9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.