Multi-path data transmission method for distributed machine learning
By designing a multi-path data transmission method for distributed machine learning, using the multi-path transmission protocol Mpldtp and dynamic loss detection mechanism, the problem of insufficient flexibility and low adaptability of the transmission protocol in multi-path transmission is solved, and efficient Improve communication and learning efficiency.
Patent Information
- Application Number
- CN202410917357.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-10
AI Technical Summary
The existing distributed machine learning transmission protocols have shortcomings in applicability and deployability, especially in multipath transmission, lack of flexibility, cannot quickly perceive congestion, and are not adaptable in wide area networks, making it difficult to deploy widely.
A multi-path data transmission method for distributed machine learning was designed. By decoupling and designing independently run main logic and multi-path transmission protocol processing, the multi-path transmission protocol Mpldtp is used, and the UDP header and Mpldtp header information is used for Data packet processing and intelligent scheduling is performed through congestion control policies and Pacing smoother rules, dynamically adjusting the delay threshold for loss detection to adapt to network changes.
It improves the communication efficiency of distributed machine learning in edge computing scenarios with obvious fluctuations, minimizes communication delay, significantly improves learning efficiency and system performance, and adapts to the characteristics of complex network environments.
Smart Images

Figure CN118945112A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data transmission methods, and specifically relates to a multi-path data transmission method for distributed machine learning. Background Art
[0002] As we step into a new era of digital economy, with the development of 6G communication technology, the widespread popularity of cloud computing, the continuous innovation of blockchain technology, the rise of digital twin technology, and the rapid development of AIGC (artificial intelligence, Internet of Things, physical computing, cloud computing) led by artificial intelligence, human society is embracing the deep integration of science and technology with economy and society at an unprecedented speed. As the key technology engine driving the development of artificial intelligence, machine learning and deep learning are undergoing a profound revolution to meet the growing demand for intelligence, automation and personalization. In this transformation, the continuous improvement of computing power allows more complex models to be effectively trained and deployed. At the same time, the continuous expansion of the data set size provides richer and more diverse information input for model training.
[0003] However, with the exponential growth of computing models and data sets, the computing power of a single computing device can no longer meet the growing computing needs. Traditional machine learning methods have encountered bottlenecks in computing and storage capabilities when processing large-scale data sets and complex models. To solve this problem, distributed machine learning came into being. By splitting the training model and data set and distributing them on multiple computing nodes for parallel computing, the pressure on a single node can be effectively alleviated. However, the actual deployment of distributed machine learning inevitably introduces communication overhead, especially in the context of the continuous expansion of model scale, network communication between nodes has become a key factor restricting the efficiency of model training. Due to its characteristics of being deployed in kernel state, the traditional TCP protocol exposes many limitations when facing the stringent requirements of distributed machine learning applications on transmission performance. Therefore, in order to cope with the communication challenges in distributed machine learning scenarios, it is urgent to develop a new generation of transmission protocol framework for the future.
[0004] In this context, researchers have focused on communication optimization. On the one hand, they have developed high-performance communication libraries such as DCTCP, RDMA, and MCCL to meet the needs of distributed machine learning. On the other hand, with the maturity of programmable switch technology, researchers have begun to explore migrating parameter aggregation functions from servers to switches to reduce the amount of data transmitted over the network. At the same time, given the rapid growth of data sets and model sizes, model compression technology has been widely used as an effective way to reduce the transmission burden. In addition, some studies have also focused on the fact that mainstream distributed machine learning frameworks (such as TensorFlow) do not fully consider the overlapping optimization of computing and communication when synchronizing parameters, resulting in random parameter transmission order that may cause a waste of computing resources. This has also prompted in-depth research on distributed machine learning communication scheduling strategies.
[0005] Although researchers in the network field have actively explored transmission protocols for distributed learning and have made some progress in theory and system design in this field, there are still deficiencies in applicability and deployability, as follows:
[0006] 1. Unable to avoid the inherent shortcomings of TCP. In the training process of distributed machine learning, some researchers proposed a differential gradient transmission mechanism DGT (Differential Gradient Transmission). The core idea is to classify gradients according to their contribution to the global model and use different priorities to transmit these gradients to reduce communication costs and improve training efficiency. However, the differential transmission mechanism used by DGT combines both TCP and UDP protocols, but this means that key gradient information may still be affected by the tail latency inherent in the TCP protocol. Therefore, in order to achieve more ideal performance optimization, a more superior design scheme tends to rely only on the UDP protocol, thereby completely abandoning the TCP protocol, in order to completely eliminate the potential tail latency problem caused by TCP.
[0007] 2. There are limitations in the wide area network. Some researchers have innovatively designed an application layer transmission protocol DLCP based on the limited loss of gradient data transmission and the independence of gradient transmission at each location that may exist in the distributed machine learning training process. This protocol cleverly utilizes the limited loss characteristics of gradient data transmission and formulates a multi-priority data packet transmission scheduling and discarding strategy to significantly alleviate the tail delay problem in the communication process. In addition, DLCP further explores the advantages of mutual independence between data packet transmissions, thereby realizing a packet-by-packet dynamic load balancing mechanism at the switch level, thereby effectively utilizing the aggregated bandwidth resources of multiple links in the data center to achieve the purpose of improving communication efficiency and accelerating the entire distributed training. The uniqueness of the DLCP protocol is that it transfers the above two mechanisms from the terminal system to the switch device inside the network for processing. Therefore, the application of the DLCP protocol in the data center environment is particularly efficient and suitable. However, due to its inherent design characteristics, when it is applied to the wide area network or edge network scenarios, it may face certain limitations, resulting in its effect not being as ideal as in the data center environment and difficult to be widely deployed. In addition, the existing multi-path protocol XQUIC manages and evaluates multiple network paths, taking into account the current performance of each path, and intelligently and dynamically schedules data packets to optimize performance. However, in environments with significant network fluctuations, it is easy to produce inaccurate evaluation of paths and unstable connections, thus affecting transmission efficiency. Therefore, when designing a transmission protocol for distributed learning, it is necessary to consider its communication efficiency in specific scenarios to ensure its performance. Summary of the invention
[0008] In view of the above-mentioned deficiencies in the prior art, the multi-path data transmission method for distributed machine learning provided by the present invention solves the problems of applicability and deployability existing in the prior art; the existing solutions may not be specifically optimized for distributed machine learning applications, and their universal design has become insufficient in some aspects, making it difficult to perfectly fit and efficiently meet the specific demands of various distributed machine learning tasks for data transmission; or they are not flexible enough in multi-path transmission and cannot quickly perceive congestion; or they are not adaptable in wide area networks and are not suitable for transmission in wide area networks or edge networks.
[0009] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a multi-path data transmission method for distributed machine learning, comprising the following steps:
[0010] S1. Design a multi-path transmission protocol Mpldtp for distributed machine learning;
[0011] S2. At the gradient sending end, the main logic and the data processing process of the multi-path transmission protocol Mpldtp are decoupled by the worker process, so that the main logic and the multi-path transmission protocol Mpldtp processing process run independently in different threads;
[0012] The decoupling design decouples the worker process into a worker main thread and a client protocol thread, and decouples the parameter server process into a parameter server main thread and a server protocol thread;
[0013] S3. When the worker main thread prepares the gradient data packet, it passes it to the sub-thread responsible for protocol processing in the client protocol thread;
[0014] S4, when the child thread receives the gradient data packet, it starts the logic core of the multi-path transmission protocol Mpldtp and performs a handshake connection with the server protocol thread, and after the handshake connection is successful, it creates multiple transmission paths and starts the multi-path transmission mechanism;
[0015] S5. After the handshake connection is successful, the server-side protocol thread notifies the parameter server main thread to process the handshake event, and the parameter server main thread creates a gradient receiving thread and starts the asynchronous receiving mode;
[0016] S6, based on the created gradient receiving thread, asynchronous receiving mode and multi-path transmission mechanism, cyclically processing the gradient data packets to be transmitted;
[0017] S7. During the cyclic processing of the gradient data packet, when the preset transmission end condition is met, the parameter server main thread connection is terminated to complete the multipath data transmission.
[0018] Further, in the step S1, the interactive mode of the multipath transmission protocol Mpldtp includes a gradient sending end and a gradient receiving end;
[0019] The functional implementation of the multipath transmission protocol Mpldtp includes a connection layer and a path layer, wherein the connection layer is responsible for the life cycle management of the connection session, and the path layer is used to control the transmission of data;
[0020] The multipath transmission protocol Mpldtp is positioned between the transport layer and the application layer in the TCP / IP four-layer model, and the main body of the multipath transmission protocol Mpldtp runs in the user state.
[0021] Further, in the step S1, the data packet of the multipath transmission protocol Mpldtp includes a UDP header, an Mpldtp header and an Mpldtp payload;
[0022] The Mpldtp header includes a connection ID, a path ID, a packet number, a packet type and a payload length; the Mpldtp payload is used to store a gradient data packet, and the protocol body structure of the gradient data packet includes a model layer index, a layer offset and a gradient.
[0023] Furthermore, in the Mpldtp header:
[0024] The connection ID is used to provide a unique identifier for each Mpldtp connection;
[0025] The path ID is used to achieve correct diversion of data packets to designated transmission data within a connection;
[0026] The packet number is a monotonically increasing non-negative integer, and is used to assign a unique identifier to each Mpldtp packet sent;
[0027] The packet type is used to distinguish the specific type of the data packet;
[0028] The payload length is used to identify the number of bytes of the Mpldtp payload in the multipath transport protocol Mpldtp.
[0029] Furthermore, in step S6, the method for looping the gradient data packet is specifically as follows:
[0030] S61, intelligently schedule the current gradient data packet at the gradient sending end, and send it to the gradient receiving end according to the congestion control strategy and the Pacing smoother rule;
[0031] S62, when the gradient receiving end receives the gradient data packet, it records the packet number and replies with an ACK response packet, and at the same time, performs deduplication processing on the received gradient data packet and passes it to the main thread of the parameter server;
[0032] S63, after receiving the ACK response packet at the gradient sending end, the data packet confirmation and loss detection logic is triggered, and the sliding window is updated to process the next gradient data packet.
[0033] Furthermore, in step S61, the congestion control strategy is specifically:
[0034] Define an adjustable parameter α that is higher than the packet loss rate, and use the adjustable parameter α to adjust g in the bottleneck bandwidth detection phase high and g low , according to g high and g low Dynamically adjust the gain coefficient of the transmission rate periodically and make the gain coefficient g satisfy ∑ g∈G g = length(G) to ensure that the communication flow does not overload the link bandwidth when the link bandwidth is fixed;
[0035] Where G is a gain coefficient list, expressed as G = [g high ,g low ,1,1,g high ,g low ,1,1],g high ,g low are the upper and lower bounds of the gain coefficient g, length(G) is the length of G, g high =1+α,g low =1-α.
[0036] Furthermore, in step S63, the loss detection logic is specifically as follows:
[0037] Dynamically adjust the delay threshold of loss detection according to the intensity of random delay jitter in the network, and use it to determine whether the unconfirmed gradient data packet has been lost;
[0038] The expression for dynamically adjusting the delay threshold of loss detection is:
[0039] d=max(g·max(srtt,lrtt),k)
[0040] t d =t c -d
[0041] Where d is the delay threshold used to determine the gradient packet loss, rtt and lrtt are the smoothed round-trip time and the most recently measured round-trip time, respectively, g is a dynamically adjustable gain factor, and t d is the loss detection time, t c For the current moment.
[0042] Furthermore, in step S7, the preset transmission end condition includes that the gradient sending end has completed the transmission of all gradient data packets to be sent and the gradient receiving end has cumulatively received gradient data packets that meet a preset loss tolerance threshold.
[0043] Furthermore, the loss tolerance threshold δ is:
[0044] δ=(δ max -δ min )·(1-e -kr )+δ min ,0≤r≤R
[0045] In the formula, δ max and δ min are the upper and lower limits of the loss tolerance threshold, r is the current communication round, k is the step size of δ update, and R is the total number of communication rounds.
[0046] The beneficial effects of the present invention are:
[0047] 1. The present invention fully considers the tolerance of distributed machine learning to bounded loss, the low correlation between parameters, and the specific characteristics of complex network environments such as high packet loss rate, high latency, and dynamic bandwidth, and effectively improves the communication efficiency of distributed machine learning in edge computing scenarios with obvious fluctuations.
[0048] 2. The present invention dynamically adjusts the time threshold of loss detection according to the intensity of random delay jitter in the network. By dynamically adjusting the gain coefficient in the time threshold, the loss detection mechanism can better adapt to the actual situation of the network and effectively reduce the adverse effects caused by random delay jitter.
[0049] 3. The present invention enhances the efficient processing of parameter aggregation and distribution stages in the distributed machine learning process, minimizes communication delays, and thus significantly improves learning efficiency and the operating performance of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flow chart of the multi-path data transmission method for distributed machine learning provided by the present invention.
[0051] Figure 2 The schematic diagram of the working process of the multi-path transmission protocol Mpldtp provided by the present invention is as follows:
[0052] Figure 3 This is a system architecture diagram of the path transmission protocol Mpldtp provided by the present invention.
[0053] Figure 4 This is a schematic diagram of the data packet format of the path transmission protocol Mpldtp provided by the present invention.
[0054] Figure 5 A protocol test experiment scenario provided for an embodiment of the present invention.
[0055] Figure 6 This is a comparison chart of average throughput of the protocol provided in the embodiment of the present invention under different random delay jitters. DETAILED DESCRIPTION
[0056] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0057] Embodiment 1:
[0058] The embodiment of the present invention provides a multi-path data transmission method for distributed machine learning, such as Figure 1-2 As shown, the following steps are included:
[0059] S1. Design a multi-path transmission protocol Mpldtp for distributed machine learning;
[0060] S2. At the gradient sending end, the main logic and the data processing process of the multi-path transmission protocol Mpldtp are decoupled by the worker process, so that the main logic and the multi-path transmission protocol Mpldtp processing process run independently in different threads;
[0061] The decoupling design decouples the worker process into a worker main thread and a client protocol thread, and decouples the parameter server process into a parameter server main thread and a server protocol thread;
[0062] S3. When the worker main thread prepares the gradient data packet, it passes it to the sub-thread responsible for protocol processing in the client protocol thread;
[0063] S4, when the child thread receives the gradient data packet, it starts the logic core of the multi-path transmission protocol Mpldtp and performs a handshake connection with the server protocol thread, and after the handshake connection is successful, it creates multiple transmission paths and starts the multi-path transmission mechanism;
[0064] S5. After the handshake connection is successful, the server-side protocol thread notifies the parameter server main thread to process the handshake event, and the parameter server main thread creates a gradient receiving thread and starts the asynchronous receiving mode;
[0065] S6, based on the created gradient receiving thread, asynchronous receiving mode and multi-path transmission mechanism, cyclically processing the gradient data packets to be transmitted;
[0066] S7. During the cyclic processing of the gradient data packet, when the preset transmission end condition is met, the parameter server main thread connection is terminated to complete the multipath data transmission.
[0067] In step S1 of the embodiment of the present invention, Figure 3 In the system architecture diagram of the multipath transmission protocol Mpldtp shown, the multipath transmission protocol Mpldtp is logically divided into two core dimensions: interaction mode and function implementation.
[0068] Specifically, in this embodiment, the interactive mode includes a gradient sending end and a gradient receiving end to ensure the integrity of the data transmission process;
[0069] In this embodiment, the functional implementation of the multipath transmission protocol Mpldtp includes a connection layer and a path layer, wherein the connection layer is responsible for the life cycle management of the connection session, and the path layer is used to control the transmission of data; wherein the life cycle management includes the start, maintenance and termination operations of the session; and the transmission control includes congestion control, loss detection and retransmission control, etc.
[0070] The multipath transmission protocol Mpldtp in this embodiment is positioned between the transport layer and the application layer in the TCP / IP four-layer model, and the main body of the multipath transmission protocol Mpldtp runs in user mode, realizing flexible control and efficient execution of core functions. In the transport layer, several interfaces are designed in this embodiment to realize the detailed management of Socket sockets, which provide the necessary bridge for the interaction between the protocol and the underlying network communication mechanism. At the same time, in order to adapt to the specific needs of distributed machine learning applications, we also implement a special interface design in the user-mode communication interface layer so that the protocol can be seamlessly integrated into complex application scenarios. This design not only ensures the full functional scalability and wide applicability of the Mpldtp protocol, but also emphasizes the flexibility and efficiency of the protocol implementation in terms of architecture.
[0071] In step S1 of the embodiment of the present invention, Figure 4 As shown, the data packet of the multipath transmission protocol Mpldtp includes a UDP header, an Mpldtp header and an Mpldtp payload;
[0072] The Mpldtp header includes a connection ID, a path ID, a packet number, a packet type and a payload length; the Mpldtp payload is used to store a gradient data packet, and the protocol body structure of the gradient data packet includes a model layer index, a layer offset and a gradient.
[0073] Specifically, in this embodiment, in the Mpldtp header:
[0074] The connection ID is used to provide a unique identifier for each Mpldtp connection; specifically, the connection ID function is similar to the TCP protocol's quadruple or the QUIC protocol's ConnId, providing a unique identifier for each Mpldtp connection to ensure that the connection can still be accurately identified even if the end host address changes.
[0075] The path ID is used to correctly distribute data packets to designated transmission data within a connection. A path ID of 0 refers specifically to connection-level data packets, while a non-zero value clearly points to a specific transmission path, laying the foundation for multi-path concurrent transmission.
[0076] The packet number is a monotonically increasing non-negative integer used to assign a unique identifier to each sent Mpldtp packet to facilitate quick indexing of any specific data packet. In addition, the increasing packet number mechanism effectively avoids the ambiguity of round-trip time (RTT) measurement that may be caused by retransmitted packets.
[0077] The packet type is used to distinguish the specific types of data packets, such as ACK confirmation packets, gradient data packets, keep-alive signal packets, etc., to support the diverse functional requirements of the protocol.
[0078] The payload length is used to identify the number of bytes of the Mpldtp payload in the multipath transport protocol Mpldtp to ensure clear identification and processing of data packet boundaries.
[0079] In this embodiment, the contents of all data packets in the multipath transmission protocol Mpldtp are mainly located in the protocol body; specifically, the protocol body structure of the gradient data packet includes the model layer index, layer offset and gradient. This structural design makes the transmission and identification of the gradient block in the network efficient and accurate, allowing the gradient block position to be accurately located at the receiving end and the model parameters to be updated accordingly; for the confirmation packet (ACK packet), its protocol body adopts a flexible structure, which includes a series of confirmation intervals. This design takes into account the functions of selective confirmation (SACK) and negative confirmation (NACK), so that the protocol can effectively represent the receiving status of multiple data packets in one confirmation process, thereby improving the efficiency of the confirmation mechanism and the reliability of transmission.
[0080] In step S4 of the embodiment of the present invention, the client protocol thread actively creates multiple transmission paths according to the number of network interface cards of the host machine, and enables a multi-path transmission mechanism.
[0081] In step S6 of the embodiment of the present invention, referring to Figure 2 , the method for looping the gradient data packet is as follows:
[0082] S61, intelligently schedule the current gradient data packet at the gradient sending end, and send it to the gradient receiving end according to the congestion control strategy and the Pacing smoother rule;
[0083] S62, when the gradient receiving end receives the gradient data packet, it records the packet number and replies with an ACK response packet, and at the same time, performs deduplication processing on the received gradient data packet and passes it to the main thread of the parameter server;
[0084] S63, after receiving the ACK response packet at the gradient sending end, the data packet confirmation and loss detection logic is triggered, and the sliding window is updated to process the next gradient data packet.
[0085] In S61 of this embodiment, the congestion control strategy is specifically:
[0086] Define an adjustable parameter α that is higher than the packet loss rate, and use the adjustable parameter α to adjust g in the bottleneck bandwidth detection phase high and g low , according to g high and g low Dynamically adjust the gain coefficient of the transmission rate periodically and make the gain coefficient g satisfy ∑ g∈G g = length(G) to ensure that the communication flow does not overload the link bandwidth when the link bandwidth is fixed;
[0087] Where G is a gain coefficient list, expressed as G = [g high ,g low ,1,1,g high ,g low ,1,1],g high ,g low are the upper and lower bounds of the gain coefficient g, length(G) is the length of G, g high =1+α,g low =1-α.
[0088] Specifically, in this embodiment, the link between the end hosts A and B is abstracted into a pipe, and the flow is the water in the pipe. Assuming that the link packet loss rate is p (0≤p≤100%) and the bottleneck bandwidth is B, the actual maximum throughput of the link is:
[0089] delivery_rate = B·(1-p)
[0090] In order to adapt to the random packet loss rate p of the link, an adjustable parameter α is defined in this embodiment. The parameter α needs to be higher than the packet loss rate to maintain throughput stability, and the parameter α is used to adjust g in the bottleneck bandwidth detection phase. high and g low ;
[0091] α≥p
[0092] g high =1+α
[0093] g low =1-α
[0094] The traditional BBR congestion control algorithm uses the gain coefficient list G = [1.25, 0.75, 1, 1, 1, 1, 1] to periodically adjust the gain coefficient of the sending rate in the PROBE_BW stage, while this embodiment uses ∑ g∈G g = length (G) ensures that the communication flow will not overload the link bandwidth when the link bandwidth is fixed. At the same time, in order to increase the possibility of determining the maximum bandwidth before the window expires, the gain list G = [g high ,g low ,1,1,g high ,g low ,1,1] to adjust the length and value.
[0095] In step S63 of the present embodiment, for the loss detection logic, the traditional loss detection mechanism often operates by setting a fixed time threshold: if a data packet has not received confirmation within the threshold time, and its sequence number is less than the sequence number of the most recently confirmed received data packet, then the data packet is deemed to have been lost. However, when encountering a network environment with random delay jitter, the limitations of this method become particularly obvious. If the time threshold is set too low, it may lead to an erroneous loss judgment for a data packet that is actually only delayed, triggering an unnecessary congestion control mechanism, which is not conducive to maintaining network throughput. Conversely, setting a time threshold that is too high will cause unconfirmed data packets to occupy congestion window resources for too long, thereby causing the window to be unable to expand normally within a certain period of time, affecting the overall transmission efficiency. Based on this, the improved loss detection logic in the present embodiment is specifically as follows:
[0096] Dynamically adjust the delay threshold of loss detection according to the intensity of random delay jitter in the network, and use it to determine whether the unconfirmed gradient data packet has been lost;
[0097] The expression for dynamically adjusting the delay threshold of loss detection is:
[0098] d=max(g·max(srtt,lrtt),k)
[0099] t d =t c -d
[0100] Where d is the delay threshold used to determine the gradient packet loss, rtt and lrtt are the smoothed round-trip time and the most recently measured round-trip time, respectively, g is a dynamically adjustable gain factor, and t dis the loss detection time, t c For the current moment.
[0101] In this embodiment, the gain factor is used to adjust the sensitivity of loss determination according to the current network status. By dynamically adjusting the gain factor g, the loss detection mechanism can better adapt to the actual network conditions and effectively reduce the adverse effects caused by random delay jitter.
[0102] In step S7 of the embodiment of the present invention, the preset transmission end condition includes that the gradient sending end has completed the transmission of all gradient data packets to be sent and the gradient receiving end has accumulated gradient data packets received that meet a preset loss tolerance threshold.
[0103] In this embodiment, the loss tolerance threshold δ is:
[0104] δ=(δ max -δ min )·(1-e -kr )+δ min ,0≤r≤R
[0105] In the formula, δ max and δ min are the upper and lower limits of the loss tolerance threshold, r is the current communication round, k is the step size of δ update, and R is the total number of communication rounds.
[0106] Specifically, existing research has proposed that distributed machine learning systems can accept partial loss of gradient data to a certain extent and still successfully update model parameters. Typically, this tolerable gradient loss ratio threshold δ is set in the range of 10% to 35%. This theoretical breakthrough reveals that by leveraging the limited tolerance of distributed machine learning to gradient loss, it is possible to effectively improve communication speed.
[0107] In this embodiment, in order to set a more accurate loss tolerance threshold and improve the communication speed, consider the data parallel scenario under the parameter server architecture, there are N workers and 1 parameter server, assuming that the link bandwidth between worker i and the parameter server is B i , the size of worker i’s local dataset is S i , the transmission completion time of worker i can be estimated as:
[0108]
[0109] In the formula, represents the propagation delay from worker i to the parameter server, and M represents the number of parameters of the training model of the distributed machine learning task;
[0110] For each Mpldtp connection c i, consider the proportion of the local dataset to the total dataset as the contribution weight of the connection:
[0111]
[0112] Considering the correlation between the training progress and the contribution of the gradient to the model training, the multipath transmission protocol Mpldtp in this embodiment adopts δ = (δ max -δ min )·(1-e -kr )+δ min ,0≤r≤R updates the loss tolerance threshold δ.
[0113] Embodiment 2:
[0114] The embodiment of the present invention provides a performance test example for the multi-path data transmission method in Embodiment 1.
[0115] The performance test scenario in this embodiment is as follows Figure 5 As shown in the figure, the smart terminal device is responsible for executing the task of local model training and uploading the gradient parameters obtained from the training to the remote server in the cloud according to the preset cycle. It is worth noting that each smart terminal device is connected through a dual-link mode, and a communication link is established with the remote cloud server through the base station and the wireless router respectively. At the same time, Table 1 shows the experimental parameter configurations of two different types of network links: wireless WiFi and cellular network (4G). Unlike wireless WiFi, cellular network (4G) usually adopts a pay-per-use method, so a lower bandwidth is configured.
[0116] Table 1 Parameter configuration of different network links
[0117] Network Type bandwidth Latency 4G 32Mbps 5ms WiFi 80Mbps 10ms
[0118] In this embodiment, four protocols, XQUIC and TCP, are used as comparison protocols for Mpldtp. XQUIC is also a multi-path transmission protocol, while the TCP protocol is a variant equipped with three different congestion control algorithms, CUBIC, RENO, and BBR. CUBIC and RENO are congestion control algorithms based on packet loss, while BBR is a congestion control algorithm based on bandwidth and delay to optimize network communication by measuring bottleneck bandwidth and RTT.
[0119] Figure 6 The performance of different protocols in a network environment with random delay jitter is shown. Figure 6 (a) To Figure 6(d) increases in sequence. This test uses a multipath transmission framework. The client is configured with two network interfaces, while the server uses a single network interface. In order to simulate the real network environment, the two network interfaces of the client (labeled as A and B) are given their own specific parameter settings of bandwidth, delay, packet loss rate and delay jitter through TC and Netem tools. Figure 6 As can be observed in (a), multipath transmission protocols such as Mpldtp and Xquic usually show better performance than traditional single-path protocols in multipath transmission scenarios; however, as the delay jitter increases, packet loss-based congestion control algorithms such as Cubic and Reno are weak in resisting delay jitter, and their throughput decreases significantly. In contrast, the BBR algorithm shows a strong ability to resist delay jitter. Figure 6 (d) shows that in the high-latency jitter scenario, although BBR shows a certain degree of anti-packet loss advantage compared to Cubic, it still exposes its shortcomings in resisting high-latency jitter scenarios. At the same time, Xquic maintains a certain level of performance lower limit by virtue of its multipath transmission advantage. The Mpldtp protocol proposed in the present invention can maintain a high throughput under various delay jitters, showing good network adaptability.
[0120] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0121] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A multi-path data transmission method for distributed machine learning, characterized in that: The following steps are involved: S1. Design a multi-path transmission protocol Mpldtp for distributed machine learning; S2. At the gradient sending end, the main logic and the data processing process of the multi-path transmission protocol Mpldtp are decoupled by the worker process, so that the main logic and the multi-path transmission protocol Mpldtp processing process run independently in different threads; The decoupling design decouples the worker process into a worker main thread and a client protocol thread, and decouples the parameter server process into a parameter server main thread and a server protocol thread; S3. When the worker main thread prepares the gradient data packet, it passes it to the sub-thread responsible for protocol processing in the client protocol thread; S4, when the child thread receives the gradient data packet, it starts the logic core of the multi-path transmission protocol Mpldtp and performs a handshake connection with the server protocol thread, and after the handshake connection is successful, it creates multiple transmission paths and starts the multi-path transmission mechanism; S5. After the handshake connection is successful, the server-side protocol thread notifies the parameter server main thread to process the handshake event, and the parameter server main thread creates a gradient receiving thread and starts the asynchronous receiving mode; S6, based on the created gradient receiving thread, asynchronous receiving mode and multi-path transmission mechanism, cyclically processing the gradient data packets to be transmitted; S7. During the cyclic processing of the gradient data packet, when the preset transmission end condition is met, the parameter server main thread connection is terminated to complete the multipath data transmission.
2. The multi-path data transmission method for distributed machine learning according to claim 1, characterized in that: In the step S1, the interactive mode of the multipath transmission protocol Mpldtp includes a gradient sending end and a gradient receiving end; The functional implementation of the multipath transmission protocol Mpldtp includes a connection layer and a path layer, wherein the connection layer is responsible for the life cycle management of the connection session, and the path layer is used to control the transmission of data; The multipath transmission protocol Mpldtp is positioned between the transport layer and the application layer in the TCP / IP four-layer model, and the main body of the multipath transmission protocol Mpldtp runs in the user state.
3. The multi-path data transmission method for distributed machine learning according to claim 1, characterized in that: In the step S1, the data packet of the multipath transmission protocol Mpldtp includes a UDP header, an Mpldtp header and an Mpldtp payload; The Mpldtp header includes a connection ID, a path ID, a packet number, a packet type and a payload length; the Mpldtp payload is used to store a gradient data packet, and the protocol body structure of the gradient data packet includes a model layer index, a layer offset and a gradient.
4. The multi-path data transmission method for distributed machine learning according to claim 3, characterized in that: In the Mpldtp header: The connection ID is used to provide a unique identifier for each Mpldtp connection; The path ID is used to achieve correct diversion of data packets to designated transmission data within a connection; The packet number is a monotonically increasing non-negative integer, and is used to assign a unique identifier to each Mpldtp packet sent; The packet type is used to distinguish the specific type of the data packet; The payload length is used to identify the number of bytes of the Mpldtp payload in the multipath transport protocol Mpldtp.
5. The multi-path data transmission method for distributed machine learning according to claim 3, characterized in that: In step S6, the method for looping the gradient data packet is specifically as follows: S61, intelligently schedule the current gradient data packet at the gradient sending end, and send it to the gradient receiving end according to the congestion control strategy and the Pacing smoother rule; S62, when the gradient receiving end receives the gradient data packet, it records the packet number and replies with an ACK response packet, and at the same time, performs deduplication processing on the received gradient data packet and passes it to the main thread of the parameter server; S63, after receiving the ACK response packet at the gradient sending end, the data packet confirmation and loss detection logic is triggered, and the sliding window is updated to process the next gradient data packet.
6. The multi-path data transmission method for distributed machine learning according to claim 5, characterized in that: In step S61, the congestion control strategy is specifically: Define an adjustable parameter α that is higher than the packet loss rate, and use the adjustable parameter α to adjust g in the bottleneck bandwidth detection phase high and g iow , according to g high and g low Dynamically adjust the gain coefficient of the transmission rate periodically and make the gain coefficient g satisfy ∑ g∈G g = length(G) to ensure that the communication flow does not overload the link bandwidth when the link bandwidth is fixed; Where G is a gain coefficient list, expressed as G = [g high ,g low ,1,1,g high ,g low ,1,1],g high ,g low are the upper and lower bounds of the gain coefficient g, length(G) is the length of G, g high =1+α,g low =1-α.
7. The multi-path data transmission method for distributed machine learning according to claim 5, characterized in that: In step S63, the loss detection logic is specifically as follows: Dynamically adjust the delay threshold of loss detection according to the intensity of random delay jitter in the network, and use it to determine whether the unconfirmed gradient data packet has been lost; The expression for dynamically adjusting the delay threshold of loss detection is: d=max(g·max(srtt,lrtt),k) t d =t c -d Where d is the delay threshold used to determine the gradient packet loss, rtt and lrtt are the smoothed round-trip time and the most recently measured round-trip time, respectively, g is a dynamically adjustable gain factor, and t d is the loss detection time, t c For the current moment.
8. The multi-path data transmission method for distributed machine learning according to claim 1, characterized in that: In step S7, the preset transmission end condition includes that the gradient sending end has completed the transmission of all gradient data packets to be sent and the gradient receiving end has cumulatively received gradient data packets that meet a preset loss tolerance threshold.
9. The multi-path data transmission method for distributed machine learning according to claim 8, characterized in that: The loss tolerance threshold v is: δ=(δ max -d min )·(1-e -kr )+d min ,0≤r≤R In the formula, δ max and δ min are the upper and lower limits of the loss tolerance threshold, r is the current communication round, k is the step size of δ update, and R is the total number of communication rounds.
Citation Information
Patent Citations
P2P distributed machine learning training system data transmission method based on NDN
CN112579301A
Multilayer parameter distributed data transmission method and device and readable medium
CN113556247A
Cross-domain data transmission method based on federal learning
CN115037669A
Gradient transmission method fusing geographically distributed machine learning multi-dimensional features
CN117319283A
Cited By
Delay forwarding method for TCP retransmission data segment and association response based on P4 switch
CN119363297A
Delayed forwarding method of TCP retransmission data segments and associated responses based on P4 switch
CN119363297B
Distributed Transform training-oriented gradient bounded loss tolerance transmission optimization method
CN119996533A
