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

By creating tasks based on video characteristics and system resource conditions and performing intelligent scheduling, the problem of inefficiency in existing video transcoding scheduling is solved, and efficient utilization of resources and high-quality transcoding are achieved.

CN120455776APending Publication Date: 2025-08-08GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510419545.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing video transcoding scheduling methods fail to fully consider the characteristics and system resources of the video to be transcoding, resulting in inefficient execution of transcoding tasks, unbalanced resource utilization, and may even lead to transcoding failure due to unreasonable resource allocation.

Method used

Create tasks based on the image characteristics of the video to be transcoded and the target parameters of the transcoded video, and combine the current resource situation of the system to intelligently predict resource availability, reasonably arrange the execution timing of the transcoded task, and ensure efficient utilization of resources through task queues, priority sorting and dynamic scheduling strategies.

Benefits of technology

Improve the execution efficiency of video transcoding tasks, optimize resource utilization, avoid transcoding delays or failures, and ensure high-quality transcoding video output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455776A_ABST
    Figure CN120455776A_ABST
Patent Text Reader

Abstract

The invention provides a video transcoding task scheduling method and device, equipment and a storage medium, and the method comprises the steps: creating a video transcoding task according to the image features and transcoding target parameters of a to-be-transcoded video; predicting the current resource availability of the system according to the video transcoding task and the current available resource condition of the system; and if the current available resources are sufficient, starting a video transcoding process according to the video transcoding task to obtain a transcoded video file. According to the method, the video transcoding task is created according to the image features of the video to be transcoded and the transcoding target parameters, the resource availability is intelligently predicted in combination with the current resource condition of the system, and the execution time of the transcoding task is reasonably arranged. When resources are sufficient, the system can immediately start the transcoding process, and the task execution efficiency is improved. According to the method, the video transcoding efficiency, the resource utilization rate and the final transcoding quality are effectively improved, and the method is particularly suitable for a large-scale video processing scene in a cloud computing environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video transcoding, and in particular to a method, apparatus, device and storage medium for scheduling video transcoding tasks. Background Art

[0002] Video transcoding is an essential component of video processing and streaming services. With growing user demand for high-quality, multi-resolution, and diversely encoded videos, video transcoding tasks are becoming increasingly complex. Traditional video transcoding scheduling methods are typically based on fixed rules or a simple first-come, first-served (FIFO) strategy. These methods fail to fully consider the characteristics of the video being transcoded and the system's available resources, resulting in inefficient transcoding tasks, uneven resource utilization, and even transcoding failures due to improper resource allocation. Furthermore, in cloud computing environments or large-scale video platforms, video transcoding tasks often need to be dynamically allocated across multiple servers or compute nodes.

[0003] In summary, the defects in the existing technology need to be solved urgently. Summary of the Invention

[0004] The present invention provides a scheduling method, apparatus, device and storage medium for video transcoding tasks, which are used to address the defects in the existing technology, realize the creation of video transcoding tasks according to the image characteristics and transcoding target parameters of the video to be transcoded, and intelligently predict resource availability in combination with the current resource situation of the system, and reasonably arrange the execution timing of the transcoding tasks.

[0005] The present invention provides a method for scheduling video transcoding tasks, comprising:

[0006] Get the video to be transcoded;

[0007] Creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded;

[0008] Predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task;

[0009] If the currently available resources are sufficient, the video transcoding process is started according to the video transcoding task to obtain a transcoded video file.

[0010] According to a method for scheduling video transcoding tasks provided by the present invention, the step of creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded specifically includes:

[0011] Segmenting the video to be transcoded at preset time intervals to obtain a set of video frames;

[0012] Performing feature extraction on the video frame set to obtain video image features;

[0013] Determining target transcoding parameters of the video to be transcoded based on the video image characteristics, user needs, and playback environment, wherein the target transcoding parameters include target resolution, target bit rate, and target encoding format;

[0014] A video transcoding task is created according to the image features and transcoding target parameters of the video to be transcoded.

[0015] According to a method for scheduling a video transcoding task provided by the present invention, the step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to execute the video transcoding task specifically includes:

[0016] Predicting resource usage required for video transcoding based on the video image features of the video to be transcoded, wherein the resource usage includes CPU usage, memory usage, and storage space;

[0017] The resource occupancy status is compared with the current available resource status of the system to evaluate the current resource availability of the system.

[0018] According to a method for scheduling a video transcoding task provided by the present invention, after the step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions for executing the video transcoding task, the method further includes:

[0019] If the currently available resources are insufficient, the video transcoding task is added to the task queue according to the preset rules and marked as pending scheduling;

[0020] Schedule all video transcoding tasks in the waiting state.

[0021] According to a method for scheduling video transcoding tasks provided by the present invention, if currently available resources are insufficient, the step of adding the video transcoding task to a task queue according to preset rules and marking it as a waiting-to-be-scheduled state specifically includes:

[0022] The video transcoding task is encapsulated into a task object according to task information and marked as a to-be-scheduled state. The task information includes task creation time, task type, expected resource consumption and urgency.

[0023] According to a method for scheduling video transcoding tasks provided by the present invention, the step of scheduling all video transcoding tasks in a to-be-scheduled state specifically includes:

[0024] Determining the priority of the video transcoding task according to the task information;

[0025] Sort all video transcoding tasks to be scheduled according to the priority;

[0026] According to the sorting results, all video transcoding tasks in the waiting-for-scheduling state are scheduled.

[0027] According to a method for scheduling a video transcoding task provided by the present invention, after the step of starting a video transcoding process according to the video transcoding task and obtaining a transcoded video file if currently available resources are sufficient, the method further comprises:

[0028] Performing a quality check on the transcoded video file to determine whether it meets the preset transcoding parameters;

[0029] If the detection result does not meet the requirements, adjust the parameters and re-transcode until the transcoded video file meets the quality requirements.

[0030] The present invention also provides a scheduling device for video transcoding tasks, comprising:

[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for scheduling video transcoding tasks as described above is implemented.

[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for scheduling video transcoding tasks.

[0033] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for scheduling video transcoding tasks.

[0034] The present invention provides a method, apparatus, device, and storage medium for scheduling video transcoding tasks. These methods create a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded. Based on the video transcoding task and the system's currently available resources, they predict the system's current resource availability to determine whether the system is capable of executing the video transcoding task. If the currently available resources are sufficient, they initiate a video transcoding process based on the video transcoding task to obtain a transcoded video file. The present invention creates a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded, and intelligently predicts resource availability based on the system's current resource availability to rationally schedule the execution of the transcoding task. Compared to traditional scheduling methods, the present invention achieves rational task allocation and efficient resource utilization by introducing a task queue mechanism, task priority sorting, and a dynamic scheduling strategy. When resources are sufficient, the system can immediately initiate the transcoding process, improving task execution efficiency. When resources are insufficient, tasks are queued according to preset rules and sorted and scheduled based on factors such as urgency and resource requirements, ensuring that high-priority tasks are executed first. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 It is a flowchart of the method for scheduling video transcoding tasks provided by the present invention;

[0037] Figure 2 It is a structural diagram of the scheduling device for video transcoding tasks provided by the present invention;

[0038] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0039] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0040] In order to solve the problems in the prior art, the present invention proposes a scheduling method for video transcoding tasks, which can create video transcoding tasks based on the image features of the video to be transcoded and the transcoding target parameters, and intelligently predict resource availability based on the current resource situation of the system, and reasonably arrange the execution time of the transcoding task. The scheduling method for the video transcoding task is described below. Figure 1 As shown, including but not limited to the following steps:

[0041] Step 110: Obtain the video to be transcoded.

[0042] In step 110, the video to be transcoded is obtained from local storage, a network server, or a real-time acquisition terminal. Specifically, the video data is first received through a file management interface or a network communication protocol (such as HTTP, FTP, RTSP, etc.), and the video file format is parsed. The video acquisition module supports multiple video formats (such as MP4, AVI, MKV, etc.) and stores the received video data in a cache or temporary storage area for subsequent processing. To ensure data integrity, preliminary data verification and exception handling can also be performed, such as checking the integrity of the video file and verifying the checksum.

[0043] Step 120: Create a video transcoding task based on the image features of the video to be transcoded and the transcoding target parameters.

[0044] In step 120, the video to be transcoded obtained in step 110 is further processed. First, the video is frame segmented and decomposed into a set of video frames according to a preset time interval or based on a key frame segmentation algorithm. Subsequently, an image processing algorithm is used to extract key image features, such as resolution, color depth, encoding format, etc., from the segmented video frames. At the same time, the system determines the transcoding target parameters based on user input, target playback device and network environment. These parameters usually include target resolution, target bit rate and target encoding format. Combining the image features of the video frame with the preset transcoding target parameters, the task creation module constructs a transcoding task object, which encapsulates information such as task identification, task creation time, expected resource consumption and task urgency. The task object is then submitted to the task scheduling management module to provide a basis for subsequent resource prediction and scheduling.

[0045] Step 130: Based on the video transcoding task and the current available resources of the system, predict the current resource availability of the system to determine whether the current system has the conditions to execute the video transcoding task.

[0046] In this step, the expected resource requirement information (including CPU usage, memory usage, and storage space requirements) in the task object is compared with the current system resource monitoring data. By collecting real-time monitoring data, the current CPU load, memory utilization, and storage space status of each computing node are obtained. Combining the resource requirements of the video transcoding task and the system resource data, a pre-designed resource evaluation algorithm (for example, based on a historical data model or a simple threshold judgment) is used to evaluate whether the system currently has the conditions to execute the transcoding task. If the system resources meet the requirements of the transcoding task, the module outputs a "sufficient resources" signal; otherwise, it outputs a "insufficient resources" signal and marks the task as being in a waiting state, and then enters the task queue to wait for scheduling.

[0047] Step 140: If the currently available resources are sufficient, start the video transcoding process according to the video transcoding task to obtain a transcoded video file.

[0048] In step 140, after receiving the "sufficient resources" signal, the transcoding process is started immediately. According to the transcoding target parameters in the task object, the appropriate transcoding algorithm and parameter configuration are selected, and the video transcoding software or hardware acceleration engine is started to convert the format of the video to be transcoded. During the transcoding process, the system monitors the resource usage and transcoding progress of the transcoding process in real time, and dynamically adjusts the parameters when necessary to ensure stable and efficient transcoding. After the transcoding is completed, the generated transcoded video file is verified by the post-processing and quality detection module. The detection content includes indicators such as video clarity, frame rate, and encoding quality. Only when the preset standards are met, the final transcoded file will be saved to the target storage area or pushed to the corresponding video playback platform; otherwise, the system will readjust the transcoding parameters according to the feedback results, and repeat the transcoding until a video file that meets the quality requirements is obtained.

[0049] As a further optional embodiment, the step of creating a video transcoding task according to the image features and transcoding target parameters of the video to be transcoded specifically includes:

[0050] Segmenting the video to be transcoded at preset time intervals to obtain a set of video frames;

[0051] Performing feature extraction on the video frame set to obtain video image features;

[0052] Determining target transcoding parameters of the video to be transcoded based on the video image characteristics, user needs, and playback environment, wherein the target transcoding parameters include target resolution, target bit rate, and target encoding format;

[0053] A video transcoding task is created according to the image features and transcoding target parameters of the video to be transcoded.

[0054] In this embodiment, the obtained video to be transcoded is first pre-processed and the video is segmented according to a preset time interval. The specific steps are as follows:

[0055] By calling the video decoding interface, the video data is read frame by frame; the video is segmented according to the set time interval (for example, every 5 seconds or every fixed number of frames) to extract representative video frames; the extracted video frames are combined into a video frame set for subsequent feature extraction.

[0056] Next, an image processing algorithm is applied to each frame in the video frame set to extract key features. Specifically, the extracted image features include but are not limited to:

[0057] Resolution (e.g., pixel width and height);

[0058] Color depth (such as 24-bit, 32-bit, etc.);

[0059] Encoding format information;

[0060] Brightness, contrast, saturation and other related visual parameters.

[0061] The extracted image features can be stored in the form of data structures or feature vectors for subsequent module calls.

[0062] Based on the extracted image features, combined with user needs and the actual playback environment (such as target device characteristics, network bandwidth, etc.), the system determines the transcoding target parameters for the video to be transcoded. Specific operations include:

[0063] Analyze the statistical information of image features in the video frame set and evaluate the original parameters of the current video;

[0064] Based on the user-specified playback requirements or preset policies, the target resolution, target bit rate, and target encoding format are determined (for example, the target resolution is set to 720×480, the target bit rate is set to 1Mbps, and the target encoding format is set to H.265, etc.);

[0065] Output and record these transcoding target parameters so that they can be called when the transcoding task is executed.

[0066] Finally, based on the image features of the video to be transcoded and the determined transcoding target parameters, a video transcoding task is created. The specific implementation is as follows:

[0067] Encapsulate the relevant information of the video to be transcoded (including video file identifier, extracted image features, target parameters, and task creation time, etc.) into a task object;

[0068] Conduct a preliminary resource requirement assessment for the task object, such as estimating the CPU, memory, and storage usage required for the task;

[0069] Submit the task object to the task scheduling management module, and then dynamically schedule and execute it according to the system resource situation.

[0070] This embodiment realizes precise task creation based on video content characteristics and user needs, ensuring that subsequent video transcoding operations can adjust transcoding parameters in a targeted manner, improve transcoding efficiency and video quality, and also provides detailed task description information for the dynamic scheduling mechanism.

[0071] As a further optional embodiment, the step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions for executing the video transcoding task specifically includes:

[0072] Predicting resource usage required for video transcoding based on the video image features of the video to be transcoded, wherein the resource usage includes CPU usage, memory usage, and storage space;

[0073] The resource occupancy status is compared with the current available resource status of the system to evaluate the current resource availability of the system.

[0074] In order to determine the execution conditions of the video transcoding task, the system first estimates the various resources required in the transcoding process based on the video image characteristics of the video to be transcoded using a preset resource demand prediction model.

[0075] CPU usage prediction:

[0076] Based on the video's resolution, frame rate, encoding format, and image complexity, statistical models or machine learning algorithms (such as regression models) are used to predict the CPU load during the transcoding process. For example, high-resolution and high-frame-rate videos typically require higher processing power.

[0077] Memory usage prediction:

[0078] Calculate the memory requirements during the transcoding process based on the video frame data volume and the characteristics of the transcoding algorithm. The prediction model will take into account the cache requirements and the amount of intermediate data generated during the decoding and encoding processes;

[0079] Storage space demand forecast:

[0080] Estimate the storage space requirements for the transcoded file based on the original video data size and transcoding target parameters, while also considering the storage requirements for temporary files and intermediate results that may be generated during the transcoding process.

[0081] During resource forecasting, the system collects real-time resource usage data for the current compute node or cluster, including CPU load, memory usage, and available storage space. This data is obtained by the monitoring module and passed to the resource forecasting module in a standardized data format for comparison with the forecasted demand.

[0082] Compare the predicted resource usage with the system's current available resource data. This includes:

[0083] Compare the predicted CPU usage with the currently available CPU resources to determine whether there is sufficient computing power;

[0084] Compare the predicted memory requirements with the current system remaining memory to ensure that the data processing requirements during the transcoding process are met;

[0085] Compare the predicted storage space requirements with the current available storage space to confirm that there is enough space to store the transcoded video files and intermediate data.

[0086] The system summarizes the above comparison results and determines whether the resource execution conditions of the transcoding task are met based on the preset threshold.

[0087] According to the comparison results, if the system's current resources meet or exceed the predicted resource requirements, a "sufficient resources" signal is output, indicating that the system has the conditions to execute the video transcoding task; if the resources are insufficient, an "insufficient resources" signal is output, and the task is marked as pending and enters the task queue waiting for subsequent scheduling.

[0088] This embodiment implements the comparison of resource demand prediction based on video image features with real-time resource data, ensuring that the video transcoding process is started only when system resources are sufficient, thereby improving overall resource utilization and the success rate of transcoding task execution.

[0089] As a further optional embodiment, after the step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions for executing the video transcoding task, the method further includes:

[0090] If the currently available resources are insufficient, the video transcoding task is added to the task queue according to the preset rules and marked as pending scheduling;

[0091] Schedule all video transcoding tasks in the waiting state.

[0092] After the resource prediction module outputs the "insufficient resources" signal, the system determines that the currently available system resources cannot meet the execution requirements of the video transcoding task. To prevent tasks from being stuck in a waiting state due to insufficient resources, this embodiment introduces a task queue management mechanism to achieve unified management and dynamic scheduling of scheduled tasks.

[0093] The system encapsulates transcoding tasks that cannot be executed immediately into task objects, which contain information such as the task creation time, task type, expected resource consumption, and urgency. Task objects are added to the task queue based on pre-set rules (e.g., first-come, first-served, urgency-based, and expected resource consumption). The task is also marked as "pending scheduling" to facilitate subsequent scheduling modules' identification and prioritization of pending tasks.

[0094] The system has a task queue monitoring module that monitors the number of tasks in the queue, wait times, and changes in task attributes in real time. Based on the attributes of the task objects, the system prioritizes all pending tasks in the queue using pre-set scheduling rules. For example, the system can perform a weighted calculation based on task urgency and wait times to ensure that high-priority tasks receive resources as quickly as possible. As system resource availability changes, the task queue monitoring module dynamically adjusts task ranking and triggers task scheduling when resources become available.

[0095] When the system detects an improvement in resource conditions or resource release, the scheduling module selects each task to be scheduled based on the current task queue's sorting results, determining whether its resource requirements meet the currently available resources. If so, the task is removed from the queue and the video transcoding process is initiated. The scheduling module can also employ a batch scheduling strategy to ensure that even under high system load, resource contention is avoided by launching multiple tasks simultaneously. For scheduled tasks, the system updates their status to "Executing" and monitors resource usage in real time during task execution to ensure smooth transcoding.

[0096] Through the above embodiments, the present invention realizes the intelligent queuing and dynamic scheduling management of video transcoding tasks under the condition of insufficient resources, effectively avoiding the transcoding delay or failure caused by unreasonable resource allocation, and further improving the overall resource utilization and task execution efficiency of the system.

[0097] As a further optional embodiment, if currently available resources are insufficient, the step of adding the video transcoding task to a task queue according to a preset rule and marking the task as being in a to-be-scheduled state specifically includes:

[0098] The video transcoding task is encapsulated into a task object according to task information and marked as a to-be-scheduled state. The task information includes task creation time, task type, expected resource consumption and urgency.

[0099] In this embodiment, after the system detects that the currently available resources are insufficient to meet the execution conditions of the video transcoding task, the task encapsulation module will encapsulate the video transcoding task. The specific steps are as follows:

[0100] The system collects task-related information from the video to be transcoded and its processing flow, including but not limited to:

[0101] Task creation time: records the timestamp of task generation, which serves as an important basis for subsequent task sorting and scheduling;

[0102] Task type: Determine the type or category of the task based on video content, transcoding requirements, or business needs;

[0103] Expected resource consumption: Based on the video's image characteristics, transcoding target parameters, and historical data, estimate resource indicators such as CPU usage, memory usage, and storage space that may be consumed during task execution;

[0104] Urgency: Determine the urgency of a task based on user needs, task priority, or system preset rules to distinguish urgent tasks from ordinary tasks.

[0105] Encapsulate the collected task information into a task object. During the encapsulation process, the task object structure should include all of the above information and reserve fields for subsequent expansion to accommodate more dimensional task scheduling needs. The encapsulated task object has a unique identifier, making it easier to find and track during subsequent scheduling management.

[0106] The encapsulated task objects are marked as "pending scheduling." Subsequently, they are added to the task queue according to pre-set rules (such as first-come, first-served, urgency, or expected resource consumption). The task queue management module monitors the queue status in real time and dynamically adjusts the order of tasks in the queue based on system resource changes and task information, ensuring that urgent or high-priority tasks are prioritized for execution once resources are restored.

[0107] Through the above implementation, the present invention realizes the unified encapsulation and orderly queuing of video transcoding tasks under the condition of insufficient resources, effectively ensuring that the tasks to be scheduled can respond and execute quickly when system resources permit, and also provides sufficient information basis for subsequent dynamic scheduling and resource optimization.

[0108] As a further optional embodiment, the step of scheduling all video transcoding tasks in a to-be-scheduled state specifically includes:

[0109] Determining the priority of the video transcoding task according to the task information;

[0110] Sort all video transcoding tasks to be scheduled according to the priority;

[0111] According to the sorting results, all video transcoding tasks in the waiting-for-scheduling state are scheduled.

[0112] In this embodiment, all video transcoding tasks in the task queue that are waiting to be scheduled are first scanned to extract the task information of each task, including the task creation time, task type, expected resource consumption, and urgency. Then, each task is evaluated according to the preset priority rules. For example:

[0113] Assign higher priority to tasks with higher urgency;

[0114] Tasks with earlier creation time or lower expected resource consumption can be given a certain weight;

[0115] Taking all factors into consideration, the priority score of each task is calculated.

[0116] This step ensures that each task can obtain an objective and quantitative priority ranking basis based on task information.

[0117] After determining the priority of each task, the scheduling module sorts all tasks in the scheduled state according to their priority scores. The sorting process can use common sorting algorithms (such as quick sort or heap sort) to ensure that the tasks in the task queue are arranged in descending order of priority.

[0118] After sorting, the system generates a list of task execution order to ensure that high-priority tasks are at the front of the queue.

[0119] At the same time, an interface for dynamic adjustment of the sorting mechanism can be reserved to update the task sorting order in a timely manner when task information or system resource status changes.

[0120] The scheduling module selects the highest priority task from the queue according to the sorting results and determines whether the current system resources meet the execution requirements of the task. The specific scheduling process is as follows:

[0121] For each task, first check the match between the estimated resource requirements and the currently available resources of the system;

[0122] If the resource meets the conditions, the task is extracted from the queue, the corresponding video transcoding process is started, and the task status is updated to "Executing";

[0123] If resources are temporarily insufficient, keep the task in the queue while continuing to monitor system resource changes;

[0124] When system resources improve, tasks in the queue are rescheduled based on the latest sorting results to ensure the efficiency and timeliness of overall scheduling.

[0125] Through the above-mentioned implementation mode, the present invention realizes priority determination, sorting and dynamic scheduling management based on task information, so that all video transcoding tasks to be scheduled can be executed in an orderly manner according to preset rules, thereby improving system resource utilization and task execution efficiency, ensuring that high-priority tasks can be executed first when resources permit, and optimizing the overall video transcoding process.

[0126] As a further optional embodiment, after the step of starting a video transcoding process according to the video transcoding task and obtaining a transcoded video file if currently available resources are sufficient, the method further includes:

[0127] Performing a quality check on the transcoded video file to determine whether it meets the preset transcoding parameters;

[0128] If the detection result does not meet the requirements, adjust the parameters and re-transcode until the transcoded video file meets the quality requirements.

[0129] After the transcoding process is completed, the quality detection module will detect the generated transcoded video file. The detection content includes but is not limited to:

[0130] Video resolution and frame rate: Compare the actual resolution and frame rate of the transcoded video with the preset transcoding parameter requirements to see if they are consistent;

[0131] Bit rate and compression ratio: Check whether the video encoding process meets the predetermined bit rate requirements to ensure a balance between video clarity and file size;

[0132] Video encoding format: Verify whether the encoding format of the transcoded video meets the target standard;

[0133] Other image quality indicators: such as color accuracy, noise level, motion blur, etc., to ensure that the video visual effects meet the expected standards.

[0134] The detection results are compared with the preset transcoding parameters to determine whether the transcoded video file meets the quality requirements.

[0135] If the quality test results show that the transcoded video file does not meet the preset requirements, the system will initiate a parameter feedback adjustment mechanism. The specific steps are as follows:

[0136] Analyze the causes of deviations: By comparing the test data with the target parameters, analyze the reasons for the substandard transcoding quality, such as unreasonable transcoding parameter settings, mismatched algorithm selection, or abnormal conditions caused by system resource fluctuations;

[0137] Adjust transcoding parameters: Based on the analysis results, make appropriate adjustments to the original transcoding parameters. For example, if the bitrate is too low and the video is blurry, increase the target bitrate appropriately; if there is a deviation in the resolution adjustment, recalibrate the target resolution, etc.

[0138] Restart the transcoding process: Feedback the adjusted parameters to the transcoding module to restart the video transcoding process. This process can be achieved through a preset feedback loop until the detection results meet the preset transcoding parameters.

[0139] Dynamic feedback control: During the re-transcoding process, the system continuously monitors the transcoding progress and updates parameter adjustment suggestions in real time to ensure that video quality requirements are met in the shortest possible time.

[0140] Through the above embodiments, the present invention not only ensures that the transcoding process is started in a timely manner under conditions of sufficient resources, but also can automatically correct transcoding deviations through subsequent quality detection and parameter adjustment mechanisms, achieve high-quality video output, and ensure that the final transcoded video file meets the strict requirements of users and systems.

[0141] The scheduling device for video transcoding tasks provided by the present invention is described below. Figure 2 As shown, the apparatus for scheduling video transcoding tasks described below and the method for scheduling video transcoding tasks described above can refer to each other.

[0142] A video transcoding task scheduling device, comprising:

[0143] The video acquisition module 210 is used to acquire the video to be transcoded;

[0144] A task creation module 220 is used to create a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded;

[0145] The resource prediction module 230 is used to predict the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task;

[0146] The video transcoding module 240 is configured to start a video transcoding process according to the video transcoding task to obtain a transcoded video file if currently available resources are sufficient.

[0147] Figure 3 An example of a physical structure diagram of an electronic device is shown below. Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute a scheduling method for a video transcoding task, the method including:

[0148] Get the video to be transcoded;

[0149] Creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded;

[0150] Predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task;

[0151] If the currently available resources are sufficient, the video transcoding process is started according to the video transcoding task to obtain a transcoded video file.

[0152] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0153] In another aspect, the present invention further provides a computer program product, comprising a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the video transcoding task scheduling method provided by each of the above methods, the method comprising:

[0154] Get the video to be transcoded;

[0155] Creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded;

[0156] Predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task;

[0157] If the currently available resources are sufficient, the video transcoding process is started according to the video transcoding task to obtain a transcoded video file.

[0158] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for scheduling video transcoding tasks provided by the above methods is implemented, the method comprising:

[0159] Get the video to be transcoded;

[0160] Creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded;

[0161] Predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task;

[0162] If the currently available resources are sufficient, the video transcoding process is started according to the video transcoding task to obtain a transcoded video file.

[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for scheduling video transcoding tasks, characterized in that: include: Get the video to be transcoded; Creating a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded; Predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions to perform the video transcoding task; If the currently available resources are sufficient, the video transcoding process is started according to the video transcoding task to obtain a transcoded video file.

2. The method for scheduling video transcoding tasks according to claim 1, wherein: The step of creating a video transcoding task according to the image features and transcoding target parameters of the video to be transcoded specifically includes: Segmenting the video to be transcoded at preset time intervals to obtain a set of video frames; Performing feature extraction on the video frame set to obtain video image features; Determining target transcoding parameters of the video to be transcoded based on the video image characteristics, user needs, and playback environment, wherein the target transcoding parameters include target resolution, target bit rate, and target encoding format; A video transcoding task is created according to the image features and transcoding target parameters of the video to be transcoded.

3. The method for scheduling video transcoding tasks according to claim 2, wherein: The step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions for executing the video transcoding task specifically includes: Predicting resource usage required for video transcoding based on the video image features of the video to be transcoded, wherein the resource usage includes CPU usage, memory usage, and storage space; The resource occupancy status is compared with the current available resource status of the system to evaluate the current resource availability of the system.

4. The method for scheduling video transcoding tasks according to claim 1, wherein: After the step of predicting the current resource availability of the system based on the video transcoding task and the current available resources of the system to determine whether the current system has the conditions for executing the video transcoding task, the method further includes: If the currently available resources are insufficient, the video transcoding task is added to the task queue according to the preset rules and marked as pending scheduling; Schedule all video transcoding tasks in the waiting state.

5. The method for scheduling video transcoding tasks according to claim 4, wherein: If the currently available resources are insufficient, the step of adding the video transcoding task to the task queue according to a preset rule and marking it as a waiting-for-scheduling state specifically includes: The video transcoding task is encapsulated into a task object according to task information and marked as a to-be-scheduled state. The task information includes task creation time, task type, expected resource consumption and urgency.

6. The method for scheduling video transcoding tasks according to claim 4, wherein: The step of scheduling all video transcoding tasks in a to-be-scheduled state specifically includes: Determining the priority of the video transcoding task according to the task information; Sort all video transcoding tasks to be scheduled according to the priority; According to the sorting results, all video transcoding tasks in the waiting-for-scheduling state are scheduled.

7. The method for scheduling video transcoding tasks according to claim 1, wherein: After the step of starting a video transcoding process according to the video transcoding task to obtain a transcoded video file if currently available resources are sufficient, the method further includes: Performing a quality check on the transcoded video file to determine whether it meets the preset transcoding parameters; If the detection result does not meet the requirements, adjust the parameters and re-transcode until the transcoded video file meets the quality requirements.

8. A video transcoding task scheduling device, characterized in that: include: Video acquisition module, used to obtain the video to be transcoded; A task creation module, configured to create a video transcoding task based on the image features and transcoding target parameters of the video to be transcoded; A resource prediction module is used to predict the current resource availability of the system based on the video transcoding task and the current available resources of the system, so as to determine whether the current system has the conditions to execute the video transcoding task; The video transcoding module is used to start a video transcoding process according to the video transcoding task to obtain a transcoded video file if currently available resources are sufficient.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for scheduling video transcoding tasks according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for scheduling video transcoding tasks according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Video transcoding method and device, server and storage medium

    CN118803304A

  • Method and device for scheduling video transcoding task, electronic equipment, storage medium and program product

    CN119094807A

  • Distributed video transcoding method and device, equipment and storage medium

    CN119603481A