Real-time prediction method and system for energy consumption of vehicle-mounted deep learning task

CN122886400APending Publication Date: 2026-10-09NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611108506.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

但车联网实际场景中,RSU仅能短暂缓存少量车载任务运行轮次数据,大规模采集训练样本成本极高;现有边测边拟合方案缺少车载任务运行前的能耗预判,容易出现任务运行若干轮次后,RSU剩余储能不足以完成全量车载深度学习任务,造成算力与电能双重浪费,额外增加任务中断、重调度的计算开销

Benefits of technology

[0065]1、本发明通过分析运行模型以少量已训练轮数的数据,预测未来长时间周期下的能耗,提高了能耗预测的运算效率,有效解决了车联网中边缘服务器能耗管理难题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886400A_ABST
    Figure CN122886400A_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time prediction method and system for energy consumption of vehicle-mounted deep learning task, belong to energy consumption prediction technical field, method includes: the energy consumption data generated in actual operation for vehicle-mounted deep learning task model is collected as original sample;Design the mathematical model of real-time prediction for energy consumption of vehicle-mounted deep learning task, when mathematical model is designed, in model iteration module, original sample is used to train initial model and is put into subsequent prediction;The mathematical model of real-time prediction for energy consumption of vehicle-mounted deep learning task is solved using least square method, and model parameters are calculated;Error accumulation in prediction process is reduced and controlled by error balance formula.The application improves the operation efficiency of energy consumption prediction, effectively solves the edge server energy consumption management problem in Internet of Vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy consumption prediction technology, specifically to a real-time prediction method and system for energy consumption of in-vehicle deep learning tasks. Background Technology

[0002] With the development of vehicle-to-everything (V2X) and artificial intelligence, numerous in-vehicle intelligent sensing applications have emerged. Vehicle cameras and radars collect massive amounts of image and audio sensing data, which require deep learning algorithms to perform computational processing such as target detection and recognition, placing enormous pressure on the computing power and power supply of in-vehicle terminals. To reduce the computational load on the in-vehicle side, after the vehicle completes image preprocessing, the deep learning inference and training tasks are offloaded to the surrounding distributed edge intelligent RSUs (Roadside Units) for centralized processing. Many RSUs in suburban and rural areas rely on solar power for self-powering, lacking stable municipal power. Multiple vehicles continuously sending in-vehicle deep learning tasks to the RSUs generates huge GPU computing power consumption, easily leading to problems such as depletion of stored energy, task interruption, and waste of all calculated energy, severely restricting the continuous and stable operation of self-powered RSUs. The core prerequisite for implementing precise energy allocation, task scheduling, and power optimization is to conduct refined, real-time energy consumption prediction modeling for the in-vehicle deep learning tasks offloaded to the RSUs. Therefore, designing a low-data-dependency, high-precision real-time energy consumption prediction modeling method for RSU processing vehicle perception deep learning task scenarios has become a technical problem that needs to be solved in the edge energy scheduling of the Internet of Vehicles.

[0003] Currently, energy consumption modeling is mainly divided into two approaches: hardware-oriented and software-oriented. Hardware-oriented approaches focus primarily on the energy consumption modeling of individual components within the RSU. These methods typically start with the smallest hardware component and gradually build higher-level energy consumption models. For example, by measuring the energy consumption of various server components (such as CPU, hard drive, and network interface) under different loads, an energy consumption model of the entire RSU is constructed. Software-oriented energy consumption modeling methods focus more on the energy consumption at the software level, such as the operating system, applications, and computing tasks. These methods typically utilize energy monitoring and management software to collect statistical information on CPU utilization, memory usage, I / O operations, etc., and combine this information with multiple linear regression, nonlinear regression methods, or neural network algorithms to achieve energy consumption modeling.

[0004] However, these technologies have the following problems and drawbacks:

[0005] Hardware-oriented energy consumption modeling methods are unsuitable for the energy consumption scheduling of various onboard tasks by the RSU. Multiple computational tasks typically run simultaneously on the RSU, making it difficult to assess the energy consumption of a single task based on device load. Software-oriented general energy consumption modeling methods are data-driven, requiring massive amounts of labeled samples to ensure prediction accuracy. However, in real-world vehicle-to-everything (V2X) scenarios, the RSU can only briefly cache a small number of onboard task execution rounds of data, making large-scale training sample collection extremely costly. Existing on-the-fly (OTF) solutions lack energy consumption prediction before onboard task execution, easily leading to situations where, after several rounds of task execution, the RSU's remaining energy storage is insufficient to complete the entire onboard deep learning task, resulting in a double waste of computing power and electrical energy, and additional computational overhead for task interruption and rescheduling. In summary, existing solutions cannot meet the specific energy consumption prediction requirements of self-powered RSUs handling onboard unloading deep learning tasks. Summary of the Invention

[0006] The technical problem this invention aims to solve is to overcome the shortcomings of existing technologies and propose a real-time prediction method and system for energy consumption of in-vehicle deep learning tasks. By monitoring deep learning tasks in real time, a relatively accurate energy consumption prediction model can be obtained with only a small number of rounds. The entire process consists of four steps: energy consumption data preparation for in-vehicle tasks, modeling for RSU in-vehicle concurrent scenarios, solving for scenario-based model parameters using the least squares method, and piecewise error balancing correction for long and short in-vehicle task rounds. In the data preparation stage, GPU energy consumption samples generated by RSU processing in-vehicle YOLO perception tasks are collected; a linear regression model is constructed for in-vehicle task concurrent scenarios, linking the RSU hardware performance counters with in-vehicle inference power consumption; the least squares method is used to fit the scenario-based model parameters and iteratively correct them; and a piecewise error balancing formula is designed to suppress the error accumulation caused by the superposition of long and short cycle in-vehicle tasks.

[0007] To solve the above problems, the present invention adopts the following technical solution:

[0008] First, this invention proposes a real-time prediction method for energy consumption in vehicle-mounted deep learning tasks, comprising the following steps:

[0009] S1. Relying on the roadside unit (RSU), collect the energy consumption data generated by the on-board deep learning image detection task of different vehicles unloaded to the RSU during actual GPU operation as the original sample.

[0010] S2. To address the characteristics of concurrent RSU multi-channel in-vehicle deep learning tasks and alternating epoch lengths for in-vehicle tasks, design a real-time energy consumption prediction mathematical model adapted to in-vehicle perception tasks. After completing the structural design of the model, train the initial model using the original samples in the model iteration module for subsequent real-time energy consumption prediction of in-vehicle tasks.

[0011] S3. Solve the mathematical model for real-time prediction of energy consumption for in-vehicle deep learning tasks using the least squares method, and calculate the exclusive model parameters adapted to the RSU in-vehicle concurrent scenario.

[0012] S4. Combining the scenario characteristics of short-cycle sampling and long-cycle continuous operation of vehicle-mounted tasks, the prediction error accumulation during the entire operation cycle of the vehicle-mounted deep learning task is reduced and controlled in layers through the error balancing formula, and the real-time predicted energy consumption of the vehicle-mounted deep learning task is output.

[0013] Preferably, in step S4, the error balance formula is as follows:

[0014] ;

[0015] in, This indicates the energy consumption of the onboard task after error alignment. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This represents the predicted energy consumption for onboard tasks output by the model. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

[0016] Preferably, step S4 specifically includes the following steps:

[0017] S401, Introducing Error Rate To quantify the deviation between the predicted energy consumption and the actual energy consumption of the onboard deep learning task on the RSU, and to distinguish the correction logic by the long and short running cycles of the onboard task, the energy consumption of the onboard task after error alignment is calculated.

[0018] ;

[0019] in, This indicates the energy consumption of the onboard task after error alignment. This represents the predicted energy consumption for onboard tasks output by the model. Indicates the energy consumption error rate of onboard tasks;

[0020] S402, Integrated RSU side has completed the number of on-board task monitoring rounds Total number of vehicle-mounted mission rounds to be predicted Then calculate the error rate specific to the vehicle-mounted task. ;

[0021] ;

[0022] in, Indicates the energy consumption error rate of onboard tasks. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

[0023] Preferably, step S2 specifically includes the following steps:

[0024] S201. For concurrent scenarios of RSU multi-channel vehicle image deep learning tasks, a basic linear prediction model is constructed by associating the coupling relationship between the performance counters of RSU server GPU and CPU and the power consumption of vehicle perception tasks.

[0025] The linear model is as follows:

[0026] ;

[0027] S202. Construct a linear model for directional optimization of the vehicle-mounted RSU scenario, specifically as follows:

[0028] S2021. Assigning linear model variables to fit the physical meaning of the vehicle unloading task. This represents the total energy consumption of a complete deep learning perception task sent from a single vehicle to the RSU. Using the GPU energy consumption input features collected by RSU for in-vehicle tasks, and relying on the sampling round data of the in-vehicle tasks, the slope parameters of the model adapted to the in-vehicle image detection task are solved. and intercept parameter ;

[0029] S2022. Based on the real-time acquisition of the GPU running status of the vehicle task by RSU, for the scenario of continuous multi-epoch operation of vehicle tasks, a special function relationship between the energy consumption of vehicle deep learning tasks and the number of epochs of task operation is constructed to achieve accurate prediction of long-cycle energy consumption of vehicle tasks.

[0030] Preferably, the functional relationship between the task energy consumption and the number of task execution rounds is as follows:

[0031] ;

[0032] in, Indicates that the RSU is handling onboard tasks. Total energy consumption after wheel Slope of the corresponding linear model , Intercept of the corresponding linear model , This represents the runtime of the RSU processing the onboard task in the i-th epoch. This represents the average GPU power during the i-th epoch of RSU processing in-vehicle tasks. This indicates the total number of epochs that the onboard mission has successfully run on the RSU up to the present.

[0033] Preferably, step S3 specifically includes the following steps:

[0034] S301. Rewrite the vehicle taskline performance consumption model in matrix form:

[0035] ;

[0036] in, For the aforementioned vehicle-mounted scenario coefficients , for , Inputting characteristics for vehicle-mounted tasks , This is a parameter vector specific to the vehicle-mounted task, including intercept and slope.

[0037] S302, for RSU data acquisition Based on the energy consumption samples of vehicle-mounted tasks, a squared loss function is constructed:

[0038] ;

[0039] in, This represents the total squared error loss in onboard mission energy consumption prediction. Indicates the first The actual total energy consumption of the vehicle-mounted mission sample group. Represents a parameter vector. Indicates the first Input characteristics of vehicle-mounted tasks;

[0040] S303. Vectorize the measured energy consumption data of onboard tasks collected by the RSU:

[0041] ;

[0042] in, This represents the actual energy consumption observation vector for onboard tasks. Indicates the first Actual total energy consumption of the vehicle-mounted mission sample group This represents the design matrix of in-vehicle mission features. Indicates the first Group vehicle-mounted task input characteristics;

[0043] S304. Deriving the expansion of the loss function matrix:

[0044] ;

[0045] ;

[0046] ;

[0047] ;

[0048] S305, targeting Differentiation yields:

[0049] ;

[0050] S306, Let the reciprocal be... available:

[0051] ;

[0052] ;

[0053] Step S307 leads to:

[0054] ;

[0055] in, This represents the optimal model parameter vector for adapting to deep learning tasks for in-vehicle images.

[0056] Preferably, step S1 is deployed on the roadside unit (RSU), relying on the energy consumption data generated by the YOLO series vehicle image detection deep learning model unloaded from the vehicle to the RSU, and only collecting a limited number of vehicle task epochs; based on the deep learning framework, the Carbontracker tool is deployed locally on the RSU to monitor and record the GPU energy consumption of processing vehicle tasks in real time, and complete the accurate prediction of long-cycle energy consumption of vehicle tasks with only a small amount of sampled data.

[0057] Preferably, the raw energy consumption data of the vehicle task collected on the RSU side in step S1 includes: the average power of the GPU processing the vehicle image task. Single epoch runtime Average energy consumption per wheel for vehicle-mounted tasks Derived metrics calculated based on raw data: Total energy consumption for onboard tasks Average energy consumption per wheel for vehicle-mounted tasks Onboard mission energy consumption error rate .

[0058] Meanwhile, this invention proposes a real-time prediction system for energy consumption of in-vehicle deep learning tasks. The system is deployed in a roadside unit (RSU) and is used to predict the energy consumption of in-vehicle image perception deep learning tasks as vehicles are unloaded onto the RSU. It includes a data acquisition unit, an in-vehicle scene energy consumption mathematical model unit, a least squares solution unit, and a piecewise error balancing unit, wherein:

[0059] The acquisition unit is deployed on the RSU and is used to collect GPU energy consumption data of vehicle-mounted deep learning image detection tasks unloaded from multiple vehicles to the RSU as raw samples.

[0060] The vehicle-mounted scenario energy consumption mathematical model unit is used to construct a dedicated energy consumption prediction mathematical model for the concurrent characteristics of RSU multi-vehicle-mounted tasks. In the model iteration module, the initial model is trained using the original samples of vehicle-mounted tasks, and the output is sent to the subsequent modules to complete the real-time energy consumption prediction of vehicle-mounted tasks.

[0061] The least squares solving unit is used to solve the energy consumption mathematical model adapted to the vehicle RSU scenario using the least squares method, and to calculate the vehicle-specific model parameters.

[0062] The segmented error balancing unit reduces and controls the accumulation of prediction errors throughout the entire operation cycle of the vehicle-mounted deep learning task by adapting the error balancing formula to the long and short cycle tasks of the vehicle.

[0063] Meanwhile, this invention proposes an electronic device deployed in a roadside unit (RSU), comprising: at least one processor, at least one memory, and a communication interface; the processor, memory, and communication interface communicate with each other; the memory stores program instructions that can be executed by the processor; the processor calls the program instructions to execute the real-time prediction method for energy consumption of in-vehicle deep learning tasks described in this invention.

[0064] The present invention, by adopting the above technical solution, has the following beneficial effects:

[0065] 1. This invention improves the computational efficiency of energy consumption prediction by analyzing the running model with a small amount of data from a few training rounds, and effectively solves the problem of energy consumption management of edge servers in the Internet of Vehicles.

[0066] 2. This invention achieves accurate prediction of task energy consumption by constructing a linear prediction model based on performance counters, thereby reducing the cost of energy consumption measurement; the introduction of the error balancing method further improves the accuracy and stability of the prediction.

[0067] 3. This invention is not only applicable to resource-constrained self-powered RSUs, but also promotes efficient energy allocation and optimization in a wide range of vehicle-to-everything (V2X) environments, enhancing system sustainability. In addition, this method can predict long-term energy consumption trends without requiring a large amount of training data, providing solid energy management support for intelligent applications of V2X and helping to promote the integrated development of V2X and artificial intelligence technologies. Attached Figure Description

[0068] Figure 1 This is an overall flowchart of the real-time prediction method for energy consumption of in-vehicle deep learning tasks, which is involved in this invention.

[0069] Figure 2 This is a comparison chart of short-cycle errors involved in the embodiment.

[0070] Figure 3 This is a comparison chart of long-period errors involved in the embodiments. Detailed Implementation

[0071] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.

[0072] Example 1: This example provides a real-time prediction method for energy consumption of vehicle-mounted deep learning tasks deployed in a roadside unit (RSU). Figure 1 As shown, it includes the following steps:

[0073] Step S1: Prepare energy consumption data for vehicle-mounted tasks.

[0074] This step involves deployment entirely within the Roadside Unit (RSU) to collect GPU energy consumption samples for in-vehicle image deep learning tasks. Collecting only a small amount of in-vehicle task epoch data is sufficient to predict the total energy consumption for the complete task cycle. Based on the deep learning framework, the Carbontracker tool is deployed locally on the RSU to collect and process GPU energy consumption for in-vehicle YOLO perception tasks in real time. The data collection method requires measuring the following data: average GPU power. Running time Energy consumption per round Derivative calculation data: Total energy consumption of onboard missions Average energy consumption per wheel Onboard mission energy consumption error rate Specifically, the steps to create the dataset are as follows:

[0075] Step S101: RSU environment configuration.

[0076] A YOLOv7-tiny vehicle target detection model based on the Keras framework was deployed in the roadside unit (RSU); the Carbontracker energy consumption monitoring tool was deployed to collect real-time power consumption data of the GPU used by the RSU to process vehicle image inference tasks.

[0077] Step S 102: Multi-hardware platform vehicle-mounted task experiment, sample collection.

[0078] Multiple vehicle-mounted task simulation experiments were conducted in an environment equipped with a GeForce RTX 2080 Ti GPU. The variables included the number of vehicle-mounted task sampling rounds, the total number of prediction rounds, and the image batch size, to verify the long and short cycle prediction performance of this scheme under a small amount of vehicle-mounted task sampling data.

[0079] Step S1021: Using a Volta architecture T100 RSU, run in-vehicle image detection tasks issued by multiple vehicles to obtain the average GPU power. Single-round running time Energy consumption per round .

[0080] Step S1022: Turing architecture RTX2080ti RSU concurrently processes multiple in-vehicle deep learning tasks, and synchronously collects GPU power consumption time series data to construct the original sample set.

[0081] Step S2, Vehicle-Mounted RSU Scenario Modeling: Construct a mathematical model for energy consumption prediction that adapts to concurrent multi-vehicle tasks of the RSU. Optimize the linear model for scenario features such as the RSU simultaneously receiving unloading image tasks from multiple vehicles and varying epoch lengths of vehicle tasks. After completing the model structure design, iteratively train the initial model using original samples from vehicle tasks for real-time energy consumption prediction of newly accessed vehicle tasks.

[0082] Step S201: Preliminary linear regression modeling;

[0083] The coupling relationship between the hardware performance counters of RSU GPU and CPU and the power consumption of vehicle-mounted image detection tasks is correlated, and an interpretable linear model is used to simultaneously characterize the fixed power consumption of RSU hardware and the dynamic computing power consumption of vehicle-mounted tasks.

[0084] The general linear model is known to be:

[0085] (1)

[0086] Step S202: Bind the vehicle unloading task scenario optimization model;

[0087] Step S021: Assign values ​​to variables based on specific scenarios; This represents the total energy consumption of a complete deep learning task sent from a single vehicle to the RSU. As an input variable to the model, it represents energy consumption data obtained through specific measurement methods, namely the average power of the onboard task GPU. Running time Energy consumption per round By relying on a small amount of onboard task sampling epoch data, the solution is obtained using the least squares method. and intercept Iteratively correct parameters to adapt to the computing power fluctuation characteristics of vehicle-mounted image tasks, and more accurately predict energy consumption over long periods in the future.

[0088] Step S2022: Construct a dedicated function for vehicle task energy consumption per round to adapt to the scenario of continuous long-term operation of vehicle tasks.

[0089] (2)

[0090] in, This represents the runtime of the RSU processing the onboard task in the i-th epoch. This represents the average GPU power during the i-th epoch of RSU processing in-vehicle tasks. This indicates the total number of epochs that the onboard mission has successfully run on the RSU up to the present.

[0091] Step S3: Solve for the parameters of the vehicle-specific model using the least squares method.

[0092] Using the energy consumption samples of the vehicle-mounted YOLO task collected by RSU as input, the optimal solution is found by minimizing the squared error between the predicted energy consumption and the actual energy consumption of the vehicle-mounted task. , The parameters specifically include the following steps:

[0093] Step S301: Rewrite formula (1) as formula (3).

[0094] (3)

[0095] in, For the aforementioned vehicle-mounted scenario coefficients , for , Inputting characteristics for vehicle-mounted tasks , This is a parameter vector specific to the vehicle-mounted task, including intercept and slope.

[0096] Step S302: For n samples, the loss function is now:

[0097] (4)

[0098] Step S303: Assume the monitored data can be represented as:

[0099] (5)

[0100] Step S304: Therefore, we can obtain:

[0101] (6)

[0102] (7)

[0103] (8)

[0104] (9)

[0105] Step S305: Taking the derivative with respect to W, we get:

[0106] (10)

[0107] Step S306: Setting the reciprocal to 0 yields:

[0108] (11)

[0109] (12)

[0110] Step S307: This leads to the following:

[0111] (13)

[0112] Step S4, Onboard Task Segment Error Balancing Correction: To reduce errors, a specific error balancing method is designed, aiming to reduce and control error accumulation during the prediction process through a specific algorithm adjustment mechanism. This includes the following steps:

[0113] Step S401: Quantitatively calculate the error;

[0114] When predicting energy consumption over a long period (e.g., 50 or more rounds) based on a small amount of measured data (in this example, only three rounds of monitoring data are used), linear models often accumulate prediction errors due to the limitations of the data volume and the dynamic characteristics of time series. This cumulative effect of error significantly reduces the accuracy and reliability of the prediction results.

[0115] Step S402: In order to effectively address this problem, an error balancing method was specifically designed, which aims to reduce and control the accumulation of errors in the prediction process through a specific algorithm adjustment mechanism.

[0116] Step S403: Specifically, define the energy consumption predicted by the model as a variable, denoted as... At the same time, the error rate is introduced. This quantifies the degree of deviation between predicted and actual values. Furthermore, it defines the energy consumption after error alignment. That is, the predicted energy consumption value after error correction, so as to be closer to the actual energy consumption. Formula (14) was used for calculation.

[0117] (14)

[0118] Step S404: Regarding the error rate In this embodiment, formula (15) is used to calculate the value, which takes into account the number of monitoring rounds. (i.e., the actual number of data points acquired) and the number of prediction rounds. (That is, the number of future data points the model needs to predict), thereby enabling more accurate assessment and adjustment of prediction errors and improving the overall performance of the prediction model.

[0119] (15)

[0120] in, Indicates the energy consumption error rate of onboard tasks. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

[0121] Step S405: The error balance formula is then obtained as follows:

[0122] (16)

[0123] in, This indicates the energy consumption of the onboard task after error alignment. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This represents the predicted energy consumption for onboard tasks output by the model. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

[0124] In step 4, a small amount of measured data is first received as input to train a linear model. This linear model is then used to predict the input data, yielding preliminary prediction results. Based on the proposed formula and the number of monitoring rounds... and the predicted number of rounds The calculated energy consumption is after error alignment. and error rate The adjusted prediction results are output for further analysis or decision-making. This invention improves the computational efficiency of energy consumption prediction and effectively solves the problem of edge server energy consumption management in the Internet of Vehicles.

[0125] Example 2: This example provides a real-time prediction system for energy consumption of in-vehicle deep learning tasks, to realize the real-time prediction method for energy consumption of in-vehicle deep learning tasks. It includes a data acquisition unit, an in-vehicle scene energy consumption mathematical model unit, a least squares solution unit, and a piecewise error balancing unit, wherein:

[0126] The acquisition unit is deployed on the RSU and is used to collect GPU energy consumption data of vehicle-mounted deep learning image detection tasks unloaded from multiple vehicles to the RSU as raw samples.

[0127] The vehicle-mounted scenario energy consumption mathematical model unit is used to construct a dedicated energy consumption prediction mathematical model for the concurrent characteristics of RSU multi-vehicle-mounted tasks. In the model iteration module, the initial model is trained using the original samples of vehicle-mounted tasks, and the output is sent to the subsequent modules to complete the real-time energy consumption prediction of vehicle-mounted tasks.

[0128] The least squares solving unit is used to solve the energy consumption mathematical model adapted to the vehicle RSU scenario using the least squares method, and to calculate the vehicle-specific model parameters.

[0129] The segmented error balancing unit reduces and controls the accumulation of prediction errors throughout the entire operation cycle of the vehicle-mounted deep learning task by adapting the error balancing formula to the long and short cycle tasks of the vehicle.

[0130] The real-time energy consumption prediction method proposed in this invention has significant advantages in error analysis and alignment error reduction. Through accurate prediction of the energy consumption of the YOLO model on a graphics processing unit (GPU), experimental verification shows that this method can control the prediction error to within 3% in short-term energy consumption prediction. Figure 2 As shown, this demonstrates extremely high prediction accuracy. Furthermore, for long-term energy consumption prediction tasks, the prediction error remains below 6%, as... Figure 3 As shown, it is significantly superior to existing energy consumption prediction technologies, indicating that the present invention has unique advantages in reducing prediction errors.

[0131] During error analysis, experimental data demonstrate that this invention effectively identifies and reduces alignment errors caused by model complexity and hardware differences, ensuring the accuracy and stability of energy consumption prediction. Through systematic analysis and optimization of energy consumption prediction errors on different GPU platforms, the real-time prediction method proposed in this invention minimizes errors, ensuring high accuracy and reliability of prediction results. These advantages enable this invention to provide more accurate energy consumption prediction support for RSUs, optimize energy dispatch management strategies, and thus promote efficient energy utilization and the achievement of energy conservation and emission reduction goals, demonstrating significant application value.

[0132] Example 3: This example proposes an electronic device deployed in a roadside unit (RSU), comprising: at least one processor, at least one memory, and a communication interface; the processor, memory, and communication interface communicate with each other; the memory stores program instructions that can be executed by the processor; the processor calls the program instructions to execute the real-time prediction method for energy consumption of in-vehicle deep learning tasks described in this invention.

[0133] It should be noted that the processing flow of each functional module described in Embodiments 2-3 corresponds to the corresponding steps of the method provided in Embodiment 1, and has the function of executing the method steps and the corresponding technical effects. Technical details not described in detail in Embodiments 2-3 can be found in Embodiment 1.

[0134] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] The specific implementation schemes 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 implementation schemes of the present invention and are not intended to limit the scope of the present invention. Any equivalent changes and modifications made by those skilled in the art without departing from the concept and principles of the present invention should fall within the scope of protection of the present invention.

Claims

1. A real-time prediction method for energy consumption in vehicle-mounted deep learning tasks, characterized in that, Includes the following steps: S1. Relying on the roadside unit (RSU), collect the energy consumption data generated by the on-board deep learning image detection task of different vehicles unloaded to the RSU during actual GPU operation as the original sample. S2. To address the characteristics of concurrent RSU multi-channel in-vehicle deep learning tasks and alternating epoch lengths for in-vehicle tasks, design a real-time energy consumption prediction mathematical model adapted to in-vehicle perception tasks. After completing the structural design of the model, train the initial model using the original samples in the model iteration module for subsequent real-time energy consumption prediction of in-vehicle tasks. S3. Solve the mathematical model for real-time prediction of energy consumption for in-vehicle deep learning tasks using the least squares method, and calculate the exclusive model parameters adapted to the RSU in-vehicle concurrent scenario. S4. Combining the scenario characteristics of short-cycle sampling and long-cycle continuous operation of vehicle-mounted tasks, the prediction error accumulation during the entire operation cycle of the vehicle-mounted deep learning task is reduced and controlled in layers through the error balancing formula, and the real-time predicted energy consumption of the vehicle-mounted deep learning task is output.

2. The method according to claim 1, characterized in that, In step S4, the error balance formula is as follows: ; in, This indicates the energy consumption of the onboard task after error alignment. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This represents the predicted energy consumption for onboard tasks output by the model. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This indicates the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

3. The method according to claim 2, characterized in that, Step S4 specifically includes the following steps: S401, Introducing Error Rate To quantify the deviation between the predicted energy consumption and the actual energy consumption of the onboard deep learning task on the RSU, and to distinguish the correction logic by the long and short running cycles of the onboard task, the energy consumption of the onboard task after error alignment is calculated. ; in, This indicates the energy consumption of the onboard task after error alignment. This represents the predicted energy consumption for onboard tasks output by the model. Indicates the energy consumption error rate of onboard tasks; S402, Integrated RSU side has completed the number of on-board task monitoring rounds Total number of vehicle-mounted mission rounds to be predicted Then calculate the error rate specific to the vehicle-mounted task. ; ; in, Indicates the energy consumption error rate of onboard tasks. This represents the energy consumption predicted by the model during the i-th round of onboard task monitoring by RSU. This represents the actual energy consumption of the RSU during the i-th round of onboard task monitoring. This represents the energy consumption predicted by the model during the nth round of onboard task monitoring by RSU. This indicates the actual energy consumption of the RSU during the nth round of onboard task monitoring. This indicates the total number of rounds of valid vehicle-mounted task monitoring samples collected. This indicates the total number of rounds of operation for the onboard mission to be predicted. This indicates the number of vehicle-mounted monitoring missions that have completed sampling.

4. The method according to claim 3, characterized in that, Step S2 specifically includes the following steps: S201. For concurrent scenarios of RSU multi-channel vehicle image deep learning tasks, a basic linear prediction model is constructed by associating the coupling relationship between the performance counters of RSU server GPU and CPU and the power consumption of vehicle perception tasks. The linear model is as follows: ; S202. Construct a linear model for directional optimization of the vehicle-mounted RSU scenario, specifically as follows: S2021. Assigning linear model variables to fit the physical meaning of the vehicle unloading task. This represents the total energy consumption of a complete deep learning perception task sent from a single vehicle to the RSU. Using the GPU energy consumption input features collected by RSU for in-vehicle tasks, and relying on the sampling round data of the in-vehicle tasks, the slope parameters of the model adapted to the in-vehicle image detection task are solved. and intercept parameter ; S2022. Based on the real-time acquisition of the GPU running status of the vehicle task by RSU, for the scenario of continuous multi-epoch operation of vehicle tasks, a special function relationship between the energy consumption of vehicle deep learning tasks and the number of epochs of task operation is constructed to achieve accurate prediction of long-cycle energy consumption of vehicle tasks.

5. The method according to claim 4, characterized in that, The functional relationship between the task energy consumption and the number of task execution rounds is as follows: ; in, Indicates that the RSU handles onboard tasks. Total energy consumption after wheel, Slope of the corresponding linear model , Intercept of the corresponding linear model , This represents the runtime of the RSU processing the onboard task in the i-th epoch. This represents the average GPU power during the i-th epoch of RSU processing in-vehicle tasks. This indicates the total number of epochs that the onboard mission has successfully run on the RSU up to the present.

6. The method according to claim 5, characterized in that, Step S3 specifically includes the following steps: S301. Rewrite the vehicle taskline performance consumption model in matrix form: ; in, For the aforementioned vehicle-mounted scenario coefficients , for , Inputting characteristics for vehicle-mounted tasks , This is a parameter vector specific to the vehicle-mounted task, including intercept and slope. S302, for RSU data acquisition Based on the energy consumption samples of vehicle-mounted tasks, a squared loss function is constructed: ; in, This represents the total squared error loss in onboard mission energy consumption prediction. Indicates the first The actual total energy consumption of the vehicle-mounted mission sample group. Represents a parameter vector. Indicates the first Input characteristics of vehicle-mounted tasks; S303. Vectorize the measured energy consumption data of onboard tasks collected by the RSU: ; in, This represents the actual energy consumption observation vector for onboard tasks. Indicates the first Actual total energy consumption of the vehicle-mounted mission sample group This represents the design matrix of in-vehicle mission features. Indicates the first Group vehicle-mounted task input characteristics; S304. Deriving the expansion of the loss function matrix: ; ; ; ; S305, targeting Differentiation yields: ; S306, Let the reciprocal be... available: ; ; S307, and thus we obtain: ; in, This represents the optimal model parameter vector for adapting to deep learning tasks for in-vehicle images.

7. The method according to claim 1, characterized in that, Step S1 is deployed on the roadside unit (RSU). It relies on the energy consumption data generated by the YOLO series vehicle image detection deep learning model unloaded from the vehicle to the RSU and only collects a limited number of vehicle task epochs. Based on the deep learning framework, the Carbontracker tool is deployed locally on the RSU to monitor and record the GPU energy consumption for processing vehicle tasks in real time. It can accurately predict the long-cycle energy consumption of vehicle tasks by relying on only a small amount of sampled data.

8. The method according to claim 1, characterized in that, Step S1 collects the raw energy consumption data for the in-vehicle task on the RSU side, including: the average power of the GPU for processing in-vehicle image tasks. Single epoch runtime Average energy consumption per wheel for vehicle-mounted tasks Derived metrics calculated based on raw data: Total energy consumption for onboard tasks Average energy consumption per wheel for vehicle-mounted tasks Onboard mission energy consumption error rate .

9. A real-time prediction system for energy consumption of in-vehicle deep learning tasks, the system being deployed in a roadside unit (RSU) for predicting the energy consumption of in-vehicle image perception deep learning tasks unloaded from the vehicle to the RSU, characterized in that... It includes a data acquisition unit, an in-vehicle scenario energy consumption mathematical model unit, a least squares solution unit, and a piecewise error balancing unit, among which: The acquisition unit is deployed on the RSU and is used to collect GPU energy consumption data of vehicle-mounted deep learning image detection tasks unloaded from multiple vehicles to the RSU as raw samples. The vehicle-mounted scenario energy consumption mathematical model unit is used to construct a dedicated energy consumption prediction mathematical model for the concurrent characteristics of RSU multi-vehicle-mounted tasks. In the model iteration module, the initial model is trained using the original samples of vehicle-mounted tasks, and the output is sent to the subsequent modules to complete the real-time energy consumption prediction of vehicle-mounted tasks. The least squares solving unit is used to solve the energy consumption mathematical model adapted to the vehicle RSU scenario using the least squares method, and to calculate the vehicle-specific model parameters. The segmented error balancing unit reduces and controls the accumulation of prediction errors throughout the entire operation cycle of the vehicle-mounted deep learning task by adapting the error balancing formula to the long and short cycle tasks of the vehicle.

10. An electronic device deployed in a roadside unit (RSU), comprising: At least one processor, at least one memory, and a communication interface; The processor, memory, and communication interface communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the real-time prediction method for energy consumption of in-vehicle deep learning tasks as described in any one of claims 1-8.