Data encryption and decryption method and device based on graphics processor (GPU) parallel processing
By using a GPU-based parallel data encryption and decryption method, and dynamically adjusting the encryption method and resource allocation, the problem of balancing security and efficiency between traditional encryption algorithms in the AI field is solved. This achieves efficient and secure data processing, meeting the real-time and performance requirements of AI systems.
Patent Information
- Application Number
- CN202511113979.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Traditional encryption algorithms face a trade-off between security and execution efficiency when processing large-scale data, failing to meet the real-time and performance requirements of the AI field.
By using a GPU-based parallel data encryption and decryption method, the complexity level and resource allocation of the encryption method are dynamically adjusted. Based on the remaining GPU resources, the execution of the decryption task is prioritized, and an appropriate encryption method is selected to balance security and efficiency.
It improves the efficiency of encryption and decryption, ensures data security, shortens the running time of AI systems, meets the real-time and performance requirements of AI systems, and reduces latency caused by encryption.
Smart Images

Figure CN120611405B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information security, and in particular to a data encryption and decryption method and device based on Graphics Processing Unit (GPU) parallel processing. BACKGROUND
[0002] With the rapid development of AI (Artificial Intelligence) technology, it plays a crucial role in the digital transformation of the telecommunications industry. However, the widespread application of AI technology has brought unprecedented data security challenges. Traditional data security protection measures are not enough to meet the special needs introduced by AI technology. Traditional encryption technology may become very time-consuming in processing large-scale data, affecting the real-time performance and performance of AI models. In AI application scenarios, data security and processing performance are two crucial factors. Traditional encryption algorithms, such as AES (Advanced Encryption Standard), provide strong security, but their performance overhead in processing large-scale data may become a bottleneck for AI applications.
[0003] The problem with existing technology is the balance between the efficiency and security of the algorithm, which limits the application of the algorithm in the AI field. On the one hand, encryption algorithms often focus on security, but are inefficient in processing large-scale data; on the other hand, simplifying the algorithm to improve execution efficiency may compromise data security. SUMMARY
[0004] The present application provides a data encryption and decryption method and device based on GPU (Graphics Processing Unit) parallel processing, to solve the balance problem between security and execution efficiency of the encryption and decryption method in the prior art.
[0005] To solve the above technical problems, the present application is implemented as follows:
[0006] In a first aspect, the present application provides a data encryption and decryption method based on Graphics Processing Unit (GPU) parallel processing, comprising:
[0007] obtaining first remaining resource information of the GPU, the first remaining resource information including remaining resource information of a first resource pool at a first time and remaining resource information of a second resource pool at the first time;
[0008] determining a first resource for executing a decryption task according to the remaining resource information of the first resource pool at the first time, the first resource including resources of the first resource pool, or including resources of the second resource pool and resources of the first resource pool;
[0009] According to the first resource, second remaining resource information of the GPU is determined, the second remaining resource information being resource in the first remaining resource information except the first resource;
[0010] According to the second remaining resource information, an encryption method of a target complexity level is determined to perform an encryption task, different second remaining resource information corresponding to an encryption method of different complexity levels.
[0011] Optionally, the data encryption and decryption method based on GPU parallel processing, wherein the encryption method of different complexity levels corresponds to different encryption rounds and different round functions.
[0012] Optionally, the data encryption and decryption method based on GPU parallel processing, wherein according to the second remaining resource information, an encryption method of a target complexity level is determined to perform an encryption task, comprising:
[0013] If the resource remaining ratio indicated by the second remaining resource information is higher than a first threshold, an encryption method of a first complexity level is determined to perform an encryption task;
[0014] If the resource remaining ratio indicated by the second remaining resource information is higher than a second threshold and lower than or equal to the first threshold, an encryption method of a second complexity level is determined to perform an encryption task;
[0015] If the resource remaining ratio indicated by the second remaining resource information is lower than or equal to the second threshold, an encryption method of a third complexity level is determined to perform an encryption task;
[0016] The first threshold is higher than the second threshold; the first complexity level is higher than the second complexity level, the second complexity level is higher than the third complexity level, and the higher the complexity level, the more complex the encryption method.
[0017] Optionally, the data encryption and decryption method based on GPU parallel processing, wherein according to the remaining resource information of the first resource pool at the first time, the first resource performing the decryption task is determined, comprising:
[0018] Obtaining decryption task information of the GPU at the first time;
[0019] According to the remaining resource information of the first resource pool at the first time and the decryption task information, it is judged whether the resource of the first resource pool meets the decryption task, and a first judgment result is obtained;
[0020] According to the first judgment result, the first resource performing the decryption task is determined.
[0021] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein, according to the first judgment result, the first resource for executing the decryption task is determined, including:
[0022] If the first judgment result is that the resources of the first resource pool meet the decryption task execution, the first resource for executing the decryption task is determined to include the resources of the first resource pool.
[0023] If the first judgment result is that the resources of the first resource pool do not meet the decryption task execution, the first resource for executing the decryption task is determined to include the resources of the second resource pool and the resources of the first resource pool.
[0024] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein the method further includes:
[0025] Obtaining encryption task information of the GPU at a first time point;
[0026] According to the encryption task information, the second resource for executing the encryption task is determined, and the third resource for executing the encryption method adjustment task is determined, the second resource includes the resources of the second resource pool, or includes the resources of at least one of the first resource pool and the third resource pool and the resources of the second resource, and the third resource includes the resources of the third resource pool.
[0027] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein the method further includes:
[0028] In the case of determining to execute the encryption task by using the encryption method of the third complexity level and determining the second resource for executing the encryption task, if the second resource does not meet the encryption task execution, the second resource for executing the encryption task is determined to include the resources of at least one of the first resource pool and the third resource pool and the resources of the second resource.
[0029] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein the second resource for executing the encryption task is determined to include the resources of at least one of the first resource pool and the third resource pool and the resources of the second resource, including:
[0030] Obtaining a resource remaining amount evaluation result of the first resource pool at a second time point;
[0031] If the resource remaining amount evaluation result is used to indicate that the resources of the first resource pool are borrowed, the second resource for executing the encryption task is determined to include the resources of the first resource pool.
[0032] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein the resources of the first resource pool included in the second resource satisfy at least one of the following conditions:
[0033] The resource amount of the first resource pool included in the second resource is lower than or equal to the minimum resource amount required for performing the encryption task.
[0034] The resource amount of the first resource pool included in the second resource is positively linearly correlated with the resource remaining amount of the first resource pool at the second time.
[0035] Optionally, the GPU parallel processing-based data encryption and decryption method, wherein the method further comprises:
[0036] In the case where the encryption task is completed, the resources of the first resource pool included in the second resource are returned to the first resource pool.
[0037] In a second aspect, the application further provides a GPU parallel processing-based data encryption and decryption device, comprising:
[0038] A first obtaining module is configured to obtain first remaining resource information of a GPU, wherein the first remaining resource information comprises remaining resource information of a first resource pool at a first time and remaining resource information of a second resource pool at the first time.
[0039] A first determining module is configured to determine a first resource for performing a decryption task according to the remaining resource information of the first resource pool at the first time, wherein the first resource comprises resources of the first resource pool or resources of the first resource pool and resources of the second resource pool.
[0040] A second determining module is configured to determine second remaining resource information of the GPU according to the first resource, wherein the second remaining resource information is the resource in the first remaining resource information except the first resource.
[0041] A third determining module is configured to determine an encryption method with a target complexity level for performing an encryption task according to the second remaining resource information, wherein different second remaining resource information corresponds to different encryption methods with different complexity levels.
[0042] In a third aspect, the application further provides a GPU parallel processing-based data encryption and decryption device, comprising a processor, a memory, and a program or instructions stored in the memory and running on the processor, wherein the processor executes the program or instructions to implement the GPU parallel processing-based data encryption and decryption method according to the first aspect.
[0043] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the GPU parallel processing based data encryption and decryption method in the first aspect.
[0044] In a fifth aspect, the present application provides a computer program product, comprising computer instructions, and the computer instructions are executed by a processor to implement the GPU parallel processing based data encryption and decryption method in the first aspect.
[0045] Compared with the prior art, the GPU parallel processing based data encryption and decryption method provided by the present application, by obtaining first residual resource information of a GPU, the first residual resource information comprising residual resource information of a first resource pool at a first time and residual resource information of a second resource pool at the first time; determining a first resource for executing a decryption task according to the residual resource information of the first resource pool at the first time, the first resource comprising resources of the first resource pool or comprising resources of the first resource pool and resources of the second resource pool; determining second residual resource information of the GPU according to the first resource, the second residual resource information being resources other than the first resource in the first residual resource information; determining an encryption method with a target complexity level to execute an encryption task according to the second residual resource information, different second residual resource information corresponding to different complexity level encryption methods; in this way, the first residual resource information of the GPU is used to preferentially ensure execution of the decryption task, and the second residual resource information of the GPU is used to determine a target complexity level of an encryption method for executing the encryption task, and the encryption method with the target complexity level is used to execute the encryption task, which can ensure security while improving the execution efficiency of encryption and decryption, thereby solving the balance problem between security and execution efficiency of the encryption and decryption method. BRIEF DESCRIPTION OF DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the present application. Moreover, like reference numerals are intended to represent like parts throughout all the drawings. In the drawings:
[0047] Figure 1 A flowchart of the GPU parallel processing based data encryption and decryption method according to an embodiment of the present application;
[0048] Figure 2 A flowchart of one of the embodiments of the GPU parallel processing based data encryption and decryption method according to an embodiment of the present application;
[0049] Figure 3A schematic diagram of an architecture of an application system of the data encryption and decryption method based on GPU parallel processing according to an embodiment of the present application;
[0050] Figure 4 A flowchart of another embodiment of the data encryption and decryption method based on GPU parallel processing according to an embodiment of the present application;
[0051] Figure 5 A schematic diagram of a structure of the data encryption and decryption device based on GPU parallel processing according to an embodiment of the present application;
[0052] Figure 6 A hardware block diagram of the data encryption and decryption device based on GPU parallel processing according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] The terms "first", "second", and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in the present application means at least one of the connected objects. For example, "A or B" covers three scenarios, namely, scenario one: including A and not including B; scenario two: including B and not including A; scenario three: including A and including B. The character " / " generally indicates that the objects before and after are in an "or" relationship.
[0054] The data encryption and decryption method based on GPU parallel processing according to an embodiment of the present application can be applied to a data encryption and decryption system based on GPU parallel processing. The data encryption and decryption system based on GPU parallel processing (hereinafter referred to as the system) can be deployed in an AI system architecture, can deeply mine the GPU parallel computing capability, and is built on an AI platform equipped with high-end GPU hardware. The software layer integrates a carefully optimized parallel processing framework and an encryption algorithm library, aiming to provide strong performance support for the data encryption and decryption process.
[0055] The core strategy of the system is to scientifically block the plaintext data and distribute these data blocks to multiple independent threads for parallel encryption and decryption operations. Each thread operates in parallel on the GPU, fully utilizing the multi-core advantage of the GPU to accelerate the data processing flow.
[0056] In the selection of encryption and decryption algorithms, the system adopts efficient and secure encryption algorithms and closely combines with the parallel processing capability of GPU to ensure that each data block can be quickly and accurately encrypted or decrypted. In addition, the system also has an intelligent resource allocation mechanism, which can dynamically adjust the number of threads and encryption and decryption strategies according to real-time task load and GPU resource status, so as to ensure that the system can continuously maintain high efficiency and stable operation state.
[0057] In summary, the system fully utilizes the parallel processing capability of GPU, as well as the fine-grained block strategy and thread parallel technology, to achieve efficient execution of data encryption and decryption operations. This not only greatly improves the execution efficiency of data encryption and decryption processing, but also effectively guarantees the security and integrity of data, providing solid technical support for data processing tasks in AI systems.
[0058] Next, the related concepts involved in the embodiments of the present application are described.
[0059] When designing lightweight encryption algorithms, encryption rounds and key expansion schemes are two key factors that directly affect the security and execution efficiency of the algorithm, and the embodiments of the present application are used to balance these two aspects of security and execution efficiency.
[0060] I. Encryption round design
[0061] Basic round determination:
[0062] First, determine a basic round number (N) according to the security requirements of the algorithm. This round number should be large enough to ensure that the data reaches the required security level after multiple rounds of encryption.
[0063] The basic round number can be determined through cryptographic analysis, such as evaluating the security under different rounds of simulation attacks.
[0064] The "sufficiently large" selection of encryption rounds is based on the minimum requirement derived from cryptographic analysis, ensuring that the data reaches the required security level after multiple rounds of encryption. However, "sufficiently large" is not the upper limit, and a larger number of rounds will provide higher security. In actual application, a basic round number is first determined as a starting point based on cryptographic analysis, and then the encryption round number is dynamically adjusted according to the resource utilization of the GPU. When the GPU resources are sufficient, the number of rounds can be increased to improve security; when the resources are tight, the number of rounds can be reduced to maintain efficiency, so as to find the best balance point between security and performance.
[0065] Dynamic adjustment mechanism:
[0066] To further improve efficiency, a dynamic adjustment mechanism can be introduced to adjust the encryption round number according to the sensitivity and real-time requirements of the data.
[0067] Round function design:
[0068] Each round of encryption should use an efficient round function that includes confusion and diffusion operations to ensure that each bit of data is thoroughly mixed with the key and other bits of data.
[0069] In encryption algorithms, by dynamically adjusting the number of encryption rounds and carefully designing the round function, encryption methods with different computational complexities can be achieved to meet the needs of different application scenarios for data security and processing efficiency.
[0070] Simple encryption: Choose fewer encryption rounds and use a relatively simple round function. This encryption method has low computational complexity and fast encryption and decryption speed, suitable for fast transmission of large amounts of data.
[0071] Medium encryption: Use moderate encryption rounds and relatively complex round functions. This encryption method ensures data security while maintaining good processing efficiency, making it an ideal choice for most application scenarios.
[0072] Complex encryption: Use multiple rounds of encryption and highly complex round functions. This encryption method has high computational complexity but provides strong data security guarantees, suitable for scenarios with extremely high data security requirements.
[0073] II. Key expansion scheme
[0074] Master key generation:
[0075] The user inputs a shorter master key (K), which should be sufficiently random and difficult to guess.
[0076] The length of the master key should be determined according to the security requirements of the algorithm, usually at least 128 bits.
[0077] Key expansion algorithm:
[0078] Use a key expansion algorithm (such as based on a hash function or a pseudo-random number generator) to expand the master key into multiple round keys (K1, K2,..., KN).
[0079] The key expansion algorithm should ensure that each round key is independent and difficult to derive directly from the master key.
[0080] To improve efficiency, the key expansion process can be pre-computed and stored before encryption.
[0081] Round key usage:
[0082] In each round of encryption, use the corresponding round key (Ki) to perform encryption operations on the data.
[0083] The way the round keys are used can be through a simple XOR operation or a more complex nonlinear combination.
[0084] III. Encryption Process
[0085] Initialization:
[0086] Input plaintext data (P) and master key (K).
[0087] Generate round keys (K1, K2,..., KN) using a key expansion algorithm.
[0088] Multiple rounds of encryption:
[0089] For each round i (from 1 to N):
[0090] a. Encrypt the data of the current round using the round key Ki and the round function, obtaining the intermediate result Ci.
[0091] b. Take Ci as the input data for the next round.
[0092] Output ciphertext:
[0093] After N rounds of encryption, output the final ciphertext (C).
[0094] IV. Decryption Process:
[0095] Initialization:
[0096] Input ciphertext data (C) and master key (K).
[0097] Generate round keys (K1, K2,..., KN) using the same key expansion algorithm.
[0098] Multiple rounds of decryption:
[0099] For each round i (from N to 1, in reverse order):
[0100] a. Decrypt the data of the current round using the inverse operation of the round function and the round key Ki, obtaining the intermediate result Pi-1.
[0101] b. Take Pi-1 as the input data for the next round.
[0102] Output plaintext:
[0103] After N rounds of decryption, output the final plaintext (P).
[0104] Next, related terms are explained.
[0105] Base number of rounds (N): The minimum number of encryption rounds set in the encryption algorithm, determined through cryptographic analysis to ensure that the data reaches a basic security level.
[0106] Round function: A function used in each round of an encryption algorithm, containing confusion and diffusion operations, ensuring that data bits and keys are thoroughly mixed, enhancing security.
[0107] Master key (K): A shorter key entered by the user, used to generate round keys, should be sufficiently random and difficult to guess, usually at least 128 bits.
[0108] Key expansion algorithm: An algorithm that expands the master key into multiple round keys, ensuring round key independence and difficulty in deriving from the master key.
[0109] Round key (Ki): Generated by the key expansion algorithm, used in each round of encryption, combined with data to perform encryption operations.
[0110] Ciphertext (C): Data processed by the encryption algorithm, unreadable to unverified personnel, must be restored to plaintext through the corresponding decryption algorithm and key.
[0111] Please refer to Figure 1 , the application embodiment provides a data encryption and decryption method based on GPU parallel processing, comprising:
[0112] Step 101, obtaining the first remaining resource information of the GPU, the first remaining resource information including the remaining resource information of the first resource pool at the first time and the remaining resource information of the second resource pool at the first time.
[0113] It should be noted that the first remaining resource information can also include the remaining resource information of the third resource pool at the first time.
[0114] Figure 2 For the flowchart of one embodiment of the data encryption and decryption method based on GPU parallel processing of the application embodiment, as Figure 2 shown, the method comprises:
[0115] Step 201, initialization stage.
[0116] Step 202, real-time monitoring stage.
[0117] Step 203, dynamic adjustment stage.
[0118] It should be noted that in step 201, in the initialization stage, the GPU resources need to be divided into three parts: a first resource pool, a second resource pool and a third resource pool, wherein the first resource pool is used to execute decryption tasks, so the first resource pool can be referred to as a decryption resource pool (D); the second resource pool is used to execute encryption tasks, so the second resource pool can be referred to as an encryption resource pool (E); the third resource pool is used to execute encryption method adjustment tasks, so the third resource pool can be referred to as an encryption method adjustment resource pool (A) for optimization and testing of encryption methods.
[0119] Optionally, according to historical data and business requirements, the GPU resources are divided into three parts. For example, a certain proportion of GPU resources (such as 30%) is reserved for the first resource pool, and the remaining 70% of resources are dynamically allocated between the second resource pool and the third resource pool.
[0120] In addition, in step 201, in the initialization stage, the encryption method complexity level also needs to be set, including: simple (S) level, medium (M) level and complex (C) level, and different encryption methods are corresponded.
[0121] In step 202, in the real-time monitoring stage, the above step 101 needs to be executed. Optionally, using CUDA (Compute Unified Device Architecture, a parallel computing platform and programming model) or a corresponding GPU monitoring tool to obtain the remaining resource information of the first resource pool, the second resource pool and the third resource pool in real time, so as to know the resource usage of each resource pool. Therefore, it can be understood that the first time is the current time.
[0122] In step 203, in the dynamic adjustment stage, steps 102 to 104 need to be executed.
[0123] Step 102, according to the remaining resource information of the first resource pool at the first time, determining the first resource for executing decryption tasks, the first resource including the resources of the first resource pool, or including the resources of the second resource pool and the resources of the first resource pool.
[0124] Optionally, the first resource includes the resources of at least one of the second resource pool and the third resource pool and the resources of the first resource pool.
[0125] Step 103, according to the first resource, determining the second remaining resource information of the GPU, the second remaining resource information being the resources in the first remaining resource information except the first resource.
[0126] It should be noted that the second remaining resource information of the GPU is the resources in the first remaining resource of the GPU except the first resource for executing decryption tasks.
[0127] In step 104, according to the second residual resource information, an encryption method with a target complexity level is determined to perform an encryption task, and different second residual resource information corresponds to different encryption methods with different complexity levels.
[0128] Figure 3 The architecture of an application system of the data encryption and decryption method based on GPU parallel processing according to the embodiments of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the application system includes a parameter initialization module, a monitoring module, and a dynamic adjustment module. The parameter initialization module is used to set initialization parameters, including resource pool parameters, resource threshold parameter settings, and encryption level settings. The monitoring module includes two aspects, i.e., monitoring of encryption resource pools, decryption resource pools, and encryption method adjustment resource pools, and monitoring of encryption tasks and decryption tasks. The dynamic adjustment module includes control of encryption tasks and decryption tasks, and the specific control content includes resource allocation and encryption method selection.
[0129] Optionally, different encryption methods with different complexity levels correspond to different encryption rounds and different round functions.
[0130] It should be noted that the higher the complexity level is, the more complex the encryption method is, and the more encryption rounds correspond to the encryption method, and / or the more complex the round function is.
[0131] In one embodiment, according to the second residual resource information, determining to perform the encryption task by using the encryption method with the target complexity level includes:
[0132] If the resource residual ratio indicated by the second residual resource information is higher than a first threshold, it is determined to perform the encryption task by using an encryption method with a first complexity level.
[0133] If the resource residual ratio indicated by the second residual resource information is higher than a second threshold and lower than or equal to the first threshold, it is determined to perform the encryption task by using an encryption method with a second complexity level.
[0134] If the resource residual ratio indicated by the second residual resource information is lower than or equal to the second threshold, it is determined to perform the encryption task by using an encryption method with a third complexity level.
[0135] The first threshold is higher than the second threshold, the first complexity level is higher than the second complexity level, the second complexity level is higher than the third complexity level, and the higher the complexity level is, the more complex the encryption method is.
[0136] In the embodiments of the present application, the encryption method complexity levels are set, including: simple (S) level, medium (M) level and complex (C) level, and correspond to different encryption methods. The first complexity level corresponds to the complex (C) level, the second complexity level corresponds to the medium (M) level, and the third complexity level corresponds to the simple (S) level. It should be noted that the complexity level of the encryption method can be understood as the encryption level.
[0137] Here, the encryption method of the first complexity level is described as follows:
[0138] This encryption method uses multiple rounds of encryption and highly complex round functions to ensure high security of data. This encryption method has high computational complexity, but can provide strong data security protection. Typical encryption methods of the first complexity level include versions of the Advanced Encryption Standard (AES) configured with a higher number of rounds, as well as other encryption algorithms that use complex confusion and diffusion operations, such as some encryption algorithms based on chaos theory or nonlinear dynamics.
[0139] Next, the encryption method of the third complexity level is described as follows:
[0140] This encryption method usually selects a smaller number of encryption rounds and uses a relatively simple round function. This encryption method has lower computational complexity, fast encryption and decryption speed, and is suitable for fast processing of large amounts of data, but the security protection of the data is relatively weak. For example, some encryption algorithms based on simple permutation and substitution rules, or block encryption algorithms using fixed keys and limited rounds, can be considered part of this encryption method.
[0141] The encryption method of the second complexity level is between the encryption method of the first complexity level and the encryption method of the third complexity level.
[0142] Since the first threshold is higher than the second threshold, the first threshold can be referred to as a high threshold (H) and the second threshold can be referred to as a low threshold (L). Optionally, the first threshold and the second threshold are set according to historical data, business requirements and the overall situation of GPU resources, so as to ensure that reasonable adjustment decisions can be made under different resource states. Therefore, it can be understood that the first threshold and the second threshold are used to determine whether the resources are sufficient or tight, so as to evaluate the resource usage in the real-time monitoring stage and determine the encryption method of the target complexity level to execute the encryption task.
[0143] It should be noted that the first threshold and the second threshold can be resource remaining ratio thresholds, and the first threshold and the second threshold can also be resource absolute quantity thresholds. According to a relationship between the resource remaining ratio or the resource absolute quantity (R) indicated by the second remaining resource information and the first threshold (H) and the second threshold (L), the encryption method of the target complexity level is determined to perform the encryption task.
[0144] Figure 4 Another embodiment of the data encryption and decryption method based on GPU parallel processing is shown in the flowchart. Referring to Figure 4 , the method includes the following four cases:
[0145] Case one: if R is higher than H, it is considered that the GPU resources are sufficient, that is, the second resource pool and the third resource pool currently both have sufficient remaining resources, and it is determined to use the encryption method of the first complexity level to perform the encryption task. That is, the resources are sufficient, the complex encryption is selected, and the optimization strategy is parallel.
[0146] Specifically, according to the specific requirements and security requirements of the encryption task, the encryption method (C) of the first complexity level is selected to perform the encryption task.
[0147] At this time, the encryption task runs efficiently in the second resource pool, and at the same time, the third resource pool is used for in-depth research, optimization and testing of new encryption strategies and technologies.
[0148] Case two: if R is higher than L and lower than or equal to H, it is considered that the GPU resources are moderate, and it is determined to use the encryption method of the second complexity level to perform the encryption task. That is, the resources are moderate, the medium encryption is selected, and the resources are flexibly allocated.
[0149] At this time, the remaining resources of the second resource pool and the third resource pool are relatively limited, but can still meet certain business requirements.
[0150] In this case, the encryption method (M) of the second complexity level is selected to balance data security and resource consumption.
[0151] Case three: if R is lower than or equal to L, it is considered that the GPU resources are tight, that is, the remaining resources of the second resource pool and the third resource pool are very limited, and it is determined to use the encryption method of the third complexity level to perform the encryption task to minimize resource consumption. That is, the resources are tight, the simple encryption is selected, and the resource consumption is reduced.
[0152] Case four: if R is close to 0, it is considered that the GPU resources are exhausted, and at this time, the first resource pool needs to be adjusted carefully to ensure continuous decryption business. That is, the resources are exhausted, the decryption resources are adjusted carefully, and the continuous decryption business is determined.
[0153] In an embodiment, optionally, the first resource for performing the decryption task is determined according to the remaining resource information of the first resource pool at the first time, comprising:
[0154] obtaining decryption task information of the GPU at the first time;
[0155] judging whether the resources of the first resource pool meet the decryption task according to the remaining resource information of the first resource pool at the first time and the decryption task information, and obtaining a first judgment result;
[0156] determining the first resource for performing the decryption task according to the first judgment result.
[0157] In the embodiment, in step 202, the decryption task information of the GPU at the first time is obtained in the real-time monitoring stage, and the decryption task information comprises at least one of the following: the number of decryption tasks, the queue length, the waiting time, the number of encryption tasks, the queue length, and the waiting time.
[0158] Then, in step 203, the first judgment result is obtained by judging whether the resources of the first resource pool meet the decryption task according to the remaining resource information of the first resource pool at the first time and the decryption task information in the dynamic adjustment stage, and the first resource for performing the decryption task is determined according to the first judgment result.
[0159] Optionally, the first resource for performing the decryption task is determined according to the first judgment result, comprising:
[0160] if the first judgment result is that the resources of the first resource pool meet the decryption task, the first resource for performing the decryption task comprises the resources of the first resource pool;
[0161] if the first judgment result is that the resources of the first resource pool do not meet the decryption task, the first resource for performing the decryption task comprises the resources of the second resource pool and the resources of the first resource pool.
[0162] It should be noted that, since the decryption task is a passive demand, the resources of the first resource pool need to be preferentially guaranteed. If the resources of the first resource pool meet the decryption task, the first resource for performing the decryption task comprises the resources of the first resource pool. If the resources of the first resource pool do not meet the decryption task, the first resource pool can temporarily borrow resources from the second resource pool and / or the third resource pool, that is, the first resource comprises the resources of at least one of the second resource pool and the third resource pool and the resources of the first resource pool, so that the decryption task can be executed, but it is necessary to ensure that the ongoing encryption task is not affected.
[0163] In an embodiment, optionally, the method further comprises:
[0164] obtaining encryption task information of the GPU at a first time point;
[0165] According to the encryption task information, a second resource for executing the encryption task is determined, and a third resource for executing the encryption method adjustment task is determined, the second resource including resources of the second resource pool, or including resources of at least one of the first resource pool and the third resource pool and resources of the second resource, and the third resource including resources of the third resource pool.
[0166] In the embodiment of the application, in step 202, in the real-time monitoring stage, the encryption task information of the GPU at the first time point is obtained, and the encryption task information includes the urgency and the waiting time of the encryption task.
[0167] Then, in step 203, in the dynamic adjustment stage, the resource allocation between the second resource pool and the third resource pool can be flexibly adjusted according to the encryption task information, to ensure efficient execution of the encryption task and continuous optimization of the encryption method.
[0168] Specifically, for the encryption task that is urgent and has a long waiting time, the resource allocation of the second resource pool can be quickly increased to speed up the task processing speed, to ensure that these tasks can be processed as soon as possible and reduce business delay. On the contrary, for the task that has a short waiting time or is not urgent, the resources of the second resource pool can be appropriately reduced, and more resources can be allocated to the third resource pool for researching, testing and optimizing new encryption strategies and technologies. This dynamic allocation strategy not only ensures efficient execution of the current encryption task, but also provides continuous technical support and optimization space for future encryption needs, to ensure efficient operation under different loads, to ensure continuous improvement of overall performance and security, to meet real-time and performance requirements. In this way, different workloads and business needs can be better adapted to, to achieve optimal configuration and utilization of resources.
[0169] In an embodiment, the method further includes:
[0170] In a case where it is determined to execute the encryption task by using the encryption method of the third complexity level, and it is determined that the second resource for executing the encryption task, if the second resource does not meet the execution of the encryption task, the second resource for executing the encryption task includes resources of at least one of the first resource pool and the third resource pool and resources of the second resource.
[0171] It should be noted that in the case of determining to perform the encryption task by using the encryption method of the third complexity level, if the resources of the second resource pool do not meet the encryption task, which means that the second resource pool faces the risk of resource exhaustion, the second resource pool can temporarily borrow resources from the first resource pool and / or the third resource pool, that is, the second resource includes the resources of at least one of the first resource pool and the third resource pool, and at the same time, it is necessary to ensure that the decryption task can also be processed in time to avoid causing business interruption or delay.
[0172] Specifically, the manner of determining whether the resources of the second resource pool meet the execution of the encryption task includes:
[0173] According to the queue length, waiting time and task complexity of the encryption task, it is determined whether the resources of the second resource pool meet the execution of the encryption task.
[0174] It should be further noted that in the case of resource shortage of the second resource pool, the execution of the encryption task needs to be prioritized, and therefore the allocation of resources to the third resource pool may be suspended or reduced. This is because the third resource pool is mainly used for optimizing and testing new encryption strategies, which belongs to non-urgent tasks. In the case of resource shortage, the efficient execution of the current encryption task is the top priority to avoid business interruption or delay. Therefore, the resource allocation strategy needs to be temporarily adjusted, and the investment in the third resource pool will be restored after the resources of the second resource pool are alleviated.
[0175] In an embodiment, the second resource for executing the encryption task includes at least one of the resources of the first resource pool and the third resource pool and the resources of the second resource, which includes:
[0176] The resource remaining amount evaluation result of the first resource pool at the second time is obtained.
[0177] If the resource remaining amount evaluation result is used to indicate that the resources of the first resource pool are borrowed, the second resource for executing the encryption task includes the resources of the first resource pool.
[0178] In the embodiments of the present application, in step 201, in the real-time monitoring stage, the remaining resource information of each resource pool needs to be obtained in real time, and therefore the second time is the time when the second resource pool temporarily borrows resources from the first resource pool. The remaining resource information of the first resource pool at the second time is obtained, and the remaining resource information includes the resource remaining ratio or the resource remaining absolute amount.
[0179] Then, in step 203, in the dynamic adjustment stage, the resource remaining amount of the first resource pool can be evaluated according to the remaining resource information of the first resource pool at the second time, and the resource remaining amount evaluation result of the first resource pool at the second time is obtained.
[0180] The first resource pool is determined to temporarily lend resources to the second resource pool according to the resource remaining amount evaluation result. Specifically, if the resource remaining amount evaluation result indicates that the resources are sufficient, i.e., the resources of the first resource pool can be borrowed, it is determined that the second resource pool needs to temporarily borrow resources from the first resource pool, and the resources of the second resource pool include the resources of the first resource pool.
[0181] Further, the influence of the borrowed resources on the decryption task is analyzed according to the task load of the first resource pool at the second time, the task priority, and the predicted borrowing time. If the borrowed resources cause the decryption task to be delayed or interrupted, and the influence exceeds an acceptable range, the borrowed resources cannot be used. Conversely, if the borrowed resources cause the decryption task to be delayed or interrupted, but the influence does not exceed the acceptable range, and the resource remaining amount evaluation result indicates that the resources are sufficient, the borrowed resources can be used; or if the borrowed resources do not cause the decryption task to be delayed or interrupted, and the resource remaining amount evaluation result indicates that the resources are sufficient, the borrowed resources can be used.
[0182] Optionally, the resources of the first resource pool included in the second resource satisfy at least one of the following conditions:
[0183] The amount of resources of the first resource pool included in the second resource is less than or equal to the minimum amount of resources required to perform the encryption task;
[0184] The amount of resources of the first resource pool included in the second resource is positively linearly correlated with the resource remaining amount of the first resource pool at the second time;
[0185] The amount of resources of the first resource pool included in the second resource is less than or equal to the borrowing upper limit value.
[0186] In the embodiments of the present application, in the case where it is determined that the second resource includes the resources of the first resource pool, the amount of resources of the first resource pool included in the second resource is positively linearly correlated with the resource remaining amount of the first resource pool at the second time, i.e., the amount of resources of the first resource pool included in the second resource maintains a linear relationship with the resource remaining amount of the first resource pool at the second time, and the more the resource remaining amount of the first resource pool at the second time, the more the resources of the first resource pool included in the second resource. However, the resources of the first resource pool included in the second resource should not exceed the minimum amount of resources required to perform the encryption task, so as to avoid resource waste.
[0187] It should be noted that, in order to ensure the basic operation of the first resource pool, the borrowing upper limit value should be set, i.e., the resources of the first resource pool included in the second resource should be less than the borrowing upper limit value regardless of the resource remaining amount of the first resource pool.
[0188] In one embodiment, the above method further includes:
[0189] In the case that the encryption task is completed, the resources of the first resource pool included in the second resource are returned to the first resource pool.
[0190] In the embodiments of the present application, in the case that the encryption task of the borrowed resources is completed, the second resource pool must be returned to the first resource pool immediately, and timely returned to restore the normal state.
[0191] It should be noted that when returning the resources, return confirmation is required to ensure that the resources have been successfully returned and to update the remaining resource information of the resource pool.
[0192] In summary, the embodiments of the present application provide a data encryption and decryption method based on GPU parallel processing, which optimizes the encryption round number and key expansion scheme, ensures data security while improving data processing efficiency, achieves high encryption and decryption efficiency, significantly shortens the running time of the AI system, meets the real-time and performance requirements of the AI system, reduces the delay caused by encryption, enables the AI model to obtain results faster, improves business processing speed, and thus promotes the development of the AI industry.
[0193] Moreover, the parallel computing capability of the GPU is fully utilized, and the plaintext data is divided into blocks and allocated to multiple threads for parallel encryption and decryption operations and encryption method adjustment operations, which significantly improves the data processing speed. In addition, the matching degree of the algorithm and the GPU hardware is optimized to ensure smooth encryption process.
[0194] Importantly, the number of threads and encryption strategies can be dynamically adjusted according to real-time task load and GPU resource status. This mechanism enables the system to maintain efficient and stable operation in different scenarios, while achieving effective utilization of resources, avoiding waste of resources, reducing system operation cost, and improving overall economic benefit. Moreover, it has good compatibility and scalability, and can be easily integrated into existing AI systems. At the same time, with the continuous development of AI technology, the system can be extended and upgraded as needed to meet future more complex data processing needs.
[0195] Please refer to Figure 5 The embodiments of the present application also provide a data encryption and decryption device based on GPU parallel processing, comprising:
[0196] The first acquisition module 501 is configured to acquire the first remaining resource information of the GPU, wherein the first remaining resource information includes the remaining resource information of the first resource pool at the first time and the remaining resource information of the second resource pool at the first time.
[0197] The first determining module 502 is configured to determine a first resource for performing a decryption task according to remaining resource information of the first resource pool at a first time, wherein the first resource comprises resources of the first resource pool or resources of the first resource pool and the second resource pool.
[0198] The second determining module 503 is configured to determine second remaining resource information of a GPU according to the first resource, wherein the second remaining resource information is resource information of the first remaining resource information excluding the first resource.
[0199] The third determining module 504 is configured to determine an encryption method with a target complexity level to perform an encryption task according to the second remaining resource information, wherein different second remaining resource information corresponds to different encryption methods with different complexity levels.
[0200] Optionally, the data encryption and decryption apparatus based on GPU parallel processing, wherein the encryption methods with different complexity levels correspond to different encryption rounds and different round functions.
[0201] Optionally, the data encryption and decryption apparatus based on GPU parallel processing, wherein the third determining module 504 is specifically configured to:
[0202] If the resource remaining ratio indicated by the second remaining resource information is higher than a first threshold, the encryption method with the first complexity level is determined to perform the encryption task.
[0203] If the resource remaining ratio indicated by the second remaining resource information is higher than a second threshold and lower than or equal to the first threshold, the encryption method with the second complexity level is determined to perform the encryption task.
[0204] If the resource remaining ratio indicated by the second remaining resource information is lower than or equal to the second threshold, the encryption method with the third complexity level is determined to perform the encryption task.
[0205] The first threshold is higher than the second threshold, the first complexity level is higher than the second complexity level, the second complexity level is higher than the third complexity level, and the higher the complexity level, the more complex the encryption method.
[0206] Optionally, the data encryption and decryption apparatus based on GPU parallel processing, wherein the first determining module 502 comprises:
[0207] The obtaining unit is configured to obtain decryption task information of the GPU at a first time.
[0208] A determining unit is configured to determine whether the resources of the first resource pool meet the requirement of performing the decryption task according to the remaining resource information of the first resource pool at the first time and the decryption task information, and obtain a first determination result.
[0209] A determining unit is configured to determine the first resource for performing the decryption task according to the first determination result.
[0210] Optionally, the data encryption and decryption device based on GPU parallel processing, wherein the determining unit is specifically configured to:
[0211] If the first determination result is that the resources of the first resource pool meet the requirement of performing the decryption task, the first resource for performing the decryption task includes the resources of the first resource pool.
[0212] If the first determination result is that the resources of the first resource pool do not meet the requirement of performing the decryption task, the first resource for performing the decryption task includes the resources of the second resource pool and the resources of the first resource pool.
[0213] Optionally, the data encryption and decryption device based on GPU parallel processing, wherein the device further comprises:
[0214] A second obtaining module is configured to obtain encryption task information of the GPU at the first time.
[0215] A fourth determining module is configured to determine a second resource for performing the encryption task and a third resource for performing the encryption method adjustment task according to the encryption task information, wherein the second resource includes the resources of the second resource pool, or includes the resources of at least one of the first resource pool and the third resource pool and the resources of the second resource, and the third resource includes the resources of the third resource pool.
[0216] Optionally, the data encryption and decryption device based on GPU parallel processing, wherein the device further comprises:
[0217] A fifth determining module is configured to, in a case where it is determined to perform the encryption task by using the encryption method with the third complexity level and it is determined that the second resource for performing the encryption task, if the second resource does not meet the requirement of performing the encryption task, determine that the second resource for performing the encryption task includes the resources of at least one of the first resource pool and the third resource pool and the resources of the second resource.
[0218] Optionally, the data encryption and decryption device based on GPU parallel processing, wherein the fifth determining module is specifically configured to:
[0219] Obtain a resource remaining amount evaluation result of the first resource pool at a second time.
[0220] If the resource remaining amount evaluation result is used to indicate that the resources of the first resource pool are borrowed, the second resource used to perform the encryption task includes the resources of the first resource pool.
[0221] Optionally, the data encryption and decryption apparatus based on GPU parallel processing, wherein the resources of the first resource pool included in the second resource satisfy at least one of the following conditions:
[0222] The resource amount of the first resource pool included in the second resource is lower than or equal to the minimum resource amount required to perform the encryption task.
[0223] The resource amount of the first resource pool included in the second resource is positively linearly correlated with the resource remaining amount of the first resource pool at the second time.
[0224] Optionally, the data encryption and decryption apparatus based on GPU parallel processing, wherein the apparatus further comprises:
[0225] A return module, configured to return the resources of the first resource pool included in the second resource to the first resource pool if the encryption task is completed.
[0226] It should be noted that the above apparatus provided by the embodiments of the present application can realize all the method steps achieved by the above method embodiments and achieve the same technical effects, and thus the same parts and beneficial effects of the method embodiments will not be repeated in detail.
[0227] The embodiments of the present application also provide a data encryption and decryption device based on GPU parallel processing, as shown in Figure 6 The device comprises:
[0228] The processor 601, the memory 602, the transceiver 603, and a program or instruction stored in the memory 602 and executable on the processor 601; the processor 601 executes the program or instruction to realize each process of the above data encryption and decryption method based on GPU parallel processing, and can achieve the same technical effects. To avoid repetition, details will not be repeated here.
[0229] The transceiver 603 is configured to receive and send data under the control of the processor 601.
[0230] In the above embodiments, the data encryption and decryption apparatus based on GPU parallel processing is used to perform the data encryption and decryption method based on GPU parallel processing. Figure 6In particular embodiments, the bus architecture can include any number of interconnecting buses and bridges, allowing for a variety of configurations of various circuitry connections to the processor 601 and the memory 602 that the processor 601 represents. The bus architecture can also include various other circuitry that can be devised by one of ordinary skill in the art in connection with the various embodiments disclosed herein, which can be implemented anywhere within the bus architecture that would allow for communication between various other circuitry coupling to the bus architecture and proper distribution of data in the addition, the bus interface provides an interface to the transceiver 603 that can be any of a variety of I / O interfaces for interfacing to the transceiver 603. The transceiver 603 can be a plurality of elements including a transmitter and a receiver in order to communicate with a variety of other apparatus over a transmission medium. The user interface 604 can also be any of a variety of elements that can be external to the device, including but not limited to a keypad, a display, a speaker, a microphone, a joystick, and so on.
[0231] The processor 601 is responsible for managing the bus architecture and general processing, including the execution of software stored in the memory 602.
[0232] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement each process of the above-mentioned GPU parallel processing based data encryption and decryption method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium can be, for example, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
[0233] The embodiments of the present application further provide a computer program product, which includes computer instructions. The computer instructions are executed by a processor to implement each process of the above-mentioned GPU parallel processing based data encryption and decryption method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein.
[0234] It should be noted that, in this document, the terms "comprise", "comprising", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include those elements solely, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0235] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk), including a number of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0236] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not limited, those skilled in the art can make many forms without departing from the purpose of the present application and the scope of the claims under the inspiration of the present application, all belong to the protection of the present application.
Claims
1. A data encryption and decryption method based on a graphics processor (GPU) parallel processing, characterized in that, The method comprises: obtaining first remaining resource information of a GPU, the first remaining resource information comprising remaining resource information of a first resource pool at a first time and remaining resource information of a second resource pool at the first time; determining first resources for performing a decryption task according to the remaining resource information of the first resource pool at the first time, the first resources comprising resources of the first resource pool or comprising resources of the second resource pool and resources of the first resource pool; determining second remaining resource information of the GPU according to the first resources, the second remaining resource information being resource information in the first remaining resource information excluding the first resources; determining an encryption method of a target complexity level to be used to perform an encryption task according to the second remaining resource information, different second remaining resource information corresponding to different encryption methods of different complexity levels.
2. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 1, wherein, Different encryption methods of different complexity levels correspond to different encryption rounds and different round functions.
3. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 1, wherein, Determining an encryption method of a target complexity level to be used to perform an encryption task according to the second remaining resource information comprises: if a resource remaining ratio indicated by the second remaining resource information is higher than a first threshold, determining an encryption method of a first complexity level to be used to perform the encryption task; if the resource remaining ratio indicated by the second remaining resource information is higher than a second threshold and lower than or equal to the first threshold, determining an encryption method of a second complexity level to be used to perform the encryption task; if the resource remaining ratio indicated by the second remaining resource information is lower than or equal to the second threshold, determining an encryption method of a third complexity level to be used to perform the encryption task; wherein the first threshold is higher than the second threshold, the first complexity level is higher than the second complexity level, the second complexity level is higher than the third complexity level, and the higher the complexity level, the more complex the encryption method.
4. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 1, wherein, Determining first resources for performing a decryption task according to the remaining resource information of the first resource pool at the first time comprises: obtaining decryption task information of the GPU at the first time; judging whether resources of the first resource pool meet a requirement for performing a decryption task according to the remaining resource information of the first resource pool at the first time and the decryption task information, to obtain a first judgment result; determining the first resources for performing the decryption task according to the first judgment result.
5. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 4, characterized in that, Determining the first resources for performing the decryption task according to the first judgment result comprises: if the first judgment result is that the resources of the first resource pool meet the requirement for performing the decryption task, determining that the first resources for performing the decryption task comprise the resources of the first resource pool; if the first judgment result is that the resources of the first resource pool do not meet the requirement for performing the decryption task, determining that the first resources for performing the decryption task comprise the resources of the second resource pool and the resources of the first resource pool.
6. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 1, wherein, The method further comprises: obtaining encryption task information of the GPU at the first time; According to the encryption task information, a second resource for performing the encryption task is determined, and a third resource for performing the encryption method adjustment task is determined, the second resource including resources of the second resource pool, or including resources of at least one of the first resource pool and the third resource pool and resources of the second resource, and the third resource including resources of the third resource pool.
7. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 6, characterized in that, The method further includes: In a case where it is determined that the encryption task is performed by using the encryption method of the third complexity level and the second resource for performing the encryption task is determined, if the second resource does not meet the requirement of performing the encryption task, it is determined that the second resource for performing the encryption task includes resources of at least one of the first resource pool and the third resource pool and resources of the second resource.
8. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 7, characterized in that, The determination that the second resource for performing the encryption task includes resources of at least one of the first resource pool and the third resource pool and resources of the second resource includes: Obtaining a resource remaining amount evaluation result of the first resource pool at a second time; If the resource remaining amount evaluation result is used to indicate that resources of the first resource pool are borrowed, it is determined that the second resource for performing the encryption task includes resources of the first resource pool.
9. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 8, characterized in that, The resources of the first resource pool included in the second resource meet at least one of the following conditions: The resource amount of the first resource pool included in the second resource is lower than or equal to the minimum resource amount required for performing the encryption task; The resource amount of the first resource pool included in the second resource is in positive linear correlation with the resource remaining amount of the first resource pool at the second time.
10. The data encryption and decryption method based on a graphics processor (GPU) parallel processing according to claim 7, characterized in that, The method further includes: In a case where the encryption task is completed, the resources of the first resource pool included in the second resource are returned to the first resource pool.
11. A data encryption and decryption device based on a graphics processor (GPU) parallel processing, characterized in that, It includes: The first obtaining module is configured to obtain first remaining resource information of the GPU, the first remaining resource information including remaining resource information of the first resource pool at a first time and remaining resource information of the second resource pool at the first time; The first determining module is configured to determine, according to the remaining resource information of the first resource pool at the first time, a first resource for performing the decryption task, the first resource including resources of the first resource pool, or including resources of the second resource pool and resources of the first resource pool; The second determining module is configured to determine, according to the first resource, second remaining resource information of the GPU, the second remaining resource information being resource information obtained by excluding the first resource from the first remaining resource information; The third determining module is configured to determine, according to the second remaining resource information, that the encryption task is performed by using an encryption method of a target complexity level, different second remaining resource information corresponding to different complexity levels of the encryption method.
12. A data encryption and decryption device based on a graphics processor (GPU) parallel processing, characterized in that, It includes: A processor, a memory, and a program or instructions stored on the memory and running on the processor, the processor executing the program or instructions to implement the data encryption and decryption method based on a graphics processing unit (GPU) parallel processing as claimed in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the data encryption and decryption method based on the GPU parallel processing according to any one of claims 1 to 10.
14. A computer program product, characterised in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the data encryption and decryption method based on the GPU parallel processing according to any one of claims 1 to 10.
Citation Information
Patent Citations
GPU real-time task computing power dynamic allocation method and device
CN116225709A
Secure computing method based on trusted execution environment and distributed system
CN119378022A