Federal learning method based on hybrid communication, electronic equipment and storage medium

By introducing radio frequency and visible light hybrid communication channels in horizontal federated learning, combined with power consumption optimization resource allocation, the communication bottleneck problem is solved, the model training efficiency and accuracy are improved, and it is suitable for practical application scenarios.

CN120455544APending Publication Date: 2025-08-08AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510594606.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

There are communication bottlenecks in horizontal federated learning, which leads to high communication costs and unreliable network conditions of the equipment affect performance, making it difficult to achieve efficient and high-precision model training.

Method used

A hybrid communication channel is used to combine radio frequency and visible light communication, and the resource allocation scheme is determined based on the power consumption of edge terminal devices, and the local model is received and sent through the hybrid communication channel, and the global model is aggregated.

Benefits of technology

It effectively overcomes the communication bottlenecks of traditional federated learning, improves model training efficiency and accuracy, and is suitable for power consumption limitations in practical application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455544A_ABST
    Figure CN120455544A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning method based on hybrid communication, electronic equipment and a storage medium. Relates to the technical field of machine learning. The method comprises the following steps: issuing an initial global model to edge terminal equipment through a hybrid communication channel; wherein the hybrid communication channel comprises a radio frequency communication channel and a visible light communication channel; determining a resource allocation scheme based on the power consumption of each edge terminal device, determining a target edge device from the edge terminal devices according to the resource allocation scheme, and receiving a local model uploaded by the target edge device through the hybrid communication channel; and aggregating the local models to obtain a target global model, and issuing the target global model to each edge terminal device through a hybrid communication channel. According to the technical scheme, the communication resources are provided through the hybrid communication channel, the resource allocation scheme is determined based on the power consumption, the communication bottleneck faced by traditional federated learning can be effectively overcome, and then the training efficiency and training precision of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, and in particular to a federated learning method, electronic device, and storage medium based on hybrid communication. Background Art

[0002] Currently, there are nearly 7 billion connected IoT devices and 3 billion smart mobile devices worldwide. These devices possess powerful computing, storage, and communication capabilities, collecting massive amounts of data that can be used in fields such as data analysis and machine learning. However, data privacy has become a growing concern for governments, organizations, and data owners, especially in financial systems such as banks. Furthermore, uploading this data to the cloud faces extremely high latency overhead. Therefore, the concept of horizontal federated learning has been proposed, which can collaboratively train machine learning models using data from edge devices with high privacy and low latency.

[0003] However, while horizontal federated learning eliminates the need to send raw data to cloud servers, communication costs remain a concern. This is because multiple rounds of communication are required between participants and the central server to achieve the desired target accuracy. This is compounded by the limited availability of radio frequency communication resources and the increasing dimensionality of models, such as deep neural network models with millions of parameters, which can lead to prohibitively high communication costs. Furthermore, unreliable network conditions among participating devices can significantly impact the performance of horizontal federated learning. Therefore, the communication bottleneck remains a challenge in the large-scale implementation of horizontal federated learning. Summary of the Invention

[0004] The present invention provides a federated learning method, electronic device and storage medium based on hybrid communication, so as to improve the training efficiency and training accuracy of the model in horizontal federated learning.

[0005] According to one aspect of the present invention, a hybrid communication-based federated learning method is provided, comprising:

[0006] The initial global model is sent to two or more edge terminal devices via a hybrid communication channel; wherein the hybrid communication channel includes a radio frequency communication channel and a visible light communication channel, and the edge terminal devices are used to train the initial global model based on local data to obtain local models;

[0007] Determine a resource allocation scheme based on the power consumption of each edge terminal device, determine at least two target edge devices from more than two edge terminal devices according to the resource allocation scheme, and receive local models uploaded by the target edge devices through a hybrid communication channel;

[0008] At least two local models are aggregated to obtain a target global model, and the target global model is sent to each edge terminal device through a hybrid communication channel.

[0009] According to another aspect of the present invention, an electronic device is provided, comprising:

[0010] at least one processor;

[0011] and a memory communicatively connected to the at least one processor; wherein,

[0012] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the federated learning method based on hybrid communication described in any embodiment of the present invention.

[0013] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hybrid communication-based federated learning method described in any embodiment of the present invention when executed.

[0014] The technical solution of the embodiment of the present invention sends the initial global model to the edge terminal device through a hybrid communication channel; wherein the hybrid communication channel includes a radio frequency communication channel and a visible light communication channel; determines a resource allocation scheme based on the power consumption of each edge terminal device, and determines the target edge device from the edge terminal device according to the resource allocation scheme, and receives the local model uploaded by the target edge device through the hybrid communication channel; aggregates the local models to obtain the target global model, and sends the target global model to each edge terminal device through the hybrid communication channel. This technical solution can effectively overcome the communication bottleneck faced by traditional federated learning by providing communication resources through a hybrid communication channel and determining the resource allocation scheme based on power consumption, thereby improving the training efficiency and training accuracy of the model.

[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flowchart of a federated learning method based on hybrid communication provided by an embodiment of the present invention;

[0018] Figure 2A flowchart of another federated learning method based on hybrid communication provided by an embodiment of the present invention;

[0019] Figure 3 A flowchart of another federated learning method based on hybrid communication provided in an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of the structure of a federated learning device based on hybrid communication provided by an embodiment of the present invention;

[0021] Figure 5 An architectural diagram of a visible light / radio frequency hybrid system provided by an embodiment of the present invention;

[0022] Figure 6 A schematic diagram of the structure of an electronic device for implementing the federated learning method based on hybrid communication according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] In order to further clarify the technical solution of the embodiment of the present invention, some terms are explained before introducing this embodiment.

[0026] Machine Learning: Machine learning is an artificial intelligence technology that uses data to train models to perform specific tasks, such as classification, prediction, or decision-making. Algorithms can automatically learn patterns and regularities from datasets without explicit programming instructions. Its core goal is to improve performance through training on large amounts of data, enabling the system to make accurate predictions or decisions when faced with new data.

[0027] Deep Neural Network (DNN): It is a machine learning model composed of multiple neural network layers, usually including an input layer, multiple hidden layers and an output layer. Each layer consists of multiple neurons, and the neurons are connected by weights.

[0028] Horizontal Federated Learning (HFL): HFL is an emerging distributed machine learning algorithm that enables the collaborative training of machine learning models across distributed devices while ensuring that training data remains on individual devices. It is primarily suitable for scenarios with significant feature overlap in datasets but minimal user overlap. In HFL, edge devices use their own local data to train a local HFL model. They then transmit the model information to a server or other edge device for aggregation or computation. These steps are repeated in multiple rounds until the trained model achieves the desired accuracy.

[0029] Aggregation method: The aggregation method in federated learning refers to the process of aggregating the local model updates of each device or node into a global model in a distributed learning environment.

[0030] A light-emitting diode (LED) is a solid-state semiconductor device that converts electrical energy directly into light. Applying a forward voltage to an LED causes it to emit light. LEDs offer high energy efficiency, long life, compact size, and fast response times, making them widely used in lighting, display screens, signal lights, and various electronic devices.

[0031] Visible Light Communications (VLC): It is a new wireless communication technology that uses visible light as a means of data transmission, rather than traditional radio frequency. Its basic principle is to use the light output of LEDs as a transmitter mechanism. By controlling the LEDs on and off, they produce high-speed flashes that are invisible to the human eye. The bright and dark states of the LEDs are equivalent to the binary 1 and 0 codes, so the corresponding data can be generated and transmitted by modulating the LEDs.

[0032] Radio Frequency (RF): It is a wireless communication technology that uses radio frequency signals to transmit information in space and sends and receives data through modulation and demodulation technology.

[0033] Communication base station: A communication base station is used to provide signal coverage and connection services to mobile devices. It is responsible for receiving, processing and forwarding signals sent by mobile devices and connecting them to the communication network.

[0034] Channel: A channel is a channel for information transmission that can transmit information between the signal sender and the receiver. It has specific transmission characteristics, including bandwidth, transmission rate, attenuation, noise and other properties.

[0035] Resource block: A resource block is the basic unit for allocating data transmission in a communication system, usually consisting of a certain number of consecutive subcarriers and a time slot of a certain duration.

[0036] Resource allocation: Resource allocation in the communication process refers to the rational allocation of limited communication resources (such as spectrum, bandwidth, and power) to different users or services to maximize system efficiency and performance.

[0037] Non-convex problem: In the field of optimization, non-convex problem is used to indicate that the solution space of a problem may have multiple local optimal solutions, making it very difficult to find the global optimal solution.

[0038] Figure 1 This is a flow chart of a hybrid communication-based federated learning method provided by an embodiment of the present invention. This embodiment is applicable to situations where federated learning is used to overcome communication bottlenecks and improve model training efficiency and model accuracy. The method can be executed by a hybrid communication-based federated learning device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method specifically includes the following steps:

[0039] S110: Send the initial global model to more than two edge terminal devices through the hybrid communication channel.

[0040] Among them, the hybrid communication channel includes the radio frequency communication channel and the visible light communication channel; the initial global model can refer to the machine learning model stored on the central server or cloud in HFL learning. The initial global model is a basic model that has not yet been optimized for specific tasks or data.

[0041] The edge terminal device is used to train the initial global model based on local data to obtain a local model. Sending the initial global model to the edge terminal device enables each edge terminal device to train the initial global model based on local data to obtain a local model.

[0042] It is understandable that in HFL, because multiple rounds of communication are required between the edge terminal devices participating in learning and the central server to achieve the expected target accuracy, and due to limited radio frequency communication resources and the increasing dimensions of the model, for example, the deep neural network model can reach millions of parameters, this will lead to excessively high communication costs. In addition, the unreliable network conditions of the participating devices will also significantly affect the performance of HFL. Therefore, the embodiment of the present invention can communicate between the edge terminal devices and the central server through a hybrid communication channel, expand communication resources, improve communication efficiency, and allow more edge terminal devices to participate in learning, ultimately improving the accuracy of the model obtained by HFL.

[0043] In some embodiments, a local model is obtained by training an initial global model based on local data, including: training an initial global model based on local data to obtain a candidate model, and determining the model accuracy corresponding to the candidate model; when the model accuracy of the candidate model meets the preset accuracy, the candidate model is determined as a local model.

[0044] Specifically, after receiving the initial global model, each edge device can train it using its own unique local dataset. During training, the edge device adjusts the parameters of the initial global model based on the local data to minimize the loss function, enabling the model to better fit the local data. After a certain number of rounds of training, a model that performs well on the current local dataset is obtained, which is called a candidate model.

[0045] Model accuracy refers to an indicator for evaluating model performance. For example, model accuracy may include but is not limited to indicators such as accuracy, recall rate, and F1 value.

[0046] Specifically, the edge terminal device can evaluate the accuracy of the candidate model and obtain a specific model accuracy value. Then, the calculated model accuracy is compared with the preset accuracy value to determine whether the candidate model meets the required accuracy. If the accuracy of the candidate model is higher than or equal to the preset accuracy, it means that the performance of the candidate model on the current local data set has met the expected requirements. At this time, the candidate model can be determined as a local model for subsequent aggregation. If the accuracy of the candidate model does not meet the preset accuracy, the edge terminal device can perform some operations, such as increasing the training rounds, adjusting the model hyperparameters, preprocessing the local data, etc., and then train and evaluate again until a local model that meets the preset accuracy is obtained.

[0047] In some embodiments, the initial global model is sent to more than two edge terminal devices through a hybrid communication channel, including: determining the terminal type of the edge terminal device; when the terminal type is an outdoor terminal, sending the initial global model to the edge terminal device based on the radio frequency communication channel; when the terminal type is an indoor terminal, sending the initial global model to the edge terminal device based on the visible light communication channel.

[0048] The terminal types include outdoor terminals and indoor terminals. Different types of terminal devices are located in different environments. Edge terminal devices can be divided into outdoor terminals and indoor terminals based on the environments in which they are located.

[0049] Outdoor environments typically have large spaces, and RF communication offers a long transmission distance and wide coverage, ensuring that the initial global model can be reliably transmitted to outdoor edge devices in various locations. Furthermore, there may be obstacles outdoors, such as buildings and trees, and RF signals have a certain degree of penetration, allowing them to penetrate these obstacles effectively, ensuring stable data transmission. Therefore, when an edge device is determined to be an outdoor terminal, the initial global model can be sent to it via an RF communication channel, such as Wi-Fi or 4G / 5G mobile communication networks.

[0050] In indoor environments, by properly arranging light sources and receivers, multiple indoor terminals can receive the initial global model sent by the central server. For example, indoor LED lights can be used as signal transmitters to encode the initial global model into light signals for transmission. After receiving the light signals, the light sensors on the indoor terminal devices decode them and restore them to the initial global model data.

[0051] In other embodiments, the initial global model is sent to the edge terminal device based on the visible light communication channel, including: sending the global model to the base station, sending the initial global model to the visible light communicator through the base station, the communication transceiver, the optical fiber and the indoor gateway, so that the visible light communicator sends the initial global model to at least one edge terminal device.

[0052] Specifically, the base station and the central server can communicate. The central server first sends the initial global model to the base station. After receiving the initial global model, the base station sends it to the communication transceiver. The communication transceiver can transmit the initial global model to the indoor gateway via optical fiber. After receiving the initial global model, the indoor gateway can forward it to the visible light communicator. The visible light communicator encodes the initial global model data into a visible light signal, for example, by modulating the brightness or flashing frequency of an LED light.

[0053] Edge devices are equipped with light sensors that receive visible light signals from visible light communicators and decode them to restore the initial global model. The edge devices can then perform subsequent operations such as model training based on local data.

[0054] S120. Determine a resource allocation scheme based on the power consumption of each edge terminal device, determine at least two target edge devices from more than two edge terminal devices according to the resource allocation scheme, and receive a local model uploaded by the target edge device through a hybrid communication channel.

[0055] It should be noted that in HFL scenarios, edge devices participating in model training consume a certain amount of energy, including computing and communication. Power consumption varies among edge devices due to factors such as hardware configuration, local data volume, and task complexity. Determining resource allocation based on the power consumption of each edge device optimizes resource usage, reduces overall system energy consumption, and improves resource utilization efficiency while still meeting the requirements of model training tasks.

[0056] The resource allocation scheme can be understood as a scheme for allocating limited communication resources to each edge terminal device. The target edge device can refer to an edge terminal device determined from the edge terminal devices to which a local model needs to be uploaded.

[0057] Specifically, a resource allocation scheme can be determined based on the power consumption of each edge terminal device. This resource allocation scheme can then be used to determine which edge terminal devices need to participate in training and upload local models. These devices can then be identified as target edge computing devices. After they train and obtain local models, the uploaded local models are received via the hybrid communication channel.

[0058] In some embodiments, receiving the local model sent by the target edge device through the hybrid communication channel includes: receiving the local model sent by the target edge device through a radio frequency communication channel in the hybrid communication channel.

[0059] Specifically, when the target edge device sends the local model to the central server, it can be sent through the radio frequency communication channel in the hybrid communication channel.

[0060] S130: Aggregate at least two local models to obtain a target global model, and send the target global model to each edge terminal device through a hybrid communication channel.

[0061] Specifically, aggregating multiple local models can integrate the knowledge learned by each target edge device from different local data, resulting in a more accurate, robust, and generalizable target global model. After the central server aggregates the local models to obtain the target global model, it can distribute it to all edge devices using a hybrid communication channel.

[0062] In some embodiments, at least two local models are aggregated to obtain a target global model, including: aggregating at least two local models through FedAvg to obtain a candidate global model, and determining whether the candidate global model meets the preset accuracy; if the candidate global model does not meet the preset accuracy, the candidate global model is used as the initial global model to repeatedly execute the process of sending to the edge terminal device, determining the target edge device, and aggregating the local models until the obtained candidate global model meets the preset accuracy, and the candidate global model is determined as the target global model.

[0063] Specifically, in the process of aggregating at least two local models through the federated averaging method FedAvg to obtain a candidate global model, the parameters of all local models may be averaged to serve as the parameters of the candidate global model.

[0064] Furthermore, the central server can use a portion of data that is not involved in model training to evaluate the accuracy of the candidate global model and determine whether the accuracy of the candidate global model meets the preset accuracy. If the accuracy of the candidate global model does not meet the preset accuracy, it means that the current model performance has not yet met the expected requirements. At this time, the candidate global model can be used as a new initial global model to re-execute the process of sending edge terminal devices, determining target edge devices, and aggregating local models. By continuously repeating the above process, the performance of the candidate global model can be gradually optimized. When the accuracy of the candidate global model obtained after multiple iterations meets the preset accuracy, it means that the model has met the expected performance requirements. At this time, the candidate global model can be determined as the target global model.

[0065] The technical solution of the embodiment of the present invention sends the initial global model to the edge terminal device through a hybrid communication channel; wherein the hybrid communication channel includes a radio frequency communication channel and a visible light communication channel; determines a resource allocation scheme based on the power consumption of each edge terminal device, and determines the target edge device from the edge terminal device according to the resource allocation scheme, and receives the local model uploaded by the target edge device through the hybrid communication channel; aggregates the local models to obtain the target global model, and sends the target global model to each edge terminal device through the hybrid communication channel. This technical solution can effectively overcome the communication bottleneck faced by traditional federated learning by providing communication resources through a hybrid communication channel and determining the resource allocation scheme based on power consumption, thereby improving the training efficiency and training accuracy of the model.

[0066] Figure 2 This is a flowchart of another federated learning method based on hybrid communication provided by an embodiment of the present invention. This embodiment can also consider the power consumption limitations of edge terminal devices in actual application scenarios, determine a resource allocation scheme, and perform resource allocation based on the resource allocation scheme, thereby improving the communication efficiency in HFL. Figure 2 As shown, the method specifically includes the following steps:

[0067] S210: Send the initial global model to more than two edge terminal devices through a hybrid communication channel.

[0068] S220: Construct a target energy consumption function based on the target variable.

[0069] The target variable includes at least one of a time vector, a bandwidth vector, a computing power vector, a power vector, and a compression ratio corresponding to each edge terminal device.

[0070] In resource allocation, the optimization goal is to minimize the global loss function under the constraints of time, bandwidth, computing power, power, and compression ratio. Therefore, the optimization problem can be expressed as follows:

[0071]

[0072] Where L(W) represents the loss function of the global model, t represents the time vector of all users, b represents the bandwidth vector of all users, f represents the computing power vector of all users, p represents the power vector of all users, and δ represents the compression ratio, which means compressing data before transmitting it to reduce the bandwidth and transmission time required for transmission, and can reduce the energy consumption during transmission, thereby improving energy efficiency.

[0073] Then, by introducing energy consumption constraints and redefining the optimization objective, the problem of minimizing the horizontal federated learning loss function can be transformed into a problem with the goal of minimizing the total energy consumption of all users, which can be specifically expressed as:

[0074]

[0075] 0≤δ≤1,

[0076]

[0077] The above function is the target energy consumption function, where α is a constant and β k represents a constant related to user k. User k includes indoor users and outdoor users. Indoor users are represented by set K1, and outdoor users are represented by set K2. c k represents the local computing power of user k, t krepresents the time required for user k to transmit wirelessly, and T represents the maximum completion time allowed by the entire HFL algorithm. Note that since indoor users and outdoor users use different wireless transmission methods, both indoor and outdoor users need to meet the time limit of T at the same time. k represents the bandwidth allocated to user k. Here, we can simplify the uplink bandwidth and downlink bandwidth of each user to be equal. g k represents the channel gain between user k and the base station, p k represents the average transmission power of user k, that is, the power used to transmit data, N0 represents the power spectrum density of Gaussian noise, s represents the amount of data to be transmitted, represents the maximum computing power of user k, represents the maximum transmission power of user k.

[0078] S230 , taking minimizing the target energy consumption function as the optimization goal, determining the target value corresponding to the target variable, and determining a resource allocation plan based on the target value.

[0079] The target value includes at least one of a target time value, a target compression ratio value, a target bandwidth value, a target computing capability value, and a target power value.

[0080] It's understandable that in the HFL scenario, the above steps define a target energy consumption function, which comprehensively considers the impact of multiple factors, such as time, bandwidth, computing power, power, and compression ratio, on energy consumption. To minimize energy consumption, it's necessary to determine the optimal values (i.e., target values) for these target variables, such as time, bandwidth, computing power, power, and compression ratio. Then, a resource allocation plan is determined based on these target values.

[0081] In some embodiments, the target value corresponding to the target variable is determined with minimizing the target energy consumption function as the optimization goal, including: initializing the initial value corresponding to the target variable; substituting the initial bandwidth value, initial computing power value, and initial power value into the target energy consumption function, and determining the target time value corresponding to the time vector and the target compression ratio value corresponding to the compression ratio with minimizing the target energy consumption function as the optimization goal; and substituting the initial time value and the initial compression ratio value into the target energy consumption function, and determining the target bandwidth value, target computing power value, and target power value corresponding to the bandwidth vector, computing power vector, and power vector with minimizing the target energy consumption function as the optimization goal.

[0082] The initial value includes at least one of an initial time value, an initial bandwidth value, an initial computing capability value, an initial power value, and an initial compression ratio value. The initial value may be pre-set based on experience.

[0083] Specifically, the initial bandwidth, computing power, and power values are substituted into the target energy consumption function. At this point, the values of all variables in the target energy consumption function, except for the time and compression ratio values, have already been determined. With minimizing the target energy consumption function as the optimization goal, the time and compression ratio values are adjusted to find the values corresponding to the time vector and compression ratio that minimize the target energy consumption function. In this process, bandwidth, computing power, and power are treated as fixed parameters, focusing only on the impact of time and compression ratio on the target energy consumption function. By continuously adjusting the values of these two variables, we find the combination that minimizes energy consumption, namely, the target time and compression ratio values.

[0084] Furthermore, the initial time and initial compression ratio values are substituted into the target energy consumption function. At this point, the values of all variables in the target energy consumption function, except for bandwidth, computing power, and power, have already been determined. Similarly, with minimizing the target energy consumption function as the optimization goal, the bandwidth, computing power, and power values are adjusted to find the target bandwidth, computing power, and power values that correspond to the bandwidth vector, computing power vector, and power vector when the target energy consumption function is minimized. In this process, time and compression ratio are treated as fixed parameters, focusing on optimizing the three variables of bandwidth, computing power, and power to further reduce system energy consumption.

[0085] It should also be noted that the above two steps can be repeated multiple times, forming an iterative process. Each iteration updates the value of the target variable based on the results of the previous optimization, continuously approaching the optimal solution that minimizes the target energy consumption function. When the target energy consumption function converges, the iteration process ends, and the target value of the target variable is obtained.

[0086] For example, minimizing the total energy consumption of all users is a non-convex problem. To solve this non-convex problem, we first initialize parameters such as time, bandwidth, power, computing power, and compression ratio. Then, based on the given bandwidth allocation, computing power, and power control, we find the optimal solution for time allocation and compression ratio to minimize the total energy consumption of the system. That is, by fixing (b, f, p) and optimizing (t, δ), the minimization problem can be further simplified to:

[0087]

[0088]

[0089] 0≤δ≤1,

[0090] in, This problem is a convex problem and can be solved linearly based on the optimal (t,δ) obtained in this round of calculation.

[0091] Secondly, based on the given time allocation and compression ratio, bandwidth, power, and computing power are solved, and the two optimizers are iteratively executed until a converged solution is obtained. That is, fixing (t, δ) and optimizing (b, f, p), the optimization problem can be expressed as:

[0092]

[0093] This problem can be further decomposed into two subproblems: minimizing computational energy consumption by fixing (b, p) and minimizing transmission energy consumption by fixing (f). These two subproblems can be solved using global optimization methods. After multiple rounds of iterations, the total energy consumption of the system converges. At this point, iterations are stopped and the final resource allocation solution is obtained.

[0094] It is understood that the target values corresponding to the target variables include target time, target compression ratio, target bandwidth, target computing capacity, target power, etc. The time, bandwidth, etc. allocated to each edge terminal device can be determined based on the target values.

[0095] S240. Determine at least two target edge devices from more than two edge terminal devices according to the resource allocation plan, and receive the local model uploaded by the target edge device through the hybrid communication channel.

[0096] S250: Aggregate at least two local models to obtain a target global model, and send the target global model to each edge terminal device through a hybrid communication channel.

[0097] The technical solution of the embodiment of the present invention takes into account the power consumption limitations of the terminal devices used by users in the designed resource allocation method, which is more suitable for actual application scenarios. By converting non-convex problems into convex problems and solving them through global optimization methods, the algorithm complexity is reduced and the convergence speed of the resource allocation method is improved, thereby improving the HFL training efficiency and the final model accuracy.

[0098] Figure 3 Flowchart of another federated learning method based on hybrid communication provided by an embodiment of the present invention. Figure 3 As shown, the method includes the following steps:

[0099] 1. Get Started

[0100] 2. The edge device inputs local data and then trains the local model on the edge device.

[0101] 3. Determine whether the model has reached the set accuracy:

[0102] If no, return to the step "Edge device inputs local data".

[0103] If yes, proceed to the next step.

[0104] 4. Determine whether to upload the local model based on the resource allocation results.

[0105] If not, wait for the global model to be released.

[0106] If yes, the local model is uploaded via the VLC / RF hybrid system, where the VLC / RF hybrid system is the hybrid communication channel of the aforementioned embodiment.

[0107] 5. The system sends the global model to the edge device.

[0108] 6. The cloud inputs the received multiple local models, wherein the cloud is the central server in the aforementioned embodiment.

[0109] 7. Execute the FedAvg aggregation method to aggregate and obtain the global model.

[0110] 8. Determine whether the model has achieved the set final accuracy:

[0111] If not, return to the "System sends global model" step.

[0112] If yes, proceed to the next step.

[0113] 9. Issue the final model: Issue the final model to all participating users.

[0114] 10. End.

[0115] Figure 4 The following is a structural diagram of a federated learning device based on hybrid communication provided by an embodiment of the present invention. Figure 4 As shown, the device includes:

[0116] Local model training unit, hybrid link unit (VLC / RF hybrid system), resource allocation unit and cloud model training unit.

[0117] Among them, the local model training unit is used to train the edge device to obtain the local model, and interact with the hybrid link unit to transmit the local model.

[0118] The hybrid link unit is used to build a visible light / radio frequency hybrid system, complete the transmission of the training model, and is responsible for interacting with the resource allocation unit.

[0119] The resource allocation unit takes into account the power consumption limitations of mobile devices in actual application scenarios, allocates resources with the goal of minimizing the loss function, and then selects users who can participate in model aggregation in a round of iteration, that is, decides which users need to upload local models in a round of training.

[0120] The cloud-based model training unit is used to aggregate the uploaded local models through an aggregation method to obtain a global model, and interact with the hybrid link unit to transmit the global model.

[0121] The hybrid communication-based federated learning device is further described in detail:

[0122] 1. Local model training unit

[0123] The local model training unit is primarily used to train local models on edge devices. It consists of a local data input, a model trainer, and a local model output. The local data input receives the global model from the cloud-based model training unit and, based on this model, uses locally collected data as input. The model trainer iterates through training to obtain the local model for this round. The local model output outputs the trained local model. Finally, the resource allocation unit determines whether to upload the local model to the cloud-based model training unit via the hybrid link unit.

[0124] 2. Hybrid Link Unit

[0125] One of the cores of this device is the hybrid link unit, which consists of a visible light communicator, an optical fiber communicator, a communication transceiver and an RF communicator. In the hybrid link unit, a visible light / RF hybrid system is designed by collaboratively using the visible light link and the RF link. The system supports the access of indoor mobile terminals and outdoor mobile terminals, wherein the base station sends the global HFL model parameters to the outdoor user through the RF channel. At the same time, the base station transmits the global HFL model to the indoor gateway connected to the indoor VLC access point. Then, the access point sends the global HFL model parameters to the indoor user through the VLC channel. Assuming that the base station and the home gateway are connected through an optical fiber, the bit error of the transmission can be ignored. Compared with the traditional RF wireless communication system, the visible light / RF hybrid system adds a VLC link and expands the communication resources. Based on this feature, it first alleviates the problem of scarce RF resources limiting learning efficiency. Secondly, it can accommodate more users to participate in the training process of horizontal federated learning, thereby improving the final accuracy of the model. Among them, the architecture of the visible light / RF hybrid system is as follows: Figure 5 shown.

[0126] 3. Resource Allocation Unit

[0127] Another core of this device is the resource allocation unit. In this unit, the power consumption limitations of user mobile devices in actual application scenarios are taken into consideration. It consists of a transmission time and compression ratio optimizer and a bandwidth, computing power and transmission power optimizer. These two optimizers can iteratively solve two convex problems and obtain the final resource allocation result. In the resource allocation unit, the goal is to minimize the global loss function under the constraints of time, bandwidth, power, and compression ratio. According to the given bandwidth allocation, computing power, and power control, the optimal solution of time allocation and compression ratio is solved to minimize the total energy consumption of the system. This part is solved in the transmission time and compression ratio optimizer. According to the given time allocation and compression ratio, the bandwidth, power, computing power, etc. are solved. This part is solved in the bandwidth, computing power and transmission power optimizer.

[0128] 4. Cloud model training unit

[0129] The cloud-based model training unit is mainly used to train and obtain a global model, and includes a selected local model input, a local model aggregator, and a global model output. The selected local model input is mainly used to collect local models trained by the local model training unit. These local models are screened by the resource allocation unit and transmitted through the hybrid link unit. In the local model aggregator, the global model of this round of training is obtained by using the FedAvg aggregation method. The global model output is mainly used to compare the model accuracy with the expected setting and select whether the training is completed. If the accuracy of the generated model is lower than the expected accuracy, the global model is sent to the mobile terminal and the next round of training is carried out. If the accuracy of the generated model is higher than the expected accuracy, the training is completed.

[0130] Compared with the existing technical solutions, the present invention constructs a visible light / radio frequency hybrid system, introduces a visible light link on the basis of the traditional radio frequency link, and expands the scarce communication resources; based on the constructed visible light / radio frequency hybrid system, resources are allocated to optimize the wireless network, which improves communication efficiency and effectively solves the communication bottleneck problem faced by traditional RF-based horizontal federated learning technology; the designed resource allocation method takes into account the power consumption limitations of the mobile devices used by users and is more suitable for actual application scenarios. By converting non-convex problems into convex problems and solving them through global optimization methods, the algorithm complexity is reduced and the convergence speed of the resource allocation method is improved, thereby improving the training efficiency and the final model accuracy.

[0131] The device provided by the embodiment of the present invention can execute the federated learning method based on hybrid communication provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0132] Figure 6A schematic diagram of the structure of an electronic device for implementing the hybrid communication-based federated learning method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0133] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0134] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0135] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors for running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the hybrid communication-based federated learning method.

[0136] In some embodiments, the hybrid communication-based federated learning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the hybrid communication-based federated learning method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the hybrid communication-based federated learning method in any other appropriate manner (e.g., by means of firmware).

[0137] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0138] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0139] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0141] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0142] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0143] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0144] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A federated learning method based on hybrid communication, characterized in that: include: Sending the initial global model to two or more edge terminal devices via a hybrid communication channel; wherein the hybrid communication channel includes a radio frequency communication channel and a visible light communication channel, and the edge terminal devices are used to train the initial global model based on local data to obtain local models; Determining a resource allocation scheme based on the power consumption of each of the edge terminal devices, determining at least two target edge devices from the two or more edge terminal devices according to the resource allocation scheme, and receiving the local model uploaded by the target edge device through the hybrid communication channel; Aggregate at least two of the local models to obtain a target global model, and send the target global model to each of the edge terminal devices through the hybrid communication channel.

2. The method according to claim 1, characterized in that The step of training the initial global model based on local data to obtain a local model includes: Training the initial global model based on the local data to obtain a candidate model, and determining a model accuracy corresponding to the candidate model; When the model accuracy of the candidate model meets the preset accuracy, the candidate model is determined as the local model.

3. The method according to claim 1, characterized in that The sending of the initial global model to two or more edge terminal devices through the hybrid communication channel includes: Determining a terminal type of the edge terminal device, wherein the terminal type includes an outdoor terminal and an indoor terminal; In a case where the terminal type is an outdoor terminal, sending the initial global model to the edge terminal device based on the radio frequency communication channel; In a case where the terminal type is an indoor terminal, the initial global model is sent to the edge terminal device based on the visible light communication channel.

4. The method according to claim 3, characterized in that The sending the initial global model to the edge terminal device based on the visible light communication channel includes: The global model is sent to a base station, and the initial global model is sent to a visible light communicator through the base station, communication transceiver, optical fiber and indoor gateway, so that the visible light communicator sends the initial global model to at least one edge terminal device.

5. The method according to claim 1, wherein The determining of the resource allocation scheme based on the power consumption of each of the edge terminal devices includes: Constructing a target energy consumption function based on a target variable, wherein the target variable includes at least one of a time vector, a bandwidth vector, a computing power vector, a power vector, and a compression ratio corresponding to each of the edge terminal devices; Taking minimizing the target energy consumption function as the optimization goal, determining the target value corresponding to the target variable, and determining the resource allocation scheme based on the target value, wherein the target value includes at least one of the target time value, the target compression ratio value, the target bandwidth value, the target computing capacity value and the target power value.

6. The method according to claim 5, characterized in that The step of determining a target value corresponding to the target variable with minimizing the target energy consumption function as the optimization goal includes: Initializing an initial value corresponding to the target variable, wherein the initial value includes at least one of an initial time value, an initial bandwidth value, an initial computing power value, an initial power value, and an initial compression ratio value; Substituting the initial bandwidth value, the initial computing capability value, and the initial power value into the target energy consumption function, determining a target time value corresponding to the time vector and a target compression ratio value corresponding to the compression ratio with minimizing the target energy consumption function as an optimization goal; and Substituting the initial time value and the initial compression ratio value into the target energy consumption function, with minimizing the target energy consumption function as the optimization goal, the target bandwidth value, the target computing power value, and the target power value corresponding to the bandwidth vector, the computing power vector, and the power vector are determined.

7. The method according to claim 1, characterized in that Receiving the local model sent by the target edge device through the hybrid communication channel includes: The local model sent by the target edge device is received through the radio frequency communication channel in the hybrid communication channel.

8. The method according to claim 1, characterized in that The step of aggregating at least two of the local models to obtain a target global model includes: Aggregating at least two of the local models by a federated averaging method (FedAvg) to obtain a candidate global model, and determining whether the candidate global model meets a preset accuracy; In the case that the candidate global model does not meet the preset accuracy, the candidate global model is used as the initial global model to repeatedly execute the process of sending the edge terminal device, determining the target edge device and aggregating the local model until the obtained candidate global model meets the preset accuracy, and the candidate global model is determined as the target global model.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the federated learning method based on hybrid communication according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the federated learning method based on hybrid communication according to any one of claims 1 to 8 when executed.