A method, system, device and medium for dynamically scheduling computing power of an edge computing device based on service priority

By virtualizing edge computing device resources into dynamically allocable units and combining a global resource status table and performance snapshots, resource quotas can be dynamically adjusted, solving the problem of unreliable latency for high-priority tasks in edge computing devices and improving resource utilization and system robustness.

CN123137889APending Publication Date: 2026-11-20TUOSI (SHANDONG) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611219720.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The static allocation of resources in edge computing devices results in unreliable latency for high-priority tasks, low resource utilization, and an inability to adapt to dynamic changes in task load.

Method used

The resources of edge computing devices are virtualized into dynamically allocable units. A global resource status table is maintained, and resource quotas are dynamically adjusted through admission control and performance snapshots to prioritize high-priority business tasks and evict or downgrade low-priority tasks.

Benefits of technology

It achieves latency target assurance for high-priority tasks under high load, improves resource utilization, and ensures the robustness and business continuity of critical businesses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137889A_ABST
    Figure CN123137889A_ABST
Patent Text Reader

Abstract

The application provides a business priority-based edge computing device dynamic computing power scheduling method, system, device and medium, belonging to the technical field of computing power scheduling, virtualizes and abstracts each resource in the edge computing device, encapsulates as a dynamically allocable resource unit, and maintains a global resource state table; receives a registration request of a task, performs admission control, creates a computing power container for the task and allocates an initial resource quota after admission; periodically collects the inference time delay of each task and the utilization rate of each resource to form a performance snapshot; according to the performance snapshot and the business priority of the task, the initial resource quota of each computing power container is dynamically adjusted, resources are recovered from tasks with low business priority, and are allocated to tasks with high business priority whose time delay exceeds a threshold; when the resources recovered still cannot meet the demand of the tasks with high business priority, the tasks with low business priority are executed to perform the expulsion or degradation operation. Dynamic scheduling is realized, and the time delay of high-priority tasks is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computing power scheduling technology, and in particular relates to a method, system, device and medium for dynamic computing power scheduling of edge computing devices based on business priority. Background Technology

[0002] Edge computing devices are widely used in real-time AI inference scenarios such as smart transportation, industrial quality inspection, and security monitoring, and typically need to run multiple deep learning tasks with different business priorities simultaneously.

[0003] In existing technologies, common resource management methods include static resource partitioning, fixed quota isolation based on cgroups, and simple priority preemption scheduling.

[0004] However, in practical applications, the total physical resources of edge computing devices are limited, while the load of each task changes dynamically over time. Staticly allocated fixed quotas cannot adapt to these fluctuations, leading to a sharp increase in inference latency for high-priority tasks during peak hours, while low-priority tasks occupy a large amount of idle resources during off-peak hours, resulting in low overall resource utilization. Furthermore, when multiple tasks compete for scarce resources simultaneously, the latency targets of high-priority tasks cannot be guaranteed. Summary of the Invention

[0005] This invention provides a method, system, device, and medium for dynamic computing power scheduling of edge computing devices based on business priorities, in order to at least solve the problem that static resource allocation in the prior art cannot guarantee the latency of high-priority tasks.

[0006] In a first aspect, embodiments of this application provide a method for dynamic computing power scheduling of edge computing devices based on service priorities, the method comprising: Step S1: Virtualize and abstract the various resources in the edge computing device, encapsulate them into dynamically allocable resource units, and maintain a global resource status table; the resources include a neural network processing unit (NPU), a central processing unit (CPU), a graphics processing unit (GPU), and system memory; Step S2: Receive the task registration request, perform admission control, and after admission is approved, create a computing power container for the task and allocate initial resource quotas; Step S3: Periodically collect the inference latency and resource utilization of each task to form a performance snapshot; Step S4: Based on the performance snapshot and the business priority of the task, dynamically adjust the initial resource quota of each computing power container, reclaim resources from low business priority tasks, and allocate them to high business priority tasks with latency exceeding the threshold. Step S5: If the high-priority task requirements still cannot be met after resource reclamation, perform eviction or downgrade operations on the low-priority tasks.

[0007] Furthermore, in step S1, the various resources in the edge computing device are virtualized and abstracted, specifically including: Each computing core of the Neural Processing Unit (NPU) is encapsulated as an NPU computing power unit; The computing power of each CPU core is normalized into several CPU slices, and fine-grained allocation is achieved through the Linux kernel; Each GPU stream processor is packaged into a GPU computing power unit; The system memory is allocated in megabytes as the smallest unit, and a portion of the memory is reserved for the operating system and scheduler to form an allocatable memory pool. The global resource status table records the total amount, allocated amount, and available amount of each type of resource.

[0008] Furthermore, in step S2, the registration request includes the task name, task type, business priority, resource requirement specifications, latency target, and task model file path; The resource requirements specification includes the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of megabytes of system memory. The service priority is an integer, with smaller values ​​indicating higher priority.

[0009] Further, in step S2, access control is performed, specifically including: Query the global resource status table to determine whether the currently available resources meet the minimum resource requirement specifications in the registration request. If not, refuse registration. The system calculates the total resource requirements of currently registered tasks with a priority no lower than that of the new task. It then checks whether the sum of these requirements exceeds a preset threshold for the total amount of each resource. If it does, and the new task's priority is higher than that of the current lowest business priority task, the task is allowed to join and marked as eligible for removal. Otherwise, registration is rejected.

[0010] Further, in step S2, after admission is granted, a computing power container is created for the task and an initial resource quota is allocated, specifically including: Computing containers are created for tasks based on cgroups, and these containers are used to isolate and manage the computing resources of tasks. Obtain the resource requirement specifications from the task registration request. The resource requirement specifications include the minimum and expected values ​​of the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of system memory megabytes. Prioritize meeting the minimum resource requirements of the task. If there are still surplus resources after meeting the minimum requirements, allocate the surplus resources proportionally according to the business priority weight of each task until the expected requirement value of the task is reached or the surplus resources are allocated. The formula for calculating the priority weight is:

[0011] in, Priority weights This represents the business priority value; the CPU resource quota is mapped to the cgroup's cpu.max parameter, and the calculation formula is:

[0012] in, CPU time quota for each cycle The number of CPU slices allocated.

[0013] Furthermore, in step S3, the inference latency is the end-to-end time interval of a single frame of inference in the task; The utilization rates of the various resources include the utilization rate of the Neural Processing Unit (NPU), the utilization rate of the Central Processing Unit (CPU), the utilization rate of the Graphics Processing Unit (GPU), and the system memory utilization rate. The utilization rate of the neural network processing unit (NPU) is obtained by reading the percentage of active time of each computing core of the NPU and taking the average value. The CPU utilization rate is obtained by reading the increment of the usage_usec field in the cpu.stat file of cgroup and dividing it by the collection period. The number of active cycles for each stream multiprocessor is obtained by reading the firmware interface of the graphics processing unit (GPU). The utilization rate of each stream multiprocessor is obtained by dividing the number of active cycles by the total number of cycles. The average value of all stream multiprocessors is taken as the GPU utilization rate. The system memory usage can be obtained by reading the cgroup's memory.current and dividing it by memory.max.

[0014] Furthermore, in step S4, the initial resource quotas of each computing container are dynamically adjusted based on the performance snapshot and the business priority of the task, specifically including: Sort all tasks by business priority from high to low, and check whether the current latency value of each task is greater than the preset threshold percentage of its latency target. If so, it is determined that the performance is insufficient and resources need to be increased. Identify the resource with the highest utilization rate for this task, and calculate the required increase in resources, expressed as follows:

[0015] in, To increase the amount of resources, For the current resource quota, Based on the current resource utilization rate, Target utilization rate; The additional resources required are reclaimed from the quotas of low-priority tasks.

[0016] Secondly, embodiments of this application also provide a system for dynamic computing power scheduling of edge computing devices based on service priorities as described in the above aspects, the system comprising: The computing power scheduler is used to receive task registration requests, perform admission control, create computing power containers for tasks and allocate initial resource quotas after admission is granted; dynamically adjust the initial resource quotas of each computing power container according to performance snapshots and task business priorities, reclaim resources from low business priority tasks and allocate them to high business priority tasks with latency exceeding the threshold; when the needs of high business priority tasks cannot be met after resource reclamation, the low business priority tasks are evicted or downgraded. The resource virtualization management module is used to virtualize and abstract the neural network processing unit (NPU) core, central processing unit (CPU) core, graphics processing unit (GPU) stream processor, and system memory in edge computing devices, encapsulate them into dynamically allocable resource units, and maintain a global resource status table. The task management and access control module is used to receive task registration requests, parse the task name, task type, business priority, resource requirement specifications, latency target and task model file path, and perform access control judgment based on the global resource status table. The performance monitoring module is used to periodically collect the inference latency and resource utilization of each task, form a performance snapshot, and provide the performance snapshot to the computing scheduler.

[0017] Thirdly, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the dynamic computing power scheduling method for edge computing devices based on service priorities as described in the preceding aspects.

[0018] Fourthly, a storage medium storing a computer program that, when executed by a processor, implements the steps of the dynamic computing power scheduling method for edge computing devices based on service priorities as described in the preceding aspects.

[0019] As can be seen from the above technical solutions, the present invention has the following advantages: The dynamic computing power scheduling method for edge computing devices based on business priorities provided in this application virtualizes and abstracts the neural network processing unit (NPU), central processing unit (CPU), graphics processing unit (GPU), and system memory in the edge computing device, encapsulating them into dynamically allocable resource units and maintaining a global resource state table. At the same time, by executing admission control, computing power containers are created for approved tasks and initial resource quotas are allocated. Through virtualization and abstraction, fine-grained management of resources and global state awareness are achieved, and the admission control mechanism avoids over-commitment of resources from the source.

[0020] This application forms a performance snapshot by periodically collecting the inference latency and resource utilization of each task, and dynamically adjusts the initial resource quota of each computing container based on the performance snapshot and the business priority of the task. Resources are reclaimed from low-priority tasks and allocated to high-priority tasks with latency exceeding the threshold. Through real-time performance monitoring and priority-driven dynamic quota adjustment, resources are automatically transferred from low-priority tasks with low utilization to high-priority tasks with insufficient performance, effectively maintaining the latency target of critical business under high load.

[0021] When the needs of high-priority tasks cannot be met after resource reclamation, this application performs eviction or downgrade operations on low-priority tasks. By downgrading or forcibly evictioning low-priority tasks step by step, it ensures that the highest-priority tasks can still obtain sufficient computing power support when resources are extremely scarce, thus achieving overall system robustness and business continuity. Attached Figure Description

[0022] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of the dynamic computing power scheduling method for edge computing devices based on service priority as described in this invention. Detailed Implementation

[0024] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0025] This application provides a method, system, device, and medium for dynamic computing power scheduling of edge computing devices based on business priorities, addressing the urgent technical problem of implementing dynamic resource scheduling based on business priorities.

[0026] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0027] Figure 1 A flowchart illustrating a dynamic computing power scheduling method for edge computing devices based on service priority, provided as an embodiment of this application. Figure 1 As shown in the figure, this application provides a method for dynamic computing power scheduling of edge computing devices based on service priority. The method includes the following steps: Step S1: Virtualize and abstract the various resources in the edge computing device, encapsulate them into dynamically allocable resource units, and maintain a global resource status table; the resources include a neural network processing unit (NPU), a central processing unit (CPU), a graphics processing unit (GPU), and system memory; The global resource status table is the scheduler's resource ledger, recording the current allocation and usage of all physical resources, which the scheduler can query and update during admission control, dynamic adjustment, and eviction decisions.

[0028] Specific functions: Admission control criteria: When a new task requests registration, the scheduler queries the global resource status table to determine whether the currently available resources meet the task's minimum requirements and decides whether to allow the task to access the system.

[0029] Dynamic adjustment basis: When performing resource quota adjustment, the scheduler uses the global resource status table to understand which resources are occupied and which resources are idle and available, thereby deciding where to reclaim resources and which tasks to allocate them to.

[0030] Global view maintenance: The scheduler has a complete picture of the resource usage of the entire device through the global resource status table, avoiding resource allocation conflicts and over-allocation.

[0031] Refresh mechanism: The global resource status table is refreshed every 100 milliseconds to ensure that the resource data used by the scheduler is always up-to-date.

[0032] The global resource status table contains resource types and record fields. Resource types include: NPU computing cores, CPU shards, GPU stream processors, and system memory. Record fields include: total amount, allocated amount, and available amount. The total amount is the total physical capacity of resources, which is determined during device initialization and remains unchanged during operation. The allocated amount is the sum of resources currently allocated to each task's computing power container. The available amount is the total amount minus the allocated amount, which is the idle resources currently available for allocation to new tasks.

[0033] The usage flow of the global resource status table: The total amount is recorded during initialization, and the initial available amount is equal to the total amount. Check if the available resources meet the minimum requirements for the new task; check the allocated resources to determine if there is overload. Update the allocated and available quantities after resource allocation; Increase available resources when recycling them, and decrease available resources when allocating them. After the expulsion mission, all resources are recovered, and the allocated and available quantities are updated.

[0034] Step S2: Receive the registration request of the task, perform admission control, and after admission is passed, create a computing power container for the task and allocate an initial resource quota; the initial resource quota is a combination of the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of megabytes of system memory allocated to the task when the task just passed the admission control and the computing power container was created. Step S3: Periodically collect the inference latency and resource utilization of each task to form a performance snapshot; Step S4: Based on the performance snapshot and the business priority of the task, dynamically adjust the initial resource quota of each computing power container, reclaim resources from low business priority tasks, and allocate them to high business priority tasks with latency exceeding the threshold. Step S5: If the high-priority task requirements still cannot be met after resource reclamation, perform eviction or downgrade operations on the low-priority tasks.

[0035] It should be noted that in step S1, the various resources in the edge computing device are virtualized and abstracted, specifically including: Each computing core of the Neural Processing Unit (NPU) is encapsulated as an NPU computing power unit; The computing power of each CPU core is normalized into several CPU slices, and fine-grained allocation is achieved through the Linux kernel; Each GPU stream processor is packaged into a GPU computing power unit; The system memory is allocated in megabytes as the smallest unit, and a portion of the memory is reserved for the operating system and scheduler to form an allocatable memory pool. The global resource status table records the total amount, allocated amount, and available amount of each type of resource, and is refreshed every 100 milliseconds.

[0036] In step S2, the registration request includes the task name, task type, business priority, resource requirement specifications, latency target, and task model file path; The resource requirements specification includes the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of megabytes of system memory. The service priority is an integer, with smaller values ​​indicating higher priority.

[0037] According to another embodiment of the present invention, in step S2, admission control is performed, specifically including: Query the global resource status table to determine whether the currently available resources meet the minimum resource requirement specifications in the registration request. If not, refuse registration. The total resource requirements of currently registered tasks with a priority no lower than that of the new task are calculated. The percentage of these requirements, when added to the new task's requirements, exceeds a preset threshold of 90%. If the percentage exceeds this threshold and the new task's priority is higher than the current lowest priority task, then the task with the lowest priority is allowed to be removed. Otherwise, registration is rejected.

[0038] The total resource requirements of currently registered tasks with a priority no lower than that of the new task are calculated. The result of adding the new task's requirements is then used to determine whether the total resource requirements exceed the threshold percentage recorded in the global resource status table. This threshold percentage is 90%. If the new task exceeds this threshold percentage and its priority is higher than that of the current lowest business priority task, then the task with the lowest business priority is allowed to join and marked as eligible for removal. Otherwise, registration is rejected.

[0039] According to an embodiment of this application, in step S2, after admission is granted, a computing power container is created for the task and an initial resource quota is allocated, specifically including: Computing containers are created for tasks based on cgroups, and these containers are used to isolate and manage the computing resources of tasks. Obtain the resource requirement specifications from the task registration request. The resource requirement specifications include the minimum and expected values ​​of the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of system memory megabytes. Prioritize meeting the minimum resource requirements of the task. If there are still surplus resources after meeting the minimum requirements, allocate the surplus resources proportionally according to the business priority weight of each task until the expected requirement value of the task is reached or the surplus resources are allocated. The formula for calculating the priority weight is:

[0040] in, Priority weights This represents the business priority value; the CPU resource quota is mapped to the cgroup's cpu.max parameter, and the calculation formula is:

[0041] in, CPU time quota for each cycle The number of CPU shards allocated, with a period of one hundred milliseconds.

[0042] The initial resource quota is a combination of the number of Neural Processing Unit (NPU) computing cores, CPU shards, GPU stream processors, and system memory megabytes allocated to a task when it has just passed admission control and created a computing container.

[0043] Allocation rules: Prioritize meeting the minimum resource requirement specified in the task registration request; If there are still surplus resources after meeting the minimum requirements of all tasks, the surplus resources will be allocated proportionally according to the business priority weight of each task until the expected value of the task is reached or the surplus resources are allocated.

[0044] For example, a primary task might submit the following resource requirements during registration: 1-2 NPU cores, 500-1000 CPU shards, 1-2 GPU stream processors, and 1024-2048MB of memory. The scheduler will first guarantee to allocate 1 NPU core, 500 CPU shards, 1 GPU stream processor, and 1024MB of memory to this task (minimum). If there are available resources on the device, additional resources will be allocated according to priority weights (primary task weight is 1 / 1=1.0), up to a maximum of 2 NPU cores, 1000 CPU shards, 2 GPU stream processors, and 2048MB of memory.

[0045] The initial resource quota is the starting point for dynamic adjustment in step S4. In step S4, adjustments are made based on the performance snapshot and business priorities, increasing or decreasing the initial resource quota.

[0046] In one embodiment, in step S3, the inference latency is the end-to-end time interval of single-frame inference of the task, and the 95th percentile of all latency samples in the most recent ten collection cycles is taken as the current latency value. The utilization rates of the various resources include the utilization rate of the Neural Processing Unit (NPU), the utilization rate of the Central Processing Unit (CPU), the utilization rate of the Graphics Processing Unit (GPU), and the system memory utilization rate. The utilization rate of the neural network processing unit (NPU) is obtained by reading the percentage of active time of each computing core of the NPU and taking the average value. The CPU utilization rate is obtained by reading the increment of the usage_usec field in the cpu.stat file of cgroup and dividing it by the collection period. The number of active cycles for each stream multiprocessor is obtained by reading the firmware interface of the graphics processing unit (GPU). The utilization rate of each stream multiprocessor is obtained by dividing the number of active cycles by the total number of cycles. The average value of all stream multiprocessors is taken as the GPU utilization rate. The system memory usage can be obtained by reading the cgroup's memory.current and dividing it by memory.max.

[0047] As an example, in step S4, the initial resource quotas of each computing container are dynamically adjusted based on the performance snapshot and the business priority of the task, specifically including: Sort all tasks by business priority from high to low, and check whether the current latency value of each task is greater than the preset threshold percentage of its latency target. The preset threshold percentage is 90%. If so, it is determined that the performance is insufficient and resources need to be increased. Identify the resource with the highest utilization rate for this task, and calculate the required increase in resources, expressed as follows:

[0048] in, To increase the amount of resources, For the current resource quota, Based on the current resource utilization rate, To achieve the target utilization rate, we take 75%. The additional resources required are reclaimed from the quota of low-priority tasks. The reclamation rule is: start with the lowest priority task and reclaim resources with a utilization rate of less than 50%.

[0049] In step S4, the order of resource reclamation is from level 5 tasks upwards to level 4 tasks and level 3 tasks, but resources of higher or equal priority tasks than the high-priority tasks requesting resources are not reclaimed; memory quotas follow the principle of only increasing and not decreasing, that is, the allocated memory quotas are not actively reclaimed during task execution, and the released memory is only allocated to tasks that need to increase memory after other tasks release memory.

[0050] In step S5, the eviction operation is used when the latency of a first-level or second-level high-priority task exceeds the latency target for ten consecutive collection cycles and resource reclamation still cannot meet the requirements. The eviction targets are the fifth-level and fourth-level tasks, with priority given to eviction of the task with the lowest priority and the largest memory usage. When eviction occurs, a SIGTERM signal is sent to the task, and the task completes the current frame inference and exits within five seconds. The scheduler then reclaims all of its resources.

[0051] In step S5, the degradation operation is used for level 3 tasks. The triggering condition is that the latency of level 3 tasks exceeds the latency target for five consecutive acquisition cycles and there are level 1 or level 2 tasks in a state of insufficient performance. The degradation operation includes switching level 3 tasks to low-precision inference mode or reducing the model input resolution. When the latency of level 1 and level 2 tasks meets the latency target for ten consecutive acquisition cycles, the downgraded level 3 tasks are automatically restored to their original precision and resolution, and the original resource quota is returned.

[0052] Resources are fixed, while tasks are dynamic. Static allocation cannot simultaneously satisfy the two requirements of ensuring that high-priority tasks do not fail and that low-priority tasks do not waste resources.

[0053] This application abstracts hardware resources such as NPU, CPU, GPU, and memory into resource units that can be flexibly allocated. The NPU contains 8 cores, each with a computing power of 2 TOPS; the CPU contains 8 cores, each of which is divided into 1000 slices; the GPU contains 8 stream multiprocessors; the memory contains 16GB, with 2GB reserved for the system and the remaining 14GB available for allocation; the scheduler maintains a global resource status table, which is refreshed every 100 milliseconds.

[0054] When a task is to be started, it must first register with the scheduler, submitting the task name, type, priority, resource requirements, and latency target.

[0055] The scheduler performs two checks: Is there enough resource, i.e., can the currently available resources meet the minimum requirements of the task? Will there be overload, i.e., will the total resource usage exceed 90% after adding a new task? If so, is the priority of the new task higher than the current lowest priority task? After admission is approved, the scheduler creates computing containers for tasks based on cgroups and allocates initial resources: first, the minimum requirements are met; surplus resources are allocated according to priority weights, where first-level tasks have a weight of 1.0, second-level tasks 0.5, and third-level tasks 0.33.

[0056] Inference latency and resource utilization for each task are collected every 100 milliseconds. Inference latency is the time from input to output, and the 95th percentile of the most recent 10 cycles is taken. Resource utilization includes the usage of NPU, CPU, GPU, and memory. A performance snapshot is generated, and the history of the most recent 30 snapshots is saved.

[0057] An adjustment decision is made every 500 milliseconds. The first step is to check high-priority tasks. If the latency of a first-level task exceeds 45 milliseconds, it is considered to be underperforming, and the amount of additional resources needed is calculated. The second step is to reclaim resources from low-priority tasks. Starting with the lowest priority task, resources with a utilization rate of less than 50% are reclaimed. Resources with a higher or equal priority than the high-priority tasks that request resources are never reclaimed. The third step is to allocate the reclaimed resources to tasks that require them according to their priority weights. Memory follows the principle of only increasing and never decreasing to avoid latency jitter caused by memory reclamation.

[0058] If resource reclamation still cannot meet the needs of Level 1 or Level 2 tasks, and the latency of the task has exceeded the limit for 1 second consecutive time, then kill Level 5 or Level 4 tasks, prioritizing the lowest priority and the one with the largest memory usage; for Level 3 tasks, switch to low-precision inference mode or reduce the resolution; when the system returns to normal, automatically restore the downgraded Level 3 tasks.

[0059] This enables multiple tasks on edge computing devices to dynamically allocate computing resources based on business importance, ensuring that the most important tasks receive sufficient computing power first. It shifts from coarse-grained static partitioning to fine-grained dynamic allocation, with adjustments as small as one-thousandth of a CPU core or a single NPU core. High-priority tasks have priority access and resource preemption rights when resources are scarce. Tasks with low utilization are automatically routed to high-priority tasks with insufficient performance. In extreme cases, low-priority tasks are sacrificed to ensure critical tasks are protected.

[0060] This invention also provides a dynamic computing power scheduling system for edge computing devices based on service priorities, the system comprising: The computing power scheduler is used to receive task registration requests, perform admission control, create computing power containers for tasks and allocate initial resource quotas after admission is granted; dynamically adjust the initial resource quotas of each computing power container according to performance snapshots and task business priorities, reclaim resources from low business priority tasks and allocate them to high business priority tasks with latency exceeding the threshold; when the needs of high business priority tasks cannot be met after resource reclamation, the low business priority tasks are evicted or downgraded. The resource virtualization management module is used to virtualize and abstract the neural network processing unit (NPU) core, central processing unit (CPU) core, graphics processing unit (GPU) stream processor, and system memory in edge computing devices, encapsulate them into dynamically allocable resource units, and maintain a global resource status table. The task management and access control module is used to receive task registration requests, parse the task name, task type, business priority, resource requirement specifications, latency target and task model file path, and perform access control judgment based on the global resource status table. The performance monitoring module is used to periodically collect the inference latency and resource utilization of each task, form a performance snapshot, and provide the performance snapshot to the computing scheduler.

[0061] The dynamic computing power scheduling method for edge computing devices based on service priorities provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device; the electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0062] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.

[0063] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.

[0064] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0065] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.

[0066] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.

[0067] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0068] Electronic devices can achieve display functions through GPUs, displays, and application processors.

[0069] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0070] A display screen is used to display images, videos, etc. A display screen includes a display panel.

[0071] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0072] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0073] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, apparatuses, or units, or they may be electrical, mechanical, or other forms of connection.

[0074] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0075] The aforementioned electronic device implements the dynamic computing power scheduling method for edge computing devices based on business priority, as described in this application. This method virtualizes and abstracts various resources within the edge computing device, encapsulating them into dynamically allocable resource units and maintaining a global resource status table. These resources include a Neural Processing Unit (NPU), a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and system memory. The device receives task registration requests, performs admission control, and upon successful admission, creates computing power containers for the task and allocates initial resource quotas. It periodically collects the inference latency and resource utilization of each task, forming performance snapshots. Based on the performance snapshots and the business priority of the tasks, it dynamically adjusts the initial resource quotas of each computing power container, reclaiming resources from low-priority tasks and allocating them to high-priority tasks with latency exceeding a threshold. When resource reclamation still cannot meet the needs of high-priority tasks, it performs eviction or downgrade operations on low-priority tasks, dynamically scheduling to ensure latency for high-priority tasks.

[0076] The storage medium provided in this application stores a program product capable of implementing a dynamic computing power scheduling method for edge computing devices based on business priorities.

[0077] The dynamic computing power scheduling method for edge computing devices based on service priority includes: Step S1: Virtualize and abstract the various resources in the edge computing device, encapsulate them into dynamically allocable resource units, and maintain a global resource status table; the resources include a neural network processing unit (NPU), a central processing unit (CPU), a graphics processing unit (GPU), and system memory; Step S2: Receive the task registration request, perform admission control, and after admission is approved, create a computing power container for the task and allocate initial resource quotas; Step S3: Periodically collect the inference latency and resource utilization of each task to form a performance snapshot; Step S4: Based on the performance snapshot and the business priority of the task, dynamically adjust the initial resource quota of each computing power container, reclaim resources from low business priority tasks, and allocate them to high business priority tasks with latency exceeding the threshold. Step S5: If the high-priority task requirements still cannot be met after resource reclamation, perform eviction or downgrade operations on the low-priority tasks.

[0078] By virtualizing and abstracting the Neural Processing Unit (NPU), Central Processing Unit (CPU), Graphics Processing Unit (GPU), and system memory in edge computing devices, encapsulating them into dynamically allocable resource units, and maintaining a global resource state table, while performing admission control to create computing power containers and allocate initial resource quotas for approved tasks, fine-grained resource management and global state awareness are achieved through virtualization and abstraction. The admission control mechanism avoids over-commitment of resources from the source.

[0079] This application forms a performance snapshot by periodically collecting the inference latency and resource utilization of each task, and dynamically adjusts the initial resource quota of each computing container based on the performance snapshot and the business priority of the task. Resources are reclaimed from low-priority tasks and allocated to high-priority tasks with latency exceeding the threshold. Through real-time performance monitoring and priority-driven dynamic quota adjustment, resources are automatically transferred from low-priority tasks with low utilization to high-priority tasks with insufficient performance, effectively maintaining the latency target of critical business under high load.

[0080] When the needs of high-priority tasks cannot be met after resource reclamation, this application performs eviction or downgrade operations on low-priority tasks. By downgrading or forcibly evictioning low-priority tasks step by step, it ensures that the highest-priority tasks can still obtain sufficient computing power support when resources are extremely scarce, thus achieving overall system robustness and business continuity.

[0081] In some possible implementations, the dynamic computing power scheduling method for edge computing devices based on service priorities disclosed herein can be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0082] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0083] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0084] Any changes, modifications, substitutions, and variations made to the embodiments without departing from the principles and spirit of the present invention still fall within the protection scope of the present invention.

Claims

1. A method for dynamic computing power scheduling of edge computing devices based on service priority, characterized in that, The method includes the following steps: Step S1: Virtualize and abstract the various resources in the edge computing device, encapsulate them into dynamically allocable resource units, and maintain a global resource status table; the resources include a neural network processing unit (NPU), a central processing unit (CPU), a graphics processing unit (GPU), and system memory; Step S2: Receive the task registration request, perform admission control, and after admission is approved, create a computing power container for the task and allocate initial resource quotas; Step S3: Periodically collect the inference latency and resource utilization of each task to form a performance snapshot; Step S4: Based on the performance snapshot and the business priority of the task, dynamically adjust the initial resource quota of each computing power container, reclaim resources from low business priority tasks, and allocate them to high business priority tasks with latency exceeding the threshold. Step S5: If the high-priority task requirements still cannot be met after resource reclamation, perform eviction or downgrade operations on the low-priority tasks.

2. The method according to claim 1, characterized in that, In step S1, the various resources in the edge computing device are virtualized and abstracted, specifically including: Each computing core of the Neural Processing Unit (NPU) is encapsulated as an NPU computing power unit; The computing power of each CPU core is normalized into several CPU slices, and fine-grained allocation is achieved through the Linux kernel. Each GPU stream processor is packaged into a GPU computing power unit; The system memory is allocated in megabytes as the smallest unit, and a portion of the memory is reserved for the operating system and scheduler to form an allocatable memory pool. The global resource status table records the total amount, allocated amount, and available amount of each type of resource.

3. The method according to claim 1, characterized in that, In step S2, the registration request includes the task name, task type, business priority, resource requirement specifications, latency target, and task model file path; The resource requirements specification includes the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of megabytes of system memory. The service priority is an integer, with smaller values ​​indicating higher priority.

4. The method according to claim 3, characterized in that, In step S2, access control is performed, specifically including: Query the global resource status table to determine whether the currently available resources meet the minimum resource requirement specifications in the registration request. If not, refuse registration. The system calculates the total resource requirements of currently registered tasks with a priority no lower than that of the new task. It then checks whether the sum of these requirements exceeds a preset threshold for the total amount of each resource. If it does, and the new task's priority is higher than that of the current lowest business priority task, the task is allowed to join and marked as eligible for removal. Otherwise, registration is rejected.

5. The method according to claim 3, characterized in that, In step S2, after admission is granted, a computing power container is created for the task and an initial resource quota is allocated, specifically including: Computing containers are created for tasks based on cgroups, and these containers are used to isolate and manage the computing resources of tasks. Obtain the resource requirement specifications from the task registration request. The resource requirement specifications include the minimum and expected values ​​of the number of neural network processing unit (NPU) computing cores, the number of central processing unit (CPU) slices, the number of graphics processing unit (GPU) stream processors, and the number of system memory megabytes. Prioritize meeting the minimum resource requirements of the task. If there are still surplus resources after meeting the minimum requirements, allocate the surplus resources proportionally according to the business priority weight of each task until the expected requirement value of the task is reached or the surplus resources are allocated. The formula for calculating the priority weight is: in, Priority weights This represents the business priority value; the CPU resource quota is mapped to the cgroup's cpu.max parameter, and the calculation formula is: in, CPU time quota for each cycle The number of CPU slices allocated.

6. The method according to claim 1, characterized in that, In step S3, the inference latency is the end-to-end time interval of a single frame of inference in the task; The utilization rates of the various resources include the utilization rate of the Neural Processing Unit (NPU), the utilization rate of the Central Processing Unit (CPU), the utilization rate of the Graphics Processing Unit (GPU), and the system memory utilization rate. The utilization rate of the neural network processing unit (NPU) is obtained by reading the percentage of active time of each computing core of the NPU and taking the average value. The CPU utilization rate is obtained by reading the increment of the usage_usec field in the cpu.stat file of cgroup and dividing it by the collection period. The number of active cycles for each stream multiprocessor is obtained by reading the firmware interface of the graphics processing unit (GPU). The utilization rate of each stream multiprocessor is obtained by dividing the number of active cycles by the total number of cycles. The average value of all stream multiprocessors is taken as the GPU utilization rate. The system memory usage can be obtained by reading the cgroup's memory.current and dividing it by memory.max.

7. The method according to claim 1, characterized in that, In step S4, the initial resource quotas of each computing container are dynamically adjusted based on the performance snapshot and the business priority of the task, specifically including: Sort all tasks by business priority from high to low, and check whether the current latency value of each task is greater than the preset threshold percentage of its latency target. If so, it is determined that the performance is insufficient and resources need to be increased. Identify the resource with the highest utilization rate for this task, and calculate the required increase in resources, expressed as follows: in, To increase the amount of resources, For the current resource quota, Based on the current resource utilization rate, Target utilization rate; The additional resources required are reclaimed from the quotas of low-priority tasks.

8. A system applied to the dynamic computing power scheduling method for edge computing devices based on service priority as described in any one of claims 1-7, characterized in that, The system includes: The computing power scheduler is used to receive task registration requests, perform admission control, create computing power containers for tasks and allocate initial resource quotas after admission is granted; dynamically adjust the initial resource quotas of each computing power container according to performance snapshots and task business priorities, reclaim resources from low business priority tasks and allocate them to high business priority tasks with latency exceeding the threshold; when the needs of high business priority tasks cannot be met after resource reclamation, the low business priority tasks are evicted or downgraded. The resource virtualization management module is used to virtualize and abstract the neural network processing unit (NPU) core, central processing unit (CPU) core, graphics processing unit (GPU) stream processor, and system memory in edge computing devices, encapsulate them into dynamically allocable resource units, and maintain a global resource status table. The task management and access control module is used to receive task registration requests, parse the task name, task type, business priority, resource requirement specifications, latency target and task model file path, and perform access control judgment based on the global resource status table. The performance monitoring module is used to periodically collect the inference latency and resource utilization of each task, form a performance snapshot, and provide the performance snapshot to the computing scheduler.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the dynamic computing power scheduling method for edge computing devices based on service priority as described in any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the dynamic computing power scheduling method for edge computing devices based on service priority as described in any one of claims 1-7.