Data communication management method, computing cluster and server
By introducing management nodes into the computing cluster for data identification mapping, the problem of low bandwidth between the working node and the service node in the parameter server architecture is solved, and data acquisition efficiency and overall performance of the computing cluster are improved.
Patent Information
- Application Number
- CN202310947384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
In the parameter server architecture, due to the low bandwidth between the work node and the service node, the efficiency of the work node to acquire data is reduced, the calculation time is increased, and the training time of AI applications is increased.
By introducing management nodes, data identification mapping is performed, the communication between the work node and the service node is updated to communications that belong to the same server, reducing the number of data transmissions across servers, and avoiding data skew problems.
It improves the efficiency of work nodes to acquire data, reduces the duration of the computing cluster to perform tasks, and solves the performance degradation caused by low data communication efficiency.
Smart Images

Figure CN119449799A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data communication management method, a computing cluster and a server. Background Art
[0002] With the development of big data, artificial intelligence (AI), and cloud computing technologies, the speed of data generation exceeds the processing and computing capabilities of existing conventional equipment. In the face of more diverse data forms and computing scenarios in the future, many different forms of computing nodes have emerged, and they are deployed in the form of parameter server (PS) architecture. The PS architecture is a distributed parallel architecture including scheduler nodes, service nodes, and worker nodes, which are deployed on different servers. The PS architecture can execute the training process of AI applications, and each worker node and multiple service nodes will communicate data during the training process. Each service node manages different data. When the work node and the service node are located on different servers, due to the low bandwidth between the work node and the service node, the efficiency of the work node in obtaining data is reduced, and the time required for the work node to calculate the model parameters of the AI application increases, resulting in an increase in the delay of the service node updating the model parameters of the AI application and an increase in the training time of the AI application. Summary of the invention
[0003] The present application provides a data communication management method, a computing cluster and a server, which solve the problem of decreased task performance and increased execution time caused by low communication efficiency between data.
[0004] In a first aspect, the present application provides a method for managing data communication. The method for managing data communication is applied to a computing cluster, the cluster includes multiple working nodes, multiple service nodes and multiple management nodes, the multiple working nodes, multiple service nodes and multiple management nodes are deployed on multiple servers, each server is deployed with a management node, and each service node manages multiple data identifiers. The method for managing data communication includes: a first management node in a server included in the multiple servers obtains a first data acquisition request of a first working node in the multiple working nodes, and the first data acquisition request includes a source identifier of the first data to be obtained. The first management node performs a preset operation according to the source identifier of the first data and the number of service nodes to determine the target identifier corresponding to the source identifier, and determines the target service node corresponding to the target identifier; and the first management node sends the target identifier to the target service node. The aforementioned target service node obtains the second data according to the target identifier, and sends the second data to the first working node.
[0005] In this application, for the process of working nodes obtaining data from service nodes, the management node will map the identifier of the data, such as the target identifier corresponding to the source identifier of the data generated by the management node, and the service node to which the target identifier belongs will read the data. When the total amount of data to be pulled by each working node remains unchanged, the total number of communications for each working node to pull data from each service node remains unchanged. The management node updates the communication between working nodes and service nodes originally belonging to different servers to: communication between working nodes and service nodes belonging to the same server, which is conducive to reducing the number of communications that the working node needs to obtain data from the target service node across servers, avoiding the long tail phenomenon in the data communication process, thereby improving the efficiency of working nodes in obtaining data and reducing the time it takes for the computing cluster to execute tasks.
[0006] In the present application, when the working node needs to communicate frequently to obtain data from the service node in the local server, the management node can also change the source identifier to be accessed by the working node to the target identifier, which is managed by the service node in other servers, so that the management node updates the communication between the working node and the service node originally belonging to the same server to: the communication between the working node and the service node belonging to other servers, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of the working node in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0007] Optionally, the above tasks include: at least one of distributed sparse query or model training.
[0008] In an optional implementation manner, the data identifier managed by each of the aforementioned multiple service nodes is a continuous identifier.
[0009] In one possible scenario, the aforementioned first management node performs a preset operation based on the source identifier of the first data and the number of service nodes to determine the target identifier corresponding to the source identifier, and determines the target service node corresponding to the target identifier, including: the first management node performs a modulo operation on the source identifier with the number of service nodes as the modulus, and determines the target service node based on the obtained modulus; and the first management node divides the source identifier by the number of service nodes, rounds the result, and adds the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0010] The management node performs a modulo operation on the source identifier with the number of service nodes as the modulus, and then determines the target service node based on the obtained modulus. When the working node pulls a set of continuous source identifiers, the target identifiers corresponding to each continuous source identifier will be managed by different service nodes in sequence, which is conducive to balancing the number of communications between the working node and each service node, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of working nodes in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0011] In another possible scenario, the data communication management method provided by the present application also includes: the first management node counts the number of times all data identifiers managed by multiple service nodes are read, sorts them according to the number of times, and takes the first N data identifiers as an identifier set; and, after receiving the first data acquisition request, the first management node determines whether the source identifier belongs to the identifier set.
[0012] In response to the source identifier belonging to the identifier set, the aforementioned first management node performs a preset operation based on the source identifier of the first data and the number of service nodes to determine the target identifier corresponding to the source identifier, and determines the target service node corresponding to the target identifier, including: the first management node performs a modulo operation on the ranking of the source identifier in the identifier set with the number of service nodes as the modulus, and determines the target service node based on the obtained modulus; and the first management node divides the ranking of the source identifier in the identifier set by the number of service nodes, rounds the result, and adds the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0013] The management node uses the data identifiers that are read more frequently as an identifier set, and when the source identifier belongs to the identifier set, a modulo operation is performed on the ranking of the source identifier in the identifier set with the number of service nodes as the modulus. The target service node is determined based on the obtained modulus, so that when the working node pulls a group of source identifiers that are all in the identifier set, the corresponding target identifiers of each source identifier will be managed by different service nodes according to the ranking, which is conducive to balancing the number of communications between the working node and each service node, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of working nodes in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0014] As an optional implementation method, before the first management node sends the target identifier to the target service node, the data communication management method provided by the present application also includes: in response to the source identifier belonging to the identifier set, the first management node sends a memory creation instruction to the target service node corresponding to the target identifier. In response to the target service node receiving the memory creation instruction, the target service node responds to the memory creation instruction to create a sorted memory, and the sorted memory includes: a group of continuous data identifiers generated based on m data identifiers in the identifier set, where m is less than N. In the present application, the target service node creates a sorted memory for the target identifier corresponding to each data identifier in the identifier set, so that the sorted memory of this part of the target identifier will be independent of the memory of other data identifiers, and the service node can continuously apply for memory space, avoiding the problem of low efficiency caused by the discrete activation of each memory space in the cluster, reducing the difficulty of maintaining each memory space in the cluster, and further improving the performance of the management method provided by the present application in solving the data skew problem.
[0015] As another optional implementation, before the first management node uses the first N as an identification set, the data communication management method provided by the present application also includes: the first management node counts the number of steps of multiple working nodes in executing the data acquisition task, and when the counted number of steps reaches the step threshold, the first N data identifications are used as an identification set. The management node only screens the number of reads of each data identification that has been counted after executing a certain number of steps, thereby determining the above-mentioned identification set, and adopts different identification mapping methods for the data identifications in the identification set, so that the service node can apply for a continuous memory space for the target identification corresponding to the data identification in the identification set, avoiding the problem of low efficiency caused by the discrete activation of each memory space in the cluster, and reducing the difficulty of maintaining each memory space in the cluster.
[0016] In the second aspect, the present application provides a computing cluster. The computing cluster includes multiple working nodes, multiple service nodes and multiple management nodes, and the multiple working nodes, multiple service nodes and multiple management nodes are deployed on multiple servers, each server is deployed with a management node, and each service node manages multiple data identifiers. The first management node in a server included in the multiple servers is used to: obtain a first data acquisition request of a first working node among the multiple working nodes, and the first data acquisition request includes a source identifier of the first data to be obtained. The first management node is used to: perform a preset operation according to the source identifier of the first data and the number of service nodes to determine the target identifier corresponding to the source identifier, and determine the target service node corresponding to the target identifier. And, send the target identifier to the target service node. The target service node is used to: obtain the second data according to the target identifier, and send the second data to the first working node.
[0017] In the process of working nodes obtaining data from service nodes, the management node will map the identifier of the data, such as the target identifier corresponding to the source identifier generated by the management node, and the service node to which the target identifier belongs will read the data. When the total amount of data to be pulled by each working node remains unchanged, the total number of communications for each working node to pull data from each service node remains unchanged. The management node updates the communication between working nodes and service nodes originally belonging to different servers to: communication between working nodes and service nodes belonging to the same server, which is conducive to reducing the number of communications that working nodes need to cross servers to obtain data from target service nodes, avoiding the long tail phenomenon in the data communication process, thereby improving the efficiency of working nodes in obtaining data and reducing the time it takes for computing clusters to execute tasks. In addition, when the working node needs to communicate frequently to obtain data from the service node in the local server, the management node can also change the source identifier that the working node wants to access to the target identifier, which is managed by the service node in other servers, so that the management node updates the communication between the working node and the service node originally belonging to the same server to: the communication between the working node and the service node belonging to other servers, avoiding the problem of data skew when different working nodes access data, improving the efficiency of working nodes in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0018] In an optional implementation manner, the data identifier managed by each service node in the multiple service nodes is a continuous identifier.
[0019] As a possible example, the first management node is specifically used to: perform a modulo operation on the source identifier with the number of service nodes as the modulus, and determine the target service node according to the obtained modulus. And, divide the source identifier by the number of service nodes, round it up, and add the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0020] As another possible example, the first management node is also used to: count the number of times all data identifiers managed by multiple service nodes are read, and sort them according to the number of times, and use the first N data identifiers as an identifier set; after receiving the first data acquisition request, determine whether the source identifier belongs to the identifier set. The first management node is specifically used to: in response to the source identifier belonging to the identifier set, perform a modulo operation on the ranking of the source identifier in the identifier set with the number of service nodes as the modulus, and determine the target service node based on the obtained modulus. And, divide the ranking of the source identifier in the identifier set by the number of service nodes and round it up, and add the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0021] In an optional implementation, before the first management node sends the target identifier to the target service node, the first management node is further used to: in response to the source identifier belonging to the identifier set, send a memory creation instruction to the target service node corresponding to the target identifier. The target service node is further used to: create a sorted memory in response to the memory creation instruction, the sorted memory including: a group of continuous data identifiers generated based on m data identifiers in the identifier set, where m is less than N.
[0022] In an optional implementation, the first management node is further used to: count the number of steps taken by multiple working nodes to execute the data acquisition task, and when the counted number of steps reaches a step threshold, use the first N data identifiers as an identifier set.
[0023] In a third aspect, the present application provides a server. The server includes: a processor and an interface circuit. The interface circuit is used to receive a signal from a server other than the server and transmit it to the processor, or send a signal from the processor to a server other than the server. The processor and the interface circuit are used to implement: the method in the first aspect or any optional implementation of the first aspect through a logic circuit or execution code instructions.
[0024] In a fourth aspect, the present application provides a cluster. The cluster includes: multiple servers provided in the third aspect, a shared storage space is established between the multiple servers, and the storage space is used to store data that the multiple servers need to access to perform tasks. Furthermore, the cluster can be used to implement the method in the above-mentioned first aspect or any optional implementation of the first aspect.
[0025] In a fifth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a communication device, the method in the first aspect or any optional implementation of the first aspect is implemented. For example, the communication device may refer to the server provided in the third aspect.
[0026] In a sixth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the operation steps of the method described in the first aspect or any possible implementation of the first aspect. For example, the computer is a server.
[0027] In a seventh aspect, the present application provides a chip system. The chip system includes a processor for implementing the function of the processor in the method of the first aspect. In a possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system may be composed of a chip, or may include a chip and other discrete devices. For example, the chip system is a server.
[0028] The beneficial effects of the second to seventh aspects above can refer to the description of any implementation in the first aspect, and will not be repeated here. Based on the implementation provided by the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of the structure of a cluster provided for this application;
[0030] Figure 2A A schematic diagram of a cluster framework provided for this application;
[0031] Figure 2B A schematic diagram of the structure of a management node provided for this application;
[0032] Figure 3 A schematic diagram of a model training process provided for this application;
[0033] Figure 4 A schematic diagram of a data communication management method provided in this application Figure 1 ;
[0034] Figure 5 A schematic diagram of an identification mapping provided for this application Figure 1 ;
[0035] Figure 6 A second flowchart of a data communication management method provided in this application;
[0036] Figure 7 Schematic diagram 2 of an identification mapping provided for this application;
[0037] Figure 8 A schematic diagram of an identification mapping provided for this application Figure 3 ;
[0038] Fig. 9 A schematic diagram of the structure of a server provided for this application. DETAILED DESCRIPTION
[0039] The technical solutions involved in this application may not only be applied to model training tasks in distributed systems, but may also be applied to sparse data query tasks (distributed sparse queries) in distributed systems. The terms used in the implementation methods of this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The following is a brief introduction to some concepts that may be involved in this application.
[0040] Parameter server (PS), a widely used architecture in distributed training, has better flexibility, scalability and node disaster recovery capabilities. In terms of scalability, the calculation and update of the model are deployed in two types of processes, the worker node (worker) and the server node (server), respectively, so that the resources of the worker and server can be independently scaled horizontally. In addition, in the environment of large-scale data centers (DC), various failures often occur in working nodes, networks, and storage devices, causing some nodes to be abnormal. Under the PS architecture, such failures can be handled more easily without affecting the tasks in training.
[0041] Embedding: A dense vector representation that converts natural language into a string of numbers, from which natural language can be calculated.
[0042] The data communication management method provided by the present application is described below in conjunction with the accompanying drawings.
[0043] like Figure 1 As shown, Figure 1 A schematic diagram of a cluster structure provided in the present application. The cluster 110 communicates with the client 120 via a network 130, which may be the Internet or other networks (such as Ethernet). The network 130 may include one or more network devices, which may be routers or switches.
[0044] The client 120 may be a computer running an application program, and the computer running the application program may be a physical machine or a virtual machine.
[0045] For example, if the computer running the application is a physical machine, the physical machine can be a server or a terminal. Among them, the terminal can also be called a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal can be a mobile phone, a tablet computer, a laptop computer, a desktop computer, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the client 120.
[0046] As another example, the computer running the application is a virtual machine (VM), and the client 120 may be a software module running on any one or more servers in the cluster 110 .
[0047] Cluster 110 refers to a collection of computers connected via a local area network or the Internet, which is usually used to execute large tasks (also referred to as jobs). Jobs here are usually large jobs that require more computing resources to be processed in parallel. This embodiment does not limit the nature and number of jobs. A job may contain multiple computing tasks, which can be assigned to multiple computing resources for execution. Most tasks are executed concurrently or in parallel, while some tasks need to rely on data generated by other tasks. Each server in the cluster uses the same hardware and the same operating system; alternatively, different hardware and different operating systems can be used in the servers of the cluster according to business needs.
[0048] The multiple servers included in the cluster 110 cooperate to execute the task, thereby avoiding the problem of large processing delay caused by the task being executed by only one server, and the task can be executed concurrently by multiple servers, thereby improving the execution efficiency of the task.
[0049] like Figure 1As shown, cluster 110 includes multiple servers, such as server 111 to server 114, each of which can provide computing resources. For a server, it can include multiple processors or processor cores, each of which can be a computing resource, so a server can provide multiple computing resources. For example, a server can refer to a client server or a server server.
[0050] Cluster 110 can process various types of jobs. This embodiment does not limit the number of tasks and the data of tasks that can be executed in parallel. For example, the above-mentioned jobs refer to hot migration of virtual machines, master-slave backup between servers, or resource scheduling (or resource allocation), model training, distributed sparse query, etc. The job can be generated by the client and submitted to the computer cluster for execution, such as submitted to one or more servers in the cluster for execution. Specifically, this application does not limit the location of submitting the business.
[0051] exist Figure 1 In the example, a job can be submitted from a client 120 to a cluster 110 via a network 130. For example, a job can be submitted to a server 111. When a job is submitted to a server 111, the server 111 can be used to manage all servers in the cluster 110 to complete one or more tasks included in the job, such as scheduling computing resources or storage resources of other servers. For another example, a job can also be submitted to other servers in the cluster 110.
[0052] It is worth noting that Figure 1 This is just a schematic diagram. The cluster 110 may also include other devices. Figure 1 Not shown, the embodiments of the present application do not limit the number and type of servers and clients included in the system. In some feasible implementations, the servers included in the cluster 110 can also use virtualization technology to process the resources provided by the hardware in the cluster 110 to obtain one or more resource pools, and the resources included in one of the resource pools can be provided by one or more servers in the cluster 110. Exemplarily, the one or more resource pools may include a memory pool, etc. As an optional implementation, the resource pool provided by the cluster 110 may also include other resource pools, such as a worker node (worker), a service node (server), and a scheduling node (scheduler) supported by the processor in each server, etc.
[0053] In some cases, cluster 110 may support management functions for implementing data communication, such as cluster 110 including working nodes, service nodes, and scheduling nodes. The following example provides a possible hardware implementation method, taking the task to be performed by cluster 110 as model training, and the servers involved in the model training including server 111 and server 112 as an example. Figure 2A As shown, Figure 2A A schematic diagram of a cluster framework provided for this application. Taking server 111 as an example, the hardware structure of each server in the cluster is exemplified: server 111 includes multiple working nodes (such as working node 0 and working node m), one or more service nodes (such as service node 0), and scheduling node 111A and storage 111B.
[0054] The functions of each node can be implemented by one or more processors, which can be a very large-scale integrated circuit. The processor is installed with an operating system and other software programs, so that the processor can access the memory (memory 111B) and various peripheral component interconnect standards (Peripheral Component Interconnect Express, PCIe) devices. The processor includes one or more processor cores. The processor core in the processor can be, for example, a central processing unit (CPU) or other specific integrated circuits (application specific integrated circuit, ASIC). The processor can also be other general-purpose processors, digital signal processors (digital signal processing, DSP), field programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the processor can also be a dedicated processor for artificial intelligence (artificial intelligence, AI), such as a neural processing unit (neural processing unit, NPU) or a graphics processing unit (graphic processing unit, GPU), etc.
[0055] The scheduling node 111A is used to register the working nodes and service nodes in the cluster 110 and distribute global node information to each working node and service node. The global node information indicates: the server where each working node and service node in the cluster 110 is located, etc. In some possible situations, the global node information is also called the topology information of the cluster.
[0056] The service node is used to store Embedding parameters, aggregate gradients, and update parameters.
[0057] Worker nodes are used to implement functions such as training data acquisition (pre-fetching), data deduplication, parameter pulling, graph execution, and gradient return.
[0058] The Embedding parameter is a sparse parameter, that is, during training, only the part used in training needs to be updated, without updating all the Embedding parameters. During a training process of each working node, only the Embedding parameters required for this training process are pulled to the local working node, and training is performed on this part.
[0059] The memory 111B may be a storage medium for storing information such as identification before and after mapping in the cluster. Exemplarily, the memory 111B may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory or a persistent memory (PMEM). The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0060] The memory 111B is used to store the training data required for model training, the intermediate data generated by the model training, the parameters of the model, etc. In the embodiment provided in the present application, the memory 111B is also used to store the identification of each data, etc. Optionally, when the task to be performed by the cluster is a distributed sparse query, the memory 111B can be used to store the data to be queried.
[0061] like Figure 2A As shown, server 111 and server 112 together provide a memory pool 140 for storing data / object / file, and the memory pool is used to store data or objects or files in cluster 110, where the object or file refers to a group of associated data. For example, the memory (such as DRAM, PMEM) or hard disk included in each server in cluster 110 provides a global address space, and cluster 110 provides a distributed physical address (DPA) space (DPA Space) to the outside, and DPA is mapped to a distributed virtual address (DVA) through a distributed page table (DPT). User files or objects are constructed based on DVA. The application in the host can map files / objects to the address space of the local process by means of distributed memory mapping (distributed mmap). In one possible scenario, the address space used by the data is a page resource, such as a data page; or, the address space used by the data is a block resource, such as a data block; or, the address space used by the data is a segment resource, such as a data segment; or, the address space used by the data is a persistent log (Plog) that supports append-type writing.
[0062] It is worth noting that Figure 2A The illustrated memory pool 140 is implemented by virtualizing one or more memories or hard disks (such as memory 111B and memory 112B) in the cluster 110, but in some possible examples, the memory pool may also be implemented by other storage media in the cluster 110, which is not limited in the present application. In an optional scenario, the memory pool is also referred to as a storage resource pool in the cluster 110.
[0063] The server can implement the management of the above addresses through an application program, such as memory mapping (mmap) management software and other mapping management software.
[0064] In the embodiment of the present application, a management node is deployed in each server. For example, server 111 includes management node 111C, and server 112 includes management node 112C. The management node is used to manage the identification of each data stored in memory pool 140. In some cases, the management node is also called an identification management module (ID manager). Figure 2B A possible example is provided, Figure 2B A schematic diagram of the structure of a management node provided in this application. The management node 200 can be used to implement Figure 2A The management node 200 includes: an ID sorting module 210 , an ID mapping module 220 and a communication module 230 .
[0065] The ID sorting module 210 is used to sort the IDs by buckets, or to rank the IDs and then sort them by buckets.
[0066] The ID mapping module 220 is used to take the modulus of the ID after bucket sorting, or take the modulus of the ID ranking, so as to realize the mapping of the ID. It is worth noting that the ID mapping module 220 can also apply for a dedicated new memory for the ranked ID, and the new memory is used to record the ranked ID and the ID after taking the modulus of the ranked ID, etc.
[0067] The communication module 230 is used to establish connections with working nodes and service nodes to achieve data interaction.
[0068] The names of the above modules are only examples provided in this embodiment and should not be understood as limiting the functions of the modules. In some possible situations, the above modules can also implement other identification management functions, which are not limited in this application. Figures 4 to 8 The relevant description is not repeated here.
[0069] Exemplary, combined Figure 2AThe memory pool 140 in the example illustrates multiple data identifications (IDs) managed by each service node. In order to improve the efficiency of data maintenance in the cluster, thereby improving the performance of the cluster in executing various types of tasks, the address space included in the memory pool 140 will be divided into different storage areas, and each storage area can be used to store the data required to be accessed by the task. In the process of cluster execution of tasks, all the data that each working node needs to access at different stages of the task is determined. Therefore, each working node will obtain the storage location of these data according to the identification of the data that each working node needs to access. Since the cluster uses the address to manage the storage location of the data, in order to improve the overall performance of the cluster, the storage location that can be managed by a service node is limited. The storage location of each data can be marked by the identification of the data, so that after each working node obtains the identification of the data and communicates with the service node that manages the identification, the data required by the working node is pulled through the service node.
[0070] Combination Figure 2A The content shown in the figure takes the working node as the worker in the PS architecture and the service node as the server in the PS architecture as an example to illustrate the model training process. Figure 3 As shown, Figure 3 A schematic diagram of a model training process provided in this application. The model training process includes the following steps A10 to A60.
[0071] A10. Pull parameters: The worker pulls the model parameters that need to be trained from the server and puts them into the training graph.
[0072] A20. Training: It can also be divided into forward propagation (FP) and backward propagation (BP) of the training graph. FP refers to the process of obtaining the predicted value, and BP refers to the process of obtaining the gradient corresponding to the model parameters.
[0073] A30, Gradient Push: The process of transferring the gradient of model parameters from the worker to the server.
[0074] A40, Parameter Update (Update): The process in which the server updates the model parameters based on the gradient.
[0075] In the PS architecture specially designed for sparse embedding parameters, dense parameters and sparse parameters will be treated differently, because the dense parameters in this scenario can generally be completely stored in the high bandwidth memory (HBM) of the NPU / GPU, and the Allreduce method can be used to synchronize dense parameters between multiple NPU / GPU cards without consuming a large amount of bandwidth and server-side processing resources to update the dense parameters each time. The PS architecture training process also includes the following two steps.
[0076] A50, dense allreduce (DA): Each server uses the inter-card network to exchange and synchronize the gradients of dense parameters. The inter-card network refers to the data transmission bandwidth between each NPU / GPU in a single or multiple servers.
[0077] A60, dense Update (DU): Each server updates the dense parameters using the exchanged gradients.
[0078] It is worth noting that the data managed by each server has different identifiers. When the worker and server are located on different servers, the data transmission bandwidth between the worker and the server is low, the worker's efficiency in obtaining data is reduced, and the time required for the worker to calculate the model parameters of the AI application is increased, resulting in an increase in the server's latency in updating the model parameters of the AI application and an increase in the training time of the AI application.
[0079] To at least solve the above problems, Figure 2A Based on the cluster shown, the data communication method provided in the embodiment of the present application is exemplarily described, such as Figure 4 As shown, Figure 4 A schematic diagram of a data communication management method provided in this application Figure 1 The data communication management method can be applied to Figure 1 or Figure 2A The cluster shown can also be used to implement Figure 3 The model training process shown in the figure, the data communication management method is executed by each node included in the server, here with Figure 2A The cluster in the embodiment executes the data communication management method provided in this embodiment as an example for explanation. For the introduction of each node, please refer to Figure 2A The description is not repeated here.
[0080] In this embodiment, the tasks performed by each node in the cluster include: at least one of distributed sparse query or model training.
[0081] When the task to be performed by the cluster is a model training task, the data may refer to model parameters or training data to be used for training the model.
[0082] When the task to be performed by the cluster is a distributed sparse query, the data may refer to data to be queried, etc.
[0083] See also Figure 4 The data communication management method provided in this embodiment includes steps S410 to S440.
[0084] S410. The management node 111C obtains a first data acquisition request from a working node 0 among multiple working nodes.
[0085] The first data acquisition request includes a source identifier of the first data to be acquired.
[0086] Exemplarily, the address space where the first data is located may be provided by the aforementioned memory pool 140. If the source identifier of the first data is 120000, the identifiers managed by service node 0 include: 0-99999, and the identifiers managed by service node 1 include: 100000-199999, then the identifier 120000 is managed by service node 1, and the address space used by service node 1 is address space 2, then the first data corresponding to the identifier 120000 is stored in address space 2.
[0087] S420. The management node 111C performs a preset operation according to the source identifier of the first data and the number of service nodes to determine a target identifier corresponding to the source identifier, and determines a target service node corresponding to the target identifier.
[0088] In this embodiment, the number of service nodes is 2. However, in some optional examples, the number of service nodes may also be other values, such as 3, 50 or other values, which is not limited in this application.
[0089] Combination Figure 2B The modules included in the management node, the ID sorting module 210 and the ID mapping module 220 can be used to collaboratively implement the above S420 function. For the preset operation identified in S420, the following Figure 5 An embodiment of bucket-by-bucket modulus is provided. Figure 6 , Figure 7 An embodiment of performing bucketing and modulo operation on the ranking of data identifiers is provided, which will not be described in detail here.
[0090] S430. The management node 111C sends a target identifier to the target service node.
[0091] Combination Figure 2BTaking the management node in the example, the communication module 230 may be used to send the target identifier to the target service node to which the target identifier belongs. Figure 4 As shown, the target service node may refer to service node 0.
[0092] S440 . The target service node (service node 0 ) obtains the second data according to the target identifier, and sends the second data to the working node 0 .
[0093] Combination Figure 2A In the cluster shown, the address space in which the second data is stored may refer to address space 1 managed by service node 0 .
[0094] In this embodiment, for the process of the working node obtaining data from the service node, the management node will map the identifier of the data, such as the target identifier corresponding to the source identifier of the data generated by the management node, and the service node to which the target identifier belongs will read the data. When the total amount of data to be pulled by each working node remains unchanged, the total number of communications for each working node to pull data from each service node remains unchanged. The management node updates the communication between the working nodes and service nodes originally belonging to different servers to: the communication between the working node and the service node belonging to the same server, which is conducive to reducing the number of communications that the working node needs to obtain data from the target service node across servers, avoiding the long tail phenomenon in the data communication process, thereby improving the efficiency of the working node in obtaining data and reducing the time it takes for the computing cluster to execute tasks.
[0095] above Figure 4 The embodiment shown in is explained by taking the example that the source identifier is managed by a service node in a server different from the working node and the target identifier is managed by a service node in the same server as the working node. However, in the case where the working node needs to communicate more frequently to obtain data from the service node in the local server, the management node can also change the source identifier to be accessed by the working node to the target identifier, which is managed by the service node in other servers, so that the management node updates the communication between the working node and the service node originally belonging to the same server to: communication between the working node and the service nodes in other servers, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of the working node in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0096] Regarding the calculation process of the identifier in S420, two possible implementation methods are provided below, taking the case where the data identifier managed by each service node is a continuous identifier as an example.
[0097] In a first possible implementation, the management node 111C performs bucketing modulo based on the source identifier and the number of service nodes. Exemplarily, the above S420 may include: the management node 111C performs a modulo operation on the source identifier with the number of service nodes as the modulus, and determines the target service node according to the obtained modulus; and the management node 111C divides the source identifier by the number of service nodes, rounds it up, and adds the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0098] Combine the following Figure 5 The contents of Table 1 and Table 2 are used to exemplify the process of the management node 111C performing bucketing and modulus extraction. Figure 5 As shown, Figure 5 A schematic diagram of an identification mapping provided for this application Figure 1 Service node 0 and worker node 0 are deployed on server 111, service node 1 and worker node 1 are deployed on server 112, the identifiers managed by service node 0 include: 0~99999, and the identifiers managed by service node 1 include: 100000~199999. For the identifiers of the data that worker node 0 needs to access, the contents before and after the mapping can be referred to Figure 5 And the contents shown in Table 1 below.
[0099] Table 1
[0100]
[0101] Exemplarily, the identification mapping process includes: bucketing and modulo.
[0102] During the bucketing process, the management node in the server uses the following formula 1 (fun_mod) to process the identification of the data that the working node 0 needs to access.
[0103] block=ID%num Formula 1
[0104] Among them, ID refers to the value of the source identifier, block is the bucket number (the bucket number indicates: the service node to which the target identifier belongs), and num is the number of service nodes used in the cluster to execute the task. Figure 5 In the formula, num is 2, and all identifiers are divided into 2 buckets (the first bucket is service node 0, and the second bucket is service node 1). Taking the source identifier ID=9 before mapping as an example, block=9%2=1, the data corresponding to the source identifier ID=9 will be divided into service node 1 for data pulling. This formula 1 can be used to determine the target service node to which the target identifier determined after mapping the source identifier belongs.
[0105] During the modulo process, the management node processes the source identifier of the data that the working node 0 needs to access using the following formula 2 (fun_map).
[0106] newID=ID / num+start[ID %num] Formula 2
[0107] Wherein, ID refers to the value of the source identifier (also called: old ID or original ID, etc.), newID is the mapped target identifier (also called: new ID or target ID, etc.), start[...] is the starting value (starting identifier, i.e., the first data identifier) of the identifier managed by the corresponding service node corresponding to the source ID modulo num, and num is the number of service nodes used in the process of cluster task execution. Formula 2 can be used to determine the specific value of the target identifier determined after mapping the source identifier.
[0108] Here, the source ID that work node 0 needs to access is source ID = 9. The ID%num = 9%2 = 1, and the starting value of the ID corresponding to service node 1 is 100000, so newID = 9 / 2 + 100000 = 100004. That is, after the ID mapping, work node 1 operates on the new ID = 100004, and the address space actually operated is the address space corresponding to source ID = 9, such as Figure 5 The address space 1 in the cluster is used to change the local communication process (worker node 0 communicates with service node 0 to execute the data pulling process) to the cross-server communication process (worker node 0 communicates with service node 1 to execute the data pulling process), achieving a communication balance between the local data transmission times and the cross-server data transmission times in the cluster.
[0109] For the identification of the data that the working node 1 needs to access, the content before and after the mapping can refer to Figure 5 and the contents shown in Table 2 below.
[0110] Table 2
[0111]
[0112] The mapping process of the above identifiers can refer to the relevant description in Table 1 and will not be repeated here.
[0113] In this embodiment, the management node performs a modulo operation on the source identifier with the number of service nodes as the modulus, and then determines the target service node based on the obtained modulus, so that when the working node pulls a group of continuous source identifiers, the target identifiers corresponding to each continuous source identifier will be managed by different service nodes in sequence, which is conducive to balancing the number of communications between the working node and each service node, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of working nodes in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0114] Combination Figure 5 , Table 1 and Table 2 are used to illustrate the beneficial effects of this embodiment. In the data communication process before the identification mapping, work node 0 pulls data from service node 0 6 times and from service node 1 2 times, work node 1 pulls data from service node 0 6 times and from service node 1 0 times, and there is a problem of data skew. In the data communication process after the identification mapping, work node 0 pulls data from service node 0 4 times and from service node 1 4 times, work node 1 pulls data from service node 0 3 times and from service node 1 3 times, achieving balanced communication between servers and solving the problem of data skew.
[0115] In a second possible implementation, after the management node 111C sorts the data identifiers, it performs bucket modulo ranking for the source identifiers with the highest ranking. Figure 4 Based on this, this embodiment provides a possible example, such as Figure 6 As shown, Figure 6 The second flowchart of a data communication management method provided by the present application is as follows: Before the above-mentioned S420, S413 and S414 are executed.
[0116] S413. The management node 111C counts the number of times all data identifiers managed by the multiple service nodes are read, sorts them according to the number of times, and takes the first N data identifiers as an identifier set.
[0117] Exemplarily, the value of N can be set according to user needs, such as N being 100 or other positive integers.
[0118] In some optional examples, the identification set may also be referred to as a sorted list. The data identifications included in the identification set are used to indicate: data with a high access frequency during the cluster execution of tasks.
[0119] In an optional embodiment, before the management node determines the identification set, the data communication management method provided in this embodiment further includes: the management node 111C counts the number of steps of multiple working nodes in executing the data acquisition task, and when the counted number of steps reaches the step threshold, the first N data identifications are used as the identification set. The step number here refers to the round of executing the task in the cluster. The step threshold can be a value set by the user, such as 100 steps, 10,000 steps or other values.
[0120] It should be understood that the management node 111C only screens the counted reading times of each data identifier after executing a certain number of steps, so as to determine the above-mentioned identifier set, and adopts different identifier mapping methods for the data identifiers in the identifier set, so that the service node can apply for a continuous memory space for the target identifier corresponding to the data identifier in the identifier set, avoiding the low efficiency problem caused by the discrete activation of each memory space in the cluster, and reducing the difficulty of maintaining each memory space in the cluster.
[0121] S414: After receiving the first data acquisition request, the management node 111C determines whether the source identifier belongs to the identifier set.
[0122] If the source identifier does not belong to an identifier combination, the target identifier corresponding to the source identifier is generated according to the method steps in the first possible implementation mode, which will not be described in detail. If the source identifier belongs to an identifier set, the management node 111C executes sub-steps S421 and S422 included in S420.
[0123] S421. The management node 111C performs a modulo operation on the ranking of the source identifier in the identifier set with the number of service nodes as the modulus, and determines the target service node according to the obtained modulo.
[0124] In this embodiment, the number of service nodes is 2.
[0125] S422. The management node 111C divides the ranking of the source identifier in the identifier set by the number of service nodes, rounds up the result, and adds the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
[0126] Optionally, before the management node 111C sends the target identifier to the target service node, the data communication management method provided in this embodiment also includes: in response to the source identifier belonging to the identifier set, the management node 111C sends a memory creation instruction to the target service node corresponding to the target identifier; and, the target service node creates a sorted memory in response to the memory creation instruction, and the sorted memory includes: a group of continuous data identifiers generated based on m data identifiers in the identifier set, where m is less than N.
[0127] For example, the sorting memory in the service node 0 is address space 3, and the sorting memory in the service node 1 is address space 4. The storage capacities of address space 3 and address space 4 are both provided by the aforementioned memory pool 140.
[0128] In this embodiment, the target service node creates a sorting memory for the target identifier corresponding to each data identifier in the identifier set, so that the sorting memory of this part of the target identifier will be independent of the memory of other data identifiers. The service node can continuously apply for memory space, avoiding the low efficiency caused by the discrete activation of each memory space in the cluster, reducing the maintenance difficulty of each memory space in the cluster, and further improving the performance of the management method provided by this application in solving the data skew problem.
[0129] Combine the following Figure 7 The contents of Table 3 and Table 4 are used to illustrate the process of the management node 111C performing bucketing and modulo (S421 and S422). Figure 7 As shown, Figure 7 Schematic diagram 2 of an identification mapping provided for this application. For an introduction to each node, please refer to Figure 5 , which will not be described here. For the identification of the data that the work node 0 needs to access, the content before and after the mapping can be referred to Figure 7 and the contents shown in Table 3 below.
[0130] Table 3
[0131]
[0132] Exemplarily, the identification mapping process includes: sorting, bucketing and modulo.
[0133] During the bucketing and sorting process, the management node in the server processes the source identifier of the data that the working node 0 needs to access using the following formula 3 (fun_mod_rank).
[0134] block=rank%num Formula 3
[0135] Among them, rank refers to the ranking of the call frequency of the source ID (the data identifier with a ranking in the identifier set can also be called the sorting ID), block is the bucket number, and num is the number of service nodes used in the cluster to execute the task.
[0136] In the modulo process, the management node processes the source identifier of the data that the working node 0 needs to access using the above formula 2 or the following formula 4 (fun_map_rank).
[0137] newID=rank / num+start2[rank%num] Formula 4
[0138] Among them, rank refers to the ranking of the calling frequency of the source ID (that is, the ranking of the source ID in the identifier set), newID is the mapped identifier (target identifier), start2[...] is the starting value of the identifier managed by the service node corresponding to the sorted ID modulo num (starting identifier), and num is the number of service nodes used in the cluster to execute the task.
[0139] In this embodiment, if the call frequency corresponding to source ID=9 and original=1500 is greater than or equal to the threshold, the above formula 4 can be used for identification mapping, and the other source IDs can be mapped using the above formula 2. When using formula 4 for identification, num=2, start2[0]=0, start2[1]=100. The ranking of source ID=9 is 3, and the mapped target ID is 101 (3 / 2+100=101).
[0140] For the identification of the data that the working node 1 needs to access, the content before and after the mapping can refer to Figure 7 and the contents shown in Table 4 below.
[0141] Table 4
[0142]
[0143] The mapping process of the above identifiers can refer to the relevant description in Table 3, which will not be repeated here.
[0144] In this embodiment, the data identifiers that are read more frequently by the management node are taken as an identifier set, and when the source identifier belongs to the identifier set, a modulo operation with the number of service nodes as the modulus is performed on the ranking of the source identifier in the identifier set, and the target service node is determined according to the obtained modulus. When the working node pulls a group of source identifiers that are all in the identifier set, the corresponding target identifiers of each source identifier will be managed by different service nodes according to the ranking, which is conducive to balancing the number of communications between the working node and each service node, thereby avoiding the problem of data skew when different working nodes access data, improving the efficiency of the working node in obtaining data, and reducing the time it takes for the computing cluster to execute tasks.
[0145] Combination Figure 7, Table 3 and Table 4 are used to exemplify the beneficial effects of this embodiment. In the data communication process before the identification mapping, work node 0 pulls data from service node 0 6 times and from service node 1 2 times, work node 1 pulls data from service node 0 6 times and from service node 1 0 times, and there is a problem of data skew. In the data communication process after the identification mapping, work node 0 pulls data from service node 0 4 times (3 times from address space 1 and 1 time from address space 3) and from service node 1 4 times (3 times from address space 2 and 1 time from address space 4), work node 1 pulls data from service node 0 3 times and from service node 1 3 times, achieving balanced communication between servers and solving the problem of data skew.
[0146] The following takes the task of cluster training as an example, and provides a possible specific example of the identification mapping process provided in this embodiment in combination with the above-mentioned figures. Figure 8 A schematic diagram of an identification mapping provided for this application Figure 3 The identification mapping process includes the following S810 to S870.
[0147] S810: The management node notifies each service node in the cluster to create a host dense vector table (host Embedding table).
[0148] The host Embedding table records the identifiers of the data that each working node needs to access to perform model training tasks. The host Embedding table is distributed across service nodes in the cluster. For example, the Embedding ID range is 0 to 199999. IDs 0-99999 are managed by service node 0, and 100000-199999 are managed by service node 1.
[0149] S820. The management node pulls the deduplicated training IDs from each working node.
[0150] S830: The management node determines whether the pulled training ID reaches the statistical step number.
[0151] If the number of statistical steps is not reached, the ID is filtered and the current identification mapping process ends. If the number of statistical steps is reached, S840 is executed.
[0152] S840: The management node determines whether the training ID is in the sorted list.
[0153] If not, execute S851; if so, execute S861.
[0154] S851: The management node sorts the training IDs by buckets. Please refer to the above formula 1, which will not be described in detail here.
[0155] S852: The management node performs modulo operation on the training ID. Please refer to the above formula 2 for details, which will not be described in detail here.
[0156] S861: The management node ranks and bucket-sorts the training IDs. Please refer to the above formula 3, which will not be described in detail here.
[0157] S862: The management node determines whether to create a sort memory. The sort memory is used to store IDs whose call frequency is greater than or equal to a threshold, such as the ID before mapping ID=9 and the ID before mapping ID=1500 in Table 3.
[0158] If not, execute S863; if so, execute S864.
[0159] S863, the management node notifies the service node to create a ranking dense vector table (rank Embedding table). The rank Embedding table is a data structure stored in the ranking memory, used to record the above-mentioned IDs with a call frequency greater than or equal to the threshold and the ranking list.
[0160] S864: The management node modulos the ranking of the training ID. Please refer to the content of the above formula 4, which will not be described in detail here.
[0161] S870. The management node notifies each service node to pull data.
[0162] In summary, the embodiment provided by the present application adds a management node (ID manager) in the cluster, and maps the identifiers of each data so that the mapped identifiers belong to other service nodes. The service nodes that each working node in the cluster needs to communicate with to pull data are changed, which solves the problem of data skew in the cluster, helps to shorten the time for each working node to pull data, and improves the efficiency of cluster task execution. Moreover, for IDs with sorting requirements, the management node also applies for a new address space for these IDs (such as Figure 7 The new address space and the address space of the data required for each working node to perform tasks are located in different storage spaces, which helps to reduce the maintenance difficulty of each address space in the cluster and further improve the performance of the management method provided in this application in solving the data skew problem.
[0163] It is understandable that in order to implement the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0164] It should be understood that the management node of the embodiment of the present application can be implemented by a DPU. The management node according to the embodiment of the present application can correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each unit in the management node are respectively for implementing the corresponding processes of each method in the above figures, which will not be repeated here for the sake of brevity.
[0165] Combined with the above Figures 1 to 8 , describes in detail the data communication management method provided according to this embodiment, and the server provided by this application will be described in conjunction with the accompanying drawings.
[0166] Fig. 9 A schematic diagram of the structure of a server provided in the present application. As shown in the figure, the server 900 includes a processor 910, a bus 920, a memory 930, a memory unit 950 (also referred to as a main memory unit), and a communication interface 940. The processor 910, the memory 930, the memory unit 950, and the communication interface 940 are connected via a bus 920.
[0167] It should be understood that in this embodiment, the processor 910 may be a CPU, and the processor 910 may also be other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, NPUs, GPUs, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0168] The communication interface 940 is used to implement communication between the server 900 and an external device or component. In this embodiment, the communication interface 940 is used to exchange data with other servers.
[0169] The bus 920 may include a path for transmitting information between the above components (such as the processor 910, the memory unit 950, and the memory 930). In addition to the data bus, the bus 920 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 920 in the figure. The bus 920 may be a PCIe bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc.
[0170] As an example, the server 900 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions). The processor 910 may call the program instructions stored in the memory 930 to execute the method steps in the above embodiment.
[0171] It is worth mentioning that Fig. 9 In the example, a server 900 including one processor 910 and one memory 930 is taken. Here, the processor 910 and the memory 930 are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to business requirements.
[0172] The memory unit 950 may correspond to the storage medium for storing information such as the identification of each data in the cluster in the above method embodiment. The memory unit 950 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a ROM, a PROM, an EPROM, an EEPROM, or a flash memory. The volatile memory may be a RAM, which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM, and DR RAM.
[0173] The memory 930 is used to store the identification set, the mapped target identification, etc., and can be a solid state drive or a mechanical hard disk.
[0174] It should be understood that the server 900 may be a DPU. The server 900 according to this embodiment may correspond to the management device 1000 in this embodiment, and may correspond to the corresponding subject executing the method embodiment in the aforementioned figures, and the above and other operations and / or functions of each module in the management device 1000 are respectively for implementing the corresponding processes of the method embodiment in the aforementioned figures, and for the sake of brevity, they are not repeated here.
[0175] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.
[0176] The present application also provides a chip system, which includes a processor for implementing the functions of the data processing unit in the above method. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0177] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0178] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data communication management method, characterized in that: The method is applied to a computing cluster, the cluster includes multiple working nodes, multiple service nodes and multiple management nodes, the multiple working nodes, the multiple service nodes and the multiple management nodes are deployed on multiple servers, each server is deployed with a management node, and each service node manages multiple data identifiers, the method includes: A first management node in a server included in the multiple servers obtains a first data acquisition request of a first working node among the multiple working nodes, where the first data acquisition request includes a source identifier of first data to be acquired; The first management node performs a preset operation according to the source identifier of the first data and the number of the service nodes to determine a target identifier corresponding to the source identifier, and determines a target service node corresponding to the target identifier; The first management node sends the target identifier to the target service node; The target service node obtains second data according to the target identifier, and sends the second data to the first working node.
2. The method according to claim 1, characterized in that The data identifier managed by each service node in the plurality of service nodes is a continuous identifier; The first management node performs a preset operation according to the source identifier of the first data and the number of the service nodes to determine a target identifier corresponding to the source identifier, and determines a target service node corresponding to the target identifier, including: The first management node performs a modulo operation on the source identifier with the number of the service nodes as a modulus, and determines the target service node according to the obtained modulo; The first management node divides the source identifier by the number of the service nodes, rounds the result to an integer, and adds the integer to the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
3. The method according to claim 1 or 2, characterized in that: The data identifier managed by each service node in the plurality of service nodes is a continuous identifier, and the method further includes: The first management node counts the number of times all data identifiers managed by the multiple service nodes are read, and sorts them according to the number of times, and takes the first N data identifiers as an identifier set; After receiving the first data acquisition request, the first management node determines whether the source identifier belongs to the identifier set; In response to the source identifier belonging to the identifier set, the first management node performs a preset operation according to the source identifier of the first data and the number of the service nodes to determine the target identifier corresponding to the source identifier, and determines the target service node corresponding to the target identifier, including: The first management node performs a modulo operation on the ranking of the source identifier in the identifier set with the number of the service nodes as a modulus, and determines the target service node according to the obtained modulo; The first management node divides the ranking of the source identifier in the identifier set by the number of the service nodes, rounds the result, and adds the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
4. The method according to claim 3, characterized in that: Before the first management node sends the target identifier to the target service node, the method further includes: In response to the source identifier belonging to the identifier set, the first management node sends a memory creation instruction to a target service node corresponding to the target identifier; The target service node creates a sorted memory in response to the memory creation instruction, wherein the sorted memory includes: a group of continuous data identifiers generated based on m data identifiers in the identifier set, where m is less than N.
5. The method according to claim 3 or 4, characterized in that: Before the first management node uses the first N as the identifier set, the method further includes: The first management node counts the number of steps taken by the multiple working nodes to execute the data acquisition task, and when the counted number of steps reaches a step threshold, uses the first N data identifiers as an identifier set.
6. A computing cluster, characterized in that: The computing cluster includes multiple working nodes, multiple service nodes and multiple management nodes, the multiple working nodes, the multiple service nodes and the multiple management nodes are deployed on multiple servers, a management node is deployed on each server, and each service node manages multiple data identifiers; A first management node in a server included in the multiple servers is used to: obtain a first data acquisition request of a first working node among the multiple working nodes, where the first data acquisition request includes a source identifier of first data to be acquired; The first management node is used to: perform a preset operation according to the source identifier of the first data and the number of the service nodes to determine the target identifier corresponding to the source identifier, and determine the target service node corresponding to the target identifier; and send the target identifier to the target service node; The target service node is used to: obtain second data according to the target identifier, and send the second data to the first working node.
7. The computing cluster according to claim 6, characterized in that: The data identifier managed by each service node in the plurality of service nodes is a continuous identifier; The first management node is specifically used to: perform a modulo operation on the source identifier with the number of service nodes as the modulus, and determine the target service node based on the obtained modulus; and divide the source identifier by the number of service nodes, round up the result, and add the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
8. The computing cluster according to claim 6 or 7, characterized in that: The data identifier managed by each service node in the plurality of service nodes is a continuous identifier; The first management node is further used to: count the number of times all data identifiers managed by the multiple service nodes are read, sort them according to the number of times, and use the first N data identifiers as an identifier set; The first management node is further used to: after receiving the first data acquisition request, determine whether the source identifier belongs to the identifier set; The first management node is specifically used for: in response to the source identifier belonging to the identifier set, performing a modulo operation on the ranking of the source identifier in the identifier set with the number of service nodes as the modulus, and determining the target service node according to the obtained modulus; and, dividing the ranking of the source identifier in the identifier set by the number of service nodes, rounding the result, and adding the first data identifier among the multiple data identifiers managed by the target service node to obtain the target identifier.
9. The computing cluster according to claim 8, characterized in that: Before the first management node sends the target identifier to the target service node, the first management node is further used to: in response to the source identifier belonging to the identifier set, send a memory creation instruction to the target service node corresponding to the target identifier; The target service node is further used to: create a sorted memory in response to the memory creation instruction, and the sorted memory includes: a group of continuous data identifiers generated based on m data identifiers in the identifier set, where m is less than N.
10. The computing cluster according to claim 8 or 9, characterized in that: The first management node is further used to: count the number of steps taken by the multiple working nodes to execute the data acquisition task, and when the counted number of steps reaches a step threshold, use the first N data identifiers as an identifier set.
11. A server, characterized in that: include: processor and interface circuits; The interface circuit is used to receive signals from other servers other than the server and transmit them to the processor, or send signals from the processor to other servers other than the server; The processor and the interface circuit are used to implement the method according to any one of claims 1 to 5 through logic circuits or executing code instructions.
12. A cluster, characterized in that: include: A plurality of servers as described in claim 11, wherein a shared storage space is established between the plurality of servers, and the storage space is used to store data that the plurality of servers need to access in order to perform tasks.
13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or an instruction, and when the computer program or the instruction is executed by the communication device, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data storage method and device
CN104765754A
Model parameter training method, device and system thereof
CN107330516A
Data recommendation method and device, computer equipment and storage medium
CN111368205A
Data storage method and apparatus in distributed storage system, and computer program product
CN111936960A
Model parameter storage method and system and parameter server cluster
CN112306682A