Data shuffle method, device, equipment and cluster
By managing node partitioning and computing node data storage strategies, the problem of low shuffle efficiency in the data analysis system is solved, thereby improving data analysis efficiency and system performance.
Patent Information
- Application Number
- CN202410764426.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2025-12-16
AI Technical Summary
The limited hardware performance of current data analysis systems results in low data shuffle efficiency, which affects data analysis efficiency.
In the data analysis system, the management node obtains the data volume of each computing node and partitions it according to the shuffle strategy. The computing node writes its own partition data directly into the memory space instead of writing it to the disk, and writes the partition data of other computing nodes to the disk for transmission, reducing disk writes and redundant data transmission.
It improves the efficiency of data shuffle, reduces disk write and read times, and enhances the overall performance of the data analysis system.
Smart Images

Figure CN121144409A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a data shuffle method, apparatus, device and cluster. Background Technology
[0002] Currently, data shuffling is a fundamental core operation in data analysis. Data shuffling can repartition data across different computing nodes in a data analysis system, allowing data with the same key on different computing nodes to be assigned to the same data partition, thereby integrating and classifying the data across different computing nodes.
[0003] However, due to the limited hardware performance of current data analysis systems, the data shuffle efficiency is low, severely impacting the efficiency of data analysis. Therefore, improving the data shuffle efficiency of data analysis systems has become an urgent technical problem to be solved. Summary of the Invention
[0004] This application provides a data shuffle method, apparatus, device, and cluster that can effectively improve data shuffle efficiency.
[0005] Firstly, a data shuffle method is provided, applied to a computing cluster, which includes multiple computing nodes and a management node. The method includes: the management node acquiring the data volume of each computing node among the multiple computing nodes, and partitioning multiple data points of the multiple computing nodes according to a shuffle strategy and the data volume of each computing node, obtaining partitioned data for each computing node; the management node sending partition information to a first computing node, the partition information indicating the partitioned data of the first computing node; the first computing node being any one of the multiple computing nodes; the first computing node determining, within its first memory space, a first group of partitioned data belonging to the first computing node and a second group of partitioned data not belonging to the first computing node; the first computing node writing the first group of partitioned data from its first memory space into its second memory space; the second memory space storing the partitioned data of the first computing node; and the first computing node writing the second group of partitioned data from its first memory space into its first disk, and transmitting the second group of partitioned data from the first disk to non-first computing nodes.
[0006] In the aforementioned shuffle scheme, when shuffling multiple data points across multiple compute nodes is required, the management node obtains the data volume of each compute node and partitions the data across multiple compute nodes according to the shuffle strategy and the data of each compute node, resulting in partitioned data for each compute node. Then, the management node sends partition information to each compute node (e.g., the first compute node) to indicate the partitioned data for each compute node. Upon receiving the partition information, each compute node determines, based on the partition information, the first group of partitioned data belonging to its own compute node and the second group of partitioned data not belonging to its own compute node within the first memory space. Then, the first group of partitioned data belonging to its own compute node is directly written to the second memory space of its own compute node, while the second group of partitioned data belonging to other compute nodes is written to the first disk for transfer from the first disk to other compute nodes.
[0007] Because each compute node directly writes its own partition data into its own memory space (e.g., a second memory space), a portion of each compute node's data is no longer written to its local disk. This reduces the amount of data written to the local disk by each compute node, improving disk write efficiency and consequently data shuffle efficiency. Furthermore, since data belonging to each compute node is not written to its local disk, there is no need to write data from the local disk to the local memory of each compute node. This avoids redundant data transfer between the local disk and local memory of each compute node, reducing the amount of data that needs to be distributed to different data partitions on the local disk of each compute node. This improves disk read efficiency and consequently data shuffle efficiency, preventing data shuffle operations from impacting data analysis efficiency.
[0008] In one possible design, the first and second memory spaces reside within the memory of the Trusted Execution Environment (TEE) of the first compute node. This allows the above scheme to be implemented within the TEE, enabling the shuffling of encrypted data.
[0009] In another possible design, the first and second memory spaces reside within the memory of the rich execution environment (REE) of the first compute node. This allows the above scheme to be implemented within the REE, enabling the shuffling of plaintext data.
[0010] In another possible design, the data type of multiple data is key-value data. The method further includes: the first computing node grouping the keys of each data in the first computing node to obtain each group of the first computing node; the management node obtaining the data volume of each computing node in the multiple computing nodes, and partitioning the multiple data of the multiple computing nodes according to the shuffle strategy and the data volume of each computing node, including: the management node obtaining the data volume of each group of each computing node to obtain the data volume of multiple groups of the multiple computing nodes; the management node partitioning the multiple groups of the multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of the multiple computing nodes.
[0011] In this design, when the management node needs to partition multiple data points across multiple compute nodes, it obtains the data volume of each group on each compute node, thus generating the data volume of multiple groups across multiple compute nodes. Then, based on the shuffle strategy and the number of groups, the multiple groups are partitioned. Since identical keys on different compute nodes belong to the same group, and some different keys also belong to the same group, the number of groups is less than the number of keys. Based on this, since the number of groups on each compute node is less than the number of keys, the number of elements requiring partitioning on each compute node is reduced, thereby reducing the number of elements requiring partitioning across multiple compute nodes. This improves the efficiency of partition determination, and consequently, the efficiency of partitioning multiple data points across multiple compute nodes.
[0012] Furthermore, since partitioning is determined at the group level, the same group on different computing nodes belongs to the same partition. Combined with the fact that each computing node assigns the same key to the same group, partitioning at the group level ensures that data with the same key on multiple computing nodes all belong to the same partition, thus helping to ensure the reliability and accuracy of subsequent data analysis processes.
[0013] In another possible design, the first computing node groups the keys of each piece of data within the first computing node, including: the first computing node determining the hash value of the key for each piece of data; the first computing node taking the remainder of the hash value of the key for each piece of data with respect to a target value, obtaining the remainder corresponding to the key of each piece of data; wherein, the target value is the number of groups; the first computing node groups the remainders corresponding to the keys of each piece of data; keys with the same remainder belong to the same group. This helps ensure the accuracy of the determined groupings.
[0014] In another possible design, the first computing node groups the keys of each piece of data on the first computing node, including: the first computing node groups the keys of each piece of data on the first computing node according to multiple key group information; wherein, a key group information is used to indicate at least one key included in a group. This helps to improve the diversity of ways to determine the grouping.
[0015] In another possible design, the target group among multiple groups is the partition data of the first compute node; the data volume of the target group on the first compute node is greater than or equal to the data volume of the target group on non-first compute nodes. This helps to reduce the amount of cross-node transmission, thereby improving shuffle efficiency.
[0016] In another possible design, the management node partitions multiple groups across multiple compute nodes based on the shuffle strategy and the data volume of multiple groups on multiple compute nodes. This includes: the management node determining the group associated with each compute node from the multiple groups; wherein the data volume of the target group associated with the first compute node on the first compute node is greater than or equal to the data volume of the target group on non-first compute nodes; the management node polls the allocated partition data for each compute node from the groups associated with each compute node; wherein, in each round of polling, if the allocated data volume of the first compute node is less than or equal to the allocated data volume of non-first compute nodes, partition data is allocated to the first compute node from the groups associated with the first compute node. This helps to balance the data volume across different compute nodes.
[0017] In another possible design, during each round of polling, the method further includes: if the management node has already assigned a compute node to the group associated with the first compute node, it allocates partitioned data to the first compute node from the groups not associated with the first compute node. This helps to balance the amount of data on different compute nodes.
[0018] In another possible design, the management node partitions multiple groups across multiple compute nodes based on the shuffle strategy and the data volume of multiple groups across multiple compute nodes. This includes: the management node allocating partitioned data to each compute node from multiple groups; and ensuring that the data volume of the target group allocated to the first compute node on the first compute node is greater than or equal to the data volume of the target group on non-first compute nodes. This helps to provide diversity in determining the shuffle strategy.
[0019] In another possible design, the data type of the multiple data is not key-value data. The method further includes: the first computing node grouping each data of the first computing node to obtain each group of the first computing node; the management node obtaining the data volume of each computing node in the multiple computing nodes, and partitioning the multiple data of the multiple computing nodes according to the shuffle strategy and the data volume of each computing node, including: the management node obtaining the data volume of each group of each computing node to obtain the data volume of multiple groups of the multiple computing nodes; the management node partitioning the multiple groups of the multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of the multiple computing nodes.
[0020] In another possible design, the first compute node groups each piece of data of the first compute node, including: the first compute node takes the data of each partition of the first compute node as each group of the first compute node.
[0021] In another possible design, the first computing node groups each piece of data of the first computing node, including: the first computing node determining the key of each piece of data of the first computing node; the first computing node grouping the keys of each piece of data of the first computing node; wherein some different keys belong to the same group.
[0022] In another possible design, the first computing node groups each piece of data, including: the first computing node determines the hash value of each piece of data; the first computing node takes the remainder of the hash value of each piece of data modulo a target value to obtain the remainder corresponding to each piece of data; wherein, the target value is the number of groups; the first computing node groups the remainders corresponding to each piece of data; data with the same remainder belong to the same group, and data with different remainders belong to the same group.
[0023] In a second aspect, a data shuffle apparatus is provided, comprising: functional units for performing any of the methods provided in the first aspect, wherein the actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software. For example, the data shuffle device may include: a partitioning module, a writing module, and a transmission module; the partitioning module is used to obtain data volume information of multiple computing nodes, and partition multiple data of multiple computing nodes according to the shuffle strategy and the data volume information of multiple computing nodes to obtain partition data of each computing node; the partitioning module is also used to send partition information to a first computing node, the partition information being used to indicate the partition data of the first computing node; the first computing node is any one of the multiple computing nodes; the writing module is used to determine the first group of partition data belonging to the first computing node and the second group of partition data not belonging to the first computing node in the first memory space of the first computing node; the writing module is used to write the first group of partition data in the first memory space of the first computing node to the second memory space of the first computing node; the second memory space is used to store the partition data of the first computing node; the writing module is used to write the second group of partition data in the first memory space of the first computing node to the first disk of the first computing node; the transmission module is used to transmit the second group of partition data in the first disk to non-first computing nodes.
[0024] Thirdly, a computing cluster is provided, comprising multiple computing nodes and a management node. The management node is used to obtain the data volume of each computing node among the multiple computing nodes, and partition the data of the multiple computing nodes according to the shuffle strategy and the data volume of each computing node, obtaining partitioned data for each computing node; the management node is also used to send partition information to a first computing node, the partition information indicating the partitioned data of the first computing node; the first computing node is any one of the multiple computing nodes; the first computing node is also used to determine, within the data of the first computing node's first memory space, a first group of partitioned data belonging to the first computing node and a second group of partitioned data not belonging to the first computing node; the first computing node is also used to write the first group of partitioned data from the first computing node's first memory space into the second memory space of the first computing node; the second memory space is used to store the partitioned data of the first computing node; the first computing node is also used to write the second group of partitioned data from the first computing node's first memory space into the first disk of the first computing node, and transfer the second group of partitioned data from the first disk to non-first computing nodes.
[0025] In the third aspect, the management node can also be used to execute the steps performed by the management node in the first aspect above, and the first computing node can also be used to execute the steps performed by the first computing node in the first aspect above, which will not be elaborated here.
[0026] Fourthly, a processor is provided that can be used to perform the steps of any of the methods provided in the first aspect above.
[0027] Fifthly, a chip is provided, comprising: a processor and a power supply circuit; the power supply circuit can be used to supply power to the chip; the processor can be used to execute the operation steps of any of the methods provided in the first aspect above.
[0028] A sixth aspect provides a computing device, comprising: a processor, a memory, and a computer program / instructions stored in the memory; the processor executes the computer program to cause the computing device to perform the steps of any of the methods provided in the first aspect.
[0029] A seventh aspect provides a computing device cluster, comprising: at least one computing device, each computing device including a processor and a memory; each computing device including a processor, a memory, and computer programs / instructions stored in the memory; the processor executing the computer programs / instructions to cause the computing device cluster to implement the steps of any of the methods provided in the first aspect, or to implement the steps of any of the methods provided in the third aspect.
[0030] Eighthly, a computer program product including instructions is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of any of the methods provided in the first aspect above.
[0031] In a ninth aspect, a computer-readable storage medium is provided, on which a computer program / instructions are stored, which, when executed by a processor, implement the steps of any of the methods provided in the first aspect above.
[0032] The technical effects of any of the implementation methods in aspects two through nine can be seen in the technical effects of different designs in aspect one above, and will not be repeated here. Attached Figure Description
[0033] Figure 1 A schematic diagram illustrating data shuffling in the related technologies provided in this application;
[0034] Figure 2 An architecture diagram of a data analysis system provided in this application;
[0035] Figure 3A schematic diagram of the modules of a target software program provided in this application;
[0036] Figure 4 A flowchart of a data shuffling method provided in this application;
[0037] Figure 5 A schematic diagram illustrating a data shuffling method provided in this application;
[0038] Figure 6 A schematic diagram of a data shuffling device provided in this application;
[0039] Figure 7 A schematic diagram of a computing device provided in this application;
[0040] Figure 8 A schematic diagram of the computing device cluster provided in this application;
[0041] Figure 9 This is a schematic diagram of the connection of a computing device cluster provided in this application. Detailed Implementation
[0042] To facilitate understanding, a brief introduction to the relevant terms used in this application will be provided first.
[0043] Rich execution environment (REE): Also known as ordinary execution environment, it refers to the environment in which an operating system (OS) runs. REE is an open environment that is vulnerable to attacks.
[0044] In this application, the data analysis system running in the REE can be used to analyze plaintext data.
[0045] A Trusted Execution Environment (TEE) is a hardware-supported, secure, and isolated environment that can coexist with an REE. Data within the TEE is isolated from the outside world; code outside the TEE cannot read or tamper with the data within it. Based on this, plaintext computations can be performed on encrypted data within the TEE, thus processing the encrypted data.
[0046] In this application, the data analysis system running in the TEE can be used to analyze encrypted data.
[0047] Data partitioning, also known simply as partitioning, refers to a group of data that shares the same attributes. For example, daily temperature data for January could form one data partition, and daily rainfall data for February could form another.
[0048] In this application, for ease of description, the data partition before shuffle is referred to as the old partition or old data partition, and the data partition obtained after shuffle is referred to as the new partition or new data partition.
[0049] The technical solution provided in this application will be described in detail below with reference to the accompanying drawings.
[0050] Currently, data shuffle operations are a fundamental core operation in data analysis. Data shuffle operations can repartition data on different computing nodes of a data analysis system, so that data with the same key on different computing nodes can be assigned to the same data partition.
[0051] For example, such as Figure 1 As shown, the data analysis system includes computing node a and computing node b. Computing node a includes memory a and hard disk a, and computing node b includes memory b and hard disk b. Memory space a1 of memory a stores data a1 and data a2, and memory space b1 of memory b stores data b1 and data b2.
[0052] When the data analysis system performs a shuffle operation on data a1, a2, b1, and b2, it first determines the partitioning strategy based on the key of each data item in data a1, a2, b1, and b2. Since the keys of data a1 and b1 are the same, and the keys of data a2 and b2 are the same, the partitioning strategy indicates that data a1 and b1 belong to new partition a and compute node a, while data a2 and b2 belong to new partition b and compute node b. Specifically, memory space a2 in memory a is used to store data in new partition a, and memory space b2 in memory b is used to store data in new partition b.
[0053] Subsequently, based on the partitioning strategy, compute node a writes data a1 and data a2 from memory space a1 to disk a, writes data a1 from disk a to memory space a2, and sends data a2 from disk a to compute node b, which then writes data a2 to memory space b2. Compute node b writes data b1 and data b2 from memory space b1 to disk b, writes data b2 from disk b to memory space b2, and sends data b1 from disk b to compute node 1, which then writes it to memory space a2.
[0054] However, the limited hardware performance of current data analysis systems results in low data shuffle efficiency, severely impacting the overall efficiency of data analysis. Therefore, improving data shuffling efficiency has become a pressing technical problem that needs to be solved.
[0055] In view of this, this application provides a data shuffling method applied to a computing cluster. The computing nodes include multiple computing nodes. When it is necessary to shuffle multiple data on multiple computing nodes, the management node obtains the data volume of each computing node and partitions the multiple data on multiple computing nodes according to the shuffle strategy and the data of each computing node, obtaining the partition data of each computing node. Then, the management node sends partition information to each computing node to indicate the partition data of each computing node. After receiving the partition information, each computing node determines the first group of partition data belonging to its own computing node and the second group of partition data not belonging to its own computing node in the first memory space according to the partition information. Then, the first group of partition data belonging to its own computing node is directly written into the second memory space of its own computing node, and the second group of partition data belonging to other computing nodes is written into the first disk for transfer from the first disk to other computing nodes.
[0056] Because each compute node directly writes its own partition data into its own memory space (e.g., a second memory space), a portion of each compute node's data is no longer written to its local disk. This reduces the amount of data written to the local disk by each compute node, improving disk write efficiency and consequently data shuffle efficiency. Furthermore, since data belonging to each compute node is not written to its local disk, there is no need to write data from the local disk to the local memory of each compute node. This avoids redundant data transfer between the local disk and local memory of each compute node, reducing the amount of data that needs to be distributed to different data partitions on the local disk of each compute node. This improves disk read efficiency and consequently data shuffle efficiency, preventing data shuffle operations from impacting data analysis efficiency.
[0057] Next, the system architecture involved in the technical solution provided in this application will be further described in conjunction with the accompanying drawings.
[0058] In terms of hardware, this application provides a data analysis system that can be used to execute the above-mentioned data shuffling method, thereby improving data shuffle efficiency without increasing hardware costs, avoiding the impact of data shuffle operations on data analysis efficiency, and thus improving the overall performance of the data analysis system.
[0059] It should be noted that this application does not restrict the name of the data analysis system; for example, a data analysis system can also be called a computing cluster.
[0060] In this application, the data analysis system may include multiple computing nodes. These computing nodes can communicate with each other, and each computing node performs computing tasks. For example, the computing tasks may include data analysis tasks such as data encryption, data decryption, data sorting, data aggregation, and data shuffling.
[0061] It should be noted that in this application, "multiple" refers to two or more, which will not be elaborated further.
[0062] In addition, the data analysis system may also include a management node, which is used to perform resource scheduling tasks and manage computing tasks.
[0063] For example, resource scheduling tasks may include determining the number of data partitions, etc. Managing computing tasks may include monitoring the execution status of computing tasks on each computing node, etc.
[0064] In one example, the management node can be any one of the multiple compute nodes. In another example, the management node can be a compute device other than the multiple compute nodes. When the management node is a compute device other than the multiple compute nodes, the management node can communicate with each of the multiple compute nodes.
[0065] The following example illustrates this application by taking a computing device other than multiple computing nodes as the management node.
[0066] In this application, the management node can be used to determine the partitioning strategy for shuffle operations, such as determining the partition data for each compute node. The compute nodes can be used to directly write the partition data belonging to their own compute node into their own memory space, determine groupings, etc.
[0067] It should be noted that the operation of determining the partitioning strategy performed by the management node can also be performed by the compute node, and this application does not impose any restrictions on this. The following example illustrates this application by showing that the operation of determining the partitioning strategy is performed by the management node.
[0068] It should be noted that the relationship between the management node and multiple computing nodes can be considered as a cluster relationship or a distributed computing cluster, etc.
[0069] In this application, the data analysis system can provide a REE (Resource Equivalent to a Data Shuffling Element). Based on this, the data analysis system can execute the data shuffling method provided in this application within the REE, so as to perform data shuffling operations on plaintext data.
[0070] For example, the management node and each compute node can provide a REE (Resource Equivalent to a Data Buffer). A data shuffle method can be executed within the REEs provided by the management node and each compute node. Based on this, the processor of the management node and the processor of each compute node can include a first processing unit, which can be used to provide the REE. Furthermore, each compute node can include a first memory, which can be used to store data in the REE provided by each compute node, such as plaintext data to be shuffled. The management node can include a third memory, which can be used to store data in the REE provided by the management node, such as partitioning strategies for the plaintext data to be shuffled.
[0071] The first memory of each computing node and the third memory of the management node can be referred to as REE memory, which will not be elaborated further.
[0072] In this application, the data analysis system can provide a TEE (Transaction Execution Environment). Based on this, the data analysis system can execute the data shuffling method provided in this application within the TEE, so as to perform data shuffling operations on encrypted data.
[0073] For example, the management node and each compute node can provide a TEE (Transportation Equipment). The data shuffle method can be executed within the TEE provided by the management node and each compute node. Based on this, the processor of the management node and the processor of each compute node can also include a second processing unit, which can be used to provide the REE. For example, the second processing unit can include ARM TrustZone, CCA, etc.
[0074] It should be noted that this application does not limit the type of the second processing unit; the above is merely an illustrative example.
[0075] Building upon this, each compute node may include a second memory, which can be used to store data from the TEE provided by each compute node, such as ciphertext data for the shuffling operation. The management node may include a fourth memory, which can be used to store data from the TEE provided by the management node, such as the partitioning strategy for the ciphertext data for the shuffling operation.
[0076] The second memory of each compute node and the fourth memory of the management node can be referred to as TEE memory, which will not be elaborated further.
[0077] It should be noted that the type, model, storage capacity, and other parameters of the first memory, second memory, third memory, and fourth memory can be the same or different, and this application does not impose any restrictions on this.
[0078] It should be noted that this application does not restrict the way the management node and each compute node provide REE and TEE.
[0079] Optionally, each compute node may also include a disk. The disk of each compute node may store the shuffle file for that compute node, and each compute node's shuffle file may include data to be transferred from that compute node. For example, the data to be transferred may be partition data from other compute nodes.
[0080] For example, the disk can be a solid state disk / drive (SSD), a hard disk drive (HDD), a hybrid hard disk (HHD), etc.
[0081] It should be noted that this application does not limit the type of disk; the above is merely an illustrative example.
[0082] In this application, the computing node can be a computing device, which can be used to perform computing tasks.
[0083] Alternatively, the computing device can be a terminal device or a network device.
[0084] Terminal devices may include ultra-mobile personal computers (UMPCs), laptops, netbooks, desktop computers, all-in-one computers, etc.
[0085] It should be noted that this application does not limit the device form of the terminal device; the above is merely an illustrative example.
[0086] Network devices can include servers. A server can be a single physical server, or two or more physical servers that share different responsibilities and work together to achieve the various functions of the server. For example, a server can be a blade server, a high-density server, a rack server, or a tower server.
[0087] It should be noted that this application does not limit the form factor of the network device; the above is merely an illustrative example.
[0088] In this application, the management node can also be a computing device, which can be used to perform resource scheduling tasks and manage computing tasks, etc.
[0089] The device types of the management node and the computing node can be the same or different, and this application does not impose any restrictions on this.
[0090] Figure 2This is a schematic diagram of the architecture of a data analysis system provided in this application.
[0091] like Figure 2 As shown, the data analysis system may include a management node, computing node 1 and computing node 2. The management node can communicate with computing node 1 and computing node 2, and computing node 1 and computing node 2 can also communicate with each other.
[0092] For example, the management node can communicate with compute nodes 1 and 2 via control signals. The management node can transmit task requests to compute nodes 1 and 2 via control signals, thereby instructing compute nodes 1 and 2 to execute the data shuffle method.
[0093] In this application, the management node, compute node 1, and compute node 2 can all provide TEE and REE.
[0094] Based on this, compute node 1 includes 1 disk core and 1 REE memory core. Figure 2 (not shown in the image), TEE memory 1 ( Figure 2 (Not shown in the diagram). REE memory 1 stores data from the REE provided by compute node 1, TEE memory 1 stores data from the TEE provided by compute node 1, and disk 1 stores data to be transferred on compute node 1. For example, the data to be transferred could be partition data from compute node 2.
[0095] The second computing node 2 includes disk 2, REE memory 2 ( Figure 2 (not shown in the image), TEE memory 2 ( Figure 2 (Not shown in the image). REE memory 2 stores data from the REE provided by compute node 2, TEE memory 2 stores data from the TEE provided by compute node 2, and disk 2 stores data to be transferred on compute node 2. For example, the data to be transferred can be partition data from compute node 1.
[0096] The management node includes 3 disks and 3 REE memory modules. Figure 2 (not shown in the image), TEE memory 3 ( Figure 2 (Not shown in the image). Among them, REE memory 3 is used to store data in the REE provided by the management node, TEE memory 3 is used to store memory in the TEE provided by the management node, and disk 3 can be used to store data received by the management node, etc.
[0097] It should be noted that this application does not limit the number of computing nodes included in the data analysis system. Figure 2 The data analysis system shown includes two computing nodes (i.e., computing node 1 and computing node 2) for illustrative purposes only.
[0098] Optionally,Figure 2 The data analysis system shown can be a system provided by a cloud service platform. Based on this, the cloud computing provided by the cloud service platform can include the data shuffling method provided in this application.
[0099] For example, a user can communicate with a data analysis system provided by a cloud service platform through a terminal device to instruct the data analysis system provided by the cloud service platform to perform the data shuffling method provided in this application.
[0100] Optionally, the terminal device may include a personal computer (PC), a personal digital assistant (PDA), an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer, or an all-in-one computer, etc.
[0101] It should be noted that this application does not limit the device form of the terminal device; the above is merely an illustrative example.
[0102] For example, Figure 2 The cloud service platform shown can be a public cloud, a private cloud, a hybrid cloud, etc.
[0103] It needs to be explained that, Figure 2 The system architecture shown does not constitute a limitation on the system architecture for implementing the data shuffling method provided in this application.
[0104] In terms of software, this application provides a computing engine, such as Apache Spark, which can be used to perform data analysis tasks.
[0105] In this application, the computing engine may include a driver (e.g., a Spark driver) and an executor (e.g., a Spark executor). The driver can be deployed on a management node, which can execute resource scheduling tasks and manage computing tasks by running the driver. The executor can be deployed on each computing node, and each computing node can execute computing tasks by running the executor.
[0106] In one example, the computing engine can be deployed in the TEE provided by the data analysis system, such as the driver being deployed in the TEE provided by the management node and the executor being deployed in the TEE provided by each computing node, thereby enabling data analysis of encrypted data.
[0107] In another example, the computing engine can be deployed in the REE provided by the data analysis system, such as: the driver is deployed in the REE provided by the management node, and the actuator is deployed in the REE provided by each computing node, thereby enabling data analysis of plaintext data.
[0108] In terms of software, this application also provides a target software program that can be used to implement the data shuffling method provided in this application. This target software program can be deployed on a data analysis system, which can then execute the data shuffling method provided in this application by running the target software program.
[0109] For example, the target software program can be embedded in the computing engine. For instance, the target software program can be a library file of the computing engine. Based on this, during the operation of the computing engine by the data analysis system, the computing engine can call the target software program, causing the data analysis system to run the target software program and thus execute the data shuffling method provided in this application. For example, the management node can determine partitioning strategies by running the target software program, such as determining the partition data for each computing node. Each computing node can transfer data to be transmitted from its own computing node to other computing nodes by running the target software, and the partition data of its own computing node can be directly written from the memory space of the old partition to the memory space of the new partition.
[0110] It should be noted that this application does not limit the name of the target software program; for example, the target software program can be called data shuffle software, data shuffle application, data shuffle device, etc. Furthermore, the target software program can be software, application program, or component, etc.
[0111] In one example, the target software program can be deployed in a TEE provided by the data analysis system, such as in the TEE provided by the management node and each compute node, for shuffling encrypted data. In another example, the target software program can be deployed in an REE provided by the data analysis system, such as in the REE provided by the management node and each compute node, for shuffling plaintext data.
[0112] Figure 3 A schematic diagram of a target software program provided in this application.
[0113] like Figure 3As shown, the target software program provided in this application may include a partitioning module, a shuffleWrite module, and a shuffleRead module. The partitioning module can be used to determine the partitioning strategy for multiple data sets. The shuffleWrite module can be used to prune the dataset according to the partitioning strategy, obtaining a first set of partitioned data and a second set of partitioned data. The first set of partitioned data belongs to the data partition of the current computing node, and the second set of partitioned data belongs to the data partition of other computing nodes. Then, the first set of partitioned data is directly written from the memory space of the old partition to the memory space of the new partition. The shuffleRead module can be used to perform data transfer according to the partitioning strategy, such as writing the second set of partitioned data to the local disk of each computing node and transferring the second set of partitioned data from the local disk of each computing node to other computing nodes.
[0114] It should be noted that the shuffle writing module can be simply referred to as the writing module, and the shuffle reading module can be called the transmission module, which will not be elaborated further.
[0115] It should be noted that the system architecture and application scenarios described in this application are for the purpose of more clearly illustrating the technical solutions of this application, and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0116] For ease of understanding, the data shuffling method provided in this application will be described exemplarily below with reference to the above system architecture and accompanying drawings.
[0117] Figure 4 A flowchart of a data shuffling method provided in this application. Exemplarily, the method may include steps 401-407.
[0118] It should be noted that the "step" in this application can be abbreviated as "S", and will not be elaborated further hereafter.
[0119] In this application, Figure 4 The data shuffling method shown can be used to process either ciphertext or plaintext data.
[0120] For example, a target user obtains data to be analyzed provided by one or more users and sends a storage request to the data analysis system via a terminal device. The storage request requests the storage of the data to be analyzed. After receiving the storage request, the data analysis system can store the data to be analyzed on multiple computing nodes of the data analysis system, where different computing nodes store different data to be analyzed.
[0121] It should be noted that this application does not restrict the relationship between the target user and the data to be analyzed. For example, the target user may or may not be the owner of the data to be analyzed. Furthermore, the amount of data stored on different computing nodes (i.e., the quantity of data to be analyzed) may be the same or different, and this application does not impose any restrictions on this.
[0122] Example 1, combined with Figure 2 The target user can send a storage request to the management node through the terminal device. After receiving the storage request, the management node can store a part of the data to be analyzed in computing node 1 and store another part of the data to be analyzed in computing node 2.
[0123] Example 2, combined Figure 2 The target user can send a first storage request to computing node 1 via a terminal device to request the storage of a portion of the data to be analyzed. Computing node 1 can then store this portion of the data based on the first storage request. The target user can also send a second storage request to computing node 2 via the terminal device to request the storage of another portion of the data to be analyzed. Computing node 2 can then store this other portion of the data based on the second storage request.
[0124] It should be noted that the following uses Example 2 as an example to illustrate this application.
[0125] The following provides an example of the types of data to be analyzed.
[0126] Example a: The data to be analyzed is plaintext data, which includes plaintext data 1 and plaintext data 2.
[0127] Combination Figure 2 The target user can send storage request 1 to computing node 1 via a terminal device, requesting the storage of plaintext data 1, and send storage request 2 to computing node 2, requesting the storage of plaintext data 2. Computing node 1, based on the received storage request 1, stores the received plaintext data 1 on disk 1, and then writes the plaintext data 1 from disk 1 into REE memory 1 for data analysis in the first REE. Computing node 2, based on the received storage request 2, stores the received plaintext data 2 on disk 2, and then writes the plaintext data 2 from disk 2 into REE memory 2 for data analysis in the second REE.
[0128] It should be noted that the reason for dividing the data to be analyzed into plaintext data 1 and plaintext data 2 is to distinguish the data to be analyzed on different computing nodes. Furthermore, this application does not impose any limitation on the amount of data included in plaintext data 1 and plaintext data 2.
[0129] Example b: The data to be analyzed is encrypted data, which includes encrypted data 1 and encrypted data 2.
[0130] Combination Figure 2 The target user can send storage request 3 to computing node 1 via a terminal device, requesting the storage of encrypted data 1, and send storage request 4 to computing node 2, requesting the storage of encrypted data 2. Based on the received storage request 3, computing node 1 stores the received encrypted data 1 on disk 1, and then writes the encrypted data 1 from disk 1 into TEE memory 1 for data analysis in the first TEE. Based on the received storage request 4, computing node 2 stores the received encrypted data 2 on disk 2, and then writes the encrypted data 2 from disk 2 into TEE memory 2 for data analysis in the second TEE.
[0131] It should be noted that the reason for dividing the data to be analyzed into encrypted data 1 and encrypted data 2 is to distinguish the data to be analyzed on different computing nodes. Furthermore, this application does not impose any limitation on the amount of data included in encrypted data 1 and encrypted data 2.
[0132] The following section, using example b above, describes the process of shuffling encrypted data using the data shuffling method provided in this application.
[0133] In this application, after computing node 1 writes the encrypted data 1 into TEE memory 1, it can partition the encrypted data 1 to divide it into multiple partitions 1. Since these multiple partitions 1 are partitions from the data storage stage, that is, partitions before the shuffle operation, they are called old partitions. To facilitate the distinction between partitions from different stages, these multiple partitions 1 will be referred to as multiple old partitions 1 below. Similarly, computing node 2 can partition the sealed data 2 to obtain multiple old partitions 2.
[0134] For example, after computing node 1 identifies multiple old partitions 1, it can allocate memory space from TEE memory 1 for each old partition 1 to store the data of each old partition 1. Similarly, after computing node 2 identifies multiple old partitions 2, it can allocate memory space from TEE memory 2 for each old partition 2 to store the data of each old partition 2.
[0135] In this embodiment, when storing data to be analyzed, such as encrypted data 1 and encrypted data 2, each computing node can obtain multiple old partitions by partitioning the data to be analyzed. In this way, when each computing node performs shuffle, it can perform shuffle on multiple partitions in parallel, which helps to improve shuffle efficiency.
[0136] It should be noted that this application does not restrict the method of determining the old partitions. For example, computing node 1 can divide the ciphertext data 1 into multiple old partitions 1 based on the amount of ciphertext data 1 and the parallel computing capability.
[0137] Based on this, when a target user needs to perform data analysis on the data to be analyzed, they can send a data analysis request to the management node through their terminal device. This data analysis request requests the analysis of the data. Upon receiving the data analysis request, the management node can parse it to obtain at least one data analysis task indicated by the request, such as a target data analysis task. Then, the management node sends a target task request to each computing node to request the execution of the target data analysis task.
[0138] It should be noted that this application does not impose any restrictions on the number of data analysis tasks indicated in the data analysis request, or the order of different data analysis tasks.
[0139] In this application, when it is necessary to shuffle multiple data (i.e. data to be analyzed) on multiple computing nodes, the management node and each computing node can perform shuffle operations on the data to be analyzed on multiple computing nodes through the data shuffling method provided in this application.
[0140] In this application, the data types of multiple data items can be key-value data (hereinafter referred to as key-value data) or non-key-value data. The following description uses key-value data as an example to illustrate this application.
[0141] In a dataset, some data shares the same key, while others have different keys. Therefore, a dataset can contain multiple keys, where each key can correspond to at least one piece of data.
[0142] For example, the multiple keys include city a and city b, wherein at least one piece of data corresponding to city a includes data with the key of city a among multiple pieces of data, and the data corresponding to city b includes data with the key of city b among multiple pieces of data.
[0143] For example, the multiple computing nodes may include a first computing node, which can be any one of the multiple computing nodes. The following description, using the first computing node as an example, illustrates the process of executing the data shuffling method on each computing node.
[0144] It should be noted that the process of non-first computing nodes performing the data shuffling method can be referred to as the process of the first computing node performing the data shuffling method described below, and will not be repeated hereafter. Here, non-first computing nodes refer to the computing nodes other than the first computing node among multiple computing nodes.
[0145] For ease of description, non-first computing nodes will be referred to as second computing nodes, and will not be elaborated further.
[0146] In this application, the first computing node includes a first TEE memory, which stores data to be analyzed, namely the data for which a shuffle operation needs to be performed.
[0147] For example, the data to be analyzed is divided into multiple old partitions. These multiple old partitions include a first old partition, which can be any one of the multiple old partitions. The following example uses the data from the first old partition to illustrate the process of performing a shuffle operation on the first compute node. For instance, the memory space corresponding to the first old partition is called the first memory space; that is, the first memory space is used to store the data from the first old partition.
[0148] In this embodiment, the first computing node can perform shuffle operations in parallel on multiple old partitions, and group the data of each old partition and transmit the data of each old partition in parallel, thereby improving the efficiency of the shuffle operation.
[0149] Step 401: Each of the multiple compute nodes sends the amount of data for each compute node to the management node.
[0150] Optionally, the amount of data for each computing node can include multiple cases. The following uses the first computing node as an example to illustrate the multiple cases of the amount of data for each computing node through case 1 and case 2.
[0151] Case 1: The amount of data in the first compute node can be the amount of data corresponding to each key of the first compute node.
[0152] Here, the amount of data corresponding to each key refers to the quantity of at least one piece of data corresponding to each key. For ease of description, the amount of data corresponding to each key can also be referred to as the amount of data for each first key.
[0153] To distinguish data and keys from those on compute nodes, the data on the first compute node will be referred to as the first data, and the keys of the data on the first compute node will be referred to as the first keys.
[0154] For example, a first compute node includes multiple sets of first data, which are key-value data. The multiple sets of first data may include multiple first keys, each of which is different. When a shuffle operation is required, the first compute node can send the amount of data corresponding to each first key to the management node, so that the management node can partition at least one set of data corresponding to each first key based on the amount of data for each first key.
[0155] In this embodiment, each computing node sends the amount of data corresponding to the key to the management node. This helps to reduce the operations that each computing node needs to perform, thereby improving the efficiency of each computing node sending the amount of data to the management node.
[0156] Scenario 2: The data volume of the first computing node can be the data volume corresponding to each group of the first computing node.
[0157] Here, the data volume corresponding to each group refers to the number of at least one piece of data corresponding to each group. At least one piece of data corresponding to each group refers to at least one piece of data corresponding to each first key included in each first group. For ease of description, the data volume corresponding to each first group can also be referred to as the data volume of each first group.
[0158] For example, such as Figure 4 As shown, the data volume of the SKa group of the first compute node is 5, and the data volume of the SKb group is [missing data]. The first compute node sends first data volume information to the management node, indicating that the data volume of the SKa group of the first compute node is 5, and the data volume of the SKb group is 3.
[0159] To distinguish the groups on different computing nodes, the group on the first computing node will be referred to as the first group below.
[0160] For example, the first compute node includes multiple first groups, wherein the number of the multiple first groups is less than the number of multiple first keys. When a shuffle operation is required, the first compute node can send the data volume of each first group to the management node, so that the management node can partition at least one piece of data corresponding to each first group based on the data volume of each first group.
[0161] In this embodiment, since the number of multiple first groups of the first computing node is less than the number of multiple first keys, the number of multiple groups of the multiple computing nodes will be less than the number of multiple keys of the multiple computing nodes. Based on this, each computing node sends the data volume corresponding to each group to the management node, and the management node partitions the data at the group level, which reduces the number of elements that need to be partitioned, thereby improving the efficiency of the shuffle process.
[0162] In this application, multiple groups of multiple computing nodes include multiple keys of the multiple computing nodes, and a group includes at least one key from the multiple keys. In this way, when partitioning at the group level, it helps to avoid omitting some keys from the multiple keys, thereby helping to ensure that each key from the multiple keys can be assigned to a new partition.
[0163] In this application, among multiple keys on multiple computing nodes, the same key belongs to the same group. This ensures that when partitioning at the group level, identical groups on each computing node can be assigned to the same data partition, thus helping to guarantee the reliability and accuracy of subsequent data analysis.
[0164] In this application, the number of groups across multiple computing nodes is less than the number of keys across multiple computing nodes. Therefore, when partitioning at the group level, compared to partitioning at a single key, the number of elements requiring partitioning on each computing node can be reduced, thereby reducing the total number of elements requiring partitioning across the entire data analysis system. This improves the efficiency of partitioning, that is, the efficiency of partitioning data across multiple computing nodes, and consequently, the efficiency of data shuffle.
[0165] Optionally, each group of the first computing node may include key-value data corresponding to at least one key; that is, each group may include both the key and the value in the key-value data.
[0166] For example, the multiple first groups of the first computing node may include multiple first data, that is, the multiple first groups may simultaneously include multiple keys of first data and multiple values of first data.
[0167] like Figure 4 As shown, the first compute node divides the data in the first old partition into SKa group (hereinafter referred to as first group 1) and SKb group (hereinafter referred to as first group 2). First group 1 includes data with pentagonal keys and data with circular keys, and contains 5 data entries. First group 2 includes data with hexagonal keys and data with triangular keys, and contains 3 data entries. The second compute node divides the data in the second old partition into SKa group (second group 1) and SKb group (second group 2). Second group 1 contains 3 data entries, and second group 2 contains 5 data entries. SKa group includes pentagonal and circular keys, and SKb group includes hexagonal and triangular keys.
[0168] In this embodiment, by dividing multiple data into multiple groups, after determining new partitions at the group level, data can be read and written directly at the group level, which helps to improve data read and write efficiency, and thus helps to improve shuffle efficiency.
[0169] Optionally, some groups in the first compute node may include key-value data corresponding to multiple keys. This ensures that the total number of groups in the first compute node is less than the total number of keys, thereby reducing the number of elements that need to be partitioned when partitioning at the group level, and thus improving shuffle efficiency.
[0170] Optionally, each group of the first computing node may include at least one key; that is, each group may include only the key of the key-value data. For example, multiple first groups of the first computing node may include only different first keys of multiple first data. Figure 4 As shown, the first group 1 may include pentagons and circles, and the first group 2 may include hexagons and triangles.
[0171] In this embodiment, by setting each group to include only the key, the number of elements in the grouping can be reduced when there are many identical keys in multiple data sets, thereby helping to improve grouping efficiency and thus improving shuffle efficiency.
[0172] Optionally, some groups in the first compute node may include multiple keys. This ensures that the total number of groups in the first compute node is less than the total number of keys, thereby reducing the number of elements that need to be partitioned when partitioning at the group level, and thus improving shuffle efficiency.
[0173] It should be noted that this application does not limit the form of multiple groups; the above is merely an illustrative example. The following is an illustrative description of the process by which the first computing node determines the groups.
[0174] Optionally, the data shuffling method may further include: the first computing node grouping each data item of the first computing node by its key, resulting in each group of the first computing node. Where identical keys belong to the same group, and partially different keys also belong to the same group.
[0175] For example, after receiving a target task request from a management node, the first computing node can group multiple first keys, thereby obtaining multiple first groups for the first computing node. After obtaining the multiple first groups, the first computing node sends the data volume of each first group to the management node. For example, as... Figure 4 As shown, the first computing node groups the keys of each data item into two groups: the SKa group and the SKb group. The SKa group contains 5 data items, and the SKb group contains 3 data items.
[0176] In this application, different computing nodes in multiple computing nodes can group the keys on their respective computing nodes according to the target rules. In this way, the same group on different computing nodes corresponds to the same key. When partitioning at the group level in the future, the same group on different computing nodes can be assigned to the same data partition, thereby ensuring that data with the same key on different computing nodes are assigned to the same data partition.
[0177] In this embodiment, when each computing node groups its keys, it assigns identical keys to the same group, and also assigns some different keys to the same group. This ensures that when partitioning at the group level later, identical keys are assigned to the same new partition, thus helping to guarantee the accuracy and reliability of subsequent data analysis tasks. Furthermore, because some different keys are also assigned to the same group, it ensures that the number of groups on each computing node is less than the number of keys on each computing node, and consequently, that the number of groups across multiple computing nodes is less than the number of keys across multiple computing nodes.
[0178] In this application, there are multiple ways to group keys. Hereinafter, we will introduce the methods 1 and 2 as examples.
[0179] Optionally, method 1 may include the following S1-S3.
[0180] S1: The first computing node determines the hash value of the key for each piece of data in the first computing node.
[0181] For example, after receiving the target task request sent by the management node, the first computing node can perform a hash algorithm on each of the multiple first keys to obtain the hash value of each first key, and thus obtain the hash values of multiple first keys.
[0182] It should be noted that this application does not restrict the type of hash algorithm, as long as the hash value of the same key is the same and the hash value of different keys is different.
[0183] To distinguish the data, keys, and groups from those on the compute nodes, the data on the second compute node will be referred to as the second data, the keys of the data on the second compute node will be referred to as the second keys, and the groups on the second compute node will be referred to as the second groups.
[0184] For example, this application will be described using computing node 1 as the first computing node and computing node 2 as the second computing node.
[0185] like Figure 5As shown, the multiple first data items of computing node 1 are data 1, ..., data 6, and data 1, ..., data 6 are respectively (key1, value1), (key3, value2), (key1, value3), (key5, value4), (key1, value5), and (key1, value). The multiple first data items include multiple first keys, key1, key3, and key5. Based on this, the first computing node can perform a hash algorithm on key1, key3, and key5 to obtain the hash values of key1, key3, and key5. For example, the hash values of key1, key3, and key5 are 13, 14, and 15 respectively.
[0186] Computation node 2 has multiple second data items: data 7, ..., data 12. These data items are (key2, value17), (key4, value8), (key6, value9), (key2, value10), (key7, value11), and (key8, value12), respectively. The multiple second data items include multiple second keys: key2, key4, key6, key7, and key8. Based on this, computation node 2 can perform a hash algorithm on key2, key4, key6, key7, and key8 to obtain the hash values of key2, key4, key6, key7, and key8. For example, the hash values of key2, key4, key6, key7, and key8 are 17, 18, 19, 20, and 24, respectively.
[0187] S2: The first computing node takes the remainder of the hash value of the key of each data in the first computing node modulo the target value to obtain the remainder corresponding to the key of each data in the first computing node; where the target value is the number of multiple groups.
[0188] Here, the remainder corresponding to the key refers to the value obtained by taking the remainder of the hash value of the key with respect to the target value.
[0189] For example, the first computing node takes the remainder of the hash value of each of the multiple first keys with respect to the target value, thereby obtaining the remainder corresponding to each first key, and thus obtaining the remainder corresponding to the multiple first keys.
[0190] Optionally, the target value is the number of groups.
[0191] In this scheme, by taking the remainder of the target value (e.g., the target value is M) instead of taking the remainder of other values, the remainders corresponding to multiple keys can be divided into M different values. Based on this, keys with the same remainder are grouped into the same group, and keys with different remainders are grouped into different groups. This allows multiple keys on multiple computing nodes to be divided into M groups, thereby enabling accurate control of the number of multiple groups and thus accurate control of the shuffle efficiency.
[0192] Optionally, the target value can be provided by the target user. This helps to improve the reasonableness of the target value.
[0193] For example, a target user can send a target value to the management node via a terminal device, whereby the target value indicates the number of multiple groups. After receiving the target value, the management node forwards it to the first computing node, so that the first computing node can determine multiple first groups based on the target value.
[0194] It should be noted that when a target user sends a data analysis request to the management node, the target user may also send the target value at the same time, or the target value may be sent to the management node separately. This application does not impose any restrictions on this.
[0195] Alternatively, the target value can be determined by the management node. This helps to increase the diversity of ways to determine the target value.
[0196] In this application, the management node can determine the target value based on the data analysis task indicated by the data analysis request.
[0197] For example, the management node stores the correspondence between data analysis tasks and numerical values. Based on this, the management node can determine the target value according to the numerical value corresponding to the data analysis task indicated by the currently received data analysis request. Then, the management node can send the target value to the first computing node.
[0198] It should be noted that this application does not limit the method of determining the target value; the above is merely an illustrative example. Furthermore, the target values corresponding to different data analysis requests may be the same or different; this application does not impose any restrictions on this.
[0199] For example, such as Figure 5 As shown, the target value is 4. Calculation node 1 takes the hash values of key1, key3, and key5 respectively and modulo 4 to obtain the remainders corresponding to key1, key3, and key5. For example, the remainders corresponding to key1, key3, and key5 are 1, 2, and 3 respectively.
[0200] Computing node 2 takes the hash values of key2, key4, key6, key7, and key8 respectively, modulo 4 to obtain the remainders for key2, key4, key6, key7, and key8. For example, the remainders for key2, key4, key6, key7, and key8 are 1, 2, 3, 0, and 0 respectively.
[0201] Optionally, the number of multiple groups (i.e., the target value) can be greater than the number of multiple data partitions on multiple computing nodes. These multiple data partitions refer to the new data partitions after the shuffle operation, where each new data partition includes the data partition corresponding to each of the multiple groups. This allows for the balancing of data volume across different data partitions through the redundant groups, thus helping to ensure the balance of data volume across different data partitions and ultimately facilitating the full utilization of the computing resources of different computing nodes.
[0202] The following is an exemplary description of the process for determining the number of data partitions across multiple computing nodes.
[0203] In one example, the target user sends a first value to the management node via a terminal device. This first value indicates the number of new partitions created during the shuffle operation. The first value can be sent simultaneously with the data analysis request, or it can be sent separately; this application does not impose any restrictions on this.
[0204] In another example, after receiving a data analysis request from a user via a terminal device, the management node determines the number of new partitions for the shuffle operation based on the data analysis task indicated in the data analysis request.
[0205] For example, the management node stores the correspondence between data analysis tasks and the number of new partitions. Based on this, the management node can determine the number of new partitions for the data shuffling operation according to the data analysis task indicated by the data analysis request and the correspondence between the data analysis task and the number of new partitions.
[0206] It should be noted that this application does not limit the method for determining the number of new partitions; the above is merely an illustrative example.
[0207] Optionally, the number of groups is equal to the number of data partitions on the multiple compute nodes. This not only helps improve the efficiency of determining the data partition to which a group belongs, thereby improving the efficiency of shuffle determination, but also helps increase the diversity of partition determination.
[0208] S3: The first computing node groups the remainders corresponding to the keys of each data item in the first computing node; keys with the same remainder belong to the same group.
[0209] It should be noted that, for ease of understanding, the remainder corresponding to a key can be called the remainder of a key, which will be elaborated in subsequent steps.
[0210] For example, when the first group only includes the first key, after the first computing node obtains the remainder of each first key, it directly identifies the first keys with the same remainder as the same group, and the first keys with different remainders as different groups, thus obtaining multiple first groups. This helps to improve the efficiency of identifying multiple groups.
[0211] like Figure 5 As shown, the remainders of key1 and key2 are the same, the remainders of key3 and key4 are the same, the remainders of key5 and key6 are the same, and the remainders of key7 and key8 are the same. Based on this, compute node 1 can determine that key1 is a group 1, key3 is a group 2, and key5 is a group 3. Computation node 2 can determine that key2 is a group 4, key4 is a group 5, key6 is a group 6, and key7 and key8 are a group 7. Among these, group 1 and group 4 are the same group, group 2 and group 5 are the same group, and group 3 and group 4 are the same group.
[0212] For example, when the first group includes both a first key and a value, after the first computing node obtains the remainder for each first key, it identifies the data corresponding to keys with the same remainder as the same group, and the data corresponding to keys with different remainders as different groups, thus obtaining multiple groups. This helps improve the efficiency of subsequent data transmission.
[0213] like Figure 5 As shown, compute node 1 can group data 1, data 3, data 5, and data 6 into one group, data 2 into another group, and data 4 into a third group. Compute node 2 can group data 7 and data 10 into one group, data 8 into another group, data 9 into another group, and data 11 and data 12 into a third group.
[0214] In this application, different groups in multiple groups of multiple computing nodes have different identifiers, and the same group on multiple computing nodes has the same identifier.
[0215] Optionally, the identifier of a group can be determined based on the fact that a group includes at least one key. For example, the identifier of a group can be a superkey constructed from the at least one key included in a group.
[0216] It should be noted that determining the identifier of a group can also be considered as establishing a mapping relationship between the group and the identifier (i.e., the hyperkey).
[0217] like Figure 5 As shown, on compute nodes 1 and 2, the remainders of key1 and key2 are the same. Therefore, key1 and key2 form a group, which can be identified as key1key2 (abbreviated as SK1). The remainders of key3 and key4 are the same, so key3 and key4 can form a group, which can be identified as key3key4 (abbreviated as SK2). The remainders of key5 and key6 are the same, so key5 and key6 can form a group, which can be identified as key5key6 (abbreviated as SK3). On compute node 2, the remainders of key7 and key8 are the same, so key7 and key8 can form a group, which can be identified as key7key8 (abbreviated as SK4).
[0218] In this scheme, the identifier of a group is determined by at least one key in the group. This not only establishes the association between the key and the identifier in the group, which helps to understand the key in each group through the group identifier, but also helps to determine whether the same key is assigned to the same group, thereby improving the accuracy of grouping.
[0219] It should be noted that this application does not limit the method of determining the identifier; the above is merely an illustrative example. For instance, identifiers for different groups can also be generated randomly, or identifiers for different groups can be generated according to preset rules, or identifiers for different groups can be specified by the user.
[0220] In the above method, after determining the remainder of the hash value of each key relative to the target value, multiple groups are determined by grouping keys with the same remainder into the same group and keys with different remainders into different groups. Since keys with the same hash value have the same remainder, the remainders for keys with the same hash value are identical, ensuring that identical keys are grouped into the same group. Furthermore, keys with different hash values may have the same remainder, such as the remainders of key1 and key2, thus allowing different keys to be grouped into the same group, resulting in a number of groups that is less than the number of keys.
[0221] Optionally, method 2 may include the following S4.
[0222] S4: The first computing node groups the keys of each piece of data in the first computing node according to multiple key group information; wherein, a key group information is used to indicate at least one key included in a group.
[0223] For example, after the first computing node obtains multiple key group information, it determines a first group based on one key group information from the multiple key group information, thereby obtaining multiple first groups.
[0224] Optionally, the multiple key group information can be provided by the target user. The target user sends the multiple key group information to the management node, and the management node forwards the multiple key group information to each compute node. The multiple key group information can be sent to the management node together with the data analysis request, or it can be sent separately; this application does not impose any restrictions on this. In addition, the management node can send multiple key group information simultaneously when sending the target task request to each compute node, or it can send it separately; this application also does not impose any restrictions on this.
[0225] like Figure 5 As shown, multiple key group information includes first key group information, second key group information, third key group information, and fourth key group information. The first key group information includes key1 and key2, the second key group information includes key3 and key4, the third key group information includes key5 and key6, and the fourth key group information includes key7 and key8. Based on this, compute node 1, according to the first key group information, filters data 1, data 3, data 5, and data 6 from data 1, ..., data 6, and determines data 1, data 3, data 5, and data 6 as the SK1 group of compute node 1. The keys for data 1, data 3, data 5, and data 6 are all key1. Compute node 2, according to the first key group information, filters data 7 and data 10 from data 7, ..., data 12, and determines data 7 and data 10 as the SK1 group of compute node 2. The keys for data 7 and data 10 are both key2.
[0226] It should be noted that other related explanations for S4 can be found in S3 above, and will not be repeated here.
[0227] In the above embodiments, each computing node determines each group of its own computing node based on multiple key group information. In this way, each computing node can directly filter out the key belonging to a group from multiple data according to the key indicated by a key group information, thereby helping to improve the efficiency of group determination and thus helping to improve shuffle efficiency.
[0228] The above embodiments have detailed a scheme for grouping key-value data. The following describes a scheme for grouping non-key-value data. It should be noted that the following description only covers the differences between the two schemes; similarities will not be repeated.
[0229] In one example, the first compute node can treat the data from each old partition as one group for the first compute node. For instance, if the first compute node includes old partition 1 and old partition 2, then the first compute node will treat old partition 1 as one group and old partition 2 as another group. This helps improve the efficiency of determining the grouping.
[0230] In another example, the first compute node can assign a key to each piece of data, thus transforming non-key-value data into key-value data. Then, the data is grouped according to the grouping method used for key-group data. In this way, each compute node can group two different types of data using a single scheme, which helps to improve the applicability of the grouping scheme.
[0231] It should be noted that this application does not restrict the way keys are determined for non-key value data. For example, the target feature of non-key value data can be used as the key of non-key group data, such as: the target feature can be the city name, the province name, the value of a certain attribute, etc.
[0232] In another example, the first computing node determines the hash value of each data point. Then, it takes the remainder of each data point modulo the target value. Next, the remainders for each data point are grouped, with data points having the same remainder belonging to the same group.
[0233] It should be noted that this application does not limit the method for determining the hash value of each piece of data. For example, a hash algorithm can be performed on the content of each piece of data to obtain the hash value of each piece of data. Alternatively, a hash algorithm can be performed on the values of some attributes of each piece of data to obtain the hash value of each piece of data.
[0234] Step 402: The management node obtains the data volume of each compute node, and partitions the multiple data of multiple compute nodes according to the shuffle strategy and the data volume of each compute node to obtain the partition data of each compute node.
[0235] In this context, the partition data of the first compute node refers to the data in the new partition of the first compute node. The shuffle strategy includes assigning data with the same key to the same new partition.
[0236] For example, such as Figure 4 As shown, the management node includes a third memory. After receiving the data volume from each computing node, the management node stores the data volume of each computing node in the third memory. In one example, when the data shuffling method of this application is used to shuffle ciphertext data, the third memory is the TEE memory of the management node. In another example, when the data shuffling method of this application is used to shuffle plaintext data, the third memory is the REE memory of the management node.
[0237] Based on scenario 1 above, after the management node obtains the data volume corresponding to each key on each compute node, it partitions multiple keys across multiple compute nodes according to the shuffle strategy and the data volume of each key on each compute node, thereby partitioning multiple data across multiple compute nodes. For example, identical keys on different compute nodes belong to the same new partition, and some different keys on different compute nodes can also belong to the same new partition. This helps to balance the data volume across different compute nodes.
[0238] Based on scenario 2 above, after the management node obtains the data volume corresponding to each group of each compute node, it partitions multiple groups on multiple compute nodes according to the shuffle strategy and the data volume of each group of each compute node, thereby partitioning multiple data on multiple compute nodes to obtain the group of each compute node, and then obtaining the partition data of each compute node.
[0239] For example, in combination Figure 4 After the first compute node determines multiple first groups, such as the SKa group and the SKb group, it sends the group information of the first compute node to the management node. This group information includes the data volume of each group of the first compute node. For example, the SKa group contains 5 data items, and the SKb group contains 3 data items.
[0240] Optionally, grouping information can be used to indicate the group identifier, the amount of data corresponding to the group, the key corresponding to the group, etc.
[0241] For example, the grouping information of the first computing node indicates that the group identifiers are SKa group and SKb group, with the SKa group corresponding to 5 data items and the SKb group corresponding to 3 data items. The keys corresponding to the SKa group are pentagons and circles, and the keys corresponding to the SKb group are hexagons and triangles.
[0242] In this embodiment, by setting grouping information, identifiers, data volume, keys, etc. can be indicated. This helps the management node to understand the details of the grouping of each computing node, thereby helping to improve the accuracy and rationality of determining the partition data of each computing node.
[0243] In this application, when partitioning multiple groups on multiple compute nodes according to a shuffle strategy, the same groups on different compute nodes belong to the same data partition. For example... Figure 4As shown, the SKa grouping on the first computing node and the SKa grouping on the second computing node both belong to the first new partition of the first computing node. Since the same grouping on different computing nodes belongs to the same group, data with the same key on different computing nodes can be assigned to the same data partition, which helps to ensure the reliability and accuracy of subsequent data analysis.
[0244] Optionally, when partitioning multiple groups across multiple compute nodes according to a shuffle strategy, the target group among the multiple groups is assigned to the first compute node. In other words, the data of the target group among the multiple groups is the partition data of the first compute node. The data volume of the target group on the first compute node is greater than or equal to the data volume of the target group on non-first compute nodes. This helps to allocate the larger data groups on each compute node to that node, thereby reducing the amount of cross-node transmission and improving data shuffling efficiency.
[0245] For example, such as Figure 4 As shown, the data volume of the SKa group on the first compute node is 5, and the number of SKa groups on the second compute node is 3. Therefore, the SKa group belongs to the first compute node. The data volume of the SKb group on the first compute node is 3, and the number of SKb groups on the second compute node is 5. Therefore, the SKb group belongs to the second compute node.
[0246] In this application, multiple groups on multiple computing nodes are partitioned according to the shuffle strategy and the amount of data in each group on each computing node. This can include various implementation methods, and the following describes them by way A and way B.
[0247] Optionally, method A may include the following S5-S6.
[0248] S5: The management node determines the group associated with each compute node from multiple groups of multiple compute nodes.
[0249] Wherein, the amount of data of the target group associated with the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes.
[0250] In this application, after receiving grouping information from multiple compute nodes, the management node can determine multiple groups to be assigned, including the grouping information of each compute node. For example, as shown... Figure 5As shown, after receiving group information 1 from compute node 1 and group information 2 from compute node 2, the management node can identify four groups to be assigned, namely SK1, SK2, SK3, and SK4. Specifically, compute node 1 includes SK1, SK2, and SK3, and compute node 2 includes SK1, SK2, SK3, and SK4.
[0251] Based on this, the management node can determine the associated group for each compute node from multiple partitioned groups, according to the amount of data for each group to be assigned on each compute node. For example, such as... Figure 5 As shown, SK1 contains 4 data items on compute node 1 (i.e., data 1, data 3, data 5, and data 6), and SK1 contains 2 data items on compute node 2 (i.e., data 7 and data 10). Since the amount of data SK1 contains on compute node 1 is greater than the amount of data SK1 contains on compute node 2, SK1 is determined to be the group associated with compute node 2. Based on the same principle, SK4 is the group associated with compute node 2.
[0252] Since the amount of data SK2 and SK3 on compute node 1 is equal to the amount of data on compute node 2, SK2 and SK3 can be grouped together as an association of either compute node 1 or compute node 2. Alternatively, SK2 and SK3 may not be grouped together as an association of compute node 1 and compute node 2. The following description uses SK2 and SK3 as an example of a group associated with compute node 2 to illustrate this application.
[0253] It should be noted that when assigning a target group to compute node 1, this target group can be the first group selected by compute node 1, or in other words, the target group can be the preferred group selected by compute node 1. For example, SK1 can be the first group selected by compute node 1, and SK4 can be the first group selected by compute node 2. Based on this, compute node 1 can be called the preferred compute node for the target group.
[0254] S6: The management node polls the groups associated with each compute node and assigns a group to each compute node in a round-robin fashion.
[0255] For example, in each round of polling, the management node can assign groups to the first computing node from the groups associated with the first computing node, thereby determining the computing node to which each group of each computing node belongs, and thus determining the group data of each computing node.
[0256] For example, such as Figure 5As shown, the groups to be allocated include SK1, SK2, SK3, and SK4. When allocating groups to compute node 1, since compute node 1 is the priority compute node for SK1, SK1 can be assigned to a new partition on compute node 1 in the first round of polling. Based on this, SK1 on compute node 1 and SK1 on compute node 2 both belong to compute node 1, and compute node 1 has already allocated 6 data entries. The data corresponding to SK1 on compute node 1 and the data corresponding to SK1 on compute node 2 constitute the partition data of compute node 1.
[0257] In this embodiment, by assigning a group to each computing node from the group associated with each computing node, a group can be assigned to the computing node with the largest amount of data in that group. For example, SK1 is assigned to computing node 1 and SK4 is assigned to computing node 2. This helps to reduce the amount of data transmitted across nodes, thereby helping to improve data transmission efficiency and thus helping to improve shuffle efficiency.
[0258] In one example, when assigning groups to each compute node, groups can be randomly assigned to each compute node from the groups associated with each compute node. This helps improve allocation efficiency.
[0259] For example, such as Figure 5 As shown, during the first round of polling, since the priority computing node for SK2, SK3 and SK4 is computing node 2, when assigning groups to computing node 2, any one of the groups of SK2, SK3 and SK4 can be assigned to the new partition of computing node 2, such as assigning SK2 to computing node 2.
[0260] In another example, when assigning groups to new partitions for each compute node, the group with the largest data volume among the groups associated with each compute node can be assigned to that compute node. This assigns a group to the compute node with the largest data volume in that group, helping to reduce the amount of data transferred across nodes, thereby improving data transfer efficiency and, consequently, shuffle efficiency.
[0261] For example, such as Figure 5 As shown, the priority computing node for SK2, SK3 and SK4 is computing node 2. SK2 and SK3 each have 1 data point, while SK4 has 2 data points. Based on this, SK4 can be assigned to computing node 2 during the first round of polling.
[0262] In this application, during the polling process, if the allocated data amount of the first computing node is less than or equal to the allocated data amount of the non-first computing nodes, then a group is allocated to the first computing node from the group associated with the first computing node.
[0263] Conversely, if the amount of allocated data on the first compute node is greater than the amount of allocated data on non-first compute nodes, then the first compute node will be skipped in this round of polling, that is, no data partitions will be allocated to the data on the first compute node.
[0264] It should be noted that since the allocated data volume of each computing node is 0 during the first round of polling, no computing nodes are skipped.
[0265] For example, such as Figure 5 As shown, in the second round of polling, since compute node 1 has 6 allocated data items, while compute node 2 has 1 allocated data item (i.e., the data item for SK2), the allocated data item for compute node 1 is greater than that for compute node 2. Therefore, in the second round of polling, compute node 1 can be skipped, meaning no group is allocated to compute node 1. After skipping compute node 1, since the allocated data item for compute node 2 is less than that for compute node 1, the management node can allocate a group for compute node 1 from the unallocated groups. That is, it can allocate a group for compute node 1 from SK3 and SK4, such as allocating SK3 to a new partition of compute node 1.
[0266] For example, such as Figure 5 As shown, during the third round of polling, since the allocated data amount of compute node 1 is 6 and the allocated data amount of compute node 2 is 2, compute node 1 can still be skipped and the remaining SK4 can be allocated to compute node 2.
[0267] In the above embodiments, by skipping computing nodes with a large amount of allocated data during the polling process, it helps to balance the amount of data on different computing nodes, thereby helping to make full use of the computing resources on different computing nodes.
[0268] In this application, the data shuffling method may further include: when the groups associated with the first computing node have already been assigned to computing nodes, the management node allocates data to the first computing node from groups not associated with the first computing node. This increases the range of groups that each computing node can select, thereby helping to better balance the amount of data across different computing nodes.
[0269] For example, such as Figure 2 As shown, in the second round of polling, if a group is selected for compute node 1, since SK1 associated with compute node 1 has already been assigned a compute node, a group can be selected for compute node 1 from the groups associated with compute node 2, such as SK3 and SK4.
[0270] In this application, the data shuffling method may further include: the management node assigning a group to the first computing node from the groups of computing nodes that have not yet been associated. This increases the range of groups that each computing node can select, thereby helping to better balance the amount of data on different computing nodes.
[0271] For example, such as Figure 5 As shown, if SK2 and SK3 are not associated with compute node 1 and compute node 2, that is, SK2 and SK3 are not associated with either compute node 1 or compute node 2, then, if the associated groups of compute node 1 have already been assigned to compute nodes, the management node can assign a group to compute node 1 from among SK2 and SK3.
[0272] Optionally, the fact that the allocated data amount of the first computing node is less than or equal to the allocated data amount of the non-first computing node may include: the difference between the allocated data amount of the first computing node and the allocated data amount of the non-first computing node is less than or equal to a difference threshold.
[0273] In this application, the difference threshold is determined based on the amount of data allocated to different computing nodes.
[0274] Optionally, the difference threshold can satisfy the following formula: (KP)*u / P. Where K is the maximum allocated data amount among multiple computing nodes, and P is the minimum allocated data amount among multiple computing nodes. u can be 5%-20%.
[0275] In one example, u can be 5%. In another example, u can be 20. In yet another example, u can be 10%. This helps to increase the diversity of u choices. In this embodiment, computing nodes are assigned groups only when the difference in data volume is less than a difference threshold, which helps to better balance the data volume on different computing nodes.
[0276] Optionally, method B may include the following S7.
[0277] S7: The management node assigns a group to each compute node from multiple groups of multiple compute nodes.
[0278] The amount of data in the target group allocated to the first computing node on the first computing node is greater than or equal to the amount of data in the target group on non-first computing nodes.
[0279] In this application, the management node can determine the computing node to which each unassigned group belongs based on the amount of data of each unassigned group on different computing nodes.
[0280] For example, such as Figure 4As shown, the amount of data SK1 has on compute node 1 is greater than the amount of data SK1 has on compute node 2. Therefore, SK1 is allocated to a new partition on compute node 1. Similarly, the amount of SK4 on compute node 2 is greater than the amount of data SK4 has on compute node 1. Therefore, SK4 is allocated to a data partition on compute node 2. Furthermore, since the amount of data SK2 / SK3 on compute node 1 is equal to the amount of data SK2 / SK3 on compute node 2, SK2 / SK3 can be allocated to either compute node 1 or compute node 2. For example, SK2 / SK3 can be allocated to the compute node with less data, i.e., compute node 2. This helps to balance the amount of data across different compute nodes.
[0281] It should be noted that other related explanations for S7 can be found in the explanations for S5 mentioned above, and will not be repeated here.
[0282] In this implementation, groups are directly allocated to each computing node based on the amount of data in each group on different computing nodes. This helps improve allocation efficiency, which in turn helps improve the efficiency of determining the partitioning strategy.
[0283] The following describes the process by which the management node determines the new partition for each compute node.
[0284] Optionally, after determining the key / group belonging to each compute node, the management node can determine a new partition for each compute node based on the amount of data corresponding to different keys / groups.
[0285] Based on scenario 2 above, after the management node determines at least one target group belonging to the first computing node from multiple groups of multiple computing nodes, it can determine at least one new partition of the first computing node based on the data volume of each target group in the at least one target group.
[0286] For example, such as Figure 6 As shown, after the management node determines that SK2, SK3, and SK4 belong to compute node 2, it determines the number of partitions for compute node 2 based on the data volume of SK2 being 1, SK3 being 1, and SK4 being 2. For example, SK2 and SK3 can be designated as one new partition, and SK4 as another new partition.
[0287] For example, the management node can first determine the total number of new partitions across multiple compute nodes. Then, based on the amount of partition data allocated to each compute node, the data for the new partitions on each compute node is determined. Next, based on the amount of data in each group belonging to each compute node and the number of new partitions on each compute node, the grouping of each new partition belonging to each compute node is determined.
[0288] Optionally, the management node can predetermine N new partitions for each compute node. Based on this, during each round of polling, it can select groups for each new partition of each compute node, or select groups for one new partition of each compute node.
[0289] For example, compute node 1 includes new partition a and new partition b, and compute node 2 includes new partition c and new partition d. In the first round of polling, the management node can select groups for the new partitions and new partition b sequentially. Alternatively, in the first round of polling, the management node selects groups only for new partition a, and then in the second round of polling, the management node selects groups for new partition b.
[0290] For example, after selecting a group for each new partition on each compute node, the grouping of different new partitions can be adjusted according to the amount of data in each new partition to balance the number of different new partitions.
[0291] It should be noted that this application does not limit the method by which the management node determines the new partition of each computing node; the above is merely an illustrative example.
[0292] It should be noted that step 402 can also be performed by the first computing node or a non-first computing node; the above is only an illustrative example.
[0293] Step 403: The management node sends partition information to the first compute node. The partition information is used to indicate the partition data of the first compute node.
[0294] In this application, after the management node determines the partition data of each computing node, it can send partition information to each computing node so that each computing node can distribute the data on its computing node according to the partition information.
[0295] For example, such as Figure 6 As shown, partition information indicates that data with a pentagonal key and data with a circle key both belong to the first new partition of the first compute node. In other words, data with a pentagonal key and data with a circle key are partitioned data of the first compute node. Partition information can also be used to indicate that data with a hexagonal key and data with a triangle key both belong to the new partition of the second compute node. That is, data with a hexagonal key and data with a triangle key are partitioned data of the second compute node.
[0296] In one example, the management node sends partition information to the first compute node, including the compute node to which each group belongs. This helps reduce the amount of information the management node sends to each compute node, thereby improving information transmission efficiency.
[0297] For example, in combination Figure 4The partition information sent by the management node to compute node 1 only includes the compute nodes to which SK1, SK2 and SK3 belong, but does not include the compute node to which SK4 belongs.
[0298] In another example, the partition information sent by the management node to the first compute node includes the compute node to which each of the multiple groups belongs. This way, the management node does not need to sift through partition information for each compute node, thus improving information transmission efficiency. For example, combining... Figure 4 The partition information sent by the management node to compute node 1 only includes the compute nodes to which SK1, SK2, SK3 and SK4 belong.
[0299] Step 404: Based on the partition information, the first computing node determines the first group of partition data belonging to the first computing node and the second group of partition data not belonging to the first computing node in the first memory space of the first computing node.
[0300] For example, such as Figure 4 As shown, the first group of partitioned data includes data grouped into SKa, that is, data with pentagonal keys and data with circular keys. The second group of partitioned data includes data grouped into SKb, that is, data with triangular keys and data with hexagonal keys.
[0301] It should be noted that the reason for dividing the data in the first memory space into a first group of partitioned data and a second group of partitioned data is to distinguish the data in the first memory space belonging to different computing nodes. Specifically, for each computing node, the first group of partitioned data consists of partitioned data belonging to that computing node, while the second group of partitioned data consists of partitioned data not belonging to that computing node.
[0302] In this application, when transmitting data from the first memory space, the first computing node can determine the first group of partitioned data belonging to the first computing node and the second group of partitioned data not belonging to the first computing node. This helps to improve data transmission efficiency.
[0303] For example, such as Figure 4 As shown, after receiving the partition information, compute node 1 indicates that the data of SK1 belongs to the partition data of the first compute node, while the data of SK2 and SK3 belong to the partition data of compute node 2. Based on this, when compute node 1 reads the data of SK1 from the first memory space of TEE memory 1, it can determine that the data of SK1 belongs to the first group of partition data according to the partition information. Therefore, compute node 1 processes the data of SK1 through step 405. Afterwards, when compute node 1 reads the data of SK2 from the first memory space of TEE memory 1, it can determine that the data of SK2 belongs to the second group of partition data according to the partition information. Therefore, compute node 1 can process the data of SK2 through steps 406 and 407.
[0304] Alternatively, in this application, the first computing node, upon receiving the partitioning information, can divide the data in the first memory space into multiple groups of partitioned data, such as a first group of partitioned data and a second group of data. This helps improve the accuracy of data transmission.
[0305] For example, such as Figure 4 As shown, after receiving the partitioning information, compute node 1 identifies the data of SK1 as the first group of partitioned data and the data of SK2 and SK3 as the second group of partitioned data. Then, compute node 1 processes the first group of partitioned data in step 405, and processes the second group of partitioned data in steps 406 and 407.
[0306] Step 405: The first computing node writes the first set of partition data in the first memory space into the second memory space of the first computing node; the second memory space is used to store the partition data of the first computing node.
[0307] In this application, the partition information can also be used to indicate the number of new partitions on the first computing node and the storage space occupied by the data in each new partition. After obtaining the partition information, the first computing node allocates memory space from the first memory for each new partition of the first computing node.
[0308] For example, such as Figure 5 As shown, the number of new partitions on the first compute node is 1. For example, this 1 new partition is the first new partition. Based on this, the first compute node allocates the second memory space on the first memory to the first new partition. The second memory space can be used to store the data of the first new partition of the first compute node.
[0309] Based on this, the first computing node writes the first set of partitioned data directly from the first memory space to the second memory space. In other words, after the first set of partitioned data is read from the first memory space, it is not written to the first disk of the first computing node, but directly to the second memory space.
[0310] In one example, such as Figure 4 As shown, the first compute node reads the data in the SKa group from the first memory space and writes it directly into the second memory space. In another example, as... Figure 4 As shown, compute node 1 reads the data of SK1 from the first memory space and writes it directly into the second memory space.
[0311] For example, the second computing node obtains the number of new partitions on its own computing node and the storage space occupied by the data in each new partition, and allocates memory space for each new partition from the second memory. Figure 5As shown, the second compute node has one new partition, designated as the second new partition. Based on this, the second compute node allocates the third memory space on the second memory to the second new partition. This third memory space can be used to store the data of the second new partition. Afterward, the second compute node writes the SKb-grouped data directly from the memory space of the second old partition to the third memory space, without writing it to the second disk of the second compute node.
[0312] Step 406: The first computing node writes the second set of partitioned data from the first memory space to the first disk of the first computing node.
[0313] In this application, when the first memory space is the memory space on the first memory and the first memory is TEE memory, after the first computing node reads the second group partition data from the first memory space, it encrypts the second group partition data and writes the encrypted second group partition data to the first disk of the first computing node, so as to facilitate the transmission of the second group partition data to the second computing node. The first disk is the disk of the REE.
[0314] For example, such as Figure 4 As shown, after the first computing node reads the SKb group data from the first memory space, it encrypts the SKb group data to obtain the encrypted SKb group data, and then writes the encrypted SKb group data to the first disk.
[0315] Step 407: The first computing node sends the second set of partition data from the first disk to non-first computing nodes.
[0316] In this application, after the encrypted second set of partitioned data is written to the first disk, the first computing node can transmit the encrypted second set of partitioned data from the first disk to the second computing node.
[0317] For example, such as Figure 4 As shown, compute node 1 can encrypt the data of SK2 and SK3 to obtain encrypted data of SK2 and SK3. Then, compute node 1 writes the encrypted data of SK2 and SK3, along with partition information, to a shuffle file 1 on disk 1. The partition information indicates that the data of SK2 and SK3 is the score data for compute node 2. Afterward, compute node 1 transmits the encrypted data of SK2 and SK3 to compute node 2.
[0318] For example, after receiving the encrypted second group partitioned data, the second computing node can determine the new partition to which the second group partition belongs based on the identifier of each group in the second group partitioned data. For example, as Figure 6As shown, the second compute node can write the data of the SKb group into the third memory space of the second memory based on the identifier of each group of the second set of partitioned data, including the SKb group, and the fact that the SKb group belongs to the second new partition. It should be noted that for the relevant explanations of the new partition and memory space on the second compute node, please refer to the explanation of the new partition and memory space of the first compute node in step 405. The steps are repeated here.
[0319] For example, in combination Figure 4 When the second computing node executes the data shuffling method provided in this application, it can send SKa packets from the second disk to the first computing node. After receiving the SKa packets sent by a non-second computing node, the first computing node writes the SKa packets into the second memory space.
[0320] It should be noted that this application does not restrict the execution order of steps 405 and 406-407; the above is merely an illustrative example.
[0321] In the above embodiments, taking the first computing node as an example, the process of each computing node executing the data shuffling method provided in this application when shuffling multiple data on multiple computing nodes is described. Since each computing node directly writes the partition data belonging to its own computing node into the memory space (e.g., the second memory space) used to store partition data on its own computing node, on the one hand, a portion of the data of each computing node will no longer be written to the local disk. Therefore, the amount of data written to the local disk by each computing node is reduced, thereby improving the disk write efficiency of each computing node and thus improving the data shuffle efficiency. On the other hand, since the data belonging to each computing node is not written to the local disk, it is no longer necessary to write from the local disk of each computing node to the local memory of each computing node. Therefore, redundant data transfer between the local disk and local memory of each computing node is avoided, reducing the amount of data that needs to be distributed to different data partitions on the local disk of each computing node. This improves the disk read efficiency of each computing node and thus improves the data shuffle efficiency, preventing the data shuffle operation from affecting the data analysis efficiency.
[0322] The foregoing primarily describes the solution provided in this application from a methodological perspective. To achieve the aforementioned functions, the data shuffling device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0323] This application can, based on the above method, exemplarily divide the data shuffling device into functional modules. For example, the data shuffling device may include functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0324] For example, Figure 4 A possible structural diagram of the data shuffling device (denoted as data shuffling device 600) involved in the above embodiments is shown. The actions performed by the data shuffling device 600 are implemented through a computing device or through corresponding software executed by the computing device. The data shuffling device 600 may include a partitioning module 601, a writing module 602, and a transmission module 603. The partitioning module 601 is used to obtain data volume information of multiple computing nodes, and partition multiple data of multiple computing nodes according to the shuffle strategy and the data volume information of multiple computing nodes, to obtain partitioned data of each computing node in the multiple computing nodes. For example, as Figure 4 As shown in S403, the partitioning module 601 is further configured to send partition information to the first computing node, the partition information indicating the partition data of the first computing node; the first computing node is any one of a plurality of computing nodes. For example, as shown in... Figure 4 S404 is shown. The write module 602 is used to determine, within the first memory space of the first computing node, a first group of partitioned data belonging to the first computing node and a second group of partitioned data not belonging to the first computing node. For example, as... Figure 4 S405 is shown. The write module 602 is used to write the first group of partition data from the first memory space of the first computing node to the second memory space of the first computing node; the second memory space is used to store the partition data of the first computing node. For example, as shown... Figure 7S406 is shown. The write module 602 is used to write the second set of partitioned data from the first memory space of the first computing node to the first disk of the first computing node; the transmission module 603 is used to transmit the second set of partitioned data from the first disk to a non-first computing node. For example, as shown... Figure 7 The S407 shown.
[0325] Optionally, the first memory space and the second memory space are located in the memory of the Trusted Execution Environment (TEE) of the first compute node.
[0326] Optionally, the first memory space and the second memory space are located in the memory of the rich execution environment REE of the first computing node.
[0327] Optionally, the data type of the multiple data is key-value data, and the data shuffling device also includes a grouping module 604. The grouping module 604 is used to: group the keys of each data item of the first computing node to obtain each group of the first computing node; the partitioning module 601 is specifically used to: have the management node obtain the data volume of each group of each computing node to obtain the data volume of multiple groups of multiple computing nodes; the multiple data items include multiple keys, with identical keys belonging to the same group, and some different keys belonging to the same group; the management node partitions the multiple groups of multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of multiple computing nodes.
[0328] Optionally, the grouping module 604 is specifically used to: determine the hash value of the key of each data in the first computing node; take the remainder of the hash value of the key of each data in the first computing node modulo a target value to obtain the remainder corresponding to the key of each data in the first computing node; wherein, the target value is the number of multiple groups; group the remainders corresponding to the keys of each data in the first computing node; keys with the same remainder belong to the same group.
[0329] Optionally, the grouping module 604 is specifically used to: group the keys of each data of the first computing node according to multiple key group information; wherein, a key group information is used to indicate at least one key included in a group.
[0330] Optionally, the target group among the multiple groups is the partition data of the first computing node; the data volume of the target group on the first computing node is greater than or equal to the data volume of the target group on non-first computing nodes.
[0331] Optionally, the partitioning module 601 is specifically used to: determine the group associated with each computing node from multiple groups; wherein the amount of data of the target group associated with the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes; poll the allocated partition data for each computing node from the groups associated with each computing node; wherein, in each round of polling, if the allocated data of the first computing node is less than or equal to the allocated data of non-first computing nodes, partition data is allocated for the first computing node from the groups associated with the first computing node.
[0332] Optionally, during each round of polling, the partitioning module 601 is further configured to: allocate partition data to the first computing node from groups not associated with the first computing node, provided that computing nodes have been allocated to the groups associated with the first computing node.
[0333] Optionally, the partitioning module 601 is specifically used to: allocate partition data for each computing node from multiple groups; and allocate the target group to the first computing node such that the amount of data on the first computing node is greater than or equal to the amount of data on non-first computing nodes.
[0334] Optionally, if the data type of multiple data is not key-value data, the grouping module 604 is further configured to: group each data of the first computing node to obtain each group of the first computing node; the partitioning module 601 is specifically configured to: obtain the data volume of each group of each computing node to obtain the data volume of multiple groups of multiple computing nodes; and partition the multiple groups of multiple computing nodes according to the shuffle strategy and the data volume of multiple groups of multiple computing nodes.
[0335] Optionally, the grouping module 604 is specifically used to: treat the data of each partition of the first computing node as each group of the first computing node.
[0336] Optionally, the grouping module 604 is specifically used to: determine the key of each data of the first computing node; the first computing node groups the keys of each data of the first computing node; wherein some different keys belong to the same group.
[0337] Optionally, the grouping module 604 is specifically used to: determine the hash value of each data of the first computing node; the first computing node takes the remainder of the hash value of each data of the first computing node modulo a target value to obtain the remainder corresponding to each data of the first computing node; wherein, the target value is the number of multiple groups; the first computing node groups the remainders corresponding to each data of the first computing node; data with the same remainder belong to the same group, and data with different remainders belong to the same group.
[0338] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the data shuffling devices 600 provided above, as well as the description of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.
[0339] In this application, the partitioning module 601, writing module 602, transmission module 603, and packetizing module 604 can all be implemented in software or in hardware. For example, the implementation of partitioning module 601 will be described below. Similarly, the implementation of writing module 602, transmission module 603, and packetizing module 604 can refer to the implementation of partitioning module 601.
[0340] As an example of a software functional unit, the partition module 601 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, the aforementioned computing instance may be one or more.
[0341] For example, partitioning module 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run this code can be distributed within the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run this code can be distributed within the same availability zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0342] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0343] As an example of a hardware functional unit, partition module 601 may include at least one computing device, such as a server. Alternatively, partition module 601 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0344] The partitioning module 601 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the partitioning module 601 includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the partitioning module 601 includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0345] It should be noted that, in other embodiments, the partitioning module 601 can be used to execute any step in the data shuffling method, the writing module 602 can be used to execute any step in the data shuffling method, the transmission module 603 can be used to execute any step in the data shuffling method, and the grouping module 604 can be used to execute any step in the data shuffling method. The steps implemented by the partitioning module 601, the writing module 602, the transmission module 603, and the grouping module 604 can be specified as needed. By implementing different steps in the data shuffling method through the partitioning module 601, the writing module 602, the transmission module 603, and the grouping module 604, all functions of the data shuffling device can be realized.
[0346] This application also provides a computing device 700. For example... Figure 8 As shown, the computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.
[0347] The 702 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the computing device 700 (e.g., memory 706, processor 704, communication interface 708).
[0348] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0349] The memory 706 may include volatile memory, such as random access memory (RAM). The processor 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0350] The memory 706 stores executable program code, which the processor 704 executes to implement the functions of the aforementioned partitioning module 601, writing module 602, transmission module 603, and grouping module 604, thereby realizing the data shuffling method. In other words, the memory 706 stores instructions for executing the data shuffling method.
[0351] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.
[0352] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0353] like Figure 9 As shown, the computing device cluster 800 includes at least one computing device 700. The memory 706 of one or more computing devices 700 in the computing device cluster 800 may store the same instructions for performing a data shuffling method.
[0354] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the data shuffling method. In other words, a combination of one or more computing devices 700 can jointly execute the instructions for executing the data shuffling method.
[0355] It should be noted that the memory 706 in different computing devices 700 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data shuffling device. That is, the instructions stored in the memory 706 of different computing devices 700 can implement the functions of one or more modules among the partitioning module 601, writing module 602, transmission module 603, and grouping module 604.
[0356] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 One possible implementation method is shown.
[0357] like Figure 9 As shown, two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 706 in computing device 700A stores instructions for performing the functions of partitioning module 601. Simultaneously, the memory 706 in computing device 700B stores instructions for performing the functions of writing module 602, transmission module 603, and packet module 604.
[0358] Figure 8 The connection method between the computing device clusters shown can be such that, considering the data shuffling method provided in this application requires a large amount of computation, the functions implemented by the writing module 602, the transmission module 603, and the grouping module 604 are delegated to the computing device 700B.
[0359] It should be understood thatFigure 9 The functions of the computing device 700A shown can also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be performed by multiple computing devices 700.
[0360] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... and The connection method of the computing device cluster is different in that the memory 706 of one or more computing devices 700 in the computing device cluster can store the same instructions for executing the data shuffling method.
[0361] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the data shuffling method. In other words, a combination of one or more computing devices 700 can jointly execute the instructions for executing the data shuffling method. This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can run on a computing device or be stored on any available medium. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the aforementioned data shuffling method.
[0362] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a data shuffling method.
[0363] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data shuffling method, characterized in that, Applied to a computing cluster, which includes multiple computing nodes and a management node, the method includes: The management node obtains the data volume of each of the plurality of computing nodes, and partitions the data of the plurality of computing nodes according to the shuffle strategy and the data volume of each computing node to obtain the partition data of each computing node; The management node sends partition information to the first computing node, the partition information being used to indicate the partition data of the first computing node; the first computing node is any one of the plurality of computing nodes; Based on the partition information, the first computing node determines the first group of partitioned data belonging to the first computing node and the second group of partitioned data not belonging to the first computing node in the data of the first memory space of the first computing node; The first computing node writes the first group partition data from the first memory space of the first computing node into the second memory space of the first computing node; the second memory space is used to store the partition data of the first computing node. The first computing node writes the second group partitioned data in the first memory space of the first computing node into the first disk of the first computing node, and transmits the second group partitioned data in the first disk to non-first computing nodes.
2. The method according to claim 1, characterized in that, The first memory space and the second memory space are located in the memory of the Trusted Execution Environment (TEE) of the first computing node.
3. The method according to claim 1 or 2, characterized in that, The data types of the multiple data items are key-value pairs. The method further includes: the first computing node grouping each piece of data of the first computing node according to a key to obtain each group of the first computing node; each group includes key-value data corresponding to at least one key, and some groups include key-value data corresponding to multiple keys; The management node obtains the data volume of each of the plurality of computing nodes, and partitions the data of the plurality of computing nodes according to the shuffle strategy and the data volume of each computing node, including: the management node obtains the data volume of each group of each computing node to obtain the data volume of the plurality of groups of the plurality of computing nodes; the management node partitions the plurality of groups of the plurality of computing nodes according to the shuffle strategy and the data volume of the plurality of groups of the plurality of computing nodes.
4. The method according to claim 3, characterized in that, The data of the target group among the multiple groups is the partition data of the first computing node; the data volume of the target group on the first computing node is greater than or equal to the data volume of the target group on non-first computing nodes.
5. The method according to claim 3 or 4, characterized in that, The management node partitions the multiple groups of the multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of the multiple computing nodes, including: The management node determines the group associated with each computing node from the plurality of groups; wherein the amount of data of the target group associated with the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes; The management node polls the groups associated with each computing node to determine the allocation group for each computing node. In each round of polling, if the amount of allocated data of the first computing node is less than or equal to the amount of allocated data of the non-first computing node, a group is allocated to the first computing node from the group associated with the first computing node.
6. The method according to claim 3 or 4, characterized in that, The management node partitions the multiple groups of the multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of the multiple computing nodes, including: The management node assigns a group to each computing node from multiple groups of the plurality of computing nodes; Wherein, the amount of data of the target group allocated to the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes.
7. A data shuffle device, characterized in that, Applied to a computing cluster, the computing cluster comprising multiple computing nodes; the device includes: The partitioning module is used to obtain the data volume information of the multiple computing nodes, and partition the multiple data of the multiple computing nodes according to the shuffle strategy and the data volume information of the multiple computing nodes to obtain the partition data of each computing node in the multiple computing nodes. The partitioning module is further configured to send partitioning information to the first computing node, the partitioning information being used to indicate the partitioning data of the first computing node; the first computing node is any one of the plurality of computing nodes; The write module is used to determine, in the data of the first memory space of the first computing node, the first group of partitioned data belonging to the first computing node and the second group of partitioned data not belonging to the first computing node; The writing module is used to write the first group partition data in the first memory space of the first computing node to the second memory space of the first computing node; the second memory space is used to store the partition data of the first computing node. The writing module is used to write the second group partitioned data in the first memory space of the first computing node to the first disk of the first computing node; The transmission module is used to transmit the second group partition data in the first disk to non-first computing nodes.
8. The apparatus according to claim 7, characterized in that, The first memory space and the second memory space are located in the memory of the Trusted Execution Environment (TEE) of the first computing node.
9. The apparatus according to claim 7 or 8, characterized in that, The device further includes: a grouping module; The grouping module is used to group each piece of data of the first computing node according to a key to obtain each group of the first computing node; each group includes key-value data corresponding to at least one key. The partitioning module is specifically used to: obtain the data volume of each group of each computing node, thereby obtaining the data volume of multiple groups of the multiple computing nodes; and partition the multiple groups of the multiple computing nodes according to the shuffle strategy and the data volume of the multiple groups of the multiple computing nodes.
10. The apparatus according to claim 9, characterized in that, The data of the target group among the multiple groups is the partition data of the first computing node; the data volume of the target group on the first computing node is greater than or equal to the data volume of the target group on non-first computing nodes.
11. The apparatus according to claim 9 or 10, characterized in that, The partitioning module is specifically used for: From the plurality of groups, determine the group associated with each computing node; wherein, the amount of data of the target group associated with the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes; From the groups associated with each computing node, poll the allocation group for each computing node; In each round of polling, if the amount of allocated data of the first computing node is less than or equal to the amount of allocated data of the non-first computing node, a group is allocated to the first computing node from the group associated with the first computing node.
12. The apparatus according to claim 9 or 10, characterized in that, The partitioning module is specifically used for: Assign a group to each computing node from multiple groups of the plurality of computing nodes; Wherein, the amount of data of the target group allocated to the first computing node on the first computing node is greater than or equal to the amount of data of the target group on non-first computing nodes.
13. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device; Each of the at least one computing device includes a processor, a memory, and a computer program / instructions stored in the memory; The processor of each computing device executes a computer program stored in the memory of each computing device to cause each computing device to implement the steps of the method as described in any one of claims 1-6.
14. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the steps of the method as described in any one of claims 1-6.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-6.