Homomorphic encryption computing task allocation method and device, equipment and medium
By sharding homomorphically encrypted data and dynamically allocating tasks, combined with the load and capabilities of computing nodes, the problem of unbalanced resource utilization in multi-node distributed computing systems is solved, and efficient homomorphic encrypted computing is achieved.
Patent Information
- Application Number
- CN202411976353.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Existing multi-node distributed computing systems cannot flexibly adapt to the differences in the complexity of encryption algorithms when processing homomorphic encrypted data, resulting in unbalanced resource utilization and reduced overall computing efficiency.
By dividing the raw data into multiple data shards, determining the computing factor based on the characteristics of each shard and the load of the computing nodes, dynamically allocating computing tasks based on the priority and capabilities of the computing nodes, and migrating tasks when necessary, load balancing and reasonable resource scheduling are ensured.
It improves the overall system's computational efficiency, reduces computation time, optimizes resource utilization, and is suitable for large-scale parallel computing scenarios.
Smart Images

Figure CN119883564B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data encryption and distributed computing, and particularly relates to a homomorphic encryption computing task allocation method and device, equipment and medium. BACKGROUND
[0002] With the rapid development of big data technology and privacy protection needs, homomorphic encryption, as an encryption method that supports direct calculation on encrypted data, has gradually become a hot research field. Although homomorphic encryption has unique advantages, its high computational complexity and resource consumption significantly increase system processing time. In traditional single-node or simple distributed architecture, it is difficult to meet the computing needs of large-scale homomorphic encryption data, especially in the case of complex encryption algorithms (such as elliptic curve encryption), the performance bottleneck is more obvious.
[0003] At present, although multi-node distributed computing technology can share part of the computing pressure, most existing solutions ignore the particularity of homomorphic encryption, and cannot flexibly adapt to the complexity differences of encryption algorithms, resulting in unbalanced resource utilization and reducing the overall system computing efficiency.
[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The present disclosure provides a homomorphic encryption computing task allocation method, device, equipment and medium, which at least partially overcomes the problem in the related art that multi-node distributed computing cannot flexibly adapt to the complexity differences of encryption algorithms, resulting in unbalanced resource utilization and reducing the overall system computing efficiency.
[0006] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a homomorphic encryption computing task allocation method is provided, comprising:
[0008] dividing the original data into a plurality of data shards;
[0009] determining a computing factor according to the characteristics of each data shard and the load status of each computing node, the computing factor reflecting the complexity of the homomorphic encryption computing task;
[0010] determining the priority of each computing node according to the computing factor, the computing capacity and the current load of each computing node in the plurality of computing nodes, wherein the size of the computing factor is negatively related to the priority of the computing node, and the difference between the computing capacity and the current load is positively related to the priority of the computing node.
[0011] The computing tasks are allocated according to the priorities of the computing nodes, and the computing tasks are used for homomorphic encryption computation on the data shards.
[0012] In one embodiment of the present disclosure, the method further comprises:
[0013] determining the number of computing nodes;
[0014] obtaining the computing performance, the memory performance and the JVM performance of each computing node respectively;
[0015] determining the overall performance of each computing node based on the computing performance, the memory performance and the JVM performance of the computing node;
[0016] dividing the original data into a plurality of data shards, comprising: determining a shard size based on the overall performance of each computing node; and performing sharding on the original data based on the shard size to obtain the plurality of data shards.
[0017] In one embodiment of the present disclosure, the computing factor is determined according to the characteristics of each data shard and the current load of each computing node, comprising:
[0018] determining the homomorphic encryption complexity based on the order of the homomorphic encryption elliptic curve and the typical operation times in the homomorphic encryption;
[0019] determining the memory consumption parameter based on the shard size and the homomorphic encryption complexity;
[0020] determining the time consumption parameter based on the ratio of the homomorphic encryption complexity to the overall performance of each computing node;
[0021] determining the computing factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter.
[0022] In one embodiment of the present disclosure, the memory consumption parameter is determined based on the shard size and the homomorphic encryption complexity, comprising: multiplying the shard size and the homomorphic encryption complexity by respective weight coefficients and summing the results to obtain the memory consumption parameter;
[0023] determining the computing factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter, comprising: multiplying the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter by respective weight coefficients and summing the results to obtain the computing factor.
[0024] In one embodiment of the present disclosure, the computing factor is determined according to the characteristics of each data shard and the current load of each computing node, comprising:
[0025] The load status of each current computing node is acquired based on a preset period, and a computing factor is determined according to the characteristics of each data shard and the load status of each current computing node.
[0026] In one embodiment of the present disclosure, the method further comprises:
[0027] During the execution of the computing task by the computing node, if the current resource usage of the computing node meets the migration trigger condition, the amount of migrated tasks is determined according to the available resource amount of the computing node and the overall performance of the computing node.
[0028] The computing task corresponding to the amount of migrated tasks is migrated to another computing node.
[0029] In one embodiment of the present disclosure, the method further comprises: after the data shard is encrypted by the computing node executing the computing task, the encrypted data is stored in the distributed file system.
[0030] According to another aspect of the present disclosure, a homomorphic encryption computing task allocation device is provided, comprising a sharding module, a factor calculation module, a priority determination module, and a task allocation module.
[0031] The sharding module is configured to divide the original data into a plurality of data shards.
[0032] The factor calculation module is configured to determine a computing factor according to the characteristics of each data shard and the load status of each current computing node, the computing factor reflecting the complexity of the homomorphic encryption computing task.
[0033] The priority determination module is configured to determine the priority of each computing node according to the computing factor, the computing capacity, and the current load of each computing node in the plurality of computing nodes, wherein the size of the computing factor is negatively related to the priority of the computing node, and the difference between the computing capacity and the current load is positively related to the priority of the computing node.
[0034] The task allocation module is configured to allocate computing tasks according to the priority of each computing node, the computing tasks being used for homomorphic encryption computing on the data shards.
[0035] According to still another aspect of the present disclosure, an electronic device is provided, comprising a memory configured to store instructions, and a processor configured to invoke the instructions stored in the memory to implement the homomorphic encryption computing task allocation method described above.
[0036] According to still another aspect of the present disclosure, a computer readable storage medium is provided, having stored thereon computer instructions, the computer instructions being executed by a processor to implement the homomorphic encryption computing task allocation method described above.
[0037] According to still another aspect of the present disclosure, there is provided a computer program product storing instructions which, when executed by a computer, cause the computer to implement the homomorphic encryption computing task allocation method described above.
[0038] According to still another aspect of the present disclosure, there is provided a chip comprising at least one processor and an interface;
[0039] the interface is configured to provide program instructions or data for the at least one processor;
[0040] the at least one processor is configured to execute the program instructions to implement the homomorphic encryption computing task allocation method described above.
[0041] The homomorphic encryption computing task allocation method, device, equipment and medium provided by the embodiments of the present disclosure associate the computing factor (reflecting the complexity of the homomorphic encryption computing task) with the priority of the computing node in a negative correlation, and combine the difference between the computing capacity and the current load as a positive correlation factor, which can intelligently evaluate the actual processing capacity of each node, and then more complex tasks can be allocated to those nodes with sufficient remaining resources and lower load in the task allocation link, thereby avoiding the situation that some nodes are overloaded while other nodes are idle, and helping to speed up the overall computing process, improving the overall resource utilization, reducing the computing time, and improving the computing efficiency of the overall system by precisely matching the task demand and the node capacity.
[0042] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0043] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure.
[0044] Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0045] Figure 1 a flowchart of a homomorphic encryption computing task allocation method in an embodiment of the present disclosure is shown;
[0046] Figure 2 a flowchart of computing factor determination in an embodiment of the present disclosure is shown;
[0047] Figure 3 a flowchart of task migration in an embodiment of the present disclosure is shown;
[0048] Figure 4A flow chart of another homomorphic encryption computing task allocation method in the embodiment of the present disclosure is shown.
[0049] Figure 5 A task allocation schematic diagram in the embodiment of the present disclosure is shown.
[0050] Figure 6 A flow chart of another homomorphic encryption computing task allocation method in the embodiment of the present disclosure is shown.
[0051] Figure 7 A schematic diagram of a homomorphic encryption computing task allocation device in the embodiment of the present disclosure is shown.
[0052] Figure 8 A structural block diagram of an electronic device in the embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0053] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0054] For the convenience of understanding, the related concepts involved in the present disclosure are explained as follows:
[0055] Homomorphic encryption is an encryption technology that allows certain operations on encrypted data without decrypting the data. The operation result after decryption is consistent with the result of the same operation on the original data. In the present invention, homomorphic encryption is used to protect data privacy in a distributed computing environment, ensuring that no decryption is required for calculation during data query and processing.
[0056] Elliptic Curve Cryptography (ECC) is a public key encryption technology based on elliptic curves. Compared with traditional encryption algorithms, ECC requires shorter keys and faster operation speed while providing the same security, making it very suitable for devices with limited resources.
[0057] FourQ elliptic curve, which is an optimized 128-bit secure elliptic curve, has high efficient encryption operation capability. FourQ uses Montgomery curve coordinates, optimizes addition and multiplication operations, and is very suitable for encryption tasks in a multi-node parallel computing environment, improving the speed and efficiency of encryption processing and reducing the consumption of computing resources.
[0058] Sharding is a method of dividing large-scale data sets into multiple smaller data blocks, called "shards", for parallel processing. In this disclosure, sharding is used to split and distribute large amounts of data to different computing nodes for processing, thereby improving computing efficiency and response speed.
[0059] Computation Factor is a comprehensive evaluation parameter for measuring encryption complexity, memory consumption and time consumption. In this disclosure, the computation factor is dynamically adjusted according to the specific circumstances of the task, ensuring reasonable scheduling of task allocation and computing resources, and optimizing system performance.
[0060] Task Migration Mechanism is a mechanism triggered when the resources of a computing node approach saturation, which transfers part of the shard tasks to a node with lighter load. In this disclosure, this mechanism is used to dynamically balance the computing pressure of each node, prevent single-node overload, and ensure the overall efficiency and stability of the system.
[0061] Load Balancing is a method of distributing tasks evenly to multiple computing nodes to avoid the phenomenon of some nodes being overloaded and others being idle. In this invention, the system dynamically adjusts task allocation based on the performance, load situation and computation factor of the nodes to achieve the best load balancing effect.
[0062] Computation Node is an independent server or computing unit that executes shard tasks. In this invention, the performance and load situation of each computation node affect the allocation of shard tasks and the task migration mechanism, ensuring efficient operation of the overall system.
[0063] The following describes the example embodiment in detail in conjunction with the accompanying drawings and examples.
[0064] Figure 1 A flowchart of a homomorphic encryption computing task allocation method in an embodiment of the present disclosure is shown as follows. Figure 1 As shown in the figure, the homomorphic encryption computing task allocation method provided in the embodiment of the present disclosure includes S101-S104.
[0065] In S101, the original data is divided into multiple data shards.
[0066] In some embodiments, the sharding criterion for sharding in S101 can be data volume size.
[0067] In S102, a computing factor is determined according to the characteristics of each data shard and the load status of each computing node, the computing factor reflecting the complexity of the homomorphic encryption computing task.
[0068] In some embodiments, the computing factor is a comprehensive evaluation of homomorphic encryption complexity, memory consumption and time consumption.
[0069] In S103, the priority of each computing node is determined according to the computing factor, the computing capability and the current load of each computing node in the plurality of computing nodes; wherein the size of the computing factor is negatively related to the priority of the computing node, and the difference between the computing capability and the current load is positively related to the priority of the computing node.
[0070] It can be understood that the difference between the computing capability and the current load can reflect the current remaining computing performance.
[0071] In S104, the computing task is assigned to each computing node according to the priority of each computing node, the computing task being used for homomorphic encryption computing on the data shard.
[0072] In the present disclosure, the computing task is preferentially assigned to the computing node with high priority, which has low load and good performance, and can better process the computing task.
[0073] It can be understood that, Figure 1 The execution subject of the homomorphic encryption computing task assignment method shown can be a server.
[0074] The embodiments of the present disclosure focus on introducing a computing factor, reducing resource consumption of a single node, improving computing efficiency, dynamically adjusting task assignment according to node load and performance, ensuring load balancing and optimizing resource utilization, through sharding and multi-node task assignment.
[0075] The embodiments of the present disclosure significantly reduce the computing overhead in large-scale data processing through accurate evaluation and dynamic assignment of homomorphic encryption complexity, so that the system can still maintain high running efficiency when processing data of hundreds of millions; through sharding computing and multi-node collaborative work design, the storage and computing burden of a single node can be greatly reduced, the utilization rate of computing resources is optimized, and the present disclosure is suitable for large-scale parallel computing scenarios.
[0076] In some embodiments, the method can further include: determining the number of computing nodes; obtaining the computing performance, the memory performance and the JVM performance of each computing node respectively; and determining the overall performance of each computing node based on the computing performance, the memory performance and the JVM performance of the computing node. In S101, the raw data can be divided into a plurality of data shards based on the overall performance of each computing node, and the shard size can be determined; and the raw data can be divided into a plurality of data shards based on the shard size.
[0077] In some embodiments, before S101, an elliptic curve can be selected, the number of computing nodes N can be determined, and the performance of the computing nodes can be calculated.
[0078] The CPU performance P can be calculated by the following formula: CPU :
[0079] P CPU =N core ·f cpu
[0080] wherein N core represents the number of CPU cores, and f cpu represents the clock frequency.
[0081] The memory performance can be calculated by the following formula:
[0082] P Memory =S Memory ×η Memory
[0083] wherein S Memory represents the memory size, and η Memory represents the bandwidth utilization.
[0084] The JVM performance can be calculated by the following formula:
[0085]
[0086] wherein GC throughput represents the throughput of garbage collection, and GC pause represents the pause time of garbage collection.
[0087] The overall performance of the computing node can be calculated by the following formula:
[0088] P node =w CPU ·P CPU +w Memory ·P Memory +w JVM ·P JVM
[0089] wherein w CPU , wMemory and w JVM are weight coefficients.
[0090] In the embodiments of the present disclosure, the server can set an initial shard size according to system performance parameters, and each shard of data contains Size data pieces of data, and the total number of shards is P (rounded up).
[0091] In some embodiments, as shown in Figure 2 S201-S204, the determination of the calculation factor according to the characteristics of each data shard and the load status of the current computing nodes can include.
[0092] In S201, the homomorphic encryption complexity is determined according to the order of the homomorphic encryption elliptic curve and the typical operation number in the homomorphic encryption.
[0093] In S202, the memory consumption parameter is determined based on the shard size and the homomorphic encryption complexity.
[0094] In S203, the time consumption parameter is determined based on the ratio of the homomorphic encryption complexity to the overall performance of each computing node.
[0095] In S204, the calculation factor is determined based on the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter.
[0096] In the homomorphic encryption, the typical operation number (also known as "computation depth") refers to the maximum number of homomorphic operations such as addition and multiplication that can be performed on encrypted data in a specific homomorphic encryption scheme.
[0097] In some embodiments, the determination of the memory consumption parameter based on the shard size and the homomorphic encryption complexity in S202 can be to multiply the shard size and the homomorphic encryption complexity by their respective weight coefficients and then sum them to obtain the memory consumption parameter. The determination of the calculation factor based on the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter in S204 can be to multiply the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter by their respective weight coefficients and then sum them to obtain the calculation factor.
[0098] In some embodiments, the calculation factor F is calculated by the following formula:
[0099] F = w1·C enc + w2·M + w3·T
[0100] where w1, w2, and w3 are weight coefficients, reflecting the relative importance of encryption complexity, memory consumption, and time consumption in different systems. Their values can be adjusted according to actual application conditions to ensure that the system achieves optimal performance.
[0101] The encryption complexity Cenc : complexity of different encryption algorithms or elliptic curves.
[0102] Memory consumption M: the amount of memory required for the sharding computing task.
[0103] Time consumption T: the predicted computing time.
[0104] In some embodiments, the homomorphic encryption complexity is calculated by the following formula:
[0105] C enc = a · (log2q) 2 + b · (Operations HE )
[0106] where q is the order of the elliptic curve, the larger the order, the higher the computational complexity; a and b are adjustment factors, used to reflect the characteristics of different encryption algorithms; Operations HE is the number of typical operations in homomorphic encryption.
[0107] In some embodiments, the memory consumption M is calculated by the following formula:
[0108] M = g · Size data + d · C enc
[0109] where Size data is the size of the sharded data, usually in bytes; C enc is the encryption complexity; g and d are coefficients, representing the impact of data size and encryption complexity on memory consumption.
[0110] In some embodiments, the time consumption is calculated by the following formula:
[0111]
[0112] where P node is the computing node performance (also referred to as the comprehensive performance of the computing node).
[0113] The computing node performance P node is refined and decomposed according to CPU, memory, and JVM tuning parameters, and the formula is as follows:
[0114] P node = w CPU · P CPU + w Memory · P Memory + w JVM · P JVM
[0115] where P CPU: Performance indicators of CPU (such as core count and clock frequency).
[0116] P Memory : Performance indicators of memory (including memory size, configuration of young generation and old generation).
[0117] P JVM : Influence of JVM tuning parameters (such as garbage collection mechanism, ratio of young generation and old generation, etc.).
[0118] w CPU ,w Memory ,w JVM : is a weight coefficient, used to balance the influence weight of CPU, memory, and JVM tuning parameters in the overall node performance.
[0119] In some embodiments, the determination of the computing factor in S102 according to the characteristics of each data shard and the current load of each computing node can be based on the current load of each computing node obtained in a preset period, and the computing factor is determined according to the characteristics of each data shard and the current load of each computing node.
[0120] In some embodiments, the determination of the priority of each node in S103 and the allocation of the computing task according to the priority in S104 can be selecting a target node from multiple computing nodes by the following formula and allocating the computing task to the target node:
[0121]
[0122] wherein, P node computing capacity of the node, L node current load of the node.
[0123] By calculating the available resources of each node, it is ensured that the task is allocated to the node with low load and high performance.
[0124] The server realizes dynamic resource allocation by initializing multiple computing nodes and evaluating their performance and load. During data processing, the system shards and encrypts the data to ensure privacy protection. The system regularly monitors the load state of each node, dynamically adjusts the computing factor, and reasonably allocates the computing task to the node with lower load. If the resources of a node are close to saturation, the system will automatically trigger the task migration mechanism to transfer the task to other nodes to ensure overall load balancing.
[0125] In some embodiments, the above method can further include Figure 3 S301-S302.
[0126] In S301, during execution of a computing task by a computing node, if the current resource usage of the computing node meets a migration trigger condition, the amount of tasks to be migrated is determined according to the available resource amount of the computing node and the overall performance of the computing node.
[0127] In S302, the computing task corresponding to the amount of tasks to be migrated is migrated to another computing node.
[0128] Whether it is a difference in node performance or a fluctuation in system load, the embodiments of the present disclosure can flexibly cope with different computing environments by dynamically adjusting the computing factor and the migration mechanism, and ensure that the system always runs in the best state.
[0129] In some embodiments, when the resources of a certain node approach saturation (such as memory usage or CPU utilization exceeding a certain threshold), the system triggers the task migration mechanism to transfer part of the sharded tasks to other nodes with lighter load. The amount of tasks to be migrated is calculated by the following formula:
[0130]
[0131] In this formula, F' represents the task share to be migrated, R available is the available resource of the target node. By evaluating the resource usage and available resource of the current node, the system can decide how many tasks to migrate to other nodes to ensure the load balancing and computing efficiency of the overall system.
[0132] Figure 4 The flow of the homomorphic encryption computing task allocation method of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the server shards the original data to obtain multiple data shards, and then can construct computing tasks for the multiple data shards. Each computing task can be a computing process for homomorphic encryption of data in a data shard. As shown in FIG. 1, the computing tasks can be allocated to computing nodes based on the method of the above embodiments, and in the case of the embodiments, task migration is performed. In some embodiments, as shown in FIG. 1, after the computing nodes execute the computing tasks to encrypt the data shards, the encrypted data is stored in a distributed file system. Figure 4 Figure 5 Figure 3 Figure 4
[0133] The embodiments of the present disclosure dynamically adjust the allocation of sharded tasks through the computing factor, optimize the load and performance of different nodes, and significantly improve the computing efficiency of the system. By adjusting the encryption complexity of the elliptic curve and combining memory and time consumption, the encryption process is more efficient, and the occupation of computing resources is reduced. In combination with the task migration mechanism, the load balancing of the computing nodes is ensured, and single-point overload is avoided.
[0134] The method of the embodiment of the present disclosure is described in detail below through a specific scenario. The server stores 1.4 billion user data and uses homomorphic encryption to protect the privacy of the data. The client needs to query the data, and the system ensures efficient calculation and load balancing through sharding and task scheduling. As shown in FIG. 6, the embodiment mainly includes S601-S604. Figure 6
[0135] In S601, initialization. The server and the client are first initialized to determine the basic parameters of the system. Elliptic curve: FourQ elliptic curve is selected as the basis for homomorphic encryption. Computing node: the system contains N computing nodes, and the computing capacity and current load of each node are known.
[0136] In S602, data sharding is performed.
[0137] The server sets the initial sharding size according to the system performance parameters. The server reasonably shards the 1.4 billion data. It is assumed that each piece of data contains M data, and the total number of shards is S (rounded up);
[0138] The server divides the data into pieces, and uses the FourQ elliptic curve for full homomorphic encryption. Each piece of encrypted data is stored in a distributed file system.
[0139] In S603, dynamic adjustment of the calculation factor.
[0140] After the data sharding is completed, the system dynamically adjusts the calculation factor F according to the characteristics of each piece of data and the current node load to optimize the allocation of resources. The calculation formula of the calculation factor is:
[0141] F=w1·C enc +w2·M+w3·T
[0142] At this time, the system regularly monitors the load of each node (such as every 10 seconds) and dynamically adjusts the allocation strategy of the sharding task according to the available resources of each node.
[0143] In S604, the encrypted calculation task is allocated.
[0144] Based on the adjusted calculation factor, the system allocates the encrypted calculation task to each computing node. The system allocates the task to the node with low load and high performance according to the available resources, the calculation factor, and the current load of each node, using the following formula:
[0145]
[0146] In this step, the computing capacity P node of the node and the current load L node The best node is dynamically selected to ensure load balancing of the system.
[0147] In some embodiments, the above method can further include a task migration mechanism. If the resources of a certain node approach saturation (e.g., the memory usage or CPU utilization exceeds a set threshold) during the execution of an encrypted computing task, the system will trigger the task migration mechanism. The triggering formula of the task migration is as follows:
[0148]
[0149] Once the task migration is triggered, the system determines the amount of tasks Task to be migrated according to the current load and available resources R of the node. available migrate It can be ensured that the system still maintains high computing performance in a high-load environment.
[0150] In some embodiments, when a client needs to query encrypted data, the client first generates a query request and shards the request data (the same as the server), and then sends the encrypted request to the server. The server matches and responds to the encrypted data and returns the corresponding encrypted result. The client then decrypts the data using its private key to obtain the required information.
[0151] The embodiments of the present disclosure achieve efficient computing and resource utilization in a high-load environment through dynamic adjustment of the calculation factor and the task migration mechanism, and ensure the performance and security of the system when processing large-scale homomorphic encrypted data.
[0152] In related technologies, in the scenario of processing 1.4 billion data, the storage and computing pressure of a single node is very large, which easily leads to resource bottlenecks. The embodiments of the present disclosure significantly reduce the storage and computing burden of a single node by sharding data and utilizing the computing power of multiple nodes. The multi-node sharding computing method effectively disperses the load, avoids excessive consumption of resources, and improves the overall performance of the system.
[0153] By dynamically adjusting task allocation, the embodiments of the present disclosure can optimize task scheduling in real time according to the load and computing power of each node. The system will preferentially allocate tasks to nodes with lower load and stronger computing power, ensuring efficient use of resources. This adaptive allocation mechanism significantly improves computing efficiency, especially in high-concurrency and large-data environments, effectively avoiding computing delays and performance bottlenecks, and ensuring efficient operation of the system.
[0154] In the embodiments of the present disclosure, the terms "first", "second", and "third" are only for descriptive purposes and cannot be understood or implied to indicate or suggest relative importance.
[0155] The term "and / or", in this disclosure, is merely used to describe associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the front and rear associated objects.
[0156] In addition, although the various steps of the methods in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all of the steps shown must be performed to achieve the desired results.
[0157] In some embodiments, certain steps can be omitted, a plurality of steps can be combined into one step, one step can be divided into a plurality of steps, and the like.
[0158] Based on the same inventive concept, the disclosure also provides a homomorphic encryption computing task allocation device, as described in the following embodiments. Since the principles of the device embodiments solve problems similar to the above-mentioned method embodiments, the implementation of the device embodiments can refer to the implementation of the above-mentioned method embodiments, and the repeated parts will not be described again.
[0159] Figure 7 A schematic diagram of a homomorphic encryption computing task allocation device in an embodiment of the disclosure is shown, as shown in Figure 7 The homomorphic encryption computing task allocation device includes a fragmentation module 701, a factor calculation module 702, a priority determination module 703, and a task allocation module 704.
[0160] The fragmentation module 701 is configured to divide the original data into a plurality of data fragments.
[0161] The factor calculation module 702 is configured to determine a calculation factor according to the characteristics of each data fragment and the load of each computing node at present, the calculation factor reflecting the complexity of the homomorphic encryption computing task.
[0162] The priority determination module 703 is configured to determine the priority of each computing node according to the calculation factor, the calculation capability, and the current load of each computing node in the plurality of computing nodes, wherein the size of the calculation factor is negatively related to the priority of the computing node, and the difference between the calculation capability and the current load is positively related to the priority of the computing node.
[0163] The task allocation module 704 is configured to allocate a computing task according to the priority of each computing node, the computing task being used for homomorphic encryption computing on the data fragments.
[0164] In some embodiments, the homomorphic encryption computing task allocation device further includes a performance calculation module.
[0165] The performance calculation module is configured to determine the number of computing nodes, acquire the computing performance, the memory performance and the JVM performance of each computing node respectively, and determine the overall performance of each computing node based on the computing performance, the memory performance and the JVM performance of the computing node.
[0166] The sharding module 701 is configured to determine the shard size based on the overall performance of each computing node, and perform sharding on the original data based on the shard size to obtain a plurality of data shards.
[0167] In some embodiments, the factor calculation module 702 is configured to determine the homomorphic encryption complexity according to the order of the homomorphic encryption elliptic curve and the typical operation number in the homomorphic encryption, determine the memory consumption parameter based on the shard size and the homomorphic encryption complexity, determine the time consumption parameter based on the ratio of the homomorphic encryption complexity to the overall performance of each computing node, and determine the computing factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter.
[0168] In some embodiments, determining the memory consumption parameter based on the shard size and the homomorphic encryption complexity includes multiplying the shard size and the homomorphic encryption complexity by respective weight coefficients and summing the results to obtain the memory consumption parameter, and determining the computing factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter includes multiplying the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter by respective weight coefficients and summing the results to obtain the computing factor.
[0169] In some embodiments, the factor calculation module 702 is configured to acquire the current load of each computing node based on a preset period, and determine the computing factor according to the characteristics of each data shard and the current load of each computing node.
[0170] In some embodiments, the homomorphic encryption computing task allocation apparatus further includes a task migration module.
[0171] The task migration module is configured to, during execution of the computing task by the computing node, if the current resource usage of the computing node meets a migration triggering condition, determine a migrated task amount according to the available resource amount of the computing node and the overall performance of the computing node, and migrate the computing task corresponding to the migrated task amount to another computing node.
[0172] In some embodiments, the homomorphic encryption computing task allocation apparatus further includes a storage module.
[0173] The storage module is configured to, after the computing task is executed by the computing node to encrypt the data shard, store the encrypted data in a distributed file system.
[0174] The terms "first", "second", and the like in the present disclosure are merely intended to distinguish different devices, modules, or units, and do not imply the sequence of execution of the functions of these devices, modules, or units or the mutual dependency of these devices, modules, or units.
[0175] As to the homomorphic encryption computing task allocation apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the homomorphic encryption computing task allocation method, and will not be described in detail here.
[0176] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, such division is not mandatory.
[0177] 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. Conversely, the features and functions of one module or unit described above can be further divided into several modules or units.
[0178] Some block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0179] The electronic device provided by the embodiments of the present disclosure will be described below with reference to Figure 8 . Figure 8 The electronic device 800 shown is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0180] Figure 8 An architecture schematic diagram of an electronic device 800 provided by the embodiments of the present disclosure is shown. As Figure 8 shown, the electronic device 800 includes but is not limited to at least one processor 810 and at least one memory 820.
[0181] The memory 820 is configured to store instructions.
[0182] In some embodiments, the memory 820 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 8201 and / or a cache memory unit 8202, and can further include a read-only memory (ROM) 8203.
[0183] In some embodiments, the memory 820 can further include program / utility 8204 having a set of one or more program modules 8205, examples of which include an operating system, one or more application programs, other program modules, and program data, each of which
[0184] In some embodiments, the memory 820 can store an operating system. The operating system can be a real-time operating system (RTX), LINUX, UNIX, WINDOWS, or OS X.
[0185] In some embodiments, the memory 820 can further store data.
[0186] As an example, the processor 810 can read data stored in the memory 820, which can be stored in the same memory address as instructions, or in a different memory address from instructions.
[0187] The processor 810 is configured to invoke instructions stored in the memory 820 to implement the steps of the various exemplary embodiments of the present disclosure described in the above “Exemplary Methods” section of the present specification. For example, the processor 810 can perform the steps of the above-described homomorphic encryption computing task allocation method embodiments.
[0188] It should be noted that the above processor 810 can be a general-purpose processor or a special-purpose processor. The processor 810 can include one or more processing cores, and the processor 810 performs various functional applications and data processing by running instructions.
[0189] In some embodiments, the processor 810 can include a central processing unit (CPU) and / or a baseband processor.
[0190] In some embodiments, the processor 810 can determine an instruction according to a priority identifier and / or a function category information carried in each control instruction.
[0191] In the present disclosure, the processor 810 and the memory 820 can be separately provided or integrated together.
[0192] As an example, the processor 810 and the memory 820 can be integrated on a single board or a system on chip (SOC).
[0193] As Figure 8As shown, the electronic device 800 is in the form of a general-purpose computing device. The electronic device 800 may further include a bus 830 .
[0194] The bus 830 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0195] The electronic device 800 may also communicate with one or more external devices 840 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and / or any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 850.
[0196] Furthermore, the electronic device 800 can also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through the network adapter 860 .
[0197] like Figure 8 As shown, the network adapter 860 communicates with other modules of the electronic device 800 via the bus 830 .
[0198] It should be understood that although not shown in the figures, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0199] It is understood that the structure shown in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 800. In other embodiments of the present disclosure, the electronic device 800 may include Figure 8 More or fewer components may be shown, or some components may be combined or separated, or the components may be arranged differently. Figure 8 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0200] The present disclosure also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the homomorphic encryption computing task allocation method described in the above method embodiment is implemented.
[0201] The computer-readable storage medium in the embodiments of the present disclosure is a computer instruction that can be sent, propagated or transmitted for use by or in conjunction with an instruction execution system, apparatus or device.
[0202] As an example, computer readable storage media are non-transitory.
[0203] In some embodiments, more specific examples of the computer readable storage medium in the present disclosure can include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0204] In the embodiments of the present disclosure, the computer readable storage medium can include a data signal carried in the baseband or as part of a carrier wave, in which computer instructions (readable program code) are borne.
[0205] Such a propagated data signal can take a wide variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof.
[0206] In some examples, the computer readable program instructions contained on the computer readable storage medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical, RF, and the like, or any suitable combination thereof.
[0207] The embodiments of the present disclosure also provide a computer program product, which stores instructions. When the instructions are executed by a computer, the computer implements the homomorphic encryption computing task allocation method described in the above method embodiment.
[0208] The above instructions can be program code. In specific implementation, the program code can be written in any combination of one or more programming languages.
[0209] The programming languages include object-oriented programming languages such as Java, C++, and the like, and conventional procedural programming languages such as "C" programming language or similar programming languages.
[0210] The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0211] In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected through the Internet by using an Internet service provider).
[0212] The embodiment of the present disclosure further provides a chip comprising at least one processor and an interface.
[0213] The interface is configured to provide program instructions or data for the at least one processor.
[0214] The at least one processor is configured to execute the program instructions to implement the homomorphic encryption computing task allocation method described in the above method embodiment.
[0215] In some embodiments, the chip can further comprise a memory configured to store program instructions and data, and the memory is located in the processor or outside the processor.
[0216] Those skilled in the art can understand that all or part of the steps of the above embodiments can be implemented in the form of a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining software and hardware aspects, which can be collectively referred to as "circuitry", "module" or "system".
[0217] Other embodiments of the present disclosure will be readily apparent to those skilled in the art in view of the disclosure, which, as noted above, is meant only to be exemplary.
[0218] The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure following the general principles of the present disclosure and including common knowledge or conventional technical means in the art which are not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A homomorphic encryption computing task allocation method, characterized in that, The method comprises the following steps: dividing original data into a plurality of data shards; determining a calculation factor according to the characteristics of each data shard and the current load of each computing node, the calculation factor reflecting the complexity of the homomorphic encryption calculation task; determining the priority of each computing node according to the calculation factor corresponding to each computing node in the plurality of computing nodes, the calculation capacity and the current load, wherein the size of the calculation factor is negatively related to the priority of the computing node, and the difference between the calculation capacity and the current load is positively related to the priority of the computing node; allocating a calculation task according to the priority of each computing node, the calculation task being used for homomorphic encryption calculation on the data shard; The method further comprises the following steps:
2. The method of claim 1, wherein, determining the number of computing nodes; obtaining the calculation performance, memory performance and JVM performance of each computing node respectively; determining the overall performance of each computing node based on the calculation performance, memory performance and JVM performance of the computing node; The method further comprises the following steps: determining the shard size based on the overall performance of each computing node; and 3. The method of claim 1, wherein, sharding the original data based on the shard size to obtain a plurality of data shards. The method further comprises the following steps:
4. The method according to any of claims 1 to 3, characterized in that, multiplying the shard size and the homomorphic encryption complexity by respective weight coefficients and then summing the products to obtain the memory consumption parameter; multiplying the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter by respective weight coefficients and then summing the products to obtain the calculation factor.
5. The method of claim 1, wherein, The method further comprises the following steps: obtaining the load of each computing node based on a preset period, and determining the calculation factor according to the characteristics of each data shard and the load of each computing node. The method further comprises the following steps:
6. The method of claim 1, wherein, if the current resource usage of the computing node meets a migration triggering condition during the execution of the calculation task by the computing node, determining the amount of migrated tasks according to the available resource amount of the computing node and the overall performance of the computing node; and migrating the calculation task corresponding to the amount of migrated tasks to another computing node.
7. A homomorphic encryption computing task allocation apparatus characterized by comprising: The method further comprises the following steps: storing the encrypted data into a distributed file system after the execution of the calculation task by the computing node to encrypt the data shard. The method comprises the following steps: a sharding module for dividing original data into a plurality of data shards; a factor calculation module, configured to determine a calculation factor according to characteristics of each data shard and a current load of each computing node, the calculation factor reflecting complexity of the homomorphic encryption calculation task; a priority determination module, configured to determine a priority of each computing node according to the calculation factor corresponding to each computing node in the plurality of computing nodes, a calculation capability and a current load of each computing node, wherein the calculation factor is negatively related to the priority of the computing node, and a difference between the calculation capability and the current load is positively related to the priority of the computing node; a task allocation module, configured to allocate the calculation task according to the priority of each computing node, the calculation task being used for homomorphic encryption calculation on the data shard; the factor calculation module is configured to determine a homomorphic encryption complexity according to an order of a homomorphic encryption elliptic curve and a typical operation frequency in the homomorphic encryption, determine a memory consumption parameter based on a shard size and the homomorphic encryption complexity, determine a time consumption parameter based on a ratio of the homomorphic encryption complexity to an overall performance of each computing node, and determine the calculation factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter.
8. An electronic device, comprising: comprising: a memory, configured to store instructions; a processor, configured to invoke the instructions stored in the memory to implement the homomorphic encryption calculation task allocation method according to any one of claims 1-6.
9. A computer readable storage medium having stored thereon computer instructions, wherein, the computer instructions are executed by the processor to implement the homomorphic encryption calculation task allocation method according to any one of claims 1-6.
Citation Information
Patent Citations
Data processing method, equipment, central processing unit and system
CN116880800A
Terminal interaction data storage security management method and system for instant messaging
CN118764496A