Homomorphic encryption calculation task allocation method and device, equipment and medium

By dividing data shards, determining calculation factors and priorities in a multi-node distributed computing system, and assigning homomorphic encryption computing tasks, the problem of resource utilization is solved and computing efficiency is improved.

CN119883564AActive Publication Date: 2025-04-25CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1

Patent Information

Application Number
CN202411976353.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25
Estimated Expiration
2044-12-30

Smart Images

  • Figure CN119883564A_ABST
    Figure CN119883564A_ABST
Patent Text Reader

Abstract

The invention provides a homomorphic encryption calculation task allocation method and device, equipment and a medium, and relates to the technical field of data encryption and distributed calculation. The method comprises the following steps: dividing original data into a plurality of data fragments; according to the characteristics of each data fragment and the load condition of each current computing node, determining a computing factor which reflects the complexity of a homomorphic encryption computing task; determining the priority of each computing node according to the computing factor, the computing power and the current load corresponding to each computing node in the plurality of computing nodes; wherein the size of the calculation factor is in negative correlation with the priority of the calculation node, and the difference between the calculation capability and the current load is in positive correlation with the priority of the calculation node; and distributing calculation tasks according to the priorities of the calculation nodes, wherein the calculation tasks are used for performing homomorphic encryption calculation on the data fragments. According to the embodiment of the invention, computing resources can be adaptively allocated in a distributed computing environment, and load balancing and efficient computing of the system are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data encryption and distributed computing, and in particular to a method, device, equipment and medium for allocating homomorphic encryption computing tasks. Background Art

[0002] With the rapid development of big data technology and privacy protection needs, homomorphic encryption, as an encryption method that supports direct calculations 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 architectures, it is difficult to meet the computing needs of large-scale homomorphic encrypted data, especially when complex encryption algorithms (such as elliptic curve encryption) are involved, and the performance bottleneck is more obvious.

[0003] At present, although multi-node distributed computing technology can share part of the computing pressure, most of the 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 computing efficiency of the overall 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 present disclosure provides a method, device, equipment and medium for allocating homomorphic encryption computing tasks, which at least to a certain extent overcome the problem that multi-node distributed computing in related technologies cannot flexibly adapt to the complexity differences of encryption algorithms, resulting in unbalanced resource utilization and reduced computing efficiency of the overall system.

[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] According to one aspect of the present disclosure, a method for allocating homomorphic encryption computing tasks is provided, comprising:

[0008] Divide the original data into multiple data shards;

[0009] The calculation factor is determined based on the characteristics of each data shard and the current load of each computing node. The calculation factor reflects the complexity of the homomorphic encryption computing task.

[0010] Determine the priority of each computing node according to the computing factor, computing power and current load corresponding to each computing node among the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node;

[0011] Computing tasks are assigned according to the priority of each computing node, and the computing tasks are used to perform homomorphic encryption calculations on data shards.

[0012] In one embodiment of the present disclosure, the method further includes:

[0013] Determine the number of computing nodes;

[0014] Obtain the computing performance, memory performance, and JVM performance of each computing node respectively;

[0015] Determine the overall performance of each computing node based on the computing performance, memory performance, and JVM performance of the computing node;

[0016] The original data is divided into a plurality of data shards, including: determining a shard size based on the overall performance of each computing node; and sharding the original data based on the shard size to obtain a plurality of data shards.

[0017] In one embodiment of the present disclosure, the calculation factor is determined according to the characteristics of each data shard and the current load of each computing node, including:

[0018] Determine the complexity of homomorphic encryption based on the order of the homomorphic encryption elliptic curve and the typical number of operations in homomorphic encryption;

[0019] Determine memory consumption parameters based on shard size and homomorphic encryption complexity;

[0020] Determine the time consumption parameter based on the ratio of homomorphic encryption complexity to the overall performance of each computing node;

[0021] The calculation factor is determined based on the homomorphic encryption complexity, memory consumption parameters, and time consumption parameters.

[0022] In one embodiment of the present disclosure, based on the shard size and the homomorphic encryption complexity, determining the memory consumption parameter includes: multiplying the shard size and the homomorphic encryption complexity by their respective weight coefficients and summing them to obtain the memory consumption parameter;

[0023] Based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter, a calculation factor is determined, including: multiplying the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter with their respective weight coefficients and then summing them up to obtain the calculation factor.

[0024] In one embodiment of the present disclosure, the calculation factor is determined according to the characteristics of each data shard and the current load of each computing node, including:

[0025] The current load condition of each computing node is obtained based on a preset period, and the calculation factor is determined according to the characteristics of each data shard and the current load condition of each computing node.

[0026] In one embodiment of the present disclosure, the method further includes:

[0027] When a computing node is executing a computing task, if the current resource usage of the computing node meets the migration triggering condition, the amount of the task to be migrated is determined based on the available resources of the computing node and the overall performance of the computing node;

[0028] Migrate the computing tasks corresponding to the migrated task volume to other computing nodes.

[0029] In one embodiment of the present disclosure, the method further includes: after the computing node executes the computing task to encrypt the data shards, storing the encrypted data in the distributed file system.

[0030] According to another aspect of the present disclosure, a homomorphic encryption computing task allocation device is provided, including a sharding module, a factor calculation module, a priority determination module and a task allocation module.

[0031] Sharding module, used to divide the original data into multiple data shards;

[0032] The factor calculation module is used to determine the calculation factor based on the characteristics of each data shard and the current load of each computing node. The calculation factor reflects the complexity of the homomorphic encryption calculation task;

[0033] A priority determination module, used to determine the priority of each computing node according to the computing factor, computing power and current load corresponding to each computing node among the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node;

[0034] The task allocation module is used to allocate computing tasks according to the priority of each computing node. The computing tasks are used to perform homomorphic encryption calculations on data shards.

[0035] According to another aspect of the present disclosure, there is provided an electronic device, comprising: a memory for storing instructions; and a processor for calling the instructions stored in the memory to implement the above-mentioned homomorphic encryption computing task allocation method.

[0036] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored, and when the computer instructions are executed by a processor, the above-mentioned homomorphic encryption computing task allocation method is implemented.

[0037] According to another aspect of the present disclosure, a computer program product is provided. The computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the above-mentioned homomorphic encryption computing task allocation method.

[0038] According to yet another aspect of the present disclosure, there is provided a chip, comprising at least one processor and an interface;

[0039] An interface for providing program instructions or data to at least one processor;

[0040] At least one processor is used to execute program instructions to implement the above-mentioned homomorphic encryption computing task allocation method.

[0041] The homomorphic encryption computing task allocation method, apparatus, device and medium provided in the embodiments of the present disclosure negatively correlate the computing factor (reflecting the complexity of the homomorphic encryption computing task) with the priority of the computing node, and combine the difference between the computing power and the current load as a positive correlation factor, so as to intelligently evaluate the actual processing capability of each node, and then in the task allocation link, more complex tasks will be allocated to those nodes with sufficient remaining resources and lower load, thereby avoiding the situation where some nodes are overloaded while other nodes are idle, and helping to speed up the overall computing process, by accurately matching task requirements with node capabilities, improving overall resource utilization, reducing computing time, and improving the computing efficiency of the overall system.

[0042] 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

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0044] Obviously, the drawings described below are only some embodiments of the present disclosure, and a person skilled in the art can obtain other drawings based on these drawings without any creative work.

[0045] Figure 1 A flow chart of a method for allocating homomorphic encryption computing tasks in an embodiment of the present disclosure is shown;

[0046] Figure 2 A flow chart for determining a calculation factor in an embodiment of the present disclosure is shown;

[0047] Figure 3 A task migration flow chart in an embodiment of the present disclosure is shown;

[0048] Figure 4A flowchart of another method for allocating homomorphic encryption computing tasks in an embodiment of the present disclosure is shown;

[0049] Figure 5 A task allocation schematic diagram according to an embodiment of the present disclosure is shown;

[0050] Figure 6 Another flow chart of a method for allocating homomorphic encryption computing tasks in an embodiment of the present disclosure is shown;

[0051] Figure 7 A schematic diagram of a homomorphic encryption computing task allocation device in an embodiment of the present disclosure is shown;

[0052] Figure 8 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with 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 of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here 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 present disclosure for protection, but merely represents the 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 making creative work belong to the scope of protection of the present disclosure.

[0054] For ease of understanding, the following first explains the relevant concepts involved in the present disclosure as follows:

[0055] Homomorphic encryption is an encryption technology that allows specific operations to be performed on encrypted data without decrypting the data. The decrypted result of the operation 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 calculations can be performed without decryption 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 calculation speeds 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 with efficient encryption computing capabilities. FourQ uses Montgomery curve coordinates, optimizes addition and multiplication operations, and is very suitable for encryption tasks in multi-node parallel computing environments, improving the speed and efficiency of encryption processing and reducing the consumption of computing resources.

[0058] Sharding is the process of dividing a large data set into multiple smaller data blocks, called "shards", for parallel processing. In the present disclosure, sharding is used to divide and distribute large amounts of data to different computing nodes for processing, thereby improving computing efficiency and response speed.

[0059] The computation factor is a comprehensive evaluation parameter used to measure encryption complexity, memory consumption, and time consumption. In this disclosure, the computation factor is dynamically adjusted according to the specific circumstances of the task to ensure the reasonable scheduling of task allocation and computing resources and optimize system performance.

[0060] The task migration mechanism is triggered when the computing node resources are close to saturation, and some sharding tasks are transferred to nodes with lighter loads. 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 to distribute tasks evenly to multiple computing nodes to avoid the phenomenon that some nodes are overloaded and other nodes are idle. In the present invention, the system dynamically adjusts the task allocation according to the performance, load and calculation factors of the nodes to achieve the best load balancing effect.

[0062] A computing node is an independent server or computing unit that performs a sharding task. In the present invention, the performance and load of each computing node affect the allocation of sharding tasks and the task migration mechanism to ensure the efficient operation of the overall system.

[0063] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.

[0064] Figure 1 A flow chart of a method for allocating homomorphic encryption computing tasks in an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the homomorphic encryption computing task allocation method provided in the embodiment of the present disclosure includes S101-S104.

[0065] In S101, original data is divided into a plurality of data slices.

[0066] In some embodiments, the sharding standard for sharding in S101 may be the amount of data.

[0067] In S102, a calculation factor is determined according to the characteristics of each data shard and the current load of each computing node, and the calculation factor reflects the complexity of the homomorphic encryption computing task.

[0068] In some embodiments, the computation factor is a comprehensive assessment 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, computing power and current load corresponding to each computing node in the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node.

[0070] It can be understood that the difference between the above computing capacity and the current load can reflect the current remaining computing performance.

[0071] In S104, computing tasks are allocated according to the priority of each computing node, and the computing tasks are used to perform homomorphic encryption calculations on the data shards.

[0072] In the present disclosure, computing tasks are preferentially assigned to computing nodes with high priorities, which have low loads and better performance and can better process computing tasks.

[0073] Understandably, Figure 1 The execution subject of the homomorphic encryption computing task allocation method shown can be the server.

[0074] The disclosed embodiments focus on introducing computing factors, which reduce the resource consumption of a single node and improve computing efficiency through sharding and multi-node task allocation. Task allocation is dynamically adjusted according to node load and performance to ensure load balancing and optimize resource utilization.

[0075] The disclosed embodiments significantly reduce the computational overhead in large-scale data processing through accurate evaluation and dynamic allocation of homomorphic encryption complexity, so that the system can still maintain a high operating efficiency when processing billions of data volumes; through the design of sharded computing and multi-node collaborative work, it can greatly reduce the storage and computing burden of a single node, optimize the utilization of computing resources, and is suitable for large-scale parallel computing scenarios.

[0076] In some embodiments, the method may further include: determining the number of computing nodes; obtaining the computing performance, memory performance, and JVM performance of each computing node; and determining the overall performance of each computing node based on the computing performance, memory performance, and JVM performance of the computing node. The above S101 divides the original data into multiple data slices, and the slice size may be determined based on the overall performance of each computing node; and the original data is sliced ​​based on the slice size to obtain multiple data slices.

[0077] In some embodiments, before S101 , an elliptic curve may be selected to determine the number of computing nodes N and computing node performance.

[0078] Calculate the CPU performance P using the following formula CPU :

[0079] P CPU =N core ·f cpu

[0080] Among them, N core Indicates the number of CPU cores, f cpu Indicates the clock frequency.

[0081] Calculate memory performance using the following formula:

[0082] P Memory =S Memory ×η Memory

[0083] Among them, S Memory Indicates memory size, η Memory Indicates bandwidth utilization.

[0084] The JVW performance is calculated using the following formula:

[0085]

[0086] Among them, GC throughput Represents the throughput of garbage collection, GC pause Indicates the pause time of garbage collection.

[0087] The overall performance of the node is calculated using the following formula:

[0088] P node =w CPU ·P CPU +w Memory ·P Memory +w JVM ·P JVM

[0089] where w CPU , wMemory and w JVM is the weight coefficient.

[0090] In the embodiment of the present disclosure, the server can set the initial fragment size according to the system performance parameters. Each fragment contains Size data The total number of shards is P (rounded up).

[0091] In some embodiments, Figure 2 As shown, the above-mentioned determination of the calculation factor according to the characteristics of each data shard and the current load of each computing node may include S201-S204.

[0092] In S201, the complexity of homomorphic encryption is determined according to the order of the homomorphic encryption elliptic curve and the typical number of operations in homomorphic encryption;

[0093] In S202, a memory consumption parameter is determined based on the shard size and homomorphic encryption complexity;

[0094] In S203, a time consumption parameter is determined based on a ratio of homomorphic encryption complexity to the overall performance of each computing node;

[0095] In S204, a calculation factor is determined based on the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter.

[0096] In homomorphic encryption, the typical number of operations (or "computational 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 above S202 determines the memory consumption parameter based on the shard size and homomorphic encryption complexity, which may be to multiply the shard size and homomorphic encryption complexity by their respective weight coefficients and then sum them to obtain the memory consumption parameter. The above S204 determines the calculation factor based on the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter, which may 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 factor F is calculated by the following formula:

[0099] F=w1·C enc +w2·M+w3·T

[0100] Among them, w1, w2, w3 are weight coefficients, which reflect the relative importance of encryption complexity, memory consumption and time consumption in different systems. Their values ​​can be adjusted according to the actual application to ensure the best performance of the system.

[0101] Encryption complexity Cenc : Measures the complexity of different encryption algorithms or elliptic curves.

[0102] Memory consumption M: The amount of memory required for the shard computing task.

[0103] Time consumption T: The predicted calculation time.

[0104] In some embodiments, the homomorphic encryption complexity is calculated by the following formula:

[0105] C enc =α·(log2q) 2 +β·(Operations HE )

[0106] Among them, q is the order of the elliptic curve. The larger the order, the higher the computational complexity. α and β are adjustment factors used to reflect the characteristics of different encryption algorithms. Operations HE is the typical number of operations in homomorphic encryption.

[0107] In some embodiments, the memory consumption M is calculated by the following formula:

[0108] M=γ·Size data +δ·C enc

[0109] Among them, Size data is the size of the fragment data, usually in bytes; C enc is the encryption complexity; γ and δ 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] Among them, P node It is the performance of the computing node (also known as the comprehensive performance of the computing node).

[0113] Compute node performance P node It is broken down based on CPU, memory and JVM tuning parameters. The formula is as follows:

[0114] P node =w CPU ·P CPU +w Memory ·P Memory +w JVM ·P JVM

[0115] Where P CPU: CPU performance indicators (such as the number of cores and clock frequency).

[0116] P Memory : Memory performance indicators (including memory size, new generation and old generation configuration).

[0117] P JVM :The impact of JVM tuning parameters (such as garbage collection mechanism, ratio of new generation to old generation, etc.).

[0118] w CPU ,w Memory ,w JVM : It is the weight coefficient, which is used to balance the influence of CPU, memory, and JVM tuning parameters on the overall node performance.

[0119] In some embodiments, the calculation factor is determined according to the characteristics of each data shard and the current load conditions of each computing node in the above S102. The current load conditions of each computing node can be obtained based on a preset period, and the calculation factor is determined according to the characteristics of each data shard and the current load conditions of each computing node.

[0120] In some embodiments, the priority of each node is determined in S103, and the computing task is allocated according to the priority in S104, which can be selected from a plurality of computing nodes by the following formula, and the computing task is allocated to the target node:

[0121]

[0122] Among them, P node The computing power of the node, L node The current load of the node.

[0123] By calculating the available resources of each node, it ensures that tasks are allocated to nodes with low load and high performance.

[0124] The server implements 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 status of each node, dynamically adjusts the calculation factor, and reasonably allocates computing tasks to nodes with lower loads. If the resources of a node are close to saturation, the system will automatically trigger the task migration mechanism and transfer the task to other nodes to ensure overall load balance.

[0125] In some embodiments, the above method may further include: Figure 3 S301-S302.

[0126] In S301, during the process of the computing node executing the computing task, if the current resource usage of the computing node meets the migration triggering condition, the task amount to be migrated is determined according to the available resources of the computing node and the overall performance of the computing node;

[0127] In S302, the computing tasks corresponding to the migrated task volume are migrated to other computing nodes.

[0128] Regardless of the node performance differences or system load fluctuations, the embodiments of the present disclosure can flexibly respond to different computing environments by dynamically adjusting the calculation factors and migration mechanisms, ensuring that the system always runs in the best state.

[0129] In some embodiments, when the resources of a node are close to saturation (such as memory usage or CPU utilization exceeding a certain threshold), the system will trigger the task migration mechanism to transfer some shard tasks to other nodes with lighter loads. The task migration amount is calculated using the following formula:

[0130]

[0131] In this formula, F′ represents the share of tasks that need to be migrated, R available is the available resources of the target node. By evaluating the resource usage and available resources of the current node, the system can decide how many tasks to migrate to other nodes to ensure the load balance and computing efficiency of the overall system.

[0132] Figure 4 The process of the homomorphic encryption computing task allocation method disclosed in the present invention is shown as follows: Figure 4 As shown, the server shards the original data to obtain multiple data shards, and then constructs computing tasks for the multiple data shards. Each computing task can be a computing process for homomorphically encrypting the data in a data shard. Figure 5 As shown, the computing tasks can be allocated to the computing nodes based on the method of the above embodiment, and Figure 3 In some embodiments, task migration is performed. Figure 4 As shown, after the computing node executes the computing task to encrypt the data shards, the encrypted data is stored in the distributed file system.

[0133] The disclosed embodiment dynamically adjusts the distribution of sharding tasks through calculation factors, optimizes the load and performance of different nodes, and significantly improves 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 made more efficient and the computing resources are reduced; combined with the task migration mechanism, the load balancing of the computing nodes is guaranteed to avoid single-point overload.

[0134] The following is a detailed description of the method of the embodiment of the present disclosure through a specific scenario. The server stores 1.4 billion pieces of user data and uses homomorphic encryption to protect the privacy of this data. The client needs to query this data, and the system ensures efficient computing and load balancing through sharding and task scheduling. Figure 6 As shown, this embodiment mainly includes S601-S604.

[0135] In S601, initialization. The server and client are first initialized to determine the basic parameters of the system. Elliptic curve: FourQ elliptic curve is selected as the basis of homomorphic encryption. Computing node: The system includes N computing nodes, and the computing power and current load of each node are known.

[0136] In S602, data segmentation is performed.

[0137] The server sets the initial shard size based on the system performance parameters. The server divides the 1.4 billion data into reasonable shards. Assuming that each shard contains M data, the total number of shards is S (rounded up);

[0138] The server divides the data into Each piece of data will be encrypted and stored in a distributed file system.

[0139] In S603, dynamic adjustment of the calculation factor is performed.

[0140] After 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 resource allocation. The calculation formula of the calculation factor is:

[0141] F=w1·C enc +w2·M+w3·T

[0142] At this time, the system will regularly (such as every 10 seconds) monitor the load of each node and dynamically adjust the allocation strategy of the sharding tasks according to the available resources of each node.

[0143] In S604, encryption computing tasks are allocated.

[0144] Based on the adjusted calculation factor, the system distributes the encryption calculation tasks to each computing node. The system distributes the tasks to nodes with low load and high performance according to the available resources, calculation factor and current load of each node, using the following formula:

[0145]

[0146] In this step, the computing power P of the node node and the current load L nodeIt will be used to dynamically select the best node to ensure load balancing of the system.

[0147] In some embodiments, the above method may also include a task migration mechanism. During the execution of the encryption computing task, if the resources of a certain node are close to saturation (for example, the memory usage or CPU utilization exceeds the set threshold), the system will trigger the task migration mechanism. The triggering formula for task migration is as follows:

[0148]

[0149] Once task migration is triggered, the system will migrate tasks based on the current node load and available resources. available Determine the amount of tasks to migrate migrate . It can ensure that the system still maintains efficient computing performance under high load environment.

[0150] In some embodiments, when the client needs to query encrypted data, it first generates a query request, segments the request data (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 uses its private key to decrypt the data to obtain the required information.

[0151] The disclosed embodiments achieve efficient computing and resource utilization in a high-load environment through dynamic adjustment of computing factors and task migration mechanism, ensuring the performance and security of the system when processing large-scale homomorphic encrypted data.

[0152] In the related art, when processing a scenario such as 1.4 billion pieces of data, the storage and computing pressure of a single node is very high, which easily leads to resource bottlenecks. The disclosed embodiment significantly reduces the storage and computing burden of a single node by sharding the data and utilizing the computing power of multiple nodes. The multi-node sharding computing method effectively disperses the load, avoids excessive resource consumption, and improves the overall performance of the system.

[0153] By dynamically adjusting task allocation, the disclosed embodiment 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 to ensure efficient use of resources. This adaptive allocation mechanism greatly improves computing efficiency, especially in high concurrency and large data volume environments, and can effectively avoid computing delays and performance bottlenecks, ensuring efficient operation of the system.

[0154] In the embodiments of the present disclosure, the terms “first”, “second” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0155] The term "and / or" in this disclosure is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0156] Furthermore, although the steps of the method in the present disclosure are described in a particular order in the drawings, this does not require or imply that the steps must be performed in this particular order or that all the steps shown must be performed to achieve the desired results.

[0157] In some embodiments, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0158] Based on the same inventive concept, the present disclosure also provides a homomorphic encryption computing task allocation device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0159] Figure 7 A schematic diagram of a homomorphic encryption computing task allocation device in an embodiment of the present disclosure is shown. Figure 7 As shown, the homomorphic encryption computing task allocation device includes a sharding module 701, a factor calculation module 702, a priority determination module 703 and a task allocation module 704.

[0160] Slicing module 701, used to divide the original data into multiple data slices;

[0161] The factor calculation module 702 is used to determine the calculation factor according to the characteristics of each data shard and the current load of each computing node, and the calculation factor reflects the complexity of the homomorphic encryption calculation task;

[0162] The priority determination module 703 is used to determine the priority of each computing node according to the computing factor, computing power and current load corresponding to each computing node in the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node;

[0163] The task allocation module 704 is used to allocate computing tasks according to the priority of each computing node, and the computing tasks are used to perform homomorphic encryption calculations on data shards.

[0164] In some embodiments, the homomorphic encryption computing task allocation device also includes a performance calculation module.

[0165] The performance calculation module is used to determine the number of computing nodes; obtain the computing performance, memory performance and JVM performance of each computing node respectively; and determine the overall performance of each computing node based on the computing performance, memory performance and JVM performance of the computing node;

[0166] The sharding module 701 is used to determine the sharding size based on the overall performance of each computing node; based on the sharding size, the original data is sharded to obtain multiple data shards.

[0167] In some embodiments, the factor calculation module 702 is used to determine the complexity of homomorphic encryption based on the order of the homomorphic encryption elliptic curve and the typical number of operations in 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; determine the calculation factor based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter.

[0168] In some embodiments, based on the shard size and homomorphic encryption complexity, a memory consumption parameter is determined, including: multiplying the shard size and the homomorphic encryption complexity by their respective weight coefficients and summing up the results to obtain the memory consumption parameter; based on the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter, a calculation factor is determined, including: multiplying the homomorphic encryption complexity, the memory consumption parameter and the time consumption parameter by their respective weight coefficients and summing up the results to obtain the calculation factor.

[0169] In some embodiments, the factor calculation module 702 is used to obtain the current load status of each computing node based on a preset period, and determine the calculation factor according to the characteristics of each data shard and the current load status of each computing node.

[0170] In some embodiments, the homomorphic encryption computing task allocation device also includes a task migration module.

[0171] The task migration module is used to determine the amount of tasks to be migrated based on the available resources and overall performance of the computing node during the execution of computing tasks by the computing node. If the current resource usage of the computing node meets the migration trigger conditions, the computing tasks corresponding to the migrated task amount will be migrated to other computing nodes.

[0172] In some embodiments, the homomorphic encryption computing task allocation device also includes a storage module.

[0173] The storage module is used to encrypt the data slices after the computing node executes the computing task and store the encrypted data in the distributed file system.

[0174] The concepts of “first”, “second”, etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0175] Regarding the homomorphic encryption computing task allocation device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the homomorphic encryption computing task allocation method, and will not be elaborated 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 multiple modules or units to be embodied.

[0178] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0179] Refer to the following Figure 8 To describe the electronic device provided by the embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0180] Figure 8 FIG. 8 is a schematic diagram showing the architecture of an electronic device 800 provided by an embodiment of the present disclosure. Figure 8 As 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 used to store instructions.

[0182] In some embodiments, the memory 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0183] In some embodiments, the memory 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 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.

[0184] In some embodiments, the memory 820 may store an operating system, which may be a real-time operating system (RTX), LINUX, UNIX, WINDOWS, or OS X.

[0185] In some embodiments, data may also be stored in the memory 820 .

[0186] As an example, the processor 810 may read data stored in the memory 820 , where the data may be stored at the same storage address as the instruction, or the data may be stored at a different storage address than the instruction.

[0187] The processor 810 is used to call the instructions stored in the memory 820 to implement the steps described in the "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processor 810 can execute the steps of the above-mentioned homomorphic encryption computing task allocation method embodiment.

[0188] It should be noted that the processor 810 may be a general-purpose processor or a special-purpose processor. The processor 810 may include one or more processing cores, and the processor 810 executes various functional applications and data processing by running instructions.

[0189] In some embodiments, the processor 810 may include a central processing unit (CPU) and / or a baseband processor.

[0190] In some embodiments, the processor 810 may determine an instruction according to the priority identifier and / or function category information carried in each control instruction.

[0191] In the present disclosure, the processor 810 and the memory 820 may be provided separately or integrated together.

[0192] As an example, the processor 810 and the memory 820 may be integrated on a single board or a system on chip (SOC).

[0193] like 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] Bus 830 may be a bus representing 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., keyboards, pointing devices, Bluetooth devices, 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., routers, modems, 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 figure, other hardware and / or software modules can 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 may be implemented in hardware, software or a combination of software and hardware.

[0200] The present disclosure also provides a computer-readable storage medium on which computer instructions are stored. 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 one example, computer readable storage media are non-volatile storage media.

[0203] In some embodiments, more specific examples of computer-readable storage media in the present disclosure may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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, a USB flash drive, a mobile hard disk, or any suitable combination of the foregoing.

[0204] In the embodiments of the present disclosure, the computer-readable storage medium may include a data signal propagated in a baseband or as a part of a carrier wave, in which computer instructions (readable program codes) are carried.

[0205] Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.

[0206] In some examples, computing instructions contained on a computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0207] The present disclosure also provides 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 may be program codes. In specific implementation, the program codes may be written in any combination of one or more programming languages.

[0209] The programming language includes object-oriented programming languages, such as Java, C++, etc., and also includes conventional procedural programming languages, such as "C" language or similar programming languages.

[0210] The program code may execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0211] Where a remote computing device is involved, 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).

[0212] The embodiment of the present disclosure also provides a chip, including at least one processor and an interface;

[0213] An interface for providing program instructions or data to at least one processor;

[0214] At least one processor is used to execute program instructions to implement the homomorphic encryption computing task allocation method described in the above method embodiment.

[0215] In some embodiments, the chip may further include a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0216] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be 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 implementations, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0217] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein.

[0218] The present disclosure is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for allocating homomorphic encryption computing tasks, characterized in that: include: Divide the original data into multiple data shards; Determine a calculation factor based on the characteristics of each data shard and the current load of each computing node, where the calculation factor reflects the complexity of the homomorphic encryption computing task; Determine the priority of each computing node according to the computing factor, computing power and current load corresponding to each computing node in the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node; Computing tasks are allocated according to the priority of each computing node, and the computing tasks are used to perform homomorphic encryption calculations on the data shards.

2. The method according to claim 1, characterized in that The method further comprises: Determine the number of computing nodes; Obtain the computing performance, memory performance, and JVM performance of each computing node respectively; Determine the overall performance of each computing node based on the computing performance, memory performance, and JVM performance of the computing node; The dividing the original data into a plurality of data slices comprises: determining a slice size based on the overall performance of each computing node; and slice the original data based on the slice size to obtain a plurality of data slices.

3. The method according to claim 1, characterized in that Determining the calculation factor according to the characteristics of each data shard and the current load of each computing node includes: Determine the complexity of homomorphic encryption based on the order of the homomorphic encryption elliptic curve and the typical number of operations in homomorphic encryption; Determining a memory consumption parameter based on the shard size and the homomorphic encryption complexity; Determining a time consumption parameter based on a ratio of the homomorphic encryption complexity to the overall performance of each computing node; A calculation factor is determined based on the homomorphic encryption complexity, the memory consumption parameter, and the time consumption parameter.

4. The method according to claim 3, characterized in that The determining of 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 their respective weight coefficients and summing the results to obtain the memory consumption parameter; The determining of the calculation 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 with their respective weight coefficients and then summing them to obtain the calculation factor.

5. The method according to any one of claims 1 to 4, characterized in that: Determining the calculation factor according to the characteristics of each data shard and the current load of each computing node includes: The current load condition of each computing node is obtained based on a preset period, and the calculation factor is determined according to the characteristics of each data shard and the current load condition of each computing node.

6. The method according to claim 1, characterized in that The method further comprises: During the process of executing computing tasks on the computing node, if the current resource usage of the computing node meets the migration triggering condition, the amount of the task to be migrated is determined according to the available resources of the computing node and the overall performance of the computing node; Migrate the computing tasks corresponding to the migrated task volume to other computing nodes.

7. The method according to claim 1, characterized in that The method further comprises: After the computing node executes the computing task to encrypt the data slices, the encrypted data is stored in the distributed file system.

8. A homomorphic encryption computing task allocation device, characterized in that: include: Sharding module, used to divide the original data into multiple data shards; A factor calculation module is used to determine the calculation factor according to the characteristics of each data shard and the current load of each computing node. The calculation factor reflects the complexity of the homomorphic encryption calculation task; A priority determination module, used to determine the priority of each computing node according to the computing factor, computing power and current load corresponding to each computing node among the multiple computing nodes; wherein the size of the computing factor is negatively correlated with the priority of the computing node, and the difference between the computing power and the current load is positively correlated with the priority of the computing node; A task allocation module is used to allocate computing tasks according to the priority of each computing node, and the computing tasks are used to perform homomorphic encryption calculations on data shards.

9. An electronic device, characterized in that: include: A memory for storing instructions; A processor is used to call the instructions stored in the memory to implement the homomorphic encryption computing task allocation method as described in any one of claims 1-7.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by the processor, the homomorphic encryption computing task allocation method described in any one of claims 1-7 is implemented.

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

  • Payment data security protection system using encryption technology

    CN119168641A

  • Mapping method and system for performing homomorphic ciphertext computation in processing-in-memory

    WO2024117318A1

Cited By

  • Large file distribution method and device, equipment, medium and product

    CN120935160A