Cryptographic computing task scheduling method, device, medium and electronic equipment
By using the ant colony algorithm based on the virtual cryptographic machine in the cloud computing environment to optimize the task scheduling method, the load balancing problem of cryptographic resource scheduling in the cloud environment is solved, rapid response and efficient scheduling are achieved, operation and maintenance costs are reduced, and the system is enhanced. Security.
Patent Information
- Application Number
- CN202210828296.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-07-13
AI Technical Summary
In a cloud computing environment, traditional cryptographic devices cannot meet the needs of flexible deployment and dynamic allocation of cryptographic resources, resulting in complex application integration, high operation and maintenance costs, and increased system security risks. Load balancing and efficient scheduling in cryptographic virtualization platforms have become challenges.
The ant colony algorithm based on the virtual cryptographic machine is used to optimize the task scheduling method. By obtaining the task information to be executed, dividing the meta-tasks, obtaining the attribute information of the virtual cryptographic machine, determining the objective function and using the improved ant colony algorithm to optimize the scheduling plan, the cryptographic calculation task is realized Fast response and load balancing.
It improves the response speed and efficiency of password services, reduces operation and maintenance costs, enhances system security, and provides higher-quality password services.
Smart Images

Figure CN115220890B_ABST
Abstract
Description
Background Art
[0002] In an environment with diversified application services, traditional hardware cryptographic devices have certain obstacles in deployment in cloud environments, and it is difficult to meet the needs of elastic deployment and dynamic allocation of cryptographic resources in cloud computing environments. In addition, the professionalism of traditional cryptographic device integration and application developers is different, and the management and use of application keys are scattered, resulting in a sharp increase in the cost of application integration cryptographic development and user operation and maintenance, which further increases the security risks of the system. It is urgent to integrate cryptographic resources for users, provide unified cryptographic resource management and unified cryptographic service access specifications, and provide more standardized, professional, and efficient cryptographic technology support for application services.
[0003] The emergence of Crypto as a Service (CaaS) has brought opportunities and challenges to the application of traditional cryptographic technology in cloud environments. By pooling cryptographic resources and allocating and scheduling cryptographic resources to users on demand, the non-scalability problem of traditional cryptographic machines in time-varying virtual environments is solved, effectively avoiding the waste of user cryptographic resources. The cryptographic virtualization platform provides users with secure and reliable cryptographic services, and the supply carrier of cryptographic services is the Virtual Cipher Machine (VCM), which simulates a complete cryptographic machine system with complete hardware system functions and runs in a completely isolated environment through software. The management and scheduling of virtual cipher machines are the key to affecting the quality of cryptographic services (QoS). Ensuring rapid response of cryptographic services and realizing efficient scheduling and load balancing of VCM in the cryptographic virtualization platform are challenging issues in the cryptographic virtualization platform system.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a cryptographic computing task scheduling method, device, computer-readable storage medium and electronic device to at least solve the technical problem of load balancing in a cryptographic virtualization platform environment in the related art.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] The technical solution of the present disclosure is as follows:
[0008] According to one aspect of the present disclosure, a cryptographic computing task scheduling method is provided, comprising: obtaining information of cryptographic computing tasks to be executed; dividing the cryptographic computing task information into one or more meta-tasks; obtaining the number and attribute information of virtual cipher machines (VCM) that can execute the tasks; determining an objective function of task scheduling according to the number of meta-tasks and VCMs; optimizing the objective function using an ant colony algorithm improved based on the attribute information of VCM to obtain an optimal task scheduling scheme; and scheduling cryptographic computing tasks according to the optimal task scheduling scheme.
[0009] In some embodiments of the present disclosure, the attribute information of the VCM includes at least one or more of the following: VCM cryptographic resource utilization, network bandwidth resource occupancy ratio, CPU processing speed, and memory resource utilization.
[0010] In some embodiments of the present disclosure, the objective function is:
[0011]
[0012] The optimization goal is to minimize the time cost of executing all i tasks in the scheduling scheme f(taskset); T is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue, m represents the number of virtual cryptographic machines VCM; T ij Task i In Virtual Cryptographic Machine VCM j The expected completion time.
[0013] In some embodiments of the present disclosure, using an ant colony algorithm improved based on the attribute information of VCM to optimize the objective function to obtain the optimal task scheduling plan includes: determining the pheromone function of the ant colony algorithm based on the attribute information of VCM; generating multiple ant scheduling plans according to the pheromone function; and any one of the following: optimizing the objective function based on a method of updating pheromones after each ant completes the scheduling to obtain the optimal task scheduling plan; and / or optimizing the objective function based on a method of updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan.
[0014] According to another aspect of the present disclosure, based on the method of updating pheromones after each ant completes scheduling, the objective function is optimized to obtain the optimal task scheduling scheme. The method of updating pheromones after each ant completes scheduling includes: after any ant completes executing all tasks to generate a scheduling scheme, the pheromones on the virtual cipher machine of the scheduling scheme are updated, that is, when executing Task i VCM j Pheromone τ(t) on i,j It can be expressed as:
[0015] τ(t+1) i,j =(1-ε)·τ(t) i,j +ε·τ(0) i,j
[0016] Among them, the value range of the local pheromone volatility coefficient ε is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The original pheromone τ(0) i,j Add all the tasks assigned to VCM in the last task scheduling activity of any ant j The updated value of pheromone contributed by the ant that distributes the pheromone.
[0017] In some embodiments of the present disclosure, the objective function is optimized based on the method of updating pheromones after all ants complete a scheduling plan, and the method of updating pheromones after all ants complete a scheduling plan in obtaining the optimal task scheduling plan includes:
[0018] In the improved ant colony algorithm, the pheromone adjustment coefficient is set, that is, when executing Task i VCM j Pheromone τ(t+1) on i,j It can be expressed as:
[0019] τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ;
[0020]
[0021] θ=1-(T j -T avg ) / T avg ;
[0022] T avg =∑ j∈VCM T j / m;
[0023] Among them, the value range of the global pheromone volatility coefficient ρ is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The updated value of pheromone contributed by the ants that distribute pheromones;
[0024] Among them, the update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected time required for execution;
[0025] Where θ is the pheromone adjustment coefficient, set θ = 1; T j In the pheromone update process after all ants have completed a scheduling plan, the virtual cipher machine VCM j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task;
[0026] Compare the execution time taken by each VCM after all tasks are executed, and the average execution time taken by each virtual cryptographic machine after all tasks are executed;
[0027] If the execution time of the virtual cipher machine is greater than the average execution time, the pheromone adjustment coefficient is reduced;
[0028] If the execution time of the virtual cipher machine is less than the average execution time, the pheromone adjustment coefficient is increased.
[0029] In some embodiments of the present disclosure, optimizing the objective function based on the method of updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan further includes:
[0030] After each pheromone update, the expected heuristic coefficient β is adjusted to change with the number of pheromone updates l, where the expected heuristic coefficient is used to generate multiple ant scheduling schemes based on the pheromone function:
[0031]
[0032] According to one aspect of the present disclosure, a cryptographic computing task scheduling method is provided, the method comprising:
[0033] 1) Obtain the cryptographic calculation task information taskset to be executed;
[0034] 2) Divide the cryptographic calculation task information into n meta-tasks, i.e., taskset = {task1, ....task i , ..task n};
[0035] 3) The number of virtual cryptographic machines VCM that can execute tasks is obtained as m, that is, VCM = {VCM1, ..., VCM j ,..VCM m}; Get the attribute information of the virtual cryptographic machine VCM that can execute the task, including: VCM processing speed MIPS, VCM cryptographic resource utilization UCCR, VCM network bandwidth BW, VCM memory usage UMR j ;
[0036] 4) Determine the objective function of task scheduling based on the number of n meta-tasks and VCMs:
[0037]
[0038] Among them, T max is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue; m represents the number of virtual cryptographic machines; T ij Task i Expected completion time on virtual cipher machine j;
[0039] 5) Use the ant colony algorithm improved based on VCM attribute information to optimize the objective function to obtain the optimal task scheduling solution:
[0040] 5.1) Initialize the basic parameters of the ant colony algorithm based on the attribute information. The basic parameters include: pheromone heuristic coefficient α, expected heuristic coefficient β, pheromone volatility coefficient ρ, ant colony scheduling times NS, and pheromone function τ i,j and the expected heuristic function η i,j ;
[0041] Among them, the pheromone function τ i,j and the expected heuristic function η i,j Respectively represent the task Task i Assigned to Virtual Cryptographic Machine VCM j The pheromone concentration and expected degree; MIPS j Indicates VCM j Processing speed, UCCR j Indicates VCM j Password resource utilization, BW j Indicates VCM j Network bandwidth, UMR j Indicates VCM j Memory usage, A, B, C, D are constants:
[0042]
[0043] Expected heuristic function η i,j It is expressed as follows:
[0044] Among them, T i,j For Taski in the virtual cipher machine VCM jExpected completion time on
[0045] 5.2) Any ant is assigned a task according to the probability transfer formula i Select a virtual password machine:
[0046]
[0047] m is the number of VCMs;
[0048] 5.3) If more than two tasks are assigned to the same VCM, the tasks are reassigned according to the probability transfer formula. i Select VCM;
[0049] 5.4) When any ant completes all task scheduling, it updates the pheromone of all VCMs scheduled by the ant:
[0050] τ(t+1) i,j =(1-ε)·τ(t) i,j +ε·τ(0) i,j
[0051] Among them, the value range of the local pheromone volatility coefficient ε is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The original pheromone τ(0) i,j Add all the tasks assigned to VCM in the last task scheduling plan of any ant j The updated value of pheromone contributed by the ants that distribute pheromones;
[0052] 5.5) After all ants have completed all task scheduling, find the relatively optimal task scheduling solution based on the objective function;
[0053] 5.6) After all ants have completed the scheduling plan, all VCMs of the relatively optimal task scheduling plan are updated with pheromones:
[0054] τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ;
[0055]
[0056] θ=1-(T j -T avg ) / T avg ;
[0057] T avg =∑j∈VCM T j / m;
[0058] Among them, the value range of the global pheromone volatility coefficient ρ is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The updated value of pheromone contributed by the ants that distribute pheromones;
[0059] Among them, the update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected time required for execution;
[0060] Where θ is the pheromone adjustment coefficient, set θ = 1; T j It is the virtual cipher machine VCM in this global pheromone update process. j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task;
[0061] 5.7) After each pheromone update, let the expected heuristic coefficient β be changed with the number of pheromone updates l, so as to generate multiple ant scheduling schemes according to the pheromone function:
[0062]
[0063] 5.8) The ant colony scheduling times are increased once, and it is determined whether the scheduling times have reached the preset times;
[0064] 5.9.1) If the number of ant colony scheduling times does not reach the total number of scheduling times NS, return to step 3);
[0065] 5.9.2) If the ant colony scheduling times NS reaches the total scheduling times NS, then the optimal task scheduling solution is generated; and
[0066] 6) Schedule cryptographic computing tasks according to the optimal task scheduling scheme.
[0067] According to another aspect of the present disclosure, there is provided a cryptographic computing task scheduling device, which includes: an information acquisition module for acquiring information of cryptographic computing tasks to be executed; a task generation module for dividing the cryptographic computing task information into one or more meta-tasks; a VCM information acquisition module for acquiring the number and attribute information of virtual cryptographic machines VCM that can execute tasks; a function module for determining an objective function of task scheduling according to the number of meta-tasks and VCMs; a scheme generation module for optimizing the objective function using an ant colony algorithm improved based on the attribute information of VCM to obtain an optimal task scheduling scheme; and a scheduling module for scheduling cryptographic computing tasks according to the optimal task scheduling scheme.
[0068] According to another aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned cryptographic computing task scheduling method by executing the executable instructions.
[0069] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned cryptographic computing task scheduling method is implemented.
[0070] A cryptographic computing task scheduling method provided by an embodiment of the present disclosure adopts an ant colony algorithm improved based on VCM attribute information compared to the prior art, which achieves rapid response, efficient scheduling, and load balancing for cryptographic computing tasks, and provides users with high-quality cryptographic services.
[0071] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0073] Figure 1 A schematic diagram showing the system structure of a cryptographic virtualization platform for executing a cryptographic computing task scheduling method in an embodiment of the present disclosure.
[0074] Figure 2 A flowchart of a cryptographic computing task scheduling method in an embodiment of the present disclosure is shown.
[0075] Figure 3A flow chart of a method for generating an optimal scheduling solution in a cryptographic computing task scheduling method in an embodiment of the present disclosure is shown.
[0076] Figure 4 A flow chart of a method for generating an optimal scheduling solution in another cryptographic computing task scheduling method in an embodiment of the present disclosure is shown.
[0077] Figure 5 A flowchart of another cryptographic computing task scheduling method in an embodiment of the present disclosure is shown.
[0078] Figure 6 A schematic diagram showing a cryptographic computing task scheduling device in an embodiment of the present disclosure.
[0079] Figure 7 A structural block diagram of a cryptographic computing task scheduling computer device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0080] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0081] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0082] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0083] In view of the technical problems existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a method for device network access, so as to solve at least one or all of the above-mentioned technical problems.
[0084] Figure 1A schematic diagram showing the system structure of a cryptographic virtualization platform for executing a cryptographic computing task scheduling method in an embodiment of the present disclosure.
[0085] like Figure 1 As shown, the system may include a service interface layer 110 and a virtual cryptographic resource pool 120 .
[0086] The service interface layer 110 may include a general cryptographic service layer 104 and a virtualized cryptographic resource interface layer 106. The service interface layer 110 converts the cryptographic calculation task 102 into a specific cryptographic operation through the unified general cryptographic service layer 104 and hands it over to the virtual cryptographic resource pool interface layer 106 for processing through a downstream thread; the virtual cryptographic resource interface layer 106 sends the service request in the form of a task to the virtual cryptographic resource pool 120 through a downstream message queue.
[0087] The virtual cryptographic resource pool 120 may include a cryptographic resource scheduling layer 122 and a virtual code machine (Virtual Code Machine, VCM) real-time performance monitor 124. The cryptographic resource scheduling layer 122 takes out the computing task from the downlink message queue, and obtains the current attribute status of the host cryptographic machine 128 corresponding to each VCM 126 through the real-time performance monitor 124. Based on the improved ant colony scheduling algorithm, the cryptographic computing task is sent to the host cryptographic machine 128 corresponding to the corresponding VCM 126 for processing, and then the VCM 126 returns the processed information to the cryptographic resource scheduling layer 122; the cryptographic resource scheduling layer 122 sends the processed information to the virtual cryptographic resource interface layer 106 through the uplink message queue; and the virtual cryptographic resource interface layer 106 returns the processing result of the cryptographic computing task to the general cryptographic service layer 104 through the uplink thread.
[0088] It should be pointed out that the nouns or terms involved in the embodiments of the present application can refer to each other and will not be repeated here.
[0089] Below, each step in the cryptographic computing task scheduling method in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0090] Figure 2 The flowchart of a cryptographic computing task scheduling method in an embodiment of the present disclosure is shown. The method provided in the embodiment of the present disclosure can be executed by any electronic device with computing capabilities in the environment of a cryptographic virtualization platform. Figure 1 The cryptographic resource scheduling layer in is used as an example to illustrate the execution subject.
[0091] like Figure 2 As shown, the method 200 may include the following steps:
[0092] In step S210, the cryptographic calculation task information to be executed is obtained.
[0093] The cryptographic computing task information may be submitted by a user and may include one or more cryptographic computing tasks; for example, including but not limited to tasks such as key generation, digital signature, data encryption and decryption, and data summary.
[0094] In step S220, the cryptographic computing task information is divided into one or more meta-tasks.
[0095] Among them, a meta-task is a sub-task that cannot be further divided, that is, one or more cryptographic computing tasks are divided into one or more sub-tasks; each virtual cryptographic machine can only process one meta-task at the same time.
[0096] In step S230, the number and attribute information of virtual cryptographic machines VCM that can execute tasks are obtained.
[0097] The attribute information of the virtual code machine (VCM) is the capability information of each VCM in processing subtasks, such as CPU processing speed, memory resource utilization, etc.
[0098] In step S240 , the objective function of task scheduling is determined according to the number of meta-tasks and VCMs.
[0099] The objective function is the time function for allocating the meta-tasks to be executed to a fixed number of VCMs for execution.
[0100] In step S250, an ant colony algorithm improved based on the attribute information of the VCM is used to optimize the objective function to obtain an optimal task scheduling solution.
[0101] The idea of the improved ant colony algorithm based on the attribute information of VCM is to establish the correlation between the computing power of VCM and pheromone, thereby affecting the probability of VCM being selected to minimize the time function.
[0102] In step S260, the cryptographic computing tasks are scheduled according to the optimal task scheduling scheme.
[0103] The present invention proposes a cryptographic computing task scheduling method suitable for a cryptographic virtualization platform environment, which adopts an ant colony algorithm improved based on VCM attribute information to achieve rapid response, efficient scheduling, and load balancing of cryptographic computing tasks, and provide users with high-quality cryptographic services.
[0104] In some embodiments of the present disclosure, the attribute information of the VCM includes at least one or more of the following: VCM cryptographic resource utilization, network bandwidth resource occupancy ratio, CPU processing speed, and memory resource utilization. By comprehensively considering the processing performance of each virtual cryptographic machine and the corresponding host machine, the reliability of task scheduling is improved and the efficiency of task processing is improved.
[0105] In some embodiments of the present disclosure, the objective function is:
[0106]
[0107] The optimization goal is to minimize the time cost of executing all i tasks in the scheduling scheme f(taskset); T is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue, m represents the number of virtual cryptographic machines VCM; T ij Task i In Virtual Cryptographic Machine VCM j The expected completion time on the virtual cipher machine. The scheduling problem of assigning user password calculation tasks to virtual cipher machines is expressed as a standard optimal value solving problem, where the optimization goal is to minimize the time overhead of all tasks in the scheduling strategy, that is, the time taken to complete all tasks is the shortest, thereby achieving a rapid response to user password service tasks.
[0108] In some embodiments of the present disclosure, an ant colony algorithm improved based on the attribute information of the VCM is used to obtain the minimum time to execute all tasks in the scheduling scheme, thereby generating a method for generating an optimal scheduling scheme, for example Figure 3 FIG. 1 is a flow chart of a method for generating an optimal scheduling solution in a cryptographic computing task scheduling method according to an embodiment of the present disclosure. Figure 3 As shown, the method 300 includes:
[0109] In step S310, the pheromone function of the ant colony algorithm is determined based on the attribute information of the VCM.
[0110] In some embodiments of the present disclosure, taking the attribute information including VCM password resource utilization, network bandwidth resource occupancy ratio, CPU processing speed and memory resource utilization as an example:
[0111] Specifically, the pheromone function τ in the ant colony algorithm can be initialized based on the above attribute information: i,j ;
[0112]
[0113] When executing a task i VCM j The pheromone function τ on i,j For VCMj CPU processing speed MIPS j Ratio to constant A, cryptographic resource utilization rate UCCR j Ratio to constant B, network bandwidth BW j Ratio to constant C and memory usage UMR j The sum of the ratios to a constant D.
[0114] In step S320, multiple ant scheduling schemes are generated according to the pheromone function.
[0115] In some embodiments of the present disclosure, based on the optimization goal of minimizing the time cost of executing all i tasks in the scheduling scheme f(taskset), the expected heuristic function η in the ant colony algorithm can be i,j Initialize according to the time cost of executing the task, as shown in formula (3):
[0116]
[0117] Among them, T i,j Task i In Virtual Cryptographic Machine VCM j The expected completion time.
[0118] In some embodiments of the present disclosure, each ant is assigned a task based on the expected heuristic function and the objective function. i Select Virtual Cryptography Machine (VCM) i Probability:
[0119]
[0120] Among them, α is the pheromone heuristic coefficient of the pheromone function, β is the expected heuristic coefficient of the expected heuristic function, and m is the number of VCMs.
[0121] The multiple ant scheduling schemes include respective scheduling schemes generated by multiple ants in an ant colony in one scheduling.
[0122] In step S330, the objective function is optimized based on the method of updating the pheromone after each ant completes the scheduling, and the optimal task scheduling solution is obtained.
[0123] In some embodiments of the present disclosure, the method based on updating pheromones after each ant completes scheduling means that after an ant completes all task scheduling, all virtual cryptographic machines VCM involved in the scheduling scheme generated by the ant are updated with pheromones to achieve real-time adjustment of pheromones. The advantage of this method is that it can reduce the probability of a virtual cryptographic machine that has been selected being selected again, thereby accelerating the convergence speed of the algorithm and improving the algorithm training efficiency; further reducing the computational cost during the algorithm training process.
[0124] In some embodiments of the present disclosure, the method for updating the pheromone after each ant completes the scheduling includes: after any ant completes executing all the tasks to generate the scheduling plan, the pheromone on the virtual cipher machine of the scheduling plan is updated, that is, when executing Task i VCM j Pheromone τ(t) on i,j It can be expressed as:
[0125] τ(t+1) i,j =(1-ε)·τ(t) i,j +ε·τ(0) i,j (5)
[0126] Among them, the value range of the local pheromone volatility coefficient ε is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The original pheromone τ(0) i,j Add all the tasks assigned to VCM in the last task scheduling activity of any ant j The updated value of pheromone contributed by the ant that distributes the pheromone.
[0127] In some embodiments of the present disclosure, the method of using the ant colony algorithm improved based on the attribute information of the VCM to obtain the minimum time to execute all tasks in the scheduling scheme, thereby generating the optimal scheduling scheme, may also include, for example Figure 4 A flowchart of a method for generating an optimal scheduling solution in another cryptographic computing task scheduling method in an embodiment of the present disclosure is shown. Figure 4 As shown, the method 400 includes:
[0128] In step S410, the pheromone function of the ant colony algorithm is determined based on the attribute information of the VCM.
[0129] In step S420, multiple ant scheduling schemes are generated according to the pheromone function.
[0130] Steps S410 and S420 are Figure 3 Steps S310 and S320 are similar, so they are not repeated here.
[0131] In step S430, the objective function is optimized based on the method of updating pheromones after all ants complete the scheduling plan to obtain the optimal task scheduling plan.
[0132] In some embodiments of the present disclosure, the method based on updating pheromones after all ants complete a scheduling plan means that after all ants complete a scheduling, the optimal scheduling plan in this scheduling is found, that is, the scheduling plan with the minimum time overhead for processing all tasks.
[0133] In some embodiments of the present disclosure, in order to achieve load balancing of the virtual cryptographic machine during the task allocation process, step S430 may also include: setting the pheromone adjustment coefficient θ in the improved ant colony algorithm, that is, when executing Task i VCM j Pheromone τ(t+1) on i,j It can be expressed as:
[0134] τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ; (6)
[0135]
[0136] θ=1-(T j -T avg ) / T avg ; (8)
[0137] T avg =∑ j∈VCM T j / m; (9)
[0138] Among them, the value range of the global pheromone volatility coefficient ρ is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The updated value of pheromone contributed by the ant that distributes the pheromone.
[0139] Among them, the update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected time required for execution.
[0140] Where θ is the pheromone adjustment coefficient, set θ = 1; T j In the pheromone update process after all ants have completed a scheduling plan, the virtual cipher machine VCM j The time it takes to execute the task, T avgThe average time taken by all virtual cipher machines to execute the current task.
[0141] Compare the execution time taken by each VCM after completing all tasks, and the average execution time taken by each virtual cryptographic machine after completing all tasks:
[0142] If the execution time of the virtual cipher machine is greater than the average execution time, the pheromone adjustment coefficient is reduced. j >T avg When , it means that the load of the virtual cipher machine is too large, then θ is set to be less than 1 to reduce its load, that is, to reduce its pheromone.
[0143] If the execution time of the virtual cipher machine is less than the average execution time, increase the pheromone adjustment factor. j <T avg When , it means that the load of the virtual cipher machine is small, then θ is set to be greater than 1 to increase its load, that is, to increase its pheromone.
[0144] By setting the pheromone adjustment coefficient, the virtual cipher machine can be accurately prevented from being overloaded or underloaded, and problems such as computing load and waste of physical resources can be avoided, thereby improving the utilization rate of physical resources.
[0145] In some embodiments of the present disclosure, optimizing the objective function based on the method of updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan further includes: after each pheromone update, adjusting the expected heuristic coefficient β to vary with the number of pheromone updates l, wherein the expected heuristic coefficient is used to generate multiple ant scheduling plans according to the pheromone function:
[0146]
[0147] In some embodiments, the expected heuristic coefficient β can be adjusted according to the expected heuristic function and the objective function to obtain the task of each ant. i Select Virtual Cryptography Machine (VCM) j The probability of , for details, can be found in the above formula (4), thereby generating multiple ant scheduling schemes.
[0148] As the pheromone concentration on the virtual cipher machine increases, the influence of the pheromone function on the ant's selection of the virtual cipher machine increases. By adjusting the expected heuristic coefficient and thus adjusting the expected heuristic function, the guiding role of the pheromone function is improved, which is conducive to finding the optimal scheduling plan and further improving the accuracy of this method.
[0149] Figure 5 A flowchart of another method for scheduling cryptographic computing tasks in an embodiment of the present disclosure is shown. Figure 5 As shown, the method 500 includes:
[0150] In step S502, the cryptographic computing task information to be executed is obtained.
[0151] In step S504, a meta-task is generated according to the cryptographic calculation task information.
[0152] In step S506, the number and attribute information of virtual cryptographic machines VCM that can execute tasks are obtained.
[0153] In step S508, the objective function of task scheduling is determined according to the number of meta-tasks and VCMs.
[0154] In step S510, a pheromone function is determined based on the attribute information.
[0155] In step S512, an ant scheduling plan is generated according to the pheromone function.
[0156] In step S514, it is determined whether more than two tasks are assigned to the same VCM. If more than two tasks are assigned to the same VCM, the process returns to step S512 to generate an ant scheduling scheme according to the pheromone function.
[0157] If no more than two tasks are assigned to the same VCM, step S516 is executed.
[0158] In step S516, when any ant completes all task scheduling, pheromone updates are performed on all VCMs scheduled by the ant.
[0159] In step S518, it is determined whether all ants have completed all task scheduling.
[0160] If there are still ants that have not completed task scheduling, return to step S512.
[0161] If all ants have completed all their respective task scheduling, step S520 is executed.
[0162] In step S520, the objective function is optimized to obtain a relatively optimal task scheduling solution.
[0163] In step S522, pheromone update is performed on all VCMs relative to the optimal task scheduling solution.
[0164] In step S524, after each pheromone update, the expected heuristic coefficient is adjusted.
[0165] In step S526, the ant colony scheduling times increases by one.
[0166] In step S528, it is determined whether the number of ant colony scheduling times reaches a preset number.
[0167] If the scheduling times do not reach the preset times, return to step S512.
[0168] If the scheduling times reaches the preset times, step S530 is executed.
[0169] In step S530, an optimal task scheduling solution is generated.
[0170] In step S532, the cryptographic computing tasks are scheduled according to the optimal task scheduling scheme.
[0171] In some embodiments of the present disclosure, method 500 may include the following steps:
[0172] 1) Obtain the cryptographic calculation task information taskset to be executed;
[0173] 2) Divide the cryptographic calculation task information into n meta-tasks, i.e., taskset = {task1, ....task i , ..task n};
[0174] 3) The number of virtual cryptographic machines VCM that can execute tasks is obtained as m, that is, VCM = {VCM1, ..., VCM j ,..VCM m}; Get the attribute information of the virtual cryptographic machine VCM that can execute the task, including: VCM processing speed MIPS, VCM cryptographic resource utilization UCCR, VCM network bandwidth BW, VCM memory usage UMR j ;
[0175] 4) Determine the objective function of task scheduling based on the number of n meta-tasks and VCMs. Figure 2 Formula (1) in step S260.
[0176] 5) Use the ant colony algorithm improved based on VCM attribute information to optimize the objective function to obtain the optimal task scheduling solution:
[0177] 5.1) Initialize the basic parameters of the ant colony algorithm based on the attribute information. The basic parameters include: pheromone heuristic coefficient α, expected heuristic coefficient β, pheromone volatility coefficient ρ, ant colony scheduling times NS, and pheromone function τ i,j and the expected heuristic function η i,j ;
[0178] Among them, the pheromone function τ can be determined according to formula (2) and formula (3): i,j and the expected heuristic function η i,j ;
[0179] 5.2) Any ant is assigned a task according to the probability transfer formula (4).i Select Virtual Crypto Machine;
[0180] 5.3) If more than two tasks are assigned to the same VCM, the tasks are reassigned according to the probability transfer formula. i Select VCM;
[0181] 5.4) When any ant completes all task scheduling, it updates the pheromone of all VCMs scheduled by the ant according to formula (5);
[0182] 5.5) After all ants have completed all task scheduling, find the relatively optimal task scheduling solution based on the objective function;
[0183] 5.6) After all ants have completed the scheduling plan, all VCMs of the relatively optimal task scheduling plan are updated with pheromones according to formulas (6)-(9);
[0184] 5.7) After each pheromone update, adjust the expected heuristic coefficient β according to formula (10);
[0185] 5.8) The ant colony scheduling times are increased once, and it is determined whether the scheduling times have reached the preset times;
[0186] 5.9.1) If the number of ant colony scheduling times does not reach the total number of scheduling times NS, return to step 3);
[0187] 5.9.2) If the ant colony scheduling times NS reaches the total scheduling times NS, then the optimal task scheduling solution is generated; and
[0188] 6) Schedule cryptographic computing tasks according to the optimal task scheduling scheme.
[0189] In summary, the disclosed embodiment proposes a cryptographic computing task scheduling method suitable for a cryptographic virtualization platform environment, which improves the reliability of task scheduling and the efficiency of task processing by comprehensively considering the properties of each virtual cryptographic machine and the corresponding host machine; the scheduling problem of assigning user cryptographic computing tasks to virtual machines for execution is expressed as a standard optimal value solving problem, wherein the optimization goal is to minimize the time overhead of completing all tasks in the scheduling strategy, that is, the shortest time spent on completing all tasks, so as to achieve a rapid response to user cryptographic computing tasks; and the ant colony algorithm of the disclosed embodiment has the characteristics of a meta-heuristic algorithm, which reduces the complexity of the cryptographic resource scheduling problem; in one scheduling, when an ant completes all task assignments, it updates the pheromone of all virtual cryptographic machines in the ant scheduling scheme, realizes a local adjustment of the pheromone, reduces the probability of the selected VCM being selected again, and thus improves the accuracy of the model; by setting the pheromone adjustment coefficient, the virtual cryptographic machine can be accurately prevented from being overloaded or underloaded, and the problems of computing load and physical resource waste can be avoided, thereby improving the utilization rate of physical resources; by adjusting the expected heuristic coefficient and then adjusting the expected heuristic function, the guiding role of the pheromone function is improved, which is conducive to finding the optimal scheduling scheme.
[0190] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0191] Figure 6 A schematic diagram of a cryptographic computing task scheduling device according to an embodiment of the present disclosure is shown. Figure 6 As shown, the device 600 may include the following modules:
[0192] The information acquisition module 610 is used to obtain the information of the cryptographic computing tasks to be executed; the task generation module 620 is used to divide the cryptographic computing task information into one or more meta-tasks; the VCM information acquisition module 630 is used to obtain the number and attribute information of the virtual cryptographic machine VCM that can execute the task; the function module 640 is used to determine the objective function of task scheduling according to the number of meta-tasks and VCMs; the solution generation module 650 is used to optimize the objective function using the ant colony algorithm improved based on the attribute information of VCM to obtain the optimal task scheduling solution; the scheduling module 660 is used to schedule the cryptographic computing tasks according to the optimal task scheduling solution.
[0193] In some embodiments of the present disclosure, the attribute information of the VCM includes at least one or more of the following: VCM cryptographic resource utilization, network bandwidth resource occupancy ratio, CPU processing speed, and memory resource utilization.
[0194] In some embodiments of the present disclosure, the objective function is shown in formula (1), where the optimization goal is to minimize the time overhead of executing all i tasks in the scheduling scheme f(taskset); T is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue, m represents the number of virtual cryptographic machines VCM; T ij Task i In Virtual Cryptographic Machine VCM j The expected completion time.
[0195] In some embodiments of the present disclosure, the solution generation module 650 is also used to use the ant colony algorithm improved based on the attribute information of VCM to optimize the objective function to obtain the optimal task scheduling solution, including: determining the pheromone function of the ant colony algorithm based on the attribute information of VCM; generating multiple ant scheduling solutions according to the pheromone function; and any of the following: optimizing the objective function based on the method of updating the pheromone after each ant completes the scheduling to obtain the optimal task scheduling solution; and / or optimizing the objective function based on the method of updating the pheromone after all ants complete a scheduling solution to obtain the optimal task scheduling solution.
[0196] In some embodiments of the present disclosure, the objective function is optimized based on the method of updating the pheromone after each ant completes the scheduling, and the method of updating the pheromone after each ant completes the scheduling in the optimal task scheduling scheme includes: after any ant executes all the tasks to generate the scheduling scheme, the pheromone on the virtual cipher machine of the scheduling scheme is updated, that is, when executing Task i VCM j Pheromone τ(t) on i,j It can be expressed as formula (2), where the value range of the local pheromone volatility coefficient ε is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The original pheromone τ(0) i,j Add all the tasks assigned to VCM in the last task scheduling activity of any ant j The updated value of pheromone contributed by the ant that distributes the pheromone.
[0197] In some embodiments of the present disclosure, the objective function is optimized based on the method of updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan. The method of updating pheromones after all ants complete a scheduling plan includes: setting the pheromone adjustment coefficient in the improved ant colony algorithm, that is, when executing Task i VCM j Pheromone τ(t+1) oni,j It can be expressed as formula (6)-(9); where the value range of the global pheromone volatility coefficient ρ is (0, 1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The updated value of pheromone contributed by the ants that distribute pheromones;
[0198] Among them, the update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected time required for execution;
[0199] Where θ is the pheromone adjustment coefficient, set θ = 1; T j In the pheromone update process after all ants have completed a scheduling plan, the virtual cipher machine VCM j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task;
[0200] Compare the execution time taken by each VCM after all tasks are executed, and the average execution time taken by each virtual cryptographic machine after all tasks are executed;
[0201] If the execution time of the virtual cipher machine is greater than the average execution time, the pheromone adjustment coefficient is reduced;
[0202] If the execution time of the virtual cipher machine is less than the average execution time, the pheromone adjustment coefficient is increased.
[0203] Based on the method of updating pheromones after all ants complete a scheduling plan, the objective function is optimized to obtain the optimal task scheduling plan, which also includes: after each pheromone update, adjusting the expected heuristic coefficient β to change with the number of pheromone updates l, where the expected heuristic coefficient is used to generate multiple ant scheduling plans according to the pheromone function as shown in formula (10).
[0204] Regarding the cryptographic computing task scheduling device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0205] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0206] Refer to the following Figure 7 An electronic device 700 according to this embodiment of the present invention will be described. Figure 7 The electronic device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0207] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).
[0208] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can perform the following steps: Figure 2 In step S210 shown in the figure, the information of the cryptographic computing task to be executed is obtained; in step S220, the cryptographic computing task information is divided into one or more meta-tasks; in step S230, the number and attribute information of the virtual cryptographic machines VCM that can execute the task are obtained; in step S240, the objective function of task scheduling is determined according to the number of meta-tasks and VCMs; in step S250, the objective function is optimized using an ant colony algorithm improved based on the attribute information of VCM to obtain the optimal task scheduling plan; and in step S260, the cryptographic computing task is scheduled according to the optimal task scheduling plan.
[0209] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 721 and / or a cache memory unit 722 , and may further include a read-only memory unit (ROM) 723 .
[0210] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0211] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0212] The electronic device 700 may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or may communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0213] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0214] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0215] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0216] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0217] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0218] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0219] According to one aspect of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned embodiments.
[0220] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0221] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0222] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0223] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A cryptographic computing task scheduling method, It is characterized in that The method comprises: Obtain information about cryptographic calculation tasks to be executed; Dividing the cryptographic calculation task information into one or more meta-tasks; Acquire the number and attribute information of virtual cryptographic machines (VCMs) that can execute tasks; the attribute information of the VCMs includes at least one or more of the following: VCM cryptographic resource utilization, network bandwidth resource occupancy ratio, CPU processing speed, and memory resource utilization; The objective function of task scheduling is determined according to the number of the meta-tasks and the VCMs; wherein the objective function is: The optimization goal is to minimize the time cost of executing all i tasks in the scheduling scheme f(taskset); T max is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue, m represents the number of virtual cryptographic machines VCM; T ij Task i In Virtual Cryptographic Machine VCM j Expected completion time on Optimizing the objective function using an ant colony algorithm improved based on the attribute information of the VCM to obtain an optimal task scheduling solution; and Scheduling the cryptographic computing task according to the optimal task scheduling scheme; The step of optimizing the objective function using an ant colony algorithm improved based on the attribute information of the VCM to obtain an optimal task scheduling solution includes: The pheromone function of the ant colony algorithm is determined based on the attribute information of the VCM; the pheromone function τ i,j for: Among them, MIPS j Indicates VCM j Processing speed, UCCR j Indicates VCM j Password resource utilization, BW j Indicates VCM j Network bandwidth, UMR j Indicates VCM j Memory usage, A, B, C, D are constants; generating a plurality of ant scheduling schemes according to the pheromone function; The objective function is optimized based on the method of updating pheromones after all ants complete a scheduling plan, so as to obtain the optimal task scheduling plan; Among them, the method based on updating pheromones after all ants complete a scheduling plan optimizes the objective function to obtain the optimal task scheduling plan, and the method based on updating pheromones after all ants complete a scheduling plan includes: In the improved ant colony algorithm, the pheromone adjustment coefficient is set, that is, when executing Task i VCM j Pheromone τ(t+1) on i,j It can be expressed as: τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ; where θ=1-(T j -T avg ) / T avg ; T avg =∑ j∈VCM T j / m; the value range of the global pheromone volatility coefficient ρ is (0,1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The pheromone update value contributed by the ant that distributes the pheromone; update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected execution time required; θ is the pheromone adjustment coefficient, set θ = 1; T j In the pheromone update process after all ants have completed a scheduling plan, the virtual cipher machine VCM j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task; Compare the execution time taken by each VCM after all tasks are executed, and the average execution time taken by each virtual cryptographic machine after all tasks are executed; If the execution time of the virtual cipher machine is greater than the average execution time, reducing the pheromone adjustment coefficient; If the execution time of the virtual cipher machine is less than the average execution time, increasing the pheromone adjustment coefficient; The method of optimizing the objective function based on updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan also includes: After each pheromone update, the expected heuristic coefficient β is adjusted to change with the number of pheromone updates l, wherein the expected heuristic coefficient is used to generate a variety of ant scheduling schemes according to the pheromone function:
2. The cryptographic computing task scheduling method according to claim 1, It is characterized in that The method further comprises: The objective function is optimized based on a method of updating pheromones after each ant completes scheduling, thereby obtaining an optimal task scheduling solution.
3. The cryptographic computing task scheduling method according to claim 2, It is characterized in that The method of optimizing the objective function based on the method of updating the pheromone after each ant completes the scheduling to obtain the method of updating the pheromone after each ant completes the scheduling in the optimal task scheduling solution includes: After any ant has completed all the tasks to generate a scheduling plan, the pheromone on the virtual cipher machine of the scheduling plan is updated, that is, when executing Task i VCM j Pheromone τ(t+1) on i,j It can be expressed as: τ(t+1) i,j =(1-e)·τ(t) i,j +ε·r(0) i,j Among them, the value range of the local pheromone volatility coefficient ε is (0,1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The original pheromone τ(0) i,j Add all the tasks assigned to VCM in the last task scheduling activity of any ant j The updated value of pheromone contributed by the ant that distributes the pheromone.
4. A cryptographic computing task scheduling method, It is characterized in that The method comprises: 1) Obtain the cryptographic calculation task information taskset to be executed; 2) Divide the cryptographic calculation task information into n meta-tasks, namely taskset = {task 1 ,…taski,..taskn}; 3) The number of virtual cryptographic machines VCM that can execute tasks is obtained as m, that is, VCM = {VCM 1 ,…,VCM j ,..VCMm}; Get the attribute information of the virtual cryptographic machine VCM that can execute the task, including: VCM processing speed MIPS, VCM cryptographic resource utilization UCCR, VCM network bandwidth BW, VCM memory usage UMR j ; 4) Determine the objective function of task scheduling according to the n meta-tasks and the number of VCMs: Among them, Tma x is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue; m represents the number of virtual cryptographic machines; T ij Task i Expected completion time on virtual cipher machine j; 5) Using the ant colony algorithm improved based on the attribute information of the VCM to optimize the objective function to obtain the optimal task scheduling solution: 5.1) Initialize the basic parameters of the ant colony algorithm based on the attribute information, the basic parameters include: pheromone inspiration coefficient α, expected inspiration coefficient β, pheromone volatility coefficient ρ, ant colony scheduling times NS, and pheromone function τi, j and the expected heuristic function ηi, j ; Wherein, the pheromone function τ i,j And the expected heuristic function η i,j Respectively represent the task Task i Assigned to Virtual Cryptographic Machine VCM j The pheromone concentration and expected degree; MIPS j Indicates VCM j Processing speed, UCCR j Indicates VCM j Password resource utilization, BW j Indicates VCM j Network bandwidth,UMR j Indicates VCM j Memory usage, A, B, C, D are constants: The expected heuristic function η i,j It is expressed as follows: Among them, T i,j Task i In Virtual Cryptographic Machine VCM j Expected completion time on 5.2) Any ant is assigned a task according to the probability transfer formula i Select a virtual password machine: m is the number of VCMs; 5.3) If more than two tasks are assigned to the same VCM, the tasks are reassigned according to the probability transfer formula. i Select VCM; 5.4) When any ant completes all task scheduling, all VCMs scheduled by the ant are updated with pheromones: τ(t+1) i,j =(1-e)·τ(t) i,j +e·t(0) i,j Among them, the value range of the local pheromone volatility coefficient ε is (0,1); in Task i VCM j The pheromone τ(t+1)i on j Equal to VCM j The original pheromone (0)i, j Add all the tasks assigned to VCM in the last task scheduling plan of any ant j The updated value of pheromone contributed by the ants that distribute pheromones; 5.5) After all ants have completed all task scheduling, find the relatively optimal task scheduling solution according to the objective function; 5.6) After all ants have completed the scheduling plan, all VCMs of the relatively optimal task scheduling plan are updated with pheromones: τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ; θ=1-(T j -T avg ) / T avg ; T avg =∑ j∈VCM T j / m; Among them, the value range of the global pheromone volatility coefficient ρ is (0,1); in Task i VCM j The pheromone τ(t+1)i on j Equal to VCM j The updated value of the pheromone Δτ(t)i, j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The updated value of pheromone contributed by the ants that distribute pheromones; Among them, the update value Δ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected time required for execution; Where θ is the pheromone adjustment coefficient, set θ = 1; T j It is the virtual cipher machine VCM in this global pheromone update process. j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task; 5.7) After each pheromone update, let the expected heuristic coefficient β be changed with the number of pheromone updates l, so as to generate a variety of ant scheduling schemes according to the pheromone function: 5.8) The ant colony scheduling times are increased once, and it is determined whether the scheduling times have reached the preset times; 5.9.1) If the ant colony scheduling times do not reach the total scheduling times NS, return to step 3); 5.9.2) If the ant colony scheduling number NS reaches the total scheduling number NS, an optimal task scheduling solution is generated; and 6) Scheduling the cryptographic computing task according to the optimal task scheduling scheme.
5. A cryptographic computing task scheduling device, the device include: An information acquisition module, used to obtain information about the cryptographic calculation task to be executed; A task generation module, used to divide the cryptographic calculation task information into one or more meta-tasks; A VCM information acquisition module is used to acquire the number and attribute information of virtual cryptographic machines VCM that can execute tasks; the attribute information of the VCM includes at least one or more of the following: VCM cryptographic resource utilization, network bandwidth resource occupancy ratio, CPU processing speed and memory resource utilization; A function module is used to determine the objective function of task scheduling according to the number of the meta-tasks and the VCMs; wherein the objective function is: The optimization goal is to minimize the time cost of executing all i tasks in the scheduling scheme f(taskset); T max is the longest completion time of all tasks; n represents the cryptographic computing tasks waiting to be executed in the task queue, m represents the number of virtual cryptographic machines VCM; T ij Task i In Virtual Cryptographic Machine VCM j Expected completion time on A solution generation module, configured to optimize the objective function using an ant colony algorithm improved based on the attribute information of the VCM to obtain an optimal task scheduling solution; and A scheduling module, used for scheduling the cryptographic computing task according to the optimal task scheduling scheme; The solution generation module uses an ant colony algorithm improved based on the attribute information of the VCM to optimize the objective function to obtain the optimal task scheduling solution, including: The pheromone function of the ant colony algorithm is determined based on the attribute information of the VCM; the pheromone function τ i,j for: MIPS j Indicates VCM j Processing speed, UCCR j Indicates VCM j Password resource utilization, BW j Indicates VCM j Network bandwidth, UMR j Indicates VCM j Memory usage, A, B, C, D are constants; generating a plurality of ant scheduling schemes according to the pheromone function; The objective function is optimized based on the method of updating pheromones after all ants complete a scheduling plan, so as to obtain the optimal task scheduling plan; Among them, the method of optimizing the objective function based on the method of updating pheromones after all ants complete a scheduling plan to obtain the optimal task scheduling plan, the method of the solution generation module based on updating pheromones after all ants complete a scheduling plan includes: In the improved ant colony algorithm, the pheromone adjustment coefficient is set, that is, when executing Task i VCM j Pheromone τ(t+1) on i,j It can be expressed as: τ(t+1) i,j =((1-ρ)·τ(t) i,j +Δτ(t) i,j )·θ; where θ=1-(T j -T avg ) / T avg ; T avg =∑ j∈VCM T j / m; the value range of the global pheromone volatility coefficient ρ is (0,1); in Task i VCM j Pheromone τ(t+1) on i,j Equal to VCM j The updated value of pheromone Δτ(t) i,j Plus all the tasks assigned to VCM in the last task scheduling plan of all ants j The pheromone update value contributed by the ant that distributes the pheromone; update value Δτ(t) i,j is a constant M and the number of ants in a task Task i Select Virtual Cryptography Machine (VCM) j The expected execution time required; θ is the pheromone adjustment coefficient, set θ = 1; T j In the pheromone update process after all ants have completed a scheduling plan, the virtual cipher machine VCM j The time it takes to execute the task, T avg The average time taken by all virtual cipher machines to execute the current task; Compare the execution time taken by each VCM after all tasks are executed, and the average execution time taken by each virtual cryptographic machine after all tasks are executed; If the execution time of the virtual cipher machine is greater than the average execution time, reducing the pheromone adjustment coefficient; If the execution time of the virtual cipher machine is less than the average execution time, increasing the pheromone adjustment coefficient; The solution generation module optimizes the objective function based on the method of updating pheromones after all ants complete a scheduling solution to obtain the optimal task scheduling solution, and further includes: After each pheromone update, the expected heuristic coefficient β is adjusted to change with the number of pheromone updates l, wherein the expected heuristic coefficient is used to generate a variety of ant scheduling schemes according to the pheromone function:
6. An electronic device, It is characterized in that include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the cryptographic computing task scheduling method described in any one of claims 1 to 4 by executing the executable instructions.
7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the cryptographic computing task scheduling method described in any one of claims 1 to 4 is implemented.
