Online scheduling method and related devices for federated learning demand response in cloud edge systems

By constructing a long-term social welfare maximization problem and utilizing the Lagrange dual algorithm and dynamic programming algorithm, the scheduling problem of federated learning tasks is decoupled, solving the dynamic scheduling problem of multiple federated learning tasks, achieving cost reduction and efficiency improvement, and ensuring the stability of the power grid and the balance between supply and demand.

CN115936361BActive Publication Date: 2026-03-13BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In the existing technology, existing methods address the technical problems of multiple federated learning tasks, especially in cloud edge systems. Existing technologies cannot effectively solve the technical problems of multiple federated learning tasks, particularly how to effectively schedule multiple federated learning tasks in a dynamic environment to reduce costs and improve efficiency.

Method used

By constructing a long-term social welfare maximization problem, and utilizing the Lagrange dual algorithm and dynamic programming algorithm, the scheduling problem of federated learning tasks is decoupled, and the training slots, model accuracy, and global iterations for each task are determined to optimize resource allocation and energy use.

Benefits of technology

It enables the efficient scheduling of multiple federated learning tasks in a dynamic environment, reduces training costs, improves the social welfare of the system, and ensures the stability of the power grid and the balance between supply and demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936361B_ABST
    Figure CN115936361B_ABST
Patent Text Reader

Abstract

This application discloses an online scheduling method and related apparatus for responding to federated learning demands in cloud edge systems. The method includes obtaining task parameters for each federated learning task, and determining the task social welfare and system social welfare based on the task parameters and scheduling parameters; constructing a long-term social welfare maximization problem based on the task social welfare and system social welfare using constraints on training time, training conditions, expected accuracy, and energy limits of the federated learning task; and decoupling the long-term social welfare maximization problem to obtain the scheduling result. This application takes the online learning problem of federated learning tasks as its starting point, constructs a long-term social welfare maximization problem in a dynamic environment, and achieves long-term social welfare maximization in edge systems by decoupling the construction of the long-term social welfare maximization problem, thereby reducing the training cost of federated learning tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of federated learning technology, and in particular to an online scheduling method and related apparatus for responding to federated learning needs in cloud edge systems. Background Technology

[0002] Distributed cloud edge systems typically consume significant amounts of energy from the power grid and are well-suited for Emergency Demand Response (EDR) initiatives. During EDR, the power grid typically sends a time-varying energy cap to the cloud edge system, which must then reduce its energy consumption below this cap to help ensure grid stability and supply-demand balance. To this end, cloud edge system operators need to carefully manage their workloads during EDR, especially in public or shared environments where different users submit workloads to the system. However, each user often only cares about executing their own workload, without considering the overall system's energy consumption or EDR—a problem known as "segmented incentives."

[0003] One approach to addressing incentive partitioning is auction-based. That is, the cloud edge operator acts as the auctioneer, and each user acts as a bidder, submitting a bid with their own estimate to execute their workload or task; the auctioneer strategically selects the winner based on the EDR (Execution Requirements List) and schedules the execution of the corresponding task. However, the emerging paradigm of users increasingly executing artificial intelligence (AI) or machine learning (ML) workloads makes auction-based methods more challenging.

[0004] Federated learning trains machine learning models in a distributed manner, enabling a large number of devices to collaboratively learn the model without sharing the original data. While this offers practical efficiency and effectiveness in terms of learning time and energy consumption, it also incurs significant costs. Therefore, determining the number of federated learning tasks and the number of local iterations in each training round becomes a key issue in reducing costs.

[0005] To address these issues, the commonly used approach is to optimally select the control variables for federated learning and schedule the learning process with the objective function of minimizing the total cost. However, existing methods are designed for single federated learning tasks and cannot solve the problem of online learning for multiple federated tasks. Summary of the Invention

[0006] The technical problem to be solved by this application is to provide an online scheduling method and related apparatus for responding to federated learning needs in cloud edge systems, addressing the shortcomings of existing technologies.

[0007] To address the aforementioned technical problems, the first aspect of this application provides an online scheduling method for federated learning demand response in a cloud edge system, the method comprising:

[0008] Obtain the task parameters of each federated learning task received at the current moment;

[0009] Using the constraints of training time, training conditions, expected accuracy, and energy upper limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the parameters of each task.

[0010] The long-term social welfare maximization problem is decoupled to obtain the scheduling results corresponding to each federated learning task.

[0011] In one implementation, the task parameters include arrival time, expected accuracy, number of local iterations, departure time, bid reward, and timeout penalty function.

[0012] In one implementation, the step of constructing a long-term social welfare maximization problem based on the parameters of each task, using constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task, specifically includes:

[0013] Determine the task social welfare of each federated learning task and the system social welfare of the cloud edge system based on the parameters of each task.

[0014] Construct an objective function based on the social welfare of each task and the system's social welfare;

[0015] Using the constraints of training time, training conditions, expected accuracy, and energy upper limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the objective function.

[0016] In one implementation, the long-term social welfare maximization problem is:

[0017]

[0018]

[0019]

[0020]

[0021]

[0022]

[0023]

[0024] Where I represents the set of federated learning task requests, T represents the preset time period, and x iThis indicates the bidding results for Federated Learning Task i. b represents the training state of federated learning task i at time t. i g represents the bid reward for federated learning task i. i (.) denotes the timeout penalty function for federated learning task i, τ i r represents the number of timeout slots for federated learning task i, ni represents the model accuracy for federated learning task i, and r represents the timeout value for federated learning task i. i e represents the global iteration count of federated learning task i. t f represents the power consumption at time t. t (.) represents the electricity bill calculation function at time t, where γ and γ' are constants, and θ' is a constant. i (n i ) is n i functions, Denotes the set, E, which selects the edge server for federated learning task i at time t. i,k (n i )E' i,k (n i )E” i (n i ) is about n i The function, ε i This indicates the expected accuracy.

[0025] In one implementation, the decoupling of the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task specifically includes:

[0026] The long-term social welfare maximization problem is transformed into a timetable selection problem;

[0027] The primal dual algorithm is used to decouple the timetable selection problem to obtain the scheduling results corresponding to each federated learning task.

[0028] In one implementation, transforming the long-term social welfare maximization problem into a timetable selection problem specifically includes:

[0029] Divide the preset time period into several time slots;

[0030] For each time slot, Setting x to a constant value transforms the long-term social welfare maximization problem into a timetable selection problem, where x i This indicates the bidding results for Federated Learning Task i. τ represents the training state of federated learning task i at time t. i n represents the number of timeout slots for federated learning task i. i r represents the model accuracy for federated learning task i. i This represents the number of global iterations for federated learning task i.

[0031] In one implementation, the step of solving the timetable selection problem using the primal-dual algorithm to obtain the scheduling results corresponding to each federated learning task specifically includes:

[0032] For each federated learning task, the dual problem corresponding to the timetable selection problem is determined using the Lagrange duality algorithm;

[0033] The dual problem is decoupled using a dynamic programming algorithm to obtain the scheduling results for each federated learning task.

[0034] A second aspect of this application provides an online scheduling system for responding to federated learning needs in a cloud edge system, the system comprising:

[0035] The acquisition module is used to acquire the task parameters of each federated learning task received at the current moment;

[0036] The module is used to construct a long-term social welfare maximization problem based on the parameters of each task, with constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task.

[0037] The decoupling module is used to decouple the long-term social welfare maximization problem in order to obtain the scheduling results corresponding to each federated learning task.

[0038] A third aspect of this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the online scheduling method for federated learning demand response of cloud edge systems as described above.

[0039] A fourth aspect of this application provides a terminal device, which includes: a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor;

[0040] The communication bus enables communication between the processor and the memory;

[0041] When the processor executes the computer-readable program, it implements the steps in the online scheduling method for federated learning demand response of cloud edge systems as described above.

[0042] Beneficial Effects: Compared with existing technologies, this application provides an online scheduling method and related apparatus for responding to federated learning needs in cloud edge systems. The method includes obtaining the task parameters of each federated learning task received at the current moment, constructing a long-term social welfare maximization problem based on the task parameters using constraints such as training time constraints, training condition constraints, expected accuracy constraints, and energy upper limit constraints; and decoupling the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task. This application takes the online learning problem of federated learning tasks as its starting point, constructs a long-term social welfare maximization problem in a dynamic environment, and achieves long-term social welfare maximization at the edge by decoupling the construction of the long-term social welfare maximization problem, thereby reducing the training cost of federated learning tasks. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A flowchart illustrating the online scheduling method for responding to federated learning needs in cloud edge systems provided in this application.

[0045] Figure 2 A flowchart illustrating the online scheduling method for responding to federated learning needs in cloud edge systems provided in this application.

[0046] Figure 3 This is an example diagram of Embodiment 1.

[0047] Figure 4 This is an example diagram of Embodiment 2.

[0048] Figure 5 The schematic diagram of the online scheduling system for responding to federated learning needs in cloud edge systems provided in this application.

[0049] Figure 6 A schematic diagram of the terminal device provided in this application. Detailed Implementation

[0050] This application provides an online scheduling method and related apparatus for responding to federated learning needs in a cloud edge system. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.

[0051] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0053] It should be understood that the sequence number and size of each step in this embodiment do not imply the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.

[0054] Research has revealed that distributed cloud edge systems typically consume significant amounts of energy from the power grid and are well-suited for Emergency Demand Response (EDR) initiatives. During EDR, the power grid typically sends a time-varying energy cap to the cloud edge system, which must then reduce its energy consumption below this cap to help ensure grid stability and supply-demand balance. Therefore, cloud edge system operators need to carefully manage their workloads during EDR, especially in public or shared environments where different users submit workloads to the system. However, each user often only cares about executing their own workload, without considering the overall system's energy consumption or EDR—a problem known as "split incentives."

[0055] One approach to addressing incentive partitioning is auction-based. That is, the cloud edge operator acts as the auctioneer, and each user acts as a bidder, submitting a bid with their own estimate to execute their workload or task; the auctioneer strategically selects the winner based on the EDR (Execution Requirements List) and schedules the execution of the corresponding task. However, the emerging paradigm of users increasingly executing artificial intelligence (AI) or machine learning (ML) workloads makes auction-based methods more challenging.

[0056] Federated learning trains machine learning models in a distributed manner, enabling a large number of devices to collaboratively learn the model without sharing the original data. While this offers practical efficiency and effectiveness in terms of learning time and energy consumption, it also incurs significant costs. Therefore, determining the number of federated learning tasks and the number of local iterations in each training round becomes a key issue in reducing costs.

[0057] To address these issues, the commonly used approach is to optimally select the control variables for federated learning and schedule the learning process with the objective function of minimizing the total cost. However, existing methods are designed for single federated learning tasks and cannot solve the problem of online learning for multiple federated tasks.

[0058] For online learning of multiple federated tasks, the information for each task (arrival time, model accuracy, local iterations, global iterations, and departure time) is time-varying and unpredictable before arrival, making online learning of multiple federated tasks a dynamic environment. Furthermore, each federated task bid typically has a deadline, which can be exceeded. When a deadline is exceeded, the service quality of the cloud edge system degrades, incurring penalties, and adjusting model accuracy affects training completion time. Therefore, while adapting to the deadlines of each federated task, it is also necessary to determine the accuracy of the model for each task, which impacts energy supply and thus the decision to purchase future federated task bids before these actual bids arrive. Thus, scheduling online learning of multiple federated tasks to maximize social welfare becomes a challenging problem.

[0059] Therefore, in this embodiment, the task parameters of each federated learning task received at the current moment are obtained, and the task social welfare of each federated learning task and the system social welfare of the cloud edge system are determined based on the task parameters and the scheduling parameters of the cloud edge system. A long-term social welfare maximization problem is constructed based on the task social welfare and system social welfare, using constraints on training time, training conditions, expected accuracy, and energy limits of the federated learning tasks. The long-term social welfare maximization problem is decoupled to obtain the scheduling results corresponding to each federated learning task. This application takes the online learning problem of federated learning tasks as its starting point, constructs a long-term social welfare maximization problem in a dynamic environment, and achieves long-term social welfare maximization at the edge by decoupling the construction of the long-term social welfare maximization problem, thereby reducing the training cost of federated learning tasks.

[0060] The application content will be further explained below with reference to the accompanying drawings and through the description of the embodiments.

[0061] This embodiment provides an online scheduling method for responding to federated learning needs in a cloud edge system, such as... Figure 1 and Figure 2 As shown, the method includes:

[0062] S10. Obtain the task parameters of each federated learning task received at the current moment.

[0063] Specifically, the cloud edge system includes several edge devices, and the federated learning task is a federated learning task that needs to be trained by the cloud edge system within a preset time period. That is to say, the federated learning task sends a task request to the cloud edge system at the current moment, requesting the cloud edge system to train the federated learning task within the preset time period. The cloud edge system can accept the request of the federated learning task, or it can reject the request.

[0064] The task parameters are those for the federated learning task, including arrival time, expected accuracy, number of local iterations, departure time, bid reward, and timeout penalty function. Essentially, when requesting the cloud edge system to execute the federated learning task, the task requests, i.e., it sends the task parameters, to the cloud edge system. Here, we denote the task parameters as B. i ={t i ,ε i ,L i ,d i ,b i ,g i (.)}, where t i Indicates the arrival time of the federated learning task, ε i The accuracy that federated learning task models aim to achieve, L i It is the number of local iterations, d i It's the departure time, b i It is the bidding remuneration for federal learning tasks, g i (.) is the penalty function for exceeding the departure time.

[0065] Furthermore, after receiving all federated learning tasks, the cloud edge system determines the scheduling parameters for each task. These parameters include the bidding results, training time, model accuracy, timeout slots, global iteration count, and power consumption. In other words, the cloud edge network uses the scheduling parameters for each task as independent variables to construct the model, and determines the scheduling parameters for each task by solving the model. Here, the scheduling parameters are denoted as... Where, x i Indicates federal learning task i The bidding results, x ix ∈{0,1} i =1 indicates a successful bid, x i =0 indicates a failed bid. Indicates the federated learning task at time t. i Training status, This indicates that the federated learning task i is trained at time t. This indicates that federated learning task i is not trained at time t; n i ∈{1,…,n max} represents the model accuracy for federated learning task i, i.e., the number of bits used during training; τ i ∈{0,1,…,Td i} represents the number of time slots exceeding the planned departure time for federated learning task i; r i ∈{1,…,r max} represents the global iteration count of federated learning task i; e t ≥0 indicates that the total power consumption e of the cloud edge system at time t. t ≥0. In addition, the cloud edge system determines which federated learning tasks to execute based on the scheduling parameters corresponding to each federated learning task. That is, the cloud edge system determines which federated learning tasks to execute and which not to execute, as well as the training time and model accuracy of the executed federated learning tasks, based on the determined scheduling parameters.

[0066] S20. Using the constraints of training time, training conditions, expected accuracy, and energy ceiling of the federated learning task, as well as the social welfare of the task and the social welfare of the system, we construct a long-term social welfare maximization problem.

[0067] Specifically, task social welfare reflects the benefits of federated learning tasks, while system social welfare reflects the benefits of cloud edge systems. System social welfare is determined based on the bid rewards supported by each federated learning task and the electricity costs incurred in training the task. Task social welfare is based on the bid price and penalties for exceeding the time limit. Therefore, the sum of task social welfare for federated learning tasks can be expressed as x. i b i -g i (τ i )-p i The social welfare of the system can be represented as ∑ i∈I p i -∑ t∈T f t (e t ), where p i p represents the final reward paid by the successful bidder. i It may not be equal to b iFurthermore, after determining the task-specific social welfare and systemic social welfare for all federal learning tasks, an objective function can be constructed based on both.

[0068] In one implementation, the step of constructing a long-term social welfare maximization problem based on the parameters of each task, using constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task, specifically includes:

[0069] Determine the task social welfare of each federated learning task and the system social welfare of the cloud edge system based on the parameters of each task.

[0070] Construct an objective function based on the social welfare of each task and the system's social welfare;

[0071] Using the constraints of training time, training conditions, expected accuracy, and energy upper limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the objective function.

[0072] Specifically, the objective function can be the sum of the social welfare of each task and the system's social welfare, i.e., objective function = social welfare of each task + system's social welfare. Therefore, the objective function can be expressed as: P = ∑ i∈ I(x i b i -g i (τ i ))-∑ t∈ T f t (e t Furthermore, for federated learning tasks, training can only begin after the federated learning task arrives. For cloud edge systems, the capacity is limited, and there is an upper limit to the number of federated learning tasks that can be globally aggregated at any given time. Only the winning federated learning task in the auction can be trained on the cloud edge system. The successfully bid federated learning task needs to be globally aggregated a sufficient number of times within the system to achieve the target accuracy, and sufficient energy must be consumed from the power grid each time period to train the federated learning task. Therefore, the long-term social welfare maximization problem requires constraints such as federated learning task training time constraints, federated learning task training condition constraints, federated learning task expected accuracy constraints, and energy upper limit constraints.

[0073] Based on this, the long-term social welfare maximization problem is:

[0074]

[0075]

[0076]

[0077]

[0078]

[0079]

[0080]

[0081] Where I represents the set of federated learning task requests, T represents the preset time period, and x i This indicates the bidding results for Federated Learning Task i. b represents the training state of federated learning task i at time t. i This represents the bid reward for Federated Learning Task i, i.e., the reward that Federated Learning Task i is willing to pay if it wins the bid, and it can be compared with the reward p that Federated Learning Task i ultimately pays. i Different, g i (.) denotes the timeout penalty function for federated learning task i, τ i n represents the number of timeout slots for federated learning task i. i r represents the model accuracy for federated learning task i. i Let f represent the number of global iterations for federated learning task i, et represent the power consumption at time t, and f represent the power consumption at time t. t (.) represents the electricity bill calculation function at time t, where Υ and γ are both constants, and θ i (n i ) is n i functions, Denotes the set, E, which selects the edge server for federated learning task i at time t. i,k (n i )E' i,k (n i )E” i (n i ) is about n i The function, ε i This indicates the expected accuracy.

[0082] S30. Decouple the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task.

[0083] Specifically, the scheduling result is determined based on the scheduling parameters to be determined. This result includes the accepted federated learning tasks, their payment cost, model accuracy, global iteration count, and exit time. The cloud edge system schedules the federated learning tasks based on this result, i.e., determining the accepted and rejected tasks, and training them according to their model accuracy, global iteration count, and exit time. Furthermore, the long-term social welfare maximization problem is a linear integer programming problem. To decouple the long-term social welfare maximization problem, it can be transformed into a timetable selection problem, and then the timetable selection problem can be decoupled to obtain the scheduling result for each federated learning task.

[0084] In one implementation, transforming the long-term social welfare maximization problem into a timetable selection problem specifically includes:

[0085] Divide the preset time period into several time slots;

[0086] For each time slot, Setting x to a constant value transforms the long-term social welfare maximization problem into a timetable selection problem, where x i This indicates the bidding results for Federated Learning Task i. τ represents the training state of federated learning task i at time t. i n represents the number of timeout slots for federated learning task i. i r represents the model accuracy for federated learning task i. i This represents the number of global iterations for federated learning task i.

[0087] Specifically, the preset time period is a pre-set time period corresponding to the demand response signal after the cloud edge system has determined the current demand response signal from the power grid. Each time slot is a part of the preset time period, and the cloud edge system knows the upper limit of electricity corresponding to each time slot. For example, the preset time period is 168 hours, and there are 168 time periods, each with a duration of 1 hour.

[0088] For each time slot, the problem of maximizing long-term social welfare... If we set it to a constant value, then the independent variable in the long-term social welfare maximization problem becomes x. il ∈{0,1} and e t ≥0. Furthermore, due to By setting the value to a constant, constraints (1a), (1c), and (1d) in the long-term social welfare maximization problem are removed, leaving constraint (1f). Constraints (1b) and (1e) are then transformed as follows:

[0089]

[0090]

[0091] At the same time, add the following constraints:

[0092]

[0093] Based on this, the timetable selection problem can be expressed as:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099] Where, ξ i Let represent the set of timetables that satisfy constraints (1a) and (1d) for federated learning task i.

[0100] In one implementation, the decoupling of the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task specifically includes:

[0101] The long-term social welfare maximization problem is transformed into a timetable selection problem;

[0102] The primal dual algorithm is used to decouple the timetable selection problem to obtain the scheduling results corresponding to each federated learning task.

[0103] Specifically, the timetable selection problem is NP-hard, making it impossible for standard VCG methods to decouple the timetable selection problem. Therefore, this embodiment uses a primal-dual algorithm to decouple the timetable selection problem. This primal-dual algorithm is a winner and payment determination algorithm based on primal-dual optimization. It calculates the winner and outputs an approximate solution by simultaneously processing the dual problem of the primal problem. The winner refers to the accepted federated learning task. The primal-dual algorithm obtains the training time slot table corresponding to the federated learning task and calculates the payment fee for the successful bidder based on social welfare, determining the model accuracy, global iteration count, and departure time of the federated learning task.

[0104] When dealing with the dual problem of the primal problem, the dual variables in the dual problem are continuously increased until the dual constraints become tight, at which point the corresponding primal variables can be set to non-zero values. The iteration will not terminate until the constraints are satisfied (i.e., the number of global iterations is sufficient to make the model meet its accuracy requirements).

[0105] Furthermore, when decoupling the timetable selection problem using the primal-dual algorithm, a dual variable μ is introduced. i ,m t ,v t The variables in the timetable selection problem are transformed into dual variables, thus converting the timetable selection problem into a dual problem, where the dual problem is expressed as:

[0106]

[0107]

[0108]

[0109] in, h t This represents the electricity price at time t.

[0110] After obtaining the dual problem, the dual variable μ is obtained through dynamic programming. i The maximum value of μ, if μ i A maximum value greater than 0 indicates that the bid for federated learning task i is successful, at which point x... il =1.

[0111] In summary, this embodiment provides an online scheduling method for responding to federated learning demands in a cloud edge system. The method includes obtaining the task parameters of each federated learning task received at the current moment, constructing a long-term social welfare maximization problem based on the task parameters, using constraints such as training time constraints, training condition constraints, expected accuracy constraints, and energy upper limit constraints. The method then decouples the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task. This application connects each federated learning auction, aiming to maximize long-term social welfare, and determines the training slot, model accuracy, and global iteration count for each federated learning task. Furthermore, when decoupling the long-term social welfare maximization problem, the problem of selecting a timetable is transformed into a welfare maximization problem for each task using the Lagrange duality algorithm. Then, a dynamic programming algorithm is used to select the training slot that maximizes social welfare in polynomial time, and the payment fee for the successful bidder is calculated based on social welfare to determine the model accuracy, global iteration count, and departure time of the federated learning task.

[0112] To further illustrate the online scheduling method for responding to federated learning needs in cloud edge systems provided in this embodiment, two specific embodiments are given below.

[0113] Example 1

[0114] like Figure 3As shown, after receiving the current demand response signal from the power grid, the cloud edge system initiates a reverse auction to solicit bids for all federated learning tasks. Each federated learning task determines its own task parameters, where the task parameters {t} i ,∈ i ,L i ,d i ,b i ,g i (.)} includes task arrival time, model accuracy, number of local iterations, planned departure time, bidding, and penalty function; the cloud edge system determines the target federated learning task to be trained in the cloud edge system based on the online scheduling method for responding to the cloud edge system federated learning demand provided in this embodiment, and trains the target federated learning task based on the auction results and fees of each target federated learning task, the training time of the target federated learning task in the cloud edge system, and the model accuracy.

[0115] In this embodiment, the social welfare calculation method of the cloud edge system is ∑ i∈I p i -∑ t∈t f t (e t ), p i The fee charged for the training tasks, f t (e t The sum of the electricity fees paid to the power grid is ∑. The social welfare benefits for federal learning tasks are ∑. i∈I (x i bg i (τ i )-p i Therefore, the objective function for maximizing long-term social welfare is:

[0116] ∑ i∈I (x i b i -g i (τ i ))-∑ t∈T f t (e t )

[0117] Furthermore, the constraints of the long-term social welfare maximization problem include:

[0118] 1) It is necessary to ensure that training only begins after the federal learning task has been completed, that is:

[0119]

[0120] 2) Only successfully bid-winning federated learning tasks can be trained, that is:

[0121]

[0122] 3) The number of global iterations for the federated learning task must meet the target accuracy requirement, i.e.:

[0123]

[0124] Where Υ is a constant, θ i (n i ) is n i The function, ε i γ represents the task precision and is also a constant.

[0125] 4) The overall energy consumption meets the requirements for model training, that is:

[0126]

[0127] in, Let E represent the set, where E is the edge server selected for training task i at time t. i,k (n i )E' i,k (n i )E” i (n i ) is about n i The function.

[0128] The solution process for the long-term social welfare maximization problem is as follows:

[0129] For each given n i r i Find the answer using dynamic programming algorithm The maximum value, when the federated learning task arrives, is the value of the edge servers involved in generating the federated learning task i at each time t. n i Iterate from 1 to the maximum value, and r i Find the largest convenience from 1 to the maximum value. The value is calculated, and the current time table l is output, where b i l = b i x i -g i (τ i When the corresponding timetable is l, b i x i -g i (τ i The value of ) z t This represents the number of tasks executed at time t. When the maximum value is greater than 0, the receiving task corresponds to x in timetable l.i l = 1, y i t=1,x i =1, precision selection n i,l The number of global iterations is chosen as r. i,l When b i,l - When the maximum value is less than or equal to 0, reject task x. i l=0, y i t=0,x i =0.

[0130] Example 2

[0131] Consider |T| = 168 consecutive time slots, each time slot equal to one hour. The federated learning task is the image classification FL task, using the MNIST dataset of 10 classes of 70K grayscale handwritten digit images (60K for training, 10K for testing) and the CIFAR-10 dataset of 10 classes of 60K color images (50K for training, 10K for testing), using LeNet-5

[38] and a convolutional neural network (CNN) with two 3×3 convolutional layers (the first layer has 16 channels and the second layer has 32 channels), each layer followed by ReLU activation and 2×2 max pooling layer, fully connected layer and softmax output layer.

[0132] like Figure 4 As shown, with two datasets and two models, four types of FL tasks can be constructed, totaling 100–500 FL tasks, with each type of FL task accounting for one-quarter of the total FL tasks. The arrival time t of each FL task is... i Taken from the range [0, 100]. The edge K-value is trained for each FL task based on the number of servers for each task in the Google cluster. i The quantity is taken from [10, 30]. Using r max and n max Estimate the deadline for each FL task or bid (note that this deadline can still be violated to save effort when actually scheduling and training FL tasks), and use a linear deadline violation penalty function unless otherwise specified. The number of local iterations per global iteration is set to L without sacrificing generality. i =5; the maximum number of global iterations per time slot is set to r. max =9; the maximum bit precision of quantization is set to n. max =32; target precision set to ε i =0.01. The bid price for FL task i is set in the range of [0.1$, 1$], and the number of edge servers is set to 50.

[0133] The process for determining the scheduling result for the above problem is as follows: Within each time slot, all federated learning tasks participating in the auction submit their bids. Once the cloud edge system receives a bid, for FL task i, it iterates n times... i and r i The process of finding the optimal schedule is as follows: First, by considering the capacity and energy of the cloud edge system, a set of feasible time slots is identified. Then, the minimum number of global iterations required to train the federated learning task to achieve the target accuracy ε is calculated. i Then, the optimal timetable is calculated using dynamic programming, and the maximum value of the dual variable is found to determine whether the auction is successful. Finally, the reward is determined based on the dual variable. The winner and reward from the scheduling results are then fed back to the bidders. The cloud edge system trains the federated learning task based on the training parameters from the scheduling results until the entire simulation time slot is completed.

[0134] Based on the above-described online scheduling method for demand response in federated learning of cloud edge systems, this embodiment provides an online scheduling system for demand response in federated learning of cloud edge systems, such as... Figure 5 As shown, the system includes:

[0135] The acquisition module 100 is used to acquire the task parameters of each federated learning task received at the current moment;

[0136] Module 200 is used to construct a long-term social welfare maximization problem based on the parameters of each task, with constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task.

[0137] The decoupling module 300 is used to decouple the long-term social welfare maximization problem in order to obtain the scheduling results corresponding to each federated learning task.

[0138] Based on the above-described online scheduling method for federated learning demand response in cloud edge systems, this embodiment provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the online scheduling method for federated learning demand response in cloud edge systems as described in the above embodiment.

[0139] Based on the above-mentioned online scheduling method for federated learning demand response in cloud edge systems, this application also provides a terminal device, such as... Figure 6As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can invoke logical instructions in the memory 22 to execute the methods described in the above embodiments.

[0140] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0141] The memory 22, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 22, thereby implementing the methods in the above embodiments.

[0142] The memory 22 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.

[0143] Furthermore, the specific process of loading and executing multiple instruction processors in the aforementioned storage medium and terminal device has been described in detail in the above method, and will not be repeated here.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An online scheduling method for federated learning demand response in a cloud edge system, characterized in that, The method includes: Obtain the task parameters of each federated learning task received at the current moment. The task parameters include arrival time, expected accuracy, number of local iterations, departure time, bid reward, and timeout penalty function. Using the constraints of training time, training conditions, expected accuracy, and energy limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the parameters of each task. Decouple the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task; Specifically, the construction of a long-term social welfare maximization problem based on various task parameters, using constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task, includes: The task social welfare of each federated learning task and the system social welfare of the cloud edge system are determined based on the parameters of each task. Construct an objective function based on the social welfare of each task and the social welfare of the system; Using the constraints of training time, training conditions, expected accuracy, and energy limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the objective function. The decoupling of the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task specifically includes: The long-term social welfare maximization problem is transformed into a timetable selection problem; The primal dual algorithm is used to decouple the timetable selection problem to obtain the scheduling results corresponding to each federated learning task.

2. The online scheduling method for federated learning demand response in cloud edge systems according to claim 1, characterized in that, The problem of maximizing long-term social welfare is as follows: , , , , , , , , in, This represents the set of federated learning task requests. Indicates a preset time period. Indicates federal learning task The bidding results Indicates time Federal Learning Tasks Training status, Indicates federal learning task Bidding remuneration, Indicates federal learning task The timeout penalty function, Indicates federal learning task The number of timeout slots, Indicates federal learning task Model accuracy, Indicates federal learning task The number of global iterations, express The power consumption value at any given time. Indicates time The corresponding electricity bill calculation function, and They are all constants. yes functions, Represents a set, in t Always select federal learning task Edge servers, It is about The function, This indicates the expected accuracy.

3. The online scheduling method for federated learning demand response in cloud edge systems according to claim 1, characterized in that, The specific steps of transforming the long-term social welfare maximization problem into a timetable selection problem include: Divide the preset time period into several time slots; For each time slot, Setting a constant value transforms the long-term social welfare maximization problem into a timetable selection problem, where... Indicates federal learning task The bidding results Indicates time Federal Learning Tasks Training status, Indicates federal learning task The number of timeout slots, Indicates federal learning task Model accuracy, Indicates federal learning task The number of global iterations.

4. The online scheduling method for federated learning demand response in cloud edge systems according to claim 3, characterized in that, The primal-dual algorithm is used to solve the timetable selection problem to obtain the scheduling results for each federated learning task, specifically including: For each federated learning task, the dual problem corresponding to the timetable selection problem is determined using the Lagrange duality algorithm; The dual problem is decoupled using a dynamic programming algorithm to obtain the scheduling results for each federated learning task.

5. An online scheduling system for federated learning demand response in cloud edge systems, characterized in that, The system includes: The acquisition module is used to acquire the task parameters of each federated learning task received at the current moment. The task parameters include arrival time, expected accuracy, number of local iterations, departure time, bid reward, and timeout penalty function. The module is used to construct a long-term social welfare maximization problem based on the parameters of each task, with constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task. A decoupling module is used to decouple the long-term social welfare maximization problem in order to obtain the scheduling results corresponding to each federated learning task; Specifically, the construction of a long-term social welfare maximization problem based on various task parameters, using constraints such as training time constraints, training conditions constraints, expected accuracy constraints, and energy upper limit constraints of the federated learning task, includes: The task social welfare of each federated learning task and the system social welfare of the cloud edge system are determined based on the parameters of each task. Construct an objective function based on the social welfare of each task and the social welfare of the system; Using the constraints of training time, training conditions, expected accuracy, and energy limit of the federated learning task as constraints, a long-term social welfare maximization problem is constructed based on the objective function. The decoupling of the long-term social welfare maximization problem to obtain the scheduling results corresponding to each federated learning task specifically includes: The long-term social welfare maximization problem is transformed into a timetable selection problem; The primal dual algorithm is used to decouple the timetable selection problem to obtain the scheduling results corresponding to each federated learning task.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs that can be executed by one or more processors to implement the steps in the online scheduling method for federated learning demand response of cloud edge systems as described in any one of claims 1-4.

7. A terminal device, characterized in that, include: Processor, memory, and communication bus; the memory stores a computer-readable program that can be executed by the processor; The communication bus enables communication between the processor and the memory; When the processor executes the computer-readable program, it implements the steps in the online scheduling method for federated learning demand response of cloud edge systems as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Unmanned aerial vehicle group distributed learning resource management and control method based on bidirectional auction game

    CN113660304A

  • Task scheduling method based on edge computing

    CN114546608A