Task scheduling method and device for distributed processing system and readable medium

By obtaining processing demand in a distributed processing system and using system models to predict target scheduling methods, the problem that traditional scheduling methods cannot adapt to dynamic load and diversified needs is solved, and efficient resource utilization and performance guarantee is achieved.

CN120216155APending Publication Date: 2025-06-27ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311817669.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional static scheduling methods cannot adapt to dynamically changing load conditions and diversified application needs, resulting in low CPU utilization, performance bottlenecks, lack of intelligent prediction, insufficient utilization of multi-core CPUs, and insufficient energy efficiency optimization.

Method used

By obtaining the processing requirements of the tasks to be scheduled, using the system model of the distributed processing system to predict the target scheduling method, the performance indicators of the distributed processing system are optimized, and the predicted target scheduling method is used to control the distributed processing system to execute the tasks to be scheduled.

Benefits of technology

Significantly improve the resource utilization rate of distributed processing systems, ensure the performance of distributed processing systems, achieve more efficient task scheduling and resource management, extend battery life, and support diversified application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216155A_ABST
    Figure CN120216155A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and device of a distributed processing system and a readable medium, and belongs to the field of computers. The method comprises the steps of obtaining a processing demand quantity of a to-be-scheduled task; utilizing a system model of the distributed processing system to predict and obtain a target scheduling mode of the distributed processing system on the processing demand; wherein the system model of the distributed processing system is used for predicting the influence of a scheduling mode of a to-be-scheduled task on performance; the distributed processing system comprises at least two processing units; wherein the target scheduling mode comprises a processing expected amount scheduled to each processing unit in the distributed processing system, and the target scheduling mode enables the performance index of the distributed processing system after task scheduling to be optimal; and controlling the distributed processing system to execute the to-be-scheduled task by adopting the target scheduling mode. The method is used for improving the processing resource utilization rate of the distributed processing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a task scheduling method, device, and readable medium for a distributed processing system. Background Art

[0002] In the past few decades, mobile phones have become an indispensable part of people's lives, and the functions and performance of mobile phones have been continuously improved. However, with the rapid development of mobile applications and the increasing demand for diverse functions from users, the management of the central processing unit (CPU) resources of mobile phones has become a key issue. Traditional static scheduling methods cannot adapt to the changing load conditions and diverse application requirements, resulting in low CPU utilization and obvious bottlenecks in CPU performance. Summary of the Invention

[0003] The present disclosure provides a task scheduling method, device, and readable medium for a distributed processing system.

[0004] In a first aspect of the present disclosure, a task scheduling method for a distributed processing system is provided, including:

[0005] Obtaining the processing requirement amount of a task to be scheduled;

[0006] Using the system model of the distributed processing system to predict and obtain the target scheduling method of the distributed processing system for the processing requirement amount; wherein, the system model of the distributed processing system is used to predict the impact of the scheduling method of the task to be scheduled on performance; the distributed processing system includes at least two processing units; wherein, the target scheduling method includes the processing expectation amount scheduled to each processing unit in the distributed processing system, and the target scheduling method enables the performance index of the distributed processing system after scheduling tasks to be optimal;

[0007] Controlling the distributed processing system to execute the task to be scheduled by using the target scheduling method.

[0008] In a second aspect of the present disclosure, an electronic device is provided, including:

[0009] At least one processor;

[0010] A memory storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method according to the first aspect;

[0011] At least one I / O interface connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

[0012] The third aspect of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.

[0013] The present disclosure has the following advantages:

[0014] In the case of having a new task to be scheduled, obtain the processing requirement amount of the task to be scheduled, and use the system model of the distributed processing system to predict and obtain the target scheduling method of the distributed processing system for the processing requirement amount. This target scheduling method enables the performance index of the distributed processing system to be optimal after scheduling tasks. Thus, a theoretically target scheduling method is obtained from the system model prediction, and then the target scheduling method is used to control the distributed processing system to execute the task to be scheduled. Therefore, it is possible to control the actual execution of the task to be scheduled by the distributed processing system according to the processing expectation amounts of each processing unit in the predicted target scheduling method, realizing that the actual scheduling of the distributed processing system is carried out according to the predicted situation, which can significantly improve the resource utilization rate of the distributed processing system and ensure the performance of the distributed processing system. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic flowchart of a task scheduling method for a distributed processing system provided in an embodiment of the present disclosure;

[0016] Figure 2 It is a schematic diagram of a distributed CPU scheduling process taking a mobile phone as an example provided in an embodiment of the present disclosure;

[0017] Figure 3 It is a schematic flowchart of a system optimization provided in an embodiment of the present disclosure;

[0018] Figure 4 It is a schematic diagram of a task scheduling device for a distributed processing system provided in an embodiment of the present disclosure;

[0019] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] The following will describe in detail the specific embodiments of the present disclosure with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining and illustrating the present disclosure, and are not used to limit the present disclosure.

[0021] As used in the present disclosure, the term "and / or" includes any and all combinations of one or more related listed items.

[0022] The terms used in this disclosure are only for describing specific embodiments and are not intended to limit this disclosure. As used in this disclosure, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

[0023] When the terms "comprising" and / or "consisting of" are used in this disclosure, it specifies the presence of the stated features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their groups.

[0024] Unless otherwise defined, the meanings of all terms (including technical and scientific terms) used in this disclosure are the same as those commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless this disclosure clearly so defines.

[0025] The inventors have found in the process of implementing this disclosure that:

[0026] Currently, there already exist some methods and algorithms for dynamic task scheduling and load balancing to optimize the utilization rate and performance of CPU resources. These technologies usually perform task scheduling and resource allocation based on factors such as task priority, task size, and system load. However, the prior art has the following some defects or unsolved technical problems:

[0027] Static scheduling limitation: Traditional static scheduling algorithms cannot adapt to dynamically changing load conditions and diverse application requirements, which results in some tasks being unable to respond in a timely manner or tasks with lower priorities being delayed in execution, reducing the system's response speed and user experience;

[0028] Lack of intelligent prediction: The prior art lacks the ability of intelligent prediction in task scheduling and resource allocation. It usually performs task scheduling based on fixed rules and strategies and cannot accurately predict future CPU requirements, which leads to waste of resources or inability to meet the requirements of high-priority tasks;

[0029] Insufficient utilization of multi-core CPUs: The modern mobile phone multi-core CPU architecture provides opportunities for parallel computing, but the prior art has insufficient utilization of multi-core CPUs, and task allocation and load balancing are not flexible enough, resulting in some cores being idle while other cores are overloaded, affecting the overall performance of the system;

[0030] Energy efficiency optimization: The prior art does not fully consider energy efficiency optimization in task scheduling and resource management. The battery life of mobile devices is an important issue, and the prior art often fails to effectively utilize CPU resources to reduce energy consumption.

[0031] Therefore, although the prior art has improved the effects of task scheduling and load balancing to a certain extent, there are still the above-mentioned defects and unsolved technical problems.

[0032] Based on this, the embodiments of the present disclosure provide a task scheduling method for a distributed processing system, which can improve the resource utilization rate of a distributed processing system such as a multi-core CPU and ensure the performance of the distributed processing system.

[0033] The task scheduling method for a distributed processing system provided by the embodiments of the present disclosure can be executed by any electronic device with processing functions.

[0034] The task scheduling method for a distributed processing system (also referred to as a distributed CPU system) provided by the embodiments of the present disclosure is applicable to the task scheduling of electronic devices with a multi-core CPU architecture and is also applicable to a distributed processing system composed of multiple electronic devices. Here, the distributed processing system includes at least two processing units, where the processing unit can be a CPU subsystem or a single-core subsystem in a multi-core CPU. Specifically, the task scheduling method for a distributed processing system provided by the embodiments of the present disclosure can be executed by a CPU scheduling system responsible for managing the distributed processing system.

[0035] The operation process of the distributed processing system is introduced as follows:

[0036] During the operation of the task scheduling mechanism, the operating system monitors the resource utilization of the electronic device in real time, including CPU, memory, network, and storage, etc., to sense the currently running tasks, the resources required by the tasks, and the execution status of the tasks. The execution status includes whether it is postponed or suspended, etc., and based on load awareness, dynamically adjusts the task scheduling and resource allocation. When it is found that a certain task requires more CPU resources, reallocate CPU resources for the task to ensure the smooth execution of the task. This dynamic adjustment helps to improve the system response speed and efficiency.

[0037] The specific process is as follows:

[0038] Step 1, when the operating system monitors that an application needs to execute a task, send a task request to the CPU scheduling system, including sending information such as task description, priority, and resource requirements to the CPU scheduling system;

[0039] Step 2, after receiving the task request, the CPU scheduling system first appropriately decomposes the task, including splitting a large task into smaller subtasks for parallel processing. According to the nature and resource requirements of the task, the CPU scheduling system collaborates with the unit responsible for resource management to determine the CPU cores allocated to the task and the allocated CPU resources according to the task priority, task dependencies, and system resource availability;

[0040] Step 3, after task allocation and resource allocation, the CPU scheduling system enables the task scheduling method of the distributed processing system provided by this embodiment of the present disclosure to perform predictive control. The main objective of this task scheduling method is to predict in real time the traffic of CPU current in each part of the entire system and the load conditions of each core. This task scheduling method can be based on historical data and models for prediction to understand in advance the impact of different tasks and loads on the current, providing important reference data for subsequent current management;

[0041] Step 4, based on the predicted output value of the task scheduling method of the distributed processing system, the CPU scheduling system can provide a reference for the control quantity for subsequent current management. This means that the system can plan and schedule current allocation in advance to optimize performance and energy efficiency. According to the selected control performance indicators (such as energy consumption, response time, etc.) and the predicted output value, the CPU scheduling system can solve the optimal control law, which involves adjusting the execution order of tasks, allocating the magnitude of CPU current, etc., to achieve the overall scheduling and processing of the system.

[0042] During the distributed execution process, steps such as task decomposition, scheduling, parallel execution, result aggregation, and result feedback are involved. The distributed execution process needs to consider the complexity of tasks, dependencies, parallelism, and the reliability of data transmission. By effectively implementing these steps, tasks can be efficiently executed in a distributed manner, and the performance and scalability of the system can be improved. The specific implementation steps are as follows:

[0043] Step a, when task information is received, task decomposition is first performed, breaking a large task into multiple small subtasks. Each subtask can be executed independently or in parallel. The decomposition process is usually based on the nature and requirements of the task to ensure that the task can be effectively parallelized;

[0044] Step b, after task decomposition is completed, task scheduling is required. Task scheduling needs to ensure that the dependencies between tasks are met so as to effectively arrange the subtasks that can be executed in parallel, such as determining the execution order of tasks, that is, determining the tasks to be executed first and the subtasks that need to wait for other subtasks to complete before execution. The scheduling algorithm can consider the priorities of tasks, dependencies, resource requirements, and the availability and load conditions of the CPU. The goal of task scheduling is to maximize the parallelism of tasks to optimize the overall performance;

[0045] Step c, after determining the scheduling of the subtasks, these subtasks are parallelly assigned to multiple CPU cores to execute multiple tasks simultaneously, which is achieved through a CPU thread pool, process pool, or other parallel computing mechanisms;

[0046] Step d, after all subtasks have completed execution, summarize the execution results of the subtasks, which may involve data merging, aggregation, or processing to generate the final task output, and at the same time check the result summary to ensure the integrity and correctness of the results;

[0047] Step e, transmit the complete task result obtained from the summary back to the operating system or application for subsequent processing or display. This process is achieved through the implementation of data transmission and communication protocols to ensure the reliable transmission of the results.

[0048] The specific features of energy efficiency optimization in the embodiments of the present disclosure are as follows:

[0049] (1) Intelligent task scheduling: The CPU scheduling system selects the CPU with the best performance among multiple CPUs for the most important tasks of the application by obtaining the nature, priority, and resource requirements of system and application tasks.

[0050] (2) Low-power state management: During task execution, the predicted CPU call value is changed in real time according to the scale of application startup, and the unused CPUs are placed in a low-power state. According to the overall analysis of the system when the application starts, the task scheduling method provided by the embodiments of the present disclosure reduces the predicted value of the unused CPUs, so that the corresponding CPUs will not be invoked. Low power consumption is achieved by reducing the frequency of the CPU or putting the CPU into a sleep state when it is idle.

[0051] (3) Dynamic adjustment of resource allocation: Monitor the usage of CPUs, memory, and other resources in real time, and continuously solve the predicted output value as needed to control the current flowing through the CPU in real time, thereby changing the CPU call situation. Allocate corresponding resources when needed, thus reducing resource waste.

[0052] (4) Task merging: In some cases, multiple small tasks are merged into a larger task and then executed on a single CPU. This reduces the overhead of task switching and improves energy efficiency. During task decomposition, there are repetitions between individual subtasks. For repetitive subtasks, they are merged and only executed once in the CPU to avoid redundant loads caused by multiple executions. When tasks with a large amount of repetitive content appear, this strategy reduces the task running duration and further reduces the system energy consumption.

[0053] (5) Energy-saving strategies: Implement energy-saving strategies such as reducing the screen brightness and restricting the activities of background processes to reduce the overall energy consumption.

[0054] (6) Task priority and scheduling strategies: Adjust resource allocation and scheduling according to the priority and importance of tasks. High-priority tasks can obtain more resource support to ensure that they can be completed in a timely manner, thereby improving the system response speed and user experience.

[0055] (7) Dynamic voltage and frequency adjustment: Dynamically adjust the voltage and frequency of the CPU according to the load conditions. In the case of light load, reduce the voltage and frequency to reduce power consumption.

[0056] (8) Task sleep: For some non-real-time tasks, set them to sleep mode to reduce CPU usage and energy consumption.

[0057] The priorities of applications are usually determined by the operating system according to a series of rules and policies to ensure the stability and performance of the system. These rules and policies may vary depending on the type and version of the operating system. Developers can modify the focus according to different device requirements. Generally, they include the following factors:

[0058] Foreground applications: Applications that the current user is interacting with usually have the highest priority. This makes the user experience smoother because foreground applications are more sensitive to user input and operations. For example, browsing the web or playing games.

[0059] Background applications: Background applications have lower priority than foreground applications. These applications may run in the background, but they generally cannot interfere with the foreground applications that the user is using. For example, music players, email synchronization, or social media updates.

[0060] System processes: The operating system and system services usually have high priority to ensure the normal operation of the core functions of the mobile phone. This includes tasks such as handling incoming calls, text messages, battery management, network connection, and security.

[0061] Task queues and scheduling algorithms: The operating system usually uses task queues and scheduling algorithms to manage the execution of application programs. These algorithms may determine the execution order of application programs based on factors such as priority, time slice rotation, and real-time performance.

[0062] Power management: Mobile phones usually have power management strategies to determine the priorities of application programs according to the battery status and charging situation. In the case of low battery, the system may limit the activities of background applications to extend the battery life.

[0063] User settings: Some operating systems allow users to configure the priorities of application programs. Users can manually change the permissions and background activity rules of certain applications.

[0064] Performance monitoring: The operating system may monitor the performance of application programs. If an application program occupies too much CPU, memory, or other resources, the system may lower its priority or limit its resource usage to prevent the system from crashing or becoming slow.

[0065] Note that different operating systems and device manufacturers may have different strategies and implementation methods, so the priorities of applications may vary depending on the device and operating system version. Application developers usually need to comply with the rules and best practices of the operating system to ensure that their applications can run well in various situations.

[0066] As Figure 1 shown in the schematic flowchart of the task scheduling method of the distributed processing system provided by the embodiments of the present disclosure, the task scheduling method of the distributed processing system provided by the embodiments of the present disclosure mainly includes the following steps:

[0067] Step 101, obtain the processing requirement of the task to be scheduled.

[0068] In some embodiments, the processing requirement of the task to be scheduled can be characterized by a current value or a voltage value.

[0069] In some embodiments, obtaining the processing requirement of the task to be scheduled includes: obtaining the task to be scheduled, and querying the corresponding processing requirement of the task to be scheduled according to the relationship between the task and the processing requirement statistically recorded in history.

[0070] In an exemplary embodiment, machine learning and data analysis techniques are used to analyze and model various application programs running on the device. By collecting historical data about the application programs and based on this data, the future CPU processing requirements are predicted. Through learning and optimization, the processing requirements of each application program for CPU resources at different time periods can be accurately estimated.

[0071] Step 102, use the system model of the distributed processing system to predict the target scheduling method of the distributed processing system for the processing requirement; wherein, the system model of the distributed processing system is used to predict the impact of the scheduling method of the task to be scheduled on the performance; the distributed processing system includes at least two processing units; wherein, the target scheduling method includes the processing expectation amount scheduled to each processing unit in the distributed processing system, and the target scheduling method enables the performance index of the distributed processing system after scheduling tasks to be optimal.

[0072] In some embodiments, the system model of the distributed processing system includes sub-models corresponding to each of the processing units; the sub-model corresponding to the processing unit is used to reflect the influence of the input of each processing unit in the distributed processing system on the output of any processing unit.

[0073] In some embodiments, the obtaining process of the system model of the distributed processing system includes:

[0074] Perform the following processing on any processing unit in the distributed processing system: measure and obtain the influence parameter of the input of other processing units in the distributed processing system on the output of the processing unit, and the influence parameter of the input of the processing unit on the output of the processing unit; determine the system model of the distributed processing system according to the influence parameters corresponding to each processing unit in the distributed processing system and the first-order inertia plus pure time-delay model of the processing unit.

[0075] In some embodiments, the influence parameter includes at least one of the following: the steady-state gain of the output, the time constant, and the lag time.

[0076] In some embodiments, the determining the system model of the distributed processing system according to the influence parameters corresponding to each processing unit in the distributed processing system and the first-order inertia plus pure time-delay model of the processing unit includes:

[0077] Respectively take each processing unit in the distributed processing system as the target processing unit, and determine the row vector corresponding to the target processing unit in the system model according to the influence parameter of the input of each processing unit in the distributed processing system on the output of the target processing unit and the first-order inertia plus lag model of the target processing unit;

[0078] Determine the system model according to the row vectors corresponding to each processing unit in the distributed processing system.

[0079] In an exemplary embodiment, taking the distributed processing system as a mobile phone multi-core CPU system as an example, one processing unit is equivalent to one CPU single-core subsystem. Here, the corresponding system model is obtained by using the charging and discharging characteristics of the CPU. In this CPU system, there are n CPU cores. Then, the processing units of the distributed processing system are regarded as n CPU subsystems, that is, sub-models, of the first-order inertia plus pure time-delay model. The system model of the entire multi-core CPU system is expressed as:

[0080]

[0081] where K ij is the steady-state gain of the input of the j-th (≤j≤n) CPU subsystem of the multi-core CPU system on the output of the i-th (≤i≤n) CPU subsystem, T ij is the time constant of the input of the j-th CPU subsystem of the multi-core CPU system on the output of the i-th CPU subsystem, τ ij is the lag time of the input of the j-th CPU subsystem of the multi-core CPU system on the output of the i-th CPU subsystem. S is the Laplace operator for Laplace transform.

[0082] The elements on the diagonal of the system model are the sub-models corresponding to each CPU subsystem of the multi-core CPU system. For example, is the sub-model of the first CPU subsystem of the multi-core CPU system, is the sub-model of the nth CPU subsystem of the multi-core CPU system, and so on.

[0083] In some embodiments, the method of using the system model of the distributed processing system to predict and obtain the target scheduling method for the processing demand of the distributed processing system includes:

[0084] Using the system model of the distributed processing system, determine the prediction models corresponding to the respective processing units of the distributed processing system. The prediction model is used to determine the predicted output value of the processing unit when a control increment is input to any processing unit of the distributed processing system, and the output value is used to reflect the performance of the unit; according to the prediction models corresponding to the respective processing units of the distributed processing system and the processing demand, determine the target scheduling method.

[0085] In some embodiments, the method of using the system model of the distributed processing system to determine the prediction models corresponding to the respective processing units of the distributed processing system includes:

[0086] According to the step response data of each processing unit, determine the step response model vector of each processing unit relative to other processing units. Among them, the step response model of processing unit i relative to processing unit j is determined according to the step response data of the output of processing unit i with respect to the input of processing unit j;

[0087] According to the step response model vectors of each processing unit relative to other processing units, determine the dynamic matrices corresponding to the respective processing units; among them, the step response model vector of the processing unit includes the steady-state value of the step response and the step response data at each moment recorded before reaching the steady-state value;

[0088] According to the control increments of each processing unit at the prediction moment, the dynamic matrices corresponding to the respective processing units, the initial prediction output values of each processing unit at each moment within the prediction step at the prediction moment, and the prediction output values of each processing unit at the prediction moment, determine the prediction models corresponding to the respective processing units.

[0089] Among them, the initial prediction output value at a certain moment is the actual output value at the previous moment of this moment.

[0090] In an exemplary embodiment, record the step response data corresponding to each moment T of the step response curve of the CPU subsystem l under which, when a in the step response curve ij(k′)(k′ > L ij ) and the step response data a ij (L ij ) when the error tends to 0, then a ij (L ij ) can be approximately considered to represent the steady-state value of the step response. Based on the step response data at each moment before obtaining the steady-state value, establish the step response model vector between the input of the jth CPU subsystem and the output of the ith CPU subsystem in the distributed processing system:

[0091] a ij = [a ij (1) a ij (2) … a ij (L ij )] T Formula (2)

[0092] Next, through the step response model vector a ij establish the dynamic matrix of the controlled object:

[0093]

[0094] Among them, A ij is the P×M order dynamic matrix of the input of the jth CPU subsystem to the output of the ith CPU subsystem.

[0095] At the k - 1 moment, add the control increments Δu1(k - 1), Δu2(k - 1), …, Δu N (k - 1) of each CPU subsystem, and the predicted value y i,P (k - 1) of the submodel of the ith CPU subsystem can be obtained as:

[0096]

[0097] Among them,

[0098]

[0099]

[0100] y i,1 (k|k - 1), y i,1 (k + 1|k - 1), …, y i,1 (k + L - 1|k - 1) respectively represent the predicted values of the submodel of the ith CPU subsystem at the k - 1 moment for the moments k, k + 1, …, k + L - 1, y i,0 (k|k - 1), y i,0 (k + 1|k - 1), …, y i,0(k + L - 1|k - 1) represents the initial prediction values for the moments k, k + 1, …, k + L - 1 at the (k - 1)-th moment, A ii,0 , A ij,0 are respectively the dynamic matrix of the i-th CPU subsystem and the matrix established for the step response data of the j-th CPU subsystem with respect to the i-th CPU subsystem, and L is the modeling time domain.

[0101] According to the derivation of the above steps, it can be obtained that when the sub-model of the i-th CPU subsystem is under M consecutive control increments Δu i (k), …, Δu i (k + M - 1), the predicted output values y i,PM are as follows:

[0102]

[0103] Among them,

[0104] y i,0 (k + 1|k), y i,0 (k + 2|k), …, y i,0 (k + P|k) are the initial predicted output values of the i-th CPU subsystem at the k-th moment for the moments k + 1, k + 2, …, k + P.

[0105] In some embodiments, the method further includes: performing the following processing on the prediction model corresponding to any one of the processing units: measuring the actual output value of the processing unit at the prediction moment, determining the prediction error value according to the actual output value at the prediction moment and the predicted output value of the prediction model corresponding to the processing unit at the prediction moment, and using the prediction error value to correct the prediction model of the processing unit.

[0106] In an exemplary embodiment, by comparing the actual output y i (k) of the i-th CPU subsystem at the k-th moment with the predicted output value of the previous moment for the k-th moment, the prediction error value e i (k) of the CPU sub-model can be obtained:

[0107] e i (k) = y i (k) - y i,1 (k|k - 1) Formula (6)

[0108] Considering that in the actual scheduling process, there are usually factors such as model mismatch and interference from other components, resulting in a deviation between the actual output value and the predicted value. Therefore, the output y i (k) of the sub-model at the k-th moment is corrected in the form of weighting the prediction error e i,cor (k):

[0109] y i,cor (k) = y i,0 (k-1)+he i (k) Formula (7)

[0110] in,

[0111]

[0112] y i,cor (k|k),y i,cor (k+1|k),…,y i,cor (k+L-1|k) is the correction value of the sub-model corresponding to the i-th CPU subsystem, h represents the error compensation weight matrix, and α is the error correction coefficient;

[0113] Since the optimization node will shift, the predicted time node will move to k+1, k+2,…, k+N. i,cor (k) Use the shift operation to obtain the model initial prediction value y of the i-th CPU subsystem at time k i,0 (k):

[0114] y i,0 (k) = Sy i,cor (k)

[0115] Among them, S is an L×L order shift matrix,

[0116]

[0117] Step 103: Use the target scheduling method to control the distributed processing system to execute the task to be scheduled.

[0118] In some embodiments, determining the target scheduling method according to the prediction model corresponding to each processing unit of the distributed processing system and the processing demand includes:

[0119] The following processing is performed on any of the processing units in the distributed processing system: controlling the estimated control increment allocated to the processing unit from the processing demand, determining the predicted output value corresponding to the estimated control increment using the sub-prediction model corresponding to each of the processing units, and determining the performance index of the processing unit according to the predicted output value, the expected output trajectory of the processing unit, the dynamic matrix corresponding to the processing unit, and M continuous control increments of the processing unit before the current moment; adjusting the estimated control increment allocated to the processing unit multiple times, and obtaining the performance index corresponding to each estimated control increment, and selecting the estimated control increment under the optimal performance index as the processing expected amount of the processing unit;

[0120] Determine the target scheduling method of the distributed processing system for the processing demand based on the processing expectation amounts corresponding to the processing units of the distributed processing system.

[0121] In some embodiments, the repeatedly adjusting the predicted control increment allocated to the processing unit includes:

[0122] In any adjustment process, obtain the processing expectation amounts of the processing units that have been allocated in the distributed processing system, and determine the adjusted alternative control increment of the processing unit according to the processing expectation amounts of the processing units that have been allocated, the expected output trajectory of the processing unit, the initial predicted output values of each moment within the prediction step at the prediction moment of the processing unit, and the dynamic matrices corresponding to the processing units;

[0123] In the case that the adjusted alternative control increment of the processing unit satisfies the Nash iteration accuracy with the predicted control increment before adjustment, use the adjusted alternative control increment as the predicted control increment of the processing unit after this adjustment.

[0124] In an exemplary embodiment, when performing performance prediction on a distributed processing system, the performance index of the i-th CPU subsystem is:

[0125]

[0126] Wherein,

[0127] ref i (k)=[ref i (k + 1), ref i (k + 2), …, ref i (k + P)] T

[0128] ref i (k + ε)=β ε y i (k)+(1 - β ε )c i (k)

[0129] Q i =diag(q i,1 , q i,2 , …, q i,P )

[0130] R i =diag(r i,1 , r i,2 , …, r i,M )

[0131] c i (k) is the set value of the i-th CPU subsystem, refi (k) is the expected output trajectory of the i-th CPU subsystem, Q i and R i represent the error and control weight matrices respectively. β is the softening factor of the reference trajectory.

[0132] According to the Nash optimization strategy, taking Δu i,M (k) as the control variable, minimize the performance index corresponding to each CPU subsystem, and solve to obtain the optimal control increment at the current time k as:

[0133]

[0134] From the above formula, it can be seen that to obtain the Nash optimal solution Δu i,M (k) at the current time, the optimal solution information of other CPU subsystems needs to be obtained Here, it is necessary to obtain it through communication estimation. Each CPU subsystem transmits the current optimal solution to other CPU subsystems through information transmission. After obtaining , solve to get:

[0135]

[0136] Then, judge whether the optimal control increments obtained in the previous and subsequent times satisfy the Nash iteration accuracy ε

[0137]

[0138] If it is satisfied, output the Nash optimal solution. If the requirement is not met, it is necessary to continue iterating until the relevant accuracy conditions are satisfied. Thus, the Nash optimal solution of the entire CPU system at the current time is:

[0139]

[0140] Finally, take the first term of Δu i,M (k) obtained above as the immediate control law:

[0141]

[0142] And apply the actual control quantity u i (k) = u i (k - 1) + Δu i (k) to their respective CPU subsystems.

[0143] At the next moment, repeat the above process to continue solving the immediate current increment Δu i (k + 1) of the i-th CPU subsystem, and then obtain the optimal current increment Δu i of the entire CPU system(k + 1), and complete the control of the entire distributed processing system in this cycle.

[0144] In a specific embodiment, as Figure 2 shown is a schematic diagram of the distributed CPU scheduling process taking a mobile phone as an example. The CPU scheduling process mainly includes the following steps:

[0145] Step 201, establish a mobile phone CPU model;

[0146] Step 202, establish an objective function for controlling performance indicators;

[0147] Step 203, solve the optimal output solution of the objective function;

[0148] Step 204, determine whether the iteration requirement is met. If it is met, execute Step 205 and output the optimal CPU control amount corresponding to the optimal solution. If it is not met, return to execute Step 203;

[0149] Step 205, output the optimal CPU control amount corresponding to the optimal solution.

[0150] The task scheduling method for a distributed processing system provided by the embodiments of the present disclosure, in the case of having a new task to be scheduled, obtains the processing demand of the task to be scheduled, and uses the system model of the distributed processing system to predict and obtain the target scheduling method of the distributed processing system for the processing demand. This target scheduling method enables the performance indicators of the distributed processing system after scheduling tasks to be optimal, so as to obtain the theoretically target scheduling method from the system model prediction, and then uses the target scheduling method to control the distributed processing system to execute the task to be scheduled, so that the actual scheduling of the distributed processing system can be carried out according to the predicted situation, enabling the resource utilization rate of the distributed processing system to be significantly improved and the performance of the distributed processing system to be ensured.

[0151] Combined with Figure 3 shown in the system optimization flowchart to illustrate the effect applied to a mobile phone. When the task scheduling method of the distributed processing system provided by the embodiments of the present disclosure is applied to mobile devices such as mobile phones, it can improve the CPU utilization rate of the mobile phone, improve the system performance and response speed, enhance the task execution efficiency, extend the battery life, and support diverse application requirements. These effects will provide a better application experience for users, enhance the system performance, and improve the energy efficiency and usability of mobile devices. The embodiments of the present disclosure can solve the challenges of CPU scheduling and resource management of mobile devices.

[0152] By introducing distributed predictive control, it is possible to intelligently predict the CPU requirements of applications and dynamically adjust task scheduling and resource allocation. This method can improve the utilization rate and overall performance of the CPU in mobile devices, thereby providing a better application experience and system response speed. The application fields of this technology are extensive, covering mobile devices such as smartphones, tablets, and wearable devices. It is applicable to various application scenarios, including mobile games, social media, mobile office, and multimedia applications, etc. By optimizing CPU resource management, this technology can improve the execution efficiency of applications, reduce energy consumption, and enhance the overall performance and user experience of the device.

[0153] Based on the mobile phone CPU scheduling system, the predictive control method can accurately predict the CPU requirements of applications and perform intelligent scheduling according to the characteristics of different applications. This enables the system to adapt to diverse application requirements, provide targeted task scheduling and resource allocation, and improve the execution efficiency and performance of applications. Generally speaking, the mobile phone can perform distributed scheduling and allocation according to the number of processes required by the application software, allocate most CPUs to applications with higher performance requirements, and allocate a small number of CPUs to applications with lower performance requirements, improving the overall task execution efficiency and further enhancing the user experience. It can be seen that it is able to dynamically adjust the priority of tasks and resource allocation according to the characteristics of application programs and the system load conditions to maximize the performance and response speed of the system. Prioritize key tasks to improve the execution efficiency of tasks and the user experience.

[0154] At the same time, energy efficiency optimization is considered. Through intelligent task scheduling and resource management, the power consumption of idle CPUs is controlled in real time, reducing the waste of CPU resources and effectively reducing energy consumption. This helps to extend the battery life of mobile devices and provide longer usage time. Through intelligent task scheduling and load balancing, the system can reasonably allocate CPU resources to different application programs, avoid waste and idleness of resources, and improve the utilization efficiency of CPUs. Moreover, by modeling the internal CPUs of the mobile phone and using model prediction to control the entire internal CPUs of the mobile phone, combined with constraints on current and voltage to constrain the situation of CPU overload, while ensuring that the system is not threatened by overcurrents and overvoltages such as electrostatic interference, inductive surges, overloading, and short circuits, it further improves the overall CPU efficiency of the mobile phone, and then improves the CPU life and overall performance.

[0155] In addition, the task scheduling method provided by the embodiments of the present disclosure can split a task into multiple subtasks and execute them in parallel on multiple CPU cores. This can make full use of the multi-core CPU resources in the mobile phone system, improve the execution efficiency of tasks, and speed up the completion of tasks.

[0156] In summary, the task scheduling method provided by the embodiments of the present disclosure has the following advantages:

[0157] 1. Faster response speed. By predicting future system behavior and controlling based on these predictions, changes can be identified and responded to earlier, thus achieving a faster response of the control system.

[0158] 2. Higher control stability. Traditional control methods are usually designed to maintain the stability of the system near the set point, which may cause some oscillations or overshoots in the output curve. Predictive control methods can balance the response speed and stability by optimizing the performance index, so that a smooth output curve can still be generated in the presence of disturbances.

[0159] 3. Stronger ability to suppress interference. Since it can predict future system behavior and adjust the controller output accordingly, it can better resist external interference or changes, making the output curve closer to the expected value.

[0160] 4. Higher robustness. Traditional control methods may not be robust enough to parameter changes or non - linear effects, resulting in the output curve deviating from the expectation. Predictive control usually has better robustness because it can consider the uncertainty of the model in control to adapt to system changes.

[0161] 5. Stronger ability to optimize performance. Predictive control methods allow the optimization of performance indices during the control process, such as minimizing errors, minimizing energy consumption, etc. This means that the output curve can be adjusted according to specific performance goals.

[0162] During the implementation of a distributed processing system, the performance of the CPU before and after predictive control can be monitored through visualization tools. There are several options for visualization tools as needed:

[0163] System monitoring tools. Operating systems usually provide some monitoring tools or resource management tools for viewing the usage of system resources, including information such as CPU utilization, process status, number of threads, etc. These tools can provide visibility into the CPU scheduling of the mobile phone, helping developers understand the status of processes and threads running in the system and the usage of CPU resources.

[0164] Debugging information and logs. Applications and systems may output some debugging information and logs, which can provide visibility into the CPU scheduling of the mobile phone, helping developers understand the behavior and resource usage of applications during operation.

[0165] Performance analysis tools. Performance analysis tools can help developers deeply understand the performance and resource usage of applications. By using performance analysis tools, developers can obtain visibility into the CPU scheduling of the mobile phone, understand which parts of the code or functions consume more CPU, in order to optimize performance.

[0166] System logs: Operating systems and applications typically generate system logs, which can record the running status and events of the system. By viewing the system logs, visibility into the phone's CPU scheduling can be obtained, thereby understanding the system's operating conditions and potential problems.

[0167] Visualization tools: Some tools and software provide a visual interface to display the system's resource usage and performance in the form of charts or graphs. These visualization tools can more intuitively reflect the situation of the phone's CPU scheduling.

[0168] In summary, "visibility" in the context of phone CPU scheduling is typically achieved through means such as monitoring tools, debugging information, performance analysis tools, system logs, and visualization tools. These tools can help developers and system administrators gain in-depth understanding of the phone's CPU scheduling situation, thereby optimizing system performance and resource management.

[0169] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this disclosure; adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of its algorithm and process, are all within the protection scope of this disclosure.

[0170] An embodiment of this disclosure provides a task scheduling device for a distributed processing system. For the specific implementation of this device, reference can be made to the relevant description in the method embodiment, which will not be repeated here. Figure 4 The following is a schematic structural diagram of the device, which mainly includes:

[0171] An acquisition module 401, configured to acquire the processing requirements of the task to be scheduled;

[0172] A prediction module 402, configured to use the system model of the distributed processing system to predict and obtain the target scheduling method of the distributed processing system for the processing requirements; wherein, the system model of the distributed processing system is used to predict the impact of the scheduling method of the task to be scheduled on performance; the distributed processing system includes at least two processing units; wherein, the target scheduling method includes the processing expectation amounts scheduled to each processing unit in the distributed processing system, and the target scheduling method enables the performance index of the distributed processing system after scheduling the task to be optimal;

[0173] An execution module 403, configured to control the distributed processing system to execute the task to be scheduled by using the target scheduling method.

[0174] The functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments. For the specific implementation and technical effects, reference can be made to the descriptions of the above method embodiments. For the sake of brevity, they will not be elaborated here.

[0175] It should be noted that each module involved in this embodiment is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, units that are not closely related to solving the technical problems proposed by the present disclosure are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.

[0176] Refer to Figure 5 , the embodiments of the present disclosure provide an electronic device, which includes:

[0177] At least one processor 501;

[0178] A memory 502, on which at least one program is stored. When the at least one program is executed by the at least one processor, the at least one processor implements the above method;

[0179] At least one I / O interface 503, connected between the processor and the memory, configured to implement information interaction between the processor and the memory.

[0180] Among them, the processor 501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 502 is a device with data storage capabilities, including but not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read / write interface) 503 is connected between the processor 501 and the memory 502 and can implement information interaction between the processor 501 and the memory 502, including but not limited to a data bus (Bus), etc.

[0181] In some embodiments, the processor 501, the memory 502, and the I / O interface 503 are connected to each other through a bus and then connected to other components of the computing device.

[0182] This embodiment also provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the method provided in this embodiment. To avoid repeated description, the specific steps of the method will not be elaborated here.

[0183] Those of ordinary skill in the art will understand that all or some of the steps in the methods, and the functional modules / units in the systems and devices described above, can be implemented as software, firmware, hardware, and appropriate combinations thereof. In the hardware implementation, the division of functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be executed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that a communication medium typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0184] It should be noted that, in this article, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.

[0185] Those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not others, the combination of features of different embodiments is within the scope of this embodiment and forms different embodiments.

[0186] It is understandable that the above embodiments are merely exemplary embodiments adopted to illustrate the principles of the present disclosure. However, the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present disclosure, and these modifications and improvements are also regarded as the protection scope of the present disclosure.

Claims

1. A task scheduling method for a distributed processing system, characterized in that, Including: Obtain the processing requirement of the task to be scheduled; Using the system model of the distributed processing system, predict and obtain the target scheduling method of the distributed processing system for the processing requirement; wherein, the system model of the distributed processing system is used to predict the impact of the scheduling method of the task to be scheduled on the performance; the distributed processing system includes at least two processing units; wherein, the target scheduling method includes the processing expectation amount scheduled to each processing unit in the distributed processing system, and the target scheduling method enables the performance index of the distributed processing system after scheduling the task to be optimal; Use the target scheduling method to control the distributed processing system to execute the task to be scheduled.

2. The method according to claim 1, wherein The system model of the distributed processing system includes sub-models corresponding to each of the processing units; the sub-model corresponding to the processing unit is used to reflect the impact of the input of each processing unit in the distributed processing system on the output of any processing unit.

3. The method according to claim 1, wherein The obtaining process of the system model of the distributed processing system includes: Perform the following processing on any processing unit in the distributed processing system: Measure the influence parameters of the input of other processing units in the distributed processing system on the output of the processing unit, and the influence parameters of the input of the processing unit on the output of the processing unit; the influence parameters include at least one of the following: steady-state gain of the output, time constant, and lag time; According to the influence parameters corresponding to each processing unit in the distributed processing system and the first-order inertia plus pure lag model of the processing unit, determine the system model of the distributed processing system.

4. The method according to claim 3, wherein The determining the system model of the distributed processing system according to the influence parameters corresponding to each processing unit in the distributed processing system and the first-order inertia plus pure lag model of the processing unit includes: Respectively take each processing unit in the distributed processing system as the target processing unit, and according to the influence parameters of the input of each processing unit in the distributed processing system on the output of the target processing unit and the first-order inertia plus lag model of the target processing unit, determine the row vector corresponding to the target processing unit in the system model; Determine the system model according to the row vectors corresponding to each processing unit in the distributed processing system.

5. The method according to claim 2, characterized in that, The predicting and obtaining the target scheduling method of the distributed processing system for the processing requirement by using the system model of the distributed processing system includes: Using the system model of the distributed processing system, determine the prediction models corresponding to each processing unit of the distributed processing system, and the prediction model is used to determine the predicted output value of the processing unit when the input control increment of any processing unit in the distributed processing system changes, and the output value is used to reflect the performance of the unit; According to the prediction models corresponding to each processing unit of the distributed processing system and the processing requirement, determine the target scheduling method.

6. The method according to claim 5, characterized in that The determining the prediction models corresponding to each processing unit of the distributed processing system by using the system model of the distributed processing system includes: Based on the step response data of each of the processing units, determine the step response model vector of each processing unit relative to other processing units, where the step response model of processing unit i relative to processing unit j is determined according to the step response data of the output of processing unit i with respect to the input of processing unit j; Based on the step response model vectors of each processing unit relative to other processing units, determine the dynamic matrices corresponding to each processing unit; wherein, the step response model vector of the processing unit includes the steady-state value of the step response and the step response data at each moment recorded before reaching the steady-state value; Based on the control increments of each processing unit at the prediction moment, the dynamic matrices corresponding to each processing unit, the initial prediction output values of each processing unit at each moment within the prediction step at the prediction moment, and the prediction output values of each processing unit at the prediction moment, determine the prediction models corresponding to each processing unit.

7. The method according to claim 6, characterized in that, The method further includes: Perform the following processing on the prediction model corresponding to any one of the processing units: Measure the actual output value of the processing unit at the prediction moment, determine the prediction error value according to the actual output value at the prediction moment and the prediction output value of the prediction model corresponding to the processing unit at the prediction moment, and use the prediction error value to correct the prediction model of the processing unit.

8. The method according to claim 6, characterized in that, The determining of the target scheduling method according to the prediction models corresponding to the processing units of the distributed processing system and the processing demand amount includes: Perform the following processing on any one of the processing units in the distributed processing system: Control the estimated control increment allocated to the processing unit from the processing demand amount, use the sub-prediction models corresponding to each processing unit to determine the prediction output value corresponding to the estimated control increment, and determine the performance index of the processing unit according to the prediction output value, the desired output trajectory of the processing unit, the dynamic matrix corresponding to the processing unit, and the M consecutive control increments of the processing unit before the current moment; Adjust the estimated control increment allocated to the processing unit multiple times, and obtain the performance index corresponding to each estimated control increment, and select the estimated control increment under the optimal performance index as the processing desired amount of the processing unit; Based on the processing desired amounts corresponding to the processing units of the distributed processing system, determine the target scheduling method of the distributed processing system for the processing demand amount.

9. The method according to claim 8, characterized in that, The multiple adjustments of the estimated control increment allocated to the processing unit include: In any adjustment process, obtain the processing desired amounts of the processing units that have completed allocation in the distributed processing system, and determine the adjusted alternative control increment of the processing unit according to the processing desired amounts of the processing units that have completed allocation, the desired output trajectory of the processing unit, the initial prediction output values of each processing unit at each moment within the prediction step at the prediction moment, and the dynamic matrices corresponding to each processing unit; In the case where the adjusted alternative control increment of the processing unit satisfies the Nash iteration accuracy with respect to the predicted control increment before adjustment, the adjusted alternative control increment is used as the predicted control increment of the processing unit after this adjustment.

10. An electronic device, characterized in that, Comprising: At least one processor; A memory storing at least one program, which when executed by the at least one processor causes the at least one processor to implement the method according to any one of claims 1-9; At least one I / O interface connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

11. A computer-readable medium having stored thereon a computer program, which when executed by a processor implements the method according to any one of claims 1-9.