Distributed federated learning method for industrial Internet of Things based on Markov chain consensus

Through the distributed federated learning method of Markov chain consensus, the optimal consensus matrix and sparse network topology are calculated, which solves the network congestion and data privacy issues in the industrial Internet of Things, realizes efficient information mixing and cooperative learning, and improves centerless improve the efficiency and stability of distributed federated learning.

CN114139688BActive Publication Date: 2024-09-13FUZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111497630.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2024-09-13
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

In the Industrial Internet of Things, due to network congestion and data privacy leakage problems caused by the increase in the number of devices, traditional cloud computing methods are difficult to apply, and the information mixing speed of decentralized distributed federated learning is slow, affecting efficiency.

Method used

Using a distributed federated learning method based on Markov chain consensus, the optimal consensus matrix is ​​calculated through a fast hybrid Markov chain optimization problem to guide the parameter aggregation process, form a sparse network topology, reduce synchronous communication time, and utilize IEEE 802.15. The 4e time slot channel frequency hopping protocol establishes a highly reliable and low-latency network.

Benefits of technology

Accelerate information mixing speed, improve device cooperation efficiency, reduce synchronization communication time, ensure data privacy and network stability, and improve the efficiency of distributed federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139688B
    Figure CN114139688B
Patent Text Reader

Abstract

The present invention relates to a distributed federated learning method for industrial Internet of Things based on Markov chain consensus, comprising the following steps: step S1: a scheduler obtains connection conditions of Internet of Things devices in a preset area to obtain a network topology map; step S2: the scheduler calculates an optimal consensus matrix based on the network topology map by using a fast hybrid Markov chain optimization problem; step S3: the scheduler obtains a sparse topology map based on the optimal consensus matrix, and uses the sparse topology map as the topology map of the current network, and uses the sparse topology map to construct an auxiliary map to formulate a scheduling strategy for communication resources; step S4: each Internet of Things device trains a local neural network model respectively, and broadcasts the trained local neural network model to all its neighboring devices in the sparse topology map according to the scheduling strategy; step S5: after each Internet of Things device receives the model from the neighbor, the model is aggregated locally according to the consensus matrix obtained in step S2 to obtain a new local model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and specifically to a distributed federated learning method for industrial Internet of Things based on Markov chain consensus. Background Art

[0002] With the rapid development of IoT technology and its wide application in industrial fields such as smart factories, industrial automation, and smart manufacturing, IIoT technology has received widespread attention from academia and industry. However, in IIoT, the data generated by various sensor devices or IoT devices is exploding. If a large amount of data generated by the device is directly transmitted to a remote cloud platform for further processing and analysis, it may cause serious network congestion and unbearable transmission delays. At the same time, when transmitting raw data, it is likely to cause data privacy leakage and produce some undesirable results. Due to these problems, traditional cloud computing solutions are difficult to be used in the future IIoT.

[0003] In order to solve the above problems, McMahan et al. proposed federated learning in 2016. In federated learning, the edge and the central server only transmit the model parameters of the neural network to each other. Therefore, the central server will not directly obtain the local private data of the edge device, thereby ensuring the security of data privacy. Moreover, federated learning has no restrictions on the number of access devices, so it can easily cover a large number of devices. However, with the continuous increase in access devices, network congestion is easy to occur on the central server side, causing a large time delay. Moreover, when the server has an abnormal condition, it will directly cause the edge device to not work properly, resulting in a "single point failure". For some edge devices that are far away, due to the limitation of environmental resources, the parameters cannot be transmitted to the central server in time, which will hinder the progress of federated learning.

[0004] In recent years, with the continuous development of 5G technology and industrial Internet of Things, devices can directly communicate with devices within their communication distance through short-range device-to-device (D2D) links. At the same time, edge devices (nodes) such as sensors and factory gateways have the ability to store, process and analyze local data. This has formed the next generation of decentralized industrial Internet of Things networks, in which edge devices (sensors) collaborate with nearby neighboring devices to perform large-scale and complex tasks. On this basis, in order to avoid the problems encountered by federated learning, a decentralized distributed federated learning is proposed. In this decentralized distributed federated learning, the central server is removed, and all participating devices only establish communication links with their neighboring nodes to exchange models with each other and aggregate to achieve the effect of collaborative learning. This method not only protects data privacy, but also avoids communication bottlenecks caused by too many access devices to the central server and single point failures caused by central server failures. However, due to the geographical location and communication distance of the device, the device can only become a neighbor and exchange information with some devices, resulting in a slow mixing speed of information in the network and affecting the efficiency of distributed federated learning. In some previous studies, the model aggregation method is often a simple weighted average, or the maximum degree weight or optimal constant edge weight is used to aggregate the model. These methods cannot effectively solve the problem of slow information mixing in decentralized distributed federated learning. In addition, these methods do not sparse the network topology, which makes the devices spend a lot of time in the synchronous communication stage. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide an industrial Internet of Things distributed federated learning method based on Markov chain consensus, which can use the current network topology to find an optimal consensus matrix to guide the parameter aggregation process, which can not only accelerate the mixing speed of information in the device network and improve the efficiency of cooperation between devices, but also for a relatively dense network topology, after optimizing the consensus matrix, a sparse network topology will be obtained, thereby reducing the time of synchronous communication.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A distributed federated learning method for industrial Internet of Things based on Markov chain consensus provides a system including a scheduler and several Internet of Things devices, including the following steps:

[0008] Step S1: The scheduler obtains the connection status of IoT devices in a preset area and obtains a network topology map;

[0009] Step S2: The scheduler calculates the optimal consensus matrix based on the network topology using the fast hybrid Markov chain optimization problem and sends it to each IoT device;

[0010] Step S3: The scheduler obtains a sparse topology map according to the optimal consensus matrix, and uses the sparse topology map as the topology map of the current network, so that the device only communicates with its neighbors in the sparse topology map, and uses the sparse topology map to construct an auxiliary map to formulate a scheduling strategy for communication resources;

[0011] Step S4: Each IoT device trains a local neural network model according to the locally stored data, and broadcasts the trained local neural network model to all its neighboring devices in the sparse topology graph according to the scheduling strategy obtained in step S3 under the scheduling of the scheduler;

[0012] Step S5: After each IoT device receives the model from its neighbors, it aggregates the model locally according to the consensus matrix obtained in step S2 to obtain a new local model.

[0013] Furthermore, the step S1 is specifically as follows:

[0014] For IoT devices deployed in a preset area, they communicate with neighboring devices within their communication range through short-range D2D links, forming a decentralized network.

[0015] Send the connection status of IoT devices to the scheduler to get a complete network topology map

[0016] G=(V,E)

[0017] Among them, V represents the devices in the network, and E represents the edges between devices, that is, the connections between devices.

[0018] Furthermore, the step S2 is specifically as follows:

[0019] The fast mixed Markov chain optimization problem is formulated as follows:

[0020] minρ

[0021]

[0022] Among them, ρ represents the second largest eigenvalue of the consensus matrix C, let λ k (C) represents the numerically k-th largest eigenvalue of C, then ρ = max{|λ2(C)|,|-λ m (C)|}, 1 represents a column vector with all values ​​1, c i,j represents the element value of the i-th row and j-th column in the matrix C, that is, the weight of the edge connecting devices i and j, where the matrix C is the optimization variable;

[0023] By solving the above optimization problem, we get a consensus matrix C with the smallest second largest eigenvalue. Further, we rewrite the above formula into a semi-positive definite optimization problem as shown below:

[0024] min s

[0025]

[0026] in, is a weighted Laplacian matrix, is the correlation matrix obtained from the topological graph G, I represents the unit matrix, e=(e1,...,e m ) is a vector of weights of all edges in the topological graph, and diag(e) is a diagonal matrix whose diagonal elements are the elements in e; and s are optimization variables;

[0027] The above optimization problem is optimized by a standard semi-positive definite optimizer, and the final consensus matrix is ​​obtained by get.

[0028] Furthermore, the step S3 is specifically as follows:

[0029] Step S31: According to the optimal consensus matrix, no communication link is established for the edges with a weight of 0 in the matrix, and a sparse network topology graph G' is further obtained;

[0030] Step S32: Using the sparse network topology map G' as the current network topology map, so that the device only establishes communication with its neighbors in G';

[0031] Step S33: Use the time slot channel hopping TSCH media access layer protocol in IEEE 802.15.4e to establish a highly reliable and low-latency industrial Internet of Things network;

[0032] Step S34: For the TSCH scheduling strategy, first construct an auxiliary topology map based on the sparse network topology map G' that has been obtained And execute the greedy graph coloring algorithm on the obtained auxiliary topology graph.

[0033] Furthermore, the training of the local neural network model of the IoT device is specifically as follows:

[0034]

[0035] where w i,t represents the local model of device i at the tth iteration, μ is the learning rate, Represents the gradient of the local loss function.

[0036] Furthermore, the step S5 is specifically as follows: after each device receives the models from all neighbors, the process of performing model aggregation locally is as follows:

[0037]

[0038] where w i,t is the local model of the ith device, is the local model of neighbor j that can establish a communication link with device i, is the neighbor set of device i, c i,j and c i,i is the element value in the consensus matrix C calculated in step S2;

[0039] The process of performing model aggregation on all devices is expressed in matrix form as:

[0040]

[0041] in C is the consensus matrix obtained in step S2.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] According to the current device network topology, the present invention uses the fast mixed Markov chain optimization problem to calculate the optimal consensus matrix suitable for the current network topology. It can speed up the mixing speed of information in the network, improve the efficiency of distributed federated learning, and obtain a sparse network topology based on the original network topology to save the time of synchronous communication between devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of distributed federated learning and communication scheduling in the industrial Internet of Things according to an embodiment of the present invention.

[0045] Figure 2 It is a schematic diagram of an original topology containing 50 devices and a topology after being thinned out by the provided method according to an embodiment of the present invention.

[0046] Figure 3 It is a schematic diagram comparing the verification accuracy of the method provided by an embodiment of the present invention and other model aggregation methods under decentralized distributed federated learning.

[0047] Figure 4 It is a schematic diagram comparing the number of dedicated units of a sparse topology map obtained when formulating a scheduling strategy by a method provided in an embodiment of the present invention and the number of dedicated units of an original topology map. DETAILED DESCRIPTION

[0048] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0049] Please refer to Figure 1 The present invention provides an industrial Internet of Things distributed federated learning method based on Markov chain consensus, comprising the following steps:

[0050] Step S1, after each device in a certain area senses its neighbor device, it sends its neighbor information to the scheduler to obtain the current network topology G = (V, E);

[0051] Step S2: The scheduler calculates the optimal consensus matrix C of the current topology map based on the topology map obtained in step S1 by using the fast hybrid Markov chain optimization problem, and sends it to each IoT device to guide the model aggregation process;

[0052] Step S3: The scheduler obtains a sparse topology graph based on the consensus matrix calculated in step S2. The sparse topology graph is used as the topology graph of the current network, so that the device can only communicate with its neighbors in the sparse topology graph. At the same time, an auxiliary graph is constructed using the sparse topology graph. A greedy graph coloring algorithm is used to formulate a scheduling strategy for communication resources based on the auxiliary graph;

[0053] Step S4: Each IoT device initializes a neural network shared model with the same structure locally, and trains the neural network model using locally stored data. After the training is completed, the trained model is broadcast to all its neighboring devices under the scheduling of the scheduler according to the scheduling strategy obtained in step S3;

[0054] Step S5: After each IoT device receives the model from its neighbors, it aggregates the model locally according to the consensus matrix obtained in step S2 to obtain a new local model.

[0055] Preferably, in this embodiment, in a network composed of IoT devices in a certain area, devices communicate with each other through device-to-device (D2D) links, thereby building a decentralized IoT network. When a device senses all neighboring devices that can establish communication links with it, it sends its neighbor information to the scheduler, so that the scheduler can build a complete network topology graph G = (V, E) in this area, where V represents the device and E represents the edge between the devices, that is, the communication link that can be established. A network topology composed of 50 devices is as follows: Figure 2 (a) shown.

[0056] Preferably, in this embodiment, the scheduler calculates the optimal consensus matrix based on the current network topology G=(V, E) using the fast hybrid Markov chain optimization problem. The fast hybrid Markov chain optimization problem can be expressed as the following problem:

[0057] minρ

[0058]

[0059] Among them, ρ represents the second largest eigenvalue of the consensus matrix C, assuming λ k (C) represents the numerically k-th largest eigenvalue of C, then ρ = max{|λ2(C)|,|-λ m (C)|}, 1 represents a column vector with all values ​​1, c i,j It represents the element value of the i-th row and j-th column in the matrix C, which can also be understood as the weight of the edge connecting devices i and j. The matrix C is the optimization variable. Therefore, by solving the above optimization problem, a consensus matrix C with the smallest second largest eigenvalue can be obtained. For the convenience of solving, the above formula is rewritten as a semi-positive definite optimization problem as shown below:

[0060] mins

[0061]

[0062] in, is a weighted Laplacian matrix, is the correlation matrix obtained from the topological graph G, I represents the unit matrix, e=(e1,...,e m ) is a vector of weights of all edges, and diag(e) is a diagonal matrix whose diagonal elements are the elements in e. and s are optimization variables. In this way, the above optimization problem can be optimized by a standard semi-positive definite optimizer. The final consensus matrix can be obtained by get.

[0063] Preferably, in this embodiment, since the weights of many edges in the consensus matrix C obtained in step S2 are optimized to 0, a sparse network topology can be obtained after optimization in step S2. Among them, some links that need to establish communication in the original topology map do not need to establish communication in the sparse topology map. Figure 2 (a) After optimization, the resulting sparse topology graph is as follows Figure 2 (b) As shown. At the same time, the sparse topological graph As the topology map of the current network, the device communicates only with its neighbors in the sparse topology map.

[0064] In order to establish a highly reliable and low-latency edge IoT network, the present invention uses the time slot channel hopping (TSCH) technology in the IEEE 802.15.4e media access layer standard as the media access layer protocol of the device network. Figure 1As shown in the figure, TSCH divides the communication link into a two-dimensional space consisting of multiple time slots and multiple channels, and one unit corresponds to one time slot and one channel. A time slot frame consists of L time slots, of which the dedicated unit length used to transmit data is L0. The remaining time slots constitute shared units, which are used to broadcast specific information related to decentralized federated learning training. In order to avoid mutual interference between devices during the communication phase, this scheme constructs an auxiliary topology map based on the current sparse topology map Then, the greedy graph coloring algorithm is executed on the auxiliary topology graph, and the devices assigned the same color broadcast local data in the same time slot. Among them, the auxiliary graph is to add edges between devices with the same neighbors on the basis of the original sparse topology graph, and the total number of colors obtained by the greedy coloring algorithm is the length L0 of the dedicated unit in a frame. Figure 4 The length of the dedicated unit required for the sparse topology map and the original topology map is compared in . Since the duration of a unit is fixed (such as 10ms), the sparse topology map obtained by our method can save communication time.

[0065] Preferably, in this embodiment, IoT devices can collect data independently, and all IoT devices participating in the training use the locally collected data to train the local model independently, which avoids the problems of data leakage and excessive network load caused by sending data to the cloud or central server for centralized processing, and ensures the privacy of device data. The local training process of each IoT device is as follows:

[0066]

[0067] where w i,t represents the local model of device i at the tth iteration, μ is the learning rate, Represents the gradient of the loss function. After the local update is completed, Figure 1 As shown, each device will broadcast the trained model to its neighbors under the scheduling of the scheduler according to the scheduling strategy obtained in step S3.

[0068] Preferably, in this embodiment, refer to Figure 1 In step S5,

[0069] After a device receives a model from a neighbor, the process of local model aggregation is as follows:

[0070]

[0071] in is the local model of the ith device, is the local model of neighbor j that can establish a communication link with device i, is the neighbor set of device i, ci,j and c i,i is the element value in the consensus matrix C calculated in step S1. This process can be expressed in matrix form as

[0072]

[0073] in C is the consensus matrix obtained in step S2. This solution is to conduct collaborative learning by training the device locally and exchanging and aggregating models with neighboring devices.

[0074] The method of the present invention accelerates the mixing speed of the model and improves the efficiency of distributed federated learning by optimizing the consensus matrix during model aggregation. A highly reliable, low-latency Internet of Things network is established, and an efficient scheduling method is formulated. Compared with other existing model aggregation methods, this scheme can achieve higher verification accuracy with the same number of iterations. At the same time, this scheme can also sparse the original device network topology and greatly reduce the time required for communication.

[0075] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A distributed federated learning method for industrial Internet of Things based on Markov chain consensus, providing a system including a scheduler and several Internet of Things devices, It is characterized in that The following steps are involved: Step S1: The scheduler obtains the connection status of IoT devices in a preset area and obtains a network topology map; Step S2: The scheduler calculates the optimal consensus matrix based on the network topology using the fast hybrid Markov chain optimization problem and sends it to each IoT device; Step S3: The scheduler obtains a sparse topology map according to the optimal consensus matrix, and uses the sparse topology map as the topology map of the current network, so that the device only communicates with its neighbors in the sparse topology map, and uses the sparse topology map to construct an auxiliary map to formulate a scheduling strategy for communication resources; Step S4: Each IoT device trains a local neural network model according to the locally stored data, and broadcasts the trained local neural network model to all its neighboring devices in the sparse topology graph according to the scheduling strategy obtained in step S3 under the scheduling of the scheduler; Step S5: After each IoT device receives the model from its neighbors, it aggregates the model locally according to the consensus matrix obtained in step S2 to obtain a new local model; The step S2 is specifically as follows: The fast mixed Markov chain optimization problem is formulated as follows: minρ Among them, ρ represents the second largest eigenvalue of the consensus matrix C, let λ k (C) represents the numerically k-th largest eigenvalue of C, then ρ = max{λ 2 (C)|,|-λ m (C)}, 1 represents a column vector with all values ​​1, c i,j represents the element value of the i-th row and j-th column in the matrix C, that is, the weight of the edge connecting devices i and j, where the matrix C is the optimization variable; By solving the above optimization problem, we get a consensus matrix C with the smallest second largest eigenvalue. Further, we rewrite the above formula into a semi-positive definite optimization problem as shown below: mins Where L is a weighted Laplace matrix, A is the correlation matrix obtained from the topological graph G, I represents the identity matrix, and e = (e 1 ,…,e m ) is a vector of weights of all edges in the topology graph, diag(e) is a diagonal matrix whose diagonal elements are the elements in e; L and s are optimization variables; The above optimization problem is optimized by a standard semi-positive definite optimizer, and the final consensus matrix is ​​obtained by C = IL; The step S3 is specifically as follows: Step S31: According to the optimal consensus matrix, no communication link is established for the edges with a weight of 0 in the matrix, and a sparse network topology graph G' is further obtained; Step S32: Using the sparse network topology map G' as the current network topology map, so that the device only establishes communication with its neighbors in G'; Step S33: Use the time slot channel hopping TSCH media access layer protocol in IEEE 802.15.4e to establish a highly reliable and low-latency industrial Internet of Things network; Step S34: For the TSCH scheduling strategy, first construct an auxiliary topology map according to the obtained sparse network topology map G' And execute the greedy graph coloring algorithm on the obtained auxiliary topology graph; The step S5 is specifically as follows: after each device receives the models from all neighbors, the process of performing model aggregation locally is as follows: where w i,t represents the local model of device i at iteration t, is the local model of neighbor j that can establish a communication link with device i, N i is the neighbor set of device i, c i,j and c i,i is the element value in the consensus matrix C calculated in step S2; The process of performing model aggregation on all devices is expressed in matrix form as: in C is the consensus matrix obtained in step S2.

2. According to the Markov chain consensus-based distributed federated learning method for industrial Internet of Things according to claim 1, It is characterized in that The step S1 is specifically as follows: For IoT devices deployed in a preset area, they communicate with neighboring devices within their communication range through short-range D2D links, forming a decentralized network. Each IoT device sends the current connection status to the scheduler to obtain a complete network topology map within the set area. G = (V, E); Among them, V represents the devices in the network, and E represents the edges between devices, that is, the connections between devices.

3. According to the Markov chain consensus-based distributed federated learning method for industrial Internet of Things in claim 1, It is characterized in that The training of the local neural network model of the IoT device is specifically as follows: where w i,t represents the local model of device i at the tth iteration, μ is the learning rate, ▽L i,t (w i,t ) represents the gradient of the local loss function.

Citation Information

Patent Citations

  • Wireless sensor network topology optimization method based on asynchronous deep reinforcement learning

    CN111935724A

  • Complex network topological graph representation learning method, prediction method and server

    CN113065649A

  • Federal learning model compression method based on model rarefaction and weight quantization

    CN113222179A

  • High-energy-efficiency federated learning framework based on digital twinning

    CN113537514A