Federal learning terminal selection and resource scheduling method based on dynamic priority

Through dynamic priority selection and dichotomous resource scheduling, the problem of energy, time and communication resources in federated learning is solved, training efficiency and resource utilization are improved, and efficient federated learning under constrained conditions is achieved.

CN119299398AInactive Publication Date: 2025-01-10JINAN UNIVERSITY

Patent Information

Application Number
CN202411814594.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In federated learning, under the conditions of limited energy, time and communication resources, the prior art is difficult to optimize training performance simultaneously, often requiring sacrifice of model accuracy or introducing high computational energy costs, and lack of effective solutions for long-term energy and iterative time constraints. plan.

Method used

Using a federated learning terminal selection and resource scheduling method based on dynamic priority, by obtaining resource information of user equipment, calculating the priority value of each user, selecting a subset of users that meets the training delay requirements, and allocating bandwidth resources using dichotomy. Ensure energy consumption is within the threshold and dynamically adjust user selections to meet energy and bandwidth constraints.

Benefits of technology

It effectively improves the training efficiency and resource utilization of federated learning, ensures the balance of model accuracy and energy efficiency, and is suitable for long-term training scenarios with multiple users and multiple rounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299398A_ABST
    Figure CN119299398A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning terminal selection and resource scheduling method based on a dynamic priority, and relates to the technical field of user selection and bandwidth allocation of federated learning, and the method comprises the steps: obtaining a model basic structure and resource information parameters exchanged between a federated learning central controller and a user; calculating a priority value of each user according to the resource information parameters, and sorting the users according to the priority values from large to small; selecting a user subset meeting a training delay requirement based on a user priority sequence; for the user subset, calculating the minimum bandwidth allocation proportion required for completing the training task, and calculating and considering the data volume, the calculation capability and the network condition of the user; bandwidth resources are allocated to the user subsets by adopting a dichotomy, and bandwidth allocation is adjusted through iteration by adopting the dichotomy; and judging whether the total energy loss of the user subset exceeds a given energy constraint threshold, and if so, deleting the user with the lowest priority from the user subset. The federal learning performance is improved to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of user selection and bandwidth allocation for federated learning under limited energy, time and communication resources, and in particular to a method for federated learning terminal selection and resource scheduling based on dynamic priority. Background Art

[0002] Federated learning (FL) has attracted extensive attention from industry and academia due to its uniqueness in protecting data privacy. However, when FL is combined with actual mobile edge computing (MEC) systems, the training performance of FL is limited by several practical challenges. The first challenge is the communication resources of the MEC system. Although the original data is not uploaded during FL training, a large number of machine learning (ML) models containing millions of parameters are frequently transmitted. In many cases, the communication resources of the MEC system are insufficient to bear the communication costs of a large number of users in FL training; the second challenge is that for each user, the total energy of all learning rounds is limited, so solving the FL optimization problem should consider all rounds, that is, the problem is a long-term problem. In order to solve the problem of insufficient communication resources, most of the existing research focuses on studying model compression algorithms to reduce FL communication costs and solutions to reduce communication costs at the expense of user computational costs. However, these solutions inevitably sacrifice the accuracy of the model, or introduce additional compression costs for individual users, and may even lead to long training delays and high computational energy costs for individual users. Currently, there is almost no research on solutions to the impact of limited communication resources, long-term energy constraints, and per-round iteration time constraints on federated learning wireless networks. Therefore, there is an urgent need to study the training performance of FL under multiple practical challenges and maximize the performance of federated learning under limited energy, time, and communication resources. Summary of the invention

[0003] To solve the above technical problems, the present invention proposes a federated learning terminal selection and resource scheduling method based on dynamic priority, which can maximize the performance of federated learning under limited energy, time and communication resource conditions.

[0004] To achieve the above object, the present invention provides a method for selecting a federated learning terminal and scheduling resources based on dynamic priority, comprising:

[0005] Obtaining the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user;

[0006] Calculate the priority value of each user according to the resource information parameter, and sort the users from large to small according to the priority value;

[0007] Based on the user priority order, a subset of users that meet the training delay requirements is selected;

[0008] For the user subset, calculating the minimum bandwidth allocation ratio required to complete the training task, wherein the calculation takes into account the user's data volume, computing power, and network conditions;

[0009] Allocating bandwidth resources to the user subset using a binary search method, wherein the binary search method adjusts bandwidth allocation by iteration;

[0010] It is determined whether the total energy consumption of the user subset exceeds a given energy constraint threshold. If it exceeds the threshold, the user with the lowest priority is deleted from the user subset.

[0011] According to the present invention, the method for selecting and scheduling federated learning terminals based on dynamic priority is provided, and the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user are obtained, including:

[0012] Acquire resource information of at least one user equipment, the resource information including a CPU frequency range and an effective switch capacitor parameter, and obtain basic resource information of the user equipment;

[0013] According to the basic resource information of the user equipment, by analyzing the resource information set of the user equipment, the priority of each of the user equipment is calculated to obtain a priority list of the user equipment;

[0014] According to the priority list of the user equipment, select user equipment whose priority is higher than a preset threshold to obtain a preliminarily selected user equipment set;

[0015] For the preliminarily selected set of user equipment, calculating the bandwidth requirement of each of the user equipment, and obtaining a bandwidth requirement list of the user equipment;

[0016] According to the bandwidth requirement list of the user equipment, bandwidth resources are allocated by adopting a binary method to obtain a bandwidth allocation ratio for each of the user equipment;

[0017] Calculating the energy consumption of each of the user equipments according to the bandwidth allocation ratio to obtain an energy consumption list of the user equipments;

[0018] Determine whether the energy consumption of the user equipment exceeds a preset energy constraint threshold, and if so, adjust the selection of the user equipment, and recalculate the bandwidth allocation ratio and the energy consumption until the energy constraint threshold is met;

[0019] When the energy constraint threshold is met, the FLCC exchanges the basic structure and resource information parameters of the model with the finally selected user equipment set to obtain the initial model and parameter settings of the federated learning.

[0020] According to the present invention, a method for selecting a federated learning terminal and scheduling resources based on dynamic priority is provided, wherein the priority value of each user is calculated according to the resource information parameter, and the users are sorted from large to small according to the priority value, including:

[0021] Obtain resource information of the user equipment and calculate the priority value of the user;

[0022] According to the priority list, selecting the user and determining whether the training calculation delay meets the requirement;

[0023] The binary resource scheduling algorithm is called to calculate the bandwidth allocation and energy loss, and determine whether the total energy consumption exceeds the energy constraint.

[0024] According to the present invention, a method for selecting and scheduling federated learning terminals based on dynamic priorities is provided, wherein a user subset that meets the training delay requirement is selected based on the user priority order, including:

[0025] Acquire resource information of at least one user equipment, where the resource information includes a CPU frequency range and an effective switch capacitance;

[0026] According to the resource information, the priority of each user is calculated by a preset priority calculation function to obtain a priority list;

[0027] For the priority list, a binary resource scheduling algorithm is used to calculate the bandwidth allocation and energy consumption of the currently selected user subset;

[0028] If the energy consumption does not exceed the preset energy constraint, the currently selected user subset is determined as the participating users of this round of training.

[0029] According to the present invention, the method for selecting and scheduling federated learning terminals based on dynamic priority is provided. For the user subset, the minimum bandwidth allocation ratio required to complete the training task is calculated. The calculation takes into account the user's data volume, computing power and network conditions, and includes:

[0030] For the user subset, obtaining local data set size, CPU frequency range and channel gain resource information of each user;

[0031] Determine, based on the resource information, a minimum bandwidth allocation ratio required for each user to complete local model training under the delay limit of the current training round;

[0032] Determine whether the sum of the minimum bandwidth allocation ratios exceeds the total bandwidth, and if so, enter a fallback phase, removing the user with the lowest priority from the user subset until the bandwidth constraint is met;

[0033] Using a binary resource scheduling algorithm, the bandwidth allocation of each user is further optimized to minimize the total energy loss under the premise of satisfying the bandwidth constraints;

[0034] In the binary resource scheduling algorithm, the upper and lower bounds between the two partitions are initialized, and the derivative of the energy loss function of each user under the current allocation ratio is calculated;

[0035] By continuously updating the upper and lower bounds of the binary partitions, the optimal energy loss function derivative value is approached, and when the binary partition interval is sufficient, the iteration is stopped;

[0036] Determine the bandwidth allocation ratio and the corresponding energy loss value of each user according to the optimal derivative value obtained by the dichotomy method;

[0037] Determine whether the total energy consumption of all users exceeds a given energy constraint, and if so, return to the bandwidth constraint determination step to further adjust the user subset;

[0038] A user subset and a bandwidth allocation scheme satisfying the bandwidth constraint and the energy constraint are obtained, and the result is returned for subsequent iterative update of the federated learning model.

[0039] According to the present invention, a method for selecting and scheduling federated learning terminals based on dynamic priorities is provided, wherein a binary method is used to allocate bandwidth resources to the user subset, and the binary method is used to iteratively adjust bandwidth allocation, including:

[0040] Initialize and sort the user priority list based on the resource information obtained from the user device;

[0041] According to the user priority list, a user subset that meets the delay requirement is screened out, and a minimum bandwidth allocation ratio of the user subset that meets the delay requirement under the current delay constraint is calculated as an initial value for subsequent bandwidth allocation.

[0042] According to the present invention, the method for selecting and scheduling federated learning terminals based on dynamic priority is provided, which determines whether the total energy consumption of the user subset exceeds a given energy constraint threshold, and if it exceeds the threshold, deletes the user with the lowest priority from the user subset, including:

[0043] Step S1, obtaining a priority list of a user subset and energy consumption information of each user;

[0044] Step S2: traverse each user in the user subset from high to low according to the priority list;

[0045] Step S3: for each user, obtain its energy loss value and add it to the total energy loss of the selected user subset;

[0046] Step S4, determining whether the total energy consumption of the selected user subset exceeds a given energy constraint threshold;

[0047] Step S5: If the total energy consumption does not exceed the threshold, the currently traversed user is retained in the selected user subset;

[0048] Step S6: If the total energy consumption exceeds the threshold, the user with the lowest priority is deleted from the selected user subset;

[0049] Step S7, recalculating the updated total energy loss of the selected user subset;

[0050] Step S8, repeating steps S4 to S7 until the total energy loss does not exceed a given energy constraint threshold;

[0051] Step S9: Output the subset of end users that meet the energy constraint as the participating user set of this round of federated learning.

[0052] According to the method for selecting and scheduling federated learning terminals based on dynamic priority provided by the present invention, the minimum bandwidth allocation ratio required for each user to complete local model training under the delay limit of the current training round is calculated as follows:

[0053]

[0054] Where B represents the total bandwidth allocated to all users; Indicates the transmission power of the user; represents the channel gain and background noise of the user; Represents the user's background noise; Indicates the bandwidth ratio allocated to the user; Indicates the data size of the model parameters downloaded from FLCC or uploaded to FLCC after updating; Computational delay for local model updates; The delay limit for this round.

[0055] Technical effect of the present invention: The present invention discloses a method for selecting and scheduling federated learning terminals based on dynamic priority. By obtaining the basic structure of the model and resource information parameters exchanged between the federated learning central controller and the user, the priority value of each user is calculated and sorted from large to small according to the priority value. Based on the user priority order, a user subset that meets the training delay requirements is selected, and the minimum bandwidth allocation ratio required to complete the training task is calculated, taking into account the user's data volume, computing power and network conditions. The binary method is used to allocate bandwidth resources to the user subset, and the bandwidth allocation is iteratively adjusted to ensure efficient use of resources. It is further determined whether the total energy loss of the user subset exceeds a given energy constraint threshold. If so, the user with the lowest priority is deleted from the user subset. The present invention effectively solves the optimization problem of user selection and resource allocation in federated learning, and improves training efficiency and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0057] Figure 1 A schematic diagram of a process of a method for selecting a federated learning terminal and scheduling resources based on dynamic priority according to an embodiment of the present invention;

[0058] Figure 2 Accuracy curves of the present invention and the user selection strategy based on greedy Shapley value detection optimization (SV, Shapley-Value), the user selection strategy based on clustering dynamic programming (KDP, K-means and DynamicProgramming), and the classic federated learning scheme (Classic) on the independent and identically distributed (IID) setting of the CIFAR-10 dataset;

[0059] Figure 3 Accuracy curves of the present invention and the user selection strategy based on greedy Shapley value detection optimization (SV, Shapley-Value), the user selection strategy based on clustering dynamic programming (KDP, K-means and DynamicProgramming), and the classical federated learning scheme (Classic) on the non-independent and identically distributed (NON-IID) setting of the CIFAR-10 dataset;

[0060] Figure 4The accuracy curves of the present invention and the bandwidth allocation strategy based on average bandwidth allocation to users (EC, Equal-Client) and the bandwidth allocation strategy based on proportional bandwidth allocation to user datasets (PP, Proportional) are performed on the non-independent and identically distributed (NON-IID) setting of the CIFAR-10 dataset. DETAILED DESCRIPTION

[0061] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0062] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] like Figure 1 As shown, this embodiment provides a method for selecting a federated learning terminal and scheduling resources based on dynamic priority, including:

[0064] Obtaining the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user;

[0065] Calculate the priority value of each user according to the resource information parameter, and sort the users from large to small according to the priority value;

[0066] Based on the user priority order, selecting a subset of users that meet the training delay requirement;

[0067] For the user subset, calculating the minimum bandwidth allocation ratio required to complete the training task, wherein the calculation takes into account the user's data volume, computing power, and network conditions;

[0068] Allocating bandwidth resources to the user subset using a binary search method, wherein the binary search method adjusts bandwidth allocation by iteration;

[0069] It is determined whether the total energy consumption of the user subset exceeds a given energy constraint threshold. If it exceeds the threshold, the user with the lowest priority is deleted from the user subset.

[0070] Specifically, the present invention obtains the basic structure and resource information parameters of the model exchanged between the central controller of federated learning and the user, calculates the priority value of each user, and sorts them from large to small according to the priority value. Based on the user priority order, a user subset that meets the training delay requirements is selected, and the minimum bandwidth allocation ratio required to complete the training task is calculated, taking into account the user's data volume, computing power and network conditions. The binary method is used to allocate bandwidth resources to the user subset, and the bandwidth allocation is iteratively adjusted to ensure efficient use of resources. It is further determined whether the total energy loss of the user subset exceeds a given energy constraint threshold. If it exceeds, the user with the lowest priority is deleted from the user subset. The present invention effectively solves the optimization problem of user selection and resource allocation in federated learning, and improves training efficiency and resource utilization.

[0071] Furthermore, the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user are obtained, including:

[0072] Acquire resource information of at least one user equipment, the resource information including a CPU frequency range and an effective switch capacitor parameter, and obtain basic resource information of the user equipment;

[0073] According to the basic resource information of the user equipment, by analyzing the resource information set of the user equipment, the priority of each of the user equipment is calculated to obtain a priority list of the user equipment;

[0074] According to the priority list of the user equipment, select user equipment whose priority is higher than a preset threshold to obtain a preliminarily selected user equipment set;

[0075] For the preliminarily selected set of user equipment, calculating the bandwidth requirement of each of the user equipment, and obtaining a bandwidth requirement list of the user equipment;

[0076] According to the bandwidth requirement list of the user equipment, bandwidth resources are allocated by adopting a binary method to obtain a bandwidth allocation ratio for each of the user equipment;

[0077] Calculating the energy consumption of each of the user equipments according to the bandwidth allocation ratio to obtain an energy consumption list of the user equipments;

[0078] Determine whether the energy consumption of the user equipment exceeds a preset energy constraint threshold, and if so, adjust the selection of the user equipment, and recalculate the bandwidth allocation ratio and the energy consumption until the energy constraint threshold is met;

[0079] When the energy constraint threshold is met, the FLCC exchanges the basic structure and resource information parameters of the model with the finally selected user equipment set to obtain the initial model and parameter settings of the federated learning.

[0080] Specifically, the counter cnt of the size Q of the known heterogeneous user set V is initialized to 0, and the selected user set is initialized for and the priority list priority is the original user set V; call the priority calculation function, sort the priority list priority from large to small, and initialize the allocated bandwidth ratio totalMu to 0. Among them, select the user in the kth round The priority function for: , where α(0 <α <1) is an attenuation coefficient, Is a user The number of times each user has been trained before the kth round (1≤q≤Q) has a size of | |Local dataset ,in and Respectively represent users The bth data sample and its sample label. The total dataset for FL training for all users It can be expressed as .

[0081] Using the priority function , introduces the attenuation coefficient α (0 < α < 1), so that the more times the user device has participated in training, the lower its priority, to prevent some devices from excessively participating in training and causing resource waste. The function contains the local data set size | |, which means that the user device with a larger data set has a higher priority. Indicates the energy consumption of the user's device. The lower the energy consumption, the higher the priority. This design can better balance the frequency of device use, improve the fairness of federated learning and the sustainable use of devices; the larger the data set, the greater the contribution to global model training, thereby improving the generalization ability of the model; at the same time, while ensuring that the device can continue to participate in training, it maximizes the training effect and extends the availability of the device.

[0082] Further, according to the resource information parameter, a priority value of each user is calculated, the users are sorted from large to small according to the priority value, and based on the user priority order, a user subset that meets the training delay requirement is selected, including:

[0083] Obtain resource information of the user equipment and calculate the priority value of the user;

[0084] According to the priority list, the user is selected and it is determined whether the total bandwidth after the selection meets the new delay limit requirement.

[0085] Specifically, users must first ensure that the training calculation delay does not exceed the time limit for this round of training. ; According to the following formula, the user Delay limit in this round The minimum bandwidth allocation ratio mu required is: , where the total bandwidth allocated to all users is assumed to be B (MHz), and in the kth training iteration, for each user , represents the transmission power of the user, represents the channel gain and background noise of the user, represents the user's background noise, Indicates the bandwidth ratio allocated to the user. =1), Indicates the data size (in bits) of the model parameters downloaded from FLCC or uploaded to FLCC after update, The computational delay for its model update; if the sum of the bandwidth allocated before this round does not exceed the total bandwidth, that is , then the user Selected users to join this round , set the user's counter Add 1 to update the allocated bandwidth ratio .

[0086] By adding eligible user devices to the selection set , and updates its counter and the total allocated bandwidth ratio. This strategy effectively balances the participation opportunities of each user device, prevents excessive concentration of resources, and maximizes the overall system performance and efficiency. The technical effect of this design is to dynamically and reasonably allocate bandwidth resources and optimize delay management in a heterogeneous device environment, thereby improving the convergence speed and model accuracy of federated learning and making full use of the computing and communication capabilities of each user device.

[0087] Furthermore, for the user subset, the minimum bandwidth allocation ratio required to complete the training task is calculated, and the calculation takes into account the user's data volume, computing power and network conditions, including:

[0088] For the priority list, a binary resource scheduling algorithm is used to calculate the bandwidth allocation and energy consumption of the currently selected user subset;

[0089] If the energy consumption does not exceed the preset energy constraint, the currently selected user subset is determined as the participating users of this round of training.

[0090] Specifically, the upper bound r and lower bound l of the binary interval are initialized to 0; according to the user Delay limit in this round The formula for calculating the minimum bandwidth allocation ratio mu required for each user is used, and the derivative of the binary lower bound and the allocation ratio is minimized. , where the derivative calculation formula is as follows: ; For users For example, is a fixed amount, so when the user In the kth round of training, The size is only The distribution is inversely proportional; assuming that the minimum derivative value m is the middle value between the two partitions , calculate the selected user set The total bandwidth that should be allocated under the assumption of the minimum derivative value is totalMu, and the bandwidth ratio that each user should be allocated is the minimum bandwidth allocation ratio The maximum value is taken from the distribution ratio corresponding to the set derivative value, where the distribution ratio corresponding to the set derivative value is as follows: , minimum bandwidth allocation ratio as follows: , It is the inverse function of the derivative. It determines whether the upper or lower bound should be updated based on whether the bandwidth exceeds the quota. If the bandwidth exceeds the quota, the upper bound is updated. , if not exceeded, update the lower bound Jump to the bandwidth ratio that each user should be allocated in the minimum bandwidth allocation ratio Take the maximum value from the distribution ratio corresponding to the set derivative value until the binary interval is close enough , stop the iteration; determine the minimum derivative value m based on the binary result, calculate and return the bandwidth of each user based on the derivative value and energy consumption ,in , .

[0091] Using the binary method for bandwidth allocation can quickly find the optimal bandwidth allocation ratio, reduce computational complexity, improve the utilization efficiency of bandwidth resources, and ensure that the user's delay and energy consumption requirements are met.

[0092] Further, determining whether the total energy consumption of the user subset exceeds a given energy constraint threshold, and if so, deleting the user with the lowest priority from the user subset, including:

[0093] Step S1, obtaining a priority list of a user subset and energy consumption information of each user;

[0094] Step S2: traverse each user in the user subset from high to low according to the priority list;

[0095] Step S3: for each user, obtain its energy loss value and add it to the total energy loss of the selected user subset;

[0096] Step S4, determining whether the total energy consumption of the selected user subset exceeds a given energy constraint threshold;

[0097] Step S5: If the total energy consumption does not exceed the threshold, the currently traversed user is retained in the selected user subset;

[0098] Step S6: If the total energy consumption exceeds the threshold, the user with the lowest priority is deleted from the selected user subset;

[0099] Step S7, recalculating the updated total energy loss of the selected user subset;

[0100] Step S8, repeating steps S4 to S7 until the total energy loss does not exceed a given energy constraint threshold;

[0101] Step S9: Output the subset of end users that meet the energy constraint as the participating user set of this round of federated learning.

[0102] Specifically, if the final energy consumption exceeds the given energy constraint, the selection fallback phase is entered. Until the energy constraint is met; find out the currently selected user The user with the lowest priority And the round number y to which this priority belongs; delete the selected user set Users in round y , and set the user's counter Subtract 1; re-call the binary resource scheduling algorithm to calculate the bandwidth allocation and energy loss of this round of training, that is, jump to calling the binary resource scheduling algorithm to calculate the bandwidth allocation and energy loss of this round of training until the energy constraint is met.

[0103] The selection fallback module is responsible for making the selection scheme meet the energy constraint. If the energy consumption of the current selection scheme exceeds the energy constraint, the module will find the user with the lowest priority in the training and make it exit the training in one iteration. The bandwidth allocator of the bandwidth allocation module is called to reallocate bandwidth and calculate energy. This process is repeated until the selection scheme meets the energy constraint.

[0104] Furthermore, a global ML model with its accuracy is obtained in an iterative manner, including:

[0105] The edge server initializes a global model and broadcasts this global model to some users;

[0106] The user trains the downloaded global model using the locally stored data and sends the updated model back to the edge server;

[0107] The server integrates the uploaded models and updates the global model for the next iteration.

[0108] Specifically, S1. Based on the informed resource information, pre-selected user set and training history, FLCC broadcasts its global ML model to these selected users. ; S2, the selected users perform their local model updates simultaneously and use the allocated bandwidth Update the model Upload to FLCC; S3, FLCC integrates the transmitted model to create a new global model ; S4, determine whether the specified number of iterations has been reached. If not, jump to S1. If reached, end.

[0109] An experimental example of the present invention is:

[0110] During the implementation, a FL framework is considered, which consists of a FL central controller in the MEC system and 50 user devices. The CPU operating frequencies of the users are distributed at intervals of (0.5, 4.0) GHz. The total bandwidth is set to 10 MHz, and the effective switched capacitor for , the data volume conversion parameter π is 1000 CPU cycles / bit. The data set partitioning types are independent and identically distributed (IID) and non-independent and identically distributed (NON-IID). The IID partitioning method is to evenly distribute the data of each label to each user. The NON-IID partitioning method is to distribute the data of each label to each user using Dirichlet distribution.

[0111] In order to verify the performance of the algorithm, this application will be based on two comparative experiments. The first experiment fixedly uses the bandwidth allocation algorithm of the present invention to compare the terminal selection algorithm of the present invention with three baselines; the second experiment fixedly uses the terminal selection algorithm of the present invention to compare the bandwidth allocation algorithm of the present invention with two baselines.

[0112] Figure 2 , Figure 3Compare the accuracy curves of the three benchmark terminal selection algorithms based on greedy Shapley value detection optimization (SV, Shapley-Value), clustering post-dynamic programming (KDP, K-means and DynamicProgramming), and classic federated learning scheme (Classic) and the independent and identically distributed (IID) setting and non-independent and identically distributed (NON IID) setting of the CIFAR-10 dataset. Obviously, in the IID and NON-IID settings, the accuracy curve of the algorithm proposed by the present invention shows better performance than the baseline. Although the SV algorithm considers protecting the Shapley value of users who have participated in training less times, this protection is weakened due to insufficient training resources (energy, bandwidth). In the early training rounds, the user's selection is relatively even, but in the later training rounds, due to the greedy selection strategy, the advantage of the device that occupies less training resources will be magnified, resulting in uneven user selection. The accuracy curve of the SV algorithm in the early stage of training is not much different from that of the algorithm proposed in the present invention, but after entering the stable period, the accuracy difference is gradually amplified, and the speculation is confirmed. Due to the limitation of clustering parameters, the KDP algorithm has a strict upper limit on the number of times each user participates in training. The algorithm proposed in the present invention ensures that all users participate in FL training and improves the number of times users participate in training as a whole. The accuracy curve of the KDP algorithm has always lagged behind the algorithm proposed in the present invention in FL training, and has disadvantages such as slow convergence speed and large fluctuations. This is the result of pursuing the speed of user selection of the algorithm while ignoring the overall number of users participating in training. The Classic algorithm has strict restrictions on the number of participants in each round of training, while the algorithm proposed in the present invention can select as many users as possible. The Classic algorithm does not have an advantage in the total number of training times for a single user and the total number of trainees in a single round of training. The growth rate and convergence speed of the accuracy curve of the Classic algorithm are significantly different from those of the algorithm of the present invention, and the accuracy fluctuations during the learning process are also more obvious, which are all the effects of excessive randomness and fixed upper limits on training. Specifically, compared with SV, KDP and Classic, the terminal selection algorithm proposed in the present invention can improve the accuracy by 0.37%, 0.82% and 1.84% respectively in the IID setting; in the NON-IID setting, the difference between the algorithm proposed in the present invention and the baseline is more obvious, improving the accuracy by 1.33%, 3.05% and 8.51% respectively.

[0113] Figure 4The accuracy curves of the bandwidth allocation algorithm proposed in the present invention and the bandwidth allocation strategy based on the average bandwidth allocation among users (EC, Equal-Client) and the bandwidth allocation strategy based on the proportional bandwidth allocation among users' data sets (PP, Proportional) are compared on the non-independent and identically distributed (NON-IID) setting of the CIFAR-10 data set. The EC algorithm simply allocates the available bandwidth evenly to each user without considering the differences among the users themselves. This method may cause some users to waste bandwidth, while some users cannot reach the preset time standard of the present invention due to insufficient bandwidth after spending a lot of time processing large data sets. The algorithm proposed in the present invention determines the minimum bandwidth allocated to the user based on the time standard and the time for each user to update the model, taking into account the differences among users. This waste of resources in the EC algorithm results in fewer users being able to participate in training in each round under the same resource constraints. The PP algorithm allocates bandwidth to each user in direct proportion to the size of its data set. This means that users processing larger data sets will get more bandwidth, speeding up model transmission and ensuring that users who consume more time and energy in calculations can be compensated to a certain extent. This can ensure that resources are allocated to users more reasonably to a certain extent, but it still only considers one factor and cannot guarantee the optimality. Specifically, compared with EC and PP, the proposed algorithm improves the accuracy by 8.82% and 8.73% in the NON-IID setting, respectively.

[0114] Through the above experimental data, it can be clearly seen that the present invention maximizes the performance of federated learning under limited energy, time and communication resources.

[0115] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for selecting and scheduling federated learning terminals based on dynamic priorities, characterized in that: include: Obtaining the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user; Calculate the priority value of each user according to the resource information parameter, and sort the users from large to small according to the priority value; Based on the user priority order, a subset of users that meet the training delay requirements is selected; For the user subset, calculating the minimum bandwidth allocation ratio required to complete the training task, wherein the calculation takes into account the user's data volume, computing power, and network conditions; Allocating bandwidth resources to the user subset using a binary search method, wherein the binary search method adjusts bandwidth allocation by iteration; It is determined whether the total energy consumption of the user subset exceeds a given energy constraint threshold. If it exceeds the threshold, the user with the lowest priority is deleted from the user subset.

2. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 1, characterized in that: Obtain the basic structure and resource information parameters of the model exchanged between the federated learning central controller and the user, including: Acquire resource information of at least one user equipment, the resource information including a CPU frequency range and an effective switch capacitor parameter, and obtain basic resource information of the user equipment; According to the basic resource information of the user equipment, by analyzing the resource information set of the user equipment, the priority of each of the user equipment is calculated to obtain a priority list of the user equipment; According to the priority list of the user equipment, select user equipment whose priority is higher than a preset threshold to obtain a preliminarily selected user equipment set; For the preliminarily selected set of user equipment, calculating the bandwidth requirement of each of the user equipment, and obtaining a bandwidth requirement list of the user equipment; According to the bandwidth requirement list of the user equipment, bandwidth resources are allocated by adopting a binary method to obtain a bandwidth allocation ratio for each of the user equipment; Calculating the energy consumption of each of the user equipments according to the bandwidth allocation ratio to obtain an energy consumption list of the user equipments; Determine whether the energy consumption of the user equipment exceeds a preset energy constraint threshold, and if so, adjust the selection of the user equipment, and recalculate the bandwidth allocation ratio and the energy consumption until the energy constraint threshold is met; When the energy constraint threshold is met, the FLCC exchanges the basic structure and resource information parameters of the model with the finally selected user equipment set to obtain the initial model and parameter settings of the federated learning.

3. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 2, characterized in that: Calculating the priority value of each user according to the resource information parameter, and sorting the users from large to small according to the priority value, including: Obtain resource information of the user equipment and calculate the priority value of the user; According to the priority list, selecting the user and determining whether the training calculation delay meets the requirement; The binary resource scheduling algorithm is called to calculate the bandwidth allocation and energy loss, and determine whether the total energy consumption exceeds the energy constraint.

4. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 1, characterized in that: Based on the user priority order, a user subset that meets the training delay requirement is selected, including: Acquire resource information of at least one user equipment, where the resource information includes a CPU frequency range and an effective switch capacitance; According to the resource information, the priority of each user is calculated by a preset priority calculation function to obtain a priority list; For the priority list, a binary resource scheduling algorithm is used to calculate the bandwidth allocation and energy consumption of the currently selected user subset; If the energy consumption does not exceed the preset energy constraint, the currently selected user subset is determined as the participating users of this round of training.

5. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 1, characterized in that: For the user subset, the minimum bandwidth allocation ratio required to complete the training task is calculated, and the calculation takes into account the user's data volume, computing power and network conditions, including: For the user subset, obtaining local data set size, CPU frequency range and channel gain resource information of each user; Determine, based on the resource information, a minimum bandwidth allocation ratio required for each user to complete local model training under the delay limit of the current training round; Determine whether the sum of the minimum bandwidth allocation ratios exceeds the total bandwidth, and if so, enter a fallback phase, removing the user with the lowest priority from the user subset until the bandwidth constraint is met; Using a binary resource scheduling algorithm, the bandwidth allocation of each user is further optimized to minimize the total energy loss under the premise of satisfying the bandwidth constraints; In the binary resource scheduling algorithm, the upper and lower bounds between the two partitions are initialized, and the derivative of the energy loss function of each user under the current allocation ratio is calculated; By continuously updating the upper and lower bounds of the binary partitions, the optimal energy loss function derivative value is approached, and when the binary partition interval is sufficient, the iteration is stopped; Determine the bandwidth allocation ratio and the corresponding energy loss value of each user according to the optimal derivative value obtained by the dichotomy method; Determine whether the total energy consumption of all users exceeds a given energy constraint, and if so, return to the bandwidth constraint determination step to further adjust the user subset; A user subset and a bandwidth allocation scheme satisfying the bandwidth constraint and the energy constraint are obtained, and the result is returned for subsequent iterative update of the federated learning model.

6. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 1, characterized in that: A binary method is used to allocate bandwidth resources to the user subset, and the binary method adjusts bandwidth allocation by iteration, including: Initialize and sort the user priority list based on the resource information obtained from the user device; According to the user priority list, a user subset that meets the delay requirement is screened out, and a minimum bandwidth allocation ratio of the user subset that meets the delay requirement under the current delay constraint is calculated as an initial value for subsequent bandwidth allocation.

7. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 1, characterized in that: Determining whether the total energy consumption of the user subset exceeds a given energy constraint threshold, and if so, deleting the user with the lowest priority from the user subset, including: Step S1, obtaining a priority list of a user subset and energy consumption information of each user; Step S2: traverse each user in the user subset from high to low according to the priority list; Step S3: for each user, obtain its energy loss value and add it to the total energy loss of the selected user subset; Step S4, determining whether the total energy consumption of the selected user subset exceeds a given energy constraint threshold; Step S5: If the total energy consumption does not exceed the threshold, the currently traversed user is retained in the selected user subset; Step S6: If the total energy consumption exceeds the threshold, the user with the lowest priority is deleted from the selected user subset; Step S7, recalculating the updated total energy loss of the selected user subset; Step S8, repeating steps S4 to S7 until the total energy loss does not exceed a given energy constraint threshold; Step S9: Output the subset of end users that meet the energy constraint as the participating user set of this round of federated learning.

8. The method for selecting and scheduling federated learning terminals based on dynamic priority as claimed in claim 5, characterized in that: The minimum bandwidth allocation ratio required for each user to complete local model training under the latency constraint of the current training round is calculated as follows: in, Indicates the total bandwidth allocated to all users; Indicates the transmission power of the user; represents the channel gain and background noise of the user; Represents the user's background noise; Indicates the bandwidth ratio allocated to the user; Indicates the data size of the model parameters downloaded from FLCC or uploaded to FLCC after updating; Computational delay for local model updates; The delay limit for this round.

Citation Information

Patent Citations

  • Priority-based wireless resource scheduling method

    CN106937393A

  • Method for jointly optimizing client selection and bandwidth allocation based on DRL in federated learning

    CN116389270A

  • Air-space-ground cooperative scheduling method for guaranteeing task priority and system throughput

    CN117425179A

  • Joint optimization method and system for participant selection and resource allocation of federated learning

    CN117560724A

  • Client scheduling method in dynamic communication environment

    CN117692939A

Cited By

  • Federal learning equipment scheduling optimization method and device based on double-layer reinforcement learning

    CN120068994A

  • Federal Learning Device Scheduling Optimization Method and Device Based on Double-Layer Reinforcement Learning

    CN120068994B

  • Data sharing and exchanging method based on deep learning

    CN121902925A

  • A data sharing exchange method based on deep learning

    CN121902925B