A communication method and device based on a distributed deep learning cache system

CN117424827BActive Publication Date: 2026-08-21ZHEJIANG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311337191.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2026-08-21
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

在这种通讯模式下,服务端在收到客户端的请求消息前不知道哪些数据即将被访问,只能被动等待客户端的请求到达,然后才开始准备相应的数据并发送给客户端,从而导致网络通讯路径较长

Benefits of technology

[0038] With the favorable condition that the client and the server hold the same sample access sequence, the present invention enables the server to accurately know the sample data required by each client in real time. Thus, without receiving a network request from the client, the server can prepare in advance the sample data required by the client and send it to the client, and the client only needs to select the server in real time and wait for the sample data sent by it. This design reduces the number of small data packets on the network and improves the utilization rate of the network bandwidth on the one hand, and shortens the communication path between the client and the server and speeds up the process of the client obtaining sample data from the server on the other hand. The communication method of the present invention can shorten the network communication path of the distributed deep learning cache system and apparatus and improve the utilization rate of the network bandwidth

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117424827B_ABST
    Figure CN117424827B_ABST
Patent Text Reader

Abstract

A communication method and device based on a distributed deep learning cache system, the method comprising: 1) initializing the software and hardware environment of an application: initializing the distributed deep learning cache system and device, each computing node starting a server to manage the local cache space; initializing the deep learning training task, each node starting several clients; 2) the network connection established between the clients and the servers, the server creating a service thread for each client connected thereto; 3) in each training cycle, each service thread of the server only pushes samples to the network connection, and the client autonomously selects the network connection to pull samples, which are sent to the model after preprocessing for training; 4) applying the model on user input data. The application can shorten the network communication path of the distributed deep learning cache system and device and improve the utilization rate of network bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed deep learning caching, and in particular to a communication method and apparatus based on a distributed deep learning caching system. Background Technology

[0002] Deep learning is a crucial support for image recognition technology. To improve image recognition accuracy, the scale of deep learning models and datasets continues to increase. The limited resources on a single computing node are insufficient to efficiently support the entire training process. Therefore, distributed training using multiple computing nodes has become an important method for solving large-scale deep learning training. In multi-node distributed training scenarios, each computing node trains the model in parallel and requests the dataset from a remote storage system. Because accessing data from a remote storage system is time-consuming, developers utilize the disk, SSD, or memory resources on each computing node to build a distributed caching middleware layer. In this architecture, the caching middleware layer and the remote storage system are considered servers. The training model accesses the dataset from the storage system through the client. The client first searches for data in the caching middleware layer; if the required data is not found, it requests data from the remote storage system. For a given client, the server located on the same computing node is called the local server, and other servers are called remote servers. However, the overhead of a client accessing data from a remote server is much greater than from a local server, which weakens the effectiveness of the caching middleware layer.

[0003] The communication logic between the client and the remote server includes four steps: (1) the client sends a request message to the server; (2) the server receives the client's request message and prepares the data; (3) the server sends the data to the client; and (4) the client receives the data from the server. In this communication mode, the server does not know which data will be accessed before receiving the client's request message, and can only passively wait for the client's request to arrive before preparing the corresponding data and sending it to the client, resulting in a long network communication path. Summary of the Invention

[0004] The present invention aims to address the aforementioned shortcomings of the prior art by shortening the communication path of distributed deep learning training and improving network bandwidth utilization based on the characteristics of accessing datasets for deep learning training. It provides a communication method and apparatus based on a distributed deep learning caching system.

[0005] The objective of this invention is achieved through the following technical solution: a communication method based on a distributed deep learning caching system, comprising the following steps:

[0006] Step 1: Image Recognition Application Environment Initialization: The distributed caching system and devices are deployed on computing nodes. The number of computing nodes is denoted as N, and the computing nodes are denoted as Node. i, where \(0\leq i < N\); The hardware devices of the distributed cache system and device include switches, solid state drives, memory cards, and network cards; The cache space comes from the solid state drives and memory cards on the computing nodes; All computing nodes form an interconnected network through a network switch, and any computing node can access the cache space on other computing nodes across nodes through the network;

[0007] Step 2: The client establishes a network connection with the server;

[0008] Step 3: Through communication between the client and the server, the deep learning training task obtains training data and trains the model;

[0009] Step 4: Image recognition, and the application uses the trained model to identify the target from the data input by the user.

[0010] Furthermore, Step 1 includes:

[0011] Step S1.1: The cache space of the distributed cache system and device can be provided by one local storage device on the computing node or by multiple local storage devices on the computing node;

[0012] Step S1.2: Initialization of the distributed cache system and device: The computing node Node i starts an independent server background process Server i ; When the server Server i is initialized, the local cache space is empty;

[0013] Step S1.3: Initialization of the deep learning training task: The training model is ResNet50, and the training task loads ResNet50 into the video memory of the GPU device; The training dataset is ImageNet, the number of training samples is denoted as M, and the complete dataset is stored in the remote storage system; The samples of the training dataset are denoted as Sample j , where \(0\leq j < M\), the sample Sample j and the corresponding relationship with the target server Server i satisfies the condition: the remainder of j divided by N is equal to i; The computing node Node i starts L (\(L>0\)) data loading processes, denoted as data loading process is the client of the distributed cache system and device The client records the size of each sample in the dataset ImageNet.

[0014] Furthermore, Step 2 includes:

[0015] Step S2.1: The client establishes a network connection with the server pairwise, and each client records the network connection identifier connected to it in conn[N];

[0016] Step S2.2: When the server establishes a network connection with the client, the server creates an independent service thread for each client.

[0017] Furthermore, step three includes:

[0018] Step S3.1: After a training cycle starts, the ResNet50 model waits for samples from the distributed cache system and the device;

[0019] Step S3.2: Update the random seed, and then all servers generate a sample access sequence S using the same new random seed;

[0020] Step S3.3: The training task and the server generate a sample access sequence S using the same random seed. The training task evenly divides the access sequence S into N subsequences. The subsequence assigned to computing node Node i is denoted as S i , where 0 ≤ i < N; the training task further evenly divides the subsequence S i assigned to computing node Node i into L subsequences. The subsequence assigned to the client on computing node Node i is denoted as

[0021] Step S3.4: All service threads of server Server i push samples to the client concurrently;

[0022] Step S3.5: The client pulls samples from the service thread: The value of taking the modulo of N is denoted as y, finds the network connection conn[y], and then pulls the corresponding sample from the buffer queue of conn[y], and then processes the remaining items;

[0023] Step S3.6: The client preprocesses the pulled samples using the CPU, and then pushes the data to the ResNet50 model for training;

[0024] Step S3.7: At the end of the current training cycle, if the number of cycles for which the model has been trained is less than the preset value, go to step S3.1 to enter the next training cycle; otherwise, the training task is completed, the connection between the client and the server is disconnected, the server process is ended, and the model is output.

[0025] Furthermore, step S3.4 includes:​​

[0026] Step S3.4.1: with Related service thread reference Towards Samples are pushed out sequentially: If Corresponding samples and Server i If the conditions in step three are not met, the service thread will ignore it. Then proceed to step S3.4.1 for processing. If all remaining items are processed, the service thread finishes its work in the current training cycle, and step S3.4 ends; otherwise, proceed to step S3.4.2.

[0027] Step S3.4.2: If The corresponding sample exists on the Server i If the local cache is not available, the service thread reads the sample from the local cache, pushes the sample to the buffer queue of the network connection, and then proceeds to step S3.4.1 for processing. The next item in the sequence; otherwise, proceed to step S3.4.3;

[0028] Step S3.4.3: Read the sample from the remote storage system and push the sample to the network connection's buffer queue; if there is free space in the local cache, copy the sample to the local cache; proceed to step S3.4.1 for processing. The next item in the list.

[0029] A second aspect of the present invention relates to a communication device based on a distributed deep learning caching system, comprising a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement a communication method based on a distributed deep learning caching system according to the present invention.

[0030] A third aspect of the invention relates to a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a communication method based on a distributed deep learning caching system according to the invention.

[0031] A fourth aspect of the present invention relates to a system for implementing a communication method based on a distributed deep learning caching system, comprising:

[0032] The image recognition application environment initialization module is used to deploy distributed caching systems and devices on computing nodes. The number of computing nodes is denoted as N, and the computing nodes are denoted as Node. i, where \(0\leq i < N\); The hardware devices of the distributed cache system and apparatus include switches, solid state drives, memory cards, and network cards; The cache space comes from the solid state drives and memory cards on the computing nodes; All computing nodes form an interconnected network through a network switch, and any computing node can access the cache space on other computing nodes across nodes through the network;

[0033] A client and server network connection module, configured to establish a network connection between the client and the server;

[0034] A data and model training module, which communicates with each other through the client and the server, and the deep learning training task obtains training data and trains a model;

[0035] An image recognition module, which applies the trained model to identify a target from the data input by the user.

[0036] In the scenario of deep learning training, the communication method of the present invention has advantages. Specifically, in the distributed deep learning training scenario, there is a global sample access sequence in each training cycle, which determines the order in which each client accesses data. If the server holds the sample access sequence of the client, then the server knows the order in which the client accesses data. In this case, the server does not have to communicate with the client to obtain the metadata of the sample, and the server does not have to passively wait for the client's request to start preparing and sending data. Compared with the traditional communication logic, this new communication logic can shorten the communication path for a client to request a sample from the server by half, thereby improving the speed at which the client obtains data from the server. In addition, in the communication logic of the present invention, only the training sample data is sent between the client and the server, and there is no communication due to the metadata of the training sample, which avoids the small-sized network data packets brought by metadata communication, thereby facilitating the improvement of the utilization rate of the network bandwidth.

[0037] The advantages and beneficial effects of the present invention are as follows:

[0038] With the favorable condition that the client and the server hold the same sample access sequence, the present invention enables the server to accurately know the sample data required by each client in real time. Thus, without receiving a network request from the client, the server can prepare in advance the sample data required by the client and send it to the client, and the client only needs to select the server in real time and wait for the sample data sent by it. This design reduces the number of small data packets on the network and improves the utilization rate of the network bandwidth on the one hand, and shortens the communication path between the client and the server and speeds up the process of the client obtaining sample data from the server on the other hand. The communication method of the present invention can shorten the network communication path of the distributed deep learning cache system and apparatus and improve the utilization rate of the network bandwidth BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a schematic diagram of the hardware device of the present invention;

[0040] Figure 2 This is a schematic diagram of the application scenario framework of the present invention;

[0041] Figures 3a-3b This is a logical comparison diagram between the communication method of the present invention and the traditional method, wherein, Figure 3a This is a schematic diagram of the communication logic between the client and the server in the traditional method. Figure 3b This is a schematic diagram of the communication logic between the client and the server in this invention;

[0042] Figure 4 This is a basic flowchart of an image recognition method that applies the method of the present invention to perform deep learning training and use the training model.

[0043] Figure 5 This is a schematic diagram illustrating communication between two clients and two servers in the invention.

[0044] Figure 6 This is a schematic diagram of a network connection list stored by a client in this invention;

[0045] Figure 7 This is a schematic diagram of the sample metadata that the client of this invention needs to save;

[0046] Figure 8 This is a schematic diagram of a network connection buffer queue in this invention. Detailed Implementation

[0047] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0048] Example 1

[0049] This embodiment relates to an image recognition method based on a communication method of a distributed deep learning caching system, which applies the present invention.

[0050] Figure 1 The present invention describes a hardware device based on a distributed deep learning caching system, including a read / write storage device, a network interface card (NIC), and a network switch.

[0051] Figure 2This document describes an application scenario framework for a communication method based on a distributed deep learning caching system. The underlying storage system in the diagram is a cluster system consisting of four storage nodes, which store the complete training dataset and provide storage services to two compute nodes via mounting. Each compute node comprises two logical layers: a caching layer and an application layer. The caching layer consists of server processes and cache spaces on all compute nodes. The cache space managed by each server is provided by the solid-state drive and memory card on the current compute node. The application layer executes deep learning training. This example uses PyTorch as the framework for distributed deep learning training, with GPUs serving as model training devices; one GPU corresponds to one concurrent training process. Each GPU receives data from a data loading process, which acts as a client requesting sample data from the server in the caching layer and preprocesses the client's data using the CPU.

[0052] Figure 3 illustrates the difference in communication logic between the communication method of this invention and the traditional method. As can be seen from the figure, compared with the traditional method, in this invention, the client does not need to send requests to the server, but directly receives data from the server, thereby reducing the number of communications between the client and the server and reducing the waiting time between the client and the server.

[0053] Figure 4 To illustrate the communication method of the distributed deep learning caching system of this invention for an image recognition method, the basic flowchart of deep learning training and using the trained model is as follows:

[0054] 1. Initialize the image recognition application environment;

[0055] 1.1 The distributed caching system and devices are deployed on compute nodes; the hardware of the distributed caching system and devices includes switches, solid-state drives, memory cards, and network cards; the cache space comes from the solid-state drives and memory cards on the compute nodes; all compute nodes form an interconnected network through switches, and any compute node can access the cache space on other compute nodes across nodes through the network; the storage system is mounted on the compute nodes; Figure 5 This describes the client-server communication process in the distributed deep learning caching system and device used in this example, where the number of computing nodes N equals 2.

[0056] 1.2 Initialization of Distributed Caching System and Devices: Computing Nodes i If 0 ≤ i < 2, start a separate server background process, Server. i , 0≤i<2; Server i During initialization, the local cache space is empty. In this example, the Server... i The local cache can store a maximum of 3 samples;

[0057] 1.3 Deep Learning Training Task Initialization: In this example, the training model is ResNet50, and the training task loads ResNet50 into the GPU's video memory; the training dataset in the storage system contains 8 training samples, denoted as Sample. j , 0≤j<8, they are numbered {0,1,2,3,4,5,6,7}, due to the sample j With the target server i The correspondence satisfies the condition: the value of j modulo 2 equals i. Therefore, the target server for {0, 2, 4, 6} is Server0, and the target server for {1, 3, 5, 7} is Server1; compute node Node i Start a data loading process, denoted as Its corresponding distributed caching system and device client 0 record the size of each sample in the dataset. Figure 7 This describes the information that the client needs to save;

[0058] 2. The client and server of the distributed caching system and device establish a network connection. This example uses socket communication.

[0059] 2.1. The client and server establish socket network connections with each other, such as... Figure 6 As shown, the server number corresponds one-to-one with the socket connection identifier, and the client records the network connection identifier connected to it in the list conn;

[0060] 2.2 When the server and client establish a network connection, the server creates an independent service thread for each client; from Figure 5 It can be seen that server 0 creates service threads 0 and 1 respectively, and server 1 creates service threads 2 and 3. Service threads 0 and 2 will push samples to client 0, and service threads 1 and 3 will push samples to client 1.

[0061] 3. Through the distributed caching system and the communication between the client and the server in the device, the deep learning training task obtains training data and trains the model;

[0062] 3.1 After a training cycle begins, the ResNet50 model waits for samples from the distributed caching system and devices;

[0063] 3.2 Update the random seed, and then all servers use the same new random seed to generate a sample access sequence <7, 0, 2, 3, 6, 5, 1, 4>;

[0064] 3.3 The training task and the server use the same random seed to generate a sample access sequence <7, 0, 2, 3, 6, 5, 1, 4>. The training task divides the access sequence into two equal subsequences. The subsequence <7, 0, 2, 3> assigned to computing node Node0 is referenced by client 0; the subsequence <6, 5, 1, 4> assigned to computing node Node1 is referenced by client 1.

[0065] 3.4. All service threads concurrently push samples to the client: In this example, service threads 0 and 2 push samples to client 0 sequentially according to <7, 0, 2, 3>, and service threads 1 and 3 push samples to client 1 sequentially according to <6, 5, 1, 4>. Here, we take service thread 0 as an example to describe its process of pushing samples according to <7, 0, 2, 3>:

[0066] 3.4.1 For sample 7, since the value of 7 modulo 2 is 1, which is not equal to the number 0 of server 0, sample 7 is not the cache target of server 0, and service thread 0 skips sample 7.

[0067] 3.4.2 For sample 0, since the modulo 2 of 0 is 0, which is equal to the number 0 of server 0, sample 0 is the cache target of server 0. Since sample 0 is not in the local cache of server 0, service thread 0 reads sample 0 from the storage system and then pushes sample 0 to the buffer queue of network connection 0. Since there is free space in the local cache of server 0, service thread 0 copies sample 0 to the local cache of server 0.

[0068] 3.4.3 For sample 2, since the modulo 2 value is 0, which equals the number 0 of server 0, sample 2 is the cache target of server 0. Because sample 2 is not in server 0's local cache, service thread 0 reads sample 2 from the storage system and then pushes it to the buffer queue of network connection 0. Since server 0's local cache has free space, service thread 0 copies sample 2 to server 0's local cache. Figure 8 This describes the contents of the buffer queue for network connection 0 at this moment;

[0069] 3.4.4 For sample 3, since the value of 3 modulo 2 is 1, which is not equal to the number 0 of server 0, sample 3 is not the cache target of server 0. Service thread 0 skips sample 3. At this point, service thread 0 has completed the sample push for the current training cycle.

[0070] 3.4.5 All service threads execute in parallel: Service threads 0 and 1 share the cache space of server 0 and use the free cache space of server 0 in a first-come, first-served manner; Service threads 2 and 3 share the cache space of server 1 and occupy the free cache space of server 1 in a first-come, first-served manner.

[0071] 3.5. All clients concurrently pull all target samples from the buffer queue of the network connection. Here, we take client 0 as an example to describe the process of pulling sample 7 from <7,0,2,3>: For sample 7, since the value of 7 modulo 2 is 1, client 0 finds the identifier of network connection 2 at conn[1] and then pulls sample 7 from the buffer queue of network connection 2.

[0072] 3.6 The client preprocesses the retrieved samples on the CPU, and then pushes the processed samples to the ResNet50 model for training;

[0073] 3.7 When the current training cycle ends, if the number of training cycles of the model is less than the preset value, then go to 3.1 to enter the next training cycle; otherwise, the training task is completed, the connection between the client and the server is disconnected, the server process is terminated, and the model is output.

[0074] 4. The application uses the trained model to identify targets from user-input data and performs image recognition.

[0075] Example 2 This example relates to a communication device based on a distributed deep learning caching system, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a communication method based on a distributed deep learning caching system according to Example 1.

[0076] At the hardware level, this communication device based on a distributed deep learning caching system includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile storage into memory and then runs it. Of course, besides software implementation, this invention does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0077] Improvements in a technology can be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology can now be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement in methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog are the most commonly used. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0078] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0079] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0080] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing this invention, the functions of each unit can be implemented in one or more software and / or hardware components.

[0081] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0082] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0086] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0087] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0088] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0089] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0090] This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0091] Example 3

[0092] This embodiment relates to a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, a communication method based on a distributed deep learning caching system in the embodiment is implemented.

[0093] Embodiment 4

[0094] This embodiment relates to a system for implementing a communication method based on a distributed deep learning caching system in Embodiment 1, including:

[0095] An image recognition application environment initialization module, used to deploy the distributed caching system and device on computing nodes. The number of computing nodes is denoted as N, and the computing nodes are denoted as Node i , 0 ≤ i < N; The hardware devices of the distributed caching system and device include switches, solid-state drives, memory cards, and network cards; The cache space comes from the solid-state drives and memory cards on the computing nodes; All computing nodes form an interconnected network through a network switch, and any computing node can access the cache space on other computing nodes across nodes through the network;

[0096] A client-server network connection module, used to establish a network connection between the client and the server;

[0097] A data and model training module, which communicates with each other through the client and the server to obtain training data and train the model for the deep learning training task;

[0098] An image recognition module, which uses the trained model to recognize the target from the data input by the user.

[0099] Each embodiment in the present invention is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0100] The above are only the embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.

Claims

1. A communication method based on a distributed deep learning caching system, comprising the following steps: Step 1: Image Recognition Application Environment Initialization: The distributed caching system and devices are deployed on computing nodes. The number of computing nodes is denoted as N, and the number of computing nodes is denoted as [missing information]. The hardware of the distributed caching system and device includes switches, solid-state drives (SSDs), memory cards, and network interface cards (NICs). The cache space comes from the SSDs and memory cards on the compute nodes. All compute nodes are interconnected through network switches, and any compute node can access the cache space on other compute nodes across the network. Step 2: The client establishes a network connection with the server; Step 3: Through communication between the client and server, the deep learning training task obtains training data and trains the model; including: Step S3.1: After a training cycle begins, the ResNet50 model waits for samples from the distributed caching system and devices; Step S3.2: Update the random seed, and then all servers use the same new random seed to generate a sample access sequence S; Step S3.3: The training task and the server use the same random seed to generate a sample access sequence S. The training task divides the access sequence S into N equal subsequences and calculates the nodes. The assigned subsequence is denoted as The training task will compute nodes. subsequence of Further divide into L equal subsequences and calculate the nodes. Client on The assigned subsequence is denoted as ; Step S3.4: Server All service threads concurrently push samples to the client; Step S3.5: Client refer to Pull samples from the service thread: Let y be the value modulo N. Find the network connection conn[y], and then pull from the buffer queue of conn[y]. The corresponding samples are then processed. The remaining terms; Step S3.6: Client The CPU is used to preprocess the retrieved samples, and then the data is pushed to the ResNet50 model for training. Step S3.7: When the current training cycle ends, if the number of training cycles of the model is less than the preset value, then proceed to step S3.1 to enter the next training cycle; otherwise, the training task is completed, the connection between the client and the server is disconnected, the server process is terminated, and the model is output. Step 4: Image recognition. The application uses the trained model to identify targets from the user-input data.

2. The communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, Step one includes: Step S1.1: Provide cache space for the distributed caching system and device; Step S1.2: Initialization of the distributed caching system and devices: compute nodes Start a separate server background process Server During initialization, the local cache space is empty; Step S1.3: Deep Learning Training Task Initialization: The training model is ResNet50, and the training task loads ResNet50 into the GPU's video memory; the training dataset is ImageNet, with the number of training samples denoted as M, and the complete dataset is stored in a remote storage system; the number of samples in the training dataset is denoted as... ,sample With the target server The correspondence satisfies the condition: the value of j modulo N equals i; compute nodes Start L data loading processes, denoted as L > 0, data loading process It is a client for distributed caching systems and devices. The client records the size of each sample in the ImageNet dataset.

3. The communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, In step S1.1, the cache space of the distributed caching system and device is provided by a local storage device on the computing node.

4. The communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, In step S1.1, the cache space of the distributed caching system and device is provided by a variety of local storage devices on the computing nodes.

5. The communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, Step two includes: Step S2.1: The client and the server establish network connections with each other, and each client records the network connection identifier connected to it in conn[N]; Step S2.2: When the server establishes a network connection with the client, the server creates an independent service thread for each client.

6. The communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, Step S3.4 includes: Step S3.4.1: with Related service thread reference Towards Samples are pushed out sequentially: If Corresponding samples and If the conditions in step three are not met, the service thread will ignore it. Then proceed to step S3.4.1 for processing. If all remaining items are processed, the service thread finishes its work in the current training cycle, and step S3.4 ends; otherwise, proceed to step S3.4.

2. Step S3.4.2: If The corresponding samples exist If the local cache is not available, the service thread reads the sample from the local cache, pushes the sample to the buffer queue of the network connection, and then proceeds to step S3.4.1 for processing. The next item in the sequence; otherwise, proceed to step S3.4.3; Step S3.4.3: Read the sample from the remote storage system and push the sample to the network connection's buffer queue; if there is free space in the local cache, copy the sample to the local cache; proceed to step S3.4.1 for processing. The next item in the list.

7. A communication device based on a distributed deep learning caching system, characterized in that, The system includes a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement a communication method based on a distributed deep learning caching system as described in any one of claims 1-5.

8. A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a communication method based on a distributed deep learning caching system as described in any one of claims 1-5.

9. A system for implementing the communication method based on a distributed deep learning caching system as described in claim 1, characterized in that, include: The image recognition application environment initialization module is used to deploy distributed caching systems and devices on computing nodes. The number of computing nodes is denoted as N, and the number of computing nodes is denoted as [missing information]. The hardware of the distributed caching system and device includes switches, solid-state drives (SSDs), memory cards, and network interface cards (NICs). The cache space comes from the SSDs and memory cards on the compute nodes. All compute nodes are interconnected through network switches, and any compute node can access the cache space on other compute nodes across the network. The client-server network connection module is used to establish a network connection between the client and the server. The data and model training module communicates with the server through the client to obtain training data and train the model for deep learning training tasks. The image recognition module uses a trained model to identify targets from user-input data.