Video transcoding system, method, device and medium

By setting up independent resource utilization units for NVMe namespaces and introducing an points management mechanism, the problem of unfair resource allocation in video transcoding is solved, achieving efficient and fair video transcoding resource management, and improving video transcoding performance and user experience.

CN119854514BActive Publication Date: 2025-10-24RONG MING MICROELECTRONICS (JINAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411780620.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-10-24
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing technologies cannot accurately predict the computational load during video transcoding, leading to unfair resource allocation and affecting the efficiency and quality of video transcoding.

Method used

By setting up an independent resource utilization unit for each NVMe namespace, introducing a point management mechanism, and dynamically adjusting the resource allocation strategy, fairness and efficiency are ensured.

Benefits of technology

It achieves fair distribution of video transcoding resources, improves video transcoding performance and user experience, avoids resource waste and over-concentration, and meets personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854514B_ABST
    Figure CN119854514B_ABST
Patent Text Reader

Abstract

The application relates to a video transcoding system, method, device and medium. The system comprises a namespace setting module for setting and managing a plurality of NVMe namespaces, each of which serves as an independent resource utilization unit; a request processing module configured at a device firmware layer, for processing video transcoding requests from each namespace and controlling access of each namespace to a video processing unit (VPU) according to a preset strategy; and an integral management module for recording and managing integral consumption and accumulation of each namespace when processing video transcoding requests. By setting an independent resource usage budget for each NVMe namespace and dynamically adjusting resource allocation according to the importance of the request, the application ensures fair allocation of resources among different namespaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video transmission technology, and in particular to a video transcoding system, method, device and medium. Background Art

[0002] When using NVMe for video transcoding, schemes such as I / O prioritization, rate limiting, and fair queuing exhibit significant drawbacks. Existing techniques rely on host interaction, payload size, and I / O rate, making them unsuitable for video transcoding scenarios because the computational effort required for transcoding is difficult to accurately predict from I / O operations. Specifically, they rely on payload size and I / O rate, which may not necessarily reflect the computational effort that the transcoder can offload. To fairly balance the proportional distribution of processing required by the hardware, the algorithm must also calculate the computational time used by each invoking namespace. In this regard, namespace I / O does not clearly predict the hardware time required. To illustrate this in a video transcoding pipeline, imagine a namespace with many I / O operations. It may be transmitting a large amount of raw video data, but if the receiving end is configured for low-quality output encoding, the relative duty cycle experienced by the hardware may be significantly less than a lower-resolution encoding job from another namespace configured for higher quality. Furthermore, relative duty cycle can vary depending on the complexity of the source image, making prediction methods unreliable and inaccurate. Summary of the Invention

[0003] The purpose of this application is to provide a video transcoding system, method, device and medium that can effectively ensure the fairness and efficiency of resource allocation.

[0004] According to a first aspect of an embodiment of the present application, a video transcoding system is provided, the system comprising:

[0005] The namespace setting module is used to set up and manage multiple NVMe namespaces, with each namespace acting as an independent resource utilization unit. The request processing module is configured in the device firmware layer to process video transcoding requests from each of the namespaces and control each namespace's access to the video processing unit (VPU) according to preset policies. The points management module records and manages the points consumption and accumulation of each namespace when processing the video transcoding requests.

[0006] Optionally, the namespace setting module further includes: a namespace allocation submodule, configured to direct each namespace to a separate container for use by different tenants.

[0007] Optionally, the request processing module is further configured to queue the requests waiting for processing in the VPU and classify them according to namespace identifiers (NSIDs); and execute the video transcoding requests from the namespaces when the credit allowance is available.

[0008] Optionally, the request processing module is further configured to make the namespaces wait when the credit is insufficient until enough credit is obtained to continue processing the requests.

[0009] Optionally, the system further comprises a credit refreshing module configured to periodically refresh the credit of each namespace in a runtime unit to ensure fairness of resource allocation.

[0010] Optionally, the credit refreshing module is further configured to set a fixed refreshing interval and refresh the credit of one namespace in each interval; and monitor the status of each namespace in the refreshing interval and ensure that only one namespace obtains credit in each heartbeat cycle.

[0011] Optionally, the credit management module is further configured to record the credit consumption of each namespace when processing the video transcoding requests; and count the excess part of the credit when the credit limit is exceeded in a single job as a debt in the next cycle.

[0012] Optionally, the system further comprises a credit balance monitoring module configured to monitor the credit balance of each namespace in real time and adjust the resource allocation strategy for each namespace according to the credit balance; and issue a warning when the credit balance of the namespace is lower than a preset threshold to remind a user or administrator to adjust the resource allocation.

[0013] Optionally, the system further comprises a priority division module configured to divide the input / output operations according to the importance of the processes to ensure that critical video transcoding tasks are processed preferentially.

[0014] Optionally, the system is further configured to support dynamically adjusting the credit refreshing strategy and / or the resource allocation strategy of the namespaces to adapt to different video transcoding requirements and system load conditions.

[0015] According to a second aspect of the embodiments of the present application, a video transcoding method is provided, which utilizes NVMe namespaces as units of resource utilization, controls the usage limit at the device firmware layer, and realizes fair allocation of VPU resources. The method comprises:

[0016] configuring a plurality of namespaces for an NVMe device, each of which can be used by a tenant as a basic unit of resource allocation and management;

[0017] implementing usage limit of VPU resources at the device firmware layer and allocating resources according to the requests of the namespaces;

[0018] An integral management mechanism is introduced, and integral of hardware runtime unit refreshed periodically is allocated to each namespace, and integral is consumed according to requested runtime, so as to realize fair control of VPU resource usage.

[0019] Optionally, the namespace setting method comprises:

[0020] A plurality of namespaces are created and configured on the NVMe device;

[0021] Each namespace is allocated to different tenants or applications, so as to realize resource isolation and allocation.

[0022] Optionally, the method further comprises:

[0023] Receiving a request from the namespace;

[0024] Judging the legality of the request and the integral condition of the namespace;

[0025] If the request is legal and the integral of the namespace is sufficient, the request is processed, and integral is consumed according to the runtime of the request;

[0026] If the request is illegal or the integral of the namespace is insufficient, the request is rejected or waiting.

[0027] Optionally, the integral of hardware runtime unit refreshed periodically is allocated to each namespace, comprising:

[0028] Setting a fixed refresh interval;

[0029] In each refresh interval, an integral refresh of a namespace is selected to ensure uniform distribution of refresh operation;

[0030] According to the preset rule, a certain integral is allocated to each refreshed namespace.

[0031] Optionally, the integral management mechanism comprises:

[0032] Real-time monitoring of the usage of the namespace, including used integral and remaining integral;

[0033] According to the usage of the namespace, the allocation strategy of the integral is dynamically adjusted to optimize resource utilization and ensure fairness;

[0034] When the integral of the namespace is insufficient, a warning is provided or corresponding measures are taken for intervention.

[0035] Optionally, the credit balance management method comprises:

[0036] Monitoring the credit balance of each namespace;

[0037] When processing the request, check if the credit balance of the namespace is sufficient;

[0038] If the credit balance is insufficient, reject the request or delay processing, and adjust the credit balance according to a preset strategy;

[0039] Provide query and statistical functions for the credit balance to support analysis and optimization of resource usage.

[0040] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising a memory and a processor, the memory being configured to store a computer program executable by the processor; and the processor being configured to execute the computer program in the memory to implement the method described above.

[0041] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, when the executable computer program in the storage medium is executed by a processor, the method described above can be implemented.

[0042] Compared with the prior art, the beneficial effects of the present application are as follows: a namespace setting module is configured to set and manage a plurality of NVMe namespaces, each of which serves as an independent resource utilization unit; a request processing module is configured at the device firmware layer and is configured to process video transcoding requests from each of the namespaces and control access of each of the namespaces to a video processing unit (VPU) according to a preset strategy; and an integral management module is configured to record and manage integral consumption and accumulation of each of the namespaces when processing the video transcoding requests. In this way, by setting an independent resource usage budget for each NVMe namespace and dynamically adjusting resource allocation according to the importance of the request, the present application ensures fair allocation of resources among different namespaces. Even when the budget of a certain namespace falls below 0, since the refresh interval is only increased by a fixed amount, the namespace still has the opportunity to restore resource usage capability in the subsequent refresh period, thereby avoiding the problems of excessive concentration and waste of resources. By optimizing video transcoding performance and resource allocation strategy, the present application can provide users with a smoother and higher quality video experience. At the same time, by providing flexible resource configuration and monitoring functions, the present application can also meet the personalized needs of users for video transcoding performance and resource usage. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 A structural schematic diagram of a video transcoding system provided by the embodiments of the present application.

[0044] Figure 2 A flowchart of a video transcoding method provided by the embodiments of the present application.

[0045] Figure 3The basic flow chart of processing request in namespace is detailed in the chart of this embodiment.

[0046] Figure 4 The chart of this application illustrates how to refresh the points.

[0047] Figure 5 The chart of this application illustrates the points reduction and increase in the running system.

[0048] Figure 6 A block diagram of a video transcoding apparatus is shown according to an example embodiment.

[0049] Figure 7 A block diagram of an electronic device is shown according to an example embodiment. DETAILED DESCRIPTION

[0050] Unless otherwise defined, technical or scientific terms used in this specification and claims shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In the following description, specific embodiments of the application are described in connection with the appended drawings, in which it is noted that the drawings provide merely examples of the application and therefore should not be considered as limiting its scope. It will be apparent to those skilled in the art that numerous modifications and variations can be made without departing from the spirit and scope of the application. Accordingly, the application is not limited by the specific examples described in this specification.

[0051] Term explanation:

[0052] VPU (Video Processing Unit): VPU is a processor dedicated to processing video data. VPU is mainly used to perform tasks such as video encoding, decoding, scaling, filtering, etc. It can improve the efficiency and quality of video processing. VPU is widely used in video conferencing, digital television, game development, virtual reality, etc. In these scenarios, VPU can provide smoother video playback and better image quality. The performance of VPU depends on its design and implementation. High-performance VPU can handle multiple video streams simultaneously and support high-resolution and high-frame-rate video processing. At the same time, the power consumption of VPU also depends on its design and workload. When designing low-power devices, power consumption management of VPU needs to be considered.

[0053] NVMe (Non-Volatile Memory Express) is a high-speed interface protocol designed for PCIe SSDs, aiming to reduce latency and improve IOPS performance. It enhances SSD performance through features such as multi-command queues, low-latency design, and optimized memory addressing. NVMe supports out-of-order command execution and various arbitration mechanisms, such as round-robin scheduling, to achieve efficient resource utilization. Additionally, it has features such as metadata, power management, and dynamic queue management, enabling SSD controllers to better collaborate with host systems. NVMe is mainly applied in the storage field, especially in scenarios requiring high performance and low latency.

[0054] As Figure 1 A structural diagram of a video transcoding system is provided for the embodiments of the present application. From Figure 1 It can be seen that the system mainly includes a namespace setting module 11, a request processing module 12, and an integral management module 13. The namespace setting module 11 is used to set and manage multiple NVMe namespaces, each of which serves as an independent resource utilization unit. The request processing module 12 is configured in the device firmware layer and is used to process video transcoding requests from each of the namespaces and control access of each of the namespaces to a video processing unit (VPU) according to a preset strategy. The integral management module 13 records and manages integral consumption and accumulation of each of the namespaces when processing the video transcoding requests.

[0055] In actual applications, the namespace setting module 11, as a core component of the system, is responsible for setting and effectively managing multiple NVMe namespaces. These namespaces play the role of independent resource utilization units in the system, and each namespace has its own independent resource quota and management strategy. Through this module, the system can flexibly configure and adjust the number, size, and resource allocation strategy of the namespaces to meet the needs of different application scenarios.

[0056] The request processing module 12 is ingeniously configured in the device firmware layer, and its main responsibility is to process video transcoding requests from each of the namespaces. This module not only has the ability to efficiently process requests, but also intelligently controls the access rights of each namespace to the video processing unit (VPU) according to the preset strategy. Through reasonable scheduling and allocation, this module ensures the smooth progress of video transcoding tasks and maximizes the utilization of VPU and the overall performance of the system.

[0057] The integral management module 13 is a key component in the system for recording and managing the integral consumption and accumulation of each namespace when processing video transcoding requests. Through precise calculation and recording, the module real-time tracks the integral changes of each namespace and performs integral increase and decrease operations according to the preset rules. This mechanism not only helps to achieve fair allocation of resources, but also effectively prevents overuse and waste of resources. At the same time, the integral management module provides rich data support for system administrators, helping them better monitor and manage the resource usage of the system.

[0058] In summary, the three modules work together to form an efficient, flexible, and easy-to-manage video transcoding resource allocation system. Through this system, users not only get excellent video transcoding performance, but also achieve maximum utilization of resources and long-term stable operation of the system.

[0059] In one or more embodiments of the present application, the namespace setting module further comprises a namespace allocation submodule for directing each namespace to a separate container for use by different tenants.

[0060] Namespace allocation submodule: This submodule undertakes the important task of accurately directing each namespace to an independent container, aiming to provide exclusive and isolated storage environments for different tenants. Through fine-grained namespace division, the system can ensure that the data and resources of each tenant are isolated from each other, effectively avoiding the risk of data leakage and illegal access. At the same time, this design also facilitates system administrators to monitor and manage the resource usage of each tenant, thereby achieving efficient allocation and flexible scheduling of resources.

[0061] System administrators can flexibly configure the number, size, and resource quota of namespaces according to actual needs to meet the needs of different tenants and business scenarios, with high configurability. As the business needs of tenants change, the namespace allocation submodule can dynamically adjust the resource allocation of namespaces to ensure maximum utilization of resources and stable operation of the system, with dynamic adjustment capability. By allocating independent namespaces to each tenant, the system achieves effective isolation of resources, ensuring data security and privacy.

[0062] In summary, the namespace setting module and its included namespace allocation submodule together form an efficient, secure, and easy-to-manage resource allocation system, providing exclusive storage environments and resource guarantees for different tenants.

[0063] In one or more embodiments of the present application, the request processing module is further configured to: queue requests waiting for processing in the VPU and classify them according to namespace identifiers (NSIDs); and execute video transcoding requests from namespaces if the integral allowance is met.

[0064] The request processing module is responsible for handling video transcoding requests from various namespaces and also manages these requests efficiently within the video processing unit (VPU). Specifically, the module performs the following key operations: upon receiving a video transcoding request from a namespace, the request processing module first queues these requests in the VPU's queue for processing. To ensure ordered execution of requests, the module categorizes them based on the namespace identifier (NSID) attached to each request. This categorization mechanism helps system administrators and the VPU to more clearly identify and manage requests from different namespaces, thereby optimizing resource allocation and scheduling strategies.

[0065] After queuing and categorizing requests, the request processing module further checks the credit balance of each namespace. Only when the namespace's credits are sufficient to cover the cost of the current video transcoding request will the module allow the request to proceed to the execution phase. This mechanism ensures fair allocation and efficient use of resources, avoiding system congestion and performance degradation due to resource abuse.

[0066] During the execution of video transcoding requests, the request processing module also dynamically adjusts resource allocation in the VPU based on real-time system load and namespace resource usage. This dynamic adjustment capability helps the system maintain efficient and stable performance when facing video transcoding tasks of different scales and complexities.

[0067] In summary, the request processing module provides efficient, flexible, and secure video transcoding services for the system through meticulous request management, credit verification and execution strategies, and dynamic resource adjustment capabilities.

[0068] In one or more embodiments of the present application, the request processing module is further configured to cause the namespace to wait when the credits are insufficient, until sufficient credits are obtained to continue processing the request.

[0069] The request processing module plays a crucial role in the processing flow of video transcoding tasks. It is responsible for receiving, queuing, categorizing, and executing video transcoding requests from various namespaces. Additionally, it has intelligent decision-making capabilities in terms of credit management. Specifically, when a namespace's credits are insufficient to pay for the current request, the request processing module employs a series of waiting strategies. These strategies may include placing the request at the end of the waiting queue or assigning a reasonable waiting position based on the namespace's priority and waiting time. The module also regularly checks the namespace's credit situation and immediately sends the waiting request to the VPU for execution once the credits are sufficient. During the execution of video transcoding requests, the request processing module dynamically adjusts the resource allocation of the VPU based on the system's real-time load and the namespace's resource usage. This dynamic adjustment capability helps the system maintain high efficiency and stable performance when facing video transcoding tasks of different scales and complexities.

[0070] In summary, the request processing module provides efficient, flexible, and secure video transcoding services for the system through fine request management, credit verification and execution strategies, waiting strategies when credits are insufficient, and dynamic resource adjustment capabilities. These functions collectively ensure that the system maintains high performance and stability when facing multiple concurrent requests and complex tasks.

[0071] In one or more embodiments of the present application, the system further comprises a credit refreshing module for periodically refreshing the runtime unit credits of each namespace to ensure the fairness of resource allocation.

[0072] In practical applications, the system also includes a crucial component: the credit refreshing module, which undertakes the core responsibility of ensuring the fairness of resource allocation. The credit refreshing module is a periodically running component in the system, and its main function is to refresh the runtime unit credits of each namespace. This mechanism aims to ensure that all namespaces have a fair opportunity in resource allocation and avoid the "starvation" phenomenon caused by long-term lack of resources.

[0073] Specifically, the credit refreshing module automatically adds a certain amount of credits to each namespace at preset time intervals (such as every hour, every day, etc.). These additional credits will serve as "chips" for the namespace in subsequent resource competition, giving them the opportunity to obtain the required resources to continue processing video transcoding requests.

[0074] The design of the credit refreshing module takes into account the following key factors:

[0075] Fairness: By periodically refreshing the points for each namespace, the points refresh module ensures that all namespaces have an equal opportunity to compete for resources. This helps to prevent certain namespaces from being marginalized due to a lack of access to resources over time.

[0076] Flexibility: The points refresh module allows system administrators to adjust the refresh interval and points increment based on actual needs. This flexibility enables the system to adapt to different application scenarios and tenant requirements, thereby optimizing resource allocation strategies.

[0077] Predictability: With fixed refresh intervals and points increments, the points refresh module provides a predictable resource allocation environment for the system. This helps tenants plan and manage their own resource usage, thereby improving the overall efficiency and stability of the system.

[0078] Collaboration with other modules: The points refresh module works closely with the request handling module, namespace setup module, and other modules to maintain the order of resource allocation in the system. When the request handling module detects that a namespace's points are insufficient, it will pause the processing of requests for that namespace and wait for the points refresh module to refresh the points. Once the points are sufficient, the request handling module will resume processing requests for that namespace.

[0079] In summary, the points refresh module is an indispensable component of the system. It ensures fairness and stability in resource allocation by periodically refreshing the points for each namespace. This mechanism provides tenants with a reliable, efficient, and easy-to-manage video transcoding resource allocation environment.

[0080] In one or more embodiments of the present application, the points refresh module is further configured to set a fixed refresh interval and refresh the points for a namespace within each interval; and monitor the status of each namespace within the refresh interval and ensure that only one namespace obtains points within each heartbeat period.

[0081] The points refresh module is a key component of the system that ensures fairness and order in resource allocation. The points refresh module not only periodically refreshes the points for each namespace, but also takes on the responsibility of setting a fixed refresh interval, monitoring the status of namespaces, and ensuring the order of points refresh.

[0082] The points refresh module will determine a fixed refresh interval based on system configuration or administrator settings. This interval can be seconds, minutes, hours, or longer, depending on the needs and design of the system. Within each refresh interval, the module will refresh the points for at least one namespace to ensure they have enough points to compete for subsequent resources.

[0083] At each refresh interval, the credit refresh module iterates through all namespaces and increases a certain amount of credits for each namespace based on pre-set rules. These credits will serve as "chips" for namespaces in subsequent resource competitions, helping them acquire the required resources.

[0084] To ensure the effectiveness and fairness of credits, the credit refresh module monitors the status of each namespace at each refresh interval. This includes checking the activity, resource usage, and abnormal behavior of namespaces. Through monitoring, the module can timely discover and solve potential problems, ensuring the stable operation of the system.

[0085] To avoid conflicts and chaos in resource allocation, the credit refresh module ensures that only one namespace obtains credit refresh within a heartbeat period. This can be achieved through various mechanisms such as using queues, locks, or semaphores. By ensuring the consistency of the refresh order, the module can maintain the orderliness and stability of the system.

[0086] The credit refresh module also supports flexible refresh strategies, allowing system administrators to adjust refresh intervals, credit increments, and refresh order parameters according to actual needs. This flexibility enables the system to adapt to different application scenarios and tenant needs, thereby optimizing resource allocation strategies.

[0087] In summary, the credit refresh module provides a fair, orderly, and efficient resource allocation environment for the system by setting fixed refresh intervals, refreshing credits for each namespace, monitoring namespace status, and ensuring the order of credit refresh. These functions collectively ensure the stability and reliability of the system, providing high-quality video transcoding services for tenants.

[0088] In one or more embodiments of the present application, the credit management module is further configured to record the credit consumption of each namespace when processing video transcoding requests; and when the credit limit is exceeded in a single job, the excess is counted as debt in the next period.

[0089] The credit management module is the core component responsible for credit recording and management in the system. It not only records the credit consumption of each namespace when processing video transcoding requests, but also undertakes the important responsibilities of monitoring credit usage, handling credit overruns, and maintaining credit account balance.

[0090] The credit management module tracks and records the credit consumption of each namespace in real time when processing video transcoding requests. This includes the amount of credits required for each request, the processing time of the request, and the final credit settlement. Through detailed records, the module can ensure the accuracy and traceability of credits.

[0091] When a namespace's consumption of credits in a single job exceeds its current account balance, the credit management module takes a series of measures to handle this overdrawn situation. One common approach is to charge the excess to the next period's debt. This means that the namespace needs to repay this debt at a future point in time to restore the balance of its credit account.

[0092] To ensure the fair use of credits and avoid malicious overdrafts, the credit management module continuously monitors the use of credits by each namespace. This includes checking the consumption rate of credits, unusual transactions, and possible credit fraud. Through monitoring, the module can discover and correct potential credit management problems in a timely manner, ensuring the fairness and security of the system.

[0093] The credit management module is also responsible for maintaining the balance of each namespace's credit account. This includes regularly updating credit balances, processing credit top-ups and deductions, and ensuring the accuracy and integrity of account information. By maintaining the balance of credit accounts, the module can ensure that each namespace has a fair opportunity for resource allocation and avoid service interruptions or resource limitations due to insufficient credits.

[0094] To facilitate system administrators and tenants' understanding of credit usage, the credit management module also provides credit reporting and query functions. These functions allow users to view credit account balances, credit consumption history, and any outstanding debts, among other information. By providing this information, the module can help users better plan and manage their resource usage.

[0095] In summary, the credit management module provides a fair, transparent, and efficient credit management mechanism for the system by recording credit consumption, handling credit overdrawn, monitoring credit usage, and maintaining credit account balance. These functions together ensure the stability and reliability of the system, providing high-quality video transcoding services for tenants.

[0096] In one or more embodiments of the present application, the system further comprises a credit balance monitoring module for monitoring the credit balances of each namespace in real time and adjusting the resource allocation strategy for each namespace according to the credit balance; and issuing a warning when the credit balance of the namespace is lower than a preset threshold to remind the user or administrator to adjust the resource allocation.

[0097] The system, on the basis of ensuring the efficiency and fairness of resource allocation, also integrates a credit balance monitoring module to achieve comprehensive monitoring and management of the credit status of each namespace, further improving the functionality of the system.

[0098] The credit balance monitoring module is an integral part of the system, responsible for real-time monitoring of credit balances in each namespace and dynamically adjusting resource allocation strategies based on these credit balances. The core functions of this module include:

[0099] Real-time monitoring of credit balances: The credit balance monitoring module continuously tracks and records changes in credit balances for each namespace. This includes the increase or decrease of points, the accumulation of debts, and any other factors that may affect credit balances. Through real-time monitoring, the module ensures the accuracy and timeliness of data, providing a basis for subsequent decision-making.

[0100] Dynamic adjustment of resource allocation strategies: Based on the credit balances of each namespace, the credit balance monitoring module intelligently adjusts resource allocation strategies. For namespaces with higher credit balances, the module may provide more resources to encourage them to maintain good credit records; for namespaces with lower credit balances, the module may limit their resource usage to avoid potential default risks.

[0101] Early warning mechanism: When the credit balance of a namespace falls below a predetermined threshold, the credit balance monitoring module will immediately trigger the early warning mechanism. This includes sending notifications, alerts or emails to users or administrators to remind them to pay attention to the credit status of the namespace and consider taking necessary measures to adjust resource allocation or supplement credit balances.

[0102] Provide credit reports and visualization tools: To facilitate users and administrators to better understand the credit status of each namespace, the credit balance monitoring module also provides rich credit reports and visualization tools. These tools can help users intuitively view the trend of credit balance changes, historical records and any potential risk points, so as to make more informed decisions.

[0103] Flexible configuration of early warning thresholds: To meet the needs and risk preferences of different users, the credit balance monitoring module allows users or administrators to flexibly configure early warning thresholds. This means that users can set different credit balance thresholds according to their actual situation and needs to ensure that they receive early warning notifications at the right time.

[0104] In summary, the credit balance monitoring module provides a comprehensive, intelligent and flexible credit management mechanism for the system through real-time monitoring of credit balances, dynamic adjustment of resource allocation strategies, triggering of early warning mechanisms, and provision of credit reports and visualization tools. These functions together ensure the stability and reliability of the system, providing users with more efficient, fair and secure resource allocation services.

[0105] In one or more embodiments of the present application, the system further comprises a priority classification module for classifying input / output operations according to the importance of processes to ensure that critical video transcoding tasks are given priority.

[0106] The system introduces a priority classification module to ensure resource allocation efficiency and fairness while achieving intelligent management and optimization of input / output operations (I / O operations), especially for video transcoding tasks.

[0107] The priority classification module is a key component of the system, responsible for classifying input / output operations according to the importance of processes to ensure that critical video transcoding tasks can be processed in a timely and prioritized manner. The core functions and features of this module include:

[0108] Intelligent priority assessment: The priority classification module considers multiple factors such as task urgency, user level, resource demand, and system load to assess the priority of each input / output operation. Through intelligent algorithms, the module can accurately determine which tasks are more important and assign higher priorities to them.

[0109] Dynamic adjustment of priority: As the system state and task requirements change, the priority classification module dynamically adjusts the priority of each task. For example, when a critical video transcoding task is about to expire or resource demand increases dramatically, the module will accordingly increase its priority to ensure that the task can be completed on time.

[0110] Key task protection: For critical video transcoding tasks, the priority classification module gives special attention and protection. By allocating more resources, shortening waiting time, and increasing processing speed, etc., it ensures that these tasks can be processed in the shortest time with high quality.

[0111] Avoid priority inversion: To avoid the situation where low-priority tasks block high-priority tasks, the priority classification module uses a series of mechanisms to prevent priority inversion. For example, by setting priority inheritance, priority ceiling, or priority promotion strategies, it ensures that high-priority tasks can always be processed in a timely manner.

[0112] Provide priority reports and visualization tools: To facilitate users and administrators to understand the current priority classification of the system, the priority classification module also provides rich priority reports and visualization tools. These tools can help users intuitively view the priority, processing status, and resource usage of each task, so as to make more informed decisions.

[0113] In summary, the priority division module provides an efficient, flexible and reliable input / output operation management solution for the system through intelligent priority evaluation, dynamic priority adjustment, critical task guarantee, priority inversion avoidance, and priority report and visualization tools. These functions collectively ensure that critical video transcoding tasks are processed in a timely and prioritized manner, thereby improving the overall performance and user experience of the system.

[0114] In one or more embodiments of the present application, the system is further configured to support dynamic adjustment of the credit refresh policy and / or resource allocation policy of the namespace to adapt to different video transcoding requirements and system load conditions.

[0115] The system further enhances its dynamic adaptability by supporting dynamic adjustment of the credit refresh policy and / or resource allocation policy of the namespace based on actual video transcoding requirements and system load conditions, in addition to ensuring efficient, fair and flexible resource allocation.

[0116] This system not only has strong static configuration capabilities, enabling it to manage the credits and resources of the namespace according to pre-set rules and policies, but more importantly, it also has excellent dynamic adjustment capabilities, enabling it to respond to changes in system state in real time to adapt to different video transcoding requirements and load conditions.

[0117] The system can dynamically adjust the credit refresh policy of the namespace based on actual requirements and load conditions. For example, during a video transcoding peak period, the system may increase the frequency of credit refresh to ensure that critical tasks can obtain sufficient credits to compete for resources; during a trough period, the system may reduce the refresh frequency in order to save system resources. In addition, the system can also adjust the credit refresh policy of the namespace individually based on factors such as its activity level and historical performance.

[0118] Similar to the credit refresh policy, the resource allocation policy of the system is also dynamically adjustable. In the face of high load or urgent tasks, the system can quickly adjust the resource allocation policy to provide more resources for critical tasks to ensure their timely completion. At the same time, the system can also intelligently allocate resources based on factors such as the credit balance, priority and historical resource usage of the namespace, to maximize resource utilization.

[0119] To further improve the dynamic adaptability of the system, the system also introduces intelligent prediction and adaptive mechanisms. Through analysis and mining of historical data, the system can predict future video transcoding requirements and load conditions and adjust the credit refresh and resource allocation policies in advance accordingly. This intelligent prediction and adaptive mechanism enables the system to more accurately respond to various complex situations, ensuring the stability and reliability of the system.

[0120] To facilitate dynamic adjustment operations for users and administrators, the system also provides rich dynamic adjustment interfaces and visualization tools. These interfaces and tools allow users to flexibly adjust the namespace credit refresh and resource allocation strategies according to actual needs. At the same time, through the visualization tools, users can also intuitively view the current state, historical records and adjustment effects of the system, so as to make more intelligent decisions.

[0121] In summary, the system realizes intelligent response and self-adaptation to video transcoding demand and system load condition by supporting dynamic adjustment of namespace credit refresh strategy and / or resource allocation strategy. This dynamic adaptability enables the system to more flexibly cope with various complex situations, ensuring timely processing of critical tasks while maximizing the use of system resources.

[0122] As Figure 2 A flowchart of a video transcoding method provided by an embodiment of the present application. The method is applied to a VPU end. From Figure 2 As can be seen from the method includes the following steps:

[0123] Step 201: Configure multiple namespaces for the NVMe device, each namespace can be used by a tenant as a basic unit of resource allocation and management.

[0124] Step 202: Implement usage restrictions on VPU resources at the device firmware layer, and allocate resources according to namespace requests.

[0125] Step 203: Introduce a credit management mechanism, allocate a fixed number of hardware runtime units of credits to each namespace, and consume credits according to the runtime of the request to achieve fair control of VPU resource usage.

[0126] Optionally, the namespace setting method comprises: creating and configuring multiple namespaces on the NVMe device; allocating each namespace to a different tenant or application to achieve resource isolation and allocation.

[0127] Optionally, the method further comprises: receiving a request from the namespace; judging the legality of the request and the credit situation of the namespace; if the request is legal and the namespace credit is sufficient, processing the request and consuming credits according to the runtime of the request; if the request is illegal or the namespace credit is insufficient, rejecting the request or waiting.

[0128] Optionally, the credit management mechanism includes: real-time monitoring of the usage of each namespace, including the used credits and the remaining credits; dynamically adjusting the allocation strategy of the credits according to the usage of the namespace, to optimize resource utilization and ensure fairness; providing warnings or taking corresponding measures for intervention when the namespace credits are insufficient.

[0129] Optionally, the credit management mechanism includes: real-time monitoring of the usage of each namespace, including the used credits and the remaining credits; dynamically adjusting the allocation strategy of the credits according to the usage of the namespace, to optimize resource utilization and ensure fairness; providing warnings or taking corresponding measures for intervention when the namespace credits are insufficient.

[0130] Optionally, the credit management mechanism includes: real-time monitoring of the usage of each namespace, including the used credits and the remaining credits; dynamically adjusting the allocation strategy of the credits according to the usage of the namespace, to optimize resource utilization and ensure fairness; providing warnings or taking corresponding measures for intervention when the namespace credits are insufficient.

[0131] It is understood that the following will be described through specific embodiments.

[0132] First, multiple individual namespaces need to be set up for the NVMe device. Each namespace can be directed to a separate container for use by a tenant.

[0133] When each namespace is either idle or fully utilized by a tenant, the limits on the operations requested on the VPU will be handled by the device layer.

[0134] The following Figure 3 The following figure details the basic flowchart of processing requests in a namespace. It can either wait for credits or proceed immediately. If many task requests are sent by a single namespace, then the NVMe driver's submission queue will naturally fill and prevent over-requesting. Requests queued in the VPU will follow the wait logic in the NSID handler. Figure 3 The steps shown include: each NSID is given credits of hardware runtime units that are periodically refreshed. Each NSID refresh cycle is evenly distributed, and there will be no 2 or more simultaneous refreshes. The runtime of a job requested by an NSID counts towards the credits. Excess credits in a job will count as debt in the next cycle.

[0135] The following Figure 4The application distance diagram shows how to refresh the credit: this method can prevent all blocked NSIDs in the loaded system from sending tasks to the VPU at the same time. The refresh interval is a fixed duration with NSID heartbeat number. Only one NSID gets its credit per heartbeat. The budget of the NSID can also be reduced to below 0, and still maintain long-term fairness, because the refresh interval only increases by a fixed amount, and in the case of negative balance, the quota in the namespace has been reduced during the interval.

[0136] Figure 5 The chart illustrates the credit reduction and increase in the running system.

[0137] Figure 6 A block diagram of a video transcoding device is shown according to an exemplary embodiment. Specifically includes:

[0138] The configuration module 61 is configured to configure a plurality of namespaces for the NVMe device, each of which can be used by a tenant as a basic unit of resource allocation and management.

[0139] The allocation module 62 is configured to implement usage limitation of VPU resources at the device firmware layer, and allocate resources according to the request of the namespace.

[0140] The credit module 63 is configured to introduce a credit management mechanism, allocate a credit of a hardware running time unit refreshed periodically to each namespace, and consume the credit according to the running time of the request, so as to realize the fair control of the usage of the VPU resources.

[0141] The configuration module 61 is configured to create and configure a plurality of namespaces on the NVMe device; allocate each namespace to a different tenant or application program, so as to realize the isolation and allocation of resources.

[0142] Optionally, the receiving module 64 is further configured to receive a request from the namespace; judge the legality of the request and the credit of the namespace; if the request is legal and the credit of the namespace is sufficient, process the request and consume the credit according to the running time of the request; if the request is illegal or the credit of the namespace is insufficient, refuse the request or wait.

[0143] Optionally, the credit module 63 is configured to set a fixed refresh interval; in each refresh interval, select a namespace to refresh the credit, so as to ensure the uniform distribution of the refresh operation; and according to a preset rule, allocate a certain credit to each refreshed namespace.

[0144] Optionally, the credit module 63 is configured to monitor the usage of the namespace in real time, including the used credits and the remaining credits; dynamically adjust the allocation strategy of the credits according to the usage of the namespace, so as to optimize the resource utilization and ensure fairness; and provide a warning or take corresponding measures for intervention when the namespace credits are insufficient.

[0145] Optionally, the credit module 63 is configured to monitor the credit balance of each namespace; check whether the credit balance of the namespace is sufficient when processing a request; if the credit balance is insufficient, reject the request or delay processing, and adjust the credit balance according to a preset strategy; and provide query and statistical functions for the credit balance, so as to support analysis and optimization of resource usage.

[0146] Embodiments of the present application also provide an electronic device including a processor and a memory; the memory is configured to store a computer program executable by the processor; and the processor is configured to execute the computer program in the memory to implement the video transcoding method of any of the above embodiments.

[0147] Embodiments of the present application also provide a computer readable storage medium, when the executable computer program in the storage medium is executed by the processor, the video transcoding method of any of the above embodiments can be implemented.

[0148] As to the apparatus in the above embodiments, the specific manner in which the processor performs operations has been described in detail in the embodiments relating to the method, and will not be described in detail here.

[0149] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 1200 can be provided as a server. Referring to Figure 7 , the device 1200 includes a processing component 1222, which further includes one or more processors, and memory resources represented by a memory 1232, for storing instructions executable by the processing component 1222, such as application programs. The application programs stored in the memory 1232 can include one or more modules each corresponding to a set of instructions. In addition, the processing component 1222 is configured to execute the instructions to perform the above video transcoding method.

[0150] The device 1200 can also include a power supply component 1226 configured to perform power management of the device 1200, a wired or wireless network interface 1250 configured to connect the device 1200 to a network, and an input / output (I / O) interface 1258. The device 1200 can operate based on an operating system stored in the memory 1232, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.

[0151] In an example embodiment, a non-transitory computer readable storage medium including instructions, such as the memory 1232 including instructions, is also provided that can be executed by the processing component 1222 of the device 1200 to perform the above-described methods. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.

[0152] In the present disclosure, the terms "first", "second", etc. are used only to describe and distinguish different components, and are not necessarily used to designate the importance or implicitly indicate the number of the existing components. The term "a plurality of" means two or more, unless otherwise specifically defined.

[0153] The above description of the embodiments is for the purpose of enabling one of ordinary skill in the art to understand and apply the application. It will be apparent to those of ordinary skill in the art that various modifications and variations can be made to the embodiments without departing from the spirit or scope of the application. Thus, it is intended that the application covers modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.

Claims

1. A video transcoding system, characterized by, The system comprises: a namespace setting module for setting and managing a plurality of NVMe namespaces, each of which serves as an independent resource utilization unit; a request processing module configured at the device firmware layer for processing video transcoding requests from each of the namespaces and controlling access of each of the namespaces to the video processing unit according to a preset strategy; an integral management module for recording and managing integral consumption and accumulation of each of the namespaces when processing the video transcoding requests.

2. The system of claim 1, wherein, The namespace setting module further comprises a namespace allocation submodule for directing each of the namespaces to a separate container for use by different tenants.

3. The system of claim 1, wherein, The request processing module is further configured to: queue the requests waiting for processing in the VPU and classify them according to namespace identifiers; and execute the video transcoding requests from the namespaces when the integrals are sufficient.

4. The system of claim 3, wherein, The request processing module is further configured to: make the namespaces wait when the integrals are insufficient until sufficient integrals are obtained to continue processing the requests.

5. The system of claim 1, wherein, The system further comprises an integral refreshing module for periodically refreshing integrals of each of the namespaces in a running time unit.

6. The system of claim 5, wherein, The integral refreshing module is further configured to: set a fixed refreshing interval and refresh integrals of one namespace in each interval; and monitor states of the namespaces in the refreshing interval and ensure that only one namespace obtains integrals in each heartbeat cycle.

7. The system of claim 1, wherein, The integral management module is further configured to: record integral consumption of each of the namespaces when processing the video transcoding requests; and count the excess part into a debt of the next cycle when the integral limit is exceeded in a single job.

8. The system of claim 1, wherein, The system further comprises a credit balance monitoring module for monitoring credit balances of the namespaces in real time and adjusting resource allocation strategies for the namespaces according to the credit balances; issue a warning when the credit balance of the namespace is lower than a preset threshold to remind a user or administrator to adjust resource allocation.

9. The system of any one of claims 1 to 8, wherein, The system further comprises a priority division module for dividing input / output operations according to importance of processes to ensure that critical video transcoding tasks are processed in priority.

10. The system of claim 9, wherein, The system is further configured to support dynamic adjustment of integral refreshing strategies and / or resource allocation strategies of the namespaces to adapt to different video transcoding requirements and system load conditions.

11. A method of video transcoding, characterized by, The method comprises: configuring a plurality of namespaces for an NVMe device, each of which can be used by a tenant as a basic unit of resource allocation and management; implementing usage limitation of VPU resources at the device firmware layer and allocating resources according to video transcoding requests of the namespaces; introducing an integral management mechanism to allocate integrals of a hardware running time unit to each of the namespaces for periodic refreshing and consume integrals according to running time consumption of the video transcoding requests.

12. The method of claim 11, wherein, The namespace setting method comprises: creating and configuring a plurality of namespaces on an NVMe device; allocating each of the namespaces to different tenants or applications to realize resource isolation and allocation.

13. The method of claim 11, wherein, The method further comprises: receiving requests from the namespaces; and judging the legality of the request and the credit situation of the namespace; if the request is legal and the namespace credit is sufficient, processing the request and consuming credits according to the running time of the request; if the request is illegal or the namespace credit is insufficient, rejecting the request or waiting.

14. The method of claim 11, wherein, allocating credits of hardware running time units to each namespace for periodic refreshing, including: setting a fixed refreshing interval; in each refreshing interval, selecting a namespace for credit refreshing to ensure uniform distribution of refreshing operations; allocating a certain number of credits to each refreshed namespace according to preset rules.

15. The method of claim 11, wherein, The credit management mechanism includes: real-time monitoring of the usage of the namespace, including the used credits and the remaining credits; dynamically adjusting the allocation strategy of the credits according to the usage of the namespace to optimize resource utilization and ensure fairness; when the namespace credit is insufficient, providing a warning or taking corresponding measures for intervention.

16. The method of claim 11, wherein, The credit balance management method includes: monitoring the credit balance of each namespace; checking whether the credit balance of the namespace is sufficient when processing the request; if the credit balance is insufficient, rejecting the request or delaying processing, and adjusting the credit balance according to the preset strategy; providing query and statistical functions of the credit balance to support analysis and optimization of resource usage.

17. An electronic device, comprising: The memory is used to store the computer program executable by the processor; the processor is used to execute the computer program in the memory to realize the method in any one of claims 11-16.

18. A computer readable storage medium having stored thereon a computer program, characterized in that, When the executable computer program in the storage medium is executed by the processor, the method in any one of claims 11-16 can be realized.

Citation Information

Patent Citations

  • Distributed transcoding scheduling method and system

    CN115866269A

  • Service providing system and method based on multiple tenants

    CN117331696A