Resource allocation and multitask coordination management method and device, and electronic equipment
By dynamically sensing the operating status and task relationships of electronic devices, an adaptive resource allocation strategy is generated, which solves the performance degradation problem of traditional resource allocation strategies under dynamic task loads and achieves efficient resource collaborative management and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RDA MICROELECTRONICS SHANGHAICO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-06-16
Smart Images

Figure CN122220108A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a resource allocation and multi-task collaborative management method, apparatus and electronic equipment. Background Technology
[0002] With the popularization of artificial intelligence technology, the demand for deploying large models (such as large neural network models) in electronic devices such as smartphones, wearable devices, IoT terminals and edge computing devices has increased significantly.
[0003] However, due to the limited computing power, memory capacity, and network bandwidth of electronic devices, and the need for electronic devices to handle multiple concurrent tasks simultaneously, traditional static or semi-static resource allocation strategies are difficult to meet the real-time demand for high computing power for model inference under dynamically changing task loads, and are also difficult to balance resource competition among multiple tasks, resulting in a decline in the performance of electronic devices. Summary of the Invention
[0004] This application provides a resource allocation and multi-task collaborative management method, apparatus, and electronic device, which can realize efficient collaboration between model inference and other concurrent tasks, thereby helping to improve the overall performance of electronic devices.
[0005] In a first aspect, embodiments of this application provide a resource allocation and multi-task collaborative management method, the method comprising:
[0006] Acquire operational status data of electronic devices;
[0007] Determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks;
[0008] Based on the running status data, the types and priorities of each currently running task, and the dependencies between each currently running task, a resource allocation strategy is generated using a pre-defined resource allocation model.
[0009] Based on the resource allocation strategy, adjust the computing resource allocation parameters of the electronic device, as well as the scheduling order and / or concurrent execution mode of the currently running tasks.
[0010] In some possible implementations, the operational status data includes at least one of the following:
[0011] The computing unit includes data on computing unit utilization, memory usage, network bandwidth utilization, battery status, temperature sensor data, task running status, and computing resource demand prediction. The computing unit includes at least one of a central processing unit, a graphics processing unit, and an embedded neural network processor.
[0012] In some possible implementations, the resource allocation strategy includes at least one of the following:
[0013] Operating frequency adjustment strategy for computing units;
[0014] Memory resource allocation or release strategies;
[0015] Network bandwidth allocation strategy;
[0016] The scheduling order of the currently running tasks;
[0017] The concurrent execution mode of the currently running tasks.
[0018] In some possible implementations, the type and priority of each currently running task are determined, including:
[0019] Use machine learning models or rule engines to determine the type of each currently running task;
[0020] The priority of each currently running task is determined based on its importance and real-time parameters.
[0021] In some possible implementations, the resource allocation model includes any of the following:
[0022] Reinforcement learning models, deep Q-network models, fuzzy logic models, genetic algorithm models, and Bayesian optimization models.
[0023] In some possible implementations, the above method further includes:
[0024] Monitor the performance parameters and user feedback information of electronic devices;
[0025] Adjust the parameters and resource allocation strategies of the resource allocation model based on the performance parameters of electronic devices and user feedback.
[0026] Secondly, embodiments of this application provide a resource allocation and multi-task collaborative management device, the device comprising:
[0027] The acquisition module is used to acquire the operating status data of the electronic device;
[0028] The determination module is used to determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks;
[0029] The processing module is used to generate a resource allocation strategy based on the running status data, the type and priority of each currently running task, and the dependencies between the currently running tasks, using a pre-set resource allocation model.
[0030] The adjustment module is used to adjust the computing resource allocation parameters of electronic devices, as well as the scheduling order and / or concurrent execution mode of currently running tasks, according to the resource allocation strategy.
[0031] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0032] The memory stores the instructions that the computer executes;
[0033] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0036] Sixthly, embodiments of this application provide a chip including at least one processor for executing program instructions to perform the above-described resource allocation and multi-task collaborative management method.
[0037] The resource allocation and multi-task collaborative management method, apparatus, and electronic device provided in this application can achieve efficient collaborative management of model inference tasks and multiple concurrent tasks by dynamically sensing the operating status of the electronic device, the type and priority of each currently running task, and the dependency relationship between each currently running task, and generating an adaptive resource allocation strategy in combination with the resource allocation model. This can improve the resource utilization of the electronic device and the user experience. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0039] Figure 1 This is a flowchart illustrating a resource allocation and multi-task collaborative management method provided in an embodiment of this application.
[0040] Figure 2 This is a schematic diagram of a sub-process of a resource allocation and multi-task collaborative management method provided in the embodiments of this application;
[0041] Figure 3This is a schematic diagram of the structure of a resource allocation and multi-task collaborative management device provided in the embodiments of this application;
[0042] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0043] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0045] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0046] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and purpose. For example, the first sub-buffer and the second sub-buffer are merely used to distinguish different sub-buffers and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0047] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0048] The electronic devices in this application embodiment may include handheld devices, vehicle-mounted devices, etc., with wireless communication capabilities. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in self-driving, wireless terminal devices in remote medical surgery, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, wireless terminal devices in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited in this embodiment.
[0049] By way of example and not limitation, in this embodiment, the electronic device may also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that are intelligently designed and developed using wearable technology, such as glasses, gloves, watches, clothing, and shoes.
[0050] In this embodiment of the application, the device used to implement the function of the electronic device can be a terminal device; or it can be a device that can support the electronic device to implement the function, such as a chip system, which can be installed in the electronic device.
[0051] With the popularization of artificial intelligence technology, the demand for deployment of large language models (LLM) and complex neural network models in electronic devices such as smartphones, wearable devices, IoT terminals and edge computing devices has increased significantly.
[0052] For example, when users use voice assistants on their mobile phones for real-time dialogue translation, or when performing environmental perception and decision-making in autonomous driving systems, they all need to rely on large model inference tasks.
[0053] However, due to the limited resources of electronic devices, such as computing power, memory capacity, battery life, and network bandwidth, and the need for electronic devices to handle multiple concurrent tasks (such as background data synchronization, sensor data acquisition, and video streaming), it is difficult to balance the resource competition among multiple tasks under dynamically changing task loads, resulting in decreased electronic device performance, increased task latency, or excessive energy consumption.
[0054] In related technologies, the following three types of solutions are typically adopted to address the resource allocation problem of electronic devices:
[0055] Static resource allocation schemes: These schemes allocate fixed resource ratios to different tasks based on preset rules (e.g., allocating 70% of the Central Processing Unit (CPU) resources for large model inference and the remaining 30% for other tasks), or prioritizing tasks based on task type (e.g., large model inference tasks always have priority). These schemes rely on experience and cannot adapt to dynamic changes in task load, easily leading to resource waste or insufficient resources for critical tasks. For example, in low-load scenarios, fixed allocation may result in idle computing units; while in high-load scenarios, static priorities may cause real-time tasks (such as screen refresh) to be delayed due to resource contention.
[0056] Rule-based semi-static resource allocation schemes: These schemes trigger resource adjustment rules based on preset conditions (such as reducing computing resources for large model inference when memory utilization exceeds 90%), or dynamically adjust resource allocation based on task queue priorities. While more flexible than static allocation, these schemes rely on manually defined rules, making it difficult to cover complex scenarios (such as sudden changes in task load or resource dependencies between multiple tasks), and they also have a slower response time, making long-term optimization impossible.
[0057] Dynamic allocation schemes based on simple machine learning models: These schemes use simple models such as linear regression and decision trees to predict task resource requirements and adjust allocation strategies accordingly. For example, historical task data can be used to train a model to predict the resource consumption of the current task, and then a rule engine can be used to dynamically adjust resource allocation. The prediction accuracy of this type of scheme is limited by model complexity, and it is difficult to handle the coupling relationship between multiple tasks (such as resource competition between large model inference and sensor data processing), resulting in poor policy adaptability and difficulty in continuous optimization in dynamic environments.
[0058] In summary, there is an urgent need for a solution that can dynamically sense device status, intelligently allocate resources, and coordinate multi-task collaboration to improve the resource utilization efficiency and user experience of electronic devices in complex scenarios.
[0059] To address the aforementioned technical issues, this application provides a resource allocation and multi-task collaborative management method. By dynamically sensing the operating status of the electronic device, the type and priority of each currently running task, and the dependencies between the currently running tasks, and combining this with a resource allocation model to generate an adaptive resource allocation strategy, efficient collaborative management of model inference tasks and multiple concurrent tasks can be achieved, thereby improving the resource utilization of the electronic device and the user experience.
[0060] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0061] The technical solution provided in this application can be applied to resource management scenarios when electronic devices are running LLM or other complex AI models. For example, when a user runs large model inference tasks (such as real-time translation and image generation) and concurrent tasks (such as video playback, communication requests, and sensor data processing) on a mobile phone at the same time, the mobile phone can use the technical solution provided in this application to dynamically adjust the computing resources of the model inference task and the concurrent task, so as to achieve efficient collaboration between model inference and other concurrent tasks.
[0062] Optionally, the aforementioned computing resources may include, but are not limited to, heterogeneous computing resources such as CPUs, graphics processing units (GPUs), and embedded neural network processing units (NPUs), as well as memory and bandwidth.
[0063] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a resource allocation and multi-task collaborative management method provided in an embodiment of this application.
[0064] In some embodiments, the above-described resource allocation and multi-task collaborative management method includes:
[0065] S101. Obtain the operating status data of the electronic device.
[0066] Optionally, the above-mentioned operational status data includes at least one of the following: computing unit utilization, memory occupancy, network bandwidth utilization, battery status data, temperature sensor data, task operation status, and computing resource demand prediction data.
[0067] Optionally, the aforementioned computing unit may include at least one of a CPU, GPU, and NPU.
[0068] The utilization rate of computing units reflects the real-time load on computing resources and serves as the basis for adjusting the frequency of computing units. For example, when the CPU utilization rate is greater than 70%, it can trigger a frequency increase to improve performance, while when the CPU utilization rate is less than 30%, it can trigger a frequency decrease to reduce energy consumption.
[0069] Memory utilization can be used to guide memory allocation and reclamation strategies. For example, when memory utilization is >80%, garbage collection or memory compaction is triggered to release idle memory; memory-intensive tasks (such as large database queries) can pre-allocate large memory blocks to avoid performance degradation caused by frequent allocation.
[0070] Network bandwidth utilization can be used to optimize network resource allocation and traffic shaping. For example, a fixed bandwidth (e.g., 100Mbps) can be reserved for critical tasks (such as video conferencing), while the remaining bandwidth can be dynamically allocated for non-critical tasks (such as file downloads). Alternatively, a token bucket algorithm can be used to limit bursts of traffic from non-critical tasks to prevent them from preempting bandwidth for critical tasks.
[0071] In addition, combining network bandwidth utilization with task dependencies can ensure that the bandwidth requirements of dependent tasks (such as "data transmission → processing") are met first, thus avoiding task delays caused by network bottlenecks.
[0072] Optionally, battery status data may include remaining battery power, charging status, remaining battery life, and power consumption data.
[0073] Battery status data can be used to guide energy-saving mode adjustments and resource allocation strategy selection. For example, when the battery is low (e.g., <20%), an energy-saving mode is triggered, reducing the frequency of computing units, limiting the concurrency of background tasks, and extending the device's battery life; while charging, more resources can be released for high-performance tasks.
[0074] In addition, combining battery status data with task priority can ensure that high-priority tasks can still retain necessary resources when the battery is low, ensuring the completion of critical tasks.
[0075] Temperature sensor data can enable overheat protection and frequency-temperature coordinated control. For example, when the CPU temperature exceeds 85°C, it triggers frequency reduction (e.g., a 10% reduction) and activates the cooling system (e.g., fan acceleration); once the temperature returns to normal, the frequency is restored, ensuring long-term stable operation of the device.
[0076] In addition, by combining temperature sensor data with the utilization rate of the computing unit, the high temperature caused by high load can be alleviated through frequency reduction and heat dissipation linkage, thus avoiding overheating and shutdown.
[0077] Task status includes running, waiting, and completed, which can guide task scheduling and concurrent execution adjustments. For example, tasks with delayed execution progress (such as those with a delay of >20%) can be temporarily given a higher priority to ensure timely completion; subsequent tasks can be started or their frequency linked when dependent tasks are completed (such as "coding completed → compression task frequency increased").
[0078] In addition, combining task running status with task dependencies can ensure that critical path tasks are executed first, avoiding non-critical tasks occupying resources and causing critical path delays.
[0079] In some implementations, future resource requirements can be predicted using historical data (such as task execution time and resource consumption) or machine learning models, with prediction periods ranging from minutes to hours to days.
[0080] Among these features, the predicted computing resource demand data can be used to pre-allocate resources and dynamically scale them up or down, avoiding resource shortages or waste. For example, if it is predicted that computing resource demand will increase by 30% in the next 10 minutes, more CPU / memory resources can be allocated in advance; if it is predicted that demand will decrease, idle resources can be released for other tasks.
[0081] In addition, combining computational resource demand forecasts with real-time operational status data can improve the foresight and accuracy of resource allocation.
[0082] In some implementations, the operating status data of the electronic device can be obtained through sensors in the electronic device and / or the system log of the electronic device.
[0083] For example, operational status data can be collected through the electronic device's built-in Application Programming Interface (API), monitoring tools, or hardware sensors.
[0084] In this embodiment of the application, real-time data acquisition enables dynamic perception of the resource status and task requirements of electronic devices, providing basic data support for the generation of subsequent resource allocation strategies.
[0085] S102. Determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks.
[0086] In some implementations, machine learning models (such as classification models) or rule engines can be used to identify task types and dynamically assign priorities based on task importance and real-time requirements. For example, real-time communication tasks have higher priority than background data synchronization tasks.
[0087] For example, when a user is running a voice assistant (high priority) and background data uploading (low priority) at the same time, the system uses a rules engine to mark the voice assistant as high priority, ensuring that it has priority access to computing resources.
[0088] Optionally, dependencies between tasks may include:
[0089] Complete-Start: Task A completed → Task B started, such as "UI design → front-end development".
[0090] Start-Start: Task A starts → Task B starts, such as "Data Acquisition → Real-time Analysis".
[0091] Completed-Completed: Task A completed → Task B completed, such as "Module A test → Module B test".
[0092] Start-Complete: Task A begins → Task B completes, such as "Start service → Service initialization complete".
[0093] S103. Based on the running status data, the type and priority of each currently running task, and the dependencies between each currently running task, generate a resource allocation strategy using a pre-set resource allocation model.
[0094] The above-mentioned running status data, the types and priorities of each currently running task, and the dependencies between each currently running task can be used as input data for the resource allocation model, and the output of the resource allocation model is the resource allocation strategy.
[0095] In some implementations, the resource allocation model can employ linear programming, integer programming, or mixed-integer programming to maximize system efficiency (such as task completion rate and resource utilization) under resource constraints (such as CPU / memory limits). For example, the CPU frequency, memory block size, and network bandwidth quota allocated to each task can be determined by solving for the optimal solution.
[0096] In some implementations, resource allocation models can utilize Long Short-Term Memory (LSTM) networks to predict future resource requirements for tasks (such as computational resource demand forecast data) and dynamically adjust resource allocation strategies based on historical execution patterns. For example, if it is predicted that computational resource demand will increase by 30% in the next 10 minutes, more CPU / memory resources can be allocated in advance.
[0097] In some implementations, the above resource allocation strategy can achieve multi-dimensional resource collaborative optimization, for example:
[0098] Computing resource allocation: Dynamically adjust the CPU frequency by combining Dynamic Voltage and Frequency Scaling (DVFS) (e.g., allocate 3.5GHz to high-priority tasks and 1.8GHz to low-priority tasks), and realize closed-loop control of "load-frequency-temperature" by combining temperature sensor (e.g., trigger frequency reduction when the temperature is >85℃).
[0099] Memory resource allocation: Memory-intensive tasks pre-allocate large memory blocks (such as 4GB), and release idle memory in conjunction with garbage collection.
[0100] Network bandwidth allocation: Fixed bandwidth (e.g., 100Mbps) is reserved for critical tasks, while the remaining bandwidth is dynamically allocated for non-critical tasks. The token bucket algorithm is used to limit burst traffic and ensure that critical data packets are transmitted first.
[0101] Task scheduling and concurrency optimization: Prioritize the scheduling of critical path tasks (e.g., "UI design → front-end development"), and dynamically insert non-critical tasks based on resource availability; trigger the frequency of subsequent tasks when dependent tasks are completed (e.g., coding completion → compression task to increase frequency). Dynamically adjust concurrency based on system load (e.g., increase concurrent tasks when CPU utilization is <50%, decrease concurrent tasks when CPU utilization is >80%).
[0102] S104. Adjust the computing resource allocation parameters of the electronic device, as well as the scheduling order and / or concurrent execution mode of each currently running task, according to the resource allocation strategy.
[0103] In some implementations, resource allocation parameters can be dynamically adjusted via system APIs based on resource allocation strategies.
[0104] For example, based on the resource allocation strategy, the frequency, memory allocation, and network bandwidth of heterogeneous computing modules are dynamically adjusted, and the task scheduling order is optimized.
[0105] The resource allocation and multi-task collaborative management method provided in this application dynamically senses the operating status of the electronic device, the type and priority of each currently running task, and the dependency relationship between each currently running task. Combined with the resource allocation model, it generates an adaptive resource allocation strategy, which can realize efficient collaborative management of model inference tasks and multiple concurrent tasks, thereby improving the resource utilization of electronic devices and user experience.
[0106] like Figure 2 As shown, Figure 2 This is a schematic diagram of a sub-process of a resource allocation and multi-task collaborative management method provided in the embodiments of this application.
[0107] In some embodiments, determining the type and priority of each currently running task includes:
[0108] S201. Use machine learning models or rule engines to determine the type of each currently running task.
[0109] S202. Determine the priority of each currently running task based on its importance and real-time parameters.
[0110] Among them, the importance parameter of a task can be used to measure the degree of impact of a task on business objectives, security, or user experience.
[0111] For example, the importance of a task can be determined using the following discrete levels (1-5):
[0112] I=5 (Critical / Safety Level): System crash, life safety, core transaction failure (such as braking control in autonomous driving).
[0113] I=4 (High): The main functions are impaired and unacceptable to users (such as video call stuttering).
[0114] I=3 (Medium): Secondary functions, which can be temporarily delayed (such as background log upload).
[0115] I=2 (Low): Optimized experience, imperceptible (such as UI animation rendering).
[0116] I=1 (lowest): Maintenance tasks (such as disk defragmentation).
[0117] Real-time parameters can be used to measure how sensitive a task is to time constraints. They are typically expressed as deadlines, periods, or maximum tolerable delays.
[0118] In some implementations, a weighted summation method can be used to determine the priority score of each currently running task based on the importance and real-time parameters of each task.
[0119] For example, the priority score P = w1 × I + w2 × R; where I represents the importance parameter, R represents the real-time parameter, w1 and w2 represent the weight coefficients, and w1 + w2 = 1.
[0120] The higher the priority score of a task, the higher its priority.
[0121] In this embodiment of the application, by classifying tasks and assigning priorities, task priority constraints can be provided to the resource allocation model to ensure that the resource allocation strategy can prioritize meeting the needs of critical tasks.
[0122] In some embodiments, optionally, the above resource allocation strategy includes at least one of the following:
[0123] (1) Strategies for adjusting the operating frequency of the computing unit;
[0124] The CPU / GPU frequency is dynamically adjusted based on task priority and runtime status data.
[0125] For example, high-priority tasks (such as real-time video encoding) are assigned a high frequency (3.5GHz) to ensure low latency, while low-priority tasks (such as background log analysis) are assigned a low frequency (1.8GHz) to reduce energy consumption. Combined with the "load-frequency" mapping model, the frequency is increased when the CPU utilization is >70% and decreased when the CPU utilization is <30%, with response time reaching the millisecond level.
[0126] (2) Memory resource allocation or release strategies;
[0127] By dynamically allocating and releasing memory resources, we ensure that the memory requirements of high-priority tasks are met.
[0128] For example, memory-intensive tasks (such as large database queries) pre-allocate large memory blocks and periodically release idle memory using garbage collection; compute-intensive tasks use "memory pool" technology to reuse memory blocks and reduce the overhead of frequent allocation / release.
[0129] (3) Network bandwidth allocation strategy;
[0130] Dynamically adjust network bandwidth allocation according to task requirements to ensure network performance for critical tasks.
[0131] For example, a fixed bandwidth is reserved for critical tasks (such as video conferencing), while non-critical tasks (such as file downloads) adopt a "remaining bandwidth allocation" mode. When critical tasks are idle, non-critical tasks can dynamically borrow the remaining bandwidth.
[0132] (4) The scheduling order of the currently running tasks;
[0133] Optimize task scheduling order and concurrent execution methods to reduce resource contention and waiting time.
[0134] For example, by combining task dependency graphs, critical path tasks (such as "UI design → front-end development → testing") can be identified, and critical path tasks can be scheduled first to avoid non-critical tasks occupying resources and causing delays in the critical path.
[0135] In addition, priorities are dynamically adjusted based on task execution progress and resource consumption. For example, tasks with delayed execution (e.g., >20% delay) are temporarily given higher priority, while tasks with excessive resource consumption (e.g., CPU utilization >90%) are given lower priority to avoid resource monopolization.
[0136] (5) The concurrent execution mode of each currently running task.
[0137] For example, I / O-intensive tasks (such as network requests) can adopt a "multi-threaded + asynchronous I / O" model to achieve high concurrency through an event loop; computationally intensive tasks (such as image processing) can adopt a "multi-process + load balancing" model to achieve parallel computing through a process pool.
[0138] Additionally, the number of concurrent tasks can be dynamically adjusted based on system load (such as CPU / memory utilization). For example, when CPU utilization is <50%, concurrent tasks can be increased to improve resource utilization, and when it is >80%, concurrent tasks can be reduced to avoid resource overload.
[0139] Optionally, the above resource allocation model includes any of the following:
[0140] (1) Reinforcement learning model
[0141] This model can learn the optimal resource allocation strategy through a "trial and error-reward" mechanism. By performing actions (such as allocating resources) in the environment and adjusting resource allocation behavior based on feedback (rewards / penalties), it eventually converges to a resource allocation strategy that maximizes long-term cumulative rewards.
[0142] (2) Deep Q-network model
[0143] This model can use deep neural networks to approximate the Q-function (state-action value function) and solve the "curse of dimensionality" problem in high-dimensional state spaces.
[0144] (3) Fuzzy logic model
[0145] This model can be based on fuzzy set theory to handle resource allocation problems with uncertainty and fuzzy constraints.
[0146] (4) Genetic Algorithm Model
[0147] This model can simulate natural selection and genetic mechanisms, optimize the population (candidate solutions) through selection, crossover, and mutation operations, and eventually evolve to a near-optimal solution.
[0148] (5) Bayesian optimization model.
[0149] This model can construct a proxy model for the objective function based on the Gaussian process equal probability model, and efficiently search for optimal parameters (such as resource allocation ratio) by balancing exploration and utilization through the acquisition function.
[0150] The resource allocation and multi-task collaborative management method provided in this application embodiment can achieve the following beneficial effects:
[0151] Intelligent dynamic resource allocation: Through the resource allocation model, the resource allocation strategy can be adaptively adjusted based on the operating status data of electronic devices to ensure that resource allocation is always in the optimal state.
[0152] Multi-task collaborative management: It can consider the resource requirements of multiple tasks at the same time, optimize the allocation of resources among tasks, avoid resource competition and waste, and improve the overall performance of electronic devices.
[0153] Efficiently handles high-dimensional state spaces: It can ensure reasonable and efficient resource allocation based on the interrelationships and dependencies between tasks.
[0154] Enhance user experience and system stability: Dynamic resource allocation and management can ensure that critical tasks are prioritized, improve resource utilization, and reduce system energy consumption, thereby significantly improving user experience and system stability.
[0155] In some embodiments, the performance parameters of the electronic device and user feedback information can also be monitored; based on the performance parameters of the electronic device and user feedback information, the parameters of the resource allocation model and the resource allocation strategy can be adjusted. Through continuous learning and model updates, the accuracy of resource allocation and the overall efficiency of the system can be gradually improved.
[0156] In some embodiments, this application also provides a resource allocation and multi-task collaborative management apparatus. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of a resource allocation and multi-task collaborative management device provided in an embodiment of this application. The resource allocation and multi-task collaborative management device 30 may include:
[0157] The acquisition module 301 is used to acquire the operating status data of the electronic device.
[0158] The determination module 302 is used to determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks.
[0159] The processing module 303 is used to generate a resource allocation strategy based on the running status data, the type and priority of each currently running task, and the dependencies between each currently running task, using a pre-set resource allocation model.
[0160] The adjustment module 304 is used to adjust the computing resource allocation parameters of the electronic device, as well as the scheduling order and / or concurrent execution mode of each currently running task, according to the resource allocation strategy.
[0161] In some possible implementations, the above-mentioned operational status data includes at least one of the following:
[0162] The computing unit includes data on computing unit utilization, memory usage, network bandwidth utilization, battery status, temperature sensor data, task running status, and computing resource demand prediction. The computing unit includes at least one of a central processing unit, a graphics processing unit, and an embedded neural network processor.
[0163] In some possible implementations, the resource allocation strategy described above includes at least one of the following:
[0164] Operating frequency adjustment strategy for computing units;
[0165] Memory resource allocation or release strategies;
[0166] Network bandwidth allocation strategy;
[0167] The scheduling order of the currently running tasks;
[0168] The concurrent execution mode of the currently running tasks.
[0169] In some possible implementations, the determining module 302 is used for:
[0170] Use machine learning models or rule engines to determine the type of each currently running task;
[0171] The priority of each currently running task is determined based on its importance and real-time parameters.
[0172] In some possible implementations, the resource allocation model described above includes any of the following:
[0173] Reinforcement learning models, deep Q-network models, fuzzy logic models, genetic algorithm models, and Bayesian optimization models.
[0174] In some possible implementations, the processing module 303 is further configured to:
[0175] Monitor the performance parameters and user feedback information of electronic devices;
[0176] Adjust the parameters and resource allocation strategies of the resource allocation model based on the performance parameters of electronic devices and user feedback.
[0177] The resource allocation and multi-task collaborative management device provided in this embodiment can execute the resource allocation and multi-task collaborative management method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0178] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4As shown, the electronic device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 40 further includes a communication interface 403. The processor 401, memory 402, and communication interface 403 are connected via a bus.
[0179] In the specific implementation process, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to execute the above-mentioned resource allocation and multi-task collaborative management method.
[0180] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0181] In the above embodiments, it should be understood that the processor can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules within the processor.
[0182] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0183] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0184] This application also provides a chip including at least one processor for executing program instructions to perform the above-described resource allocation and multi-task collaborative management method.
[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described resource allocation and multi-task collaborative management method.
[0186] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-mentioned resource allocation and multi-task collaborative management method.
[0187] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0188] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside within an ASIC. Alternatively, the processor and the readable storage medium can exist as discrete components in a device.
[0189] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0190] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
Claims
1. A resource allocation and multi-task collaborative management method, characterized in that, The method includes: Acquire operational status data of electronic devices; Determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks; Based on the running status data, the type and priority of each currently running task, and the dependencies between each currently running task, a resource allocation strategy is generated using a pre-set resource allocation model. According to the resource allocation strategy, the computing resource allocation parameters of the electronic device, as well as the scheduling order and / or concurrent execution mode of each currently running task, are adjusted.
2. The method according to claim 1, characterized in that, The operational status data includes at least one of the following: The computing unit includes data on computing unit utilization, memory usage, network bandwidth utilization, battery status, temperature sensor data, task running status, and predicted computing resource requirements. The computing unit includes at least one of a central processing unit, a graphics processing unit, and an embedded neural network processor.
3. The method according to claim 2, characterized in that, The resource allocation strategy includes at least one of the following: The operating frequency adjustment strategy of the computing unit; Memory resource allocation or release strategies; Network bandwidth allocation strategy; The scheduling order of the currently running tasks; The concurrent execution mode of the currently running tasks.
4. The method according to claim 1, characterized in that, Determining the type and priority of each currently running task includes: Use machine learning models or rule engines to determine the type of each currently running task; The priority of each currently running task is determined based on its importance and real-time parameters.
5. The method according to any one of claims 1 to 4, characterized in that, The resource allocation model includes any of the following: Reinforcement learning models, deep Q-network models, fuzzy logic models, genetic algorithm models, and Bayesian optimization models.
6. The method according to claim 1, characterized in that, The method further includes: Monitor the performance parameters and user feedback information of the electronic device; The parameters of the resource allocation model and the resource allocation strategy are adjusted based on the performance parameters of the electronic device and user feedback information.
7. A resource allocation and multi-task collaborative management device, characterized in that, The device includes: The acquisition module is used to acquire the operating status data of the electronic device; The determination module is used to determine the type and priority of each currently running task, as well as the dependencies between the currently running tasks; The processing module is used to generate a resource allocation strategy based on the running status data, the type and priority of each currently running task, and the dependencies between each currently running task, using a preset resource allocation model. The adjustment module is used to adjust the computing resource allocation parameters of the electronic device, as well as the scheduling order and / or concurrent execution mode of each currently running task, according to the resource allocation strategy.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the resource allocation and multi-task collaborative management method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the resource allocation and multi-task collaborative management method as described in any one of claims 1-6.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the resource allocation and multi-task collaborative management method as described in any one of claims 1-6.