A method and system for power consumption coordination control of an in-vehicle server
Patent Information
- Application Number
- CN202610498326.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-04-15
AI Technical Summary
现有技术通过采集当前处理器占用率并与预设阈值比较的方式触发频率调整,在负载超过阈值时从预置频率电压表中选取对应频率执行调节,该反应式机制无法预判动态变化的计算需求,导致响应滞后和资源浪费
[0027] (1) The present invention obtains the preliminary demand prediction value through the Long Short-Term Memory Network and obtains the target frequency by iteratively optimizing in the frequency-voltage space by combining the Particle Swarm Optimization algorithm. Since the Long Short-Term Memory Network can capture the long-term dependency relationship of the task load and the Particle Swarm Optimization can handle the nonlinear relationship between frequency and energy consumption, the two are integrated to realize prediction-driven optimization. It solves the problem of response lag in the existing technology that only relies on the current load threshold to trigger adjustment and improves the accuracy of resource pre-allocation in dynamic scenarios.
Smart Images

Figure CN122387658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a power consumption collaborative control method and system for an on-board server. Background Technology
[0002] Currently, intelligent transportation and autonomous driving scenarios place stringent demands on the real-time computing power and power consumption control of onboard servers. Due to the complex operating environment of vehicles, the dynamic and ever-changing task loads, and the non-linear relationship between hardware frequency and energy consumption, traditional simple response mechanisms struggle to achieve a balance between high performance and low power consumption. Therefore, there is an urgent need for a technical solution that can accurately predict future computing demands and coordinate the adjustment of processor core frequency and voltage through a microcontroller to ensure system real-time performance and optimize energy efficiency during sudden load and road condition changes.
[0003] In a prior art, the power consumption control method of an in-vehicle server collects real-time task load data of the processor cores through a performance monitoring unit to obtain the current processor utilization rate. The system compares the current processor utilization rate with a preset fixed load threshold. When the current processor utilization rate exceeds the preset high load threshold, it reads the fixed operating frequency value corresponding to that load level from a pre-stored hardware configuration table and adjusts the processor core's operating frequency to that fixed frequency value. When the current processor utilization rate is lower than the preset low load threshold, the processor core's operating frequency is reduced to the preset low power frequency value. After completing the frequency adjustment, the system continues to monitor the processor utilization rate, waiting for the next load fluctuation to trigger frequency adjustment. This prior art triggers frequency adjustment by collecting the current processor utilization rate and comparing it with a preset threshold, and selects the corresponding frequency from a preset frequency voltage table to perform adjustment when the load exceeds the threshold. This reactive mechanism cannot predict dynamically changing computing demands, leading to response lag and resource waste.
[0004] Therefore, existing technologies cannot achieve a dynamic balance between energy consumption and performance. Summary of the Invention
[0005] This invention provides a power consumption collaborative control method and system for an in-vehicle server to achieve a dynamic balance between energy consumption and performance.
[0006] Firstly, in order to solve the above-mentioned technical problems, the present invention provides a power consumption collaborative control method for an in-vehicle server, comprising:
[0007] Acquire the operating status sequence, real-time occupancy time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence;
[0008] The running status sequence and the real-time occupancy rate time series are input into a pre-constructed long short-term memory network model to obtain preliminary demand prediction values;
[0009] If the preliminary demand prediction value exceeds the preset preliminary demand threshold, a frequency search range and a voltage search range are constructed with the real-time operating frequency and the real-time voltage level as the center, and particle swarm optimization is performed based on the frequency search range and the voltage search range to obtain the target frequency.
[0010] The optimal working combination is selected based on the target frequency and the real-time traffic load.
[0011] The computing power demand density is calculated based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, the frequency is gradually increased to obtain the energy consumption control parameters.
[0012] Based on the energy consumption control parameters, load deviation analysis is performed to obtain a high-deviation load subset, and the samples are expanded based on the high-deviation load subset to obtain a comprehensive training dataset.
[0013] Based on the comprehensive training dataset, the model is trained and optimized to obtain an improved prediction model;
[0014] The improved demand prediction value is obtained by inputting the operating status sequence and the real-time occupancy rate time series into the improved prediction model, and the effectiveness is confirmed by comparing the deviation between the actual demand value and the improved demand prediction value.
[0015] Based on the validity confirmation result and the stable state sequence, the configuration parameters are updated to obtain updated configuration parameters, and a cooperative control command is generated and executed based on the updated configuration parameters.
[0016] Secondly, the present invention provides a power consumption collaborative control system for an in-vehicle server, comprising:
[0017] The data acquisition module is used to acquire the operating status sequence, real-time occupancy rate time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence.
[0018] The preliminary prediction module is used to input the running status sequence and the real-time occupancy rate time series into a pre-built long short-term memory network model to obtain preliminary demand prediction values;
[0019] The frequency optimization module is used to construct a frequency search range and a voltage search range centered on the real-time operating frequency and the real-time voltage level if the preliminary demand prediction value exceeds the preset preliminary demand threshold, and to perform particle swarm iterative optimization based on the frequency search range and the voltage search range to obtain the target frequency.
[0020] The combination filtering module is used to filter out the optimal working combination based on the target frequency and the real-time traffic load;
[0021] The step-by-step frequency ramping module is used to calculate the computing power demand density based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, step-by-step frequency ramping is performed to obtain energy consumption control parameters.
[0022] The sample amplification module is used to perform load deviation analysis based on the energy consumption control parameters, obtain a high-deviation load subset, and perform sample amplification based on the high-deviation load subset to obtain a comprehensive training dataset.
[0023] The model training module is used to train and select the best model based on the comprehensive training dataset to obtain an improved prediction model.
[0024] The effective confirmation module is used to input the running status sequence and the real-time occupancy rate time series into the improved prediction model to obtain the improved demand prediction value, and compare the deviation between the actual demand value and the improved demand prediction value to obtain the effective confirmation result;
[0025] The output module is used to update the configuration parameters based on the validity confirmation result and the stable state sequence, obtain updated configuration parameters, and generate and execute cooperative control instructions based on the updated configuration parameters.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] (1) The present invention obtains the preliminary demand prediction value through the Long Short-Term Memory Network and obtains the target frequency by iteratively optimizing in the frequency-voltage space by combining the Particle Swarm Optimization algorithm. Since the Long Short-Term Memory Network can capture the long-term dependency relationship of the task load and the Particle Swarm Optimization can handle the nonlinear relationship between frequency and energy consumption, the two are integrated to realize prediction-driven optimization. It solves the problem of response lag in the existing technology that only relies on the current load threshold to trigger adjustment and improves the accuracy of resource pre-allocation in dynamic scenarios.
[0028] (2) The present invention calculates the computing power demand density based on the optimal working combination. When the burst computing power threshold is exceeded, the frequency is gradually increased and the voltage is matched. The voltage-frequency pair that meets the response delay constraint and has the lowest energy consumption is selected by the power consumption calculation model. Since the frequency is gradually increased, the frequency-voltage combination space can be explored in detail. The response delay constraint ensures that real-time performance and energy consumption are met at the same time. It solves the contradiction between real-time performance and minimum energy consumption under burst load in the existing technology. It achieves a dynamic balance between performance and energy efficiency.
[0029] (3) The present invention extracts the historical occupancy rate time series and obtains the trend and seasonal components through STL decomposition. After calculating the load deviation, high deviation segments are selected. The sample is amplified by time domain stretching, compression and random perturbation to generate a comprehensive training dataset. Since the deviation identification accurately locates the weak link of the prediction model, the data augmentation effectively expands the edge scene samples. It solves the problem that the existing prediction model cannot continuously adapt to complex road condition changes and improves the prediction accuracy and system stability under long-term operation. Attached Figure Description
[0030] Figure 1 This is a schematic flowchart of the power consumption collaborative control method for an in-vehicle server provided in the first embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of the power consumption collaborative control system structure of the vehicle server provided in the second embodiment of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Reference Figure 1 The first embodiment of the present invention provides a power consumption collaborative control method for an in-vehicle server, comprising the following steps:
[0034] S11, obtain the operating status sequence, real-time occupancy rate time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value and stable state sequence;
[0035] S12, input the running status sequence and the real-time occupancy rate time series into the pre-constructed long short-term memory network model to obtain the preliminary demand prediction value;
[0036] S13, if the preliminary demand prediction value exceeds the preset preliminary demand threshold, construct a frequency search range and a voltage search range with the real-time operating frequency and the real-time voltage level as the center, and perform particle swarm optimization based on the frequency search range and the voltage search range to obtain the target frequency;
[0037] S14, Select the optimal working combination based on the target frequency and the real-time traffic load;
[0038] S15, calculate the computing power demand density based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, perform step-by-step frequency increase to obtain energy consumption control parameters.
[0039] S16. Based on the energy consumption control parameters, perform load deviation analysis to obtain a high-deviation load subset, and perform sample amplification based on the high-deviation load subset to obtain a comprehensive training dataset.
[0040] S17. Based on the comprehensive training dataset, perform model training and selection to obtain an improved prediction model;
[0041] S18, input the running status sequence and the real-time occupancy rate time series into the improved prediction model to obtain the improved demand prediction value, and compare the deviation between the actual demand value and the improved demand prediction value to obtain the effectiveness confirmation result;
[0042] S19, based on the validity confirmation result and the stable state sequence, update the configuration parameters to obtain updated configuration parameters, and generate and execute cooperative control instructions based on the updated configuration parameters.
[0043] In step S11, the operating status sequence, real-time occupancy rate time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence are obtained.
[0044] Specifically, vehicle operating status data is collected in real time through an onboard sensor network, including vehicle speed monitoring, engine temperature changes, and fuel consumption rate. Vehicle speed monitoring is obtained by sampling from a vehicle speed sensor and reflects the current driving conditions. Engine temperature changes are continuously collected by temperature sensors located in the coolant lines and are used to monitor the engine's thermal load. Fuel consumption rate is calculated by the engine control unit based on injection pulse width and fuel density, and is used to help infer the vehicle's power demand. These three types of data constitute the basic input describing the vehicle's physical operating conditions, i.e., the operating state sequence.
[0045] Data related to processor load is obtained through the performance monitoring unit. Real-time utilization time-series data is continuously collected by the performance monitoring unit, showing the processor core utilization rate at the current moment, also expressed as a percentage.
[0046] The processor core's voltage and frequency adjustment interface reads current hardware operating parameters. The real-time operating frequency, measured in gigahertz (GHz), is read from a specific status register of the core, representing the current clock frequency of the processor. The real-time voltage level, measured in volts, is read from the voltage output register of the power management unit (Power Management Unit), representing the current voltage supplying the core. Simultaneously, the voltage fluctuation amplitude, measured in volts, is read from the Power Management Unit; this is the standard deviation or maximum difference of voltage samples over a fixed time window, used to assess power supply stability.
[0047] Real-time data related to the external environment and task load is collected. Real-time traffic load is obtained by statistically analyzing the data streams from sensors such as vehicle cameras, LiDAR, and millimeter-wave radar. Specifically, it is the total number of data packets or the total amount of data generated within a unit time window, measured in bytes per second or megabytes per second, used to quantify the data load caused by changes in the external environment. The actual demand value is obtained from the performance monitoring unit and is the actual processor utilization data required in subsequent verification steps. Its collection method is predefined in step S11, namely, the monitoring unit records the utilization value at the current moment in real time.
[0048] Hardware monitoring data related to system stability is acquired. Motherboard temperature is read in degrees Celsius using a temperature sensor located on the motherboard, used to assess heat dissipation. Fan speed is read in revolutions per minute (rpm) from the fan controller, used to evaluate the cooling system's operating status. Voltage fluctuations are read in volts or percentages from the power management chip or voltage sensor, used to monitor power supply stability and fluctuation amplitude. These three hardware monitoring data constitute a stable state sequence. All of the above data is input to the central control unit of the onboard server in digital signal form and aligned according to a unified timestamp.
[0049] In step S12, the running state sequence and the real-time occupancy rate time series are input into a pre-constructed long short-term memory network model to obtain preliminary demand prediction values, including:
[0050] Based on the operating state sequence, the pre-built ARMA model is used to extract the time-series features of the pre-stored historical occupancy rate time series to obtain the load fluctuation results;
[0051] Based on the load fluctuation results, processor utilization is predicted using the Long Short-Term Memory network model to obtain the preliminary core utilization. The root mean square error between the preliminary core utilization and the real-time utilization is calculated to obtain the prediction deviation value.
[0052] When the prediction deviation value does not exceed the preset prediction deviation threshold, the preliminary core occupancy rate is directly used as the refined prediction sequence.
[0053] When the prediction deviation value exceeds the prediction deviation threshold, the weight coefficients of the long short-term memory network model are updated through the backpropagation algorithm, and the occupancy rate is predicted again until the prediction deviation value does not exceed the prediction deviation threshold, thus obtaining a refined prediction sequence.
[0054] Based on the refined forecast sequence, the sequence expansion operation is performed using a pre-built ARIMA model to obtain the preliminary demand forecast value.
[0055] Specifically, based on the operational status sequence, an ARMA model is applied to extract time-series features from the pre-stored historical occupancy time series. Vehicle monitoring speed, engine temperature changes, and fuel consumption rate from the operational status sequence are used as exogenous variables, forming a multivariate time series with the historical occupancy time series. An ARMAX model with exogenous variables is used for fitting, and the model parameters are estimated using the least squares method. The residual sequence after model fitting is used as the load fluctuation result. The historical occupancy time series is read from the system log database, recording the processor core occupancy rate at each sampling moment within a preset time period (e.g., 10 minutes), stored as a percentage in the time series. Data preprocessing first requires a stationarity test; if the sequence is non-stationary, first-order differencing is performed until stationarity is achieved. The ARMA model is constructed using the Box-Jenkins method. The autoregressive order and moving average order are initially determined by analyzing the autocorrelation function and partial autocorrelation function graphs of the differencing sequence. Then, the optimal order combination is selected by traversing the candidate order range and using the Akaike information criterion. The model parameters are estimated using the least squares method to obtain the autoregressive coefficients and moving average coefficients. The estimated model is used to calculate the fitted value, and the residual between the fitted value and the original value is used as the load fluctuation result, which characterizes the fluctuation component in historical load that was not explained by the model.
[0056] Load fluctuation results are used as feature vectors and input into a pre-built Long Short-Term Memory (LSTM) network model for processor utilization prediction. The model is built based on a historical database, with data sourced from load fluctuation results and corresponding actual processor utilization over the past year. Data preprocessing involves calculating the arithmetic mean and standard deviation of each value in the load fluctuation results across all training samples, then subtracting the arithmetic mean from the value and dividing by the standard deviation to obtain the load fluctuation result. The model structure employs a three-layer architecture, including an input layer, a hidden layer, and an output layer. The input layer dimension is equal to the normalized load fluctuation result dimension. The hidden layer contains 128 memory units, using the hyperbolic tangent function as the activation function and the sigmoid function as the recurrent activation function. The output layer outputs a single neuron, predicting the processor utilization at a single future time point. The number of hidden layer units is determined through cross-validation, using the minimum mean squared error on the validation set as the criterion. The Adam optimizer was used during training, with an initial learning rate of 0.001, a loss function of mean squared error, a batch size of 64, and 200 training epochs. An early stopping strategy was implemented, stopping training when the validation set loss did not decrease for 10 consecutive epochs. The weight parameters were saved after model training. During prediction, the current load fluctuation result was subtracted from the training sample mean in the same manner, then divided by the training sample standard deviation, and input into the model for forward propagation calculation to obtain the preliminary core occupancy rate.
[0057] The root mean square error (RMSE) between the initial core occupancy rate and the real-time occupancy rate time series is calculated. The real-time occupancy rate time series is continuously collected by the performance monitoring unit. After aligning with the predicted values by time, the square of the difference at each time point is calculated, summed, divided by the number of points, and then the square root is taken to obtain the prediction deviation value. The preset prediction deviation threshold is determined through historical error distribution. Specifically, the absolute error values of each prediction point on the validation set over the past three months are collected, these error values are sorted from smallest to largest, and the value at the 90th percentile after sorting is used as the threshold. When the prediction deviation value is below this threshold, the initial core occupancy rate is directly used as the refined prediction sequence. If it exceeds the threshold, an online model update is triggered. The backpropagation algorithm is used to calculate the gradient of the loss function with respect to each weight. The weights are updated along the negative gradient direction, with the learning rate fixed at 0.001. After the update, prediction is performed again. This process is repeated until the deviation value is below the threshold, resulting in the refined prediction sequence.
[0058] The refined forecast sequence is input into a pre-built ARIMA model for sequence expansion. The ARIMA model is constructed based on refined forecast sequences stored in a historical database for the past year. During construction, a unit root test is performed on the refined forecast sequence. The test statistic is calculated based on the autoregressive coefficients of the sequence. If the test statistic is less than the critical value, the sequence is considered stationary; otherwise, first-order differencing is performed and the test is repeated until the sequence becomes stationary, thus determining the differencing order. Then, the autocorrelation function and partial autocorrelation function plots of the stationary sequence are analyzed to initially determine the range of the autoregressive and moving average orders. The model parameters are then fitted using maximum likelihood estimation within the candidate order range, and the order set with the smallest Akaike Information Criterion value is selected as the final model order. In the parameter estimation stage, the maximum likelihood estimation algorithm is used to train the model parameters. Assuming the error term follows a normal distribution, the autoregressive coefficients, moving average coefficients, and error term variance are obtained by maximizing the likelihood function. During extended calculations, starting from the current refined prediction sequence, the estimated model parameters are used to recursively generate prediction values for future preset durations (e.g., the next 5 minutes), forming preliminary demand prediction values.
[0059] In step S13, if the preliminary demand prediction value exceeds a preset preliminary demand threshold, a frequency search range and a voltage search range are constructed centered on the real-time operating frequency and the real-time voltage level. Particle swarm optimization is then performed based on the frequency search range and the voltage search range to obtain the target frequency, including:
[0060] When the preliminary demand forecast value does not exceed the preset preliminary demand threshold, the real-time operating frequency is directly used as the target frequency.
[0061] When the preliminary demand forecast exceeds the preliminary demand threshold, a frequency search range is constructed with the real-time operating frequency as the center and a preset frequency adjustment range is used, and a voltage search range is constructed with the real-time voltage level as the center and a preset voltage adjustment range and a preset voltage adjustment step size are used.
[0062] Based on the frequency search range and the voltage search range, particle initialization is performed using a particle swarm optimization algorithm to obtain a particle swarm distribution matrix containing the lowest energy fitness.
[0063] When the lowest energy fitness in the particle swarm distribution matrix is lower than a preset energy fitness threshold, the frequency of the particle corresponding to the lowest energy fitness is extracted to obtain the target frequency.
[0064] When the minimum energy fitness in the particle swarm distribution matrix is not lower than the energy fitness threshold, the particle swarm optimization algorithm is used to iteratively optimize the particle swarm distribution matrix until the minimum energy fitness in the particle swarm distribution matrix is lower than the energy fitness threshold or the preset maximum number of iterations is reached, thereby obtaining the target frequency.
[0065] Specifically, the preliminary demand forecast value output in step S12 and the real-time operating frequency and real-time voltage level obtained in step S11 are read. The preset preliminary demand threshold is determined through historical load data, using the 90th percentile of the maximum processor utilization rate during all normal operating periods over the past year as the threshold. When the preliminary demand forecast value does not exceed this threshold, it indicates that the future load pressure is relatively low, and there is no need to adjust the frequency; the real-time operating frequency is directly output as the target frequency.
[0066] When the initial demand forecast exceeds the initial demand threshold, the frequency optimization process is initiated. A frequency search range is constructed centered on the real-time operating frequency, combined with a preset frequency adjustment range. The frequency adjustment range is determined according to the safe operating frequency boundaries specified in the processor chip datasheet. Using the real-time operating frequency as a reference, the distances to the lowest and highest frequencies are calculated separately, and the smaller of the two values is taken as the single-sided adjustment range, ensuring that the search range does not exceed the chip's physical limitations. The resulting frequency search range is a continuous closed interval, with its lower limit being the real-time operating frequency minus the adjustment range, and its upper limit being the real-time operating frequency plus the adjustment range. Simultaneously, a voltage search range is constructed centered on the real-time voltage level, combined with a preset voltage adjustment range and voltage adjustment step size. The voltage adjustment range is determined according to the power management unit hardware specifications, using the lower and upper limits of the chip's normal operating voltage as the adjustment range. The voltage adjustment step size is determined by the voltage output accuracy of the power management unit and is a fixed value read from a hardware register. The voltage search range is constructed by starting from the lower limit of the voltage adjustment range and incrementally increasing the voltage value step by step until the upper limit is exceeded. All generated voltage values constitute a discrete voltage set, ensuring that each voltage value in the set is an accurate value that the hardware can actually output.
[0067] Based on the frequency and voltage search ranges, a particle swarm optimization algorithm is used for optimization. First, the particle swarm is initialized with a preset particle count of 30. This number is determined through simulation experiments. The convergence speed and stability of the algorithm under different particle counts are tested offline, and the minimum particle count that can stably converge within 50 iterations is selected as the preset value. The simulation experiments run the optimization algorithm with different particle counts, such as 10, 20, 30, 40, and 50, to evaluate its convergence algebra and result variance in solving typical vehicle load optimization problems. The minimum particle count refers to the minimum number of iterations whose convergence algebra is less than the preset maximum allowable number of iterations (e.g., 100) and whose result variance is less than the allowable threshold across all test counts. Based on this criterion, 30 is determined as the minimum particle count. The position of each particle consists of a frequency value and a voltage value. The frequency value is randomly and uniformly initialized within the frequency search range, and the voltage value is randomly selected from the voltage search range. The velocity of each particle is initialized to zero. Then, the energy fitness of each particle is calculated, with the fitness function defined as the ratio of instantaneous power consumption to performance. Instantaneous power consumption is estimated using a processor power consumption model, which is based on the product of the cube of frequency and the square of voltage, with performance approximated by frequency values. The ratio of instantaneous power consumption to frequency is calculated for each particle, and the reciprocal of this ratio is taken as the fitness value; a smaller fitness indicates lower energy consumption. After initial calculations, an initial particle swarm distribution matrix containing the position and fitness of each particle is obtained, and the individual optimal position of each particle and the global optimal position of the entire swarm are recorded.
[0068] The preset energy consumption fitness threshold was determined through offline simulation. All possible frequency-voltage combinations were traversed, and the energy consumption fitness value for each combination was recorded. The 10th percentile of the fitness values across all combinations was used as the threshold. The preset maximum number of iterations was 100, determined by testing the convergence of the algorithm under different iteration counts. The particle swarm optimization algorithm was run in offline simulation, and the change in the global optimal fitness after each iteration was recorded. Convergence was considered achieved when the change was less than 0.001 for 20 consecutive iterations. The maximum number of iterations at which most test cases converged was used as the preset value. The global optimal fitness in the initial particle swarm distribution matrix was compared with the energy consumption fitness threshold. If the global optimal fitness was lower than the threshold, the frequency value corresponding to the optimal particle was directly extracted as the target frequency; otherwise, the iterative optimization phase began.
[0069] In each iteration, the velocity of each particle is updated based on its current velocity, individual optimal position, and global optimal position. The update rule is: velocity equals the inertia weight multiplied by the current velocity, plus the cognitive coefficient multiplied by a random number multiplied by the difference between the individual optimal position and the current position, plus the social coefficient multiplied by a random number multiplied by the difference between the global optimal position and the current position. The inertia weight is preset to 0.7, and both the cognitive and social coefficients are preset to 1.5. These coefficients are determined through parameter tuning experiments. In offline simulations, combinations of inertia weights from 0.4 to 1.2 and cognitive and social coefficients from 0.5 to 2.5 are explored, and the combination that results in the fastest convergence speed of the algorithm on the standard test function is selected as the preset value. The random number is a uniformly distributed random number between 0 and 1. The particle position is updated based on the updated velocity. If the frequency component exceeds the frequency search range after the update, its value is truncated, i.e., set as a boundary value. The voltage component is mapped by finding the voltage value closest to the updated voltage value within the voltage search range to ensure that the voltage is always a discrete and valid value. After the update, the energy fitness of each particle is recalculated, and the individual optimal and global optimal values are updated. The iteration continues until the global optimal fitness falls below the energy consumption fitness threshold, or the maximum number of iterations is reached. After the iteration ends, the frequency value corresponding to the final global optimal particle is output as the target frequency.
[0070] In step S14, the optimal working combination is selected based on the target frequency and the real-time traffic load, including:
[0071] Based on the target frequency, voltage levels are matched using a preset frequency-voltage relationship table to obtain a set of matching voltages;
[0072] Calculate the rate of change of the real-time road load within a preset sliding time window to obtain the road condition change rate;
[0073] When the road condition change rate does not exceed the preset road condition change rate threshold, the target frequency and the smallest matching voltage in the matching voltage set are directly combined into the optimal working combination.
[0074] When the road condition change rate exceeds the road condition change rate threshold, the target frequency is combined with each matching voltage in the matching voltage set to obtain a candidate working combination;
[0075] Based on the candidate working combinations, power consumption is estimated using a pre-built power consumption calculation model to obtain an instantaneous power consumption sequence. The candidate working combination corresponding to the minimum instantaneous power consumption in the instantaneous power consumption sequence is then selected to obtain the optimal working combination.
[0076] Specifically, the target frequency output in step S13 and the real-time traffic load collected in step S11 are read. The preset frequency-voltage relationship table is constructed through laboratory testing. During the verification phase before chip mass production, all processor samples of the same model are scanned and tested. At each candidate frequency level, the supply voltage is gradually reduced until the processor encounters a calculation error. The lowest stable voltage value that just avoids the error is recorded, and this voltage is used as the nominal voltage for that frequency. At the same time, considering individual chip differences and temperature effects, an additional set of backup voltage values slightly higher than the nominal voltage is added to form a mapping table for multiple voltage levels corresponding to each frequency.
[0077] Each frequency level corresponds to a voltage level including a nominal voltage and at least one backup voltage. The nominal voltage is determined by chip scanning tests. By gradually reducing the supply voltage at a fixed frequency until the processor encounters a calculation error, the critical voltage at which no error occurs is raised by 5% to become the nominal voltage. The backup voltage is generated step by step upward according to the minimum adjustable step size of the power management unit, based on the nominal voltage. A maximum of three backup voltages are generated, and each backup voltage does not exceed the maximum operating voltage specified in the chip datasheet.
[0078] Based on the target frequency, the voltage relationship table is consulted to obtain all voltage levels associated with that frequency. These voltage values are then arranged in ascending order to form a matching voltage set. All voltage values in this set are discrete values that the hardware can actually output, including nominal voltage and standby voltage. The rate of change of real-time road load within a preset sliding time window is calculated. The length of the sliding time window is determined through offline analysis of historical road condition change patterns. Sensor data sequences are extracted from historical data, and the fluctuation amplitude of the rate of change of data volume under different window lengths is statistically analyzed. The window length that results in the most stable fluctuation amplitude is selected as the preset value, for example, 10 seconds. The rate of change is calculated by taking the average load within the most recent window length at the current time point, comparing it with the average load within the previous window length, calculating the difference between the two, and dividing by the average load within the previous window length to obtain the road condition change rate.
[0079] The preset road condition change rate threshold is determined through historical data statistics. Road condition change rate data for all driving periods over the past year are collected, sorted from smallest to largest, and the value at the 90th percentile after sorting is taken as the threshold. When the road condition change rate does not exceed this threshold, the voltage combination with the lowest energy consumption is directly adopted and identified as the optimal working combination. When the road condition change rate exceeds the threshold, the target frequency is combined with each voltage value in the matching voltage set to generate multiple candidate working combinations.
[0080] To evaluate the instantaneous power consumption of each candidate combination, a power consumption calculation model was pre-constructed. This model was built based on fitting the physical formulas of processor power consumption characteristics with experimental data. The data came from power consumption tests conducted on the target processor in the laboratory. All available frequency ranges of the processor were selected, with each frequency point corresponding to multiple available voltage levels. A fixed computational task was run under each frequency-voltage combination, and the real-time power consumption values of the processor cores were recorded using a high-precision power analyzer. Each combination was measured multiple times, and the average value was taken to form a training sample set. The model structure adopted a multinomial regression form, specifically expressed as: instantaneous power consumption equals a constant term plus the product of frequency and coefficient, plus the product of the cube of frequency and coefficient, plus the product of the square of voltage and coefficient. The constant term fits the static power consumption, the frequency and frequency cube terms fit the frequency-related dynamic power consumption, and the voltage square term fits the voltage-related dynamic power consumption. The model order and the selection of terms were determined by comparing the goodness of fit under different combinations, and the combination of terms that maximized the coefficient of determination was selected. The data preprocessing method involves calculating the arithmetic mean and standard deviation of the frequencies in all training samples for each frequency value in the sample set. Then, the arithmetic mean is subtracted from the frequency value, and the result is divided by the standard deviation to obtain the normalized frequency value. The same normalization process is applied to each voltage value, calculating the arithmetic mean and standard deviation of the voltage values in all training samples. Parameter estimation is performed using the least squares method, obtaining the specific values of each coefficient by solving the normal equation. When using the model, the mean and standard deviation of the frequencies and voltage values from the training samples are used for centering and scaling, and then substituted into the expression with the determined coefficients to calculate the estimated instantaneous power consumption.
[0081] For example, in a laboratory environment, a standard load test program is run on each available frequency voltage combination of the processor, and a power analyzer is used to record the steady-state power consumption value. Each combination is measured repeatedly for no less than ten times and the arithmetic mean is taken as the training sample. The least squares method is used to estimate the coefficients, and the goodness of fit of the model is evaluated by cross-validation. A coefficient of determination greater than 0.95 is considered valid.
[0082] For each candidate operating combination, the frequency and voltage values in the combination are input into the power consumption calculation model to obtain the corresponding instantaneous power consumption estimate. The estimated values of all candidate combinations constitute an instantaneous power consumption sequence. Finally, the magnitudes of the values in this sequence are compared, the minimum value is found, and the candidate operating combination corresponding to the minimum value is determined as the optimal operating combination.
[0083] In step S15, the computing power demand density is calculated based on the optimal working combination. If the computing power demand density exceeds a preset burst computing power threshold, the energy consumption control parameters are obtained by gradually increasing the frequency, including:
[0084] The processor parameters are updated according to the optimal work combination, the processor operation process is monitored, the task arrival rate and average execution cycle are obtained, and the task arrival rate and the average execution cycle are multiplied to obtain the computing power demand density.
[0085] When the computing power demand density does not exceed the preset burst computing power threshold, the optimal working combination is directly used as the energy consumption control parameter.
[0086] When the computing power demand density exceeds the burst computing power threshold, the frequency value is adjusted upward step by step according to the optimal working combination and the preset frequency increase step size to obtain a candidate frequency set. Then, according to the candidate frequency set, the voltage level is matched through the frequency-voltage relationship table to obtain a voltage-frequency pair set.
[0087] Based on the voltage-frequency pair set, power consumption is estimated using the power consumption calculation model to obtain a preliminary energy consumption set. Then, the voltage-frequency pair corresponding to the preliminary energy consumption set that satisfies the preset response delay constraint and has the lowest energy consumption is selected to obtain energy consumption control parameters.
[0088] Specifically, the optimal working combination output in step S14 is read. Based on the frequency and voltage values in this optimal working combination, parameters are written through the voltage-frequency adjustment interface to update the processor parameters, enabling the core to operate according to the new frequency-voltage combination. During processor operation, task queue data is collected in real time through the performance monitoring unit. The number of newly arriving tasks within a unit time window is counted to obtain the task arrival rate, measured in tasks per second. The number of processor clock cycles consumed by each task is counted, and the arithmetic mean of the number of clock cycles consumed by all tasks is calculated to obtain the average execution cycle, measured in clock cycles per task. The task arrival rate is multiplied by the average execution cycle to obtain the computing power demand density.
[0089] The preset burst computing power threshold is determined through historical data statistics. Workload data for processors during all normal operating periods over the past year is collected, and the computing power demand density value at each moment is calculated. These values are then sorted from smallest to largest, and the value at the 95th percentile after sorting is used as the threshold. When the computing power demand density does not exceed this threshold, no adjustment is needed; the optimal workload combination is directly output as the energy consumption control parameter.
[0090] When the computing power demand density exceeds the burst computing power threshold, the frequency voltage needs to be adjusted to meet real-time requirements. At this time, the most stringent task completion time limit among the currently executing tasks is read from the task scheduler and used as the response latency constraint. Specifically, the task scheduler obtains the completion time limits of all tasks pending execution in the current processor task queue, and the minimum completion time limit is taken as the response latency constraint. If there are no tasks pending execution in the task queue, the response latency constraint is set to a preset default value, which is a fixed duration set according to the system's real-time requirements. The response latency constraint is a dynamically acquired time value in milliseconds, indicating that the processor must complete the current task within a specified time.
[0091] Based on the current frequency value in the optimal working combination, the frequency value is adjusted upwards step by step according to a preset step size. The step size is determined by the processor hardware specifications, for example, 0.1 GHz, which can be determined by consulting the list of supported frequency levels defined in the processor chip datasheet. The difference between two adjacent frequency levels is used as the step size. If the processor supports stepless frequency conversion, the smallest adjustable frequency unit of the processor is used as the step size, that is, a new frequency is generated by increasing the step size by one value each time. Starting from the current frequency, the step size is increased by one value each time until the highest operating frequency supported by the processor is reached, generating multiple candidate frequency values, which constitute a candidate frequency set. For each candidate frequency value in the candidate frequency set, the voltage level is matched using the frequency-voltage relationship table described in step S14. The list of voltage values corresponding to the frequency is consulted, and each candidate frequency is combined with its matching voltage value to form a voltage-frequency pair. All voltage-frequency pairs constitute a voltage-frequency pair set.
[0092] For each voltage frequency pair in the voltage-frequency pair set, power consumption is estimated using the power consumption calculation model pre-built in step S14. The frequency and voltage values of the voltage-frequency pair are input into the power consumption calculation model, and the model normalizes the input frequency and voltage values according to the preprocessing method used during training. After all voltage frequency pairs have been calculated, a preliminary energy consumption set is obtained, which contains each voltage frequency pair and its corresponding instantaneous power consumption value.
[0093] Voltage-frequency pairs that satisfy the response delay constraint are selected from the initial energy consumption set. Satisfaction of the response delay constraint is determined by estimating the task execution time, i.e., the task execution time equals the average execution cycle divided by the frequency value. The average execution cycle is in clock cycles, the frequency value is in Hertz, and the calculated task execution time is in seconds. For ease of comparison with the response delay constraint, the task execution time is uniformly converted to milliseconds. If this value is less than the response delay constraint, the requirement is considered met. Among the voltage-frequency pairs that satisfy the response delay constraint, their instantaneous power consumption values are compared, and the voltage-frequency pair with the lowest power consumption value is identified and determined as the energy consumption control parameter.
[0094] In step S16, load deviation analysis is performed based on the energy consumption control parameters to obtain a high-deviation load subset, and sample amplification is performed based on the high-deviation load subset to obtain a comprehensive training dataset, including:
[0095] Extract the historical occupancy rate time series corresponding to the energy consumption control parameters to obtain the associated load time series, and extract the components according to the associated load time series using the STL decomposition algorithm to obtain the trend component and the seasonal component.
[0096] The trend component and the seasonal component are added at corresponding time points to obtain the expected load sequence, and the point-by-point difference between the associated load time series and the expected load sequence is calculated to obtain the load deviation sequence.
[0097] Extract the maximum value of the load deviation sequence within the preset sliding deviation window to obtain the local maximum deviation;
[0098] The high-deviation load subset is obtained by filtering out the segments corresponding to the local maximum deviation exceeding the preset local maximum deviation threshold from the load deviation sequence;
[0099] Based on the high-bias load subset, the samples are amplified by time-domain stretching, compression, or adding random perturbations to generate an expanded sample set. The expanded sample set is then merged with the pre-stored original training dataset to obtain a comprehensive training dataset.
[0100] Specifically, the energy consumption control parameters output in step S15 are read. Based on the time interval corresponding to these energy consumption control parameters, the historical utilization rate time series within that time interval is extracted from the historical database to obtain the associated load time series. The historical utilization rate time series is a sequence of processor core utilization percentage values recorded in the past, while the associated load time series is the actual load data within that time period. The STL decomposition algorithm is applied to the associated load time series to separate the trend and seasonal components. STL decomposition extracts the trend and seasonal components successively through local weighted regression, setting the seasonal cycle length to one day, corresponding to the periodic load pattern within 24 hours. In the inner loop, the seasonal component is obtained by smoothing and removing the current trend from the sequence. In the outer loop, the residual is calculated and the robustness weight is adjusted to reduce the impact of outliers. This process is iterated until convergence, and the trend and seasonal components are output.
[0101] The trend component and seasonal component are added at their corresponding time points to reconstruct the expected load sequence, which represents the load pattern that should occur according to historical patterns. The difference between the associated load time series and the expected load sequence at each time point is calculated to obtain the load deviation sequence. This sequence quantifies the degree of deviation between the actual load and the expected pattern, with each time point corresponding to a deviation value.
[0102] A preset sliding deviation window length is established, determined by analyzing the duration distribution of historical deviations. All deviation value sequences from the past year are collected, and the duration of consecutive deviations exceeding the average is statistically analyzed. The duration at the 90th percentile is used as the preset window length, for example, 5 minutes. The window is then slid across the load deviation sequence at this length, extracting the maximum value within each window's coverage area to obtain the local maximum deviation value. This process is repeated across the entire sequence to obtain the local maximum deviation value sequence. A preset local maximum deviation threshold is established, determined by the historical error distribution. Absolute error values predicted by the model during all normal operating periods from the past year are collected, sorted from smallest to largest, and the value at the 95th percentile after sorting is used as the threshold. Segments corresponding to local maximum deviations exceeding this threshold are selected from the load deviation sequence. Each segment corresponds to a continuous time interval, and the associated load time-series data within these segments are extracted to obtain a high-deviation load subset.
[0103] The high-biased load subset is augmented to generate an expanded sample set. Temporal stretching involves linear interpolation of the original load sequence, multiplying the sequence length by a stretching factor randomly selected between 0.8 and 1.2, resulting in sequences with varying lengths but similar waveforms. Temporal compression follows the same method, with a stretching factor less than 1. Random perturbation is added by superimposing a normally distributed random number at each sampling point of the original sequence. This normal distribution has a mean of zero and a standard deviation 5% of the original sequence's standard deviation. Multiple variants are generated for each method. All variants are merged with the original high-biased load subset to form the expanded sample set. This expanded sample set is then merged with the pre-stored original training dataset to obtain the comprehensive training dataset.
[0104] In step S17, based on the comprehensive training dataset, model training is performed to select the best model and obtain an improved prediction model, including:
[0105] Based on the comprehensive training dataset, the weight parameters of the long short-term memory network model are retrained using the gradient descent optimization algorithm to obtain a candidate model set.
[0106] Based on the candidate model set, the prediction performance is evaluated using the K-fold cross-validation method to obtain the prediction error set;
[0107] The candidate model corresponding to the smallest prediction error in the set of prediction errors is determined as the improved prediction model.
[0108] Specifically, the comprehensive training dataset output in step S16 is read. Based on this comprehensive training dataset, the weight parameters of the Long Short-Term Memory (LSTM) network model are retrained using the gradient descent optimization algorithm. During training, a grid search method is used to obtain multiple candidate models. The preset range of hyperparameter configurations includes the number of hidden layer memory units between 64 and 256 with a step size of 32, the regularization coefficient between 0.0001 and 0.01 on a logarithmic scale, and the learning rate between 0.0005 and 0.005. For each set of hyperparameter configurations, the comprehensive training dataset is randomly divided into multiple batches, with each batch size preset to 64. The batch data is input into the model, and the mean squared error between the predicted value and the actual label is calculated using forward propagation as the loss value. The gradient of the loss value with respect to the weights of each layer is calculated using the backpropagation algorithm, and the weights are updated along the negative gradient direction. The learning rate is set according to the current configuration. All batches are traversed to complete one training epoch. A total of 200 epochs are trained, and an early stopping strategy is set. Training stops when the validation set loss does not decrease for 10 consecutive epochs. After training is completed for each set of hyperparameter configurations, a trained model is obtained, and the models corresponding to all hyperparameter configurations constitute a candidate model set.
[0109] For each model in the candidate model set, K-fold cross-validation is used to evaluate its predictive performance. The preset value of K is 5, determined through offline simulation testing. This involves testing the impact of different K values on the variance of the evaluation results and computational time on historical datasets, selecting the K value that best stabilizes the evaluation results and optimizes computational efficiency. Specifically, the comprehensive training dataset is randomly divided into five mutually exclusive subsets of similar size. Each subset serves as the validation set in turn, while the remaining four subsets are combined as the training set. The model is retrained using the training set under each partition. After training, the mean squared error between the predicted value and the actual label is calculated on the validation set to obtain the error value for that validation. This process is repeated five times, and the arithmetic mean of the five error values is taken as the prediction error of the model. After evaluating all models, a set of prediction errors is obtained. The candidate model corresponding to the smallest prediction error is selected as the improved prediction model.
[0110] In step S18, the operating status sequence and the real-time occupancy rate time series are input into the improved prediction model to obtain the improved demand prediction value. The deviation between the actual demand value and the improved demand prediction value is compared to obtain the validity confirmation result, including:
[0111] Based on the running status sequence and the real-time occupancy rate time series, the data dimensionality is reduced using the principal component analysis algorithm to obtain a feature vector set;
[0112] Based on the feature vector set, the improved demand prediction value is obtained by forward propagation calculation through the improved prediction model.
[0113] Calculate the absolute value of the difference between the improved demand forecast and the actual demand value to obtain the demand deviation value;
[0114] When the demand deviation value is not lower than the preset demand deviation threshold, the demand deviation value, the improved demand prediction value, and the actual demand value are added as new samples to the comprehensive training dataset, and the long short-term memory network model is retrained until the demand deviation value is lower than the demand deviation threshold, and the effectiveness confirmation result is obtained.
[0115] When the demand deviation value is lower than the demand deviation threshold, an effectiveness confirmation result is generated based on the hardware resource allocation record corresponding to the improved demand prediction value.
[0116] Specifically, the system reads the real-time data collected in step S11, including vehicle monitoring speed, engine temperature change, fuel consumption rate, and real-time occupancy rate. Principal component analysis (PCA) is then applied to these four variables for dimensionality reduction. The specific implementation of PCA involves forming a four-dimensional vector from the current values of the four variables, then calculating the difference between this vector and the mean vector of the corresponding variable in the historical data to obtain the centered vector. The mean vector of each variable in the historical data is obtained through offline statistics, specifically by collecting the values of these four variables during all normal operating periods over the past year and calculating the arithmetic mean of each variable. The centered vector is then multiplied by a pre-calculated eigenvector matrix. The eigenvector matrix consists of the eigenvectors corresponding to the first few largest eigenvalues of the historical data covariance matrix. Its construction process involves calculating the covariance matrix of the historical dataset, performing eigenvalue decomposition on the covariance matrix, sorting the eigenvalues from largest to smallest, and selecting the eigenvectors corresponding to the first three largest eigenvalues to form the eigenvector matrix. The result of the multiplication operation is the dimensionality-reduced eigenvector set, which has three dimensions.
[0117] As an optional implementation, before inputting the operating status sequence and the real-time occupancy rate time series into the improved prediction model, the data dimensionality is first reduced by principal component analysis (PCA) to reduce the input dimension and eliminate multicollinearity among variables. PCA standardizes the data by calculating the mean and standard deviation of each variable in the operating status sequence and the real-time occupancy rate time series, calculates the covariance matrix of the standardized data, performs eigenvalue decomposition on the covariance matrix, selects principal components with a cumulative variance contribution rate of more than 95% to form an eigenvector set, and uses the eigenvector set as the input of the improved prediction model.
[0118] Based on the feature vector set, forward propagation calculations are performed using the improved prediction model determined in step S17. The improved prediction model is a Long Short-Term Memory (LSTM) network, whose input layer dimension matches the feature vector set dimension. The feature vector set is input into the model, undergoes nonlinear transformation of the hidden layer memory units, and linear activation of the output layer to obtain the improved demand prediction value, which is the predicted processor utilization rate at a single future time point.
[0119] Read the predefined actual demand value from step S11, which is the actual processor utilization rate collected at the current moment. Calculate the absolute value of the difference between the improved demand forecast and the actual demand value to obtain the demand deviation value, which quantifies the accuracy of the current prediction. The preset demand deviation threshold is determined through historical error distribution. Collect the absolute error values of each prediction point of the model on the validation set over the past year, sort these error values from smallest to largest, and take the value at the 90th percentile after sorting as the threshold.
[0120] When the demand deviation value is not lower than the threshold, it indicates that the current prediction accuracy is insufficient, and the deviation data of this prediction needs to be added as a new sample to the training dataset to improve the model. Specifically, the demand deviation value, the improved demand prediction value, and the actual demand value are combined into a new sample. This sample contains input features and labels. This new sample is added to the comprehensive training dataset output in step S16 to form an updated comprehensive training dataset. Then, the process returns to step S17 to retrain and optimize the Long Short-Term Memory network model, obtain the improved prediction model again, and repeat the step of inputting the running state sequence and the real-time occupancy time series into the improved prediction model to obtain the improved demand prediction value. This process is repeated until the demand deviation value is lower than the threshold. In each loop, the updated dataset is used to retrain the model, and the prediction is validated again.
[0121] It should be noted that during the retraining of the long short-term memory network model, the vehicle server suspends the execution of subsequent cooperative control instruction generation steps and maintains the current optimal working combination as temporary energy consumption control parameters; after the improved prediction model is retrained and generates new validity confirmation results, it exits the suspended state and continues to generate and execute cooperative control instructions based on the new validity confirmation results.
[0122] When the demand deviation is below the threshold, it indicates that the current prediction accuracy meets the requirements. At this point, the hardware resource allocation record corresponding to the improved demand prediction value is queried from the system log. A validity confirmation result is generated based on this hardware resource allocation record. This result indicates that the prediction value generated by the current improved prediction model is reliable, and the corresponding hardware configuration scheme is effective.
[0123] In step S19, based on the validity confirmation result and the stable state sequence, the configuration parameters are updated to obtain updated configuration parameters, and a cooperative control command is generated and executed based on the updated configuration parameters, including:
[0124] Extract the hardware working combination from the validity confirmation result, and perform state grouping processing using the K-means clustering algorithm to obtain a grouped state set. Then, calculate the stability score by weighted averaging based on the stable state sequence.
[0125] When the stability score is lower than the preset lower stability threshold, the hardware working combination, the stability score, and the stable state sequence are taken as unstable samples, and the long short-term memory network model is retrained until the stability score is not lower than the lower stability threshold, thus obtaining the energy parameter set.
[0126] When the stability score is not lower than the lower stability threshold, the current, voltage and instantaneous power parameters corresponding to the hardware working combination are filtered out from the grouped state set to obtain the energy parameter set;
[0127] Based on the energy parameter set, an energy consumption curve is fitted using a linear regression method to obtain an energy consumption curve. Then, based on the energy consumption curve, the average energy consumption per unit task is calculated to obtain an energy efficiency index.
[0128] When the energy efficiency index is lower than the preset energy efficiency threshold, particle swarm optimization is performed again based on the hardware working combination and the energy efficiency index until the energy efficiency index is not lower than the energy efficiency threshold, and the updated configuration parameters are obtained.
[0129] When the energy efficiency index is not lower than the energy efficiency threshold, the hardware working combination is written into the system configuration file to obtain the updated configuration parameters;
[0130] Based on the updated configuration parameters and the running state sequence, a cooperative control instruction is generated and power consumption cooperative control is executed.
[0131] Specifically, the validity confirmation result output in step S18 is read, and the hardware working combination is extracted from it. This combination includes the frequency and voltage values of the processor core. To classify and analyze the hardware working status, the K-means clustering algorithm is used to cluster all historical hardware working combinations stored in the historical database. The clustering process is as follows: the preset number of clusters K is 3, which is determined by the silhouette coefficient method, i.e., calculating the silhouette coefficient by iterating through K from 2 to 10, and selecting the K value with the largest silhouette coefficient. During initialization, K samples are randomly selected from the historical data as initial cluster centers. Then, the Euclidean distance between each historical working combination and each cluster center is calculated, and it is assigned to the nearest cluster. The center of each cluster is updated to the arithmetic mean of all samples in each dimension within that cluster. The above allocation and update steps are repeated until the cluster centers no longer change or the maximum number of iterations (preset 100) is reached. After clustering, each historical working combination is labeled with its cluster number, and the centroids of each cluster constitute a grouped state set.
[0132] Read the motherboard temperature, voltage fluctuation, and fan speed data collected in real time in step S11. To evaluate system stability, a weighted average is calculated for these three parameters. The weights are determined based on the correlation analysis between each parameter and system failure records in historical data. The times when system stability failures occurred within the past year are collected, and the average values of motherboard temperature, voltage fluctuation, and fan speed within 10 seconds prior to the failure are extracted. Simultaneously, the average values of the corresponding parameters during normal operation are extracted. The difference factor of each parameter between failure and normal conditions is calculated, and the difference factor is normalized and used as the weight. For example, the weight of motherboard temperature is set to 0.3, voltage fluctuation to 0.5, and fan speed to 0.2. In the weighted average calculation, the motherboard temperature is multiplied by 0.3, voltage fluctuation by 0.5, and fan speed by 0.2, and then summed to obtain a stability score. This score ranges from 0 to 100, with a higher value indicating a more stable system. The weights are determined by calculating the standardized difference (Cohen's d-value) of each parameter between historical failure samples and normal samples. Specifically, the absolute values of the differences between the means of motherboard temperature, voltage fluctuation, and fan speed in the two types of samples are calculated and divided by the pooled standard deviation to obtain their respective effect sizes. The three effect sizes are then normalized to obtain weight coefficients of approximately 0.3, 0.5, and 0.2, respectively.
[0133] The preset stability threshold is determined through historical data statistics. Stability scores during the system's normal operation over the past year are collected, and the cumulative distribution function of these scores is calculated. The 10th percentile is used as the threshold. When the stability score falls below this threshold, the current hardware configuration, stability score, motherboard temperature, voltage fluctuation, and fan speed are added as unstable samples to the comprehensive training dataset in step S16. The long short-term memory network model is then retrained in step S17 to update and improve the prediction model. This process is repeated, with the updated model being used to re-evaluate stability each time, until the stability score is not lower than the threshold. Then, historical current, voltage, and instantaneous power parameters corresponding to the cluster to which the current hardware working combination belongs are selected from the grouped state set to obtain the energy parameter set. The energy parameter set contains a set of triplet data, each triplet consisting of current, voltage, and instantaneous power values collected at the same time. When the stability score is lower than the stability lower limit threshold, the energy parameter set is the current, voltage, and instantaneous power records corresponding to the hardware working combination recommended by the retrained model in historical operation. When the stability score is not lower than the stability lower limit threshold, the energy parameter set is the current, voltage, and instantaneous power records of all historical samples within the group to which the current hardware working combination belongs. The energy parameter sets obtained in both ways are used for subsequent energy consumption curve fitting.
[0134] When the stability score is not lower than the threshold, the current, voltage, and instantaneous power parameters corresponding to the cluster to which the current hardware working combination belongs are directly selected from the grouped state set to obtain the energy parameter set. This energy parameter set contains the current, voltage, and instantaneous power values of all historical samples within the cluster, with each sample corresponding to a time point.
[0135] Based on the energy parameter set, a linear regression method is used to fit the energy consumption curve. A univariate linear regression model is constructed with time as the independent variable and instantaneous power as the dependent variable. First, the timestamps of each sample in the energy parameter set are converted to relative times, obtaining the sequence of independent variables and the corresponding sequence of instantaneous power values. The arithmetic mean of the independent and dependent variables is calculated. Then, the sum of squares of the differences between the independent variables and their respective means, and the sum of the products of the differences between the independent and dependent variables and their means are calculated. The latter is divided by the former to obtain the regression coefficient. Finally, the intercept is obtained by subtracting the regression coefficient from the mean of the dependent variable and multiplying it by the mean of the independent variables. The fitted linear equation is the energy consumption curve. Based on this curve, the area under the curve within a preset time period (e.g., the most recent 10 minutes) is calculated to obtain the total energy consumption value. Simultaneously, the total number of tasks processed within this time period is read from the system log. The total energy consumption is divided by the total number of tasks to obtain the average energy consumption per task, which serves as the energy efficiency indicator.
[0136] The preset energy efficiency threshold is determined through historical data statistics. The average energy consumption per unit task is collected from all high-efficiency operating periods over the past year, and the 90th percentile of these values is used as the threshold, indicating that energy efficiency is better than 90% of historically high-efficiency periods. When the energy efficiency index falls below this threshold, it indicates that the current work combination is insufficiently energy-efficient and needs to be re-optimized. Using the current hardware work combination and energy efficiency index as input, the process returns to the particle swarm optimization process in step S13 to re-optimize the hardware work combination. The particle swarm optimization process is the same as in step S13, but the current hardware work combination is used as a particle in the initial population, and an energy efficiency constraint is added to the fitness function to ensure that the energy efficiency index of the newly optimized combination is not lower than the threshold. This process is repeated until the energy efficiency index is not lower than the threshold, resulting in updated configuration parameters.
[0137] When the energy efficiency index is not lower than the threshold, the current hardware working combination is written into the system configuration file to obtain updated configuration parameters.
[0138] Based on the frequency and voltage values in the updated configuration parameters, and combined with the vehicle monitoring speed collected in real time in step S11, a collaborative control command is generated. This command includes the target frequency, target voltage, and trigger conditions, and is sent to the voltage and frequency adjustment unit of the processor core via the power management interface for execution. After execution, the onboard server operates according to the new working combination, achieving collaborative power consumption control.
[0139] Reference Figure 2The second embodiment of the present invention provides a power consumption collaborative control system for an in-vehicle server, comprising:
[0140] The data acquisition module is used to acquire the operating status sequence, real-time occupancy rate time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence.
[0141] The preliminary prediction module is used to input the running status sequence and the real-time occupancy rate time series into a pre-built long short-term memory network model to obtain preliminary demand prediction values;
[0142] The frequency optimization module is used to construct a frequency search range and a voltage search range centered on the real-time operating frequency and the real-time voltage level if the preliminary demand prediction value exceeds the preset preliminary demand threshold, and to perform particle swarm iterative optimization based on the frequency search range and the voltage search range to obtain the target frequency.
[0143] The combination filtering module is used to filter out the optimal working combination based on the target frequency and the real-time traffic load;
[0144] The step-by-step frequency ramping module is used to calculate the computing power demand density based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, step-by-step frequency ramping is performed to obtain energy consumption control parameters.
[0145] The sample amplification module is used to perform load deviation analysis based on the energy consumption control parameters, obtain a high-deviation load subset, and perform sample amplification based on the high-deviation load subset to obtain a comprehensive training dataset.
[0146] The model training module is used to train and select the best model based on the comprehensive training dataset to obtain an improved prediction model.
[0147] The effective confirmation module is used to input the running status sequence and the real-time occupancy rate time series into the improved prediction model to obtain the improved demand prediction value, and compare the deviation between the actual demand value and the improved demand prediction value to obtain the effective confirmation result;
[0148] The output module is used to update the configuration parameters based on the validity confirmation result and the stable state sequence, obtain updated configuration parameters, and generate and execute cooperative control instructions based on the updated configuration parameters.
[0149] It should be noted that the power consumption collaborative control system for an in-vehicle server provided in this embodiment of the invention is used to execute all the process steps of the power consumption collaborative control method for an in-vehicle server in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0150] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0151] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A power consumption collaborative control method for an in-vehicle server, characterized in that, include: Acquire the operating status sequence, real-time occupancy time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence; The running status sequence and the real-time occupancy rate time series are input into a pre-constructed long short-term memory network model to obtain preliminary demand prediction values; If the preliminary demand prediction value exceeds the preset preliminary demand threshold, a frequency search range and a voltage search range are constructed with the real-time operating frequency and the real-time voltage level as the center, and particle swarm optimization is performed based on the frequency search range and the voltage search range to obtain the target frequency. The optimal working combination is selected based on the target frequency and the real-time traffic load, including: matching voltage levels using a preset frequency-voltage relationship table to obtain a set of matching voltages based on the target frequency; calculating the rate of change of the real-time traffic load within a preset sliding time window to obtain the traffic change rate; when the traffic change rate does not exceed a preset traffic change rate threshold, directly combining the target frequency and the smallest matching voltage in the set of matching voltages to form the optimal working combination; when the traffic change rate exceeds the traffic change rate threshold, combining the target frequency with each matching voltage in the set of matching voltages to obtain candidate working combinations; and estimating power consumption using a pre-built power consumption calculation model based on the candidate working combinations to obtain an instantaneous power consumption sequence, and selecting the candidate working combination corresponding to the smallest instantaneous power consumption in the instantaneous power consumption sequence to obtain the optimal working combination. The computing power demand density is calculated based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, the frequency is gradually increased to obtain the energy consumption control parameters. Based on the energy consumption control parameters, load deviation analysis is performed to obtain a high-deviation load subset, and the samples are expanded based on the high-deviation load subset to obtain a comprehensive training dataset. Based on the comprehensive training dataset, the model is trained and optimized to obtain an improved prediction model; The improved demand prediction value is obtained by inputting the operating status sequence and the real-time occupancy rate time series into the improved prediction model, and the effectiveness is confirmed by comparing the deviation between the actual demand value and the improved demand prediction value. Based on the validity confirmation result and the stable state sequence, the configuration parameters are updated to obtain updated configuration parameters, and a cooperative control command is generated and executed based on the updated configuration parameters.
2. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, The step of inputting the operating state sequence and the real-time occupancy rate time series into a pre-constructed long short-term memory network model to obtain preliminary demand prediction values includes: Based on the operating state sequence, the pre-built ARMA model is used to extract the time-series features of the pre-stored historical occupancy rate time series to obtain the load fluctuation results; Based on the load fluctuation results, processor utilization is predicted using the Long Short-Term Memory network model to obtain the preliminary core utilization. The root mean square error between the preliminary core utilization and the real-time utilization is calculated to obtain the prediction deviation value. When the prediction deviation value does not exceed the preset prediction deviation threshold, the preliminary core occupancy rate is directly used as the refined prediction sequence. When the prediction deviation value exceeds the prediction deviation threshold, the weight coefficients of the long short-term memory network model are updated through the backpropagation algorithm, and the occupancy rate is predicted again until the prediction deviation value does not exceed the prediction deviation threshold, thus obtaining a refined prediction sequence. Based on the refined forecast sequence, the sequence expansion operation is performed using a pre-built ARIMA model to obtain the preliminary demand forecast value.
3. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, If the preliminary demand prediction value exceeds a preset preliminary demand threshold, a frequency search range and a voltage search range are constructed centered on the real-time operating frequency and the real-time voltage level. Particle swarm optimization is then performed based on the frequency search range and the voltage search range to obtain the target frequency, including: When the preliminary demand forecast value does not exceed the preset preliminary demand threshold, the real-time operating frequency is directly used as the target frequency. When the preliminary demand forecast exceeds the preliminary demand threshold, a frequency search range is constructed with the real-time operating frequency as the center and a preset frequency adjustment range is used, and a voltage search range is constructed with the real-time voltage level as the center and a preset voltage adjustment range and a preset voltage adjustment step size are used. Based on the frequency search range and the voltage search range, particle initialization is performed using a particle swarm optimization algorithm to obtain a particle swarm distribution matrix containing the lowest energy fitness. When the lowest energy fitness in the particle swarm distribution matrix is lower than a preset energy fitness threshold, the frequency of the particle corresponding to the lowest energy fitness is extracted to obtain the target frequency. When the minimum energy fitness in the particle swarm distribution matrix is not lower than the energy fitness threshold, the particle swarm optimization algorithm is used to iteratively optimize the particle swarm distribution matrix until the minimum energy fitness in the particle swarm distribution matrix is lower than the energy fitness threshold or the preset maximum number of iterations is reached, thereby obtaining the target frequency.
4. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, The calculation of computing power demand density based on the optimal working combination, and if the computing power demand density exceeds a preset burst computing power threshold, the energy consumption control parameters are obtained by gradually increasing the frequency, including: The processor parameters are updated according to the optimal work combination, the processor operation process is monitored, the task arrival rate and average execution cycle are obtained, and the task arrival rate and the average execution cycle are multiplied to obtain the computing power demand density. When the computing power demand density does not exceed the preset burst computing power threshold, the optimal working combination is directly used as the energy consumption control parameter. When the computing power demand density exceeds the burst computing power threshold, the frequency value is adjusted upward step by step according to the optimal working combination and the preset frequency increase step size to obtain a candidate frequency set. Then, according to the candidate frequency set, the voltage level is matched through the frequency-voltage relationship table to obtain a voltage-frequency pair set. Based on the voltage-frequency pair set, power consumption is estimated using the power consumption calculation model to obtain a preliminary energy consumption set. Then, the voltage-frequency pair corresponding to the preliminary energy consumption set that satisfies the preset response delay constraint and has the lowest energy consumption is selected to obtain energy consumption control parameters.
5. The power consumption collaborative control method for an on-board server according to claim 2, characterized in that, The process involves performing load deviation analysis based on the energy consumption control parameters to obtain a high-deviation load subset, and then expanding the sample based on the high-deviation load subset to obtain a comprehensive training dataset, including: Extract the historical occupancy rate time series corresponding to the energy consumption control parameters to obtain the associated load time series, and extract the components according to the associated load time series using the STL decomposition algorithm to obtain the trend component and the seasonal component. The trend component and the seasonal component are added at corresponding time points to obtain the expected load sequence, and the point-by-point difference between the associated load time series and the expected load sequence is calculated to obtain the load deviation sequence. Extract the maximum value of the load deviation sequence within the preset sliding deviation window to obtain the local maximum deviation; The high-deviation load subset is obtained by filtering out the segments corresponding to the local maximum deviation exceeding the preset local maximum deviation threshold from the load deviation sequence; Based on the high-bias load subset, the samples are amplified by time-domain stretching, compression, or adding random perturbations to generate an expanded sample set. The expanded sample set is then merged with the pre-stored original training dataset to obtain a comprehensive training dataset.
6. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, The step of training and selecting the best model based on the comprehensive training dataset to obtain an improved prediction model includes: Based on the comprehensive training dataset, the weight parameters of the long short-term memory network model are retrained using the gradient descent optimization algorithm to obtain a candidate model set. Based on the candidate model set, the prediction performance is evaluated using the K-fold cross-validation method to obtain the prediction error set; The candidate model corresponding to the smallest prediction error in the set of prediction errors is determined as the improved prediction model.
7. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, The step of inputting the operating status sequence and the real-time occupancy rate time series into the improved prediction model to obtain the improved demand prediction value, and comparing the deviation between the actual demand value and the improved demand prediction value to obtain the effectiveness confirmation result includes: Based on the running status sequence and the real-time occupancy rate time series, the data dimensionality is reduced using the principal component analysis algorithm to obtain a feature vector set; Based on the feature vector set, the improved demand prediction value is obtained by forward propagation calculation through the improved prediction model. Calculate the absolute value of the difference between the improved demand forecast and the actual demand value to obtain the demand deviation value; When the demand deviation value is not lower than the preset demand deviation threshold, the demand deviation value, the improved demand prediction value, and the actual demand value are added as new samples to the comprehensive training dataset, and the long short-term memory network model is retrained until the demand deviation value is lower than the demand deviation threshold, and the effectiveness confirmation result is obtained. When the demand deviation value is lower than the demand deviation threshold, an effectiveness confirmation result is generated based on the hardware resource allocation record corresponding to the improved demand prediction value.
8. The power consumption collaborative control method for an on-board server according to claim 1, characterized in that, The step of updating configuration parameters based on the validity confirmation result and the stable state sequence to obtain updated configuration parameters, and generating and executing cooperative control instructions based on the updated configuration parameters, includes: Extract the hardware working combination from the validity confirmation result, and perform state grouping processing using the K-means clustering algorithm to obtain a grouped state set. Then, calculate the stability score by weighted averaging based on the stable state sequence. When the stability score is lower than the preset lower stability threshold, the hardware working combination, the stability score, and the stable state sequence are taken as unstable samples, and the long short-term memory network model is retrained until the stability score is not lower than the lower stability threshold, thus obtaining the energy parameter set. When the stability score is not lower than the lower stability threshold, the current, voltage and instantaneous power parameters corresponding to the hardware working combination are filtered out from the grouped state set to obtain the energy parameter set; Based on the energy parameter set, an energy consumption curve is fitted using a linear regression method to obtain an energy consumption curve. Then, based on the energy consumption curve, the average energy consumption per unit task is calculated to obtain an energy efficiency index. When the energy efficiency index is lower than the preset energy efficiency threshold, particle swarm optimization is performed again based on the hardware working combination and the energy efficiency index until the energy efficiency index is not lower than the energy efficiency threshold, and the updated configuration parameters are obtained. When the energy efficiency index is not lower than the energy efficiency threshold, the hardware working combination is written into the system configuration file to obtain the updated configuration parameters; Based on the updated configuration parameters and the running state sequence, a cooperative control instruction is generated and power consumption cooperative control is executed.
9. A power consumption collaborative control system for an in-vehicle server, characterized in that, include: The data acquisition module is used to acquire the operating status sequence, real-time occupancy rate time sequence, real-time operating frequency, real-time voltage level, real-time road condition load, actual demand value, and stable state sequence. The preliminary prediction module is used to input the running status sequence and the real-time occupancy rate time series into a pre-built long short-term memory network model to obtain preliminary demand prediction values; The frequency optimization module is used to construct a frequency search range and a voltage search range centered on the real-time operating frequency and the real-time voltage level if the preliminary demand prediction value exceeds the preset preliminary demand threshold, and to perform particle swarm iterative optimization based on the frequency search range and the voltage search range to obtain the target frequency. The combination filtering module is used to filter the optimal working combination based on the target frequency and the real-time traffic load, including: matching voltage levels according to the target frequency using a preset frequency-voltage relationship table to obtain a set of matching voltages; calculating the rate of change of the real-time traffic load within a preset sliding time window to obtain the traffic change rate; when the traffic change rate does not exceed a preset traffic change rate threshold, directly combining the target frequency and the smallest matching voltage in the set of matching voltages to form the optimal working combination; when the traffic change rate exceeds the traffic change rate threshold, combining the target frequency with each matching voltage in the set of matching voltages to obtain candidate working combinations; and estimating power consumption based on the candidate working combinations using a pre-built power consumption calculation model to obtain an instantaneous power consumption sequence, and filtering the candidate working combination corresponding to the smallest instantaneous power consumption in the instantaneous power consumption sequence to obtain the optimal working combination. The step-by-step frequency ramping module is used to calculate the computing power demand density based on the optimal working combination. If the computing power demand density exceeds the preset burst computing power threshold, step-by-step frequency ramping is performed to obtain energy consumption control parameters. The sample amplification module is used to perform load deviation analysis based on the energy consumption control parameters, obtain a high-deviation load subset, and perform sample amplification based on the high-deviation load subset to obtain a comprehensive training dataset. The model training module is used to train and select the best model based on the comprehensive training dataset to obtain an improved prediction model. The effective confirmation module is used to input the running status sequence and the real-time occupancy rate time series into the improved prediction model to obtain the improved demand prediction value, and compare the deviation between the actual demand value and the improved demand prediction value to obtain the effective confirmation result; The output module is used to update the configuration parameters based on the validity confirmation result and the stable state sequence, obtain updated configuration parameters, and generate and execute cooperative control instructions based on the updated configuration parameters.
Citation Information
Patent Citations
AI-based server energy-saving control method and equipment
CN121187736A
Adaptive Real-Time Multi-Modal Compression System with Dynamic Resource Allocation
US20250363092A1