A method and system for dynamically optimizing power consumption of parallel processors
Through the multimodal feature fusion and attention mechanism enhanced high-precision power consumption prediction model, combined with intelligent adaptive scheduling strategy, the problem of high power consumption of parallel processors is solved, dynamic optimization of power consumption and stable performance maintenance are achieved, and hardware life is extended.
Patent Information
- Application Number
- CN202510510969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-04-23
AI Technical Summary
The high power consumption problem of existing parallel processors during high-performance operation is difficult to effectively solve through static parameter adjustment and simple feedback control, and lacks accurate prediction and dynamic response capabilities for future power consumption requirements, resulting in increased energy consumption and shortened hardware life.
A high-precision power consumption prediction model enhanced by multimodal feature fusion and attention mechanism is adopted, combined with CNN and LSTM, the voltage, frequency and task allocation of the parallel processor are adjusted in real time through intelligent adaptive scheduling strategies to achieve dynamic optimization of power consumption.
It realizes accurate prediction and dynamic optimization of parallel processor power consumption, reduces energy consumption, extends hardware life, and maintains user experience in fields such as high-performance computing and gaming entertainment.
Smart Images

Figure CN120029436B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics processing and energy efficiency management, and in particular to a method and system for dynamically optimizing power consumption of a parallel processor. Background Art
[0002] With the rapid development of computer graphics processing technology, parallel processors have become a core driver in high-performance computing, gaming and entertainment, artificial intelligence, and other fields. However, the high power consumption of parallel processors during high-performance operation is becoming increasingly prominent. This not only significantly increases energy consumption and operating costs, but can also shorten hardware lifespan due to problems such as overheating. Current parallel processor power management technologies on the market are mostly limited to static parameter adjustments or simple feedback control. They lack the ability to accurately predict future power consumption requirements and dynamically respond to them, making them difficult to adapt to complex and changing real-world application scenarios. Summary of the Invention
[0003] The technical task of the present invention is to address the above shortcomings and provide a method and system for dynamic optimization of parallel processor power consumption, which can effectively reduce power consumption and maintain stable performance, and is particularly suitable for complex computing scenarios with extremely high energy consumption and performance requirements.
[0004] The technical solution adopted by the present invention to solve its technical problem is:
[0005] A parallel processor power consumption dynamic optimization method is proposed, which realizes a high-precision power consumption prediction model based on multimodal feature fusion and attention mechanism enhancement.
[0006] The multimodal features include application code features and user operation behavior features. The application code features can reflect the complexity and resource requirements of the application, and the user operation behavior features can reflect the user's usage habits and performance requirements.
[0007] The attention mechanism is enhanced. Based on the combination of CNN and LSTM, an attention mechanism is introduced. The attention mechanism can automatically assign different weights to different input features, so that the model pays more attention to features that have a greater impact on power consumption prediction;
[0008] The implementation of this method includes the following steps:
[0009] (1) Data collection and preprocessing;
[0010] (2) Model training and optimization;
[0011] (3) Implementation of intelligent adaptive scheduling.
[0012] This method uses advanced algorithms to accurately predict the power consumption requirements of parallel processors, and adjusts their working status in real time through intelligent scheduling, thereby effectively reducing power consumption and maintaining stable performance. It is particularly suitable for complex computing scenarios with extremely high energy consumption and performance requirements.
[0013] Furthermore, the data collection and preprocessing specifically include:
[0014] Data collection: Regularly collects parallel processor operating data through the parallel processor's monitoring interface, the operating system's API, and application log records. The collected information includes general data, application code features, and user operation behavior characteristics.
[0015] Data cleaning: The collected raw data may contain noise, outliers, or missing values. Data cleaning techniques, such as deduplication, missing value filling, and smoothing, are used to ensure data accuracy and completeness. At the same time, corresponding cleaning algorithms are used to remove invalid information based on newly collected code features and user operation behavior characteristics.
[0016] Data normalization: To eliminate the impact of different dimensions on model training, the cleaned data is normalized and all feature values are scaled to the same scale, usually by mapping the data to the interval [0, 1] or [-1, 1]. For code features and user operation behavior features, a normalization method adapted to their data characteristics is adopted.
[0017] Furthermore, the general data includes: CPU usage, parallel processor usage, video memory occupancy, temperature, voltage, power consumption, and currently running applications and task types;
[0018] The code feature data of the application includes code complexity, function call frequency, etc.;
[0019] The user operation behavior characteristic data includes: operation frequency, operation time interval, etc.
[0020] Furthermore, the model training and optimization are specifically implemented as follows:
[0021] (2.1) Data division:
[0022] The preprocessed data is divided into three parts according to a certain ratio (such as 70% training set, 15% validation set, and 15% test set) for model training, validation, and testing;
[0023] (2.2) Model structure design:
[0024] The model uses a CNN-LSTM architecture and introduces an attention mechanism. The CNN layer contains multiple convolutional layers and pooling layers to extract spatial features. The LSTM layer contains multiple LSTM units to capture long-term dependencies in time series. The attention layer follows the LSTM layer and assigns weights to different input features.
[0025] (2.3) Loss function definition:
[0026] The mean squared error (MSE) is used as the loss function to evaluate the difference between the model prediction value and the true value;
[0027] (2.4) Training process:
[0028] Initialization: Randomly initialize model weights and biases;
[0029] Forward propagation: input the training set data into the model, perform forward propagation through the CNN and LSTM layers, and calculate the predicted value;
[0030] Calculate loss: Use the MSE loss function to calculate the error between the predicted value and the true value;
[0031] Backpropagation: Use gradient descent methods (such as the Adam optimizer) to perform backpropagation, calculate the gradient of the loss function with respect to the model parameters, and update the model parameters to minimize the loss;
[0032] Batch Normalization: Add a batch normalization layer after each convolutional layer or LSTM layer to speed up the training process and improve model stability;
[0033] Validation and Adjustment: After each training cycle (epoch), the performance of the model is evaluated using the validation set data. If the loss on the validation set begins to increase (i.e., overfitting occurs), early stopping is used to stop training and return the model with the best validation performance.
[0034] (2.5) Hyperparameter tuning:
[0035] Use grid search or random search to search for the optimal hyperparameter combination within a predefined parameter space, including learning rate, batch size, number and parameters of CNN and LSTM layers, parameters of attention layers, etc.
[0036] Evaluate the performance of the model under different hyperparameter combinations and select the combination with the lowest validation set loss as the final model parameters.
[0037] Furthermore, the intelligent adaptive scheduling implementation includes multi-objective optimization scheduling and real-time risk assessment,
[0038] The multi-objective optimization scheduling simultaneously considers power consumption, performance, and hardware lifespan. When dynamically adjusting key parameters of the parallel processor, including voltage and frequency, and optimizing task allocation, a multi-objective optimization algorithm is used to find the optimal balance between the three objectives. For example, while ensuring a certain performance, power consumption can be reduced as much as possible while avoiding hardware overuse and extending hardware lifespan.
[0039] The real-time risk assessment evaluates the operating risks of the parallel processor in real time, including overheating and overload. When potential risks are detected, the scheduling strategy immediately takes corresponding measures, including quickly reducing voltage and frequency, urgently migrating high-risk tasks, etc. At the same time, according to the severity and type of the risk, the parameters of the scheduling strategy are dynamically adjusted to ensure that the parallel processor operates in a safe and stable state.
[0040] Furthermore, the intelligent adaptive scheduling implementation specifically includes:
[0041] Power consumption prediction module: During the operation of the parallel processor, the current operating status information is collected in real time and input into the trained power consumption prediction model. The model outputs the predicted power consumption value and its confidence interval for a specified time period in the future. At the same time, based on newly collected code features and user operation behavior characteristics, the prediction results are further refined to improve the accuracy of the prediction.
[0042] Parameter Adjustment Module: Intelligently adjusts the voltage and frequency of the parallel processor based on predicted power consumption. If high power consumption is predicted, the voltage and frequency are lowered in advance to reduce power consumption; otherwise, they are increased to improve performance. Based on the parallel processor's temperature limits, hardware lifespan, and performance requirements, the adjusted parameters are ensured to be within a safe range. The magnitude and speed of parameter adjustments are dynamically adjusted based on real-time risk assessment results.
[0043] Task allocation module: When a parallel processor reaches a set power consumption limit or performance bottleneck threshold, some high-power tasks are migrated to other idle or low-power parallel processors for execution based on the current task's importance, urgency, code characteristics, and user operation behavior. This requires the system to have task scheduling and communication capabilities across parallel processors, while also being able to quickly and accurately assess the cost and benefits of task migration.
[0044] Self-learning mechanism: Continuously optimizes and adjusts scheduling policy parameters based on actual operational results. For example, by recording power consumption changes, performance, hardware status, and user feedback after each adjustment, the system can gradually optimize the scheduling policy, improving its adaptability and robustness to different application scenarios.
[0045] Furthermore, the method integrates hardware and software into a design, integrating a power consumption optimization acceleration module into the parallel processor hardware. This module is used to implement parallel processing power consumption prediction and scheduling algorithms, greatly improving the system's response speed. At the same time, the acceleration module adopts a low-power design, which improves performance without increasing excessive power consumption. It also provides an intelligent configuration engine through which users input their needs and preferences, such as prioritizing power reduction or performance improvement. The intelligent configuration engine automatically adjusts the parameters of the prediction model and scheduling algorithm based on the user's input to achieve personalized power consumption optimization. The specific implementation is as follows:
[0046] Firmware and driver modification: Integrate the prediction model and scheduling algorithm into the parallel processor's firmware and driver. Modify the parallel processor's underlying control logic to ensure that the prediction model and scheduling algorithm can obtain the parallel processor's operating status in real time and perform corresponding optimization operations. At the same time, integrate the hardware acceleration module and intelligent configuration engine into the firmware and driver to achieve collaborative work between software and hardware.
[0047] System testing: Conduct system testing in a variety of real-world scenarios, including high-load gaming, large-scale data processing, and deep learning training. Verify the effectiveness of system optimization by comparing power consumption, performance, hardware temperature, and stability indicators before and after optimization. Collect user feedback and opinions to further optimize and improve the system.
[0048] Performance evaluation: In addition to the power consumption optimization effect, its impact on parallel processor performance also needs to be evaluated. By comparing performance indicators before and after optimization, including frame rate, response time, task completion time, etc., we can ensure that the system does not significantly reduce the user experience while reducing power consumption. At the same time, we evaluate the system's impact on hardware lifespan to ensure the stability and reliability of the hardware during long-term operation.
[0049] The present invention also claims protection for a parallel processor power consumption dynamic optimization system, including a data acquisition and preprocessing module, a model training and optimization module, and an intelligent adaptive scheduling module. The system implements the training and optimization of a high-precision power consumption prediction model based on multimodal feature fusion and attention mechanism enhancement, and implements dynamic optimization of the parallel processor power consumption based on the high-precision power consumption prediction model;
[0050] The system specifically implements dynamic optimization of parallel processor power consumption through the above method.
[0051] The present invention also claims protection for a device for dynamically optimizing power consumption of a parallel processor, comprising: at least one memory and at least one processor;
[0052] The at least one memory is configured to store a machine-readable program;
[0053] The at least one processor is configured to call the machine-readable program to implement the above method.
[0054] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which implement the above method when executed by a processor.
[0055] Compared with the prior art, the method and system for dynamic optimization of power consumption of parallel processors of the present invention have the following beneficial effects:
[0056] By introducing deep learning prediction models and intelligent scheduling strategies, real-time prediction and dynamic optimization of parallel processor power consumption are achieved. This improvement improves the energy efficiency of parallel processors, extends hardware life, and reduces operating costs, meeting the urgent demand for high-performance, low-power parallel processors in fields such as high-performance computing, gaming and entertainment, and artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flowchart of a method for dynamically optimizing power consumption of a parallel processor provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0058] The present invention will be further described below with reference to specific embodiments.
[0059] An embodiment of the present invention provides a method for dynamically optimizing the power consumption of parallel processors. It uses advanced algorithms to accurately predict the power consumption requirements of parallel processors, and adjusts their working status in real time through intelligent scheduling, thereby effectively reducing power consumption and maintaining stable performance. It is particularly suitable for complex computing scenarios with extremely high energy consumption and performance requirements.
[0060] This method implements a high-precision power consumption prediction model based on multimodal feature fusion and attention mechanism enhancement, and dynamically optimizes the power consumption of parallel processors based on the high-precision power consumption prediction model. It mainly includes the following contents:
[0061] 1. High-precision power consumption prediction model, including:
[0062] Multimodal feature fusion: In addition to analyzing multi-dimensional information such as historical parallel processor operation data, current workload, temperature, and voltage, the model also incorporates application code characteristics (such as code complexity, API call patterns, and memory access frequency) and user operation behavior characteristics (operation latency sensitivity and task priority preference). Code characteristics can reflect application complexity and resource requirements, while user operation behavior characteristics can reflect user usage habits and performance requirements. Through multimodal feature fusion, the model can more comprehensively capture the factors affecting parallel processor power consumption, achieving more accurate predictions of power consumption changes.
[0063] Enhanced Attention Mechanism: Based on the combination of CNN and LSTM, an attention mechanism is introduced. The attention mechanism automatically assigns different weights to different input features, allowing the model to focus more on features that have a greater impact on power consumption prediction. For example, in certain application scenarios, temperature and workload may have a more significant impact on power consumption. The attention mechanism can highlight the role of these features and improve the model's prediction accuracy.
[0064] 2. Intelligent adaptive scheduling strategy, including:
[0065] Multi-objective Optimal Scheduling: While traditional scheduling strategies primarily focus on reducing power consumption, this method's scheduling strategy simultaneously considers power consumption, performance, and hardware lifespan. By dynamically adjusting key parameters such as voltage and frequency of parallel processors and optimizing task allocation, a multi-objective optimization algorithm is employed to find the optimal balance between these three objectives. For example, while maintaining a certain level of performance, power consumption can be minimized while also avoiding hardware overuse and extending hardware lifespan.
[0066] Real-time risk assessment and response: The system assesses parallel processor operational risks, such as overheating and overload, in real time. When potential risks are detected, the scheduling policy immediately takes appropriate measures, such as rapidly reducing voltage and frequency and urgently migrating high-risk tasks. Furthermore, the scheduling policy parameters are dynamically adjusted based on the severity and type of the risk to ensure safe and stable operation of the parallel processor.
[0067] 3. Software and hardware integrated design:
[0068] Hardware Acceleration Module: A dedicated power-optimization acceleration module is integrated into the parallel processor hardware. This module can process power prediction and scheduling algorithms in parallel, significantly improving system response speed. Furthermore, the acceleration module adopts a low-power design, improving performance without increasing power consumption.
[0069] Intelligent Configuration Engine: This provides an intelligent configuration engine through which users can input their needs and preferences, such as prioritizing reduced power consumption or improved performance. The intelligent configuration engine automatically adjusts the parameters of the prediction model and scheduling algorithm based on user input to achieve personalized power consumption optimization.
[0070] Combined with attachment Figure 1 As shown, the implementation process of this method is as follows:
[0071] 1. Data collection and preprocessing.
[0072] Data Collection: Parallel processor operational data is regularly collected through the parallel processor's monitoring interface, operating system APIs, and application logs. In addition to general data such as CPU usage, parallel processor usage, video memory usage, temperature, voltage, power consumption, and currently running applications and task types, application code characteristics (such as code complexity and function call frequency) and user operation behavior characteristics (such as operation frequency and operation interval) are also collected.
[0073] Data cleaning: The collected raw data may contain noise, outliers, or missing values. Data cleaning techniques, such as deduplication, missing value filling, and smoothing, are used to ensure data accuracy and completeness. Furthermore, specialized cleaning algorithms are used to remove invalid information based on newly collected code features and user behavior characteristics.
[0074] Data normalization: To eliminate the impact of different dimensions on model training, cleaned data is normalized, scaling all feature values to the same scale. This typically involves mapping the data to the interval [0, 1] or [-1, 1]. Different normalization methods are used for code features and user behavior features to suit their respective data characteristics.
[0075] 2. Model training and optimization.
[0076] (1) Data division:
[0077] The preprocessed data is divided into three parts according to a certain ratio (such as 70% training set, 15% validation set, and 15% test set) for model training, validation, and testing.
[0078] (2) Model structure design:
[0079] The model combines a CNN with an LSTM architecture and incorporates an attention mechanism. The CNN layer contains several convolutional and pooling layers to extract spatial features, while the LSTM layer contains multiple LSTM units to capture long-term dependencies in time series. The attention layer follows the LSTM layer and assigns weights to different input features. The specific structure may be as follows:
[0080] CNN part: Conv2D(filters=32, kernel_size=(3, 3), activation='relu') ->MaxPooling2D(pool_size=(2, 2)) ->... (can be repeated for multiple layers)
[0081] LSTM part: LSTM(units=64, return_sequences=True) ->LSTM(units=32)
[0082] Attention layer: Attention()
[0083] Output layer: Dense(units=1, activation='linear') (outputs predicted power consumption)
[0084] (3) Loss function definition:
[0085] The mean squared error (MSE) is used as the loss function to evaluate the difference between the model's predicted value and the true value. The formula for MSE is as follows:
[0086] ;
[0087] Where N is the number of samples, y i is the true power consumption value of the i-th sample, y^ i is the power consumption value of the i-th sample predicted by the model.
[0088] (4) Training process:
[0089] Initialization: Randomly initialize the model weights and biases.
[0090] Forward propagation: The training set data is input into the model, forward propagated through the CNN and LSTM layers, and the predicted value is calculated.
[0091] Calculate the loss: Use the MSE loss function to calculate the error between the predicted value and the true value.
[0092] Backpropagation: Use gradient descent methods (such as the Adam optimizer) to perform backpropagation, calculate the gradient of the loss function with respect to the model parameters, and update the model parameters to minimize the loss.
[0093] Batch Normalization: Add a batch normalization layer after each convolutional layer or LSTM layer to speed up the training process and improve model stability. The formula of the batch normalization layer is as follows:
[0094] ;
[0095] Among them, x i is the i-th element in the input batch, m is the batch size, μ B and are the mean and variance of the batch, ϵ is a small constant to avoid division by zero errors, and γ and β are learnable scaling and translation parameters.
[0096] Validation and Adjustment: After each training cycle (epoch), the performance of the model is evaluated using the validation set data. If the loss on the validation set begins to increase (i.e., overfitting occurs), early stopping is used to stop training and return the model with the best validation performance.
[0097] (5) Hyperparameter tuning:
[0098] Use methods such as grid search or random search to search for the optimal hyperparameter combination in a predefined parameter space, such as learning rate, batch size, number and parameters of CNN and LSTM layers, parameters of attention layer, etc.
[0099] Evaluate the performance of the model under different hyperparameter combinations and select the combination with the lowest validation set loss as the final model parameters.
[0100] 3. Implementation of intelligent scheduling strategy.
[0101] Power consumption prediction module: During the parallel processor's operation, current operating status information is collected in real time and input into a trained power consumption prediction model. The model outputs predicted power consumption values and confidence intervals for a period of time. Furthermore, based on newly collected code features and user behavior characteristics, the prediction results are further refined to improve accuracy.
[0102] Parameter Adjustment Module: Intelligently adjusts the voltage and frequency of the parallel processors based on predicted power consumption. If high power consumption is predicted, the voltage and frequency are lowered in advance to reduce power consumption; otherwise, they are increased appropriately to improve performance. The module also considers the parallel processor's temperature limits, hardware lifespan, and performance requirements to ensure that adjusted parameters remain within a safe range. Furthermore, the magnitude and speed of parameter adjustments are dynamically adjusted based on real-time risk assessment results.
[0103] Task Allocation: When a parallel processor is about to reach its power consumption limit or performance bottleneck, it intelligently migrates some high-power tasks to other idle or low-power parallel processors based on the current task's importance, urgency, code characteristics, and user operation behavior. This requires the system to have cross-parallel processor task scheduling and communication capabilities, as well as the ability to quickly and accurately assess the costs and benefits of task migration.
[0104] Self-learning mechanism: The system also has self-learning capabilities, enabling it to continuously optimize and adjust scheduling policy parameters based on actual operational results. For example, by recording power consumption changes, performance, hardware status, and user feedback after each adjustment, the system can gradually optimize the scheduling policy, improving its adaptability and robustness to different application scenarios.
[0105] 4. Software and hardware integration and testing.
[0106] Firmware and driver modifications: Integrate the prediction model and scheduling algorithm into the parallel processor's firmware and driver. This requires modifying the parallel processor's underlying control logic to ensure that the prediction model and scheduling algorithm can obtain real-time information about the parallel processor's operating status and perform corresponding optimization operations. Furthermore, hardware acceleration modules and intelligent configuration engines are integrated into the firmware and driver to achieve collaborative hardware and software collaboration.
[0107] System Testing: We conduct system testing in a variety of real-world scenarios, including high-load gaming, large-scale data processing, and deep learning training. We verify the effectiveness of system optimization by comparing power consumption, performance, hardware temperature, and stability indicators before and after optimization. We also collect user feedback and suggestions to further optimize and improve the system.
[0108] Performance Evaluation: In addition to optimizing power consumption, the system also needs to assess its impact on parallel processor performance. By comparing performance metrics such as frame rate, response time, and task completion time before and after optimization, we ensure that the system reduces power consumption without significantly degrading the user experience. Furthermore, we assess the impact of the system on hardware lifespan to ensure the stability and reliability of the hardware during long-term operation.
[0109] This method can be widely applied to various computer products equipped with parallel processors, such as high-performance servers, workstations, game consoles, and edge computing devices. By optimizing the power consumption of parallel processors, these products will have higher energy efficiency and lower operating costs, thereby improving their market competitiveness.
[0110] Embodiments of the present invention also provide a system for dynamically optimizing parallel processor power consumption. This system trains and optimizes a high-precision power consumption prediction model based on multimodal feature fusion and enhanced attention mechanisms, and dynamically optimizes the power consumption of parallel processors based on the high-precision power consumption prediction model. Specifically, this system achieves dynamic optimization of parallel processor power consumption using the method for dynamically optimizing parallel processor power consumption described in the aforementioned embodiments.
[0111] The system includes:
[0112] 1. Data acquisition and preprocessing module.
[0113] Data Collection: The system regularly collects parallel processor operational data through the parallel processor's monitoring interface, operating system APIs, and application logs. In addition to general data such as CPU usage, parallel processor usage, video memory usage, temperature, voltage, power consumption, and currently running applications and task types, the system also collects application code characteristics (such as code complexity and function call frequency) and user operation behavior characteristics (such as operation frequency and operation interval).
[0114] Data cleaning: The collected raw data may contain noise, outliers, or missing values. The system uses data cleaning techniques, such as deduplication, missing value filling, and smoothing, to ensure data accuracy and integrity. Furthermore, specialized cleaning algorithms are used to remove invalid information based on newly collected code features and user behavior characteristics.
[0115] Data normalization: To eliminate the impact of different dimensions on model training, the system normalizes the cleaned data, scaling all feature values to the same scale. This typically involves mapping the data to the interval [0, 1] or [-1, 1]. Different normalization methods are used for code features and user behavior features to suit their respective data characteristics.
[0116] 2. Model training and optimization module.
[0117] (1) Data division:
[0118] The preprocessed data is divided into three parts according to a certain ratio (such as 70% training set, 15% validation set, and 15% test set) for model training, validation, and testing.
[0119] (2) Model structure design:
[0120] The model combines a CNN with a LSTM architecture and incorporates an attention mechanism. The CNN layer contains several convolutional and pooling layers to extract spatial features, while the LSTM layer contains multiple LSTM units to capture long-term dependencies in time series. The attention layer follows the LSTM layer and assigns weights to different input features.
[0121] (3) Loss function definition:
[0122] The mean squared error (MSE) is used as the loss function to evaluate the difference between the model prediction value and the true value.
[0123] (4) Training process:
[0124] Initialization: Randomly initialize the model weights and biases.
[0125] Forward propagation: The training set data is input into the model, forward propagated through the CNN and LSTM layers, and the predicted value is calculated.
[0126] Calculate the loss: Use the MSE loss function to calculate the error between the predicted value and the true value.
[0127] Backpropagation: Use gradient descent methods (such as the Adam optimizer) to perform backpropagation, calculate the gradient of the loss function with respect to the model parameters, and update the model parameters to minimize the loss.
[0128] Batch Normalization: Add a batch normalization layer after each convolutional layer or LSTM layer to speed up the training process and improve model stability.
[0129] Validation and Adjustment: After each training cycle (epoch), the performance of the model is evaluated using the validation set data. If the loss on the validation set begins to increase (i.e., overfitting occurs), early stopping is used to stop training and return the model with the best validation performance.
[0130] (5) Hyperparameter tuning:
[0131] Use methods such as grid search or random search to search for the optimal hyperparameter combination in a predefined parameter space, such as learning rate, batch size, number and parameters of CNN and LSTM layers, parameters of attention layer, etc.
[0132] Evaluate the performance of the model under different hyperparameter combinations and select the combination with the lowest validation set loss as the final model parameters.
[0133] 3. Intelligent adaptive scheduling module.
[0134] The power consumption prediction submodule collects real-time operating status information during the parallel processor's operation and feeds it into a trained power consumption prediction model. The model outputs predicted power consumption values and confidence intervals for the next period of time. Furthermore, based on newly collected code features and user behavior, the prediction results are further refined to improve accuracy.
[0135] Parameter Adjustment Submodule: Based on predicted power consumption, the system intelligently adjusts the voltage and frequency of the parallel processors. If high power consumption is predicted, the voltage and frequency are reduced in advance to reduce power consumption; otherwise, they are increased appropriately to improve performance. The system also considers the parallel processor's temperature limits, hardware lifespan, and performance requirements to ensure that the adjusted parameters remain within a safe range. Furthermore, the magnitude and speed of parameter adjustments are dynamically adjusted based on real-time risk assessment results.
[0136] Task Allocation Submodule: When a parallel processor is about to reach its power consumption limit or performance bottleneck, the system intelligently migrates some high-power tasks to other idle or low-power parallel processors based on the current task's importance, urgency, code characteristics, and user operation behavior. This requires the system to have cross-parallel processor task scheduling and communication capabilities, as well as the ability to quickly and accurately assess the costs and benefits of task migration.
[0137] Self-learning mechanism: The system also has self-learning capabilities, enabling it to continuously optimize and adjust scheduling policy parameters based on actual operational results. For example, by recording power consumption changes, performance, hardware status, and user feedback after each adjustment, the system can gradually optimize the scheduling policy, improving its adaptability and robustness to different application scenarios.
[0138] The system adopts integrated hardware and software design:
[0139] Hardware Acceleration Module: A dedicated power-optimization acceleration module is integrated into the parallel processor hardware. This module can process power prediction and scheduling algorithms in parallel, significantly improving system response speed. Furthermore, the acceleration module adopts a low-power design, improving performance without increasing power consumption.
[0140] Intelligent Configuration Engine: This provides an intelligent configuration engine through which users can input their needs and preferences, such as prioritizing reduced power consumption or improved performance. The intelligent configuration engine automatically adjusts the parameters of the prediction model and scheduling algorithm based on user input to achieve personalized power consumption optimization.
[0141] The implementation of software and hardware integration and testing includes the following:
[0142] Firmware and driver modifications: Integrate the prediction model and scheduling algorithm into the parallel processor's firmware and driver. This requires modifying the parallel processor's underlying control logic to ensure that the prediction model and scheduling algorithm can obtain real-time information about the parallel processor's operating status and perform corresponding optimization operations. Furthermore, hardware acceleration modules and intelligent configuration engines are integrated into the firmware and driver to achieve collaborative hardware and software collaboration.
[0143] System Testing: We conduct system testing in a variety of real-world scenarios, including high-load gaming, large-scale data processing, and deep learning training. We verify the effectiveness of system optimization by comparing power consumption, performance, hardware temperature, and stability indicators before and after optimization. We also collect user feedback and suggestions to further optimize and improve the system.
[0144] Performance Evaluation: In addition to optimizing power consumption, the system also needs to assess its impact on parallel processor performance. By comparing performance metrics such as frame rate, response time, and task completion time before and after optimization, we ensure that the system reduces power consumption without significantly degrading the user experience. Furthermore, we assess the impact of the system on hardware lifespan to ensure the stability and reliability of the hardware during long-term operation.
[0145] An embodiment of the present invention further provides a device for dynamically optimizing power consumption of a parallel processor, comprising: at least one memory and at least one processor;
[0146] The at least one memory is configured to store a machine-readable program;
[0147] The at least one processor is configured to call the machine-readable program to implement the method for dynamically optimizing power consumption of parallel processors described in the above embodiment.
[0148] An embodiment of the present invention further provides a computer-readable medium having computer instructions stored thereon. When executed by a processor, the computer instructions cause the processor to execute the method for dynamically optimizing power consumption of parallel processors described in the above-mentioned embodiments. Specifically, a system or device equipped with a storage medium can be provided. The storage medium stores software program code that implements the functions of any of the above-mentioned embodiments, and the computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0149] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.
[0150] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, and DVD+RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communications network.
[0151] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.
[0152] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU installed on the expansion board or expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
[0153] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the scope of protection of the present invention.
Claims
1. A method for dynamic optimization of power consumption of a parallel processor, characterized in that: A high-precision power consumption prediction model is implemented based on multimodal feature fusion and attention mechanism enhancement. The multimodal features include application code features and user operation behavior features. The application code features can reflect the complexity and resource requirements of the application, and the user operation behavior features can reflect the user's usage habits and performance requirements. The application code feature data includes code complexity and function call frequency. The user operation behavior data includes: operation frequency, operation time interval; The attention mechanism is enhanced. Based on the combination of CNN and LSTM, an attention mechanism is introduced. The attention mechanism can automatically assign different weights to different input features, so that the model pays more attention to features that have a greater impact on power consumption prediction; The implementation of this method includes the following steps: (1) Data collection and preprocessing; (2) Model training and optimization; (3) Intelligent adaptive scheduling implementation; The specific implementation process of the model training and optimization is as follows: (2.1) Data division: The preprocessed data is divided into three parts according to the proportion for model training, verification and testing; (2.2) Model structure design: The model uses a CNN-LSTM architecture and introduces an attention mechanism. The CNN layer contains multiple convolutional layers and pooling layers to extract spatial features. The LSTM layer contains multiple LSTM units to capture long-term dependencies in time series. The attention layer follows the LSTM layer and assigns weights to different input features. (2.3) Loss function definition: The mean square error is used as the loss function to evaluate the difference between the model prediction value and the true value; (2.4) Training process: Initialization: Randomly initialize model weights and biases; Forward propagation: input the training set data into the model, perform forward propagation through the CNN and LSTM layers, and calculate the predicted value; Calculate loss: Use the MSE loss function to calculate the error between the predicted value and the true value; Backpropagation: Use gradient descent to perform backpropagation, calculate the gradient of the loss function with respect to the model parameters, and update the model parameters to minimize the loss; Batch Normalization: Add a batch normalization layer after each convolutional layer or LSTM layer to speed up the training process and improve model stability; Validation and Adjustment: After each training cycle, the performance of the model is evaluated using the validation set data. If the loss on the validation set begins to increase, early stopping is used to stop training and return the model with the best validation performance. (2.5) Hyperparameter tuning: Search for the optimal hyperparameter combination within a predefined parameter space, including learning rate, batch size, number and parameters of CNN and LSTM layers, and parameters of attention layers; Evaluate the performance of the model under different hyperparameter combinations and select the combination with the lowest validation set loss as the final model parameters; The intelligent adaptive scheduling implementation includes multi-objective optimization scheduling and real-time risk assessment, The multi-objective optimization scheduling simultaneously considers the three objectives of power consumption, performance, and hardware life, and finds the optimal balance between the three objectives through a multi-objective optimization algorithm when dynamically adjusting key parameters of the parallel processor, including voltage and frequency, and optimizing task allocation; The real-time risk assessment evaluates the operating risks of the parallel processor in real time, including overheating and overload. When potential risks are detected, the scheduling strategy immediately takes corresponding measures, including quickly reducing voltage and frequency and urgently migrating high-risk tasks. At the same time, according to the severity and type of the risk, the parameters of the scheduling strategy are dynamically adjusted to ensure that the parallel processor operates in a safe and stable state.
2. The method for dynamic optimization of power consumption of a parallel processor according to claim 1, characterized in that: The data collection and preprocessing specifically include: Data collection: Regularly collects parallel processor operating data through the parallel processor's monitoring interface, the operating system's API, and application log records. The collected information includes general data, application code features, and user operation behavior characteristics. Data cleaning: Data cleaning technology is used to ensure the accuracy and integrity of data. At the same time, according to the newly collected code features and user operation behavior characteristics, corresponding cleaning algorithms are used to remove invalid information; Data normalization: Normalize the cleaned data and scale all feature values to the same scale; for code features and user operation behavior features, use a normalization method that adapts to their data characteristics.
3. The method for dynamic optimization of power consumption of a parallel processor according to claim 2, characterized in that: The general data includes: CPU usage, parallel processor usage, video memory occupancy, temperature, voltage, power consumption, and currently running applications and task types.
4. The method for dynamic optimization of power consumption of a parallel processor according to claim 1, wherein: The intelligent adaptive scheduling implementation specifically includes: Power consumption prediction module: During the operation of the parallel processor, the current operating status information is collected in real time and input into the trained power consumption prediction model. The model outputs the predicted power consumption value and its confidence interval for a specified time period in the future. At the same time, the prediction results are further refined based on newly collected code features and user operation behavior characteristics. Parameter Adjustment Module: Intelligently adjusts the voltage and frequency of the parallel processor based on predicted power consumption. If high power consumption is predicted, the voltage and frequency are lowered in advance to reduce power consumption; otherwise, they are increased to improve performance. Adjustments are made based on the parallel processor's temperature limits, hardware lifespan, and performance requirements to ensure that the adjusted parameters are within a safe range. Furthermore, the magnitude and speed of parameter adjustments are dynamically adjusted based on real-time risk assessment results. Task allocation module: When a parallel processor reaches a set power consumption limit or performance bottleneck threshold, it migrates some high-power tasks to other idle or low-power parallel processors for execution based on the importance, urgency, code characteristics, and user operation behavior characteristics of the current task; Self-learning mechanism: Continuously optimize and adjust the parameters of the scheduling strategy based on actual operating results.
5. The method for dynamic optimization of power consumption of a parallel processor according to claim 1, characterized in that: This method uses an integrated hardware and software design to integrate a power optimization acceleration module into the parallel processor hardware. This module is used to implement parallel processing power consumption prediction and scheduling algorithms. It also provides an intelligent configuration engine through which users input their needs and preferences. The intelligent configuration engine automatically adjusts the parameters of the prediction model and scheduling algorithm based on the user's input to achieve personalized power consumption optimization. The specific implementation is as follows: Firmware and driver modification: Integrate the prediction model and scheduling algorithm into the parallel processor's firmware and driver. Modify the parallel processor's underlying control logic to ensure that the prediction model and scheduling algorithm can obtain the parallel processor's operating status in real time and perform corresponding optimization operations. At the same time, integrate the hardware acceleration module and intelligent configuration engine into the firmware and driver to achieve collaborative work between software and hardware. System testing: Conduct system testing in a variety of real-world scenarios, including high-load gaming, large-scale data processing, and deep learning training. Verify the effectiveness of system optimization by comparing power consumption, performance, hardware temperature, and stability indicators before and after optimization. Collect user feedback and opinions to further optimize and improve the system. Performance evaluation: By comparing performance indicators before and after optimization, including frame rate, response time, and task completion time, we ensure that the system does not significantly reduce the user experience while reducing power consumption. At the same time, we evaluate the system's impact on hardware lifespan to ensure the stability and reliability of the hardware during long-term operation.
6. A parallel processor power consumption dynamic optimization system, characterized in that: The system includes a data acquisition and preprocessing module, a model training and optimization module, and an intelligent adaptive scheduling module. The system trains and optimizes a high-precision power consumption prediction model based on multimodal feature fusion and attention mechanism enhancement, and dynamically optimizes the power consumption of parallel processors based on the high-precision power consumption prediction model. The system specifically realizes dynamic optimization of power consumption of parallel processors through the method described in any one of claims 1 to 5.
7. A device for dynamically optimizing power consumption of a parallel processor, characterized in that: include: at least one memory and at least one processor; The at least one memory is configured to store a machine-readable program; The at least one processor is configured to call the machine-readable program to implement the method according to any one of claims 1 to 5.
8. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Energy consumption monitoring and optimizing method and system based on large model and multiple agents
CN118916778A
Parallel programming method for diversified computing task requirements
CN119065643A