Intelligent scheduling method and system for electricity cost calculation task of heterogeneous computing resources

By combining multidimensional feature extraction, gradient boosting decision tree model, and Dueling DQN model, the insufficient scheduling strategy of heterogeneous computing resources in electricity billing tasks is solved, achieving precise matching between tasks and hardware and system performance optimization, thereby improving the efficiency and resource utilization of power computing.

CN122044890BActive Publication Date: 2026-06-19STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT +3

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT
Filing Date
2026-04-14
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing heterogeneous computing resource scheduling strategies for electricity billing tasks suffer from problems such as a single perception dimension, rigid decision-making mechanism, insufficient predictive ability, and lack of evolutionary ability. This results in idle or inefficient operation of hardware computing power in heterogeneous computing clusters, failing to meet the high-efficiency, intelligent, and green requirements of the smart power era.

Method used

By employing multidimensional feature extraction and heterogeneous computing unit status monitoring, combined with gradient boosting decision tree model and Dueling DQN model, precise matching and dynamic optimization of tasks and hardware are achieved, forming a perception-decision closed loop, realizing precise matching of tasks and hardware and optimization of overall system performance.

Benefits of technology

It significantly improved task latency and energy efficiency, increased system throughput and overall performance, met the power industry's needs for high concurrency and smooth scalability, and achieved simultaneous optimization of operation and maintenance quality and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044890B_ABST
    Figure CN122044890B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent scheduling method and system for heterogeneous computing resources for electricity cost calculation tasks. The method includes: extracting multi-dimensional features from arriving computing tasks to construct a task computing density feature vector; collecting multi-dimensional operating status indicators of heterogeneous computing units in real time to construct a hardware status vector; using a gradient boosting decision tree model to predict the execution performance of computing tasks on each candidate computing unit; using a Dueling DQN model for optimization decision-making to generate a scheduling decision to allocate computing tasks to target computing units; executing computing tasks and collecting actual performance data, and performing online feedback updates on the gradient boosting decision tree model and the Dueling DQN model. This invention enables a novel intelligent scheduling system with fine-grained multi-dimensional perception, accurate performance prediction, dynamic multi-objective optimization, and closed-loop continuous evolution, solving the problems of accurate matching of tasks and heterogeneous hardware and optimization of overall system performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computing resource scheduling technology, and relates to a method and system for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks. Background Technology

[0002] With the deepening of the informatization and intelligent transformation of the power industry, electricity billing tasks have evolved from simple billing summation to complex calculations involving multiple modes such as tiered pricing, peak-valley time-of-use pricing, policy subsidies, and data verification. The data scale and computational complexity have increased explosively. To address this challenge, adopting heterogeneous computing systems that integrate central processing units (CPUs), graphics processing units (GPUs), and field-programmable gate arrays (FPGAs) has become a key path to improve computing power. However, existing mainstream task scheduling strategies all have significant limitations when facing the specific needs of electricity billing scenarios, failing to fully unleash the potential of heterogeneous computing platforms. These strategies can be mainly divided into static assignment strategies, load balancing-based scheduling strategies, historical performance model-based scheduling strategies, and single machine learning model-based scheduling strategies.

[0003] Static assignment strategies allocate tasks to specific types of hardware based on predefined rules. For example, all matrix operation tasks might be fixed to GPUs, or all control-intensive tasks might be assigned to CPUs. However, this approach completely ignores the dynamic diversity of task characteristics and changes in real-time hardware load. In electricity billing, batch electricity billing tasks, even those involving "matrix operations," can have vastly different computational intensities and parallel granularities. Using the same static assignment rule would inevitably lead to severe mismatches between some tasks and the hardware architecture, resulting in low computational efficiency and wasted resources.

[0004] Load balancing-based scheduling strategies aim to balance the load or queue length of each computing node, preventing partial hardware overload. However, their core flaw lies in treating tasks as indiscriminate "black boxes," focusing only on macro-level resource utilization while completely ignoring the intrinsic relationship between task computational characteristics and hardware execution efficiency. For example, during peak electricity billing periods at the end of the month, simply round-robin distributing tasks to all available hardware might assign a large number of batch computing tasks, which would be better suited for GPU parallel processing, to already heavily loaded CPUs, while forcing idle FPGAs to handle complex branch logic tasks they are not good at, leading to a decrease in overall system throughput and a surge in energy consumption.

[0005] Scheduling strategies based on historical performance models analyze historical task execution records to establish a mapping model from task type (or simple features) to execution time, and then perform scheduling based on this model. Its improvement lies in the introduction of prediction; however, the models are often too simplistic (e.g., using linear regression or historical averages) and typically only consider data size, resulting in a single feature dimension. The performance of electricity cost calculation tasks is the result of complex nonlinear interactions between multidimensional task characteristics (computational intensity, control complexity, etc.) and multidimensional hardware states (utilization, memory bandwidth, etc.). Simple linear models cannot accurately characterize this relationship, leading to large prediction biases and consequently, scheduling decisions based on unreliable foundations, resulting in inaccurate resource allocation.

[0006] In recent years, some studies have attempted scheduling strategies based on a single machine learning model, applying a single machine learning model (such as a standard deep Q-network or decision tree) for scheduling decisions. While this represents an improvement over traditional methods, such approaches still have significant limitations: a single model struggles to simultaneously achieve high-precision instantaneous performance prediction and long-term multi-objective optimization. For example, a simple reinforcement learning model requires extensive trial and error to learn the performance of a task on specific hardware, resulting in slow convergence and high initial costs; while a simple performance prediction model lacks the ability to balance multiple objectives such as time and energy consumption from a global and long-term perspective.

[0007] In summary, existing scheduling technologies, when applied to complex heterogeneous environments such as electricity billing, generally suffer from core problems including a single perception dimension, rigid decision-making mechanisms, insufficient predictive capabilities, and a lack of evolutionary capacity. These shortcomings collectively lead to the ineffective utilization of high-performance computing resources (such as GPUs and FPGAs) deployed in heterogeneous computing clusters, with a large amount of hardware computing power remaining idle or operating inefficiently. Even when resources are used, inefficiencies and increased energy consumption arise due to task-hardware architecture mismatch. Ultimately, this results in low overall system resource utilization, making it difficult to meet the stringent requirements of the smart power era for efficient, intelligent, and green electricity billing systems. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention provides a method and system for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks. This system enables a novel intelligent scheduling approach that achieves fine-grained multi-dimensional perception, accurate performance prediction, dynamic multi-objective optimization, and closed-loop continuous evolution. It fundamentally solves the challenges of accurately matching tasks with heterogeneous hardware and optimizing the overall system performance.

[0009] The present invention adopts the following technical solution.

[0010] The first aspect of this invention proposes an intelligent scheduling method for heterogeneous computing resources for electricity cost calculation tasks, comprising:

[0011] Multidimensional features are extracted from the arriving computing tasks to construct a task computing density feature vector; multidimensional operating status indicators of heterogeneous computing units are collected in real time to construct a hardware status vector.

[0012] Candidate computing units are selected, and based on the task computing density feature vector and the hardware state vector, a gradient boosting decision tree model is used to predict the execution performance of the computing task on each candidate computing unit; wherein the gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights;

[0013] Based on the predicted execution performance, the Dueling DQN model is used to make optimization decisions and generate scheduling decisions to allocate the computing tasks to the target computing units.

[0014] The computational task is executed according to the scheduling decision, and actual performance data is collected. The actual performance data is then used to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

[0015] Preferably, the multidimensional features include computational intensity, parallel granularity, control complexity, memory density, data type preference, and data size during task execution.

[0016] Preferably, the multi-dimensional operating status indicators include computing utilization, real-time power consumption, available memory capacity, memory utilization, hardware temperature, and waiting queue length.

[0017] Preferably, the candidate computing units are selected based on the basic resource requirements of the task and the immediate availability of hardware.

[0018] Preferably, the execution performance includes execution time, energy consumption, and cost.

[0019] Preferably, the gradient boosting decision tree model is trained using historical task execution records and employs an incremental learning mechanism, retaining a recently set number of historical samples through a sliding window and periodically retraining the model parameters; the loss function used for training is:

[0020]

[0021] in, The number of samples; , , Let be the actual values ​​of execution time, energy consumption, and cost for the i-th sample; , , The model predictions for the execution time, energy consumption, and cost of the i-th sample; , , For the weighting coefficients, satisfying ; Calculate the density feature vector for the i-th sample. Let be the hardware state vector of the i-th sample; The task-hardware matching weight.

[0022] Preferably, the task-hardware matching weight Calculated using the following formula:

[0023]

[0024] in, This is the magnitude coefficient of the influence of the matching degree; is the learnable projection matrix; tanh() is the hyperbolic tangent function; Let be the Euclidean norm of the vector; This indicates that the vector is transposed.

[0025] Preferably, based on the predicted execution performance, an optimization decision is made using the Dueling DQN model to generate a scheduling decision for allocating the computational task to the target computing unit, specifically including:

[0026] The global state of the computing system is constructed by aggregating the task computation density feature vector of the current task, the cluster hardware state matrix obtained by aggregating the hardware state vectors of each heterogeneous computing unit, system context information, and the prediction results of execution performance. ;

[0027] The Dueling DQN model is based on the global state of the computing system. Evaluate the long-term expected benefit Q-value of different scheduling actions, and select the action that maximizes the Q-value as the scheduling decision for allocating the computational task to the target computational unit; wherein, the formula for calculating the Q-value is:

[0028]

[0029] In the formula, To compute the global state of the system Select action Q value; For the network parameters of the Dueling DQN model, including and ; The state value function for calculating the global state s of the system; To determine the dominance function for selecting action a given global state s of the computational system; This is the advantage function for selecting action a′ in the global state s of the computational system; For action space Size.

[0030] Preferably, the Dueling DQN model is trained using empirical replay and fixed-target network techniques, and the network parameters are updated by minimizing the following loss function. :

[0031]

[0032] in, The loss function; For experience replay buffer Transfer samples randomly sampled from the middle Expectations; To perform the action The next state after that; For instant rewards; Discount factor; For parameters The target network in the next state Next, select an action. The Q value.

[0033] Preferably, the Dueling DQN model uses a multi-objective reward function to calculate the immediate reward. The multi-objective reward function includes four optimization objectives: execution time, energy consumption, cost, and deadline, and the specific formula is as follows:

[0034]

[0035] , ,

[0036] in, , , Rewards can be time-based, energy-based, or cost-based. , , The actual execution time, energy consumption, and cost of the task; Rewards and penalties based on deadlines, when ≤ A positive reward is given if the time is right, and a negative reward is given otherwise. To calculate the deadline for the task; The weighting coefficients for execution time, energy consumption, cost, and deadline are dynamically set according to a preset dynamic adjustment mechanism.

[0037] Preferably, the process of dynamically setting the weight coefficients by the preset dynamic adjustment mechanism is as follows:

[0038] Step 1: Calculate the deadline urgency factor and the overall cluster resource pressure factor:

[0039]

[0040]

[0041] in, This is the urgency factor for the current computation task's deadline. The current system time. To calculate the deadline for the task; The urgency sensitivity coefficient; As a factor affecting the overall resource pressure of the cluster, To calculate the total number of units, and The first The computational utilization and memory utilization of each computing unit;

[0042] Step 2: Calculate the dynamic score of each optimization objective based on the task deadline urgency factor and the overall cluster resource pressure factor. ,include:

[0043] Dynamic scoring over time: ;

[0044] Dynamic energy consumption rating: ;

[0045] Dynamic cost rating: ;

[0046] Dynamic scoring by deadline: ;

[0047] in, , , , , , , Preset configuration coefficients;

[0048] Step 3: Dynamically calculate the weight coefficients based on the dynamic scores of each optimization objective:

[0049]

[0050] in, The weight coefficients are those corresponding to the g-th optimization objective. This is the smoothing coefficient for weight adjustment.

[0051] Preferably, the online feedback update includes:

[0052] The difference between the actual performance data and the predicted performance results is used as incremental learning samples to update the gradient boosting decision tree model.

[0053] The reward value is calculated based on the actual performance data and the experience tuple is stored in the experience replay buffer for learning and updating the Dueling DQN model.

[0054] Preferably, the online feedback update further includes:

[0055] The exploration rate of the Dueling DQN model is calculated using the following dynamic adjustment strategy. This is used to adaptively balance the trade-off between exploration and exploitation based on changes in task type and system stability.

[0056]

[0057] in, The exploration rate when the number of training steps is t; The upper and lower limits of the exploration rate; The basic attenuation rate coefficient; The weighting coefficients are influenced by two dimensions. The degree of difference in task type distribution; As a system stability indicator; , These are the sensitivity adjustment factors for the impact of task variability and system stability on the exploration rate, respectively.

[0058] A second aspect of this invention proposes a heterogeneous computing resource intelligent scheduling system for electricity cost calculation tasks, comprising:

[0059] The task feature extraction module is used to extract multi-dimensional features from the arriving computational tasks and construct a task computation density feature vector.

[0060] The hardware status monitoring module is used to collect multi-dimensional operating status indicators of heterogeneous computing units in real time and construct hardware status vectors.

[0061] The intelligent decision-making module is used to filter candidate computing units and predict the execution performance of the computing task on each candidate computing unit based on the task computing density feature vector and the hardware state vector. The gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights. Based on the predicted execution performance, the Dueling DQN model is used to make optimization decisions and generate a scheduling decision to allocate the computing task to the target computing unit.

[0062] The task execution and feedback module is used to execute the computational task according to the scheduling decision, collect actual performance data, and use the actual performance data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

[0063] A third aspect of the present invention provides a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to perform operations according to the instructions to execute the steps of the method.

[0064] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.

[0065] Compared with the prior art, the beneficial effects of the present invention include at least the following:

[0066] This invention extracts multi-dimensional features from arriving computational tasks, constructs a task computation density feature vector, and collects multi-dimensional operational status indicators of heterogeneous computing units in real time to construct a hardware state vector. Based on the task computation density feature vector and the hardware state vector, a gradient boosting decision tree model is used to predict the execution performance of the computational task on each candidate computing unit, forming a learnable task-hardware interaction perception system. This achieves precise quantification and a paradigm breakthrough in task-hardware matching, solving the problems of single feature dimensions and difficulty in integrating heterogeneous information in existing technologies. Specifically, the gradient boosting decision tree model introduces task-hardware matching weights into its loss function. This loss function uses a learnable projection matrix to spatially align and measure the similarity between the two types of heterogeneous feature vectors: the task computation density feature vector and the hardware state vector. This allows the gradient boosting decision tree model to autonomously identify and strengthen the contribution of samples with high matching between task features and hardware states to prediction accuracy during the learning process, thereby significantly improving prediction accuracy in complex heterogeneous environments and providing a more reliable basis for subsequent scheduling decisions. This quantified perception system lays a reliable and interpretable data foundation for subsequent intelligent scheduling.

[0067] This invention employs a gradient boosting decision tree model to predict the execution performance of a computational task on each candidate computing unit. Based on the predicted performance, it uses a Dueling DQN model for optimization decisions, generating a scheduling decision to allocate the computational task to the target computing unit. This forms a deeply coupled two-layer collaborative decision-making framework, solving the core problem of the disconnect between prediction and decision-making, and achieving a leap in decision-making efficiency. Accurate performance prediction is structurally embedded into the decision-making loop, forming a perception-decision closed loop. This elevates scheduling decisions from a reactive mode based on historical trial and error to a predictive planning mode based on multi-future simulation, thereby achieving an order-of-magnitude improvement in policy convergence speed and new task adaptation efficiency. Specifically, in the prediction layer, a loss function based on task-hardware matching weights allows the gradient boosting decision tree model to focus on high-matching samples, improving prediction accuracy. In the decision layer, a preset dynamic adjustment mechanism dynamically sets the weight coefficients in the multi-objective reward function. By constructing a task deadline urgency factor and a cluster resource pressure factor as dual driving variables and designing a coupled differentiated dynamic scoring function, the scheduling strategy achieves synchronous perception and real-time response to business urgency and system load status.

[0068] This invention utilizes actual performance data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model, designing a value-driven and state-adaptive closed-loop evolutionary mechanism to achieve a leap from passive updates to active optimization. It employs a two-dimensional dynamic exploration rate adjustment strategy, introducing task type distribution differences and system stability as dual adjustment factors. This allows exploration behavior to adaptively respond to changes in the task environment and system state fluctuations, adaptively balancing the trade-off between exploration and utilization.

[0069] This invention achieves verifiable system-level performance leaps and outstanding engineering scalability in handling electricity cost calculation tasks. Average task latency and single-task energy consumption are significantly reduced, system throughput and overall performance scores are significantly improved, and task deadline violation rates are effectively controlled. Simultaneously, its standardized and modular design ensures excellent engineering scalability, with core scheduling latency increasing gradually as the cluster size expands. This fully meets the stringent requirements of the power industry for high-concurrency, smoothly scalable computing platforms, achieving simultaneous optimization of operational quality and long-term economic benefits. Attached Figure Description

[0070] Figure 1 This is a flowchart of the intelligent scheduling method of the present invention.

[0071] Figure 2 This is a closed-loop optimization framework diagram of the intelligent scheduling system of the present invention.

[0072] Figure 3The flowchart shows the multidimensional feature extraction process for the task.

[0073] Figure 4 This is a schematic diagram of heterogeneous hardware status monitoring. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.

[0075] Embodiment 1 of this invention provides an intelligent scheduling method for heterogeneous computing resources for electricity cost calculation tasks. Targeting the unique load and heterogeneous computing environment of electricity cost calculation tasks, it achieves optimal matching between electricity cost calculation tasks and heterogeneous hardware resources through a closed loop of perception-decision-execution-evolution. This not only achieves quantitative improvements in core performance indicators such as task latency, energy consumption, and resource utilization, but also provides an efficient and reliable solution for the intelligent operation and maintenance of heterogeneous computing clusters in the power industry through its adaptive scheduling mechanism based on multi-dimensional feature perception and closed-loop learning. It possesses outstanding technological advancement and practical value. Figure 1 As shown, the method includes the following steps:

[0076] S1: Perform multi-dimensional feature extraction on the arriving computational task and construct a task computation density feature vector;

[0077] More preferably, multi-dimensional feature extraction is performed on the arriving computational task to obtain a task computation density feature vector that includes computational intensity, parallel granularity, control complexity, memory density, data type preference, and data size.

[0078] By using dynamic sampling and micro-batch trial operation technology, the multidimensional feature extraction is completed within 100 milliseconds after task submission.

[0079] Specifically, the multi-dimensional feature modeling and quantification process for the electricity cost calculation task is as follows:

[0080] The system performs rapid feature analysis on various submitted electricity bill calculation tasks (such as tiered pricing calculation, batch user fee calculation, and policy subsidy verification). During implementation, six-dimensional quantitative feature vectors are extracted using the following specific technical methods:

[0081] (1) Computational intensity: The number of floating-point operations required to move each byte of data, dynamically calculated by micro-batch trial execution (running in a sandbox with 1% of the input data) and combined with hardware performance counters (such as CPU PMC events or GPU NVPM metrics), with the unit being FLOPS / Byte.

[0082] (2) Parallel Granularity: This refers to the degree to which a task can be decomposed into parallel subtasks. It can be evaluated by analyzing the computation graph or dependencies of the task. The value range is [0,1]. For example, by analyzing the directed acyclic graph (DAG) of the task, we can calculate that: the batch calculation task of electricity billing for large-scale users contains parallel subtasks of 10,000 independent users. Its maximum parallel width of DAG is 10,000 and the critical path length is 5. The calculated parallel granularity is approximately 0.9995, which is equal to the maximum parallel width / (maximum parallel width + critical path length). The single-user tiered electricity pricing calculation task, which contains complex dependencies, has a maximum parallel width of 2 and a critical path length of 28. The calculated parallel granularity is approximately 0.0667.

[0083] (3) Control complexity: This refers to the complexity of the program's control flow, with a value range of [0,1]. Through static code analysis, for a simple multiplication script that only contains sequential execution and has no branches or loops, its control complexity value is 0. For complex scripts, the nesting depth / density of conditional branches and loops in the billing script is statistically analyzed and normalized to obtain the value. For example:

[0084] Step 1): Calculate the original complexity score:

[0085] +α D

[0086] Where: B is the number of conditional branches; L is the total number of lines of code or executable statements; D is the maximum nesting depth; α is the nesting penalty coefficient (within the range of (0,1], used to control the contribution of nesting depth to complexity);

[0087] Substituting the values, for example, in a billing script with 5 conditional branches and a maximum nesting depth of 4, where B is 5, D is 4, L is assumed to be 50, and α is set to 0.1, we can obtain: =0.5;

[0088] Step 2): Use the Sigmoid function for nonlinear mapping to ensure that the increase in complexity conforms to the law of diminishing marginal utility.

[0089]

[0090] Where k is the kurtosis coefficient, which controls the slope of the mapping curve, such as k=2.5;

[0091] μ is the offset, which controls the position of the curve center. For example, μ=0, or it can be set according to actual needs.

[0092] According to the above formula, a billing script with 5 conditional branches and a maximum nesting depth of 4 can be obtained, and its control complexity is calculated to be 0.78.

[0093] (4) Memory density: The ratio of memory access frequency to computational load. It is estimated by the ratio of memory read / write bandwidth to computational operands monitored during the trial execution phase. The quantified value is in the range of [0,1].

[0094] (5) Data type preference: The main data types used by the task are identified by analyzing the constant definitions, variable declarations and core operation library functions in the billing script.

[0095] (6) Data size: The total size (MB) of the input / output data of the record task.

[0096] The system combines a pre-built task feature template library with the aforementioned dynamic analysis to generate a standardized feature vector within the predetermined time. This task computation density feature vector will work in conjunction with the hardware state vector collected in subsequent steps to provide accurate input for evaluating task-hardware compatibility and performance prediction.

[0097] S2: Real-time acquisition of multi-dimensional operational status indicators of heterogeneous computing units to construct hardware status vectors;

[0098] More preferably, the heterogeneous computing unit includes a CPU, a GPU, and an FPGA.

[0099] Real-time monitoring of runtime status metrics of CPU, GPU, and FPGA computing units in a heterogeneous computing cluster, such as computing utilization, real-time power consumption, and available memory capacity, yields a hardware status vector containing computing utilization, real-time power consumption, and available memory capacity. The computing utilization rate is the percentage of time a computing unit's active computing core executes non-idle instructions within the sampling period, obtained by reading hardware performance counters.

[0100] The hardware state vector also includes memory utilization, hardware temperature of heterogeneous computing units, and wait queue length.

[0101] The status of all computing units is polled at fixed time intervals, and the status data is standardized to form a unified hardware status view.

[0102] Specifically, the heterogeneous hardware resource profile and status awareness are as follows:

[0103] The system establishes fine-grained resource profiles for various computing units such as CPU, GPU, and FPGA, including:

[0104] Static performance profile: By reading hardware specifications and running standard benchmark programs (such as LINPACK and HPL), peak computing power, memory bandwidth, capacity, basic / peak power consumption, and computing cost per unit time are recorded to form a benchmark database.

[0105] Dynamic Status Awareness: Real-time metrics are collected at a rate of seconds via monitoring agents deployed on compute nodes, including compute core and memory utilization, queue length, hardware temperature, instantaneous power consumption, and available memory. The data is aggregated via message queues (such as Kafka) to form a globally unified hardware status view.

[0106] S3: Filter candidate computing units and calculate the density feature vector based on the task and the hardware state vector, and use a gradient boosting decision tree model to predict the execution performance of the computing task on each candidate computing unit; wherein the gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights;

[0107] More preferably, the candidate computing units are selected based on the task's basic resource requirements and the immediate availability of hardware. Selection can also be combined with the theoretical fit score of a hardware efficiency model. The hardware efficiency model is a simplified efficiency prediction function constructed for each type of hardware. For example, the GPU efficiency model can be represented as a linear function of computational intensity and parallel granularity, with coefficients obtained through regression analysis of historical benchmark data. This model can be used for rapid initial screening of candidate computing units, rapid theoretical fit evaluation of candidate computing units, and only hardware units with high theoretical fit scores are included in the subsequent gradient boosting decision tree model for accurate performance prediction, thereby improving overall scheduling efficiency.

[0108] Based on the task computation density feature vector and the hardware state vector, the execution performance of the task on each candidate computing unit is predicted by a gradient boosting decision tree model, wherein the predicted execution performance includes predicted execution time, predicted energy consumption and predicted cost.

[0109] The gradient boosting decision tree model is trained using historical task execution records and employs an incremental learning mechanism. It retains a predetermined number of recent historical samples through a sliding window and periodically retrains the model parameters. The loss function used for training is:

[0110]

[0111]

[0112] in, This represents the number of training samples;

[0113] , , Let be the actual values ​​of execution time, energy consumption, and cost for the i-th sample;

[0114] , , These are model predictions for execution time, energy consumption, and cost.

[0115] , , For the weighting coefficients, satisfying Its value is preset according to business needs. For example, it can be set to [value] during the peak period of electricity bill settlement at the end of the month. =0.6、 , Prioritizing execution time, the energy-saving mode can be set to [specific mode] during normal operation. =0.2、 , With an emphasis on energy consumption optimization;

[0116] Calculate the density feature vector for the i-th sample.

[0117] This is the hardware state vector when the i-th sample is executed;

[0118] The task-hardware matching weight is used to dynamically adjust the importance of the sample in training based on the degree of matching between task features and hardware status.

[0119] This is a coefficient representing the magnitude of the matching degree's influence, with a value range of (0,1], used to control the degree to which the matching degree contributes to the loss function; for example, it can be set to [value] during the system initialization phase. =0.8, to fully utilize the adjustment role of the matching degree, and can be set to 0.8 during the model fine-tuning stage. =0.3 to maintain stability; its specific value can be tuned by grid search or Bayesian optimization based on the prediction error on the validation set;

[0120] It is a learnable projection matrix used to align the task feature space with the hardware state space;

[0121] tanh() is the hyperbolic tangent function, which maps the matching score to ( The interval is 1,1).

[0122] Let be the Euclidean norm of the vector;

[0123] This indicates the transpose of a vector.

[0124] This loss function uses a learnable projection matrix to spatially align and measure the similarity of two types of heterogeneous feature vectors: task computation density feature vector and hardware state vector. This allows the model to autonomously identify and enhance the contribution of samples that highly match the task features and hardware state to the prediction accuracy during the learning process, thereby significantly improving the prediction accuracy in complex heterogeneous environments and providing a more reliable basis for subsequent scheduling decisions.

[0125] Through the above steps, this invention proposes a learnable task-hardware interaction perception system, achieving precise quantification and a paradigm breakthrough in task-hardware matching. Addressing the limitations of existing technologies, such as single feature dimensions and difficulty in integrating heterogeneous information, this invention establishes a bidirectional, learnable interaction mechanism between tasks and hardware. On the task side, six-dimensional computational density features (including control complexity quantified through static code analysis) are extracted within 100 milliseconds through dynamic sampling and micro-batch trial runs. On the hardware side, a six-dimensional state matrix is ​​formed through a unified monitoring framework. Furthermore, task-hardware matching weights are introduced, and alignment and similarity measurement of the feature space are achieved through a trainable projection matrix W. This quantified perception system lays a reliable and interpretable data foundation for subsequent intelligent scheduling.

[0126] S4: Based on the predicted execution performance, the Dueling DQN model is used to make optimization decisions and generate scheduling decisions to allocate the computing tasks to the target computing units;

[0127] More preferably, based on the prediction results of step S3, optimization decisions are made through the Dueling DQN (Dueling Deep Q Network, i.e., Dual Deep Q Network) model to generate scheduling decisions that allocate the task to the target computing unit;

[0128] Specifically, the process of using the Dueling DQN model for optimization decision-making is as follows:

[0129] The predicted execution performance is used as a key input, together with the task computation density feature vector of the current task, the cluster hardware state matrix, and the system context information, to form the state representation of the Dueling DQN model, that is, to calculate the global state of the system.

[0130] The system evaluates the long-term expected benefits of different scheduling actions based on the global system state; and finally selects the action that maximizes the Q value as the scheduling decision to allocate the computing task to the target computing unit.

[0131] The formula for calculating the Q value in the Dueling DQN model is:

[0132]

[0133] In the formula, In the state Next, select an action. Q value;

[0134] For the network parameters of the Dueling DQN model, including and ;

[0135] Let be the state value function of state s;

[0136] Let be the advantage function for choosing action a in state s;

[0137] Let be the advantage function for choosing action a′ in state s;

[0138] Let be the average of the advantage functions of all actions in state s;

[0139] The size of the action space;

[0140] Calculate the system's global state vector Including the task computation density feature vector of the current task Cluster hardware state matrix (That is, the aggregation result of the hardware state vectors constructed for each heterogeneous computing unit in S2, which is formed into a global hardware state matrix after unified standardization) and system context information. The predicted performance results are used as input to the Dueling DQN model to evaluate the long-term expected benefits of different scheduling actions and generate scheduling decisions.

[0141] Action space ,in This indicates that the task is assigned to the k-th computing unit. This indicates that no task will be assigned for the time being, and the user will enter the waiting queue.

[0142] The DuelingDQN model is trained using empirical replay and a fixed-target network technique, and its network parameters are updated by minimizing the following loss function. :

[0143]

[0144] in, The loss function;

[0145] For experience replay buffer Transfer samples randomly sampled from the middle Expectations;

[0146] To perform the action The next state after that;

[0147] To perform the action The instant reward obtained afterward;

[0148] This is a discount factor with a value range of (0,1], used to balance the importance of current rewards and future rewards; The closer the value is to 1, the more the model focuses on long-term cumulative rewards; The closer to 0, the more the model focuses on immediate rewards; The specific value is preset based on the business scenario or training objective. For example, in scenarios requiring long-term optimization (such as long-term energy consumption optimization), it can be set to... This allows the model to fully consider the impact of future multi-step decisions; in scenarios requiring rapid response (such as real-time task scheduling), it can be set to... In balanced mode, the focus is on the immediate reward of the current task; in balanced mode, it can be set to... It takes into account both short-term and long-term benefits; The value of can also be optimized through simulation experiments or grid search, for example, by testing different values ​​on a validation set. Select the optimal value from the accumulated rewards under the given value.

[0149] For parameters The target network in the next state Next, select an action. The Q value.

[0150] The reward function is the core basis for training the Dueling DQN model, and its calculation result provides a crucial immediate reward value for updating the model parameters. This directly determines the optimization direction of the Q-value calculation model and the ultimate achievement of the Q-value maximization scheduling decision objective; simultaneously, the weight coefficients of this reward function are dynamically set according to the urgency of the task deadline and the pressure on cluster resources, by constructing a deadline urgency factor. Cluster resource pressure factor As dual driving variables, the weights are adaptively balanced, providing an adaptation criterion for Q-value evaluation in the scheduling decision-making stage. The specific formula is as follows:

[0151]

[0152] in, The instant reward obtained at time step t;

[0153] Time reward , The actual execution time of the task;

[0154] Energy consumption reward , This represents the actual energy consumption of the task.

[0155] Cost Incentive , The actual cost of the task;

[0156] As a deadline, there are rewards and penalties. ≤ A positive reward is given when the condition is met, and a negative reward is given otherwise. The range of a positive reward is (0,1], for example, it can be set to... A moderate reward will be given for timely completion, or it can be set as follows: This indicates that the deadline requirement is prioritized; the negative reward range is [-1, 0), for example, it can be set to... This indicates a moderate penalty for minor timeouts, or can be set to... This indicates a severe timeout and will result in the maximum penalty.

[0157] To calculate task deadlines, presets are made based on business requirements or Service Level Agreements (SLAs). For example, the deadline for a month-end bulk electricity bill settlement task can be set to 23:59:59 on the same day, and the deadline for a real-time electricity bill query task can be set to within 2 seconds of submission. For dynamically prioritized tasks, the deadline can be dynamically calculated by the scheduler based on the current system load and task urgency. ,in As the baseline execution time, The relaxation coefficient ranges from [0,1] and can be preset or dynamically calculated based on system load, task priority, or business requirements; for example, a high-priority real-time query task can be set to... = 0.1, a normal batch settlement task can be set to =0.3, low-priority background tasks can be set to = 0.8;

[0158] The weighting coefficients are dynamically adjusted according to the current optimization objective, and satisfy the following conditions: 1. Its value is determined through the following dynamic adjustment process, which is used to adaptively balance multiple optimization objectives based on task urgency and cluster resource pressure;

[0159] Step 1: Calculate the dual driving factors:

[0160] Urgency factors: ;

[0161] Stress factors: ;

[0162] in, This is the urgency factor for the current scheduled task's deadline. The current system time. The urgency sensitivity coefficient, with a value range of (0, 10], is used to control the urgency factor. Sensitivity to remaining time; The larger the value, the faster the urgency factor decreases as the remaining time decreases. The specific value is preset according to the task type or business requirements. For example, for interactive query tasks with high real-time requirements, it can be set to... =5.0, which causes the urgency factor to drop rapidly as the deadline approaches, enhancing the scheduler's sensitivity to timeouts; for ordinary batch processing tasks, it can be set to =2.0, maintaining a moderate level of urgency sensitivity; for background non-real-time tasks, it can be set to... =0.5, reducing the influence weight of the urgency factor.

[0163] As a factor affecting the overall resource pressure of the cluster, This represents the total number of computing units in the cluster. and The first The computational utilization and memory utilization of each computing unit;

[0164] Step 2: Calculate the dynamic score for each optimization objective:

[0165] Time-weighted scoring:

[0166] Energy consumption weighting score:

[0167] Cost weighting score:

[0168] Deadline weighting score:

[0169] in, , , , , , , Preset coefficients are assigned to the scoring functions of each objective to control the sensitivity of each optimization objective to urgency and pressure factors. Each coefficient ranges from [0,1], and its specific value is preset based on business priority or system strategy. For example:

[0170] In balanced mode, it can be set to , , , , , , This ensures that the scores for each objective remain equally sensitive to urgency and pressure.

[0171] In time-priority mode, it can be set to , , , , , , Strengthen the responsiveness of time and deadline targets to urgency;

[0172] In energy-priority mode, it can be set to , , , , , , This highlights the preference of energy consumption targets for low loads;

[0173] In cost-first mode, it can be set to , , , , , , This makes cost targets the primary factor in the scoring.

[0174] The above coefficients can be optimized through grid search or business experience. For example, the scheduling effect under different combinations can be tested on historical task data, and the value that makes the overall performance optimal can be selected.

[0175] Step 3: Calculate the dynamic weights:

[0176]

[0177] in, This is the smoothing coefficient for weight adjustment, with a value range of (0,10], used to control the concentration of the dynamic weight distribution; The smaller the value, the more evenly the weights of each optimization objective are distributed; The higher the value, the greater the weight the higher-scoring target will receive, making the decision more inclined to favor the dominant target. The specific value is preset based on the business scenario or system status. For example, in the early stages of system exploration or when there are various task types, it can be set to... This ensures a relatively smooth weight distribution and avoids prematurely locking onto a single objective; when the system is running stably and the optimization objective is clear, it can be set to... This strengthens the leading role of high-scoring targets in decision-making; in urgent scenarios where strict deadlines must be met, it can be set to... This allows the deadline objective to receive overwhelming weight even with a slightly higher score; The value of can also be automatically optimized through reinforcement learning and interaction with the environment. For example, it can be dynamically adjusted as a hyperparameter during training, or selected on the validation set through grid search to maximize the cumulative reward. value.

[0178] The weights are constructed using a task urgency factor τ and a cluster resource pressure factor π as dual driving variables, and a differentiated scoring function Si(τ,π) coupled with them is designed to achieve synchronous perception and real-time response of the scheduling strategy to the business urgency and system load status.

[0179] Steps S3 and S4 above implement intelligent matching and scheduling decisions based on a two-layer model. In engineering implementation, the scheduling decision mechanism can include a three-layer progressive processing flow to improve efficiency:

[0180] The first layer (candidate screening) is used to quickly filter out obviously unsuitable hardware based on the task's resource requirements (such as minimum memory) and the immediate availability of hardware (such as utilization rate <95% or queue length not full), thereby reducing subsequent computational overhead.

[0181] The second layer (performance prediction): The task feature vector is concatenated with the candidate hardware state vector and input into the Gradient Boosting Decision Tree (GBDT) model. This model consists of a loss function... The system is trained and outputs the predicted execution time, predicted energy consumption, and predicted cost of the task on the hardware.

[0182] The third layer (optimization decision): This layer corresponds to the reinforcement learning decision component in the technical solution. The system adopts the DuelingDQN architecture. Its state includes the current task characteristics, the overall cluster state matrix, and the system context (such as load rate). Actions are assigned to candidate hardware or wait; the reward function r integrates time reward, energy reward, cost reward, and deadline reward, and its target weights are calculated in real time according to a dynamic weight adjustment mechanism. Based on the current state and the prediction results of the second layer, the network outputs the action with the maximum long-term Q value as the final scheduling decision. The training of this model adopts empirical replay and fixed target network techniques, minimizing the loss function. To update network parameters.

[0183] Through the above steps, this invention proposes a deeply coupled two-layer collaborative decision-making framework, solving the core problem of the disconnect between prediction and decision-making, and achieving a leap in decision-making efficiency. It does not simply combine Gradient Boosting Decision Tree (GBDT) and DuelingDQN models, but constructs a deeply coupled collaborative decision-making mechanism. In the prediction layer, a dynamic loss function enables the GBDT model to focus on high-matching samples, improving prediction accuracy. In the decision-making layer, a dual-factor driven mechanism dynamically adjusts the weights of multiple objectives. Simultaneously, a dual-dimensional dynamic exploration rate strategy is applied to adaptively balance exploration and utilization. The key lies in structurally embedding accurate performance prediction into the decision-making loop, forming a perception-decision closed loop. This elevates scheduling decisions from a reactive mode based on historical trial and error to a predictive planning mode based on multi-future simulation, thereby achieving an order-of-magnitude improvement in policy convergence speed and efficiency in adapting to new tasks.

[0184] S5: Execute the computation task according to the scheduling decision, collect actual performance data, and use the data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

[0185] More preferably, the computational task is executed according to the scheduling decision, and actual performance data is collected. This data is then used to perform online feedback learning and parameter updates for the gradient boosting decision tree model and the Dueling DQN model.

[0186] The online feedback learning includes:

[0187] The difference between the actual performance data and the predicted value is used as an incremental learning sample to update the gradient boosting decision tree model.

[0188] The experience tuples (state, action, reward, new state) of this decision are stored in the experience replay buffer and used to update the Dueling DQN model.

[0189] The exploration rate of the Dueling DQN model is calculated using a dynamic adjustment strategy. It is used to adaptively balance exploration and utilization based on changes in task type and system stability.

[0190] Specifically, feedback learning and continuous self-optimization are achieved through the following mechanisms:

[0191] Feedback data collection: After the task is completed, accurately collect indicators such as actual execution time and actual energy consumption.

[0192] Online calibration of the prediction model: When the prediction error (such as absolute percentage error) exceeds a set threshold (such as 20%), the sample will be added to the training set, triggering incremental learning of the GBDT model to reduce future prediction bias.

[0193] Iterative optimization of the decision model: The complete experience of each decision and execution (state, action, reward, new state) is stored in a fixed-capacity experience replay buffer. The system periodically samples batch data and updates the network parameters of DuelingDQN by minimizing the temporal difference error, thereby optimizing the long-term scheduling strategy.

[0194] When updating the Dueling DQN model, the exploration rate The following dynamic adjustment strategy is used for calculation:

[0195]

[0196] in, The exploration rate when the number of training steps is t;

[0197] To define upper and lower bounds for the exploration rate, for example, they can be set to [value] in the early stages of training. , To balance initial exploration with later utilization;

[0198] The base decay rate coefficient controls how quickly the exploration rate decays with the number of training steps; for example, it can be set to... ;

[0199] This is a two-dimensional influence weighting coefficient, with a value range of [0,1]. It is used to adjust the influence weights of task variability and system stability on the exploration rate. For example, in environments with varied task types, it can be set to... In environments with large system load fluctuations, it can be set to ;

[0200] The task type distribution difference is measured, with a value ranging from [0,1]. It is calculated by comparing the distribution of the current task's computational density feature vector with the distribution of historical tasks, for example, using KL divergence or JS divergence. When a sudden change occurs in the task type... When the task type is stable, the value is close to 1. Approaching 0;

[0201] This is a system stability indicator, with a value range of [0,1]. It is calculated by statistically analyzing the fluctuations in cluster hardware status (such as compute utilization and memory utilization), for example, by normalizing the standard deviation of resource utilization within a sliding window; it is used when the system load fluctuates drastically. When the system is close to 1, it is in a stable state. Approaching 0;

[0202] , These are sensitivity adjustment factors for the impact of task variability and system stability on the exploration rate, respectively; for example, they can be set to... , .

[0203] This dynamic exploration rate adjustment mechanism introduces task type adaptability and system stability as dual adjustment factors, enabling exploration behavior to adaptively respond to changes in the task environment and fluctuations in system state.

[0204] Layered update strategy: The system implements layered feedback cycles of minutes (quickly correcting anomalies), hours (adjusting strategy weights), and days (retraining the entire model) to balance optimization speed and system stability.

[0205] Through the above steps, this invention designs a value-driven and state-adaptive closed-loop evolutionary mechanism, enabling the system to leap from passive updating to proactive optimization. This system comprises a three-layer design: a differentiated triggering mechanism based on error thresholds and sample value to screen high-value experiences; a hierarchical update strategy to balance optimization speed and stability; and a parameter self-calibration mechanism based on feedback trends to dynamically adjust learning behavior. This mechanism allows the system to continuously extract high-value information from operational data for self-updating, thereby autonomously adapting to task dynamics and hardware fluctuations, significantly improving the system's long-term robustness and adaptability.

[0206] Embodiment 2 of this invention provides an intelligent scheduling system for heterogeneous computing resources for electricity billing tasks. It addresses the needs of electricity billing tasks such as tiered pricing, peak-valley time-of-use pricing, policy subsidy calculation, and high-concurrency batch processing at the end of the month. It solves the problem of accurate scheduling of heterogeneous computing resources in electricity billing scenarios. Its core lies in constructing a system such as... Figure 2 The closed-loop optimization framework shown, encompassing perception, decision-making, execution, and evolution, is implemented through the following collaborative technical modules:

[0207] The task feature extraction module is used to extract multi-dimensional features from the arriving computational tasks and construct a task computation density feature vector.

[0208] The hardware status monitoring module is used to collect multi-dimensional operating status indicators of heterogeneous computing units in real time and construct hardware status vectors.

[0209] The intelligent decision-making module, with its intelligent scheduling decision engine, includes a gradient boosting decision tree prediction unit and a DuelingDQN optimization unit. It is used to filter candidate computing units and, based on the task's computational density feature vector and the hardware state vector, predict the execution performance of the computing task on each candidate computing unit using a gradient boosting decision tree model. The gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights. Based on the predicted execution performance, it uses a DuelingDQN model to make optimization decisions, generating a scheduling decision to allocate the computing task to the target computing unit.

[0210] The task execution and feedback module is used to execute the computational task according to the scheduling decision, collect actual performance data, and use the data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

[0211] More preferably, the system connects to and manages a heterogeneous hardware resource pool containing CPU, GPU and FPGA computing units, and supports multi-tenant concurrent task scheduling.

[0212] When a new task arrives, the task feature extraction module quickly extracts the task's computational density features using lightweight analysis methods, forming a feature vector. Simultaneously, the hardware status monitoring module collects real-time status metrics of all computing units in the cluster, including utilization, power consumption, temperature, and available memory. The intelligent decision-making module receives task features and hardware status information and generates scheduling decisions through a two-layer decision-making mechanism. The first layer uses a performance prediction model to estimate the expected performance of the task on each candidate hardware. The second layer uses a reinforcement learning strategy to select the optimal allocation scheme based on the global state and multi-objective optimization requirements. The task is allocated to the corresponding computing unit for execution according to the decision results. Actual performance metrics during execution are collected by the feedback learning module and used to update the prediction model and decision strategy online, forming a closed-loop optimization system.

[0213] (I) Calculation of density characteristic system

[0214] This invention is the first to propose the quantitative concept of "computational density," defining it as the degree of matching between the computational characteristics of a task and the hardware architecture. Computational density is represented by a six-dimensional feature vector:

[0215] Task computation density eigenvector: For any computation task T, its eigenvector is... Defined as:

[0216]

[0217] in:

[0218] This indicates computational intensity, quantifying the number of floating-point operations required to move each byte of data. For example, batch matrix multiplication in electricity billing (such as tiered electricity pricing calculations) has high computational intensity (I0). c >10) Suitable for GPUs or FPGAs, low computational intensity tasks ( <1) Suitable for CPUs.

[0219] This indicates the parallel granularity, with a value range of [0,1]. It quantifies the degree to which a task can be decomposed into parallel subtasks. Large-scale concurrent user electricity billing is a fine-grained parallel task (Pg>0.8) suitable for GPUs, while coarse-grained parallel tasks are suitable for CPUs.

[0220] This represents the control complexity, with a value range of [0,1], quantifying the complexity of the program's control flow. The control flow for calculating electricity bills using fixed rules is simple (C...). c <0.3) is suitable for GPU or FPGA, while complex billing tasks with multi-level subsidy logic have complex control flows and are suitable for CPU.

[0221] It represents memory density, with a value range of [0,1], and quantifies the ratio of memory access frequency to computational load.

[0222] It indicates data type preference and identifies the main data types used in the task, such as single-precision floating-point, half-precision floating-point, integer, etc.

[0223] Indicates the data size, in MB.

[0224] like Figure 3 As shown, the multi-dimensional feature extraction process for a task specifically includes: after the task arrives, the system executes three operations in parallel—dynamic sampling and micro-batch trial run, static code analysis, and large-scale data reading.

[0225] Dynamic sampling and micro-batch trial operation: 1% of the input data is selected and executed in a sandbox environment. Operational metrics are collected using hardware performance counters, and the computational intensity is calculated. and memory intensity The computational intensity is the number of floating-point operations required to move each byte of data, and the memory density is the ratio of memory access frequency to computational load.

[0226] Static code analysis: This involves performing control flow analysis, dependency analysis, and data type analysis to obtain control complexity. Parallel granularity and data type preferences Complexity is controlled by statistically analyzing the depth and density of nested conditional branches and loops; parallel granularity is obtained by analyzing the computational graph or dependencies of the task; and data type preference is obtained by identifying the main data types used by the task.

[0227] Data size reading: Obtain the data size directly from the task input. The unit is MB.

[0228] Finally, , , , , , Combining tasks to calculate density feature vectors The output is sent to the intelligent decision-making module for subsequent scheduling.

[0229] (II) Hardware Status Monitoring System

[0230] This invention establishes a unified hardware status monitoring framework to collect multiple dimensions of status indicators from heterogeneous computing units in real time.

[0231] Hardware state vector: For a computing unit H, its state vector S H Defined as:

[0232]

[0233] in:

[0234] This represents the utilization rate, with a value range of [0,1].

[0235] This represents memory utilization, with a value range of [0,1].

[0236] This indicates the current power consumption, measured in watts.

[0237] This indicates the hardware temperature, expressed in degrees Celsius.

[0238] This indicates available memory, measured in GB.

[0239] Indicates the length of the waiting queue.

[0240] like Figure 4 As shown, the heterogeneous hardware status monitoring process specifically includes: The heterogeneous hardware cluster consists of computing units such as CPUs, GPUs, and FPGAs. Monitoring agents deployed on the computing nodes poll the status of all computing units at fixed time intervals, collecting six dimensions of operational status metrics in real time: computing utilization... Memory utilization Real-time power consumption Hardware temperature Available memory waiting queue length The collected raw data undergoes standardization processing (such as normalization and format unification) to ultimately form a unified hardware status view, namely the cluster hardware status matrix. This is for use by the subsequent intelligent decision-making module.

[0241] (III) Two-layer intelligent decision-making mechanism

[0242] The core innovation of this invention lies in a two-layer intelligent decision-making framework, which combines the high-precision prediction capability of supervised learning with the long-term optimization capability of reinforcement learning to solve the problems of multi-objective optimization and prediction accuracy.

[0243] Before making intelligent decisions, the system can quickly filter candidates based on the task's basic resource requirements (such as minimum memory) and the immediate availability of hardware to form a set of candidate hardware, thereby improving decision-making efficiency.

[0244] First layer: Performance prediction model based on gradient boosting decision tree

[0245] The goal of a performance prediction model is to accurately estimate the execution performance of a task on specific hardware. The model input is a concatenation of the task feature vector and the hardware state vector, and the output is a three-dimensional prediction vector: predicted execution time T, predicted energy consumption E, and predicted cost C.

[0246] Model Training: The prediction model is trained using the gradient boosting decision tree algorithm, with training data derived from historical task execution records. The loss function used in training is the one proposed in this invention, as detailed below:

[0247]

[0248]

[0249] This loss function introduces task-hardware matching weights. The learnable projection matrix W allows the model to focus more on the performance mapping relationship between the learning task and the optimal hardware matching region.

[0250] Incremental learning: The model supports online incremental learning. When new feedback data arrives, the system uses a sliding window mechanism to update the training set, retains the most recent N samples, and retrains the model periodically to ensure that the model adapts to the latest task and hardware features.

[0251] Second layer: Decision optimization model based on DuelingDQN

[0252] This model is responsible for learning the globally optimal scheduling strategy, with the goal of maximizing long-term cumulative rewards.

[0253] State space definition: state vector Including current task characteristics Cluster hardware state matrix and system context information (Such as total cluster load, average response time, current optimization target weight configuration) and the predicted results of the execution performance.

[0254] Action space definition: Action space ,in This indicates that the task is assigned to the k-th computing unit. This indicates that no task will be assigned for the time being, and the user will enter the waiting queue.

[0255] Reward function design: The reward function comprehensively considers multiple optimization objectives:

[0256]

[0257] in:

[0258] Time reward Encourage short execution times; energy consumption rewards Encourage low energy consumption; cost incentives Encourage low-cost operations.

[0259] As a deadline, there are rewards and penalties. ≤ A positive reward is given if the time is right, otherwise a negative reward is given.

[0260] The weighting coefficients are dynamically adjusted according to the current optimization objective, and satisfy the following conditions: 1. Its value is determined by the following dynamic adjustment mechanism, which is driven by the task urgency factor τ and the cluster pressure factor π to achieve an adaptive balance of weights.

[0261]

[0262] Network architecture: The DuelingDQN architecture is adopted, and the final Q-value is calculated as follows:

[0263]

[0264] Training algorithm: Using empirical replay and fixed target network techniques, network parameters are updated by minimizing temporal difference error. :

[0265]

[0266] Decision-making process: When a new task arrives, the decision-making module first calls the first-layer prediction model to obtain its performance predictions on various candidate hardware. Subsequently, the second-layer reinforcement learning model is based on the current system state. Based on these predictions, select the action that maximizes the Q value. As the final scheduling decision.

[0267] (iv) Feedback learning and adaptive optimization

[0268] The system achieves online updating and adaptive optimization of the model through a feedback learning process.

[0269] Feedback Data Collection: After the task is completed, the system collects actual performance metrics, including actual execution time. Actual energy consumption Actual cost wait.

[0270] Model update mechanism:

[0271] 1. Prediction Model Update: The difference between the actual data and the predicted value is added to the training set as a new sample, triggering incremental learning of the GBDT model to reduce future prediction errors.

[0272] 2. Reinforcement learning model update: Store the experience tuples of this decision in the experience replay buffer, periodically sample data to train the DuelingDQN network, and optimize the long-term policy.

[0273] Adaptive parameter tuning: The system automatically adjusts key parameters based on long-term performance trends. Specifically, the exploration rate of the DuelingDQN model... Instead of using traditional exponential decay, it is calculated based on a dynamic adjustment strategy. This strategy incorporates the degree of difference in task type distribution. With system stability indicators As a dual regulating factor, it enables exploratory behavior to adaptively respond to environmental changes. The specific calculation formula is as follows:

[0274]

[0275] in, The exploration rate when the number of training steps is t; The upper and lower limits of the exploration rate are defined. δ is the basic decay rate coefficient. The weighting coefficients are influenced by two dimensions. This represents the task type distribution difference, with a value range of [0,1]. This is a system stability index, with a value range of [0,1].

[0276] This invention achieves a significant leap in system-level performance and outstanding engineering scalability when processing electricity cost calculation tasks. Average task latency and single-task energy consumption are substantially reduced, system throughput and overall performance scores are significantly improved, and task deadline violation rates are effectively controlled. Simultaneously, its standardized and modular design ensures excellent engineering scalability, with core scheduling latency increasing gradually as the cluster size expands. This fully meets the stringent requirements of the power industry for high-concurrency, smoothly scalable computing platforms, achieving simultaneous optimization of operational quality and long-term economic benefits.

[0277] To verify the system performance, key experiments were conducted in this invention:

[0278] Comparative experiment: As shown in Table 1, the intelligent scheduler of the present invention (i.e. the intelligent scheduling system described in the embodiments of the present invention) has significantly better average latency (1.60 seconds) and energy consumption (363.18 joules) than five traditional methods such as GPU priority and rule scheduling when processing electricity cost calculation tasks, with an overall performance score improvement of more than 102%.

[0279] Ablation experiments: As shown in Table 2, the necessity of removing core components was verified. The experiments revealed that performance prediction, multi-dimensional features, and intelligent matching are the three pillars of system performance. Removing any one component resulted in a performance decrease of over 289%, confirming the integrity and necessity of the system design.

[0280] Table 1. Performance Comparison of Various Scheduling Strategies: Experimental Results

[0281]

[0282] As can be seen from Table 1, the intelligent scheduler proposed in this invention is significantly superior to traditional scheduling strategies in all key performance indicators.

[0283] In terms of average task latency, the intelligent scheduler reduces latency by 64.0% compared to the second-best performing GPU-first scheduling and improves latency by 82.2% compared to the worst performing CPU-first scheduling.

[0284] In terms of energy consumption, the intelligent scheduler reduces energy consumption by 72.8% compared to GPU-priority scheduling and by 73.2% compared to CPU-priority scheduling.

[0285] In terms of system throughput, the intelligent scheduler improves performance by 179.1% compared to GPU-first scheduling and by 465.8% compared to CPU-first scheduling.

[0286] The comprehensive score (0.4764) calculated by weighting multiple indicators such as latency, energy consumption, and throughput is significantly higher than all traditional scheduling strategies, and is 102.7% higher than the second-best GPU-first scheduling (0.2351).

[0287] These experimental results fully demonstrate the significant advantages of the technical solution of this invention in heterogeneous computing environments.

[0288] Table 2 Results of the analysis on the impact of ablation test performance

[0289]

[0290] As shown in Table 2, the impact of each technical component on system performance varies significantly. The performance prediction model has the greatest impact on system performance, with an average performance loss of 428.6% after removal, ranking first in contribution. This demonstrates that accurate performance prediction is the core technical foundation of intelligent scheduling.

[0291] Multi-dimensional feature segmentation ranked second in contribution, but the performance loss after removal reached 305.1%, proving that relying solely on data size cannot accurately describe the computational features of a task, and that multi-dimensional feature modeling provides an accurate task profile.

[0292] The intelligent matching algorithm (task-hardware matching weight mechanism) ranked third in contribution, but its performance was reduced by 289.0% after removal, proving that random allocation cannot achieve optimal task-hardware matching.

[0293] Feedback learning mechanisms have a small impact on short-term performance (3.8% loss), but are crucial for long-term system adaptation and stability.

[0294] It is worth noting that the reinforcement learning variant removes the Dueling DQN decision and adopts a greedy strategy (directly selecting the hardware with the shortest prediction time). It has a slight advantage in short-term average latency, but its energy consumption increases significantly and it lacks long-term multi-objective optimization capabilities, resulting in a decrease in overall performance score. This confirms the key role of reinforcement learning modules in balancing multiple objectives and achieving long-term optimality.

[0295] In summary, this invention discloses an intelligent scheduling scheme for heterogeneous computing resources for electricity cost calculation tasks. By establishing a multi-dimensional feature quantification system for tasks and a unified hardware status monitoring system, it achieves a fine-grained perception of computing load and resource profiles. Its core lies in proposing a two-layer intelligent decision-making framework that integrates supervised learning and reinforcement learning: the first layer uses gradient boosting decision trees for high-precision performance prediction, and the second layer uses DuelingDQN for multi-objective global optimization. The system forms a closed loop through task execution feedback, driving the model to adaptively update online, thus possessing the ability to continuously self-optimize. This provides an efficient solution for scheduling problems of high concurrency and multi-mode mixed loads such as electricity cost calculation. The heterogeneous computing cluster adaptive intelligent scheduling scheme provided by this invention dynamically and intelligently schedules tasks based on the characteristics of electricity cost calculation tasks and hardware status in computing clusters containing heterogeneous computing units such as CPUs, GPUs, and FPGAs, significantly improving the performance, efficiency, and intelligence level of the computing system.

[0296] Embodiment 3 of the present invention provides a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to perform operations according to the instructions to execute the steps of the method.

[0297] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.

[0298] Compared with the prior art, the beneficial effects of the present invention include at least the following:

[0299] This invention extracts multi-dimensional features from arriving computing tasks, constructs a task computing density feature vector, and collects multi-dimensional operational status indicators of heterogeneous computing units in real time to construct a hardware status vector. Based on the task computing density feature vector and the hardware status vector, a gradient boosting decision tree model is used to predict the execution performance of the computing task on each candidate computing unit, forming a learnable task-hardware interaction perception system. This achieves precise quantification and paradigm breakthrough in task-hardware matching, solving the problems of single feature dimensions and difficulty in integrating heterogeneous information in existing technologies. Specifically, on the task side, six-dimensional computing density features are extracted within 100 milliseconds through dynamic sampling and micro-batch trial runs. On the hardware side, six-dimensional status is collected through unified monitoring, and the gradient boosting decision tree model loss function introduces task-hardware matching weights. This loss function spatially aligns the two types of heterogeneous feature vectors—the task computing density feature vector and the hardware status vector—through a learnable projection matrix. ) and similarity measure ( This allows the gradient boosting decision tree model to autonomously identify and strengthen the contribution of samples that highly match task features and hardware states to prediction accuracy during the learning process, thereby significantly improving prediction accuracy in complex and heterogeneous environments and providing a more reliable basis for subsequent scheduling decisions. This quantitative perception system lays a reliable and interpretable data foundation for subsequent intelligent scheduling.

[0300] This invention employs a gradient boosting decision tree model to predict the execution performance of a computational task on each candidate computing unit. Based on the predicted performance, it uses a Dueling DQN model for optimization decisions, generating a scheduling decision to allocate the computational task to the target computing unit. This forms a deeply coupled two-layer collaborative decision-making framework, solving the core problem of the disconnect between prediction and decision-making, and achieving a leap in decision-making efficiency. Accurate performance prediction is structurally embedded into the decision-making loop, forming a perception-decision closed loop. This elevates scheduling decisions from a reactive mode based on historical trial and error to a predictive planning mode based on multi-future simulation, thereby achieving an order-of-magnitude improvement in policy convergence speed and new task adaptation efficiency. Specifically, in the prediction layer, a loss function based on task-hardware matching weights allows the gradient boosting decision tree model to focus on high-matching samples, improving prediction accuracy. In the decision layer, a preset dynamic adjustment mechanism dynamically sets the weight coefficients in the multi-objective reward function. By constructing a task deadline urgency factor and a cluster resource pressure factor as dual driving variables and designing a coupled differentiated dynamic scoring function, the scheduling strategy achieves synchronous perception and real-time response to business urgency and system load status.

[0301] Meanwhile, this invention applies a two-dimensional dynamic adjustment strategy for the exploration rate. The dynamic exploration rate adjustment mechanism introduces the task type distribution difference and system stability as dual adjustment factors, so that the exploration behavior can adaptively respond to changes in the task environment and fluctuations in the system state, and adaptively balance the trade-off between exploration and utilization.

[0302] This invention utilizes actual performance data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model, designing a value-driven and state-adaptive closed-loop evolutionary mechanism to enable the system to transition from passive updates to proactive optimization. It comprises a three-layer design: incremental updates of the prediction model based on error thresholds and an experience replay mechanism based on sample value, along with a hierarchical update strategy; and a parameter self-calibration mechanism that dynamically adjusts the exploration rate based on the task type distribution differences and system stability indicators. This mechanism allows the system to continuously extract high-value information from operational data for self-updating, thereby autonomously adapting to task dynamics and hardware fluctuations, significantly improving the system's long-term robustness and adaptability.

[0303] This invention achieves verifiable system-level performance leaps and outstanding engineering scalability in handling electricity cost calculation tasks. Average task latency and single-task energy consumption are significantly reduced, system throughput and overall performance scores are significantly improved, and task deadline violation rates are effectively controlled. Simultaneously, its standardized and modular design ensures excellent engineering scalability, with core scheduling latency increasing gradually as the cluster size expands. This fully meets the stringent requirements of the power industry for high-concurrency, smoothly scalable computing platforms, achieving simultaneous optimization of operational quality and long-term economic benefits.

[0304] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0305] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0306] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0307] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0308] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks, characterized in that, The method includes: Multidimensional features are extracted from the arriving computing tasks to construct a task computing density feature vector; multidimensional operating status indicators of heterogeneous computing units are collected in real time to construct a hardware status vector. Candidate computing units are selected, and based on the task's computation density feature vector and the hardware state vector, a gradient boosting decision tree model is used to predict the execution performance of the computing task on each candidate computing unit. The gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights. The model is trained using historical task execution records and employs an incremental learning mechanism, retaining a recently set number of historical samples through a sliding window and periodically retraining the model parameters. The loss function used for training is: in, The number of samples; , , Let be the actual values ​​of execution time, energy consumption, and cost for the i-th sample; , , The model predictions for the execution time, energy consumption, and cost of the i-th sample; , , Let be the weighting coefficient, satisfying ; Calculate the density feature vector for the i-th sample. Let be the hardware state vector of the i-th sample; Assign weights to task-hardware matching. Task-Hardware Matching Weight Calculated using the following formula: in, This is the magnitude coefficient of the influence of the matching degree; is the learnable projection matrix; tanh() is the hyperbolic tangent function; Let be the Euclidean norm of the vector; This indicates transposing the vector; Based on the predicted execution performance, the Dueling DQN model is used for optimization decisions, generating scheduling decisions to allocate the computational tasks to the target computational units, specifically including: The global state of the computing system is constructed by aggregating the task computation density feature vector of the current task, the cluster hardware state matrix obtained by aggregating the hardware state vectors of each heterogeneous computing unit, system context information, and the prediction results of execution performance. ; The Dueling DQN model is based on the global state of the computing system. Evaluate the long-term expected benefit Q-value of different scheduling actions, and select the action that maximizes the Q-value as the scheduling decision for allocating the computational task to the target computational unit; wherein, the formula for calculating the Q-value is: In the formula, To compute the global state of the system Select action Q value; For the network parameters of the Dueling DQN model, including and ; The state value function for calculating the global state s of the system; To determine the dominance function for selecting action a given global state s of the computational system; This is the advantage function for selecting action a′ in the global state s of the computational system; For action space Size; The computational task is executed according to the scheduling decision, and actual performance data is collected. The actual performance data is then used to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

2. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The multidimensional features include computational intensity, parallel granularity, control complexity, memory density, data type preference, and data size during task execution.

3. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The multi-dimensional operational status metrics include compute utilization, real-time power consumption, available memory capacity, memory utilization, hardware temperature, and wait queue length.

4. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The candidate computing units are selected based on the task's basic resource requirements and the immediate availability of hardware.

5. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The execution performance includes execution time, energy consumption, and cost.

6. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The Dueling DQN model is trained using empirical replay and a fixed-target network technique, and its network parameters are updated by minimizing the following loss function. : in, The loss function; For experience replay buffer Transfer samples randomly sampled from the middle Expectations; To perform the action The next state after that; For instant rewards; Discount factor; For parameters The target network in the next state Next, select an action. The Q value.

7. A method for intelligent scheduling of heterogeneous computing resources for electricity billing tasks according to claim 1 or 6, characterized in that: The Dueling DQN model uses a multi-objective reward function to calculate immediate rewards. The multi-objective reward function includes four optimization objectives: execution time, energy consumption, cost, and deadline, and the specific formula is as follows: , , in, , , Incentives include time-based rewards, energy-based rewards, and cost-based rewards. , , The actual execution time, energy consumption, and cost of the task; Rewards and penalties based on deadlines, when ≤ hour Positive reward, otherwise Negative reward To calculate the deadline for the task; The weighting coefficients for execution time, energy consumption, cost, and deadline are dynamically set according to a preset dynamic adjustment mechanism.

8. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 7, characterized in that: The process of dynamically setting the weight coefficients using the preset dynamic adjustment mechanism is as follows: Step 1: Calculate the deadline urgency factor and the overall cluster resource pressure factor: in, This is the deadline urgency factor for the current computation task. The current system time. To calculate the deadline for the task; The urgency sensitivity coefficient; As a resource pressure factor for the entire cluster, The total number of calculation units, and The first The computational utilization and memory utilization of each computing unit; Step 2: Calculate the dynamic score of each optimization objective based on the task deadline urgency factor and the overall cluster resource pressure factor. ,include: Dynamic scoring of execution time: ; Dynamic energy consumption rating: ; Dynamic cost rating: ; Dynamic scoring by deadline: ; in, , , , , , , Preset configuration coefficients; Step 3: Dynamically calculate the weight coefficients based on the dynamic scores of each optimization objective: in, The weight coefficients are those corresponding to the g-th optimization objective. This is the smoothing coefficient for weight adjustment.

9. The method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 1, characterized in that: The online feedback update includes: The difference between the actual performance data and the predicted performance results is used as incremental learning samples to update the gradient boosting decision tree model. The reward value is calculated based on the actual performance data and the experience tuple is stored in the experience replay buffer for learning and updating the DuelingDQN model.

10. A method for intelligent scheduling of heterogeneous computing resources for electricity cost calculation tasks according to claim 9, characterized in that: The online feedback update also includes: The exploration rate of the Dueling DQN model is calculated using the following dynamic adjustment strategy. This is used to adaptively balance the trade-off between exploration and exploitation based on changes in task type and system stability. in, The exploration rate when the number of training steps is t; The upper and lower limits of the exploration rate; The basic attenuation rate coefficient; The weighting coefficients are influenced by two dimensions. The degree of difference in task type distribution; As a system stability indicator; , These are the sensitivity adjustment factors for the impact of task variability and system stability on the exploration rate, respectively.

11. A heterogeneous computing resource intelligent scheduling system for electricity cost calculation tasks, comprising the method described in any one of claims 1-10, characterized in that, The system includes: The task feature extraction module is used to extract multi-dimensional features from the arriving computational tasks and construct a task computation density feature vector. The hardware status monitoring module is used to collect multi-dimensional operating status indicators of heterogeneous computing units in real time and construct hardware status vectors. The intelligent decision-making module is used to filter candidate computing units and predict the execution performance of the computing task on each candidate computing unit based on the task computing density feature vector and the hardware state vector. The gradient boosting decision tree model is trained using a loss function based on task-hardware matching weights. Based on the predicted execution performance, the Dueling DQN model is used to make optimization decisions and generate a scheduling decision to allocate the computing task to the target computing unit. The task execution and feedback module is used to execute the computational task according to the scheduling decision, collect actual performance data, and use the actual performance data to perform online feedback updates on the gradient boosting decision tree model and the Dueling DQN model.

12. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-10.