Video analysis task scheduling method and system based on intelligent scheduling mode
By adopting intelligent scheduling mode in the video analysis task scheduling system and dynamically adjusting resource allocation, the existing system's problems of low resource utilization, insufficient real-time and insufficient flexibility are solved, and more efficient and flexible resource management is achieved.
Patent Information
- Application Number
- CN202510199417.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing video analysis task scheduling systems lack intelligent optimization capabilities for task requirements and dynamic changes in system resources, resulting in low resource utilization, insufficient real-time and lack of flexibility.
A video analysis task scheduling method based on intelligent scheduling mode is proposed. By collecting task type information, content complexity and computing resource status information, the resource allocation amount is dynamically adjusted to ensure the intelligence and flexibility of resource allocation.
It improves the accuracy and efficiency of resource allocation, and can reasonably allocate and use resources according to the needs and actual conditions of different tasks, thereby improving the performance and stability of the system.
Smart Images

Figure CN119668819A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video processing, and in particular to a video analysis task scheduling method and system based on an intelligent scheduling mode. Background Art
[0002] With the rapid development of video surveillance and analysis technology, a large amount of video data needs to be processed in real time. However, most of the current mainstream video analysis task scheduling systems use fixed time intervals or resource sharing to schedule tasks, lacking the ability to intelligently optimize task requirements and dynamic changes in system resources. This static scheduling method has the following problems: low resource utilization: unable to dynamically adjust according to actual resource usage, often resulting in idle or overloaded resources; insufficient real-time performance: slow response to high-priority tasks, difficult to meet real-time requirements; lack of flexibility: unable to adapt to diverse task requirements in different scenarios, especially limited performance in complex application scenarios.
[0003] Therefore, it is necessary to design a video analysis task scheduling method and system based on an intelligent scheduling mode to solve the problems existing in current technology. Summary of the invention
[0004] In view of this, the present invention proposes a video analysis task scheduling method and system based on an intelligent scheduling mode, aiming to solve the problem that most mainstream video analysis task scheduling systems in current technology adopt a resource-sharing approach to task scheduling and lack the ability to intelligently optimize task requirements and dynamic changes in system resources.
[0005] In one aspect, the present invention proposes a video analysis task scheduling method based on an intelligent scheduling mode, comprising the following steps:
[0006] S100: Determine a video task to be analyzed, collect task type information of the video task to be analyzed, and determine an analysis priority of the video task to be analyzed according to the task type information; based on the task type information and the analysis priority, add the video task to be analyzed to a task queue, and determine an initial resource allocation amount for the video task to be analyzed;
[0007] S200: collecting the content complexity of the video task to be analyzed, and judging whether to optimize the initial resource allocation amount based on the content complexity;
[0008] S300: When it is determined that the initial resource allocation amount is to be optimized, the content complexity is compared with historical data, an optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and an optimized resource allocation amount is obtained;
[0009] S400: collecting current computing resource status information of the system, parsing the computing resource status information, and determining whether to adjust the optimized resource allocation amount based on the parsing result;
[0010] S500: When it is determined that the optimized resource allocation amount is to be adjusted, the execution status information of the video task to be analyzed and the resource usage information of the system are collected, and a resource allocation impact index is determined based on the execution status information and the resource usage information; an adjustment coefficient of the optimized resource allocation amount is determined according to the resource allocation impact index, and the adjusted resource allocation amount is obtained.
[0011] Further, when determining the analysis priority of the video task to be analyzed according to the task type information, it includes:
[0012] The task type information includes real-time requirements, video resolution and video format;
[0013] Calculating a processing difficulty index of the video task to be analyzed according to the real-time requirement, video resolution and video format;
[0014] Normalizing the processing difficulty index to obtain a normalized processing difficulty index;
[0015] Determining the analysis priority of the video task to be analyzed according to the normalized processing difficulty index; wherein the value range of the normalized processing difficulty is (0, 1);
[0016] When the normalized processing difficulty index is greater than or equal to 0 and less than or equal to 0.35, determining that the analysis priority of the video task to be analyzed is the first level;
[0017] When the normalized processing difficulty index is greater than 0.35 and less than or equal to 0.7, determining that the analysis priority of the video task to be analyzed is the second level;
[0018] When the normalized processing difficulty index is greater than 0.7 and less than or equal to 1, the analysis priority of the video task to be analyzed is determined to be the third level.
[0019] Further, when determining the initial resource allocation amount of the video task to be analyzed, it includes:
[0020] When the analysis priority of the video task to be analyzed is the first level, determining the initial resource allocation amount of the video task to be analyzed to be a first initial resource allocation amount;
[0021] When the analysis priority of the video task to be analyzed is the second level, determining the initial resource allocation amount of the video task to be analyzed to be the second initial resource allocation amount;
[0022] When the analysis priority of the video task to be analyzed is the third level, determining the initial resource allocation amount of the video task to be analyzed to be the third initial resource allocation amount;
[0023] The first initial resource allocation amount is smaller than the second initial resource allocation amount, and the second initial resource allocation amount is smaller than the third initial resource allocation amount.
[0024] Further, judging whether to optimize the initial resource allocation amount based on the content complexity includes:
[0025] Comparing the content complexity with a content complexity threshold, and determining whether to optimize the initial resource allocation amount according to the comparison result;
[0026] When the content complexity is within the content complexity threshold, determining not to optimize the initial resource allocation amount;
[0027] When the content complexity is outside the content complexity threshold, it is determined to optimize the initial resource allocation amount.
[0028] Furthermore, the content complexity is compared with historical data, and the optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and the optimized resource allocation amount is obtained, including:
[0029] When there is a historical content complexity that is the same as the content complexity in the historical data, the initial resource allocation amount is optimized according to the historical optimization coefficient corresponding to the historical content complexity, and the product value of the historical optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount;
[0030] When there is no historical content complexity identical to the content complexity in the historical data, the difference between the content complexity and the historical data is calculated one by one, and a complexity difference data set is constructed. Based on the complexity difference data set, the optimization coefficient of the initial resource allocation amount is determined, and the optimized resource allocation amount is obtained.
[0031] Further, determining the optimization coefficient of the initial resource allocation amount based on the complexity difference data set and obtaining the optimized resource allocation amount includes:
[0032] Extracting the minimum value of the complexity difference in the complexity difference data set, and recording it as the minimum complexity difference;
[0033] Comparing the minimum complexity difference with the first minimum complexity difference and the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first minimum complexity difference is smaller than the second minimum complexity difference;
[0034] When the minimum complexity difference is less than or equal to the first minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a first optimization coefficient, and taking the product value of the first optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount;
[0035] When the minimum complexity difference is greater than the first minimum complexity difference and less than or equal to the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a second optimization coefficient, and taking the product value of the second optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount;
[0036] When the minimum complexity difference is greater than the second minimum complexity difference, the optimization coefficient of the initial resource allocation amount is determined to be a third optimization coefficient, and the product value of the third optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount.
[0037] Furthermore, the computing power resource status information is parsed, and based on the parsing result, it is determined whether to adjust the optimized resource allocation amount, including:
[0038] Analyze the computing power resource status information to obtain the amount of idle computing power resources and the computing power resource utilization rate;
[0039] Calculate the computing power resource redundancy index according to the idle computing power resource amount and the computing power resource utilization rate;
[0040] Comparing the computing power resource redundancy index with the computing power resource redundancy threshold, and determining whether to adjust the optimized resource allocation amount according to the comparison result;
[0041] When the computing power resource redundancy index is greater than or equal to the computing power resource redundancy threshold, determining not to adjust the optimized resource allocation amount;
[0042] When the computing power resource redundancy index is less than the computing power resource redundancy threshold, it is determined to adjust the optimized resource allocation amount.
[0043] Further, when determining the resource allocation impact index based on the execution state information and the resource usage information, it includes:
[0044] The resource allocation impact index is obtained by the following formula:
[0045]
[0046] Among them, Ir represents the resource allocation impact index; Ract represents the actual resource allocation amount used by the video task to be analyzed; Rall represents the optimized resource allocation amount of the video task to be analyzed; Tact represents the time required for the completed task amount of the video task to be analyzed; Texp represents the expected completion time of the video task to be analyzed; Uact represents the system resource utilization rate; Umax represents the maximum utilization rate of system resources; ω1, ω2, ω3 represent weight coefficients, and ω1+ω2+ω3=1.
[0047] Further, determining the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index and obtaining the adjusted resource allocation amount includes:
[0048] Comparing the resource allocation impact index with the first resource allocation impact index and the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first resource allocation impact index is less than the second resource allocation impact index;
[0049] When the resource allocation impact index is less than or equal to the first resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the first adjustment coefficient, and taking the product value of the first adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount;
[0050] When the resource allocation impact index is greater than the first resource allocation impact index and less than or equal to the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the second adjustment coefficient, and taking the product value of the second adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount;
[0051] When the resource allocation impact index is greater than the second resource allocation impact index, the adjustment coefficient of the optimized resource allocation amount is determined to be a third adjustment coefficient, and the product value of the third adjustment coefficient and the optimized resource allocation amount is used as the adjusted resource allocation amount.
[0052] Compared with the prior art, the beneficial effect of the present invention is that the video analysis task scheduling method based on the intelligent scheduling mode provided by the present invention realizes intelligent and dynamic scheduling of video analysis task resource allocation by comprehensively considering task type information, content complexity and computing resource status information. This scheduling method not only improves the accuracy and efficiency of resource allocation, but also can reasonably allocate and use resources according to the needs and actual conditions of different tasks, thereby improving the performance and stability of the entire system.
[0053] In another aspect, the present invention also proposes a video analysis task scheduling system based on an intelligent scheduling mode, comprising:
[0054] A first judgment module is configured to collect content complexity of the video task to be analyzed, and judge whether to optimize the initial resource allocation amount based on the content complexity;
[0055] an optimization module, configured to compare the content complexity with historical data when determining to optimize the initial resource allocation amount, determine an optimization coefficient of the initial resource allocation amount according to the comparison result, and obtain an optimized resource allocation amount;
[0056] A second judgment module is configured to collect current computing resource status information of the system, analyze the computing resource status information, and determine whether to adjust the optimized resource allocation amount based on the analysis result;
[0057] The adjustment module is configured to collect the execution status information of the video task to be analyzed and the resource usage information of the system when it is determined that the optimized resource allocation amount is to be adjusted, and determine the resource allocation impact index based on the execution status information and the resource usage information; determine the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index, and obtain the adjusted resource allocation amount.
[0058] It is understandable that the above-mentioned video analysis task scheduling method and system based on the intelligent scheduling mode have the same beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0060] Figure 1 A flowchart of a video analysis task scheduling method based on an intelligent scheduling mode provided by an embodiment of the present invention;
[0061] Figure 2 A structural block diagram of a video analysis task scheduling system based on an intelligent scheduling mode provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0063] See also Figure 1 As shown, in some embodiments of the present application, this embodiment provides a video analysis task scheduling method based on an intelligent scheduling mode, comprising the following steps:
[0064] S100: Determine a video task to be analyzed, collect task type information of the video task to be analyzed, and determine an analysis priority of the video task to be analyzed according to the task type information; based on the task type information and the analysis priority, add the video task to be analyzed to a task queue, and determine an initial resource allocation amount for the video task to be analyzed;
[0065] S200: collecting the content complexity of the video task to be analyzed, and judging whether to optimize the initial resource allocation amount based on the content complexity;
[0066] S300: When it is determined that the initial resource allocation amount is to be optimized, the content complexity is compared with historical data, an optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and an optimized resource allocation amount is obtained;
[0067] S400: collecting current computing resource status information of the system, parsing the computing resource status information, and determining whether to adjust the optimized resource allocation amount based on the parsing result;
[0068] S500: When it is determined that the optimized resource allocation amount is to be adjusted, the execution status information of the video task to be analyzed and the resource usage information of the system are collected, and a resource allocation impact index is determined based on the execution status information and the resource usage information; an adjustment coefficient of the optimized resource allocation amount is determined according to the resource allocation impact index, and the adjusted resource allocation amount is obtained.
[0069] In this embodiment, the initial resource allocation amount refers to the basic computing resource amount pre-allocated for the video task to be analyzed.
[0070] It can be understood that the video analysis task scheduling method based on the intelligent scheduling mode provided in this embodiment realizes intelligent scheduling of video analysis task resource allocation by comprehensively considering the task type information and content complexity of the video task to be analyzed. In the specific implementation process, the system first calculates the processing difficulty index of the video task to be analyzed based on the task type information, such as real-time requirements, video resolution and video format, and then determines its analysis priority. This step ensures that the system can reasonably allocate initial resources according to the importance and urgency of different tasks; then, the system will further optimize resource allocation according to the content complexity. By comparing with historical data, the system can learn the relationship between different content complexities and required resources, so as to determine a more accurate optimization resource allocation amount. This step makes full use of the value of historical data and improves the accuracy and efficiency of resource allocation; after determining the optimized resource allocation amount, the system will also collect computing power resource status information in real time, including idle computing power resources and computing power resource utilization rate, to determine whether the optimized resource allocation amount needs to be adjusted. When the computing power resource redundancy index is lower than the threshold, the system will collect the execution status information of the video task to be analyzed and the system resource usage information, further determine the resource allocation impact index, and adjust the optimized resource allocation amount accordingly. This step ensures that the system can dynamically adjust resource allocation according to actual conditions to adapt to the changing computing power requirements.
[0071] It can be understood that the video analysis task scheduling method based on the intelligent scheduling mode provided in this embodiment realizes intelligent and dynamic scheduling of video analysis task resource allocation by comprehensively considering task type information, content complexity and computing resource status information. This scheduling method not only improves the accuracy and efficiency of resource allocation, but also can reasonably allocate and use resources according to the needs and actual conditions of different tasks, thereby improving the performance and stability of the entire system.
[0072] Specifically, determining the analysis priority of the to-be-analyzed video task according to the task type information includes:
[0073] The task type information includes real-time requirements, video resolution and video format;
[0074] Calculating a processing difficulty index of the video task to be analyzed according to the real-time requirement, video resolution and video format;
[0075] Normalizing the processing difficulty index to obtain a normalized processing difficulty index;
[0076] Determining the analysis priority of the video task to be analyzed according to the normalized processing difficulty index; wherein the value range of the normalized processing difficulty is (0, 1);
[0077] When the normalized processing difficulty index is greater than or equal to 0 and less than or equal to 0.35, determining that the analysis priority of the video task to be analyzed is the first level;
[0078] When the normalized processing difficulty index is greater than 0.35 and less than or equal to 0.7, determining that the analysis priority of the video task to be analyzed is the second level;
[0079] When the normalized processing difficulty index is greater than 0.7 and less than or equal to 1, the analysis priority of the video task to be analyzed is determined to be the third level.
[0080] In this embodiment, the calculation formula of the processing difficulty index is:
[0081]
[0082]
[0083]
[0084]
[0085] Wherein, DI represents the processing difficulty index; f(RT) represents the function of the impact of real-time requirements on the processing difficulty index; f(VR) represents the function of the impact of video resolution on the processing difficulty index; f(VF) represents the function of the impact of video format on the processing difficulty index; α1, α2 and α3 represent index impact factors; RT represents the level value of real-time requirements; W and H represent the video width and height respectively; Wmax and Hmax represent the maximum video width and height respectively; δ represents the impact coefficient; VF represents the identifier of the video format.
[0086] It can be understood that, taking a video task to be analyzed with a high real-time requirement (RT=3), a video resolution of 1920x1080 (W=1920, H=1080, assuming Wmax=4096, Hmax=2160), and a video format of MP4 (VF=1, assuming the influence coefficient of the MP4 format δ=1.2) as an example, the calculation process of the processing difficulty index DI is as follows:
[0087] First, calculate the impact function f(RT) of real-time requirements on the processing difficulty index: f(RT)=RT=3;
[0088] Then, the influence function f(VR) of video resolution on the processing difficulty index is calculated: f(VR)≈0.2222;
[0089] Next, calculate the impact function f(VF) of the video format on the processing difficulty index: f(VF)=1.2×1=1.2;
[0090] Finally, according to the calculation formula of the processing difficulty index, the processing difficulty index DI of the video task to be analyzed is calculated: DI=α1×f(RT)+α2×f(VR)+α3×f(VF);
[0091] Assuming α1=0.5, α2=0.3, α3=0.2 (these values can be adjusted according to actual conditions), then: DI=0.5×3+0.3×0.2222+0.2×1.2≈1.5+0.0667+0.24=1.8067;
[0092] After normalization, the normalized processing difficulty index is about 0.8067 (the normalized value range is 0 to 1). According to the normalized processing difficulty index, the analysis priority of the video task to be analyzed is determined to be the third level. This means that the task has a high processing difficulty and importance, and the system needs to allocate more computing resources to prioritize processing.
[0093] It is understandable that the calculation of the processing difficulty index takes into account multiple factors such as real-time requirements, video resolution, and video format, and each factor has a certain impact on the final processing difficulty index. Specifically, the higher the real-time requirements of the video task, the higher the processing difficulty index will tend to be, because the system needs to complete the analysis task in a shorter time, and the requirements for computing resources are higher. Video resolution is also an important consideration. The higher the resolution of the video, the more information it contains, and the more complex it is to process, so its processing difficulty index will also increase accordingly. The video format will also affect the processing difficulty index. Videos of different formats may differ in the decoding, analysis, and processing processes, and these differences will lead to different processing difficulties.
[0094] Specifically, determining the initial resource allocation amount of the video task to be analyzed includes:
[0095] When the analysis priority of the video task to be analyzed is the first level, determining the initial resource allocation amount of the video task to be analyzed to be a first initial resource allocation amount;
[0096] When the analysis priority of the video task to be analyzed is the second level, determining the initial resource allocation amount of the video task to be analyzed to be the second initial resource allocation amount;
[0097] When the analysis priority of the video task to be analyzed is the third level, determining the initial resource allocation amount of the video task to be analyzed to be the third initial resource allocation amount;
[0098] The first initial resource allocation amount is smaller than the second initial resource allocation amount, and the second initial resource allocation amount is smaller than the third initial resource allocation amount.
[0099] It is understandable that the determination of the initial resource allocation amount is based on the analysis priority of the video task to be analyzed. Different initial resource allocation amounts are preset for tasks of different priorities to ensure that resources can be reasonably allocated. For tasks with higher analysis priorities, more initial resources will be allocated to ensure that they can be processed in a timely manner; while for tasks with lower analysis priorities, fewer initial resources will be allocated to avoid waste of resources. This strategy of allocating resources based on task priority not only improves the efficiency of resource use, but also ensures that the system can make reasonable resource scheduling decisions based on the needs and urgency of different tasks.
[0100] Specifically, judging whether to optimize the initial resource allocation amount based on the content complexity includes:
[0101] Comparing the content complexity with a content complexity threshold, and determining whether to optimize the initial resource allocation amount according to the comparison result;
[0102] When the content complexity is within the content complexity threshold, determining not to optimize the initial resource allocation amount;
[0103] When the content complexity is outside the content complexity threshold, it is determined to optimize the initial resource allocation amount.
[0104] In this embodiment, the calculation process of content complexity is: collect key frame image information of the video task to be analyzed, extract target data in the key frame image, and the target data includes: texture data, color data, and shape data; perform feature extraction on texture data, color data, and shape data to obtain texture eigenvalues, color eigenvalues, and shape eigenvalues; perform weighted summation on texture eigenvalues, color eigenvalues, and shape features to obtain content complexity.
[0105] In this embodiment, a key frame image refers to a main picture in a video sequence that can represent the content of the video or the development of the plot. The selection of key frame images is usually based on changes in the video content, such as scene switching, action changes, or important events. By extracting key frame images, the amount of data to be processed can be greatly reduced while retaining the main content of the video. In this embodiment, the system automatically extracts key frame images from the video task to be analyzed according to a preset algorithm to ensure that the extracted key frame images can accurately reflect the video content.
[0106] Specifically, the content complexity is compared with the historical data, and the optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and the optimized resource allocation amount is obtained, including:
[0107] When there is a historical content complexity that is the same as the content complexity in the historical data, the initial resource allocation amount is optimized according to the historical optimization coefficient corresponding to the historical content complexity, and the product value of the historical optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount;
[0108] When there is no historical content complexity identical to the content complexity in the historical data, the difference between the content complexity and the historical data is calculated one by one, and a complexity difference data set is constructed. Based on the complexity difference data set, the optimization coefficient of the initial resource allocation amount is determined, and the optimized resource allocation amount is obtained.
[0109] It is understandable that by comparing with historical data, the system can learn the relationship between different content complexities and required resources, thereby determining a more accurate optimized resource allocation. When there are historical records with the same content complexity as the current video task to be analyzed in the historical data, the system can directly use the optimization coefficient corresponding to the historical record to optimize the initial resource allocation, so that the optimized resource allocation can be determined quickly and accurately. When there are no historical records with the same content complexity as the current content in the historical data, the system will calculate the difference between the current content complexity and the historical data, construct a complexity difference data set, and determine the optimization coefficient based on the data set. Although this process is relatively complex, it can ensure that the system can still make reasonable resource allocation decisions when faced with new content complexities, thereby improving the adaptability and flexibility of the system.
[0110] Specifically, determining the optimization coefficient of the initial resource allocation amount based on the complexity difference data set and obtaining the optimized resource allocation amount includes:
[0111] Extracting the minimum value of the complexity difference in the complexity difference data set, and recording it as the minimum complexity difference;
[0112] Comparing the minimum complexity difference with the first minimum complexity difference and the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first minimum complexity difference is smaller than the second minimum complexity difference;
[0113] When the minimum complexity difference is less than or equal to the first minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a first optimization coefficient, and taking the product value of the first optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount;
[0114] When the minimum complexity difference is greater than the first minimum complexity difference and less than or equal to the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a second optimization coefficient, and taking the product value of the second optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount;
[0115] When the minimum complexity difference is greater than the second minimum complexity difference, the optimization coefficient of the initial resource allocation amount is determined to be a third optimization coefficient, and the product value of the third optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount.
[0116] In this embodiment, the first optimization coefficient < the second optimization coefficient < the third optimization coefficient. This method of determining the optimization coefficient based on the complexity difference data set not only takes into account the content complexity of the current task, but also makes full use of the value of historical data, making resource allocation more accurate and reasonable. By setting different minimum complexity difference thresholds, the system can automatically select the corresponding optimization coefficient according to different complexity difference ranges, thereby realizing dynamic adjustment of the initial resource allocation amount. This adjustment mechanism ensures that the system can make reasonable resource allocation decisions when facing video analysis tasks with different content complexities, thereby improving the adaptability and flexibility of the system.
[0117] Specifically, parsing the computing power resource status information and determining whether to adjust the optimized resource allocation amount based on the parsing result includes:
[0118] Analyze the computing power resource status information to obtain the amount of idle computing power resources and the computing power resource utilization rate;
[0119] Calculate the computing power resource redundancy index according to the idle computing power resource amount and the computing power resource utilization rate;
[0120] Comparing the computing power resource redundancy index with the computing power resource redundancy threshold, and determining whether to adjust the optimized resource allocation amount according to the comparison result;
[0121] When the computing power resource redundancy index is greater than or equal to the computing power resource redundancy threshold, determining not to adjust the optimized resource allocation amount;
[0122] When the computing power resource redundancy index is less than the computing power resource redundancy threshold, it is determined to adjust the optimized resource allocation amount.
[0123] It is understandable that the calculation formula for the computing power resource redundancy index is:
[0124]
[0125] Among them, RRI represents the computing resource redundancy index; IR represents the amount of idle computing resources; TR represents the total computing resources of the system; UR represents the computing resource utilization rate.
[0126] Specifically, determining the resource allocation impact index based on the execution state information and the resource usage information includes:
[0127] The resource allocation impact index is obtained by the following formula:
[0128]
[0129] Among them, Ir represents the resource allocation impact index; Ract represents the actual resource allocation amount used by the video task to be analyzed; Rall represents the optimized resource allocation amount of the video task to be analyzed; Tact represents the time required for the completed task amount of the video task to be analyzed; Texp represents the expected completion time of the video task to be analyzed; Uact represents the system resource utilization rate; Umax represents the maximum utilization rate of system resources; ω1, ω2, ω3 represent weight coefficients, and ω1+ω2+ω3=1.
[0130] It can be understood that the resource allocation impact index Ir is an indicator that comprehensively considers the actual resource usage, task progress, and system resource status. By introducing this index, the system can more comprehensively evaluate the rationality of the current resource allocation and make more accurate adjustment decisions accordingly. First, the ratio of the actual resource allocation amount Ract to the optimized resource allocation amount Rall reflects the accuracy of resource allocation. If Ract is close to Rall, it means that the resource allocation is relatively reasonable; if the gap between the two is large, it may be necessary to optimize the resource allocation. Secondly, the ratio of the time required to complete the task Tact to the expected completion time Texp reflects the consistency of the task progress with expectations. If Tact is less than or equal to Texp, it means that the task progress is in line with expectations or ahead of schedule; if Tact is greater than Texp, it may mean that the task progress is lagging behind and the system needs to provide more resource support. Finally, the ratio of the system resource utilization rate Uact to the maximum utilization rate Umax of the system resources reveals the tension of system resources. When Uact is close to Umax, it means that system resources are tight and resource allocation needs to be adjusted carefully; when Uact is far below Umax, system resources are relatively abundant and resource allocation can be appropriately increased to meet task requirements. The setting of weight coefficients ω1, ω2, and ω3 allows the system to pay different degrees of attention to these three factors according to actual needs. For example, in the scenario of pursuing task progress, the weight of ω2 can be appropriately increased; and in the scenario of focusing on resource efficiency, the weight of ω1 can be increased.
[0131] Specifically, determining the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index and obtaining the adjusted resource allocation amount includes:
[0132] Comparing the resource allocation impact index with the first resource allocation impact index and the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first resource allocation impact index is less than the second resource allocation impact index;
[0133] When the resource allocation impact index is less than or equal to the first resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the first adjustment coefficient, and taking the product value of the first adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount;
[0134] When the resource allocation impact index is greater than the first resource allocation impact index and less than or equal to the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the second adjustment coefficient, and taking the product value of the second adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount;
[0135] When the resource allocation impact index is greater than the second resource allocation impact index, the adjustment coefficient of the optimized resource allocation amount is determined to be a third adjustment coefficient, and the product value of the third adjustment coefficient and the optimized resource allocation amount is used as the adjusted resource allocation amount.
[0136] It is understandable that, in this embodiment, the first adjustment coefficient < the second adjustment coefficient < the third adjustment coefficient. This method of determining the adjustment coefficient based on the resource allocation impact index realizes the dynamic adjustment of the resource allocation amount and ensures that the resource allocation can adapt to the actual situation during the task execution process. By setting different resource allocation impact index thresholds, the system can automatically select the corresponding adjustment coefficient according to different impact index ranges, thereby realizing fine adjustment of the optimized resource allocation amount. This adjustment mechanism not only improves the efficiency of resource utilization, but also enhances the adaptability and flexibility of the system, so that the system can better cope with video analysis tasks in various complex scenarios.
[0137] See also Figure 2 As shown, in some embodiments of the present application, this embodiment provides a video analysis task scheduling system based on an intelligent scheduling mode, including:
[0138] A first judgment module is configured to collect content complexity of the video task to be analyzed, and judge whether to optimize the initial resource allocation amount based on the content complexity;
[0139] an optimization module, configured to compare the content complexity with historical data when determining to optimize the initial resource allocation amount, determine an optimization coefficient of the initial resource allocation amount according to the comparison result, and obtain an optimized resource allocation amount;
[0140] A second judgment module is configured to collect current computing resource status information of the system, analyze the computing resource status information, and determine whether to adjust the optimized resource allocation amount based on the analysis result;
[0141] The adjustment module is configured to collect the execution status information of the video task to be analyzed and the resource usage information of the system when it is determined that the optimized resource allocation amount is to be adjusted, and determine the resource allocation impact index based on the execution status information and the resource usage information; determine the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index, and obtain the adjusted resource allocation amount.
[0142] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A video analysis task scheduling method based on an intelligent scheduling mode, characterized in that: include: Determine a video task to be analyzed, collect task type information of the video task to be analyzed, and determine an analysis priority of the video task to be analyzed according to the task type information; Based on the task type information and the analysis priority, adding the to-be-analyzed video task to a task queue, and determining an initial resource allocation amount for the to-be-analyzed video task; Collecting the content complexity of the video task to be analyzed, and judging whether to optimize the initial resource allocation amount based on the content complexity; When it is determined that the initial resource allocation amount is to be optimized, the content complexity is compared with the historical data, an optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and an optimized resource allocation amount is obtained; Collecting the current computing resource status information of the system, parsing the computing resource status information, and determining whether to adjust the optimized resource allocation amount based on the parsing result; When it is determined that the optimized resource allocation amount is to be adjusted, the execution status information of the video task to be analyzed and the resource usage information of the system are collected, and a resource allocation impact index is determined based on the execution status information and the resource usage information; an adjustment coefficient of the optimized resource allocation amount is determined according to the resource allocation impact index, and the adjusted resource allocation amount is obtained.
2. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 1 is characterized in that: When determining the analysis priority of the to-be-analyzed video task according to the task type information, it includes: The task type information includes real-time requirements, video resolution and video format; Calculating a processing difficulty index of the video task to be analyzed according to the real-time requirement, video resolution and video format; Normalizing the processing difficulty index to obtain a normalized processing difficulty index; wherein the value range of the normalized processing difficulty is (0, 1); Determining the analysis priority of the video task to be analyzed according to the normalized processing difficulty index; When the normalized processing difficulty index is greater than or equal to 0 and less than or equal to 0.35, determining that the analysis priority of the video task to be analyzed is the first level; When the normalized processing difficulty index is greater than 0.35 and less than or equal to 0.7, determining that the analysis priority of the video task to be analyzed is the second level; When the normalized processing difficulty index is greater than 0.7 and less than or equal to 1, the analysis priority of the video task to be analyzed is determined to be the third level.
3. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 2 is characterized in that: Determining the initial resource allocation amount of the video task to be analyzed includes: When the analysis priority of the video task to be analyzed is the first level, determining the initial resource allocation amount of the video task to be analyzed to be a first initial resource allocation amount; When the analysis priority of the video task to be analyzed is the second level, determining the initial resource allocation amount of the video task to be analyzed to be the second initial resource allocation amount; When the analysis priority of the video task to be analyzed is the third level, determining the initial resource allocation amount of the video task to be analyzed to be the third initial resource allocation amount; The first initial resource allocation amount is smaller than the second initial resource allocation amount, and the second initial resource allocation amount is smaller than the third initial resource allocation amount.
4. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 1 is characterized in that: When determining whether to optimize the initial resource allocation amount based on the content complexity, it includes: Comparing the content complexity with a content complexity threshold, and determining whether to optimize the initial resource allocation amount according to the comparison result; When the content complexity is within the content complexity threshold, determining not to optimize the initial resource allocation amount; When the content complexity is outside the content complexity threshold, it is determined to optimize the initial resource allocation amount.
5. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 4 is characterized in that: The content complexity is compared with the historical data, and the optimization coefficient of the initial resource allocation amount is determined according to the comparison result, and the optimized resource allocation amount is obtained, including: When there is a historical content complexity that is the same as the content complexity in the historical data, the initial resource allocation amount is optimized according to the historical optimization coefficient corresponding to the historical content complexity, and the product value of the historical optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount; When there is no historical content complexity identical to the content complexity in the historical data, the difference between the content complexity and the historical data is calculated one by one, and a complexity difference data set is constructed. Based on the complexity difference data set, the optimization coefficient of the initial resource allocation amount is determined, and the optimized resource allocation amount is obtained.
6. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 5 is characterized in that: Determining the optimization coefficient of the initial resource allocation amount based on the complexity difference data set and obtaining the optimized resource allocation amount includes: Extracting the minimum value of the complexity difference in the complexity difference data set, and recording it as the minimum complexity difference; Comparing the minimum complexity difference with the first minimum complexity difference and the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first minimum complexity difference is smaller than the second minimum complexity difference; When the minimum complexity difference is less than or equal to the first minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a first optimization coefficient, and taking the product value of the first optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount; When the minimum complexity difference is greater than the first minimum complexity difference and less than or equal to the second minimum complexity difference, determining the optimization coefficient of the initial resource allocation amount as a second optimization coefficient, and taking the product value of the second optimization coefficient and the initial resource allocation amount as the optimized resource allocation amount; When the minimum complexity difference is greater than the second minimum complexity difference, the optimization coefficient of the initial resource allocation amount is determined to be a third optimization coefficient, and the product value of the third optimization coefficient and the initial resource allocation amount is used as the optimized resource allocation amount.
7. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 1 is characterized in that: Parsing the computing power resource status information and determining whether to adjust the optimized resource allocation amount based on the parsing result includes: Analyze the computing power resource status information to obtain the amount of idle computing power resources and the computing power resource utilization rate; Calculate the computing power resource redundancy index according to the idle computing power resource amount and the computing power resource utilization rate; Comparing the computing power resource redundancy index with the computing power resource redundancy threshold, and determining whether to adjust the optimized resource allocation amount according to the comparison result; When the computing power resource redundancy index is greater than or equal to the computing power resource redundancy threshold, determining not to adjust the optimized resource allocation amount; When the computing power resource redundancy index is less than the computing power resource redundancy threshold, it is determined to adjust the optimized resource allocation amount.
8. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 1 is characterized in that: Determining the resource allocation impact index based on the execution state information and the resource usage information includes: The resource allocation impact index is obtained by the following formula: Among them, Ir represents the resource allocation impact index; Ract represents the actual resource allocation amount used by the video task to be analyzed; Rall represents the optimized resource allocation amount of the video task to be analyzed; Tact represents the time required for the completed task amount of the video task to be analyzed; Texp represents the expected completion time of the video task to be analyzed; Uact represents the system resource utilization rate; Umax represents the maximum utilization rate of system resources; ω1, ω2, ω3 represent weight coefficients, and ω1+ω2+ω3=1.
9. The video analysis task scheduling method based on the intelligent scheduling mode according to claim 1 is characterized in that: Determining the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index and obtaining the adjusted resource allocation amount includes: Comparing the resource allocation impact index with the first resource allocation impact index and the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount according to the comparison result, and obtaining the optimized resource allocation amount; wherein the first resource allocation impact index is less than the second resource allocation impact index; When the resource allocation impact index is less than or equal to the first resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the first adjustment coefficient, and taking the product value of the first adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount; When the resource allocation impact index is greater than the first resource allocation impact index and less than or equal to the second resource allocation impact index, determining the adjustment coefficient of the optimized resource allocation amount as the second adjustment coefficient, and taking the product value of the second adjustment coefficient and the optimized resource allocation amount as the adjusted resource allocation amount; When the resource allocation impact index is greater than the second resource allocation impact index, the adjustment coefficient of the optimized resource allocation amount is determined to be a third adjustment coefficient, and the product value of the third adjustment coefficient and the optimized resource allocation amount is used as the adjusted resource allocation amount.
10. A video analysis task scheduling system based on an intelligent scheduling mode, applied to the video analysis task scheduling method based on an intelligent scheduling mode as claimed in any one of claims 1 to 9, characterized in that: include: A determination module is configured to determine a video task to be analyzed, collect task type information of the video task to be analyzed, and determine an analysis priority of the video task to be analyzed according to the task type information; based on the task type information and the analysis priority, add the video task to be analyzed to a task queue, and determine an initial resource allocation amount for the video task to be analyzed; A first judgment module is configured to collect content complexity of the video task to be analyzed, and judge whether to optimize the initial resource allocation amount based on the content complexity; an optimization module, configured to compare the content complexity with historical data when determining to optimize the initial resource allocation amount, determine an optimization coefficient of the initial resource allocation amount according to the comparison result, and obtain an optimized resource allocation amount; A second judgment module is configured to collect current computing resource status information of the system, analyze the computing resource status information, and determine whether to adjust the optimized resource allocation amount based on the analysis result; The adjustment module is configured to collect the execution status information of the video task to be analyzed and the resource usage information of the system when it is determined that the optimized resource allocation amount is to be adjusted, and determine the resource allocation impact index based on the execution status information and the resource usage information; determine the adjustment coefficient of the optimized resource allocation amount according to the resource allocation impact index, and obtain the adjusted resource allocation amount.
Citation Information
Patent Citations
Cloud video analysis system
CN118608922A
Video service resource allocation method and device
WO2018010119A1
Cited By
Multi-modal data digital processing process monitoring method
CN119988332A
Task scheduling method of all-in-one machine based on edge computing
CN120821544A
Data analysis collaboration method for main service platform of Internet of Things
CN121070378A
Video parsing algorithm resource scheduling method and device, and storage medium
CN121582757A
Video release management method and system based on artificial intelligence
CN121691751A