Process scheduling method, system and equipment based on heterogeneous multi-core processor

By monitoring user behavior, predictive operations and dynamic scheduling in real time, the problem of unreasonable task allocation in heterogeneous multi-core processors is solved, and more efficient resource utilization and energy efficiency optimization are achieved.

CN119415276APending Publication Date: 2025-02-11SHANDONG INSPUR SCI RES INST CO LTD

Patent Information

Application Number
CN202510031644.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing operating system scheduler cannot effectively identify the core features in heterogeneous multi-core processors, resulting in unreasonable task allocation, low resource utilization, and excessive energy consumption, especially in mobile and embedded devices that affect the battery life of the device.

Method used

By monitoring and recording user operation behavior in real time, using machine learning algorithms to predict the user's next operation behavior, dynamically load the application to be used in memory, and combine the processor core status and scheduling strategy to comprehensively consider the task execution time and energy consumption of the task , dependencies and resource utilization to determine the optimal processor core of the task.

Benefits of technology

Improves system performance, reduces energy consumption, optimizes user experience, avoids overload or idle processor cores, and improves overall resource utilization and throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415276A_ABST
    Figure CN119415276A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of operating systems, in particular to a process scheduling method, system and equipment based on a heterogeneous multi-core processor, and the method comprises the following steps: monitoring and recording an operation behavior of a user in real time, and generating a log file of the user behavior; analyzing the log file of the user behavior by using a machine learning algorithm, and predicting the next operation behavior of the user; dynamically loading the application predicted to be used into a memory based on the prediction result; determining the optimal processor core of the task by comprehensively considering the execution time, energy consumption, dependency relationship and processor resource utilization rate of the task according to the prediction result in combination with the state of each processor core in the system and the current process scheduling strategy; and allocating different tasks to the corresponding optimal processor cores for execution. The overall performance of the system is improved, energy consumption is reduced, and optimization of energy efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of operating systems, and in particular to a process scheduling method, system and device based on a heterogeneous multi-core processor. Background Art

[0002] With the rapid advancement of integrated circuit technology, processor design has evolved from single-core to multi-core, and then to the current heterogeneous multi-core architecture. These processors integrate different types of cores, such as central processing units (CPUs), graphics processing units (GPUs), neural network processing units (NPUs), tensor processing units (TPUs), etc., to meet increasingly complex computing needs. These cores are each good at handling specific types of tasks, for example: CPU cores are good at logic control and general computing tasks; GPU cores are good at parallel processing and floating-point intensive tasks; NPU cores are optimized for machine learning and neural network reasoning; TPU cores focus on efficient execution of specific frameworks such as TensorFlow.

[0003] However, many existing operating system schedulers are designed based on traditional CPU architectures and do not take into account the particularities of heterogeneous multi-core processors, such as performance differences and energy consumption characteristics between cores. Existing schedulers often fail to recognize the specific advantages of different cores, resulting in the inability to effectively allocate tasks to the most suitable processing cores. In heterogeneous multi-core systems, resource allocation often lacks flexibility and cannot be dynamically adjusted according to real-time workloads and system status, resulting in some cores being overloaded while others are idle. Existing scheduling strategies may not fully consider energy consumption optimization, resulting in excessive energy consumption when executing tasks, especially in mobile and embedded devices, which can seriously affect the battery life of the device. Summary of the invention

[0004] In view of the problem of resource allocation in heterogeneous multi-core systems, the present invention provides a process scheduling method, system and device based on heterogeneous multi-core processors. The heterogeneous characteristics of the processor are fully utilized to improve system performance, reduce energy consumption, and optimize user experience. The core of the present invention is to achieve refined scheduling management of processes through behavior collection, behavior prediction, memory management and process scheduling strategy.

[0005] In a first aspect, the technical solution of the present invention provides a process scheduling method based on a heterogeneous multi-core processor, comprising: Monitor and record user operation behaviors in real time and generate log files of user behaviors; Use machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; Dynamically loading the application predicted to be used into memory based on the prediction result; According to the prediction results, combined with the status of each processor core in the system and the current process scheduling strategy, the optimal processor core for the task is determined by comprehensively considering the task's execution time, energy consumption, dependencies, and processor resource utilization; Assign different tasks to the corresponding optimal processor core for execution.

[0006] As a preferred embodiment of the technical solution of the present invention, the steps of real-time monitoring and recording the user's operation behavior and generating a log file of the user's behavior include: Capture user behavior through the operating system's API or hook function and record user operation data in a behavior log file; user operation data includes timestamp, application ID, operation type, and duration.

[0007] As a preferred embodiment of the technical solution of the present invention, the steps of analyzing the log files of user behavior using a machine learning algorithm and predicting the user's next operation behavior include: Process and analyze behavioral log files; Use machine learning algorithms to train the behavior prediction model and obtain trained model parameters; Load the latest model parameters and start monitoring user behavior in the system; when user behavior is detected, use the model parameters to predict the user's next operation and output the prediction results.

[0008] As a preferred embodiment of the technical solution of the present invention, the prediction result includes applications that may be started, data or files that may be accessed, and estimated resource requirements.

[0009] As a preferred embodiment of the technical solution of the present invention, the step of dynamically loading the application predicted to be used into the memory based on the prediction result includes: Evaluate the current state of the application in memory based on the prediction results; For applications that are predicted to be used soon but are not in the memory, the application data is preloaded from the hard disk to the memory through the DMA controller; For applications that are not currently needed, write the application data from the memory back to the hard disk to free up memory space.

[0010] As a preferred embodiment of the technical solution of the present invention, the step of determining the optimal processor core for a task by comprehensively considering the execution time, energy consumption, dependency, and processor resource utilization of the task based on the prediction result combined with the status of each processor core in the system and the current process scheduling strategy includes: Estimate the execution time of tasks, the energy consumption of tasks on the required processor energy consumption, the utilization rate of each processor resource and determine the task dependencies according to the status of the processor core and the current process scheduling strategy; Comprehensively consider the task execution time, processor energy consumption, task dependencies, and processor resource utilization to establish a multi-objective optimization function for task scheduling; The objective function is solved to find the optimal processor core for the task.

[0011] As a preferred embodiment of the technical solution of the present invention, the steps of respectively estimating the execution time of the task, the energy consumption of the task on the required processor energy consumption, the resource utilization rate of each processor and determining the task dependency relationship according to the state of the processor core and the current process scheduling strategy specifically include: The time required for task execution on different cores is estimated by the computational complexity of the task and the performance of the processing core; the execution time of task T on processor i is ; Among them, the computational complexity of the task is C, and the processing capacity of processor i is ; The power consumption of processor i is , then the energy consumption of task T on processor i is ; Current resource utilization of each processor ; in, is the amount of resources currently occupied by the processor, is the total processor resources; A directed acyclic graph is used to represent task dependencies. InDegree(T) represents the in-degree of task T in the directed acyclic graph. The dependencies between tasks in the directed acyclic graph can be defined as: , characterization task Depends on the task ; , characterization task Not task dependent .

[0012] As a preferred embodiment of the technical solution of the present invention, the steps of establishing a multi-objective optimization function for task scheduling by comprehensively considering the execution time of the task, the energy consumption of the processor, the task dependency, and the processor resource utilization include: Introducing weight parameters They represent the weights of the importance of task execution time, processor energy consumption, task dependency, and resource utilization, respectively. The objective function is as follows: .

[0013] In a second aspect, the technical solution of the present invention provides a process scheduling system based on a heterogeneous multi-core processor, including a process intelligent scheduling service, wherein the process intelligent scheduling service includes a behavior collection module, a behavior prediction module, a memory management module, a scheduling processing module and a process scheduling module; The behavior collection module monitors and records the user's operation behavior in real time and generates a log file of the user's behavior; The behavior prediction module uses machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; The memory management module dynamically loads the application predicted to be used into the memory based on the prediction result; The scheduling processing module determines the optimal processor core for the task based on the prediction results, the status of each processor core in the system and the current process scheduling strategy, and comprehensively considers the task's execution time, energy consumption, dependencies, and processor resource utilization; The process scheduling module assigns different tasks to the corresponding optimal processor core for execution.

[0014] As a preferred embodiment of the technical solution of the present invention, the behavior collection module captures user behavior through the API or hook function of the operating system and records user operation data in a behavior log file; the user operation data includes timestamp, application identifier, operation type, and duration.

[0015] As a preferred embodiment of the technical solution of the present invention, the behavior prediction module processes and analyzes the behavior log files; uses a machine learning algorithm to train the behavior prediction model to obtain trained model parameters; loads the latest model parameters and starts monitoring user behavior in the system; when user behavior is detected, uses the model parameters to predict the user's next operation behavior and outputs the prediction results.

[0016] As a preferred embodiment of the technical solution of the present invention, the prediction result includes applications that may be started, data or files that may be accessed, and estimated resource requirements.

[0017] As a preferred embodiment of the technical solution of the present invention, the memory management module evaluates the status of the application currently in the memory based on the prediction results; for applications predicted to be used soon but not in the memory, the application data is preloaded from the hard disk to the memory through the DMA controller; for applications that are not currently needed, the application data is written back from the memory to the hard disk to release memory space.

[0018] As a preferred embodiment of the technical solution of the present invention, the scheduling processing module estimates the execution time of the task, the energy consumption of the task on the required processor energy consumption, the resource utilization of each processor and determines the task dependency according to the status of the processor core and the current process scheduling strategy; comprehensively considers the execution time of the task, the energy consumption of the processor, the task dependency, and the processor resource utilization, and establishes a multi-objective optimization function for task scheduling; solves the objective function to find the optimal processor core for the task.

[0019] As a preferred embodiment of the technical solution of the present invention, the scheduling processing module is specifically used to estimate the time required for the task to be executed on different cores based on the computational complexity of the task and the performance of the processing core; the execution time of task T on processor i is ; Among them, the computational complexity of the task is C, and the processing capacity of processor i is ; The power consumption of processor i is , then the energy consumption of task T on processor i is ; Current resource utilization of each processor ; in, is the amount of resources currently occupied by the processor, is the total processor resources; A directed acyclic graph is used to represent task dependencies. InDegree(T) represents the in-degree of task T in the directed acyclic graph. The dependencies between tasks in the directed acyclic graph can be defined as: , characterization task Depends on the task ; , characterization task Not task dependent .

[0020] As a preferred embodiment of the technical solution of the present invention, the scheduling processing module comprehensively considers the execution time of the task, the energy consumption of the processor, the task dependency, and the processor resource utilization, and establishes a multi-objective optimization function for task scheduling: .

[0021] Weight Parameters They represent the importance of task execution time, processor energy consumption, task dependency, and resource utilization respectively.

[0022] In a third aspect, the technical solution of the present invention also provides an electronic device, comprising multiple processor cores and a memory communicatively connected to the multiple processor cores; the memory stores computer program instructions that can be executed by the multiple processor cores, and the computer program instructions are executed by at least one processor core so that the at least one processor core can execute the process scheduling method based on a heterogeneous multi-core processor as described in the first aspect.

[0023] The beneficial effects of the technical solution of the present invention are as follows: by real-time monitoring and recording of user operation behaviors, and generating log files based on these behavior patterns, the system can more accurately predict the user's next operation. This predictive scheduling enables the applications required by the user to be loaded into the high-speed memory in advance, reducing the delay time of application startup. The analysis of log files using machine learning algorithms not only improves the accuracy of predictions, but also enables the system to dynamically adjust and optimize resource allocation. By loading the applications predicted to be used into the high-speed memory in advance, the performance bottleneck caused by frequent access to slow storage devices (such as hard disks) is reduced. At the same time, according to the prediction results combined with the state of the processor core and the current process scheduling strategy, the system can more reasonably allocate tasks to the optimal processor core for execution by comprehensively considering the execution time, energy consumption, dependencies and processor resource utilization of the tasks. This not only improves the overall performance of the system, but also reduces energy consumption and achieves energy efficiency optimization.

[0024] This method can make the best decision based on the real-time situation, whether it is processing a single task or multiple tasks in parallel. By comprehensively considering the execution time, energy consumption, dependencies and processor resource utilization of the tasks, the processor resources can be used more efficiently. This avoids the situation where some processor cores are overloaded while other cores are idle, improving overall resource utilization and throughput. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0026] Figure 1 A schematic flow chart of a method provided in an embodiment of the present invention.

[0027] Figure 2 It is a schematic diagram of the process of single training in the model training in an embodiment of the present invention.

[0028] Figure 3 A schematic block diagram of a system provided by the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in this specific embodiment. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] like Figure 1 As shown, an embodiment of the present invention provides a process scheduling method based on a heterogeneous multi-core processor, comprising: Step 1: Monitor and record user operation behaviors in real time, and generate log files based on user behavior patterns; In this step, user behavior is captured through the operating system's API or hook function and user operation data is recorded in a behavior log file; the user operation data includes timestamp, application identifier, operation type, and duration.

[0031] Step 2: Use machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; Specifically, process and analyze behavior log files; use machine learning algorithms to train behavior prediction models and obtain trained model parameters; load the latest model parameters and start monitoring user behavior in the system; when user behavior is detected, use the model parameters to predict the user's next operation behavior and output the prediction results.

[0032] Take the recurrent neural network RNN ​​as an example: Figure 2 As shown in Figure 1, the specific implementation steps of behavior prediction model training are as follows: Step 21: Data preprocessing: Clean and format the user's behavior log data and convert it into sequence data suitable for model training.

[0033] It should be noted that the purpose of data preprocessing is to convert the original user behavior log data into a format suitable for model training, remove noise and invalid data, and provide clean and standardized data for subsequent feature extraction and model training.

[0034] Assume that the user behavior log is represented as ,in Indicates that at time step The cleaning in this step involves removing duplicate records, correcting incorrect formats, and processing missing values. Formatting is to unify the data into a form suitable for model input, such as organizing it into a time series format so that the subsequent model can capture the change pattern of behavior over time.

[0035] Step 22: Feature extraction: Extract useful features from the preprocessed sequence data, convert and encode the extracted features, and divide the processed data into data sets; divided into training sets, validation sets, and test sets.

[0036] This step actually mines valuable information for behavior prediction from the preprocessed sequence data and converts it into feature representations suitable for model processing. At the same time, the data is divided into training sets, validation sets, and test sets for model training, tuning, and evaluation.

[0037] Useful features extracted from preprocessed sequence data include application access frequency, execution order between applications, and time characteristics of application access; specifically, they include: The number of times a user visits each application within a set time is counted in the preprocessed sequence data, that is, the application access frequency, which can reflect the user's usage preference for different applications.

[0038] The order in which users start applications during use, that is, the execution order between applications, is extracted from the preprocessed sequence data, which helps capture users' behavior patterns and workflows.

[0039] The time features of accessing the application are extracted from the preprocessed sequence data, such as different time periods of the day, different days of the week, etc. This time information may be related to the user's behavioral habits.

[0040] Convert and encode the extracted features, including standardization of time series features and one-hot encoding of categorical features; Standardize the time series features to have zero mean and unit variance; For categorical features, one-hot encoding is used to convert them into vector form so that each category has a unique vector representation.

[0041] Suppose there is a dataset containing categorical features, such as a column that records user occupations. The data can be represented by a pandas DataFrame. It is necessary to identify all possible values ​​of the categorical feature. In pandas, you can use the unique() method to get unique values. Create a unique code for each category, usually an integer starting from 0. The get_dummies() method of pandas can directly perform one-hot encoding on categorical data.

[0042] Step 23: Initialize Neural Network Parameters: Using Gaussian Distribution Initialize weight W and bias b; where Dynamically adjust the number of nodes in the input layer and hidden layer to avoid overfitting or underfitting. Introduce L1 or L2 regularization terms into the loss function to reduce model complexity and improve generalization ability. Among them, L1 regularization will make some weights become 0, thereby achieving feature selection; L2 regularization is to square the weights to make the overall weight value smaller, avoid the model being too complex, and improve the generalization ability of the model.

[0043] Step 24: Forward propagation: Based on the given input data, the hidden state is propagated in the RNN , and calculate the predicted value of the model layer by layer.

[0044] Hidden State The calculation formula is as follows:

[0045] in, is the input at time step t, is the weight matrix from the input layer to the hidden layer, is the weight matrix from hidden layer to hidden layer, is the bias of the hidden layer, and the tanh() function is used as the activation function to map the result of the linear combination to between -1 and 1.

[0046] Starting from the input layer, the input data With the corresponding weight matrix Multiply and add the output of the hidden layer at the previous moment With the weight matrix The product of , the hidden state at the current moment is obtained through the activation function tanh() This process is carried out sequentially along the time series until the last time step. The hidden state of the last time step is After linear transformation (multiplying by the output layer weight matrix and adding the bias), the result of the output layer is obtained, which is the predicted value of the model.

[0047] Step 25: Loss function calculation: measure the difference between the model prediction results and the actual user behavior, and calculate the gradient of the loss function with respect to each parameter through back propagation; This application uses L2 regularization, and the loss function L formula is as follows:

[0048] In the formula, It is The loss of a task, is the weight coefficient, which is used to adjust the relative importance of different task losses in the total loss; is the regularization strength hyperparameter, which controls the influence of the regularization term on the loss function. Represents the weight parameters in the neural network. is an index variable used to traverse all weight parameters in the neural network; it should be noted that the neural network contains multiple weight matrices, and in the RNN there is a weight matrix input to the hidden layer And the weight matrix from hidden layer to hidden layer . Each element in these matrices is a weight parameter.

[0049] Through the back-propagation algorithm, the gradient of the loss function relative to each parameter is calculated by transferring it from the output layer to the input layer.

[0050] Step 26: Update parameters: Update the weights and biases in the neural network based on the gradient information obtained by back propagation; In this step, the gradient descent optimization algorithm is used to update the weights and biases. The formula is as follows: and

[0051] In the formula, and are the updated weights and biases, and is the gradient of the loss function with respect to the weights and biases, is the learning rate, and They are the weights and biases before updating, which control the step size of each parameter update.

[0052] Steps 24 to 26 are repeatedly performed on the user behavior log training dataset until the stopping condition is met, such as the maximum number of iterations, the loss no longer significantly decreases, or the validation set performance no longer improves.

[0053] After training is complete, use an independent test set of user behavior logs to evaluate the generalization ability of the model. If the model performs poorly, adjust the architecture design, hyperparameter selection, or try different training strategies and retrain the model. Through this iterative process, the neural network learns the mapping relationship between input data and expected output in order to make accurate predictions on new, unseen data.

[0054] Since model parameters vary according to different user behavior patterns, they are usually automatically generated by the machine learning framework after model training is completed; for example: Weight vector w=[0.5, -0.2, 0.8], bias term b= 0.1; The prediction results include applications that may be started, data or files that may be accessed, and estimated resource requirements.

[0055] Step 3: Dynamically load the application predicted to be used into the memory based on the prediction result; The status of the current application in the memory is evaluated based on the prediction results; for applications that are predicted to be used soon but are not in the memory, the application data is preloaded from the hard disk to the memory through the DMA controller; for applications that are not currently needed, the application data is written back from the memory to the hard disk to free up memory space.

[0056] Step 4: Based on the prediction results, combined with the status of each processor core in the system and the current process scheduling strategy, the optimal processor core for the task is determined by comprehensively considering the task's execution time, energy consumption, dependencies, and processor resource utilization; this step specifically includes: Step 41: Estimate the execution time of the task, the energy consumption of the task on the required processor energy consumption, the utilization rate of each processor resource and determine the task dependency according to the status of the processor core and the current process scheduling policy; The time required for task execution on different cores is estimated by the computational complexity of the task and the performance of the processing core; the execution time of task T on processor i is ; Among them, the computational complexity of the task is C, and the processing capacity of processor i is ; It should be noted that the task is benchmarked under different input scales and the execution time is recorded. For example, for a data compression task, compression tests are performed using data sets of different sizes to obtain a curve showing the relationship between execution time and data set size. By fitting the curve, a function expression of computational complexity and input data size is obtained to determine the computational complexity C of the task. Processor manufacturers usually provide some theoretical performance indicators, such as floating-point operations per second (FLOPS). For processors that support floating-point operations, FLOPS can be used as an important indicator to measure their processing power. For example, some GPU processors will clearly give their single-precision (FP32) and double-precision (FP64) FLOPS values. The processing power of the processor can be estimated based on the operation type of the task (floating-point operations or integer operations, etc.) combined with these indicators. .

[0057] The power consumption of processor i is , then the energy consumption of task T on processor i is ; Current resource utilization of each processor ; in, is the amount of resources currently occupied by the processor, is the total processor resources; Construct a directed acyclic graph data structure and use it to represent task dependencies. InDegree(T) represents the in-degree of task T in the directed acyclic graph. The dependencies between tasks in the directed acyclic graph can be defined as: , characterization task Depends on the task ; , characterization task Not task dependent .

[0058] Insert all the tasks running in the system as nodes into the directed acyclic graph, establish connections between nodes based on the dependencies between each task, and then insert the task T predicted to be executed into the directed acyclic graph, obtain the in-degree of node T, if the in-degree is zero, then InDegree(T) = 0; if the in-degree is not zero, then InDegree(T) = 1.

[0059] Step 42: comprehensively consider the task execution time, processor energy consumption, task dependency, and processor resource utilization, and establish a multi-objective optimization function for task scheduling; Introducing weight parameters They represent the importance of task execution time, processor energy consumption, task dependency, and resource utilization respectively. Different combinations of weight parameters represent different process scheduling strategies. The objective function is as follows: .

[0060] Step 43: Solve the objective function to find the optimal processor for the task, and assign the task to the corresponding processor.

[0061] Determine the processor set and calculate the execution time of the task on each processor in the processor set , Energy consumption , the in-degree InDegree(T) corresponding to the task dependency (if the task is assigned to this processor, it is determined according to the task dependency graph) and the resource utilization of the processor ,calculate The value of the function is found The processor with the smallest value.

[0062] Step 5: Allocate different tasks to the corresponding optimal processor core for execution.

[0063] That is, calculate the values ​​of different tasks executed on different processor cores (such as CPU, GPU, NPU, MCU), and find the optimal solution, that is, the minimum value. For example, for a task task1, according to the above formula, the value of task1 executed on cpu core1 is 10, the value executed on CPU core2 is 8, ..., and the values ​​executed on all processor cores are calculated in sequence; the minimum value is 3, which is obtained when executing on GPU core2. Then the task is scheduled to GPU core2 for execution.

[0064] like Figure 3 As shown, an embodiment of the present invention provides a process scheduling system based on a heterogeneous multi-core processor, including a process intelligent scheduling service, wherein the process intelligent scheduling service includes a behavior collection module, a behavior prediction module, a memory management module, a scheduling processing module and a process scheduling module; The behavior collection module monitors and records the user's operation behavior in real time and generates a log file of the user's behavior; the behavior collection module is responsible for real-time monitoring and recording the user's operation behavior, including but not limited to application startup, file access, network request, etc. This module can generate detailed log files based on user behavior patterns to provide data support for subsequent behavior prediction; The behavior prediction module uses machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; the module uses machine learning algorithms to analyze user behavior logs and predict the user's next operation behavior. Based on the user's usage habits, this module can predict the application that the user may start next, so as to allocate and schedule resources in advance.

[0065] The memory management module dynamically loads the predicted applications into the memory based on the prediction results; according to the output of the behavior prediction module, the predicted applications are dynamically migrated from slow storage (such as hard disk) to fast storage (such as DDR memory). This module is implemented through direct memory access (DMA) technology to optimize the data migration process and reduce the CPU load.

[0066] The scheduling processing module determines the optimal processor core for the task based on the prediction results, the status of each processor core in the system and the current process scheduling strategy, and comprehensively considers the task's execution time, energy consumption, dependencies, and processor resource utilization; The process scheduling module assigns different tasks to the corresponding optimal processor core for execution.

[0067] The process scheduling method based on the system provided by the present invention includes: S1: After the user logs in to the system, the behavior collection module starts working, recording the user's behavior characteristics and forming a behavior log file. These log files will be synchronized to the cloud server regularly for further analysis and model training.

[0068] A behavior collection module is integrated into the operating system and automatically starts after the user logs in.

[0069] This module captures user behaviors such as application startup, file operations, network requests, etc. through the operating system's API or hook functions.

[0070] The recorded data includes timestamp, application ID, operation type, duration, etc., and these data are stored in the behavior log file.

[0071] Set up scheduled tasks to upload behavior log files to the cloud server at regular intervals, such as performing synchronization operations every morning.

[0072] S2: After receiving the behavior log file, the cloud server uses advanced data analysis and machine learning technology to train the behavior prediction model and regularly update the model parameters in the client operating system. This step ensures the accuracy and real-time performance of the model.

[0073] Deploy a machine learning platform on a cloud server to process and analyze behavior log files.

[0074] Use classification algorithms, clustering algorithms, sequence prediction models to train behavior prediction models, such as random forests, support vector machines, or recurrent neural networks (RNNs).

[0075] Retrain the model regularly (e.g. weekly or monthly) using newly collected data to adapt to changes in user behavior. Send the trained model parameters to the user device through a secure channel to update the local behavior prediction parameters.

[0076] S3: As the key hardware for intelligent scheduling, the NPU processing core obtains the latest model parameters at the current moment and infers the possible behavior of the user at the next moment based on the user behavior at the current moment. This step uses the efficient computing power of the NPU to achieve fast and accurate prediction.

[0077] The NPU core loads the latest model parameters and starts monitoring user behavior in the system.

[0078] When user behavior is detected, the NPU core uses the model parameters to predict the user's next possible action.

[0079] The prediction results include applications that may be launched, data or files that may be accessed, and estimated resource requirements.

[0080] S4: The memory management module loads the applications that are predicted to be executed into the DDR high-speed memory in advance according to the prediction results of the NPU core, and migrates the unnecessary applications in the current DDR memory back to the hard disk. This step is implemented through memory management and DMA controller, which reduces the waiting time for application startup.

[0081] S5: The scheduling processing module takes into account the execution time, energy consumption, dependency, processor resource utilization, etc. of the task based on the output of the behavior prediction module, combined with the status of each processor core in the system and the current process scheduling strategy; S6: The process scheduling module assigns different tasks to the optimal processor core for execution, ensuring efficient execution of tasks and optimal energy efficiency of the system.

[0082] The process scheduling module adopts a multi-objective optimization scheduling strategy based on the prediction results of the NPU core, combined with the status of each processing core in the system and the process scheduling strategy of the current system, and performs scheduling decision analysis from four dimensions: task execution time, processor energy consumption, task dependency, and processor resource utilization.

[0083] (1) Task execution time estimation First, we estimate the time required to execute the task on different cores by considering the computational complexity of the task and the performance of the processing core. Assume that the computational complexity of the task is C and the processing power of processor i is , then the execution time of task T on processor i is:

[0084] Where: C is the computational complexity of the task (which can be estimated based on the number of floating-point operations or instructions of the task); It is the processing performance of processor i, usually expressed in the number of instructions executed per second (MIPS) or floating-point operations per second (FLOPS).

[0085] (2) Energy consumption estimation In order to optimize the energy consumption of the system, the task allocation needs to consider the power consumption characteristics of the processor. Assume that the power consumption of processor i is , then the energy consumption of task T on processor i is It can be estimated by the following formula:

[0086] When assigning tasks, the system needs to consider not only the execution time but also the energy consumption as much as possible.

[0087] (3) Task dependencies In a complex system, there may be dependencies between different tasks, resulting in the execution order of a task being restricted by the completion of other tasks. The task dependencies are represented using a directed acyclic graph in graph theory. InDegree(T) represents the in-degree of task T in the directed acyclic graph. The dependencies between tasks in the graph can be defined as: , / / Task Depends on the task ; , / / Task Not task dependent .

[0088] The scheduling order based on dependencies can be determined by topological sorting to ensure that all dependencies are met before executing the corresponding tasks. This can avoid waiting time caused by task dependencies and improve the overall efficiency of the system.

[0089] (4) Processor resource utilization In the scheduling process, the resource utilization of the processor is also a key factor in determining the scheduling effect. The current resource utilization of each processor is dynamically calculated using the following formula: :

[0090] in is the amount of resources currently occupied by the processor, It is the total amount of processor resources. Processors with low resource utilization should be prioritized during scheduling to ensure balanced use of resources and prevent a single processor from being overloaded.

[0091] Taking into account the execution time, energy consumption, dependencies, and processor resource utilization of tasks, the task scheduling problem is modeled as a multi-objective optimization problem. The weight parameter is introduced They represent the importance of execution time, energy consumption, dependency, and resource utilization respectively. Different combinations of weight parameters represent different process scheduling strategies. The objective function is as follows:

[0092] The CPU core calls the GPU core to accelerate the execution of the objective function, and solves it through heuristic algorithms (such as genetic algorithms and particle swarm algorithms), using the parallelism of the GPU core to quickly find the optimal solution among multiple objectives. Each task is assigned to the appropriate processor to meet the requirements of optimal execution time, energy consumption, dependencies, and resource utilization.

[0093] Through the above implementation, the process intelligent scheduling service of the present invention can significantly improve the response speed and processing efficiency of the system, while reducing energy consumption and improving user experience. Through the collaborative work of the above modules and steps, the present invention realizes the optimization of process scheduling of heterogeneous multi-core processors, improves the response speed and processing efficiency of the system, while reducing energy consumption and improving user experience.

[0094] The embodiment of the present invention also provides an electronic device, the electronic device comprising: a plurality of processor cores; and a memory connected to the plurality of processor cores in communication; the memory stores computer program instructions that can be executed by the plurality of processor cores, wherein the processor cores and the memory communicate with each other through a communication bus. The processor core can call the logic instructions in the memory to execute the following method: real-time monitoring and recording of user operation behaviors, and generating a log file of user behavior; using a machine learning algorithm to analyze the log file of user behavior and predict the user's next operation behavior; dynamically loading the application predicted to be used into the memory based on the prediction results; according to the prediction results, combined with the status of each processor core in the system and the current process scheduling strategy, comprehensively considering the execution time, energy consumption, dependency, and processor resource utilization of the task, determining the optimal processor core for the task; and allocating different tasks to the corresponding optimal processor core for execution.

[0095] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

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

Claims

1. A process scheduling method based on a heterogeneous multi-core processor, characterized in that: include: Monitor and record user operation behaviors in real time and generate log files of user behaviors; Use machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; Dynamically loading the application predicted to be used into memory based on the prediction result; According to the prediction results, combined with the status of each processor core in the system and the current process scheduling strategy, the optimal processor core for the task is determined by comprehensively considering the task's execution time, energy consumption, dependencies, and processor resource utilization; Assign different tasks to the corresponding optimal processor core for execution.

2. The process scheduling method based on heterogeneous multi-core processor according to claim 1, characterized in that: The steps of real-time monitoring and recording of user operation behaviors and generating log files of user behaviors include: Capture user behavior through the operating system's API or hook function and record user operation data in a behavior log file; user operation data includes timestamp, application ID, operation type, and duration.

3. The process scheduling method based on heterogeneous multi-core processor according to claim 2 is characterized in that: The steps of using machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior include: Process and analyze behavioral log files; Use machine learning algorithms to train the behavior prediction model and obtain trained model parameters; Load the latest model parameters and start monitoring user behavior in the system; when user behavior is detected, use the model parameters to predict the user's next operation and output the prediction results.

4. The process scheduling method based on heterogeneous multi-core processor according to claim 3 is characterized in that: The prediction results include applications that may be started, data or files that may be accessed, and estimated resource requirements.

5. The process scheduling method based on heterogeneous multi-core processor according to claim 4 is characterized in that: The steps for dynamically loading the application to be used in the prediction into memory based on the prediction results include: Evaluate the current state of the application in memory based on the prediction results; For applications that are predicted to be used soon but are not in the memory, the application data is preloaded from the hard disk to the memory through the DMA controller; For applications that are not currently needed, write the application data from the memory back to the hard disk to free up memory space.

6. The process scheduling method based on heterogeneous multi-core processor according to claim 5, characterized in that: The steps of determining the optimal processor core for a task by comprehensively considering the execution time, energy consumption, dependency, and processor resource utilization of the task based on the prediction results, the status of each processor core in the system, and the current process scheduling strategy include: Estimate the execution time of tasks, the energy consumption of tasks on the required processor energy consumption, the utilization rate of each processor resource and determine the task dependencies according to the status of the processor core and the current process scheduling strategy; Comprehensively consider the task execution time, processor energy consumption, task dependencies, and processor resource utilization to establish a multi-objective optimization function for task scheduling; Solve the objective function to find the optimal processor core for the task.

7. The process scheduling method based on heterogeneous multi-core processor according to claim 6, characterized in that: The steps of respectively estimating the execution time of the task, the energy consumption of the task on the required processor energy consumption, the resource utilization of each processor and determining the task dependency according to the status of the processor core and the current process scheduling strategy include: The time required for task execution on different cores is estimated by the computational complexity of the task and the performance of the processing core; the execution time of task T on processor i is ; Among them, the computational complexity of the task is C, and the processing capacity of processor i is ; The power consumption of processor i is , then the energy consumption of task T on processor i is ; Current resource utilization of each processor ; in, is the amount of resources currently occupied by the processor, is the total processor resources; A directed acyclic graph is used to represent task dependencies. InDegree(T) represents the in-degree of task T in the directed acyclic graph. The dependencies between tasks in the directed acyclic graph can be defined as: , characterization task Depends on the task ; , characterization task Not task dependent .

8. The process scheduling method based on heterogeneous multi-core processor according to claim 7, characterized in that: Taking into account the task execution time, processor energy consumption, task dependencies, and processor resource utilization, the steps to establish a multi-objective optimization function for task scheduling include: Introducing weight parameters They represent the weights of the importance of task execution time, processor energy consumption, task dependency, and resource utilization, respectively. The objective function is as follows: 。 9. A process scheduling system based on heterogeneous multi-core processors, characterized in that: It includes a process intelligent scheduling service, which includes a behavior collection module, a behavior prediction module, a memory management module, a scheduling processing module and a process scheduling module; The behavior collection module monitors and records the user's operation behavior in real time and generates a log file of the user's behavior; The behavior prediction module uses machine learning algorithms to analyze user behavior log files and predict the user's next operation behavior; The memory management module dynamically loads the application predicted to be used into the memory based on the prediction result; The scheduling processing module determines the optimal processor core for the task based on the prediction results, the status of each processor core in the system and the current process scheduling strategy, and comprehensively considers the task's execution time, energy consumption, dependencies, and processor resource utilization; The process scheduling module assigns different tasks to the corresponding optimal processor core for execution.

10. An electronic device, characterized in that: The electronic device includes a plurality of processor cores, and a memory communicatively connected to the plurality of processor cores; The memory stores computer program instructions that can be executed by multiple processor cores, and the computer program instructions are executed by at least one processor core so that the at least one processor core can execute the process scheduling method based on a heterogeneous multi-core processor as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Application program prediction model establishment and preloading method and device, medium and terminal

    CN109766138A

  • Energy consumption optimization method, system and device of heterogeneous multi-core processor and storage medium

    CN114895773A

  • Application preloading method, application starting method and electronic equipment

    CN116048648A

  • Cloud resource automatic allocation system

    CN118363765A

  • Multitask parallel processing system for digital business hall equipment terminal

    CN118409847A

Cited By

  • Hybrid deployment method for heterogeneous multi-core chip application program

    CN119883650A

  • Data processing method, data processing device, electronic equipment and storage medium

    CN119902874A

  • Data Processing Method, Data Processing Device, Electronic Device, and Storage Medium

    CN119902874B

  • Process-level power consumption analysis method and device, electronic equipment and storage medium

    CN121412076A

  • Intelligent task scheduling method and system for heterogeneous multi-core embedded system

    CN121879920A