Method, apparatus, electronic device and medium for distributed machine learning

By identifying the segments to be processed for user equipment and fusing them based on the communication links of the fusion absorption process, the problem of high communication overhead in distributed communication is solved. This achieves both reduced communication overhead and improved network robustness. It also solves the communication overhead problem in distributed machine learning, achieving both reduced communication overhead in the distributed machine learning network and ensuring the convergence and robustness of the distributed machine learning algorithm.

CN116882516BActive Publication Date: 2025-12-16BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310700195.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-12-16
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

In distributed machine learning, the communication overhead caused by the exchange of model parameters between various user devices through communication links is large, leading to problems such as network congestion, latency, and device energy consumption.

Method used

Each user device (UAV) is assigned a segment to be processed, which includes its own segment, target neighboring devices, and the physical link between itself and the target neighboring devices. The UAV is then fused and processed based on preset processing rules until the final segment is obtained. The final physical link is then used as the communication link to complete distributed machine learning among the UAVs.

Benefits of technology

While saving communication overhead, it ensures the convergence of distributed machine learning algorithms, improves the robustness and scalability of the network, and reduces the possibility of single points of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116882516B_ABST
    Figure CN116882516B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for distributed machine learning, electronic equipment and medium. Through application of the technical solution of the application, all physical links under the network are not selected as communication links for model parameter exchange between user equipment, but according to a preset processing rule, a physical link with smaller communication overhead and higher robustness is selected as a communication link. Thus, the purpose of guaranteeing convergence of a distributed machine learning algorithm is achieved on the premise of saving communication overhead of the distributed machine learning network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to data processing technology, and in particular to a distributed machine learning method and device, electronic equipment and medium. BACKGROUND

[0002] In related technologies, distributed machine learning technology is one of the key technologies for realizing fully decentralized deep learning model cooperative training on the network edge.

[0003] In the distributed machine learning, the distributed machine learning runs in an iterative manner. Specifically, in each iteration, a user sequentially performs a local model training step and a model consensus step. Thus, the user exchanges machine learning model parameters with its adjacent users to achieve global convergence.

[0004] However, as the machine learning model parameters and complexity continue to grow, and the number of servers in the distributed machine learning network continues to increase, the communication overhead of exchanging model parameters between users through communication links continues to increase. Understandably, this rapid growth in communication overhead leads to network congestion, delay, and device energy loss. SUMMARY

[0005] Embodiments of the present application provide a distributed machine learning method, device, electronic equipment and medium. Thus, the problem of large communication overhead caused by the need for model parameter exchange between user devices through communication links in the distributed machine learning process is solved.

[0006] According to an aspect of the embodiments of the present application, a distributed machine learning method is provided, which is applied to a distributed machine learning network comprising a plurality of user devices, and includes:

[0007] determining, for each user device, a to-be-processed segment corresponding to itself, the to-be-processed segment comprising the user device itself, a target neighbor device adjacent to itself, and a physical link between the target neighbor device and the user device;

[0008] based on a preset processing rule, respectively performing fusion absorption processing on each to-be-processed segment until an final segment is obtained, the final segment comprising a plurality of final physical links;

[0009] using the plurality of final physical links as communication links in the distributed machine learning network, and based on the communication links, completing distributed machine learning between each user device.

[0010] Optionally, in another embodiment based on the above-mentioned method of the present application, the step of determining, for each user device, a to-be-processed segment corresponding to itself comprises:

[0011] determining, for each of the user devices, a neighbor user device corresponding to the user device, the neighbor user device being a user device that is on the same physical link as the user device and adjacent to the user device;

[0012] determining, for each of the user devices, a communication cost of a physical link between the user device and the neighbor user device corresponding to the user device;

[0013] determining, for each of the user devices, a to-be-processed segment corresponding to the user device based on the communication cost between the user device and the neighbor user device corresponding to the user device.

[0014] Optionally, in another embodiment based on the above method of the application, the determining, for each of the user devices, a to-be-processed segment corresponding to the user device based on the communication cost between the user device and the neighbor user device corresponding to the user device, comprises:

[0015] taking, as a target physical link corresponding to the user device, a physical link between the user device and the neighbor user device corresponding to the user device, the communication cost of which is the smallest; and

[0016] taking, as a target neighbor device corresponding to the user device, a user device adjacent to the user device in the target physical link corresponding to the user device;

[0017] determining, for each of the user devices, a to-be-processed segment corresponding to the user device based on the target physical link and the target neighbor device corresponding to the user device.

[0018] Optionally, in another embodiment based on the above method of the application, the determining, for each of the user devices, a communication cost of a physical link between the user device and the neighbor user device corresponding to the user device, comprises:

[0019] calculating the communication cost of the physical link between the user device and the neighbor user device corresponding to the user device based on a packet loss rate between the user device and the neighbor user device corresponding to the user device.

[0020] Optionally, in another embodiment based on the above method of the application, the fusing and absorbing each to-be-processed segment based on the preset processing rule until a final segment is obtained, the final segment including a plurality of final physical links, comprises:

[0021] obtaining two first to-be-processed segments adjacent in the physical link in each to-be-processed segment, and determining a first processing level corresponding to each of the two first to-be-processed segments;

[0022] If the first processing levels corresponding to the two first to-be-processed segments are the same, the two first to-be-processed segments are fused into one second to-be-processed segment, and a second processing level is assigned to the second to-be-processed segment, wherein the second processing level is higher than the first processing level; or

[0023] If the processing levels corresponding to the two first to-be-processed segments are different, the first to-be-processed segment with a lower processing level is merged into the first to-be-processed segment with a higher processing level.

[0024] The above operations are repeatedly performed until one final segment is obtained, and the final segment includes a plurality of self user devices, target neighbor devices adjacent to the self, and a plurality of final physical links.

[0025] Optionally, in another embodiment based on the above method of the present application, the distributed machine learning between the user devices is completed based on the communication links, including:

[0026] The user devices are controlled to send node degree information to communication neighbor user devices corresponding to the self, wherein the node degree information is the number of communication links adjacent to the self user device, and the communication neighbor user devices are user devices adjacent to the self and located in the same communication link as the self.

[0027] Based on the node degree information received by each of the user devices, a consensus matrix is generated, and the distributed machine learning between the user devices is completed based on the consensus matrix.

[0028] Optionally, in another embodiment based on the above method of the present application, the consensus matrix is generated based on the following formula:

[0029]

[0030] wherein d i is the degree of the user device i, A(G ′ ) is an N x N adjacency matrix of the communication link, and N is the number of user devices in the network.

[0031] According to still another aspect of the embodiments of the present application, a distributed machine learning device is provided, which is applied to a distributed machine learning network including a plurality of user devices, and includes:

[0032] A determination module is configured to determine, for each of the user devices, a to-be-processed segment corresponding to the self, wherein the to-be-processed segment includes the self user device, target neighbor devices adjacent to the self, and physical links between the target neighbor devices.

[0033] a processing module, configured to perform fusion absorption processing on each to-be-processed segment respectively based on a preset processing rule, until a final segment is obtained, and the final segment includes a plurality of final physical links;

[0034] a learning module, configured to take the plurality of final physical links as communication links in the distributed machine learning network, and complete distributed machine learning between each user equipment based on the communication links.

[0035] According to still another aspect of the embodiments of the present application, an electronic device is provided, comprising:

[0036] a memory, configured to store executable instructions; and

[0037] a display, configured to execute the executable instructions with the memory, so as to complete the operations of any of the above-mentioned distributed machine learning methods.

[0038] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, configured to store computer readable instructions, which are executed to perform the operations of any of the above-mentioned distributed machine learning methods.

[0039] In the present application, a to-be-processed segment corresponding to each user equipment can be determined, which includes the user equipment itself, a target neighbor device adjacent to the user equipment, and a physical link between the target neighbor device; based on a preset processing rule, fusion absorption processing is performed on each to-be-processed segment respectively, until a final segment is obtained, and the final segment includes a plurality of final physical links; the plurality of final physical links are taken as communication links in the distributed machine learning network, and distributed machine learning between each user equipment is completed based on the communication links.

[0040] By applying the technical solutions of the present application, not all physical links in the network are selected as communication links for exchanging model parameters between user equipments, but physical links with smaller communication overhead and higher robustness are selected as communication links according to the preset processing rule. Thus, the purpose of guaranteeing convergence of the distributed machine learning algorithm is achieved on the premise of saving communication overhead of the distributed machine learning network.

[0041] The technical solutions of the present application will be described in further detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings, which form a part of the specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.

[0043] The present application can be more clearly understood and appreciated from the following detailed description, taken in conjunction with the accompanying drawings, in which:

[0044] Figure 1 A schematic diagram of a method of distributed machine learning according to the present application;

[0045] Figure 2 A schematic diagram of a system architecture of a method of distributed machine learning according to the present application;

[0046] Figure 3 A schematic diagram of an overall flow of a method of distributed machine learning according to the present application;

[0047] Figure 4 A schematic diagram of a system architecture of another method of distributed machine learning according to the present application;

[0048] Figure 5 A schematic diagram of selecting communication links using minimum spanning tree technique according to the present application;

[0049] Figure 6 A schematic diagram of an electronic device according to the present application;

[0050] Figure 7 A schematic diagram of an electronic device according to the present application. DETAILED DESCRIPTION

[0051] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments are not limiting to the scope of the present application unless specifically stated otherwise.

[0052] It should be understood, of course, that the various embodiments of the present application are not limited to the illustrations described above, but can vary the steps of the methods and the components and steps of the devices and systems described and / or illustrated therein.

[0053] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way limiting to the scope of the application or its applications or uses.

[0054] Techniques, methods, and apparatus known to those of ordinary skill in the relevant art can not be discussed in detail herein. However, where appropriate, such techniques, methods, and apparatus can be considered part of the present application.

[0055] It should be noted that like reference numerals and letters in the various figures indicate similar items, and, thus, no further discussion will be provided for these items.

[0056] In addition, the technical solutions among the various embodiments of the present application can be combined with each other, but it must be based on the implementation by the ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection required by the present application.

[0057] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative positional relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), if the certain posture changes, the directional indications will also change accordingly.

[0058] The method for performing distributed machine learning according to the exemplary embodiments of the present application will be described below in conjunction with Figures 1-5 It should be noted that the following application scenarios are only shown for the purpose of facilitating the understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0059] The present application also proposes a method, device, electronic equipment and medium for distributed machine learning.

[0060] Figure 1 The flowchart of the method for distributed machine learning according to the embodiments of the present application is schematically shown. As Figure 1 shown, the method is applied in a distributed machine learning network comprising a plurality of user devices:

[0061] S101, in the present application, a to-be-processed segment corresponding to each user device can be determined, the to-be-processed segment comprising the user device itself, a target neighbor device adjacent to the user device, and a physical link between the target neighbor device.

[0062] S102, based on a preset processing rule, each to-be-processed segment is respectively fused and absorbed until an final segment is obtained, the final segment comprising a plurality of final physical links.

[0063] S103, the plurality of final physical links are taken as communication links in the distributed machine learning network, and based on the communication links, distributed machine learning between each user device is completed.

[0064] In the related art, the distributed machine learning technology is one of the key technologies for realizing fully decentralized deep learning model cooperative training on the edge side of the network, and finding an efficient communication mechanism for distributed learning is a key problem in distributed learning research.

[0065] To further explain the distributed machine learning process proposed in this application, it is understood that distributed machine learning is a machine learning setup with a similar purpose to federated learning. It also allows multiple user devices to collaboratively train machine learning models, but its implementation method is different from federated learning.

[0066] Specifically, in distributed machine learning, the central server (if it exists) does not centrally collect and compute model parameters from various user devices across the network. Instead, distributed learning uses communication between adjacent users to exchange model parameters, thereby achieving model sharing throughout the network (i.e., ensuring that the model parameters held by each user device tend to the average of the model parameters of all user devices, i.e., the consensus average of the model).

[0067] It should be noted that most existing distributed machine learning technologies still require a central server to manage the network, but this central server does not handle the function of processing model parameters.

[0068] For example, with Figure 2 As shown, it is a distributed machine learning network consisting of multiple user devices and physical links between them. Each user device has its own local machine learning model (specifically, some parameters corresponding to this model) and local dataset.

[0069] Furthermore, such as Figure 2 The diagram illustrates the steps of the distributed machine learning proposed in this application. As can be seen from the diagram, the distributed machine learning operates iteratively. In each iteration, the user device sequentially executes the following two steps:

[0070] Step a, Local update steps:

[0071] In one embodiment, the parameters of a machine learning model held locally on a user device can be updated using a gradient descent algorithm.

[0072] Specifically, at each iteration t, user device i will use mini-batch stochastic gradient descent to process the machine learning model x it holds. i (t) is updated, and the process is as follows:

[0073]

[0074] Where μ is the step size (i.e., learning rate) of stochastic gradient descent, and B i (t) represents the local dataset D obtained by user device i at iteration t. i A batch of training data was randomly selected.

[0075] Step b, consensus update step:

[0076] Through the communication link, the user equipment exchanges the model parameters of the machine learning model with its neighboring user equipment to achieve global convergence.

[0077] In one way, the physical link is a physical medium connection (such as a twisted pair or a wireless communication link) between user equipments, and the communication link is a part of the physical link.

[0078] It can be understood that only the user equipments at both ends of the communication link will communicate bidirectionally during the consensus update (i.e., perform the above-mentioned step b, consensus update step) and exchange model parameters through bidirectional communication.

[0079] In order to ensure the consensus average of the model parameters, each user will share the model parameters with its neighboring users on the "communication link", and the consensus update is still an update of the local machine learning model parameters, and the result of the consensus update is a weighted average of the result (i.e., the model parameters) of the user in step a (i.e., local update) and the result of the neighbor user equipment in step a. As an example, the process of this weighted average is as follows:

[0080]

[0081] It can be understood that the above formula expresses the operation of the user equipment to take the model parameters of itself and the neighbor model parameters received from the neighbor user equipment to perform a weighted average.

[0082] where N i is the set of all neighbors of user equipment i, and W is called a consensus matrix (its elements are the weights used in the weighted average).

[0083] Further, the mathematical properties of the consensus matrix W are crucial to ensure the convergence of the D-PSGD algorithm, that is, if W can be optimized, then through the consensus update (i.e., weighted average with neighbor devices), the model parameters held by all user equipments in the network will be able to achieve consensus average (i.e., the same and tend to the average value).

[0084] Further, in the weighted average formula, if there is no "communication link" between user equipment i and user equipment j (it is possible that there is no physical link between them, or it is possible that there is a physical link between them, but this physical link is not selected as a communication link), then the corresponding consensus matrix element W i, is 0 (because user equipment i cannot receive the model parameters of user equipment j that does not have a communication link with user equipment i, and can only give the weight Wi,j is set to 0.

[0085] From the above, it can be seen that the distributed machine learning process in the above steps does not require a central parameter server to collect and process model parameters of all user devices. Instead, in a mode in which user devices adjacent to each other exchange model parameters through a communication link, the purpose of sharing model parameters in the entire distributed machine learning network is achieved.

[0086] Further, selecting which links in the physical link as a communication link directly affects the value range of the consensus matrix (i.e., if there is no communication link between user devices, the corresponding element in the consensus matrix can only be set to 0, and if there is a communication link between user devices, the corresponding element can be assigned a real number > 0), which in turn affects the successful convergence of the distributed machine learning algorithm. The chain of this influence is: selection of communication link → value of consensus matrix → convergence of distributed machine learning algorithm.

[0087] Further, in the process of consensus update (i.e., step b), the user device will communicate with the user device adjacent to it on the communication link (i.e., there is a communication link between the two user devices), and the content of the bidirectional communication transmission is the parameter of the model. This bidirectional communication process brings a lot of communication overhead. As can be seen, in the case where the physical link is determined (i.e., the number and communication overhead of each link are determined), the more communication links selected, the greater the overall communication overhead of the network.

[0088] In summary, in order to reduce the communication overhead in the distributed machine learning network, two problems need to be solved: first, how to select a part of the links in the physical link as a communication link. That is, when selecting, it is necessary to ensure the convergence of the distributed machine learning algorithm, that is, a consensus matrix that meets a certain mathematical condition must exist. The second is, after selecting the communication link, how to find a consensus matrix W that meets a certain mathematical condition according to the selected communication link.

[0089] Based on the above problems, the present application proposes a distributed machine learning method, which is that after obtaining the initial traffic characteristics for judging whether there is an alarm event in the network, not all physical links in the network are selected as communication links for model parameter exchange between user devices, but according to a predetermined processing rule, the physical links with smaller communication overhead and higher robustness are selected as communication links. Thus, the purpose of ensuring the convergence of the distributed machine learning algorithm is achieved on the premise of saving the communication overhead of the distributed machine learning network.

[0090] Further, the present application combines Figure 3 The scheme is specifically described as follows:

[0091] Step 1, determine the neighbor user equipment corresponding to each user equipment.

[0092] The neighbor user equipment is the user equipment in the same physical link and adjacent to the user equipment.

[0093] As shown in the system running architecture diagram of the method of distributed machine learning proposed in the embodiments of the present application. Figure 4 As shown in the system running architecture diagram of the method of distributed machine learning proposed in the embodiments of the present application. First, it is necessary to determine part of the physical links as communication links from all the physical links.

[0094] Step 2, based on the packet loss rate between each user equipment and the neighbor user equipment corresponding to itself, the communication overhead of the physical link between each user equipment and the neighbor user equipment corresponding to itself is calculated.

[0095] In one way, each user equipment in the distributed machine learning network needs to send a number of messages to the user equipment adjacent to it on the physical link (i.e. the neighbor user equipment) to calculate the packet loss rate between them.

[0096] As an example, taking one of the local user equipment A and the opposite neighbor user equipment B as an example, the message content sent by the user equipment A can include:

[0097] The ID and other identity information of the user equipment A, a number of test message texts (such as a corpus of encyclopedias), the total number of test message texts sent by the user equipment A and the total number of message texts sent so far.

[0098] Further, for the neighbor user equipment B, after receiving a number of messages sent by the user equipment A, it can send response information to the user equipment A, which can include, for example:

[0099] The ID and other identity information of the user equipment B, the number of message texts successfully received by the user equipment B and the number of message texts that should be successfully received (i.e. the total number of test message texts sent and notified by the opposite party in advance).

[0100] As can be understood, the ratio of the number of message texts successfully received by the user equipment B to the total number of messages sent is the "transmission error rate" of the link, and the communication overhead is defined as 1 / transmission error rate, representing the actual amount of information needed to send a certain amount of information.

[0101] As can be understood, the higher the communication overhead between the two, the more actual bits need to be sent to send a certain number (measuring unit can be bits) of information on the link.

[0102] Step 3, taking the physical link with minimum communication overhead between each user device and the corresponding neighbor user device as the target physical link corresponding to the user device; and taking the user device adjacent to itself in the target physical link corresponding to each user device as the target neighbor device corresponding to the user device.

[0103] Further, after determining the communication overhead corresponding to each physical link connected to each user device, the target physical link (i.e. the physical link with minimum communication overhead) and the target neighbor device (i.e. the neighbor user device at the opposite end of the target physical link) connected to each user device can be determined.

[0104] It should be noted that if there are multiple target physical links corresponding to a user device (i.e. there are multiple physical links with minimum communication overhead connected to the user device), the user device can also correspond to multiple target neighbor devices.

[0105] Step 4, taking the target user device, the target neighbor device adjacent to the target user device, and the target physical link between the target user device and the target neighbor device as the to-be-processed segment of the target user device.

[0106] As an example, taking one of the target user devices as A (i.e. any one of the user devices), the target neighbor user device corresponding to the target user device A as B, and the target physical link between the target user device A and the target neighbor user device B as C, the generation method of the to-be-processed segment A corresponding to the target user device A can be: the set of A, B, and C.

[0107] That is, the to-be-processed segment A includes the target user device A, the target neighbor user device B, and the target physical link C between them.

[0108] Taking this as the selection criterion, each user device in the distributed machine learning network is determined to correspond to a to-be-processed segment.

[0109] Step 5, obtaining two first to-be-processed segments adjacent in physical link in each to-be-processed segment, and determining the first processing level corresponding to the two first to-be-processed segments, respectively. Then step 6a or step 6b is executed.

[0110] In one way, after determining the to-be-processed segment corresponding to each user device in the distributed machine learning network, the to-be-processed segments can be fused or merged according to the processing level corresponding to each to-be-processed segment.

[0111] Step 6a, if the two first to-be-processed segments correspond to the same first processing level, then the two first to-be-processed segments are fused into a second to-be-processed segment, and the second to-be-processed segment is assigned a second processing level, wherein the second processing level is higher than the first processing level.

[0112] In one approach, the processing level of a to-be-processed segment can be determined by the number of times the to-be-processed segment has been fused in the historical period.

[0113] For example, for to-be-processed segment A and to-be-processed segment B in a neighboring relationship, if to-be-processed segment A has fused to-be-processed segment C in the historical period, then the processing level corresponding to to-be-processed segment A is level two. If to-be-processed segment B has fused to-be-processed segment B in the historical period, then the processing level corresponding to to-be-processed segment B is also level two.

[0114] Further, in the process of processing to-be-processed segment A and to-be-processed segment B, to-be-processed segment B can be fused with to-be-processed segment A (because the processing levels of the two are the same). In other words, to-be-processed segment B and to-be-processed segment A are converted into a to-be-processed segment X (i.e., a second to-be-processed segment).

[0115] It can be understood that the number of target physical links contained in the fused to-be-processed segment X also increases (i.e., the user equipment nodes, the neighbor user equipment nodes, and the target physical links connected by the two in to-be-processed segment A and to-be-processed segment B are all included in to-be-processed segment X). At this time, the processing level of to-be-processed segment C will not be changed (i.e., it is still level two).

[0116] Step 6b, if the two first to-be-processed segments correspond to different processing levels, then the first to-be-processed segment with the lower processing level is merged into the first to-be-processed segment with the higher processing level.

[0117] In one approach, the processing level of a to-be-processed segment can be determined by the number of times the to-be-processed segment has been fused in the historical period.

[0118] For example, for to-be-processed segment A and to-be-processed segment B in a neighboring relationship, if to-be-processed segment A has fused to-be-processed segment C and to-be-processed segment D in the historical period, then the processing level corresponding to to-be-processed segment A is level three. If to-be-processed segment B has not fused other to-be-processed segments in the historical period, then the processing level corresponding to to-be-processed segment B is level one.

[0119] Further, in the process of processing to-be-processed segment A and to-be-processed segment B, to-be-processed segment B can be merged into to-be-processed segment A. In other words, to-be-processed segment B is converted into a part of to-be-processed segment A.

[0120] It can be understood that the number of target physical links contained in the merged to-be-processed segment A will also increase (that is, the user equipment nodes, neighbor user equipment nodes and target physical links connected by the two in the to-be-processed segment B are also merged into the to-be-processed segment A). And at this time, the processing level of the to-be-processed segment A is continued to be promoted by one level (that is, promoted to four levels).

[0121] The operations of steps 6a and 6b are repeatedly performed until a final segment is obtained.

[0122] Among them, the final segment contains multiple self user equipment, target neighbor equipment adjacent to the self, and multiple final physical links.

[0123] It can be understood that when only one segment is left in the distributed machine learning network, the segment is the final segment, and all physical links (that is, final physical links) contained in the final segment are the communication links to be selected by the application.

[0124] Step 7, control each user equipment to send node degree information to the communication neighbor user equipment corresponding to itself.

[0125] Among them, the node degree information is the number of communication links adjacent to the user equipment itself, and the communication neighbor user equipment is the user equipment adjacent to itself and located in the same communication link.

[0126] Step 8, based on the node degree information received by each user equipment, a consensus matrix is generated, and distributed machine learning between each user equipment is completed based on the consensus matrix.

[0127] After the selection of the communication link is completed, each user equipment exchanges the degree information of the nodes with its neighbors on the communication link (the degree of a user equipment is the number of communication links adjacent to the user equipment), and after the exchange of the degree information is completed, the consensus matrix W is generated according to the following rules:

[0128]

[0129] Among them, d i is the degree of user equipment i, A(G ′ ) is the adjacency matrix of the selected communication link in the application.

[0130] Among them, the adjacency matrix is an N×N matrix, N is the number of all user equipment in the network, when there is a communication link between user equipment i and user equipment j, A(G ′ ) i, is 1, otherwise 0, in particular, when i=j, A(G ′ ) i, is also 1.

[0131] In summary, the application provides a distributed machine learning method for efficient communication. Compared with other machine learning methods requiring a central server, the application implements a fully decentralized distributed machine learning process. That is, the central server is not required for model parameter processing and network management, which not only improves the scalability of the network, but also effectively reduces the possibility of single point failure problems and improves the robustness of the network.

[0132] In addition, the application only needs to use part of all physical links in the network for bidirectional communication between user devices. It can be understood that when part of the physical links in the network are disconnected, the scheme can continue to run.

[0133] By applying the technical solution of the application, not all physical links in the network are selected as communication links for model parameter exchange between user devices, but according to the preset processing rule, the physical link with smaller communication overhead and higher robustness is selected as the communication link. Thus, the purpose of ensuring the convergence of the distributed machine learning algorithm is achieved on the premise of saving the communication overhead of the distributed machine learning network.

[0134] Optionally, in another embodiment based on the above method of the application, the determining of the to-be-processed segment corresponding to each user device includes:

[0135] determining, for each user device, a neighbor user device corresponding to itself, the neighbor user device being a user device adjacent to itself and located on the same physical link as itself;

[0136] determining, for each user device, the communication overhead of the physical link between the user device and the corresponding neighbor user device;

[0137] determining, for each user device, the to-be-processed segment corresponding to itself based on the communication overhead between the user device and the corresponding neighbor user device.

[0138] Optionally, in another embodiment based on the above method of the application, the determining of the to-be-processed segment corresponding to each user device based on the communication overhead between the user device and the corresponding neighbor user device includes:

[0139] selecting, as the target physical link corresponding to each user device, the physical link between the user device and the corresponding neighbor user device with the smallest communication overhead; and

[0140] selecting, as the target neighbor device corresponding to each user device, the user device adjacent to itself in the target physical link corresponding to the user device;

[0141] Based on the target physical link and the target neighbor device corresponding to each of the user devices, a corresponding to-be-processed segment is determined for each of the user devices.

[0142] Optionally, in another embodiment based on the above method of the application, the communication overhead of the physical link between the neighbor user device corresponding to each of the user devices and itself is determined, including:

[0143] Based on the packet loss rate between each of the user devices and the neighbor user device corresponding to itself, the communication overhead of the physical link between each of the user devices and the neighbor user device corresponding to itself is calculated.

[0144] Optionally, in another embodiment based on the above method of the application, the to-be-processed segments are respectively fused and absorbed based on a preset processing rule until a final segment is obtained, and the final segment includes multiple final physical links, including:

[0145] Two first to-be-processed segments adjacent in the physical link are obtained from each of the to-be-processed segments, and a first processing level corresponding to the two first to-be-processed segments is respectively determined.

[0146] If the first processing levels corresponding to the two first to-be-processed segments are the same, the two first to-be-processed segments are fused into a second to-be-processed segment, and a second processing level is assigned to the second to-be-processed segment, wherein the second processing level is higher than the first processing level; or,

[0147] If the processing levels corresponding to the two first to-be-processed segments are different, the first to-be-processed segment with a lower processing level is merged into the first to-be-processed segment with a higher processing level.

[0148] The above operation is repeatedly performed until a final segment is obtained, and the final segment includes multiple user devices, target neighbor devices adjacent to the user devices, and multiple final physical links.

[0149] Optionally, in another embodiment based on the above method of the application, the distributed machine learning between the user devices is completed based on the communication link, including:

[0150] Each of the user devices is controlled to send node degree information to a communication neighbor user device corresponding to itself, wherein the node degree information is the number of communication links adjacent to the user device, and the communication neighbor user device is a user device adjacent to itself and located in the same communication link.

[0151] Based on the node degree information received by each of the user devices, a consensus matrix is generated, and the distributed machine learning between the user devices is completed based on the consensus matrix.

[0152] Optionally, in another embodiment based on the method described above in the present application, the consensus matrix is generated based on the following formula:

[0153]

[0154] where d i is the degree of user device i, A(G ′ ) is the N×N adjacency matrix of the communication link, and N is the number of user devices in the network.

[0155] In one way, the method for determining the communication link proposed in the present application is described as follows:

[0156] As an example, the present application can select the minimum spanning tree of the network as the selection method of the communication link, and generate the distributed and decentralized minimum spanning tree through the GHS algorithm. In this process, the present application does not need a central server to manage the network, nor does it need a central server to process model parameters, thereby realizing completely decentralized distributed machine learning.

[0157] Further, after determining the communication cost for each user device corresponding to the physical link, the present application can regard the communication cost as the weight of the weighted topology graph in the distributed consensus network.

[0158] As Figure 5 shown, at the initialization, each user device regards itself as a to-be-processed segment with only one user device. The to-be-processed segment is a topology graph containing the physical link of the adjacent user device. At each iteration, the segment is repeatedly updated in the manner of phase a and phase b.

[0159] Phase a, finding the minimum weight (i.e., ) out-edge phase

[0160] The out-edge with the minimum weight among all the physical links adjacent to the user devices in a to-be-processed segment (the out-edge refers to a link with one end connected to a user device in the segment and the other end connected to a user device outside the segment) will be selected as the minimum weight out-edge of the to-be-processed segment.

[0161] Phase b, fusion and merging phase between to-be-processed segments

[0162] If the user device at the other end of the minimum weight out-edge of to-be-processed segment A is located in to-be-processed segment B, and the size (the number of nodes and edges) of to-be-processed segment A is smaller than that of to-be-processed segment B, then segment A will become part of segment B.

[0163] If the to-be-processed segment A and the to-be-processed segment B have the same minimum weight out-edge, they will be fused into a new to-be-processed segment D.

[0164] The above steps are repeatedly executed, and when only one final segment is left in the distributed machine learning network, the final segment is the minimum spanning tree of the network, and at this time, the minimum spanning tree is the communication link to be selected in the application.

[0165] Optionally, in another embodiment of the application, as shown in Figure 6 The application further provides a distributed machine learning device. The device comprises:

[0166] The determining module 201 is configured to determine, for each user equipment, a to-be-processed segment corresponding to the user equipment, the to-be-processed segment comprising the user equipment, a target neighbor equipment adjacent to the user equipment, and a physical link between the target neighbor equipment and the user equipment;

[0167] The processing module 202 is configured to perform fusion and absorption processing on each to-be-processed segment based on a preset processing rule, until a final segment is obtained, the final segment comprising a plurality of final physical links;

[0168] The learning module 203 is configured to take the plurality of final physical links as communication links in the distributed machine learning network, and complete distributed machine learning between the user equipments based on the communication links.

[0169] By applying the technical solution of the application, all physical links in the network are not selected as communication links for model parameter exchange between user equipments, but physical links with smaller communication overhead and higher robustness are selected as communication links according to the preset processing rule. Thus, the purpose of guaranteeing convergence of the distributed machine learning algorithm is achieved on the premise of saving communication overhead of the distributed machine learning network.

[0170] In another embodiment of the application, the processing module 202 is configured to:

[0171] determine, for each user equipment, a neighbor user equipment corresponding to the user equipment, the neighbor user equipment being a user equipment adjacent to the user equipment and located on the same physical link as the user equipment;

[0172] determine, for each user equipment, communication overhead of a physical link between the user equipment and a corresponding neighbor user equipment;

[0173] determine, for each user equipment, a to-be-processed segment corresponding to the user equipment based on the communication overhead between the user equipment and the corresponding neighbor user equipment.

[0174] In another embodiment of the present application, the processing module 202 is configured to:

[0175] selecting, as a target physical link corresponding to each of the user devices, a physical link with minimum communication overhead between the user device and a corresponding neighbor user device; and

[0176] selecting, as a target neighbor device corresponding to each of the user devices, a user device adjacent to the user device from among the target physical links corresponding to the user devices.

[0177] selecting, as a to-be-processed segment of a target user device, the target user device, a target neighbor device adjacent to the target user device, and a target physical link between the target user device and the target neighbor device, wherein the target user device is any one of the user devices.

[0178] In another embodiment of the present application, the processing module 202 is configured to:

[0179] calculating, based on a packet loss rate between each of the user devices and a corresponding neighbor user device, a communication overhead of a physical link between the user device and the corresponding neighbor user device.

[0180] In another embodiment of the present application, the processing module 202 is configured to:

[0181] obtaining two first to-be-processed segments adjacent in physical link from among the to-be-processed segments, and determining a first processing level corresponding to each of the two first to-be-processed segments;

[0182] if the first processing levels corresponding to the two first to-be-processed segments are the same, merging the two first to-be-processed segments into a second to-be-processed segment, and assigning a second processing level to the second to-be-processed segment, wherein the second processing level is higher than the first processing level; or

[0183] if the processing levels corresponding to the two first to-be-processed segments are different, merging the first to-be-processed segment with a lower processing level into the first to-be-processed segment with a higher processing level;

[0184] repeating the above operations until a final segment is obtained, wherein the final segment includes a plurality of target neighbor devices adjacent to the user devices, and a plurality of final physical links.

[0185] In another embodiment of the present application, the processing module 202 is configured to:

[0186] controlling each of the user devices to send node degree information to a communication neighbor user device corresponding to itself, wherein the node degree information is a number of communication links adjacent to the user device itself, the communication neighbor user device is a user device adjacent to the user device itself and located in a same communication link as the user device itself;

[0187] generating a consensus matrix based on the node degree information received by each of the user devices, and completing distributed machine learning among the user devices based on the consensus matrix.

[0188] In another embodiment of the present application, the processing module 202 is configured to:

[0189] generate the consensus matrix based on the following formula:

[0190]

[0191] wherein d i is a degree of the user device i, A(G ′ ) is an adjacency matrix of N x N of the communication link, and N is a number of user devices in the network.

[0192] Figure 7 is a logical structure block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 300 can be an electronic device.

[0193] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, for example, a memory including instructions, is also provided, and the above-described method of distributed machine learning can be performed by an electronic device processor to complete the method, which includes determining a to-be-processed segment corresponding to itself for each of the user devices, the to-be-processed segment including the user device itself, a target neighbor device adjacent to the user device itself, and a physical link between the target neighbor device; performing fusion absorption processing on each of the to-be-processed segments based on a preset processing rule until a final segment is obtained, the final segment including a plurality of final physical links; taking the plurality of final physical links as communication links in the distributed machine learning network, and completing distributed machine learning among the user devices based on the communication links. Optionally, the above-described instructions can also be executed by the processor of the electronic device to complete other steps involved in the above-described exemplary embodiments. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0194] In the example embodiment, an application program / computer program product is also provided, comprising one or more instructions executable by a processor of an electronic device to complete the method of distributed machine learning described above, which comprises: determining, for each of the user devices, a to-be-processed segment corresponding to itself, the to-be-processed segment comprising the user device itself, a target neighbor device adjacent to itself, and a physical link between the target neighbor device; based on a preset processing rule, respectively performing fusion absorption processing on each to-be-processed segment until a final segment is obtained, the final segment comprising a plurality of final physical links; taking the plurality of final physical links as communication links in the distributed machine learning network, and based on the communication links, completing distributed machine learning between each of the user devices.

[0195] Optionally, the instructions can also be executed by the processor of the electronic device to complete other steps involved in the example embodiment described above.

[0196] Figure 7 An example diagram of the electronic device 300 is shown. Those skilled in the art can understand that the schematic diagram Figure 7 The electronic device 300 is only an example and does not constitute a limitation on the electronic device 300, and can include more or fewer components than shown, or combine certain components, or different components, for example, the electronic device 300 can also include an input / output device, a network access device, a bus, etc.

[0197] The processor 302 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor 302 can also be any conventional processor. The processor 302 is the control center of the electronic device 300, and connects all parts of the electronic device 300 through various interfaces and lines.

[0198] The memory 301 can be used to store computer-readable instructions 303, and the processor 302 implements various functions of the electronic device 300 by running or executing the computer-readable instructions or modules stored in the memory 301, and calling data stored in the memory 301. The memory 301 can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; and the storage data area can store data created according to the use of the electronic device 300, etc. In addition, the memory 301 can include a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash storage device, a read-only memory (ROM), a random access memory (RAM), or other non-volatile / volatile storage devices.

[0199] The modules integrated in the electronic device 300, if implemented in the form of software function modules and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method in the above-mentioned embodiments can also be implemented by computer readable instructions instructing related hardware to complete, and the computer readable instructions can be stored in a computer readable storage medium. When the computer readable instructions are executed by a processor, the steps of the above-mentioned various method embodiments can be implemented.

[0200] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the application be limited only by the scope of the claims, a properly construed, and any variations, uses, or adaptations of the application following in general the principles of the application and including such as come within the scope of the following claims are intended to be within the scope of the application. The specification and examples given are intended as illustrative only and not in a limiting sense.

[0201] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be defined by the claims appended hereto.

Claims

1. A method of distributed machine learning, the method comprising: Applied to a distributed machine learning network comprising a plurality of user devices, comprising: determining, for each of the user devices, a to-be-processed segment corresponding to the user device, the to-be-processed segment comprising the user device, a target neighbor device adjacent to the user device, and a physical link between the user device and the target neighbor device; based on a preset processing rule, performing fusion absorption processing on each to-be-processed segment respectively until a final segment is obtained, the final segment comprising a plurality of final physical links; using the plurality of final physical links as communication links in the distributed machine learning network, and based on the communication links, completing distributed machine learning between the user devices; the determining, for each of the user devices, a to-be-processed segment corresponding to the user device comprises: determining, for each of the user devices, a neighbor user device corresponding to the user device, the neighbor user device being a user device adjacent to the user device and located on a same physical link as the user device; determining, for each of the user devices, a communication overhead of a physical link between the user device and a corresponding neighbor user device; based on the communication overhead between each of the user devices and a corresponding neighbor user device, determining, for each of the user devices, a to-be-processed segment corresponding to the user device; the based on the communication links, completing distributed machine learning between the user devices comprises: controlling each of the user devices to send node degree information to a communication neighbor user device corresponding to the user device, wherein the node degree information is a number of communication links adjacent to the user device, and the communication neighbor user device is a user device adjacent to the user device and located on a same communication link as the user device; based on the node degree information received by each of the user devices, generating a consensus matrix, and based on the consensus matrix, completing distributed machine learning between the user devices; based on the following formula to generate a consensus matrix: ; wherein, is a user device of degree, is an N x N adjacency matrix of the communication link, N being the number of user devices in the network.

2. The method of claim 1, wherein, the based on the communication overhead between each of the user devices and a corresponding neighbor user device, determining, for each of the user devices, a to-be-processed segment corresponding to the user device comprises: using a physical link between each of the user devices and a corresponding neighbor user device with a minimum communication overhead as a target physical link corresponding to the user device; and using a user device adjacent to the user device in the target physical link corresponding to the user device as a target neighbor device corresponding to the user device; using a target user device, a target neighbor device adjacent to the target user device, and a target physical link between the target user device and the target neighbor device as a to-be-processed segment of the target user device, wherein the target user device is any one of the user devices.

3. The method of claim 1, wherein, the determining, for each of the user devices, a communication overhead of a physical link between the user device and a corresponding neighbor user device comprises: based on a packet loss rate between each of the user devices and a corresponding neighbor user device, calculating a communication overhead of a physical link between each of the user devices and the corresponding neighbor user device.

4. The method of claim 1, wherein, The processing rule is preset, and each to-be-processed segment is fused and absorbed respectively until a final segment is obtained, wherein the final segment includes a plurality of final physical links, including: Obtaining two first to-be-processed segments adjacent in physical link in each to-be-processed segment, and determining a first processing level corresponding to each of the two first to-be-processed segments; If the first processing levels corresponding to the two first to-be-processed segments are the same, the two first to-be-processed segments are fused into a second to-be-processed segment, and a second processing level is assigned to the second to-be-processed segment, wherein the second processing level is higher than the first processing level; or, If the processing levels corresponding to the two first to-be-processed segments are different, the first to-be-processed segment with a lower processing level is merged into the first to-be-processed segment with a higher processing level; The above operation is repeatedly performed until a final segment is obtained, wherein the final segment includes a plurality of self user devices, target neighbor devices adjacent to the self, and a plurality of final physical links.

5. An apparatus for distributed machine learning, configured to implement the method of claim 1, characterized in that, Applied to a distributed machine learning network including a plurality of user devices, comprising: A determination module configured to determine a to-be-processed segment corresponding to each of the user devices, wherein the to-be-processed segment includes a self user device, a target neighbor device adjacent to the self, and a physical link between the target neighbor device and the self; A processing module configured to fuse and absorb each to-be-processed segment based on a preset processing rule until a final segment is obtained, wherein the final segment includes a plurality of final physical links; A learning module configured to take the plurality of final physical links as communication links in the distributed machine learning network, and complete distributed machine learning between each user device based on the communication links.

6. An electronic device, comprising: Comprising: A memory for storing executable instructions; And, A processor for executing the executable instructions with the memory to complete the operation of the method of distributed machine learning of any one of claims 1-4.

7. A computer readable storage medium storing computer readable instructions, characterized in that, The instructions are executed to perform the operation of the method of distributed machine learning of any one of claims 1-4.