Video transcoding system, method, device and medium

By introducing namespace settings, request processing and points management modules into the video transcoding system, the problems of unfair and inefficient resource allocation in the existing technology are solved, and fair resource allocation and improved video transcoding performance are achieved.

CN119854514AActive Publication Date: 2025-04-18RONG MING MICROELECTRONICS (JINAN) CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing video transcoding technology has problems of unfairness and inefficiency in resource allocation, especially when the computational volume is difficult to accurately predict through I/O operations.

Method used

By introducing a namespace setting module, a request processing module and a points management module in the video transcoding system, it is used to set and manage the NVMe namespace, process video transcoding requests, and control access to the VPU, as well as record and manage the integration consumption of the namespace. The system ensures fair allocation of resources by setting an independent resource usage budget for each namespace and dynamically adjusting resource allocation according to the importance of the request.

Benefits of technology

It realizes fair distribution of resources between different namespaces, avoids the problems of excessive concentration and waste of resources, and improves video transcoding performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854514A_ABST
    Figure CN119854514A_ABST
Patent Text Reader

Abstract

The invention relates to a video transcoding system, method and device and a medium. The system comprises a namespace setting module used for setting and managing a plurality of NVMe namespaces, each namespace serving as an independent resource utilization unit; the request processing module is configured on an equipment firmware layer and used for processing the video transcoding requests from the namespaces and controlling the access of the namespaces to a video processing unit (VPU) according to a preset strategy; and the point management module is used for recording and managing point consumption and accumulation conditions of each namespace when the video transcoding request is processed. An independent resource use budget is set for each NVMe namespace, and resource allocation is dynamically adjusted according to the importance of the request, so that fair allocation of resources among different namespaces is ensured.
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 schemes such as limiting I / O prioritization, rate limiting, and fair queues in NVMe for video transcoding functions, there are obvious drawbacks. Existing techniques rely on host interaction, payload size, and I / O rate and are not suitable for video transcoding scenarios because the amount of computation 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 amount of computation that the transcoder may offload. In order to fairly measure the proportional distribution of processing required by the hardware, the algorithm must also calculate the computation time used by each calling namespace. In this regard, the I / O of the namespace cannot clearly predict the required hardware time. To give a clear example 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 that is configured for higher encoding quality. In addition, the relative duty cycle will also vary depending on the complexity of the source image, so the prediction method is unreliable and the prediction results are 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] A namespace setting module is used to set up and manage multiple NVMe namespaces, each namespace being an independent resource utilization unit; a request processing module is configured in the device firmware layer, and is used to process video transcoding requests from each of the namespaces, and control the access of each of the namespaces to the video processing unit (VPU) according to a preset strategy; a point management module records and manages the point consumption and accumulation of each of the namespaces when processing the video transcoding requests.

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

[0007] Optionally, the request processing module is further used to: queue the requests waiting to be processed in the VPU and classify them according to the namespace identifier (NSID); and execute the video transcoding request from the namespace if the points allow.

[0008] Optionally, the request processing module is further used to: when the points are insufficient, make the namespace wait until sufficient points are obtained to continue processing the request.

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

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

[0011] Optionally, the points management module is also used to: record the points consumption of each namespace when processing video transcoding requests; when the points limit is exceeded in a single job, the excess portion is included in the debt of the next cycle.

[0012] Optionally, the system also includes: a credit balance monitoring module, which is used 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 an early warning when the credit balance of the namespace is lower than a preset threshold to remind the user or administrator to adjust resource allocation.

[0013] Optionally, the system further comprises: a priority division module, which is used to prioritize input / output operations according to the importance of the process to ensure that key video transcoding tasks are processed with priority.

[0014] Optionally, the system is further configured to support dynamic adjustment of the score refresh strategy and / or resource allocation strategy of the namespace to adapt to different video transcoding requirements and system load conditions.

[0015] According to a second aspect of an embodiment of the present application, a video transcoding method is provided, which uses an NVMe namespace as a unit of resource utilization and controls usage restrictions at a device firmware layer to achieve fair allocation of VPU resources. The method includes:

[0016] Configure multiple namespaces for NVMe devices. Each namespace can be used by a tenant individually as the basic unit for resource allocation and management.

[0017] Implement usage restrictions on VPU resources at the device firmware layer and allocate resources based on namespace requests;

[0018] A points management mechanism is introduced to allocate points of hardware runtime units that are refreshed regularly to each namespace, and points are consumed according to the requested runtime, thus achieving fair control over the use of VPU resources.

[0019] Optionally, the namespace setting method includes:

[0020] Create and configure multiple namespaces on NVMe devices;

[0021] Assign each namespace to a different tenant or application to achieve resource isolation and allocation.

[0022] Optionally, the method further comprises:

[0023] receiving a request from the namespace;

[0024] Determine the legitimacy of the request and the score of the namespace;

[0025] If the request is legal and the namespace credits are sufficient, the request is processed and credits are consumed according to the running time of the request;

[0026] If the request is illegal or the namespace credits are insufficient, the request is rejected or waited.

[0027] Optionally, each namespace is assigned a credit of hardware runtime units that is refreshed periodically, including:

[0028] Set a fixed refresh interval;

[0029] In each refresh interval, a namespace is selected for point refresh to ensure even distribution of refresh operations;

[0030] According to the preset rules, a certain number of points are assigned to each refreshed namespace.

[0031] Optionally, the points management mechanism includes:

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

[0033] Dynamically adjust the credit allocation strategy based on namespace usage to optimize resource utilization and ensure fairness;

[0034] When the namespace credits are insufficient, a warning is provided or appropriate measures are taken to intervene.

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

[0036] Monitor the credit balance of each namespace;

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

[0038] If the credit balance is insufficient, the request is rejected or processed later, and the credit balance is adjusted according to the preset policy;

[0039] Provides query and statistics functions for credit balance to support analysis and optimization of resource usage.

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

[0041] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the executable computer program in the storage medium is executed by a processor, the above method can be implemented.

[0042] Compared with the prior art, the beneficial effects of the present application are: a namespace setting module, which is used to set and manage multiple NVMe namespaces, each namespace as an independent resource utilization unit; a request processing module, which is configured in the device firmware layer, is used to process video transcoding requests from each of the namespaces, and control the access of each of the namespaces to the video processing unit (VPU) according to a preset strategy; a point management module, which records and manages the point consumption and accumulation of each of the namespaces when processing the video transcoding request. In the above manner, 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 invention ensures fair allocation of resources among different namespaces. Even when the budget of a certain namespace drops below 0, since the refresh interval only increases a fixed amount, the namespace still has the opportunity to restore resource usage capabilities in subsequent refresh cycles, thereby avoiding the problem of excessive concentration and waste of resources. By optimizing video transcoding performance and resource allocation strategies, the present invention 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 invention can also meet users' personalized needs for video transcoding performance and resource usage. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of the structure of a video transcoding system provided in an embodiment of the present application.

[0044] Figure 2 A flowchart of a video transcoding method provided in an embodiment of the present application.

[0045] Figure 3The diagram of this embodiment details the basic flow chart for processing requests in a namespace.

[0046] Figure 4 This application is a diagram showing how to refresh your points.

[0047] Figure 5 A graph of integral reduction and increase in a running system is illustrated for this application.

[0048] Figure 6 The figure is a block diagram of a video transcoding apparatus according to an exemplary embodiment.

[0049] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0050] Unless otherwise defined, the technical terms or scientific terms used in this specification and claims shall have the usual meanings understood by persons with ordinary skills in the technical field to which the invention belongs. The specific embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be noted that in the specific description of these embodiments, in order to provide a concise description, it is impossible for this specification to provide a detailed description of all the features of the actual embodiments. Without departing from the spirit and scope of the present invention, those skilled in the art may modify and replace the embodiments of the present invention, and the resulting embodiments are also within the scope of protection of the present invention.

[0051] Terminology explanation:

[0052] VPU (Video Processing Unit): VPU is a processor specifically used to process 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 and other fields. In these scenarios, VPU can provide smoother video playback and better image quality. The performance of VPU depends on its design and implementation. A high-performance VPU can process 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. The power consumption management of VPU needs to be considered when designing low-power devices.

[0053] NVMe (Non-Volatile Memory Express) is a high-speed interface protocol designed for PCIe SSDs to reduce latency and improve IOPS performance. It improves SSD performance through features such as multiple command queues, low-latency design, and optimized memory addressing methods. NVMe supports out-of-order execution of commands and multiple arbitration mechanisms, such as round-robin scheduling, to achieve efficient resource utilization. In addition, it also has features such as metadata, power management, and dynamic queue management, which enables the SSD controller to work better with the host system. NVMe is mainly used in the storage field, especially in storage scenarios that require high performance and low latency.

[0054] like Figure 1 A schematic diagram of the structure of a video transcoding system provided in an embodiment of the present application. Figure 1 It can be seen that the system mainly includes a namespace setting module 11, a request processing module 12, and a points management module 13. The namespace setting module 11 is used to set up and manage multiple NVMe namespaces, each namespace being 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 the access of each of the namespaces to the video processing unit (VPU) according to a preset strategy. The points management module 13 records and manages the points consumption and accumulation of each of the namespaces when processing the video transcoding requests.

[0055] In actual applications, the namespace setting module 11, as the core component of the system, is responsible for setting up 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 namespace to meet the needs of different application scenarios.

[0056] The request processing module 12 is cleverly configured in the device firmware layer, and its main responsibility is to process video transcoding requests from various namespaces. This module not only has the ability to efficiently process requests, but also can intelligently control 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, while maximizing the utilization of the VPU and the overall performance of the system.

[0057] The points management module 13 is a key component in the system for recording and managing the points consumption and accumulation of each namespace when processing video transcoding requests. This module tracks the changes in points of each namespace in real time through precise calculation and recording, and increases or decreases points according to preset rules. This mechanism not only helps to achieve fair allocation of resources, but also effectively prevents excessive use and waste of resources. At the same time, the points management module also provides system administrators with rich data support to help them better monitor and manage the resource usage of the system.

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

[0059] In one or more embodiments of the present application, the namespace setting module further includes: a namespace allocation submodule, which is used to direct each namespace to a separate container for use by different tenants.

[0060] Namespace allocation submodule: This submodule is responsible for accurately directing each namespace to an independent container, aiming to provide a dedicated and isolated storage environment for different tenants. Through refined 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 makes it easier for 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. It is highly configurable. As tenant business needs change, the namespace allocation submodule can dynamically adjust the resource allocation of the namespace to ensure maximum resource utilization and stable operation of the system. It has dynamic adjustment capabilities. By allocating an independent namespace to each tenant, the system achieves effective isolation of resources and ensures data security and privacy.

[0062] In summary, the namespace setting module and the namespace allocation submodule it contains together constitute an efficient, secure and easy-to-manage resource allocation system, providing exclusive storage environment and resource guarantees for different tenants.

[0063] In one or more embodiments of the present application, the request processing module is also used to: queue requests waiting for processing in the VPU and classify them according to the namespace identifier (NSID); and execute video transcoding requests from the namespace if points allow.

[0064] The request processing module is not only responsible for processing video transcoding requests from various namespaces, but also undertakes the task of efficiently managing these requests in the video processing unit (VPU). Specifically, this module performs the following key operations: Once a video transcoding request from a namespace is received, the request processing module will first queue these requests in the VPU queue for processing. To ensure the orderly execution of requests, the module will classify them according to the namespace identifier (NSID) attached to each request. This classification mechanism helps system administrators and VPUs to more clearly identify and manage requests from different namespaces, thereby optimizing resource allocation and scheduling strategies.

[0065] After the requests are queued and classified, the request processing module further checks the credit balance of each namespace. Only when the credits of the namespace are sufficient to pay for the current video transcoding request will the module allow the request to enter the execution phase. This mechanism ensures fair allocation and effective utilization of resources, avoiding system congestion and performance degradation caused by resource abuse.

[0066] When executing video transcoding requests, the request processing module will also dynamically adjust the VPU resource allocation based on the 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 the system with efficient, flexible and secure video transcoding services through sophisticated request management, score verification and execution strategy, as well as dynamic resource adjustment capabilities.

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

[0069] The request processing module plays a vital role in the processing flow of video transcoding tasks. It is not only responsible for receiving, queuing, classifying and executing video transcoding requests from various namespaces, but also has the ability to make intelligent decisions in point management. Specifically, when the points of a namespace are not enough to pay for the current request, the request processing module will adopt a series of waiting strategies. These strategies may include placing the request at the end of the waiting queue, or assigning it a reasonable waiting position based on the priority and waiting time of the namespace. At the same time, the module will also regularly check the points of the namespace, and once the points are sufficient, it will immediately send the waiting request to the VPU for execution. In the process of executing video transcoding requests, the request processing module will also dynamically adjust the resource allocation of the VPU according to the real-time load of the system and the resource usage of the namespace. This dynamic adjustment capability helps the system maintain efficient and stable performance when facing video transcoding tasks of different scales and complexities.

[0070] In summary, the request processing module provides the system with efficient, flexible and secure video transcoding services through sophisticated request management, score verification and execution strategy, waiting strategy when the score is insufficient, and dynamic resource adjustment capabilities. These functions together ensure that the system can maintain 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 includes: a score refresh module, configured to periodically refresh the score of the runtime unit for each namespace to ensure fairness in resource allocation.

[0072] In actual applications, the system also includes a crucial component: the points refresh module, which bears the core responsibility of ensuring the fairness of resource allocation. The points refresh module is a periodically running component in the system, and its main function is to refresh the points of the runtime unit for each namespace. This mechanism is designed to ensure that all namespaces have a fair chance in resource allocation and avoid the "starvation" phenomenon caused by not obtaining resources for a long time.

[0073] Specifically, the points refresh module will automatically add a certain number of points to each namespace at preset time intervals (such as every hour, every day, etc.). These newly added points will serve as "chips" in the subsequent resource competition of the namespace, giving them the opportunity to obtain the required resources to continue processing video transcoding requests.

[0074] The design of the points refresh 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 equal opportunities in resource allocation. This helps avoid marginalization of certain namespaces due to long-term inability to obtain resources.

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

[0077] Predictability: With fixed refresh intervals and credit increments, the credit 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 processing module, namespace setting module, etc. to jointly maintain the resource allocation order of the system. When the request processing module detects that a namespace has insufficient points, it will suspend the request processing of the namespace and wait for the points refresh module to refresh its points. Once the points are sufficient, the request processing module will continue to process requests for the namespace.

[0079] In summary, the points refresh module is an indispensable component of the system. It ensures the fairness of resource allocation and the stability of the system 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 also used to: set a fixed refresh interval and refresh the points for a namespace in each interval; monitor the status of each namespace in the refresh interval and ensure that only one namespace obtains points in each heartbeat cycle.

[0081] The points refresh module is a key component in the system to ensure fairness and orderliness of resource allocation. The points refresh module is not only responsible for periodically refreshing the points for each namespace, but also has the important tasks of setting fixed refresh intervals, monitoring namespace status, and ensuring the order of point refreshes.

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

[0083] In each refresh interval, the points refresh module will traverse all namespaces and add a certain number of points to each namespace according to the preset rules. These points will serve as "chips" in the subsequent resource competition of the namespace to help them obtain the required resources.

[0084] In order to ensure the validity and fairness of the points, the points refresh module monitors the status of each namespace during each refresh interval. This includes checking the activity of the namespace, resource usage, and whether there are abnormal behaviors. Through monitoring, the module can promptly discover and resolve potential problems to ensure the stable operation of the system.

[0085] In order to avoid conflicts and confusion in resource allocation, the score refresh module ensures that only one namespace gets score refreshes within a heartbeat cycle. This can be achieved through a variety of 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 points refresh module also supports flexible refresh policies, allowing system administrators to adjust parameters such as refresh interval, points increment, and refresh order 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 points refresh module provides a fair, orderly and efficient resource allocation environment for the system by setting a fixed refresh interval, refreshing points for each namespace, monitoring namespace status and ensuring the order of point refresh. These functions together ensure the stability and reliability of the system and provide tenants with high-quality video transcoding services.

[0088] In one or more embodiments of the present application, the points management module is also used to: record the points consumption of each namespace when processing video transcoding requests; when the points limit is exceeded in a single job, the excess portion is included in the debt of the next cycle.

[0089] The points management module is the core component in the system responsible for points recording and management. The points management module is not only responsible for recording the points consumption of each namespace when processing video transcoding requests, but also bears the important responsibilities of monitoring the use of points, handling overspending of points, and maintaining the balance of points accounts.

[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 number 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 the credits consumed by a namespace in a single job exceed the balance of its current account, the credit management module will take a series of measures to deal with this overspending. Among them, a common practice is to count the excess amount as the debt of the next cycle. This means that the namespace needs to repay this part of the debt at some point in the future to restore the balance of its credit account.

[0092] In order to ensure the reasonable use of points and avoid malicious overdrafts, the points management module will continuously monitor the use of points in each namespace. This includes checking the consumption rate of points, abnormal transactions, and possible points fraud. Through monitoring, the module can promptly discover and correct potential points management problems to ensure the fairness and security of the system.

[0093] The points management module is also responsible for maintaining the balance of each namespace's points account. This includes regularly updating the points balance, processing points recharge and deduction operations, and ensuring the accuracy and completeness of account information. By maintaining the balance of the points account, the module can ensure that each namespace has a fair chance at resource allocation and avoid service interruptions or resource restrictions due to insufficient points.

[0094] To help system administrators and tenants understand the usage of points, the points management module also provides points reporting and query functions. These functions allow users to view information such as the balance of their points account, the history of points consumption, and any outstanding debts. By providing this information, the module can help users better plan and manage their resource usage.

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

[0096] In one or more embodiments of the present application, the system also includes: a credit balance monitoring module, which is used 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; when the credit balance of the namespace is lower than a preset threshold, an early warning is issued to remind the user or administrator to adjust the resource allocation.

[0097] On the basis of ensuring the efficiency and fairness of resource allocation, the system 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 indispensable part of the system. It is responsible for real-time monitoring of the credit balance of each namespace and dynamically adjusting the resource allocation strategy for each namespace based on these credit balances. The core functions of this module include:

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

[0100] Dynamically adjust resource allocation strategy: According to the credit balance of each namespace, the credit balance monitoring module will intelligently adjust the resource allocation strategy. For namespaces with higher credit balances, the module may provide more resources to encourage them to continue to maintain a good credit record; 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 the preset threshold, the credit balance monitoring module will immediately trigger an 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 replenish credit balances.

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

[0103] Flexible configuration of warning thresholds: In order to meet the needs and risk preferences of different users, the credit balance monitoring module allows users or administrators to flexibly configure warning thresholds. This means that users can set different credit balance thresholds according to their actual situation and needs to ensure that they receive 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 and provide users with more efficient, fair and secure resource allocation services.

[0105] In one or more embodiments of the present application, the system further includes: a priority classification module, which is used to prioritize input / output operations according to the importance of the process to ensure that key video transcoding tasks are given priority.

[0106] While ensuring resource allocation efficiency and fairness, the system also introduces a priority division module to achieve intelligent management and optimization of input / output operations (I / O operations), especially for video transcoding tasks.

[0107] The priority division module is a key part of the system. It is responsible for prioritizing input / output operations according to the importance of the process, ensuring that key 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 prioritization module evaluates the priority of each input / output operation by considering multiple factors, such as task urgency, user level, resource requirements, and system load. Through intelligent algorithms, the module can accurately determine which tasks are more important and assign them higher priorities.

[0109] Dynamically adjust priorities: As system status and task requirements change, the prioritization module dynamically adjusts the priorities of each task. For example, when a critical video transcoding task is about to time out or resource requirements increase dramatically, the module will increase its priority accordingly to ensure that the task can be completed on time.

[0110] Critical task guarantee: The priority division module will pay special attention and guarantee to critical video transcoding tasks, ensuring that these tasks can be processed with high quality in the shortest time by allocating more resources, shortening waiting time and increasing processing speed.

[0111] Avoiding priority inversion: To prevent low-priority tasks from blocking high-priority tasks, the priority partitioning module uses a series of mechanisms to prevent priority inversion. For example, by setting priority inheritance, priority ceiling, or priority boosting strategies, we ensure that high-priority tasks are always processed in a timely manner.

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

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

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

[0115] On the basis of ensuring efficient, fair and flexible resource allocation, the system further enhances its dynamic adaptability and supports dynamic adjustment of the namespace score refresh strategy and / or resource allocation strategy according to actual video transcoding requirements and system load conditions.

[0116] The system not only has powerful static configuration capabilities and can manage namespace points and resources according to preset rules and strategies, but more importantly, it also has excellent dynamic adjustment capabilities and can respond to changes in system status in real time to adapt to different video transcoding requirements and load conditions.

[0117] The system can dynamically adjust the score refresh strategy of the namespace according to actual needs and load conditions. For example, during the peak period of video transcoding, the system may increase the frequency of score refresh to ensure that key tasks can obtain enough points to compete for resources; while during the trough period, in order to save system resources, the system may reduce the refresh frequency. In addition, the system can also adjust its score refresh strategy according to factors such as the activity and historical performance of the namespace.

[0118] Similar to the credit refresh strategy, the system's resource allocation strategy is also dynamically adjustable. When faced with high load or urgent tasks, the system can quickly adjust the resource allocation strategy to provide more resources for critical tasks to ensure that they can be completed on time. At the same time, the system will also intelligently allocate resources based on factors such as the namespace's credit balance, priority, and historical resource usage to maximize resource utilization.

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

[0120] In order to facilitate users and administrators to perform dynamic adjustment operations, the system also provides a variety of dynamic adjustment interfaces and visualization tools. These interfaces and tools allow users to flexibly adjust the score refresh and resource allocation strategies of the namespace according to actual needs. At the same time, through the visualization tools, users can also intuitively view the current status of the system, historical records, and adjustment effects, so as to make more informed decisions.

[0121] In summary, the system achieves intelligent response and adaptation to video transcoding requirements and system load conditions by supporting dynamic adjustment of the score refresh strategy and / or resource allocation strategy of the namespace. This dynamic adaptability enables the system to respond to various complex situations more flexibly, ensuring that key tasks are processed in a timely manner while maximizing the use of system resources.

[0122] like Figure 2 A schematic diagram of a video transcoding method provided in an embodiment of the present application. The method is applied to the VPU end. Figure 2 As can be seen in , the method includes the following steps:

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

[0124] Step 202: Implement usage restrictions on VPU resources at the device firmware layer and allocate resources based on the namespace request.

[0125] Step 203: Introduce a points management mechanism to allocate regularly refreshed hardware runtime unit points to each namespace, and consume points according to the requested runtime, so as to achieve fair control over the use of VPU resources.

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

[0127] Optionally, the method also includes: receiving a request from the namespace; determining the legality of the request and the points of the namespace; if the request is legal and the namespace points are sufficient, processing the request and consuming points based on the running time of the request; if the request is illegal or the namespace points are insufficient, rejecting the request or waiting.

[0128] Optionally, each namespace is allocated points of hardware runtime units that are refreshed periodically, including: setting a fixed refresh interval; selecting a namespace for point refresh within each refresh interval to ensure uniform distribution of refresh operations; and allocating certain points to each refreshed namespace according to preset rules.

[0129] Optionally, the points management mechanism includes: real-time monitoring of namespace usage, including used points and remaining points; dynamically adjusting the points allocation strategy based on namespace usage to optimize resource utilization and ensure fairness; and providing warnings or taking appropriate measures to intervene when namespace points are insufficient.

[0130] Optionally, the credit balance management method includes: monitoring the credit balance of each namespace; when processing a request, checking whether the credit balance of the namespace is sufficient; if the credit balance is insufficient, rejecting the request or delaying processing, and adjusting the credit balance according to a preset policy; providing query and statistical functions for the credit balance to support analysis and optimization of resource usage.

[0131] For easier understanding, the present invention will be described below with reference to specific embodiments.

[0132] First, you need to set up multiple separate namespaces for NVMe devices. Each namespace can be directed to a separate container for tenants to use.

[0133] When each namespace is idle or fully utilized by tenants, the throttling of operations requested on the VPU is handled by the device layer.

[0134] The following Figure 3 The following diagram details the basic flow chart for processing a request in a namespace. It may wait for points, or be processed immediately. If many task requests are sent by a single namespace, the NVMe driver's submission queue will naturally fill up and prevent excessive requests. Requests queued in the VPU will follow the waiting logic in the NSID handler. Figure 3 The steps shown include: Each NSID is given credits of hardware runtime units that are refreshed periodically. Each NSID refresh cycle is evenly distributed, and no 2 or more refreshes are done at the same time. The runtime of the job requested by the NSID is counted towards the credits. The excess credits in one job will be counted towards the debt of the next cycle.

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

[0136] Figure 5 A graph of integral reduction and increase in a running system is illustrated for this application.

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

[0138] Configuration module 61 is used to configure multiple namespaces for NVMe devices, each namespace can be used by a tenant individually as a basic unit for resource allocation and management.

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

[0140] The points module 63 is used to introduce a points management mechanism, allocate points of hardware runtime units that are refreshed regularly to each namespace, and consume points according to the requested runtime, so as to achieve fair control of VPU resource usage.

[0141] The configuration module 61 is used to create and configure multiple namespaces on the NVMe device; each namespace is allocated to a different tenant or application to achieve isolation and allocation of resources.

[0142] Optionally, it also includes a receiving module 64, which is used to receive a request from the namespace; determine the legality of the request and the score of the namespace; if the request is legal and the namespace points are sufficient, process the request and consume points according to the running time of the request; if the request is illegal or the namespace points are insufficient, reject the request or wait.

[0143] Optionally, the integration module 63 is used to set a fixed refresh interval; within each refresh interval, select a namespace for point refresh to ensure uniform distribution of refresh operations; and allocate a certain number of points to each refreshed namespace according to preset rules.

[0144] Optionally, the points module 63 is used to monitor the usage of the namespace in real time, including the used points and the remaining points; dynamically adjust the points allocation strategy according to the usage of the namespace to optimize resource utilization and ensure fairness; when the namespace points are insufficient, provide a warning or take appropriate measures to intervene.

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

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

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

[0148] Regarding the device in the above embodiment, the specific manner in which the processor performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

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

[0150] The device 1200 may also include a power 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 may operate based on an operating system stored in the memory 1232, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0151] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1232 including instructions, which can be executed by the processing component 1222 of the device 1200 to perform the above method. 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 disk, an optical data storage device, etc.

[0152] In the present invention, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. The term "plurality" refers to two or more than two, unless otherwise clearly defined.

[0153] The above description of the embodiments is to facilitate those of ordinary skill in the art to understand and apply the present application. It is obvious that those familiar with the art can easily make various modifications to these embodiments and apply the general principles described herein to other embodiments without having to pay creative labor. Therefore, the present application is not limited to the embodiments herein, and improvements and modifications made by those skilled in the art based on the contents disclosed in the present application without departing from the scope and spirit of the present application are within the scope of the present application.

Claims

1. A video transcoding system, characterized in that: The system includes: The namespace setting module is used to set up and manage multiple NVMe namespaces, each of which serves as an independent resource utilization unit; A request processing module, configured in 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 policy; The points management module records and manages the points consumption and accumulation of each namespace when processing the video transcoding request.

2. The system according to claim 1, characterized in that The namespace setting module further includes: a namespace allocation submodule, which is used to direct each namespace to a separate container for use by different tenants.

3. The system according to claim 1, characterized in that The request processing module is also used for: Requests are queued for processing in the VPU and classified according to the namespace identifier; Executes video transcoding requests from a namespace if credits allow.

4. The system according to claim 3, characterized in that The request processing module is also used for: Makes the namespace wait when credits are insufficient until enough credits are obtained to continue processing requests.

5. The system according to claim 1, characterized in that The system further comprises: a score refreshing module, which is used to periodically refresh the score of the runtime unit for each namespace to ensure fairness in resource allocation.

6. The system according to claim 1, characterized in that The points refreshing module is further used for: Set a fixed refresh interval and refresh the points for a namespace in each interval; Monitor the status of each namespace during the refresh interval and ensure that only one namespace receives credits during each heartbeat cycle.

7. The system according to claim 1, characterized in that The points management module is also used for: Record the credit consumption of each namespace when processing video transcoding requests; When the credit limit is exceeded in a single job, the excess amount will be counted as debt for the next cycle.

8. The system according to claim 1, characterized in that The system also includes: a credit balance monitoring module, which is used 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; When the namespace credit balance is lower than a preset threshold, an early warning is issued to remind a user or administrator to adjust resource allocation.

9. The system according to any one of claims 1 to 8, characterized in that The system further comprises: a priority division module, which is used to prioritize input / output operations according to the importance of the processes, so as to ensure that key video transcoding tasks are processed with priority.

10. The system according to any one of claims 1 to 9, characterized in that The system is further configured to support dynamic adjustment of the score refresh strategy and / or resource allocation strategy of the namespace to adapt to different video transcoding requirements and system load conditions.

11. A video transcoding method, characterized in that: Using NVMe namespace as a unit of resource utilization and controlling usage restrictions at the device firmware layer to achieve fair allocation of VPU resources, the method includes: Configure multiple namespaces for NVMe devices. Each namespace can be used by a tenant separately as the basic unit for resource allocation and management. Implement usage restrictions on VPU resources at the device firmware layer and allocate resources based on namespace requests; A points management mechanism is introduced to allocate points of hardware runtime units that are refreshed regularly to each namespace, and points are consumed according to the requested runtime, thus achieving fair control over the use of VPU resources.

12. The method according to claim 11, characterized in that The namespace setting method includes: Create and configure multiple namespaces on NVMe devices; Assign each namespace to a different tenant or application to achieve resource isolation and allocation.

13. The method according to claim 11, characterized in that The method further comprises: receiving a request from the namespace; Determine the legitimacy of the request and the score of the namespace; If the request is legal and the namespace credits are sufficient, the request is processed and credits are consumed according to the running time of the request; If the request is illegal or the namespace credits are insufficient, the request is rejected or waited.

14. The method according to claim 11, characterized in that Each namespace is allocated a credit of hardware runtime units that are refreshed periodically, including: Set a fixed refresh interval; In each refresh interval, a namespace is selected for point refresh to ensure even distribution of refresh operations; According to the preset rules, a certain number of points are assigned to each refreshed namespace.

15. The method according to claim 11, characterized in that The points management mechanism includes: Real-time monitoring of namespace usage, including used credits and remaining credits; Dynamically adjust the credit allocation strategy based on namespace usage to optimize resource utilization and ensure fairness; When the namespace credits are insufficient, a warning is provided or appropriate measures are taken to intervene.

16. The method according to claim 11, characterized in that Credit balance management methods, including: Monitor the credit balance of each namespace; When processing a request, check whether the credit balance of the namespace is sufficient; If the credit balance is insufficient, the request is rejected or processed later, and the credit balance is adjusted according to the preset policy; Provides query and statistics functions for credit balance to support analysis and optimization of resource usage.

17. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program executable by the processor; and the processor is used to execute the computer program in the memory to implement the method according to any one of claims 11 to 16.

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

Citation Information

Patent Citations

  • Data migration method and system for distributed file system and related components

    CN111078120A

  • Distributed transcoding scheduling method and system

    CN115866269A

  • Service providing system and method based on multiple tenants

    CN117331696A

  • Optimizing media transcoding based on licensing models

    US11989585B1

  • Method for providing nonvolatile storage write bandwidth using a caching namespace

    US20170075590A1

Cited By

  • Video transcoding method and device, equipment, storage medium and program product

    CN121217932A