GPU dynamic task efficient scheduling method for resisting quantum cryptographic operation

By constructing an execution length correction factor and a batch scheduling adaptive factor in quantum-resistant cryptography, task length estimation bias is dynamically corrected, task scheduling of the graphics processor is optimized, and the real-time performance and throughput of the system are improved.

CN121277652AActive Publication Date: 2026-01-06XIAN DEAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511650073.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-01-06
Estimated Expiration
2045-11-12

AI Technical Summary

Technical Problem

In quantum cryptography scenarios, existing general-purpose graphics processors suffer from inaccurate scheduling due to deviations in task execution length estimation, which affects the system's real-time performance and throughput.

Method used

By extracting feature information related to execution deviation, an execution length correction factor is constructed to dynamically correct the baseline predicted length of the task. In addition, a batch scheduling adaptive factor is constructed by combining the differences in task size and system resource status to dynamically adjust the task launch strategy.

Benefits of technology

Without altering the original scheduling framework, this method effectively eliminates task length prediction bias, optimizes scheduling results across and within queues, and improves the real-time performance and throughput of quantum cryptographic operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121277652A_ABST
    Figure CN121277652A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of GPU task scheduling, in particular to a GPU dynamic task efficient scheduling method for resisting quantum cryptography operation, which comprises the following steps: when a scheduler receives a new task request, constructing an execution length correction factor to dynamically correct a baseline prediction length of the new task request to obtain a target execution length; the target execution length is applied to cross-queue weighted fair queuing; constructing a batch scheduling adaptive factor, and if any queue in the weighted fair queues is selected to enter task emission, adjusting the deficit counter quota of any queue by using the batch scheduling adaptive factor to obtain a target deficit counter quota; and comparing the target execution length of each task in any queue with the target deficit counter quota, and performing task scheduling according to a comparison result, so that a scheduler is optimized at the same time on two levels of cross-queue selection and queue internal rotation, thereby realizing efficient utilization of graphics processor resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of GPU task scheduling technology, and in particular to an efficient method for dynamic task scheduling of GPUs for quantum cryptography resistance. Background Technology

[0002] With the rapid development of quantum computing technology, traditional public-key cryptosystems based on mathematical problems such as integer factorization and elliptic curve discrete logarithms face serious threats. Once large-scale quantum computers are put into use, existing encryption algorithms will be unable to guarantee information security. To address this issue, research institutions and standardization organizations both domestically and internationally have successively proposed a new generation of quantum-resistant cryptographic algorithms. These algorithms are mainly based on lattice problems, multivariable polynomial problems, hash problems, and coding theory problems, and are theoretically capable of resisting quantum computing attacks. However, compared with traditional cryptographic algorithms, quantum-resistant cryptographic algorithms significantly increase computational complexity and resource consumption. For example, lattice-based encryption and signature methods require large-scale polynomial operations, fast Fourier transforms, sparse matrix multiplication, and frequent hash calculations, often several times or even tens of times more computationally intensive than traditional algorithms. Therefore, how to efficiently perform quantum-resistant cryptographic operations in engineering practice has become a crucial problem that urgently needs to be solved.

[0003] To improve the efficiency of quantum-resistant cryptography, general-purpose graphics processing units (GPUs), with their massively parallel computing capabilities and multi-tasking concurrency, have gradually become the main platform for accelerating such operations. In typical application scenarios, such as large-scale key exchange, batch signature verification, and blockchain node authentication, GPUs need to handle a massive number of computational tasks simultaneously. These tasks exhibit significant heterogeneity: one type consists of small-granularity tasks, such as hash sampling and parameter consistency checks, which have extremely high real-time requirements and typically need to be completed within milliseconds; the other type consists of large-granularity tasks, such as large-scale matrix multiplication key generation and decryption, which have longer execution times per instance but require higher overall throughput. How to rationally schedule tasks of different priorities and scales on a general-purpose GPU directly determines whether the system can simultaneously meet the requirements of real-time performance and high throughput.

[0004] Current dynamic task scheduling methods for general-purpose graphics processing units (GPUs) are typically based on multi-queue priority mechanisms, using weighted fair queuing algorithms and deficit round-robin algorithms to allocate tasks among multiple queues and perform batch processing within each queue. These methods theoretically guarantee fast response times for high-priority tasks while preventing low-priority tasks from being unable to execute for extended periods, and they also ensure fairness between large and small tasks within the queue. However, in practical scenarios resistant to quantum cryptography, these methods still have significant shortcomings. The core premise of weighted fair queuing and deficit round-robin is to accurately estimate the execution length of each task and calculate the virtual completion time stamp and round-robin firing criteria accordingly. However, in quantum-resistant cryptography scenarios, task execution time and resource consumption are highly uncertain: differences in the sparsity of input data can lead to significant fluctuations in the computational complexity of the same algorithm; different batch memory access patterns may cause memory conflicts and cache thrashing; and multiple concurrently running cores can generate bandwidth contention and resource interference. These factors lead to significant biases in task execution length estimations, causing the scheduler to fail to accurately reflect task overhead during actual operation. The direct result is that high-priority tasks with long actual execution times may occupy GPU resources for extended periods, delaying the execution of other critical tasks; conversely, tasks with shorter actual execution times are repeatedly postponed due to overestimation, reducing overall throughput. Furthermore, within the queue, the process of round-robin scheduling and deficit accumulation based on the bias length can result in uneven batch launches and even queue starvation.

[0005] Therefore, how to effectively address scheduling inaccuracies caused by task execution length estimation bias while maintaining the advantages of the weighted fair queuing and deficit round-robin scheduling framework has become an urgent problem to be solved. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide an efficient scheduling method for dynamic tasks of GPUs for quantum cryptography, in order to solve the problem of scheduling inaccuracies caused by task execution length estimation bias while maintaining the advantages of weighted fair queuing and deficit round-robin scheduling frameworks.

[0007] This invention provides an efficient method for dynamic task scheduling in GPUs to resist quantum cryptography. The method includes the following steps: In the dynamic task scheduling process of a graphics processor resistant to quantum cryptography, when the scheduler receives a new task request, it obtains real-time monitoring information based on the scheduler's running data cache. The feature information related to execution deviation is extracted from the real-time monitoring information, and the corresponding structural sparsity imbalance, memory access merging failure rate, concurrency congestion intensity, batch isomorphism, and prediction relative residual are obtained to construct the execution length correction factor, obtain the baseline prediction length of the new task request, and use the execution length correction factor to dynamically correct the baseline prediction length of the new task request to obtain the target execution length, and apply the target execution length to cross-queue weighted fair queuing; The task size difference feature and system instantaneous resource status feature are extracted from the real-time monitoring information to obtain the task length difference degree and resource congestion degree. Combined with the batch isomorphism degree, a batch scheduling adaptive factor is constructed. If any queue in the weighted fair queue is selected to enter the task launch, the deficit counter quota of any queue is adjusted using the batch scheduling adaptive factor to obtain the target deficit counter quota. The target execution length of each task in any queue is compared with the target deficit counter limit to obtain the corresponding comparison result, and task scheduling is performed based on the comparison result.

[0008] Preferably, the step of extracting feature information related to execution deviation from the real-time monitoring information, corresponding to structural sparsity imbalance, memory access merging failure rate, concurrency congestion intensity, batch isomorphism, and prediction relative residual, includes: Obtain the current task batch and current running window to which the new task request belongs; Obtain the proportion of non-zero elements in each polynomial or matrix in the current task batch, form a sequence of non-zero element proportions, calculate the mean and variance of the sequence of non-zero element proportions, and use the variance as the numerator and the sum of the mean and the constant 1 as the denominator to obtain the structural sparsity imbalance. In the current running window, the number of accesses that were not merged into alignment transactions and the number of accesses that were merged into alignment transactions are counted to obtain the total number of accesses. The proportion of the number of accesses that were not merged into alignment transactions in the total number of accesses is denoted as the memory access merging corruption rate. Obtain the bandwidth utilization ratio, cache miss ratio, and concurrent core count ratio. Normalize the bandwidth utilization ratio, cache miss ratio, and concurrent core count ratio respectively to obtain the corresponding normalized values. The average of all normalized values ​​is taken as the concurrent congestion intensity. All tasks in the current task batch are classified according to the operator type and scale parameter to obtain the number of tasks in each category. Based on the number of tasks in each category, the proportion of the maximum number of tasks in the current task batch is obtained as the batch isomorphism. Obtain at least two historical task requests that belong to the same type of task as the new task request. Calculate the time difference between the actual execution time and the baseline prediction length for each historical task request, and obtain the median of the time difference. Among the baseline prediction lengths of all historical task requests, obtain the median of the baseline prediction lengths. Use the median of the baseline prediction lengths as the denominator and the median of the time differences as the numerator to obtain the prediction relative residual.

[0009] Preferably, the method for constructing the execution length correction factor is as follows: The sum of the squares of the structural sparsity imbalance, the square of the memory access merging failure rate, and the square of the concurrent congestion intensity is calculated. The sum of the constant 1 and the sum is used as the denominator, and the sum is used as the numerator to obtain the corresponding ratio. The maximum value between the predicted relative residual and the constant 0 is obtained and recorded as the predicted feature value. The maximum value between the negative of the predicted relative residual and the constant 0 is used as the adjustment coefficient for batch isomorphism, and the product of the adjustment coefficient and the batch isomorphism is obtained. The difference between the sum of the constant 1, the predicted feature value, and the ratio and the product is obtained to obtain the execution length correction factor.

[0010] Preferably, the step of dynamically correcting the baseline predicted length of the new task request using the execution length correction factor to obtain the target execution length includes: Obtain at least two historical task requests that belong to the same type of task as the new task request. Based on the start time and data transmission time of each historical task request, obtain the median of the start time and the median of the data transmission time, and sum the medians. Obtain the product between the execution length correction factor and the baseline predicted length of the new task request, and record the sum of the product and the medians as the target execution length of the new task request.

[0011] Preferably, the step of extracting task size difference features and system instantaneous resource status features from the real-time monitoring information to obtain corresponding task length difference degree and resource congestion degree includes: In the current running window, the video memory bandwidth utilization rate and cache miss rate are obtained, the sum of the video memory bandwidth utilization rate and cache miss rate is calculated, and the sum is normalized to obtain the resource congestion degree. Based on the target execution length of each task in the current task batch, calculate the length standard deviation and length average of all target execution lengths, and divide the length standard deviation by the length average to obtain the task length difference.

[0012] Preferably, the method for constructing the batch scheduling adaptive factor is as follows: Calculate the difference between constant 1 and batch isomorphism to obtain the product of task length difference and the difference. Use the sum of constant 1 and the product as the numerator and the sum of constant 1 and resource congestion as the denominator to obtain the batch scheduling adaptive factor.

[0013] Preferably, adjusting the deficit counter quota of any queue using the batch scheduling adaptive factor to obtain the target deficit counter quota includes: The target deficit counter amount is obtained by multiplying the batch scheduling adaptive factor by the deficit counter amount of any queue.

[0014] Preferably, the step of scheduling tasks based on the comparison results includes: If the target execution length of any task in any queue is less than or equal to the target deficit counter limit, then the task is executed and launched; if the target execution length of any task in any queue is greater than the target deficit counter limit, then the task is delayed and launched.

[0015] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: This invention addresses the dynamic task scheduling process of GPUs resistant to quantum cryptography. Before task scheduling, it extracts feature information related to execution deviation (structural sparsity imbalance, memory access merging corruption rate, concurrency congestion intensity, batch isomorphism, and prediction relative residual) to construct an execution length correction factor. This factor dynamically corrects the baseline predicted length of the task, resulting in a corrected length (target execution length) that more closely reflects the actual overhead. Subsequently, in the batch launch phase within the queue, features such as task length difference, batch isomorphism, and resource congestion are extracted to construct a batch scheduling adaptive factor, dynamically adjusting the launch conditions and batch size of deficit polling. In the fusion phase, the target execution length and the batch scheduling adaptive factor are introduced into a composite framework of weighted fair queuing and deficit polling, used to update the virtual completion time and determine the task launch conditions, respectively. This effectively eliminates task length prediction deviation in a feature-driven manner without changing the original scheduling framework structure, and dynamically adjusts the batch task launch strategy, making the scheduling results more consistent with the actual characteristics of quantum cryptography-resistant tasks. This achieves a two-layer optimization across queues and within queues. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a method for efficient scheduling of dynamic tasks in GPUs for quantum cryptography resistance, provided in Embodiment 1 of the present invention. Detailed Implementation

[0018] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0019] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0020] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0021] See Figure 1 This is a flowchart of a method for efficient scheduling of dynamic tasks in GPUs for quantum cryptography resistance, provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include: Step S101: During the dynamic task scheduling of the GPU against quantum cryptography, when the scheduler receives a new task request, it obtains real-time monitoring information based on the scheduler's running data buffer.

[0022] In the dynamic task scheduling process of a quantum cryptographic-resistant Graphics Processing Unit (GPU), this embodiment of the invention establishes a multi-source data acquisition mechanism for task execution and system operation. This mechanism collects and records key information at both the task and system levels in real time, and archives it uniformly into the scheduler's runtime data buffer. This allows the scheduler to obtain real-time monitoring information based on its runtime data buffer when it receives a new task request. The method for collecting and recording real-time monitoring information is as follows: At the task level, the scheduler records the baseline prediction length of each task upon submission. This baseline prediction length is determined by the task type and input parameters, such as matrix dimension, polynomial order, and hash batch size. During task execution, the scheduler obtains the actual execution time of the task through its built-in timing module and compares it with the baseline prediction length for subsequent calculation of the prediction relative residual. During task batch scheduling, the scheduler simultaneously records the execution length of all tasks within the task batch to analyze the task length differences within the queue and to count the number of similar tasks within the batch and the total number of tasks to calculate batch isomorphism.

[0023] At the system level, the scheduler obtains the graphics processor's (GPU) operational status data through hardware performance counters and a runtime log interface. This data includes: memory bandwidth utilization (obtained by monitoring the ratio of memory read / write bytes per unit time to peak bandwidth); cache miss rate (obtained by calculating the ratio of cache accesses to misses); and concurrent core count ratio (obtained by querying the ratio of currently active stream processors to the maximum available cores). This operational status data is used to calculate resource congestion intensity. Furthermore, during memory access, the scheduler uses a log interface to mark whether each access is hardware-merged into an aligned transaction, thereby counting the number of accesses not merged into aligned transactions, the number of accesses merged into aligned transactions, and the total number of accesses, used to calculate the memory access merging corruption rate.

[0024] At the data level, all raw data collected at the task level and system level will be uniformly archived into the scheduler's runtime data buffer to form real-time monitoring information. This real-time monitoring information includes, but is not limited to: the baseline predicted length and actual execution time of a task, the proportion sequence of non-zero elements of a polynomial or matrix, memory access records (the number of accesses not merged into aligned transactions and the number of accesses merged into aligned transactions), video memory bandwidth utilization, cache miss rate and the proportion of concurrent cores, the number of similar tasks, and video memory bandwidth utilization and cache miss rate.

[0025] Step S102: Extract feature information related to execution deviation from real-time monitoring information to obtain structural sparsity imbalance, memory access merging failure rate, concurrency congestion intensity, batch isomorphism, and prediction relative residual, so as to construct an execution length correction factor, obtain the baseline prediction length of new task requests, use the execution length correction factor to dynamically correct the baseline prediction length of new task requests, obtain the target execution length, and apply the target execution length to weighted fair queuing across queues.

[0026] When the scheduler receives a new task request, traditional dynamic task scheduling for graphics processors (GPUs) is based on a multi-queue priority mechanism. This mechanism combines weighted fair queuing with deficit round-robin to allocate tasks across multiple queues and perform batch processing within each queue. While this method can maintain a certain level of fairness between queues and achieve batch firing within queues, it still faces two prominent problems in practice: first, the prediction deviation of task execution length leads to severe distortion in priority marking and polling quotas; second, the mismatch in differences, similarities, and resource states among batch tasks results in long-term starvation of large tasks, excessive backlog of small tasks, and repeated occurrences of momentary congestion. Therefore, in this embodiment of the invention, when the scheduler receives a new task request, it obtains real-time monitoring information based on the scheduler's running data cache. This information is used to dynamically correct the execution length (i.e., the baseline predicted length) of the task before scheduling it. Simultaneously, in the batch launch phase within the queue, the batch launch scale during the deficit polling process is dynamically adjusted. This optimizes the scheduler at both the cross-queue selection and intra-queue rotation levels, enabling the dynamic task scheduling resistant to quantum cryptography to meet real-time requirements while maintaining high throughput, thereby achieving efficient utilization of graphics processor resources.

[0027] Regarding the dynamic correction of task execution length, in dynamic task scheduling of GPUs resistant to quantum cryptography, the estimation deviation of task execution length is a major problem affecting scheduling accuracy. Both the weighted fair queuing algorithm and the deficit round-robin algorithm rely on the task execution length as a calculation basis when making scheduling decisions. If the difference between the task execution length and the actual overhead is large, it will lead to distortion of priority judgment and task launch order, resulting in a double decrease in real-time performance and throughput. Therefore, this invention proposes a joint analysis method based on task baseline prediction and runtime resource indicators to dynamically correct the predicted length of a task before it enters scheduling, thereby making the scheduling calculation more consistent with the actual execution situation. Specifically, feature information related to execution deviations is extracted from real-time monitoring information, including structural sparsity imbalance, memory access merging corruption rate, concurrency congestion intensity, batch isomorphism, and prediction relative residuals. By converting deviation information into correction factors, an execution length correction factor is obtained, which is used to dynamically correct the baseline prediction length of new task requests. This results in a corrected length that is closer to the actual execution. The corrected length is directly applied to the virtual completion time of weighted fair queuing and the quota judgment of deficit round-robin, so that the scheduling logic no longer relies on a single prediction but has the ability to adapt to fluctuations in the operating environment.

[0028] The dynamic task scheduling of a GPU resistant to quantum cryptography is a dynamic process. Whenever a new task request is received, it is placed into the currently running task batch and execution window. Therefore, upon receiving a new task request, the current task batch and execution window to which the new task request belongs can be determined. Then, based on real-time monitoring information within the current task batch and execution window, and characteristic information related to execution deviations, an execution length correction factor is constructed. Structural sparsity imbalance is used to characterize the structural differences among tasks to be executed in the same batch. The proportion of non-zero elements in each polynomial or matrix in the current task batch is obtained, forming a sequence of non-zero element proportions. The mean and variance of this sequence are calculated. The structural sparsity imbalance is obtained by using the variance as the numerator and the sum of the mean and a constant 1 as the denominator. The value range of structural sparsity imbalance is [0, 1]. When the proportion of non-zero elements differs significantly within the current task batch, it indicates a more pronounced difference in the input structure (i.e., the structure requested by the new task) within the current task batch, suggesting a greater likelihood of thread branch divergence and cache utilization imbalance, and correspondingly, a larger value for structural sparsity imbalance. Conversely, when the proportion of non-zero elements is similar within the current task batch, it indicates a more homogeneous structure, and correspondingly, a smaller value for structural sparsity imbalance.

[0029] The memory access merge corruption rate is used to characterize the degree of corruption in global memory access merging. Within the current running window, all read and write operations are statistically analyzed. The number of accesses not merged into aligned transactions and the number of accesses merged into aligned transactions are counted to obtain the total number of accesses. The percentage of accesses not merged into aligned transactions in the total number of accesses is denoted as the memory access merge corruption rate. The value of the memory access merge corruption rate ranges from [0, 1]. A higher value indicates that memory access cannot be efficiently merged, with more discrete accesses and alignment failures. A longer memory access wait time corresponds to a lower value, indicating a higher degree of merging capability and more efficient bandwidth utilization.

[0030] Concurrency congestion intensity reflects the degree of channel congestion caused by concurrent operation. Based on three observables—"bandwidth utilization ratio," "cache miss ratio," and "concurrent core number ratio"—the bandwidth utilization ratio, cache miss ratio, and concurrent core number ratio are obtained. These are then normalized using a maximum-minimum normalization method to obtain corresponding normalized values. The mean of all normalized values ​​is taken as the concurrency congestion intensity, which ranges from [0, 1]. A value closer to 1 indicates that the bandwidth is fully utilized, cache jitter is significant, and the number of concurrent cores is excessive, resulting in a stronger impact of resource contention. A value closer to 0 indicates that the system is relatively idle.

[0031] Batch isomorphism characterizes the consistency of tasks within a current task batch in terms of form, parameter, and scale. All tasks in the current task batch are categorized based on operator type (e.g., matrix multiplication, fast Fourier transform, polynomial multiplication) and scale parameters (e.g., matrix dimension, polynomial order, data block size). The number of tasks in each category is then determined, and the category with the most tasks is considered the mainstream configuration. Its proportion is used to calculate batch isomorphism. Specifically, based on the number of tasks in each category, the percentage of the total number of tasks in the current task batch with the largest number of tasks is obtained as the batch isomorphism. For example, if a task batch contains one hundred tasks, and seventy of these tasks have completely identical type and parameters, then these seventy tasks are the mainstream configuration, and the batch isomorphism for that task batch is seventy percent, or 0.7. The batch isomorphism ranges from [0, 1]. The higher the batch isomorphism, the more consistent the current task batches are in terms of matrix dimension, polynomial order, and data layout, resulting in smaller execution time variance and more reusable predictions. The lower the batch isomorphism, the greater the structural differences in the current task batches, and the stronger the execution time fluctuations.

[0032] The prediction relative residual is used to measure the systematic deviation between the predicted execution time and the actual execution time. For multiple execution records of the same type of task within the current running window, at least two historical task requests belonging to the same type as the new task request are obtained. The time difference between the actual execution time and the baseline prediction length for each historical task request is calculated, and the median of the time difference is obtained. Among the baseline prediction lengths of all historical task requests, the median of the baseline prediction length is obtained. Using the median of the baseline prediction length as the denominator and the median of the time difference as the numerator, the dimensionless prediction relative residual is obtained. A positive prediction relative residual indicates that the prediction is generally lower (actually slower), a negative prediction relative residual indicates that the prediction is generally higher (actually faster), and a prediction relative residual close to zero indicates that the prediction is relatively close to reality. It is worth noting that using the median can suppress the interference of extreme values ​​on the results, making the correction direction more stable.

[0033] Furthermore, after extracting the structural sparsity imbalance, memory access merging failure rate, concurrent congestion intensity, batch isomorphism, and prediction relative residual, an execution length correction factor is constructed using these factors. The specific construction method is as follows: The sum of the squares of the structural sparsity imbalance, the squares of the memory access merging failure rate, and the squares of the concurrent congestion intensity is calculated. The sum of the sum and a constant 1 is used as the denominator, and the sum is used as the numerator to obtain the corresponding ratio. The maximum value between the prediction relative residual and the constant 0 is obtained and recorded as the prediction feature value. The maximum value between the negative of the prediction relative residual and the constant 0 is used as the adjustment coefficient for batch isomorphism, resulting in the product of the adjustment coefficient and the batch isomorphism. The difference between the sum of the constant 1, the prediction feature value, and the ratio, and the product, is used to obtain the execution length correction factor.

[0034] The formula for calculating the execution length correction factor is as follows:

[0035] in, This represents the execution length correction factor, where 1 indicates a constant. Represents the maximum value function. Indicates the degree of structural sparsity and imbalance. Indicates the memory access and consolidation failure rate. Indicates the intensity of concurrent congestion. Indicates batch isomorphism. This represents the predicted relative residual, and 0 represents a constant.

[0036] It should be noted that when predictions are generally low, sparse patterns vary more, memory access merging is disrupted, or concurrency congestion intensifies, the execution length correction factor increases accordingly, thereby converting the pressure of these scenarios into task length in real time. When recent (current running window) predictions are high and the current task batches are highly homogeneous, the execution length correction factor is appropriately reduced to avoid delaying tasks that could be completed quickly due to excessive conservatism. By using the form of squares and fractions, the overall correction can be significantly amplified when any bottleneck increases significantly, while the distortion will not accumulate infinitely when multiple bottlenecks exist at the same time.

[0037] Finally, after obtaining the execution length correction factor, it is applied to the baseline predicted length to dynamically correct the baseline predicted length and explicitly compensate for the baseline overhead of startup and transmission, resulting in a corrected length for scheduling calculation. The specific dynamic correction method is as follows: obtain the baseline predicted length of the new task request; for multiple execution records of the same type of task in the current running window, obtain at least two historical task requests belonging to the same type of task as the new task request; based on the startup time and data transmission time of each historical task request, obtain the median of the startup time and the median of the data transmission time, and obtain the sum of the medians; obtain the product between the execution length correction factor and the baseline predicted length of the new task request; record the sum of the product and the median as the target execution length of the new task request; and apply the target execution length to weighted fair queuing across queues.

[0038] The formula for calculating the target execution length is as follows:

[0039] Where L represents the target execution length. Indicates the execution length correction factor. Indicates the baseline prediction length of the new task request. This represents the sum of the median startup time and the median data transfer time for similar tasks, which is used to ensure that the basic overhead is not underestimated in small-granularity task scenarios.

[0040] It should be noted that the revised execution length (target execution length) will be used simultaneously for the virtual completion time tag of weighted fair queuing and the deduction determination of deficit round-robin, ensuring that the selection order across queues and the batch launch within queues are based on the same "scenario-aware" length metric. Through the correction process of the execution length correction factor, when the structural sparsity imbalance, memory access merging failure rate, or concurrent congestion intensity increases, the execution length correction factor naturally increases, promptly improving the "perceived length" of new tasks in the system and preventing high-priority channels from being occupied by virtual short tasks for extended periods. When the predicted relative residual is negative and the batch isomorphism is high, the execution length correction factor automatically decreases, allowing faster tasks of the same type to obtain scheduling opportunities earlier. Thus, without changing the original scheduling framework structure, the self-correction of the estimation deviation of task execution length is achieved using real-time characteristics within the scenario, achieving the consistent goal of improving real-time performance and throughput.

[0041] Step S103: Extract task size difference features and instantaneous system resource status features from real-time monitoring information to obtain task length difference degree and resource congestion degree. Combine batch isomorphism degree to construct batch scheduling adaptive factor. If any queue in the weighted fair queue is selected to enter the task launch, the deficit counter quota of any queue is adjusted using the batch scheduling adaptive factor to obtain the target deficit counter quota.

[0042] In dynamic scheduling of GPUs resistant to quantum cryptography, the deficit round-robin mechanism is used for batch task launches within a queue. However, in real-world applications, quantum-resistant tasks are characterized by high batch size, large granularity differences, and complex resource dependencies, leading to significant shortcomings in the existing deficit round-robin mechanism: Firstly, when tasks of significantly different lengths exist simultaneously in the queue, the deficit amount is often insufficient to cover the large tasks, causing the scheduler to repeatedly postpone them and prioritize launching a batch of smaller tasks, resulting in long-term starvation of large tasks and reducing the overall scheduling fairness and system throughput. Secondly, when deficit round-robin launches a large number of tasks at a single moment, the frequent memory accesses and large-scale data transfers required for quantum-resistant cryptography operations can easily lead to instantaneous congestion of memory bandwidth and cache systems. This results in tasks being launched, but the actual execution latency significantly increases, leading to a decrease in overall performance. Furthermore, the similarity characteristics of tasks within a batch are not utilized. The existing deficit polling mechanism only uses the deficit amount as the basis for launch, which cannot distinguish between small tasks with high homogeneity and large tasks with strong differences. This results in uneven task execution efficiency within the same batch, further amplifying the fluctuations in latency and throughput.

[0043] Therefore, existing deficit polling mechanisms commonly suffer from problems in practical operation in quantum-resistant cryptographic scenarios, such as unreasonable batch merging granularity leading to large task starvation, batch launch causing bandwidth and cache congestion, and low efficiency in the mixed execution of homogeneous and heterogeneous tasks within a batch. These problems prevent the internal queue scheduling from matching task characteristics and system resource status, becoming a key technical issue restricting overall scheduling performance. In this embodiment of the invention, the batch launch scale during the deficit polling process is dynamically adjusted within the queue. This is achieved by constructing a batch scheduling adaptive factor to differentiate the batch launches within the queue. This ensures that launch decisions consider not only the deficit amount but also the differences in task size and similarity within the batch, as well as the instantaneous system resource status. This dynamically adjusts the granularity and order of launches, preventing large tasks from being delayed for extended periods, reducing the impact of batch bursts on bandwidth, and improving the efficiency of batch execution of similar tasks.

[0044] To achieve this goal, this embodiment of the invention extracts task size difference characteristics and instantaneous system resource status characteristics from real-time monitoring information to obtain task length difference degree and resource congestion degree. Based on the three dimensions of task length difference degree, batch isomorphism degree, and resource congestion degree of the current task batch, a batch scheduling adaptive factor is constructed. In addition to the deficit limit, dynamic adjustments are made for large task protection, merging of similar tasks, and instantaneous resource pressure. The method for constructing the batch scheduling adaptive factor based on the three dimensions of task length difference degree, batch isomorphism degree, and resource congestion degree of the current task batch is as follows: (1) Obtain the task length difference degree, which is used to measure the dispersion of the execution length of different tasks within a batch, that is, the size difference of tasks within a batch. When the difference is large, it means that large tasks are more likely to be delayed and their priority in batch launch should be increased.

[0045] Specifically, based on the target execution length of each task in the current task batch, the standard deviation and average length of all target execution lengths are calculated, and the standard deviation is divided by the average length to obtain the task length difference.

[0046] (2) Obtain resource congestion level to reflect the pressure of the system in terms of video memory bandwidth and cache usage. When the congestion level is high, the batch launch scale should be reduced to avoid instantaneous resource impact.

[0047] Specifically, in the current running window, the video memory bandwidth utilization rate and cache miss rate are obtained, the sum of the video memory bandwidth utilization rate and cache miss rate is calculated, and the sum is normalized using the maximum-minimum value normalization method to obtain the resource congestion degree.

[0048] (3) Combine task length difference, resource congestion and batch isomorphism to construct batch scheduling adaptive factor. Through this factor, large tasks will no longer be delayed for a long time due to insufficient quota, and highly homogeneous small tasks can be merged to reduce overhead. When bandwidth and cache pressure intensify, the launch scale is actively compressed, thereby achieving a balance between difference-driven, similarity utilization and congestion suppression.

[0049] Specifically, the difference between constant 1 and batch isomorphism is calculated, and the product of the task length difference and the difference is obtained. The sum of constant 1 and the product is used as the numerator, and the sum of constant 1 and resource congestion is used as the denominator to obtain the batch scheduling adaptive factor. The formula for calculating the batch scheduling adaptive factor is as follows:

[0050] in, This represents the batch scheduling adaptive factor, where 1 represents a constant. Indicates the degree of difference in task length. Indicates resource congestion level. Indicates batch isomorphism.

[0051] It should be noted that the formula for the batch scheduling adaptive factor reflects the combined effect of different characteristics on the scheduling logic during batch launches. When the task length varies significantly and the batch homogeneity is low, the numerator increases, and the batch scheduling adaptive factor rises accordingly, thereby widening the deficit limit and allowing large tasks to be scheduled earlier, avoiding long-term starvation. When the batch homogeneity is high, the product term in the numerator decreases, resulting in a relatively smaller batch scheduling adaptive factor, indicating that similar tasks can be launched in batches to amortize startup and memory access overhead. Conversely, when resource congestion increases, the denominator increases, causing the batch scheduling adaptive factor to tighten, limiting the size of instantaneous batches and thus alleviating bandwidth and cache pressure. The batch scheduling adaptive factor dynamically adjusts the launch behavior of deficit polling based on the internal structural characteristics of batch tasks and the operational characteristics of the external system. By employing batch scheduling adaptive factors, deficit round-robin scheduling transforms from a simple quota determination into a multi-dimensional decision-making process driven by differences, utilizing similarities, and suppressing congestion. When differences are significant, the numerator is amplified to ensure large tasks are scheduled; when batch homogeneity is high, the numerator is shrunk to promote batch merging and execution; and when resource congestion intensifies, the numerator is proactively compressed to avoid instantaneous performance degradation. Ultimately, this tightly couples the scheduling process within the queue with task characteristics and system state, achieving a balance between real-time performance and throughput.

[0052] At this point, the embodiments of the present invention acquire two key optimization quantities: one is the execution length correction factor and the corrected task length (target execution length), used to eliminate the interference of baseline prediction deviation on scheduling decisions; the other is the batch scheduling adaptive factor, used to dynamically adjust the batch launch scale during deficit polling, so that the scheduling behavior matches the differences in batch tasks and the system resource status. Furthermore, both are uniformly introduced into the scheduling framework to achieve the fusion optimization of weighted fair queuing and deficit polling. This fusion process uses the target execution length as the benchmark for cross-queue priority judgment and the batch scheduling adaptive factor as the adjustment weight for batch launches within the queue, enabling both to coordinate their actions under the same logic. Through this mechanism, the embodiments of the present invention achieve a shift from "prediction-driven" to "feature-driven," enabling the scheduling process to avoid both order mismatches caused by prediction distortion and resource congestion caused by improper batch processing, thereby achieving consistent optimization between real-time performance and throughput.

[0053] Specifically, at the cross-queue level, the target execution length is used as the weighting criterion to update the virtual completion time tag of the weighted fair queue. This allows the scheduler to select queues based on metrics that more closely reflect actual overhead, avoiding priority distortion caused by prediction bias. At the queue-internal level, the scheduler no longer relies solely on the deficit counter quota but uses a batch scheduling adaptive factor as an adjustment coefficient to redefine the task launch criteria. Therefore, if any queue in the weighted fair queue is selected for task launch, the deficit counter quota of that queue is adjusted using the batch scheduling adaptive factor to obtain the target deficit counter quota. The adjustment method is as follows: the product of the batch scheduling adaptive factor and the deficit counter quota of that queue is used as the target deficit counter quota. Thus, the task launch criteria are modified as follows:

[0054] Where L represents the target execution length. This represents the deficit counter amount for any queue. This represents the batch scheduling adaptive factor. This represents the target deficit counter amount for any queue.

[0055] By using this criterion, the system can dynamically balance task length deviation and batch launch scale, enabling the scheduling behavior to simultaneously possess the dual optimization capabilities of length correction and batch adaptation. If the target execution length of a task meets the criterion, the task is launched and executed; if the criterion is not met, the task is postponed to the next round, and the deficit continues to accumulate until the criterion is met.

[0056] Step S104: Compare the target execution length of each task in any queue with the target deficit counter amount to obtain the corresponding comparison result, and schedule the task according to the comparison result.

[0057] After determining the judgment conditions, if the target execution length of any task in any queue is less than or equal to the target deficit counter amount, then the task will be launched first, that is, the task will be executed and launched, thereby improving the overall throughput while ensuring real-time performance; if the target execution length of any task in any queue is greater than the target deficit counter amount, then the task will be postponed to the next round of scheduling, that is, the task will be launched later, and its deficit counter will continue to accumulate, thereby ensuring that it will not be permanently skipped.

[0058] It should be noted that the graphics processor task scheduling method provided in this embodiment of the invention uses an execution length correction factor and a batch scheduling adaptive factor in tandem throughout the entire operation. The former ensures that the scheduler accurately perceives the actual overhead of tasks, preventing false short tasks from occupying high-priority channels; the latter ensures adaptive matching between batch launches within the queue and the system resource status, avoiding the risk of large tasks being delayed for a long time and congestion caused by batch launches. This allows the scheduler to be optimized at both the cross-queue selection and intra-queue round-robin levels, enabling dynamic task scheduling resistant to quantum cryptography to meet real-time requirements while maintaining high throughput, thereby achieving efficient utilization of graphics processor resources.

[0059] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A GPU dynamic task efficient scheduling method for quantum-resistant cryptographic operation, characterized in that, The method comprises: In the process of dynamic task scheduling of a graphics processing unit resisting quantum cryptography operation, when a new task request is received by a scheduler, real-time monitoring information is obtained based on a running data buffer area of the scheduler; In the real-time monitoring information, feature information related to execution deviation is extracted, and a structure sparsity imbalance degree, a memory access merging damage rate, a concurrent congestion intensity, a batch isomorphism degree, and a prediction relative residual are obtained correspondingly to construct an execution length correction factor, obtain a baseline prediction length of the new task request, dynamically correct the baseline prediction length of the new task request by using the execution length correction factor, obtain a target execution length, and apply the target execution length to a weighted fair queuing across queues; In the real-time monitoring information, task size difference features and system instantaneous resource state features are extracted, and a task length difference degree and a resource congestion degree are obtained correspondingly, and a batch scheduling adaptive factor is constructed in combination with the batch isomorphism degree, and if any queue in the weighted fair queuing is selected to enter task emission, the target deficit counter quota of the any queue is adjusted by using the batch scheduling adaptive factor to obtain a target deficit counter quota. The target execution length of each task in the any queue is compared with the target deficit counter quota to obtain a corresponding comparison result, and task scheduling is performed according to the comparison result.

2. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation according to claim 1, characterized in that, The extracting, in the real-time monitoring information, of feature information related to execution deviation to obtain a structure sparsity imbalance degree, a memory access merging damage rate, a concurrent congestion intensity, a batch isomorphism degree, and a prediction relative residual comprises: A current task batch and a current running window to which the new task request belongs are obtained; A proportion of non-zero elements in each polynomial or matrix in the current task batch is obtained to form a non-zero element proportion sequence, a mean and a variance of the non-zero element proportion sequence are calculated, the variance is taken as a numerator, and a sum of the mean and a constant 1 is taken as a denominator to obtain the structure sparsity imbalance degree; In the current running window, a number of accesses that are not merged into aligned transactions and a number of accesses that are merged into aligned transactions are counted to obtain a total number of accesses, and a proportion of the accesses that are not merged into aligned transactions in the total number of accesses is taken as the memory access merging damage rate; A bandwidth occupation proportion, a cache miss proportion, and a concurrent core number proportion are obtained, the bandwidth occupation proportion, the cache miss proportion, and the concurrent core number proportion are normalized respectively to obtain corresponding normalized values, and a mean of all the normalized values is taken as the concurrent congestion intensity; All tasks in the current task batch are classified according to operator types and scale parameters to obtain a number of tasks in each class, and a proportion of a maximum task number in a total number of tasks in the current task batch is taken as the batch isomorphism degree according to the number of tasks in each class. Obtaining at least two historical task requests belonging to the same type of task as the new task request, calculating the time difference value between the actual execution time and the baseline prediction length of each historical task request respectively, obtaining the median of the time difference value, obtaining the median of the baseline prediction length among all historical task requests, taking the median of the baseline prediction length as the denominator and the median of the time difference value as the numerator to obtain the prediction relative residual.

3. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation of claim 1, wherein, The method for constructing the execution length correction factor is: Calculate the addition value of the square of the structure sparse imbalance degree, the square of the memory merge destruction rate, and the square of the concurrent congestion intensity, take the sum of the constant 1 and the addition value as the denominator, and take the addition value as the numerator to obtain the corresponding ratio; obtain the maximum value in the prediction relative residual and the constant 0 as the prediction characteristic value; obtain the maximum value in the opposite number of the prediction relative residual and the constant 0 as the adjustment coefficient of the batch isomorphism degree, and obtain the product of the adjustment coefficient and the batch isomorphism degree; difference between the sum of the constant 1, the prediction characteristic value and the ratio and the product to obtain the execution length correction factor.

4. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation of claim 1, wherein, The method for constructing the execution length correction factor is: Obtain at least two historical task requests belonging to the same type of task as the new task request, obtain the median of the start time and the median of the data transmission time according to the start time and the data transmission time of each historical task request, and obtain the sum of the medians; obtain the product between the execution length correction factor and the baseline prediction length of the new task request, and take the addition value of the product and the sum of the medians as the target execution length of the new task request.

5. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation according to claim 2, characterized in that, The method for constructing the execution length correction factor is: In the current running window, obtain the memory bandwidth utilization rate and the cache miss rate, calculate the addition result between the memory bandwidth utilization rate and the cache miss rate, normalize the addition result to obtain the resource congestion degree; According to the target execution length of each task in the current task batch, calculate the length standard deviation and the length average value of all target execution lengths, and divide the length standard deviation by the length average value to obtain the task length difference degree.

6. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation according to claim 1, wherein, The method for constructing the batch scheduling adaptive factor is: Calculate the difference between the constant 1 and the batch isomorphism degree to obtain the multiplication value of the task length difference degree and the difference, take the sum of the constant 1 and the multiplication value as the numerator, and take the sum of the constant 1 and the resource congestion degree as the denominator to obtain the batch scheduling adaptive factor.

7. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation according to claim 1, wherein, The method for constructing the execution length correction factor is: Take the product of the batch scheduling adaptive factor and the deficit counter quota of any queue as the target deficit counter quota.

8. The GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation according to claim 1, wherein, The method for constructing the execution length correction factor is: If a target execution length of any task in the any queue is less than or equal to the target deficit counter allowance, the any task is executed for launch; if a target execution length of any task in the any queue is greater than the target deficit counter allowance, the any task is launched late.

Citation Information

Patent Citations

  • Mixed-platform, multi-task and multi-printer batch printing algorithm

    CN119473182A

  • A method for task scheduling with a simulated annealing-based approach in the cloud computing

    US20220019463A1