A scheduling method, system and medium for multiple encryption cards

By determining the projection interval for each encryption card and generating a random number map, the encryption card is selected, combined with dynamic adjustment of reliability and encryption and decryption rate parameters, the performance and stability problems in parallel processing of multiple encryption cards are solved, and the system's encryption and decryption performance and data throughput are improved.

CN114462055BActive Publication Date: 2025-08-19HUNAN KYLIN XINAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111458631.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-08-19
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In the prior art, the parallel processing of multiple encryption cards has hardware differences and failure problems, resulting in unstable encryption and decryption performance and data throughput, making it difficult to fully utilize the processing advantages of multiple encryption cards.

Method used

By determining the projection interval of each encryption card, a continuous total projection interval is formed, and a random number is generated to select the encryption card within the interval, and dynamically adjust the reliability and encryption and decryption rate parameters are used to realize the scheduling management of the encryption card.

Benefits of technology

It improves the encryption and decryption performance and data throughput under multi-encryption card deployment, and enhances the system robustness and data security in hardware card failure environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462055B_ABST
    Figure CN114462055B_ABST
Patent Text Reader

Abstract

The present invention discloses a scheduling method, system and medium for multiple encryption cards. The method comprises determining the projection interval of each available encryption card; forming a continuous total projection interval J by combining the projection intervals of all available encryption cards; generating a random number R, and mapping the random number R to a certain projection interval J in the total projection interval J. i The present invention further includes the step of dynamically updating reliability parameters and encryption / decryption rate parameters to dynamically adjust the projection intervals of each encryption card. The present invention can implement encryption card scheduling management, fully utilize high-performance and high-reliability encryption cards, improve encryption / decryption performance and data throughput in multi-encryption card deployments, and enhance system robustness and data security in the event of hardware card failures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to computer data security technology, including multi-encryption card scheduling technology, parallel processing technology, etc., and specifically to a multi-encryption card scheduling method, system and medium. Background Art

[0002] To ensure data security, reduce the risk of network leakage and attacks, and improve encryption and decryption performance, many major enterprises and specialized departments use hardware encryption cards for data encryption and decryption. These cards are typically deployed at key data processing nodes, encrypting and decrypting all data flowing through them. This is highly sensitive to performance and throughput. To enhance system reliability, ensure data security, and improve processing performance, multiple encryption cards are typically deployed simultaneously. These cards can process data in parallel and, if needed, use dual cards for data integrity verification to prevent data corruption and loss due to hardware failures. Furthermore, hardware differences can lead to varying encryption and decryption performance between multiple encryption cards. Hardware failures can even cause temporary malfunction or outright damage to an encryption card, impacting encryption and decryption performance and data throughput, hindering the full potential of multiple encryption cards. Furthermore, the high volume of data traffic and frequent concurrent processing required by encryption cards further exacerbate performance losses caused by rescheduling an encryption card to a faulty one. Summary of the Invention

[0003] The technical problem to be solved by the present invention is as follows: In response to the above-mentioned problems in the prior art, a scheduling method and system for multiple encryption cards are provided. The present invention can realize the scheduling management of encryption cards, make full use of high-performance and high-reliability encryption cards, improve the encryption and decryption performance and data throughput under the deployment of multiple encryption cards, and enhance the system robustness and data security in the hardware card failure environment.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0005] A method for scheduling multiple encryption cards, comprising the steps of scheduling and selecting an encryption card from multiple available encryption cards upon receiving an encryption / decryption request:

[0006] 1) Determine the projection interval of each available encryption card;

[0007] 2) The projection intervals of all available encryption cards form a continuous total projection interval J;

[0008] 3) Generate a random number R and map the random number R to a projection interval J in the total projection interval J i Within, the encryption card corresponding to the mapped projection interval is used as the encryption card selected for scheduling.

[0009] Optionally, when determining the projection interval of each available encryption card in step 1), the projection interval of each available encryption card is fixed in size; or the calculation function expression of the projection interval of each available encryption card is:

[0010] J i =W a *A i +W s *S i

[0011] In the above formula, W a and W s are weight parameters, A i is the reliability parameter of encryption card i, S i is the encryption and decryption rate parameter of encryption card i.

[0012] Optionally, it also includes automatically updating the reliability parameter A of each encryption card i based on a set period i Step: Collect the statistical indicators of each encryption card i in this cycle and add them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , Encryption and decryption error times EN i , Number of consecutive errors CEN i ; Based on the statistical data CPU-Statis, according to A i =(1-EN i / N i )*(1-CEN i / N i ) Update the reliability parameter A of each encryption card i i .

[0013] Optionally, it also includes automatically updating the encryption and decryption rate parameter S of each encryption card i based on a set period i Step: Collect the statistical indicators of each encryption card i in this cycle and add them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , encryption and decryption time T i ; Based on the statistical data CPU-Statis, according to S i =(T i / N i )*((N0+N1+…+N n ) / (T0+T1+…+T n )) Update the encryption and decryption rate parameter S of each encryption card i i , where N0~ N n They are the encryption and decryption times of the 1st to nth encryption cards in this cycle, T0~Tn They are respectively the encryption and decryption time of the 1st to nth encryption cards in this cycle.

[0014] Optionally, when collecting the statistical indicators of each encryption card i within this period, it includes separately counting the statistical indicators of the encryption cards scheduled by each processor core, and then aggregating the statistical indicators counted by each processor core into the statistical increment CPU-Delta of this period, and periodically aggregating the statistical increment CPU-Delta of this period into the statistical data CPU-Statis.

[0015] Optionally, when collecting the statistical indicators of each encryption card i within this period, it also includes the step of marking the encryption card with an operation error as unavailable, or it also includes the step of first performing an operation error feedback check on the encryption card with an operation error, and if the error is not eliminated, marking the encryption card with an operation error as unavailable.

[0016] Optionally, in step 2), the function expression for forming a continuous total projection interval J from the projection intervals of all available encryption cards is:

[0017] J=J0+J1+…+J n

[0018] In the above formula, J0~J n They are the projection intervals of the 1st to nth encryption cards respectively, and n is the number of available encryption cards.

[0019] Optionally, in step 3), the random number R is mapped to a projection interval J in the total projection interval J. i Specifically, it refers to calculating the modular operation result M according to the following formula and determining the projection interval J corresponding to the modular operation result M i ;

[0020] M=R%J

[0021] In the above formula, % is the modular operation, and M is the result of the modular operation; or, in step 3), the random number R is mapped to a certain projection interval J in the total projection interval J i Specifically, it refers to mapping the random number R to a certain projection interval J in the total projection interval J through the hash function. i .

[0022] In addition, the present invention also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the scheduling method for multiple encryption cards.

[0023] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the scheduling method of the multi-encryption card.

[0024] Compared with the prior art, the present invention has the following advantages:

[0025] 1. The present invention can realize the scheduling management of encryption cards, fully utilize high-performance and high-reliability encryption cards, improve the encryption and decryption performance and data throughput under multi-encryption card deployment, and enhance the system robustness and data security in the hardware card failure environment.

[0026] 2. The present invention includes determining the projection interval of each available encryption card; forming a continuous total projection interval J by combining the projection intervals of all available encryption cards; generating a random number R, and mapping the random number R to a projection interval J in the total projection interval J. i The encryption card corresponding to the mapped projection interval is used as the encryption card for scheduling, which can realize random allocation of encryption card resources, achieve load balancing of encryption cards, improve encryption and decryption performance and data throughput under multi-encryption card deployment, and enhance system robustness and data security in the environment of hardware card failure.

[0027] 3. The present invention can adjust the size of the projection interval in real time according to the processing performance and functional stability of each encryption card, thereby optimizing and adjusting the scheduling probability of each encryption card. Different encryption cards can be managed differently according to the operating conditions, thereby improving the overall performance and system stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the basic flow of the method of embodiment 1 of the present invention.

[0029] Figure 2 Schematic diagram of forming a continuous total projection interval J according to the first embodiment of the present invention.

[0030] Figure 3 Schematic diagram of the basic process of the method of embodiment 2 of the present invention.

[0031] Figure 4 This is a schematic diagram of the principle of collecting statistical indicators in Example 2 of the present invention.

[0032] Figure 5 This is a schematic diagram of the structure of the system according to the second embodiment of the present invention. DETAILED DESCRIPTION

[0033] Example 1:

[0034] like Figure 1As shown, the scheduling method for multiple encryption cards in this embodiment includes the steps of scheduling and selecting an encryption card from multiple available encryption cards upon receiving an encryption / decryption request:

[0035] 1) Determine the projection interval of each available encryption card;

[0036] 2) The projection intervals of all available encryption cards form a continuous total projection interval J;

[0037] 3) Generate a random number R and map the random number R to a projection interval J in the total projection interval J i Within, the encryption card corresponding to the mapped projection interval is used as the encryption card selected for scheduling.

[0038] In this embodiment, the calculation function expression of the projection interval of each available encryption card is:

[0039] J i =W a *A i +W s *S i

[0040] In the above formula, W a and W s They are weight parameters (can be set as needed), A i is the reliability parameter of encryption card i, S i is the encryption and decryption rate parameter of encryption card i. Figure 2 As shown, each encryption card is given a weight W based on reliability. a and the weight W based on the encryption and decryption rate s , given that the reliability adjustment parameter of encryption card 0 is A0 and the encryption / decryption rate adjustment parameter is S0, the total weight of encryption card 0 is W a *A0+W s *S0, whose projection is J0. Perform the same operation on all encryption cards, and we can get J0, J1, ..., J n The scheduling method for multiple encryption cards in this embodiment includes scheduling multiple available encryption cards upon receiving an encryption / decryption request. The encryption cards are selected by combining weights with random projection. The size of the projection area determines the probability of the encryption card being scheduled. Since the projection is jointly controlled by the reliability parameter and the encryption / decryption rate parameter, real-time control of the encryption card scheduling can be achieved by modifying the values of the reliability parameter and the encryption / decryption rate parameter.

[0041] See also Figure 2 In step 2) of this embodiment, the function expression for forming a continuous total projection interval J from the projection intervals of all available encryption cards is:

[0042] J=J0+J1+…+Jn

[0043] In the above formula, J0~J n are the projection intervals of the 1st to nth encryption cards respectively, and n is the number of available encryption cards. If the same projection operation is performed on all encryption cards, the total projection interval J can be obtained as J0+J1+…+J n The total projection interval J is J0+J1+…+J n It is the continuous distribution of the projection intervals of all available encryption cards starting from the center O.

[0044] In this embodiment, in step 3), the random number R is mapped to a certain projection interval J in the total projection interval J. i Specifically, it refers to calculating the modular operation result M according to the following formula and determining the projection interval J corresponding to the modular operation result M i ;

[0045] M=R%J

[0046] In the above formula, % represents the modular operation, and M represents the result of the modular operation. When scheduling an encryption card, the random number generator is called to generate a random number R. The calculation of R%(J0+J1+…+Jn) yields M. The card number corresponding to the area where M lies on the projected coordinates with O as the origin is the encryption card for this card selection. The card selection process shows that the probability of selecting each encryption card is determined by the size of its projected coverage area. This projection size is affected by the corresponding encryption card's reliability adjustment parameters and encryption / decryption rate adjustment parameters. Therefore, the encryption card scheduling strategy can be dynamically adjusted and controlled by adjusting these two parameters.

[0047] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0048] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0049] Example 2:

[0050] This embodiment is basically the same as the first embodiment, and the main differences are: Figure 3 As shown, this embodiment is based on the first embodiment, and adds a method of automatically updating the reliability parameter A of each encryption card i based on a set period. i The steps and the automatic update of the encryption and decryption rate parameter S of each encryption card i based on the set period iEach cycle recalculates the reliability parameter A based on the statistical increment. i and encryption / decryption rate parameter S i , smaller-granularity statistical feedback can reflect the operation status of the encryption card in a more real-time manner, and then automatically adjust and optimize the scheduling of the encryption card, which can maximize the reliability of the system encryption and decryption and give full play to the processing performance of multiple encryption card deployments. It should be noted that the reliability parameter A of each encryption card i is automatically updated. i The cycle of the steps can be set as needed, and the encryption actions of the steps and the encryption actions of the encryption cards i are independent of each other and only have a parameter call relationship.

[0051] It should be noted that the reliability parameter A of each encryption card i is automatically updated based on the set period i The steps and the automatic update of the encryption and decryption rate parameter S of each encryption card i based on the set period i There is no dependency between the two, so the reliability parameter A of each encryption card i can be automatically updated based on the set period as needed. i , automatically update the encryption and decryption rate parameter S of each encryption card i based on the set period i One or both of them are used as improvements to the first embodiment.

[0052] See also Figure 3 In this embodiment, the reliability parameter A of each encryption card i is automatically updated based on the set period. i The steps include: collecting statistical indicators of each encryption card i in this cycle and adding them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , Encryption and decryption error times EN i , Number of consecutive errors CEN i ; Based on the statistical data CPU-Statis, according to A i =(1-EN i / N i )*(1-CEN i / N i ) Update the reliability parameter A of each encryption card i i Through the above method, the reliability parameter A of each encryption card i can be automatically updated based on the set period according to the statistical indicators of the working conditions of each encryption card i. i , so that the projection interval of each available encryption card can be dynamically adjusted, so that the more reliable the encryption card is, the larger the projection interval is and the greater the chance of being scheduled, thereby improving the encryption and decryption performance and data throughput under multi-encryption card deployment, and enhancing the system robustness and data security in the hardware card failure environment.

[0053] In this embodiment, the encryption and decryption rate parameter S of each encryption card i is automatically updated based on the set period i The steps include: collecting statistical indicators of each encryption card i in this cycle and adding them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , encryption and decryption time T i ; Based on the statistical data CPU-Statis, according to S i =(T i / N i )*((N0+N1+…+N n ) / (T0+T1+…+T n )) Update the encryption and decryption rate parameter S of each encryption card i i , where N0~ N n They are the encryption and decryption times of the 1st to nth encryption cards in this cycle, T0~T n The encryption and decryption rate parameters S of each encryption card i can be automatically updated based on the set period according to the statistical indicators of the working conditions of each encryption card i. i , so that the projection interval of each available encryption card can be dynamically adjusted, so that the more reliable the encryption card is, the larger the projection interval is and the greater the chance of being scheduled, thereby improving the encryption and decryption performance and data throughput under multi-encryption card deployment, and enhancing the system robustness and data security in the hardware card failure environment.

[0054] Since the reliability parameter A of each encryption card i is automatically updated based on the set period i The steps and the automatic update of the encryption and decryption rate parameter S of each encryption card i based on the set period i The steps need to collect statistical indicators, so in this embodiment, sampling can be performed based on the same cycle. In addition, the reliability parameter A of each encryption card i can be automatically updated based on the set cycle as needed. i The steps and the automatic update of the encryption and decryption rate parameter S of each encryption card i based on the set period i The two use different cycles, and their principles are the same as in this embodiment.

[0055] like Figure 4As shown, in this embodiment, when collecting statistical indicators for each encryption card i within the current cycle, each processor core separately collects statistical indicators for the encryption card it schedules, then aggregates the statistical indicators collected by each processor core into the current cycle statistical increment CPU-Delta, and periodically aggregates the current cycle statistical increment CPU-Delta into the statistical data CPU-Statis. Through this method, when the encryption card performs data statistics, each CPU processor core independently collects statistics on the encryption and decryption operations scheduled to the CPU based on sampling, and then periodically aggregates them into statistical increments. This statistical method can avoid lock contention operations in high-frequency, highly concurrent scenarios and minimize the performance loss caused by data statistical processing. It can reduce the resource consumption of statistical indicators collected by each processor core in high-frequency, highly concurrent application environments, thereby improving the encryption and decryption performance and throughput of the system.

[0056] Figure 4 Medium, CPU0, CPU1, CPU2…CPU n Represents different CPU processor cores on the system. Each CPU processor core is responsible for statistically analyzing various statistical indicators of encryption and decryption processing of each encryption card dispatched to this CPU. The multiple statistical indicators collected by each CPU in each sampling cycle will be summarized into the statistical increment CPU-Delta of this cycle, and the increment in CPU-Delta will be periodically summarized into the statistical data CPU-Statis. Finally, the statistical data in CPU-Statis will be calculated using a certain algorithm according to application requirements to obtain the reliability adjustment parameters A0, A1...A of each encryption card dispatch. n and encryption and decryption rate adjustment parameters S0, S1…S n Finally, these two parameters will be used to automatically update the reliability parameter A of each encryption card i based on the set period. i The steps and the automatic update of the encryption and decryption rate parameter S of each encryption card i based on the set period i , in order to realize real-time scheduling control of each encryption card.

[0057] In addition, as an optional implementation, data statistics can be directly performed on global variables without distinguishing between different CPU processor cores. The disadvantage of this implementation is that it will cause a large amount of lock contention operations in high-frequency and highly concurrent application environments, seriously reducing the encryption and decryption performance and throughput of the system.

[0058] The multi-encryption card scheduling method of this embodiment includes scheduling multiple available encryption cards upon receiving an encryption / decryption request. The method uses a weighted approach combined with random projection to select the card. The size of the projection area determines the probability of the encryption card being scheduled. Because the projection is controlled by both reliability and encryption / decryption rate parameters, real-time control of encryption card scheduling can be achieved by modifying the values of these parameters. By carefully designing various encryption card data statistics and defining calculation methods for reliability and performance adjustment parameters for encryption card scheduling, targeted control of encryption card scheduling can be achieved based on the specific encryption card conditions and application scenario requirements.

[0059] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0060] Figure 5 This is a diagram showing the functional module structure of the multi-encryption card scheduling system. Figure 5 The scheduling system of the multi-encryption card mainly includes an encryption card management module 1, a port management module 2, a scheduling control module 3, an encryption card detection module 4 and an encryption and decryption processing module 5. All of the above modules are implemented in the operating system kernel space.

[0061] Among them, the encryption card management module 1 includes an encryption card resource pool 11 and an encryption card scheduling module 12. The encryption card resource pool 11 is used to maintain the encryption card resources available to the current system. All encryption cards are scheduled from this resource pool. The encryption card resource pool 11 is a dynamically managed set of available encryption cards. It is dynamically updated as the encryption card detection module 4 performs self-inspection, cross-inspection or error checking on the encryption card. The encryption card scheduling module 12 is responsible for maintaining and managing different scheduling strategies. Each scheduling strategy defines the basic rules for optimizing card selection according to different application scenarios. These rules can be modified and corrected in real time through parameters to adjust the scheduling of encryption cards. The encryption card scheduling module 12 schedules the encryption cards in the encryption card resource pool 11 according to a specific scheduling strategy. Usually, the scheduling strategy can be divided into a balancing strategy, a performance priority strategy, and a reliability priority strategy. To cope with the highly concurrent scheduling and card selection in the system and the management of the encryption card resource pool 11, an RCU (Read-Copy Update) approach is used to maintain encryption card resources. This reduces the frequent and time-consuming locking operations required by multiple threads to access encryption cards, significantly improving the efficiency of reading or traversing the encryption card resource pool 11. The encryption card scheduling module 12 performs the specific encryption card selection and scheduling. To support multiple scheduling strategies, in this embodiment, the encryption card scheduling module 12 uses a weighted and random projection algorithm to select encryption cards.

[0062] The port management module 2 is responsible for maintaining the ports of a specific type of encryption card. An encryption card may have multiple ports, and each port can load a key for data encryption and decryption. The strategy used to select the port for data encryption and decryption can affect the processing performance of the encryption card to a certain extent.

[0063] The scheduling control module 3 is divided into a data statistics module 31 and a scheduling optimization module 32. The data statistics module 31 is responsible for periodically collecting and analyzing data under high concurrency and high performance requirements, and then submitting the statistical results to the scheduling optimization module 32 for processing. The scheduling optimization module 32 calculates the statistical results according to specific rules and adjusts the encryption card scheduling policy based on the application scenario to optimize the card selection logic and improve encryption and decryption performance. The data statistics module 31 is responsible for sampling and statistically analyzing the encryption and decryption status of each encryption card. The statistical types include indicators such as the number of encryption and decryption times, encryption and decryption time, number of encryption and decryption errors, and the number of consecutive errors. The statistical results collected by the data statistics module 31 are ultimately submitted to the scheduling optimization module 32 for processing. This module calculates different reliability adjustment parameters and encryption and decryption rate adjustment parameters based on the statistical data according to specific algorithms according to different scheduling policies. The module is ultimately used by the encryption card management module 1 to achieve the purpose of controlling encryption card scheduling. Due to the high concurrency and high performance processing environment, frequent concurrent statistics inevitably affect the system's processing performance and data throughput. Therefore, the scheduling control module 3 needs to perform data sampling and statistical analysis and scheduling control.

[0064] The encryption card detection module 4 is mainly used to detect whether the encryption card is correctly available. First, when the system starts, each registered encryption card will be self-checked and cross-checked to build an encryption card detection reference board. All encryption cards that pass the test will enter the encryption card resource pool 11; secondly, when a certain encryption card is selected and an error occurs during encryption and decryption processing, the encryption card detection module 4 will be called to perform real-time detection on the card. If the detection fails, the encryption card will be removed from the encryption card resource pool 11; thirdly, when an encryption card is added or removed from the system, the encryption card detection module 4 can also detect and update the encryption card resource pool 11 in real time. The encryption and decryption processing module 5 is responsible for calling the driver interface of the encryption card, loading the key or encrypting and decrypting the data according to the encryption card and port number. Through the coordinated use of the above modules, an encryption card scheduling automatic tuning method and system based on statistical feedback in a high-concurrency, high-performance environment are jointly constructed. The working steps of the multi-encryption card scheduling system include:

[0065] 1) When the system starts, the encryption card detection module 4 detects all registered encryption cards in the system and performs self-test and cross-check on the basic functions of the encryption cards. The encryption cards that pass the test are added to the encryption card resource pool 11 and a detection reference board is constructed. The weights and adjustment parameters related to encryption card scheduling are initialized to default values according to the preset scheduling policy;

[0066] 2) When the system receives an encryption / decryption request, the encryption card scheduling module 12 selects a suitable encryption card based on the scheduling strategy used and the algorithm combining weights with random projection.

[0067] 3) After the encryption card is determined, the port scheduling module searches for or selects the appropriate port number on the encryption card according to the encryption and decryption request, and hands it over to the encryption and decryption module for data encryption and decryption processing.

[0068] 4) The data statistics module 31 updates various statistical data based on the encryption and decryption processing status, calculates reliability adjustment parameters and performance adjustment parameters within a certain sampling period, and transmits them to the encryption card scheduling module 12 to adjust and optimize the scheduling of subsequent encryption cards. If an encryption and decryption error occurs, the encryption card detection module 4 is triggered to test the encryption card and update the encryption card resource pool 11 based on the test results.

[0069] The detailed steps of step 2) include:

[0070] a) After receiving the encryption and decryption request, determine whether the number of cards in the encryption card resource pool 11 meets the application requirements. If not, directly return the message "Insufficient encryption card resources" and end the operation. Otherwise, call the random number generator to generate a random number for card selection;

[0071] b) According to the reliability weight W corresponding to each encryption card a , based on the encryption and decryption rate weight W s , reliability adjustment parameter A and performance adjustment parameter S, respectively calculate the projection of the scheduling weight of each encryption card in the encryption card resource pool 11;

[0072] c) Calculate the sum of the projections of all encryption cards to obtain the total projection;

[0073] d) using the random number generated in a) modulo the total projection in c);

[0074] e) Calculate the projection area of the encryption card where the modulo result is located. The encryption card corresponding to the projection area is the encryption card scheduled this time. In particular, when calculating the projection area based on the modulo result, if the projection area of a specific encryption card is skipped, exclusive card selection can be achieved.

[0075] Step 4) Collect data statistics on the encryption and decryption processing of the selected encryption card and port number, analyze and calculate the statistics, and then feed them back to the encryption card scheduling strategy to achieve automatic tuning of scheduling control. The detailed steps include:

[0076] a) Determine whether the current operation requires sampling. If so, record the start time of the operation and then call the encryption and decryption module to perform encryption and decryption operations. If sampling is not required, perform encryption and decryption directly.

[0077] b) If encryption and decryption are successful, calculate the time consumed by this operation, update the various statistical indicators related to the successful processing of the current CPU component record according to the encryption card number, and complete this operation;

[0078] c) If encryption and decryption fail, update the encryption and decryption times, consecutive error times and other error-related statistical indicators recorded by the current CPU component according to the encryption card number, and then jump to step d);

[0079] d) The encryption card number that failed encryption and decryption is transmitted to the encryption card detection module 4 to trigger the reliability check of the encryption card;

[0080] e) If the encryption card detection in d) fails, the encryption card is set to a fault state and removed from the encryption card resource pool 11, completing this operation;

[0081] f) If the encryption card detection in d) is successful, the reliability adjustment parameters are calculated based on the scheduling policy and the current statistical results, and the reliability adjustment parameters corresponding to the encryption card in the encryption card scheduling module 12 are updated, completing this operation. The next round of encryption card scheduling will calculate and select the card based on the new parameters;

[0082] The feedback process that runs synchronously with the above-mentioned encryption and decryption data statistics is as follows: If a new scheduling adjustment cycle is not triggered, block and wait for a trigger event; if a new scheduling adjustment cycle trigger event is received, traverse all CPU processor cores, count the data statistics corresponding to each encryption card recorded on each CPU processor core, summarize the statistical data on each CPU into the current cycle statistical increment according to the card number, and reset the statistical items on each CPU. Based on the statistical increment summarized within the scheduling adjustment cycle and combined with the scheduling strategy, calculate the reliability adjustment parameters and performance adjustment parameters of each encryption card and update them to the encryption card scheduling module 12. Add the statistical increment summarized within the scheduling adjustment cycle to the historical statistical data of the encryption card, reset the statistical increment, and complete this round of statistical feedback operation.

[0083] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0084] Example 3:

[0085] This embodiment is basically the same as the second embodiment, with the main difference being that when collecting statistical indicators of each encryption card i within this period, this embodiment also includes first performing a feedback check on the encryption card with an operation error. If the error is not eliminated, the encryption card with an operation error is marked as unavailable. Through the above method, a feedback check on the encryption card operation error is added, which not only avoids the repeated scheduling of the faulty encryption card, but also prevents the encryption card from being removed due to individual transient failures, further ensuring the reliability and processing performance of the system.

[0086] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0087] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0088] Example 4:

[0089] This embodiment is essentially the same as the second embodiment, with the main difference being that, while collecting statistical metrics for each encryption card i during the current cycle, this embodiment also includes a step for marking encryption cards that experience errors as unavailable. This ensures that encryption card encryption and decryption errors are not detected and the card is directly retried or removed. This implementation has the advantage of reducing the need for testing and verifying faulty encryption cards. However, its disadvantage is that it is difficult to verify the correct function of encryption cards when they are directly retried, and a transient hardware failure may lead to the incorrect removal of encryption cards.

[0090] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0091] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0092] Embodiment 5:

[0093] This embodiment is substantially the same as the first embodiment, with the primary difference being that, in step 1) of this embodiment, when determining the projection interval for each available encryption card, the projection interval for each available encryption card is fixed in size. The projection interval size for each available encryption card can be the same size as needed, or can be of different sizes based on the characteristics of each available encryption card; for example, encryption cards with higher performance and reliability have larger projection intervals. However, this implementation has the disadvantage of being unable to predict the specific operating conditions of each encryption card, making it difficult to specifically reflect the characteristics of the encryption cards through pre-set weights, and being unable to address software or hardware failures that may occur during the operation of the encryption cards.

[0094] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0095] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0096] Example 6:

[0097] This embodiment is basically the same as the first embodiment, and the main difference is that in step 3) of this embodiment, the random number R is mapped to a certain projection interval J in the total projection interval J. i The method in the embodiment is different from that in the first embodiment. In this embodiment, in step 3), the random number R is mapped to a certain projection interval J in the total projection interval J. i Specifically, it refers to mapping the random number R to a certain projection interval J in the total projection interval J through the hash function. i Through the hash mapping method of the hash function, the random number R can also be easily mapped to a certain projection interval J in the total projection interval J through the hash function. i Inside.

[0098] In addition, this embodiment also provides a scheduling system for multiple encryption cards, including a computer device with multiple encryption cards, the computer device including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned scheduling method for multiple encryption cards.

[0099] In addition, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a computer device to implement the aforementioned scheduling method for multiple encryption cards.

[0100] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0101] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A scheduling method for multiple encryption cards, characterized in that: The process includes the following steps: scheduling and selecting an encryption card from multiple available encryption cards when an encryption / decryption request is received: 1) Determine the projection interval of each available encryption card. The size of the projection interval of each available encryption card is divided into different sizes according to the characteristics of the encryption card. The calculation function expression of the projection interval of each available encryption card is: J i =W a *A i +W s *S i In the above formula, W a and W s are weight parameters, A i is the reliability parameter of encryption card i, S i is the encryption and decryption rate parameter of encryption card i; 2) The projection intervals of all available encryption cards form a continuous total projection interval J; 3) Generate a random number R and map it to a projection interval J in the total projection interval J i In this way, the encryption card corresponding to the mapped projection interval is used as the encryption card selected for scheduling; It also includes automatically updating the reliability parameter A of each encryption card i based on the set period i Step: Collect the statistical indicators of each encryption card i in this cycle and add them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , Encryption and decryption error count EN i , Number of consecutive errors CEN i ; Based on the statistical data CPU-Statis, according to A i =(1 -EN i / N i )*(1 - CEN i / N i ) Update the reliability parameter A of each encryption card i i .

2. The scheduling method for multiple encryption cards according to claim 1, characterized in that: It also includes automatically updating the encryption and decryption rate parameter S of each encryption card i based on the set period i Step: Collect the statistical indicators of each encryption card i in this cycle and add them to the statistical data CPU-Statis, the statistical indicators include the number of encryption and decryption times N i , encryption and decryption time T i ; Based on the statistical data CPU-Statis, according to S i =(T i / N i )*((N1+N2+…+N n ) / (T1+T2+…+T n )) Update the encryption and decryption rate parameter S of each encryption card i i , where N1~N n They are the encryption and decryption times of the 1st to nth encryption cards in this cycle, T1~T n They are respectively the encryption and decryption time of the 1st to nth encryption cards in this cycle.

3. The scheduling method for multiple encryption cards according to claim 2, characterized in that: When collecting the statistical indicators of each encryption card i within this period, it includes separately counting the statistical indicators of the encryption cards scheduled by each processor core, and then aggregating the statistical indicators counted by each processor core into the statistical increment CPU-Delta of this period, and periodically aggregating the statistical increment CPU-Delta of this period into the statistical data CPU-Statis.

4. The scheduling method for multiple encryption cards according to claim 2, characterized in that: When collecting the statistical indicators of each encryption card i within this period, it also includes the step of marking the encryption card with an operation error as unavailable, or it also includes the step of first performing an operation error feedback check on the encryption card with an operation error, and if the error is not eliminated, marking the encryption card with an operation error as unavailable.

5. The scheduling method for multiple encryption cards according to claim 1, wherein: In step 2), the function expression for forming a continuous total projection interval J from the projection intervals of all available encryption cards is: J=J1+J2+…+J n In the above formula, J1~J n They are the projection intervals of the 1st to nth encryption cards respectively, and n is the number of available encryption cards.

6. The scheduling method for multiple encryption cards according to claim 1, wherein: In step 3), the random number R is mapped to a projection interval J in the total projection interval J. i Specifically, it refers to calculating the modular operation result M according to the following formula and determining the projection interval J corresponding to the modular operation result M i ; M=R % J In the above formula, % is the modular operation, and M is the result of the modular operation; or, in step 3), the random number R is mapped to a certain projection interval J in the total projection interval J i Specifically, it refers to mapping the random number R to a certain projection interval J in the total projection interval J through the hash function. i .

7. A multi-encryption card scheduling system, comprising a computer device with multiple encryption cards, wherein the computer device comprises a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the steps of the scheduling method for a multi-encryption card according to any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored therein, characterized in that: The computer program is used to be executed by a computer device to implement the scheduling method for a multi-encryption card according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for concurrently encrypting and decrypting virtual private network (VPN) equipment in multi-encryption-card environment

    CN102970142A

  • Virtual machine scheduling method and system in hyper-converged environment and medium

    CN111488198A