An Optimization Method for Power Embedded Kernel Microarchitecture for Low-Carbon Mobile Terminals
By using a three-layer data acquisition architecture (edge-cloud) and graph neural network to optimize memory access patterns, the real-time and accuracy issues of mobile terminal energy consumption management are solved, and energy efficiency optimization of low-carbon mobile terminals is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUJIAN YIRONG INFORMATION TECH
- Filing Date
- 2025-12-18
- Publication Date
- 2026-07-17
AI Technical Summary
Mobile terminals face challenges in terms of high performance, low power consumption, and long battery life. Traditional embedded kernel power management is unable to cope with complex and ever-changing application loads and environmental factors in real time, resulting in the inability to fully release energy efficiency potential.
It adopts a three-layer data acquisition architecture of end-edge-cloud, obtains hardware indicators through kernel interface and HA driver, captures application layer data through WebView hook, and optimizes memory access mode and caching strategy by combining graph neural network and physical constraint multi-task learning framework to achieve dynamic resource scheduling and system configuration.
Significantly reduce the power consumption of mobile terminals, improve the management level of the memory subsystem, ensure that the prediction results conform to the laws of physics, and realize full-stack data perception and intelligent management.
Smart Images

Figure CN121541764B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microarchitecture optimization, and more particularly to a method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals. Background Technology
[0002] With the rapid popularization of mobile internet, the Internet of Things, and smart terminals, the number of mobile devices continues to grow, becoming an important part of the information infrastructure of modern society. However, limited by battery capacity and device size, mobile terminals generally face multiple technical challenges in daily application scenarios, namely "high performance, low power consumption, and long battery life." Especially in computationally intensive scenarios such as 5G communication, multimedia processing, and artificial intelligence inference, device power consumption and chip temperature rise are becoming increasingly prominent, directly affecting user experience and hardware reliability, while also causing a continuous increase in product carbon emissions.
[0003] Green computing and low-carbon terminal technologies have garnered significant attention from both industry and academia. Traditional embedded kernel power management primarily relies on static parameter tuning and simple passive scheduling, making it difficult to perceive and dynamically respond to complex and ever-changing application loads and environmental factors in real time, thus hindering the full realization of energy efficiency potential. Furthermore, existing memory, cache, and peripheral management mechanisms lack intelligent understanding of scenarios and user behavior, further limiting the accuracy and effectiveness of system-level energy consumption optimization. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a power embedded kernel microarchitecture optimization method for low-carbon mobile terminals, which can significantly reduce the energy consumption of mobile terminals.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals includes the following steps:
[0007] S1: Acquire multi-source energy consumption and scenario data, and preprocess them to obtain a standardized time-series data stream;
[0008] S2: Based on standardized time-series data streams, perform joint feature engineering and scene label generation to obtain a feature vector matrix with scene labels;
[0009] S3: Based on the feature vector matrix with scene labels, make short-term predictions on load, temperature, energy consumption, and QoE using a short-term prediction model.
[0010] S4: Based on the prediction, solve for the energy efficiency optimal control quantity that satisfies the preset constraints, and obtain resource scheduling decisions and system configuration parameters;
[0011] S5: Based on resource scheduling decisions and system configuration parameters, optimize memory access patterns and caching strategies using graph neural networks to obtain dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions.
[0012] Furthermore, the multi-source energy consumption and scenario data includes multi-source data from the terminal side, the field environment, and the power business side. The terminal side includes CPU load, frequency, voltage and current, temperature sensing, memory, and network status. The field environment includes location, indoor and outdoor temperature and humidity, noise, light intensity, operating condition tags, network standard, and link quality. The power business side includes task type, work order urgency, security level, energy consumption budget, and carbon intensity parameters. A three-layer acquisition architecture of end-edge-cloud is adopted: the end side obtains high-frequency indicators through the kernel interface and HA driver, and obtains application front-end, back-end, and QoE side indicators through WebView hooks; the edge gateway uniformly aggregates station domain sensors and performs local caching; the cloud accesses the edge gateway data through the ESB bus.
[0013] Further preprocessing is performed as follows: First, the collected multi-source raw data is structured and standardized to ensure that key fields from different sources are complete and that timestamps are uniformly set to UTC. For data streams with inconsistent sampling intervals, upsampling or downsampling is performed according to application requirements to align them to a uniform time series step size. Second, based on rules and statistical models, the completeness and legality of indicator values are verified, and outliers are detected and graded using median filtering. For missing data points in the time series, linear interpolation is used to complete them. Categorical variables and labels are uniformly encoded, and sensitive fields are desensitized or blurred according to the actual scenario. Finally, a standardized time series data stream is generated.
[0014] Furthermore, based on standardized time-series data streams, joint feature engineering and scene label generation are performed to obtain a feature vector matrix with scene labels. Specifically, a multi-level feature extraction system is constructed, including time-domain feature extraction and frequency-domain feature extraction. The time-domain feature extraction calculates statistical features, rate of change features, and trend features by setting multi-scale sliding windows for each core indicator. The frequency-domain feature extraction uses discrete Fourier transform to analyze the signal spectrum, extracting the dominant frequency ratio, frequency band energy distribution, and wavelet multi-resolution coefficients to identify the periodicity and burstiness patterns of the load. Scene label generation employs rule-driven, self-supervised clustering, and weakly supervised methods. The integrated hybrid strategy enables intelligent identification and labeling of mobile terminal working scenarios. Rule-driven initial labels are based on power business expert knowledge, constructing multi-condition criteria to identify typical scenarios and generating initial hard labels or probability distributions. Self-supervised clustering labels standardize and reduce the dimensionality of the extracted joint features, use HDBSCAN for unsupervised clustering, calculate confidence weights based on cluster density and stability, and generate cluster pseudo-labels. The weakly supervised fusion mechanism calibrates the rule probabilities through temperature scaling, and then performs weighted fusion with the cluster probabilities. Finally, the scenario label is the category corresponding to the maximum value of the fusion probability, and the confidence is the maximum probability value.
[0015] Furthermore, the short-term prediction model uses the feature vector matrix X with scene labels and the scene label y(s) to train short-term predictions for four related tasks: load, temperature, energy consumption, and QoE.
[0016] We employ a weighted total loss method to uniformly optimize task error, regularization, and consistency constraints. The overall objective function is:
[0017] ;
[0018] Among them, L i The supervision loss for task i; w i Let be the dynamic weights for task i; Load, temp, energy, and qoe represent the load, temperature, energy consumption, and QoE prediction tasks, respectively; R(θ) is the regularization, where θ is the set of all learnable parameters; λ and β are the loss weighting coefficients; L consist Loss due to cross-task physical consistency constraints;
[0019] Physical consistency loss Lconsist Used to ensure that prediction results conform to physical laws, it is defined as:
[0020] ;
[0021] Where α1 and α2 are physical constraint weights, f power and f thermal A predefined physical relationship function based on chip specifications and thermal characteristics; These are the predicted values for load, temperature, and energy consumption, respectively.
[0022] Furthermore, the short-term prediction model employs a structure of a shared feature extractor and a task-specific head. First, it extracts a general representation H of temporal sequence and context in the shared layer. cond X is the input standardized time-series feature matrix; The scene label for the current sample;
[0023] ;
[0024] Among them, f shared For shared encoders; θ shared For shared layer parameters; e (s) H represents the dense vector representation of scene labels; ⊕ represents the feature concatenation operation; shared For the extracted shared feature representation;
[0025] The shared layer employs multi-head attention to characterize temporal dependencies, as detailed below:
[0026] ;
[0027] ;
[0028] Where Q, K, and V are the query, key, and value tensors, respectively, and H is the key tensor. shared obtained by linear projection; d k is the dimension of the key vector; h is the number of attention heads; W O For multi-head output projection matrix; Head h This is the h-th attention head; This indicates head splicing; Attention indicates the attention mechanism; Multihead indicates multi-head attention output;
[0029] Then, the scene is stitched together and embedded, and fed into each task header for prediction:
[0030] The load prediction head uses LSTM:
[0031] ;
[0032] ;
[0033] ;
[0034] Among them, W a, b a W L ,b L For task header parameters; α t Attention weights; This represents the general characteristics at time t; W represents the hidden state of the LSTM from the previous time step. a b is the attention weight matrix; a For attention bias; α t For attention weights at each time step; W L To output the projection matrix; b L For output bias; Features for the final output;
[0035] Temperature prediction head based on physical enhancement:
[0036] ;
[0037] Where T is the temperature field; α is the thermal diffusivity; Let be the Laplace operator for temperature, represent the second spatial derivative; Q is the internal heat source; ρ is the material density; c p Specific heat capacity; For the physical constraint layer; γ is the physical layer weight; T amb Ambient temperature; The predicted temperature value at time t+h; For conditional features (already spliced scene information);
[0038] The energy consumption prediction head uses static / dynamic decomposition:
[0039] ;
[0040] Among them, f static It is a static power predictor; f is the predicted static power consumption value; dynamic For dynamic power consumption prediction; This is a dynamic power consumption prediction value; This is the predicted total power consumption value;
[0041] The QoE prediction head uses multidimensional prediction:
[0042] ;
[0043] ;
[0044] ;
[0045] ;
[0046] in, For the predicted response time quality; f resp For response time prediction neural networks, f is the predicted value for smoothness quality. smooth For smoothness prediction network; For stability prediction; f stable For stability prediction networks; The overall QoE prediction value at time t+h; w r w s w t These are the weighting coefficients.
[0047] Furthermore, the training of the short-term prediction model adopts a two-stage strategy of sharing first and then joint training, as follows:
[0048] In the first phase, the parameters of all task-specific heads are frozen, and only the shared feature extractor is optimized:
[0049] ;
[0050] Where, θ shared For the parameter set of the shared feature extractor; f is the frozen parameter for the i-th task header; shared (X;θ shared ) is a shared feature extraction function, which takes the original features X as input and outputs a shared representation Hshared; i The prediction header function for the i-th task has fixed parameters that are not updated; w i Let the weight of the i-th task be denoted as .
[0051] In the second stage, end-to-end global optimization is performed by jointly fine-tuning and freezing all parameters:
[0052] ;
[0053] Wherein, θ contains the complete parameter set for the shared layer and all task headers; L total The aforementioned overall loss function includes task loss, regularization term, and consistency constraint.
[0054] Robustness is enhanced through adversarial training, where the adversarial optimization objective is:
[0055] ;
[0056] Where δ is the additive input perturbation, which has the same dimension as the input feature X; For disturbance strength constraints; The norm constraint is used for the perturbation; Y is the label corresponding to the input feature matrix X.
[0057] In actual training, the inner layer max optimization is solved by approximation using FGSM, and the loss L is calculated during forward propagation.total (X+δ,Y;θ); Backpropagation calculates the input gradient. Generate adversarial examples: ; Calculate the final loss on adversarial examples and update the model parameters.
[0058] Furthermore, based on the prediction, the optimal energy efficiency control quantity that satisfies the preset constraints is solved to obtain resource scheduling decisions and system configuration parameters, as follows:
[0059] Construct a mathematical model for the optimization problem, with the optimization objective being:
[0060] ;
[0061] Among them, Q target Δu represents the desired QoE target value; Δu represents the change in the control variable sequence.
[0062] The set of constraints is as follows:
[0063] ;
[0064] in, H represents the sequence of control variables to be optimized; H is the time domain length of the predictive control; J is the comprehensive cost function; ω E Energy consumption weight ω T For temperature penalty weights, ω Q ω is the QoE bias weight. R To control smoothness weights; E(t+k), T(t+k), Q(t+k) are the predicted energy consumption, temperature, and QoE at time t+k, respectively; T max This is the upper limit of temperature; Q min The lower bound for QoE; Pbudget is the power consumption budget; u max and u min These are the upper and lower limits of the physical constraints of the control variables, respectively; u(t+k) is the control variable at time t+k; Let be the change in the sequence of control variables at time t+k;
[0065] The control vector u(t) is defined to include the adjustment parameters of the following subsystems, including the CPU operating frequency f. CPU (t) Number of active CPU cores N core (t), power supply voltage V dd (t), heat dissipation control intensity τ thermal (t) and the degree of aggressiveness in task scheduling α sched (t)∈[0,1];
[0066] Define the system state vector x(t) = [L(t), T(t), E(t), Q(t)], where L(t) is the load, T(t) is the temperature, E(t) is the energy consumption, and Q(t) is the QoE index;
[0067] Establish the state transition equation:
[0068] ;
[0069] Where u(t) is the current control input; w(t) is the external disturbance; This is system noise;
[0070] Load dynamic model:
[0071] ;
[0072] Where, ρ L The autocorrelation coefficient β of the load L The coefficient representing the impact of CPU / GPU frequency on load; u comp (t)=f CPU (t) represents computational resource control; γ L t is the external workload influence coefficient; W(t) is the external workload. Model noise for the load;
[0073] A rolling time-domain optimization strategy is employed to solve the finite-time optimal control problem at each time step:
[0074] ;
[0075] in, is the optimal control variable sequence; k is the relative time step index; x(t+k|t) is the state prediction at time t+k based on time t information; x(t+H|t) is the state prediction of the predicted time domain terminal; This represents the stage cost at step k. This is the terminal cost function.
[0076] Furthermore, based on resource scheduling decisions and system configuration parameters, memory access patterns and caching strategies are optimized using graph neural networks to obtain dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions. Specifically: Based on resource scheduling decisions and system configuration parameters, the optimization problem of the memory subsystem is transformed into a learning and reasoning task on a graph structure. The traditional memory access pattern is modeled as a dynamic heterogeneous graph, where nodes represent memory addresses, cache lines, and application thread entities, and edges represent access relationships, dependencies, and temporal associations. A three-layer heterogeneous graph structure is constructed: the application layer graph describes the resource competition relationship between processes, the memory layer graph depicts the spatial and temporal locality between addresses, and the hardware layer graph models the cache hierarchy and NUMA topology. Graph node features include multi-dimensional attributes such as access frequency, data type, lifecycle, and popularity distribution, while edge features encode key information such as access latency, bandwidth requirements, and sharing degree. A temporal graph neural network architecture is adopted, using a graph attention mechanism to learn the importance weights between nodes and combining recurrent neural units to capture the temporal dependencies of access patterns. Based on the feature representation extracted by the graph neural network, a dynamic memory partitioning module and a multi-level cache replacement strategy are used to optimize and achieve intelligent management of the memory subsystem.
[0077] Furthermore, the dynamic memory partitioning module models the memory partitioning problem as a community detection task on a graph. It dynamically adjusts the memory partition boundaries by learning the similarity of application access patterns, employing a differentiable graph partitioning algorithm.
[0078] Define the partition quality function:
[0079] ;
[0080] Where P = {P1, P2, ..., P} K Let} be a partitioning scheme with K partitions, A ij Let be the access affinity between nodes i and j, and λ be the weighting coefficient of the interval communication cost;
[0081] The optimal partitioning scheme is solved by gradient optimization, and combined with the resource allocation decision in stage S4, the memory bandwidth and access latency are optimized in a coordinated manner.
[0082] The multi-level cache replacement strategy optimization, based on a graph attention-based cache replacement network, models the cache state as a graph structure, where each cache line is a node. Node features include access timestamp, access frequency, and data size information, and edges represent the relationships between cache lines. The replacement decision predicts the eviction probability of each cache line using a graph neural network.
[0083] ;
[0084] in, The training process employs a reinforcement learning framework, using cache hit rate and access latency as reward signals, and optimizes network parameters through a policy gradient method.
[0085] The present invention has the following beneficial effects:
[0086] 1. This invention constructs a three-layer data acquisition architecture of end-edge-cloud, and obtains high-frequency hardware indicators through kernel interface and HA driver, and captures application layer QoE data through WebView hook, realizing full-stack data perception from the underlying hardware to the upper layer application;
[0087] 2. This invention proposes a physical-enhanced multi-task learning framework. By introducing physical constraints such as the heat conduction equation and power decomposition model, it ensures that the prediction results conform to objective physical laws and avoids the non-physical interpretations that may arise from pure data-driven methods.
[0088] 3. This invention achieves global optimal control under multi-objective constraints through rolling time-domain optimization. At the same time, it innovatively introduces graph neural networks to model memory access patterns, transforming the discrete optimization problem of memory partitioning and cache replacement into a continuous learning task on the graph, which greatly improves the intelligent management level of the memory subsystem. Attached Figure Description
[0089] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0090] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0091] refer to Figure 1 In this embodiment, a method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals is provided, including the following steps:
[0092] S1: Acquire multi-source energy consumption and scenario data, and preprocess them to obtain a standardized time-series data stream;
[0093] S2: Based on standardized time-series data streams, perform joint feature engineering and scene label generation to obtain a feature vector matrix with scene labels;
[0094] S3: Based on the feature vector matrix with scene labels, make short-term predictions on load, temperature, energy consumption, and QoE using a short-term prediction model.
[0095] S4: Based on the prediction, solve for the energy efficiency optimal control quantity that satisfies the preset constraints, and obtain resource scheduling decisions and system configuration parameters;
[0096] S5: Based on resource scheduling decisions and system configuration parameters, optimize memory access patterns and caching strategies using graph neural networks to obtain dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions.
[0097] In this embodiment, multi-source energy consumption and scenario data include multi-source data from the terminal side, the field environment, and the power business side. The terminal side includes CPU load, frequency, voltage and current, temperature sensing, memory, and network status. The field environment includes location, indoor and outdoor temperature and humidity, noise, illumination, operating condition tags (inspection / emergency repair / standby / navigation), network standard, and link quality. The power business side includes task type, work order urgency, security level, energy consumption budget, and carbon intensity parameters (regional power grid marginal emission factor). For the above heterogeneous sources, a three-layer acquisition architecture of end-edge-cloud is adopted: the end side obtains high-frequency indicators through the kernel interface and HA driver, and obtains application front-end, back-end, and QoE side indicators through WebView hooks; the edge gateway uniformly aggregates station domain sensors and performs local caching; the cloud accesses the edge gateway data through the ESB bus.
[0098] In this embodiment, the preprocessing is as follows: First, the collected multi-source raw data is structured and standardized to ensure that key fields (device ID, indicator type, value, unit, timestamp, etc.) from different sources (such as terminal chip data, business system flow, environmental sensing, network status, etc.) are complete, and the timestamp is unified to UTC; for data streams with inconsistent sampling intervals, upsampling (interpolation) or downsampling (aggregation) is performed according to application requirements to align to a unified time series step size; Second, based on rules (such as physical boundaries, business common sense) and statistical models, the completeness and legality of indicator values are verified, and outliers are detected and graded using median filtering methods (such as removal, truncation, or interpolation completion); for missing data points in the time series, linear interpolation is used for completion; categorical variables and labels are uniformly encoded, and sensitive fields are desensitized or blurred according to the actual scenario; Finally, a standardized time series data stream is generated.
[0099] In this embodiment, based on a standardized time-series data stream, joint feature engineering and scene label generation are performed to obtain a feature vector matrix with scene labels, as detailed below:
[0100] A multi-layered feature extraction system is constructed, including time-domain feature extraction and frequency-domain feature extraction. The time-domain feature extraction calculates statistical features (mean, variance, extreme values, quantiles), rate-of-change features (first-order difference, second-order difference, rate-of-change slope), and trend features (linear fitting slope, autocorrelation coefficient, exponential smoothing value) by setting multi-scale sliding windows (e.g., 5 seconds, 30 seconds, 5 minutes) for each core indicator (CPU / GPU utilization, frequency point, temperature, current, voltage, network throughput, etc.). The frequency-domain feature extraction uses discrete Fourier transform to analyze the signal spectrum, extracting the dominant frequency ratio, frequency band energy distribution, and wavelet multi-resolution coefficients to identify the periodicity and burstiness patterns of the load. Simultaneously, QoE-related features are extracted, including window statistics of interaction latency, load-experience coupling elasticity coefficient, and application foreground / background switching modes, establishing a quantitative correlation between energy consumption and user experience.
[0101] The scene label generation adopts a hybrid strategy of rule-driven, self-supervised clustering, and weakly supervised fusion to achieve intelligent identification and labeling of mobile terminal working scenarios. The rule-driven initial labels are based on the knowledge of power business experts and construct multi-condition criteria to identify typical scenarios, such as "high-load inspection scenario" (CPU average >70% and active camera / positioning and network uplink peak exists), "idle standby scenario" (utilization <10% and temperature rise close to zero and no user interaction), "network-dense scenario" (high network throughput and long CPU-IO wait time), etc., generating initial hard labels or probability distributions. The self-supervised clustering labels standardize and reduce the dimensionality of the extracted joint features, use HDBSCAN for unsupervised clustering, calculate confidence weights based on cluster density and stability, and generate cluster pseudo-labels. The weakly supervised fusion mechanism calibrates the rule probabilities through temperature scaling, and then performs weighted fusion with the cluster probabilities (the fusion weight λ can be optimized through the validation set). Finally, the scene label is the category corresponding to the maximum value of the fusion probability, and the confidence is the maximum probability value.
[0102] In this embodiment, the short-term prediction model uses the feature vector matrix X with scene labels and the scene label y(s) to train short-term predictions for four related tasks: load, temperature, energy consumption, and QoE.
[0103] We employ a weighted total loss method to uniformly optimize task error, regularization, and consistency constraints. The overall objective function is:
[0104] ;
[0105] Among them, L i The supervision loss for task i; w iThe dynamic weights for task i are: Load, temp, energy, and qoe represent the load, temperature, energy consumption, and QoE prediction tasks, respectively; R(θ) is the regularization, where θ is the set of all learnable parameters; λ and β are the loss weighting coefficients used to balance the strength of regularization and consistency constraints; L consist Loss due to cross-task physical consistency constraints;
[0106] Physical consistency loss Lconsist Used to ensure that prediction results conform to physical laws, it is defined as:
[0107] ;
[0108] Where α1 and α2 are physical constraint weights, f power and f thermal A predefined physical relationship function based on chip specifications and thermal characteristics; These are the predicted values for load, temperature, and energy consumption, respectively.
[0109] In this embodiment, the short-term prediction model adopts a structure of shared feature extractor and task-specific head. First, a general representation H of temporal sequence and context is extracted in the shared layer. cond :
[0110] ;
[0111] Among them, f shared For shared encoders; θ shared For shared layer parameters; e (s) H represents the dense vector representation of scene labels; ⊕ represents the feature concatenation operation; shared X represents the extracted shared features; X is the input standardized temporal feature matrix. The scene label for the current sample;
[0112] The shared layer employs multi-head attention to characterize temporal dependencies, as detailed below:
[0113] ;
[0114] ;
[0115] Where Q, K, and V are the query, key, and value tensors, respectively, and H is the key tensor. shared obtained by linear projection; d k is the dimension of the key vector; h is the number of attention heads; W O For multi-head output projection matrix; Head h This is the h-th attention head; This indicates head splicing; Attention indicates the attention mechanism; Multihead indicates multi-head attention output;
[0116] Then, the scene is stitched together and embedded, and fed into each task header for prediction:
[0117] The load prediction head uses LSTM:
[0118] ;
[0119] ;
[0120] ;
[0121] Among them, W a, b a W L ,b L For task header parameters; α t Attention weights; This represents the general characteristics at time t; W represents the hidden state of the LSTM from the previous time step. a b is the attention weight matrix; a For attention bias; α t For attention weights at each time step; W L To output the projection matrix; b L For output bias; Features for the final output;
[0122] Temperature prediction head based on physical enhancement:
[0123] ;
[0124] Where T is the temperature field; α is the thermal diffusivity; Let be the Laplace operator for temperature, represent the second spatial derivative; Q is the internal heat source; ρ is the material density; c p Specific heat capacity; The physical constraint layer provides a discretized approximation of the heat conduction equation; γ represents the physical layer weight; T amb Ambient temperature; The predicted temperature value at time t+h; For conditional features;
[0125] The energy consumption prediction head uses static / dynamic decomposition:
[0126] ;
[0127] Among them, f static It is a static power predictor with a 2-layer MLP structure. The static power consumption is mainly determined by the leakage current. f is the predicted static power consumption value; dynamic It is a dynamic power prediction generator, a 3-layer MLP, with inputs including conditional characteristics and load prediction; This is a dynamic power consumption prediction value; This is the predicted total power consumption value;
[0128] The QoE prediction head uses multidimensional prediction:
[0129] ;
[0130] ;
[0131] ;
[0132] ;
[0133] in, For the predicted response time quality; f resp A 3-layer MLP structure is used for the response time prediction neural network; the smoothness quality prediction value; f smooth For smoothness prediction network; The overall QoE prediction value at time t+h; w r w s w t These are weighting coefficients;
[0134] Smoothness metrics definition: Frame rate stability: The smaller the FPS variance, the higher the smoothness. Frame drop rate: The number of consecutive frame drops affects subjective perception. GPU load fluctuation: Drastic load changes can lead to performance instability. Quantification formula:
[0135] ;
[0136] Where is the stability quality prediction value, with a value range of [0, 1], where 1 indicates extremely stable and 0 indicates frequent anomalies; f stable For stability prediction networks; This is the final predicted QoE value; w r ,w s ,w t The weights are the fusion weights of the three dimensions.
[0137] In this embodiment, the training of the short-term prediction model adopts a two-stage strategy of sharing first and then joint training, as follows:
[0138] In the first phase, the parameters of all task-specific heads are frozen, and only the shared feature extractor is optimized:
[0139] ;
[0140] Where, θ shared For the parameter set of the shared feature extractor; f is the frozen parameter for the i-th task header; shared (X;θ shared ) is a shared feature extraction function, which takes the original features X as input and outputs a shared representation Hshared; i The prediction header function for the i-th task (load, temperature, energy consumption, QoE) has fixed parameters that are not updated; w i Let the weight of the i-th task be denoted as .
[0141] In the second stage, end-to-end global optimization is performed by jointly fine-tuning and freezing all parameters:
[0142] ;
[0143] Wherein, θ contains the complete parameter set for the shared layer and all task headers; L total The overall loss function includes task loss, regularization term and consistency constraint.
[0144] Furthermore, robustness is enhanced through adversarial training. Adversarial training improves the model's robustness to noise and distribution shifts by injecting bounded perturbations into the input, making it particularly suitable for sensor noise and data drift problems in mobile terminal environments.
[0145] Countering optimization objectives:
[0146] ;
[0147] Where δ is the additive input perturbation, which has the same dimension as the input feature X; To constrain the perturbation strength, it is usually set to the standard deviation of the input characteristics; The norm constraint is used to constrain the perturbation; Y is the label corresponding to the input feature matrix X;
[0148] In actual training, the inner layer max optimization is solved by approximation using FGSM, and the loss L is calculated during forward propagation. total (X+δ,Y;θ); Backpropagation calculates the input gradient. Generate adversarial examples: Calculate the final loss on adversarial examples and update the model parameters.
[0149] In this embodiment, based on the prediction, the optimal energy efficiency control quantity that satisfies preset constraints is solved to obtain resource scheduling decisions and system configuration parameters, as detailed below:
[0150] Construct a mathematical model for the optimization problem, with the optimization objective being:
[0151] ;
[0152] Among them, Q target Δu represents the desired QoE target value; Δu represents the change in the control variable sequence.
[0153] The set of constraints is as follows:
[0154] ;
[0155] in, Here is the sequence of control variables to be optimized; H is the time domain length of the predictive control; J is the comprehensive cost function, balancing energy consumption, temperature, QoE, and control smoothness; ω E Energy consumption weight ω T For temperature penalty weights, ω Q ω is the QoE bias weight. R To control smoothness weights; E(t+k), T(t+k), Q(t+k) are the predicted energy consumption, temperature, and QoE at time t+k, respectively; T max This is the upper limit of temperature; Q min The lower bound for QoE; Pbudget is the power consumption budget; u max and u min These are the upper and lower limits of the physical constraints of the control variables, respectively; u(t+k) is the control variable at time t+k; Let be the change in the sequence of control variables at time t+k;
[0156] The control vector u(t) is defined to include the adjustment parameters of the following subsystems, including the CPU operating frequency f. CPU (t) Number of active CPU cores N core (t), power supply voltage V dd (t), Heat dissipation control intensity (fan / liquid cooling) τ thermal (t) and the degree of aggressiveness in task scheduling α sched (t)∈[0,1];
[0157] Define the system state vector x(t) = [L(t), T(t), E(t), Q(t)]; where L(t) is the load, T(t) is the temperature, E(t) is the energy consumption, and Q(t) is the QoE index;
[0158] Establish the state transition equation x(t+1):
[0159] ;
[0160] Where u(t) is the current control input; w(t) is the external disturbance; This is system noise;
[0161] Load dynamic model:
[0162] ;
[0163] Where, ρ L The autocorrelation coefficient β of the load L The coefficient representing the impact of CPU / GPU frequency on load; u comp (t)=f CPU (t) represents computational resource control; γ L W(t) represents the external workload impact coefficient; W(t) represents the external workload (application requests, user interactions, etc.). Model noise for the load;
[0164] A rolling time-domain optimization strategy is employed to solve the finite-time optimal control problem at each time step:
[0165] ;
[0166] in, is the optimal control variable sequence; k is the relative time step index; x(t+k|t) is the state prediction at time t+k based on time t information; x(t+H|t) is the state prediction of the predicted time domain terminal; The stage cost for step k is specifically... , This is the terminal cost function.
[0167] In this embodiment, based on resource scheduling decisions and system configuration parameters, a graph neural network is used to optimize memory access patterns and caching strategies, obtaining dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions. Specifically, based on resource scheduling decisions and system configuration parameters, the optimization problem of the memory subsystem is transformed into a learning and reasoning task on a graph structure. The traditional memory access pattern is modeled as a dynamic heterogeneous graph, where nodes represent memory addresses, cache lines, and application thread entities, and edges represent access relationships, dependencies, and temporal associations. A three-layer heterogeneous graph structure is constructed: the application layer graph describes the resource competition relationships between processes, the memory layer graph depicts the spatial and temporal locality between addresses, and the hardware layer graph models the cache hierarchy and NUMA topology. Graph node features include multi-dimensional attributes such as access frequency, data type, lifecycle, and popularity distribution; edge features encode key information such as access latency, bandwidth requirements, and sharing degree. To capture the dynamic evolution characteristics of memory access, a temporal graph neural network is used. The network architecture learns the importance weights between nodes through a graph attention mechanism and captures the temporal dependencies of access patterns by combining recurrent neural units. Based on the feature representation extracted by the graph neural network, a dynamic memory partitioning module and a multi-level cache replacement strategy are used to optimize and realize the intelligent management of the memory subsystem.
[0168] In this embodiment, the dynamic memory partitioning module models the memory partitioning problem as a community detection task on a graph. It dynamically adjusts the memory partition boundaries by learning the similarity of application access patterns, and employs a differentiable graph segmentation algorithm.
[0169] Define the partition quality function:
[0170] ;
[0171] Where P = {P1, P2, ..., P} K Let} be a partitioning scheme with K partitions, A ij Let be the access affinity between nodes i and j, and λ be the weighting coefficient of the interval communication cost;
[0172] The optimal partitioning scheme is solved by gradient optimization, and combined with the resource allocation decision in stage S4, the memory bandwidth and access latency are optimized in a coordinated manner.
[0173] The multi-level cache replacement strategy optimization is based on a Cache Replacement Network (CRN) with graph attention. This model treats the cache state as a graph structure, where each cache line is a node. Node features include access timestamps, access frequency, and data size information, while edges represent the relationships between cache lines. The replacement decision predicts the eviction probability of each cache line using the graph neural network.
[0174] ;
[0175] in, The training process employs a reinforcement learning framework, using cache hit rate and access latency as reward signals, and optimizes network parameters through a policy gradient method.
[0176] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0177] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0178] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0179] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0180] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals, characterized in that, Includes the following steps: S1: Acquire multi-source energy consumption and scenario data, and preprocess them to obtain a standardized time-series data stream; S2: Based on standardized time-series data streams, perform joint feature engineering and scene label generation to obtain a feature vector matrix with scene labels; S3: Based on the feature vector matrix with scene labels, make short-term predictions on load, temperature, energy consumption, and QoE using a short-term prediction model. S4: Based on the prediction, solve for the energy efficiency optimal control quantity that satisfies the preset constraints, and obtain resource scheduling decisions and system configuration parameters; S5: Based on resource scheduling decisions and system configuration parameters, optimize memory access patterns and caching strategies using graph neural networks to obtain dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions; The short-term prediction model uses a feature vector matrix X with scene labels and scene labels y(s) to train short-term predictions for four related tasks: load, temperature, energy consumption, and QoE. We employ a weighted total loss method to uniformly optimize task error, regularization, and consistency constraints, resulting in an overall objective function. for: ; Among them, L i The supervision loss for task i; w i Let be the dynamic weights for task i; Load, temp, energy, and qoe represent the load, temperature, energy consumption, and QoE prediction tasks, respectively; R(θ) is the regularization, where θ is the set of all learnable parameters; λ and β are the loss weighting coefficients; L consist Loss due to cross-task physical consistency constraints; Physical consistency loss L consist Used to ensure that prediction results conform to physical laws, it is defined as: ; Where α1 and α2 are physical constraint weights, f power and f thermal A predefined physical relationship function based on chip specifications and thermal characteristics; These are the predicted values for load, temperature, and energy consumption, respectively. The training of the short-term prediction model adopts a two-stage strategy of sharing first and then joint training, as follows: In the first phase, the parameters of all task-specific heads are frozen, and only the shared feature extractor is optimized: ; Where, θ shared For the parameter set of the shared feature extractor; f is the frozen parameter for the i-th task header; shared (X;θ shared ) is a shared feature extraction function, which takes the original features X as input and outputs a shared representation Hshared; i The prediction header function for the i-th task has fixed parameters that are not updated; w i Let the weight of the i-th task be denoted as . In the second stage, end-to-end global optimization is performed by jointly fine-tuning and freezing all parameters: ; Wherein, θ contains the complete set of parameters for the shared layer and all task headers; The overall loss function includes task loss, regularization term, and consistency constraint; Robustness is enhanced through adversarial training, where the adversarial optimization objective is: ; Where δ is the additive input perturbation, which has the same dimension as the input feature X; For disturbance strength constraints; The norm constraint is used for the perturbation; Y is the label corresponding to the input feature matrix X. In actual training, the inner layer max optimization is solved by approximation using FGSM, and the loss L is calculated during forward propagation. total (X+δ,Y;θ); Backpropagation calculates the input gradient. Generate adversarial examples: ; Calculate the final loss on adversarial examples and update the model parameters.
2. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 1, characterized in that, The multi-source energy consumption and scenario data includes multi-source data from the terminal side, the field environment, and the power business side. The terminal side includes CPU load, frequency, voltage and current, temperature sensing, memory, and network status. The field environment includes location, indoor and outdoor temperature and humidity, noise, light intensity, operating condition tags, network type, and link quality. The power business side includes task type, work order urgency, security level, energy consumption budget, and carbon intensity parameters. A three-layer acquisition architecture of terminal-edge-cloud is adopted: the terminal side obtains high-frequency indicators through the kernel interface and HA driver, and the WebView hook obtains indicators from the application front-end, back-end, and QoE side. Edge gateways uniformly aggregate site domain sensors and cache them in the nearest location; The cloud accesses edge gateway data via the ESB bus.
3. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 2, characterized in that, The preprocessing is as follows: First, the collected multi-source raw data is structured and standardized to ensure that key fields from different sources are complete and that the timestamp is unified to UTC; for data streams with inconsistent sampling intervals, upsampling or downsampling is performed according to application requirements to align them to a unified time series step size; second, based on rules and statistical models, the completeness and legality of indicator values are verified, and outliers are detected and graded using median filtering; for missing data points in the time series, linear interpolation is used to complete them; Categorical variables and labels are uniformly coded, and sensitive fields are desensitized or obfuscated according to the actual scenario; finally, a standardized time-series data stream is generated.
4. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 1, characterized in that, Based on standardized time-series data streams, joint feature engineering and scene label generation are performed to obtain a feature vector matrix with scene labels, as detailed below: A multi-level feature extraction system is constructed, including time-domain feature extraction and frequency-domain feature extraction; the time-domain feature extraction calculates statistical features, rate of change features, and trend features by setting a multi-scale sliding window for each core indicator. The frequency domain feature extraction employs Discrete Fourier Transform to analyze the signal spectrum, extracting the dominant frequency ratio, frequency band energy distribution, and wavelet multi-resolution coefficients to identify the periodic and burst patterns of the load. Scene label generation utilizes a hybrid strategy of rule-driven, self-supervised clustering, and weakly supervised fusion to achieve intelligent identification and labeling of mobile terminal working scenarios. Rule-driven initial labels are based on power business expert knowledge, constructing multi-condition criteria to identify typical scenarios and generating initial hard labels or probability distributions. Self-supervised clustering labels standardize and reduce the dimensionality of the extracted joint features, using HDBSCAN for unsupervised clustering, calculating confidence weights based on cluster density and stability, and generating pseudo-cluster labels. The weakly supervised fusion mechanism calibrates the rule probabilities through temperature scaling, then weights and fuses them with the cluster probabilities. The final scene label is the category corresponding to the maximum fused probability, and the confidence level is the maximum probability value.
5. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 1, characterized in that, The short-term prediction model employs a shared feature extractor and a task-specific header structure. First, it extracts a general representation H of temporal sequence and context in the shared layer. cond : ; Among them, f shared (·) represents a shared encoder; θ shared For shared layer parameters; e (s) H represents the dense vector representation of scene labels; ⊕ represents the feature concatenation operation; shared X represents the extracted shared features; X is the input standardized temporal feature matrix. The scene label for the current sample; The shared layer employs multi-head attention to characterize temporal dependencies, as detailed below: ; ; Where Q, K, and V are the query, key, and value tensors, respectively, and H is the key tensor. shared obtained by linear projection; d k h is the dimension of the key vector; h is the number of attention heads; W O For multi-head output projection matrix; Head h Let h be the h-th attention head; Concat(·) represents head concatenation; Attention represents the attention mechanism; Multihead represents multi-head attention output; Then, the scene is stitched together and embedded, and fed into each task header for prediction: The load prediction head uses LSTM: ; ; ; Among them, W a, b a W L ,b L For task header parameters; α t Attention weights; This represents the general characteristics at time t; W represents the hidden state of the LSTM from the previous time step. a b is the attention weight matrix; a For attention bias; α t For attention weights at each time step; W L To output the projection matrix; b L For output bias ; Features for the final output; Temperature prediction head based on physical enhancement: ; Where T is the temperature field; α is the thermal diffusivity; Let be the Laplace operator for temperature, represent the second spatial derivative; Q is the internal heat source; ρ is the material density; c p γ is the specific heat capacity; PhysicsLayer(·) is the physical constraint layer; γ is the physical layer weight; T amb The ambient temperature; The predicted temperature value at time t+h; For conditional features; The energy consumption prediction head uses static / dynamic decomposition: ; Among them, f static (·) represents a static power prediction unit; f is the predicted static power consumption value. dynamic (·) represents a dynamic power consumption predictor; This is a dynamic power consumption prediction value; This is the predicted total power consumption value; The QoE prediction head uses multidimensional prediction: ; ; ; ; in, For the predicted response time quality; f resp For response time prediction neural networks, f is the predicted value for smoothness quality. smooth (·) represents the fluency prediction network; fstable(·) represents the stability prediction value; fstable(·) represents the stability prediction network. The overall QoE prediction value at time t+h; w r w s w t These are the weighting coefficients.
6. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 1, characterized in that, Based on the prediction, the optimal energy efficiency control quantity that satisfies preset constraints is solved to obtain resource scheduling decisions and system configuration parameters, as detailed below: Construct a mathematical model for the optimization problem, with the optimization objective being: ; Among them, Q target Δu represents the desired QoE target value; Δu represents the change in the control variable sequence. The set of constraints is as follows: ; in, H represents the sequence of control variables to be optimized; H is the time domain length of the predictive control; J is the comprehensive cost function; ω E As the energy consumption weight, ω T For temperature penalty weights, ω Q ω is the QoE bias weight. R To control smoothness weights; E(t+k), T(t+k), and Q(t+k) are the predicted energy consumption, temperature, and QoE at time t+k, respectively; T max This represents the upper limit of temperature; Q min P is the lower bound of QoE; budget For power consumption budget; u max and u min These are the upper and lower limits of the physical constraints of the control variables, respectively; u(t+k) is the control variable at time t+k; Let be the change in the sequence of control variables at time t+k; The control vector u(t) is defined to include the adjustment parameters of the following subsystems, including the CPU operating frequency f. CPU (t) Number of active CPU cores N core (t), power supply voltage V dd (t), heat dissipation control intensity τ thermal (t) and the degree of aggressiveness in task scheduling α sched (t)∈[0,1]; Define the system state vector x(t) = [L(t), T(t), E(t), Q(t)]; where L(t) is the load, T(t) is the temperature, E(t) is the energy consumption, and Q(t) is the QoE index; Establish the state transition equation x(t+1): ; Where u(t) is the current control input; w(t) is the external disturbance; This is system noise; Load dynamic model L(t+1): ; Where, ρ L The autocorrelation coefficient β of the load L The coefficient representing the impact of CPU frequency on load; u comp (t)=f CPU (t) represents computational resource control; γ L is the external workload influence coefficient; W(t) is the external workload; Model noise for the load; A rolling time-domain optimization strategy is employed to solve the finite-time optimal control problem at each time step: ; in, is the optimal control variable sequence; k is the relative time step index; x(t+k|t) is the state prediction at time t+k based on time t information; x(t+H|t) is the state prediction of the predicted time domain terminal; The stage cost at step k is... This is the terminal cost function.
7. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 1, characterized in that, The method, based on resource scheduling decisions and system configuration parameters, optimizes memory access patterns and caching strategies using graph neural networks to obtain dynamic memory partitioning schemes, cache replacement strategies, and prefetching decisions. Specifically, based on resource scheduling decisions and system configuration parameters, the optimization problem of the memory subsystem is transformed into a learning and reasoning task on a graph structure. Traditional memory access patterns are modeled as a dynamic heterogeneous graph, where nodes represent memory addresses, cache lines, and application thread entities, and edges represent access relationships, dependencies, and temporal associations. A three-layer heterogeneous graph structure is constructed: the application layer graph describes the resource competition relationships between processes, the memory layer graph characterizes the spatial and temporal locality of addresses, and the hardware layer graph models the cache hierarchy and NUMA topology. Graph node features include multi-dimensional attributes such as access frequency, data type, lifecycle, and popularity distribution; edge features encode key information such as access latency, bandwidth requirements, and sharing degree. A temporal graph neural network architecture is adopted, using a graph attention mechanism to learn the importance weights between nodes and combining recurrent neural units to capture the temporal dependencies of access patterns. Based on the feature representation extracted by the graph neural network, a dynamic memory partitioning module and a multi-level cache replacement strategy are used to optimize and achieve intelligent management of the memory subsystem.
8. The method for optimizing the power embedded kernel microarchitecture for low-carbon mobile terminals according to claim 7, characterized in that, The dynamic memory partitioning module models the memory partitioning problem as a community detection task on a graph. It dynamically adjusts the memory partition boundaries by learning the similarity of application access patterns, and employs a differentiable graph segmentation algorithm. Define partition quality function : ; Where P = {P1, P2, ..., P} K Let} be a partitioning scheme with K partitions, A ij Let be the access affinity between nodes i and j, and λ be the weighting coefficient of the interval communication cost; The optimal partitioning scheme is solved by gradient optimization, and combined with the resource allocation decision in stage S4, the memory bandwidth and access latency are optimized in a coordinated manner. The multi-level cache replacement strategy optimization, based on a graph attention-based cache replacement network, models the cache state as a graph structure, where each cache line is a node. Node features include access timestamp, access frequency, and data size information, and edges represent the relationships between cache lines. The replacement decision predicts the eviction probability of each cache line using a graph neural network. : ; in, σ(·) is the final representation of node i after multi-layer graph convolution, and σ(·) is the Sigmoid activation function. The training process adopts a reinforcement learning framework, with cache hit rate and access latency as reward signals, and optimizes network parameters through policy gradient method.