A federated learning resource scheduling method, device and system for a non-uniform edge environment

CN122884669APending Publication Date: 2026-10-09UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611022120.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0007]为了解决现有技术在非均匀分布下资源效率、延迟约束与节点负载能力相互制约导致联邦学习系统的整体效率与稳定性不佳的问题,本发明提供一种非均匀边缘环境的联邦学习资源调度方法、装置及系统

Benefits of technology

[0019]本发明基于两阶段构造框架,第一阶段专注最小化全局资源消耗,快速得到一个良好起点;第二阶段在延迟约束的驱动下,通过局部结构调整进行精细化修正,在资源消耗、路径延迟与负载均衡之间实现有效权衡,提高联邦学习系统的整体效率与稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884669A_ABST
    Figure CN122884669A_ABST
Patent Text Reader

Abstract

The application discloses a federated learning resource scheduling method, device and system for a non-uniform edge environment, which comprises the following steps: determining a base tree according to a non-directed graph and based on resource consumption satisfying a preset condition, calculating path delays from a root node to all child nodes in the base tree, screening out a longest path and comparing the path delay of the longest path with the size of the maximum end-to-end communication delay allowed in the current training round; in response to the path delay of the longest path being greater than the maximum end-to-end communication delay allowed in the current training round, replacing edges in the base tree or redistributing sub-trees according to the non-directed graph and based on the principle that the maximum path delay of the replaced base tree is less than the path delay of the longest path to obtain an aggregated tree; and performing aggregation and uploading of model parameters according to the aggregated tree. The application can effectively balance resource consumption, path delay and load balancing, and improve the overall efficiency and stability of the federated learning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of resource scheduling technology, and in particular relates to a federated learning resource scheduling method, apparatus and system for non-uniform edge environments. Background Technology

[0002] Hierarchical federated learning provides a privacy-preserving solution for distributed machine learning by training models locally on end devices and then collaboratively aggregating them. The "cloud-edge-device" architecture effectively reduces communication overhead by introducing edge servers for intermediate aggregation. However, in real-world deployments, end devices are often geographically unevenly distributed, with high density in hotspot areas, posing a significant challenge to constructing the training communication topology. Traditional star topologies can overload edge servers in densely populated areas, leading to congestion and high latency. To address this, existing technologies introduce device-to-device communication, constructing a tree-like aggregation network where some devices act as relay nodes to distribute the load on the edge servers.

[0003] However, these methods still have significant shortcomings when dealing with non-uniform distributions:

[0004] On the one hand, most existing solutions focus on minimizing overall resource consumption or strictly ensuring single-round latency, which leads to some relay nodes becoming overloaded due to too many connected child nodes in the topology generated in densely populated areas, thus becoming a bottleneck for system reliability.

[0005] On the other hand, these methods employ uniform load constraints, making it difficult to achieve fine-grained load allocation.

[0006] Furthermore, under non-uniform distribution, resource efficiency, latency constraints, and node load capacity are mutually restrictive, and existing methods are unable to dynamically generate efficient aggregation topologies that can simultaneously take all three into account, thus limiting the overall efficiency and stability of large-scale hierarchical federated learning systems. Summary of the Invention

[0007] To address the problem that existing technologies suffer from poor overall efficiency and stability of federated learning systems due to the interplay of resource efficiency, latency constraints, and node load capacity under non-uniform distribution, this invention provides a method, apparatus, and system for scheduling federated learning resources in non-uniform edge environments.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0009] The first aspect of this invention provides a federated learning resource scheduling method for non-uniform edge environments, the method comprising the following steps:

[0010] A base tree is determined based on an undirected graph and predefined conditions for resource consumption. The undirected graph includes at least two nodes representing devices and edges representing the communication relationship between the two nodes. Each node includes a root node representing an edge server and at least one child node representing a terminal device. The attributes of the edges include communication latency and resource consumption. The base tree includes a root node and at least one child node in the undirected graph. The child node corresponding to each edge in the base tree is determined by the resource consumption from the parent node to the child node and the maximum load capacity of the parent node.

[0011] Calculate the path delay from the root node to all child nodes in the base tree, filter out the longest path, and compare the path delay of the longest path with the maximum end-to-end communication delay allowed in the current training round.

[0012] In response to the longest path's path delay being greater than the maximum end-to-end communication delay allowed in the current training round, the edges in the base tree are replaced or the subtrees are reassigned based on the undirected graph and the principle that the maximum path delay of the replaced base tree is less than the longest path's path delay to obtain an aggregate tree.

[0013] The model parameters are aggregated and uploaded based on the aggregated tree.

[0014] A second aspect of the present invention provides a federated learning resource scheduling apparatus for non-uniform edge environments, comprising a memory and a controller connected in sequence, wherein the memory stores a computer program, and the controller is used to read the computer program and execute the federated learning resource scheduling method for non-uniform edge environments described in the first aspect.

[0015] A third aspect of the present invention provides a federated learning resource scheduling system for non-uniform edge environments, comprising:

[0016] The second aspect describes a federated learning resource scheduling device for a non-uniform edge environment.

[0017] At least two terminal devices are signal-connected to the federated learning resource scheduling device of the non-uniform edge environment.

[0018] The beneficial effects of this invention are:

[0019] This invention is based on a two-stage construction framework. The first stage focuses on minimizing global resource consumption to quickly obtain a good starting point. The second stage, driven by latency constraints, performs fine-tuning through local structural adjustments to achieve an effective trade-off between resource consumption, path latency, and load balancing, thereby improving the overall efficiency and stability of the federated learning system.

[0020] In constructing the aggregation tree, this invention determines the maximum load capacity of each node in the base tree, enabling the algorithm to perceive and adapt to the heterogeneity of devices, prevent low-capacity nodes from overloading, and achieve true fine-grained load balancing. This eliminates the risks of bottlenecks, packet loss, and node failure caused by overload, and significantly improves the stability of the training process. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of the overall structure of a federated learning resource scheduling method for non-uniform edge environments proposed in this invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other.

[0026] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0027] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0028] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0029] The first aspect of this invention discloses a federated learning resource scheduling method for non-uniform edge environments, applicable to scenarios such as smart cities, industrial IoT, and vehicle-to-everything (V2X) networks. Taking smart cities as an example, a large number of cameras and sensors in densely populated urban areas and devices in sparsely populated suburban areas form a non-uniform network for collaborative training of traffic flow prediction or security models. Taking V2X as an example, road intersections and parking lots have dense vehicle traffic, while ordinary road sections have sparse traffic, used for joint learning of traffic scheduling or autonomous driving models. In these scenarios, this invention can dynamically construct a suitable communication topology for each round of training, maximizing network bandwidth and device energy savings while ensuring timely model updates, and preventing overload of any edge servers or relay devices, thereby supporting large-scale, highly stable, and highly efficient edge swarm intelligent model training. This method is executed by an edge server. Specifically, as shown... Figure 1 As shown, the method includes steps S1 to S4.

[0030] Step S1: Generation of the undirected graph.

[0031] The problem of constructing the communication topology within the current edge cluster is modeled as a load balancing problem with latency constraints. The problem of LCMROT (Limited Resource Optimization Tree). Specifically, taking edge servers as an example. An undirected graph is constructed with the root node as the root node and the terminal devices to be connected as child nodes, based on the device-to-device communication links between the devices. The undirected graph includes at least two nodes representing devices and edges representing the communication relationship between the two nodes. Each node includes a root node representing an edge server and at least one child node representing a terminal device. The attributes of the edges include communication latency. and resource consumption .

[0032] For each edge in an undirected graph Its communication delay and resource consumption Calculated using the following model:

[0033] First, based on Shannon's formula, the achievable transmission rate between the two nodes corresponding to each edge is:

[0034]

[0035] In the formula, , Let these be the two nodes corresponding to the edge. For bandwidth, For channel gain, For transmission power, This represents noise power.

[0036] Based on the achievable transmission rate The communication delay is determined by the size of the model parameters to be transmitted. and resource consumption Specifically:

[0037] ,

[0038] ,

[0039] In the formula, The size of the model parameters to be transmitted;

[0040] Therefore, for the border Assign two attributes: resource consumption and communication delay .

[0041] Terminal devices, i.e., child nodes Maximum load capacity is The maximum load capacity of the edge server, i.e., the root node, is .

[0042] Regarding the maximum load capacity of terminal devices :

[0043] The device can dynamically estimate and report its real-time CPU utilization, remaining memory, battery power, and network throughput to the edge server for real-time calculation; the edge server can also assign tasks based on the terminal device's historical performance data, such as average computing speed and task completion reliability; or, it can set a fixed value.

[0044] Step S2: Determine the base tree based on the undirected graph and the preset conditions based on resource consumption. The base tree includes a root node and at least one child node in the undirected graph. The child node corresponding to each edge of the base tree is determined by the resource consumption from the parent node to the child node and the maximum load capacity of the parent node.

[0045] In this step, without considering delay constraints, a base tree is constructed based on the principle of minimizing total communication resource consumption. This base tree is an m-ary tree. Specifically, this step includes steps S21 to S24.

[0046] Step S21: Add all nodes of the undirected graph to the waiting list, set the loop count XH to 1, and select a first number of child nodes with smaller resource consumption from the child nodes directly connected to the root node as the candidate Xth child node of the base tree. The first number is the minimum value between the maximum load capacity of the root node and the first threshold.

[0047] Specifically, from the waiting list In the middle, select the root node. The directly connected child nodes are sorted in ascending order based on resource consumption, and the first one in the order is selected. Each child node and the Each child node is added to the base tree as the first child node of the root node, and these nodes are then removed from... Removed from the middle.

[0048] ,

[0049] In the formula, The first threshold is determined by the upper limit of the number of child nodes of the root node of the base tree. This represents the maximum load capacity of the root node.

[0050] Step S22: Select a second number of child nodes with lower resource consumption from the child nodes directly connected to the candidate Xth child node to form a candidate child node set for the candidate Xth child node. The second number is the minimum value between the maximum load capacity of the candidate Xth child node and the second threshold.

[0051] Specifically, for the selected There are X candidate child nodes, and for each node, select from the waiting list... The nodes that directly communicate with the candidate X-th child node (i.e., are connected by edges) are selected to form the candidate neighbor set of the candidate child node X. For candidate neighbor sets The nodes in the list are sorted by resource consumption from smallest to largest, and the second largest number is selected. The number of child nodes constitutes the candidate child node set of the candidate Xth child node.

[0052] ,

[0053] In the formula, The second threshold is determined by the maximum number of child nodes for each node. This represents the maximum load capacity of the candidate Xth child node.

[0054] In this step, if no node in the waiting list is directly connected to the candidate Xth child node, then a node can be randomly selected from the waiting list and connected to the parent node in the current base tree that is connectable and has the lowest resource consumption.

[0055] Step S23: Calculate the average resource consumption cost of each candidate child node set, take the child node of the candidate child node set with the minimum average resource consumption cost as the (X+1)th child node of the base tree, take the first candidate child node corresponding to the candidate child node set with the minimum average resource consumption cost as the Xth child node of the base tree, and delete the Xth child node and the (X+1)th child node from the waiting list.

[0056] Among them, average resource consumption cost for:

[0057] ,

[0058] In the formula, The number of nodes in the candidate child node set; This represents the communication resource consumption from node u to node v.

[0059] Step S24: Increment XH by 1, and repeat steps S22 to S23 until the waiting list is empty, thus obtaining the base tree. .

[0060] Using the method described above, in the first iteration, the first child node directly connected to the root node and the second child node directly connected to the first child node in the base tree are determined. In the second iteration, the third child node directly connected to the second child node in the base tree is determined, and so on.

[0061] Step S3: Optimization and adjustment of the base tree.

[0062] The goal of this stage is to optimize the base tree. Make adjustments to ensure it meets the maximum delay constraint. At the same time, it aims to minimize resource consumption. Specifically, this step includes steps S31 to S34.

[0063] Step S31: Calculate the path delay from the root node to all child nodes in the base tree. And filter out the longest path .

[0064] Among them, the path delay of the longest path for:

[0065] ,

[0066] In the formula, It is the set of all paths in the base tree.

[0067] Step S32: Compare the path delay of the longest path. Maximum end-to-end communication latency allowed for the current training epoch Size.

[0068] Step S34, in response to the path delay of the longest path Less than or equal to the maximum end-to-end communication latency allowed in the current training epoch At this point, the base tree can be determined as the final aggregate tree.

[0069] Step S34, in response to the path delay of the longest path Greater than the maximum end-to-end communication latency allowed in the current training round The base tree is optimized and adjusted to obtain the aggregate tree. At this time, the optimization and adjustment are based on the undirected graph and the principle that the maximum path delay of the replaced base tree is less than the path delay of the longest path. Specifically, this step includes steps S341 to S344.

[0070] Step S341: For the longest path Each edge in In an undirected graph, identify the replaceable edges of this edge. Among them, the replaceable edge The principle is that after the replacement, the base tree is connected, and the maximum path delay of the base tree after the replacement is less than the path delay of the longest path.

[0071] Step S342: In response to the fact that there is only one replaceable edge for this edge, replace this edge with the replaceable edge.

[0072] Step S343: In response to the fact that there are at least two replaceable edges for this edge, calculate the total resource consumption of the base tree after each replaceable edge is replaced, and select the replaceable edge with the minimum total resource consumption to replace this edge.

[0073] After the replacement, return to step S31 to recalculate the path delay of the longest path after the edge replacement, and repeat this process until the path delay of the longest path is reached. Less than or equal to the maximum end-to-end communication latency allowed in the current training epoch .

[0074] Step S344: In response to the fact that there is no replaceable edge, assign all leaf nodes of the last relay node on the longest path to the other leaf nodes of the base tree, resulting in multiple allocation schemes.

[0075] A relay node is the node between the root node and the last node on the path, and a leaf node is the last node in the path. When there are no replaceable edges, a subtree reassignment scheme is executed. This step shortens the depth of the longest path by redistributing the leaf nodes.

[0076] At this point, first calculate the path delay from the root node to all child nodes in the base tree of each allocation scheme; then compare the path delay of the longest path in each allocation scheme with the maximum end-to-end communication delay allowed in the current training round.

[0077] When the path delay of the longest path in at least one allocation scheme is less than or equal to the maximum end-to-end communication delay allowed in the current training round, the base tree corresponding to the allocation scheme with the minimum total resource consumption is determined as the aggregation tree.

[0078] When the path delay of the longest path in the no-allocation scheme is less than or equal to the maximum end-to-end communication delay allowed in the current training round, the base tree corresponding to the allocation scheme with the least increase in total resource consumption is determined as the aggregation tree. Return to step S31 to recalculate the path delay of the longest path after edge replacement, and repeat this process until the path delay of the longest path is reached. Less than or equal to the maximum end-to-end communication latency allowed in the current training epoch .

[0079] Step S4: Aggregate and upload the model parameters based on the determined aggregation tree.

[0080] Output the final optimized aggregation tree Edge server The final aggregate tree The message is distributed to all terminal devices within the cluster. In subsequent edge aggregation rounds, the devices follow... Define the parent-child relationship for collaborative training and parameter uploading.

[0081] Specifically, in the current edge aggregation training round, the terminal device, according to... The defined topology performs multi-hop aggregation and uploading of model parameters along parent-child links: leaf nodes only upload their own parameters; relay nodes need to aggregate the parameters of all their child nodes and their own parameters. Specifically, each relay node uses the following formula for local aggregation:

[0082] ,

[0083] in, Represents a node The set of child nodes and Representing child nodes respectively The model parameters and the amount of aggregated data, for leaf nodes, ; and Representative node Its own parameters and data volume. Parameters after aggregation. Then upload it to the parent node.

[0084] root node Finally, the parameters of all child nodes are aggregated to complete one round of edge aggregation. This process is repeated until all parameters are accumulated. After the model is aggregated, it is uploaded to the cloud server for global aggregation.

[0085] The above method is based on a two-stage construction framework. The first stage focuses on minimizing global resource consumption to quickly obtain a good starting point. The second stage, driven by latency constraints, performs fine-tuning through local structural adjustments, achieving an effective trade-off between resource consumption, path latency, and load balancing. This dynamic adjustment capability allows the generated topology to adapt to different device distribution densities while meeting [various requirements]. Under the premise of achieving better overall performance in resource load balancing than existing methods.

[0086] By using the above method, the maximum load capacity of each node in the base tree is determined when constructing the aggregation tree, enabling the algorithm to perceive and adapt to the heterogeneity of the devices, prevent low-capacity nodes from overloading, achieve true fine-grained load balancing, thereby eliminating the risk of bottlenecks, packet loss and node failure caused by overload, and significantly improving the stability of the training process.

[0087] Using the above method, which is based on an approximation algorithm with polynomial time complexity, this method can achieve polynomial time complexity... The calculation is completed within the time limit and has a theoretically provable approximation ratio to the upper bound. This ensures its feasibility and practical efficiency in large-scale edge networks. This represents the maximum resource consumption for communication between any two nodes. This represents the minimum resource consumption for communication between any two nodes.

[0088] By adopting the above method, the amount of relay tasks undertaken by the equipment can be dynamically adjusted according to the real-time capabilities of the equipment, thereby achieving a match between tasks and capabilities, giving full play to the potential of high-capacity equipment, and protecting low-capacity equipment at the same time.

[0089] Verification example:

[0090] This verification example utilizes a specific non-uniform edge computing simulation environment to conduct a detailed verification of the load-balanced hierarchical federated learning resource scheduling method of the present invention. Those skilled in the art can reproduce this experiment based on the following description to verify the effectiveness of the method.

[0091] 1. Experimental Environment and Parameter Settings

[0092] Network topology:

[0093] Within a 100m × 100m square area, one edge server and its managed N terminal devices are deployed. To simulate non-uniform distribution, four 20m × 20m hotspot areas are predefined. The device generation strategy is as follows: 70% of the devices are randomly and evenly distributed throughout the entire area, and 30% of the devices are concentrated in the four hotspot areas, thus creating a significant density imbalance. The number of terminal devices N is dynamically varied in this experiment, taking values ​​of {25, 50, 100, 150, 200} to verify the scalability of the algorithm.

[0094] Communication model parameters:

[0095] Unified bandwidth .

[0096] Noise power spectral density The noise power was calculated. .

[0097] Reference path loss .

[0098] Path loss index .

[0099] Equipment transmission power Randomly generated within the range [0.9, 1.1] to simulate device heterogeneity.

[0100] Model parameter size .

[0101] Equipment and load parameters:

[0102] Maximum load capacity of each terminal device A random integer is generated within the interval [2,5], representing the maximum number of child nodes that can be stably connected.

[0103] Maximum load capacity of edge servers Set it to 10.

[0104] Let m be the value of m, where m = 3.

[0105] Training task parameters:

[0106] The CIFAR10 image classification task was adopted, and the model of the terminal device was a 4-layer convolutional neural network.

[0107] The data is set to be non-independent and identically distributed: each terminal device is randomly assigned data from only 2 out of 10 categories.

[0108] Local training rounds Number of edge aggregation rounds Total number of training rounds

[0109] Learning rate Batch size .

[0110] Delay constraint: Set the maximum allowable communication delay Second.

[0111] Baseline method: To demonstrate the beneficial effects of the present invention, the following comparison scheme was set up:

[0112] Option A uses a star topology, where all terminal devices are directly connected to the edge server. This is the most basic hierarchical federated learning communication model.

[0113] Option B employs a tree that optimizes only resources; that is, it uses the first stage of the OMPAT algorithm of this invention to generate an aggregate tree, but does not perform the second stage of delay constraint optimization. This option is used to highlight the necessity of delay constraint optimization in comparison.

[0114] Option C employs a latency-optimized tree, specifically a fixed two-layer aggregated tree, with terminal devices acting as relay edge servers. It prioritizes allocating a full complement of child nodes to each relay node to minimize tree depth, ignoring link resource consumption. This option is used to highlight the necessity of resource optimization in comparison.

[0115] Scheme D employs a random load-balanced tree, which randomly generates an aggregated tree topology while satisfying the degree constraint for each node, ensuring that its maximum path delay meets the constraint. This scheme is used to highlight the value of the resource cost-based topology optimization of this invention.

[0116] 2. Experimental Procedure

[0117] Those skilled in the art can implement the method of this embodiment by following the steps below:

[0118] Step 1: Environment Initialization. In a simulation platform such as Python, generate a network topology based on the above parameters and calculate the distance between any two nodes. Based on the communication model formula, calculate all feasible links with a distance less than the communication radius. and Construct an undirected graph .

[0119] Step 2: Execute the OMPAT algorithm. This is for the currently participating training... Each terminal device node runs the algorithm.

[0120] 1. Base tree construction: with As the root, choose the one directly connected to it and smallest Each terminal device is treated as a child node. Then, iteratively execute: traverse all leaf nodes of the current tree, calculating the nearest connection between each leaf node and its nearest neighbor. Based on the average cost of nodes in the waiting list, select the leaf node with the lowest average cost for expansion, and continue this process until all terminal devices are added to the tree, thus obtaining the base tree. .

[0121] 2. Delay verification and optimization: calculation Longest path delay .like seconds, then Otherwise, proceed to the optimization loop: locate the longest path. Try replacing the edges on it (the new edges should reduce the maximum latency). If no feasible replacement edges are found, then... The child nodes of the end relay node perform a reallocation search to find a solution that satisfies the delay constraint and minimizes resource increment. This process is repeated until the delay constraint is satisfied or no solution is found.

[0122] Step 3: Federated Learning Training. Distribute to all devices. Proceed. Rounds of global training, each round containing Secondary edge aggregation. In each edge aggregation, the terminal device first performs... Local training in rotation, then along Bottom-up formula Aggregation parameters.

[0123] Step 4: Data Collection and Comparison. Record the total communication energy consumption of the system as a whole, the actual time taken to complete one round of edge aggregation (communication latency), the distribution of child nodes of all relay nodes in the aggregation tree (calculate the standard deviation to measure load balancing), and the test set accuracy of the model at the end of training for each round of training. Simultaneously run and record the above metrics for schemes A, B, C, and D.

[0124] 3. Working principle and verification of beneficial effects

[0125] This experimental example verifies the working principle of the invention and its claimed beneficial effects through specific data.

[0126] Working Principle: The core of the OMPAT algorithm lies in its two-stage decomposition optimization and load constraint embedding. The first stage, base tree construction, uses a local greedy strategy to quickly approximate the globally optimal solution in terms of resource consumption. Its principle is to select the path with the lowest "unit connection cost" in each expansion, while satisfying node degree constraints. The second stage, delay optimization, is a constraint-satisfying process. Its principle is to search within the neighborhood of the solution space through "edge replacement" and "subtree reallocation" operations for "critical paths" that violate constraints, aiming to reduce latency with minimal resource cost. Throughout this process, constraints... Strict enforcement ensures that no node exceeds its load capacity, which is the fundamental guarantee for achieving load balancing.

[0127] Validation of beneficial effects (taking N=100 as an example):

[0128] 1. Significantly reduces communication resource consumption while satisfying delay constraints: Experiments show that, At that time, the energy consumption of a single round of communication using the method of this invention was 0.404 (relative unit). Scheme A had an energy consumption of 0.447, and although Scheme B had the lowest energy consumption at 0.395, its actual latency was as high as 0.18 seconds, violating the 0.1-second constraint. Scheme C had an energy consumption of 0.438. Scheme D had an energy consumption of 0.411. The data shows that, under the premise of strictly satisfying the latency constraint, the resource consumption of this invention is lower than that of star topology, fixed low-latency tree, and random load-balanced tree, and is close to that of an ideal resource-optimized tree that does not meet the constraint, achieving the best trade-off between resources and latency.

[0129] 2. Achieving efficient node load balancing and improving system stability: Calculate the standard deviation of the actual number of child nodes for each relay node; the smaller the value, the more balanced the load. The load balancing index of the method in this invention is 0.508. In the star topology of Scheme A, all load is concentrated on the edge server, so this index is not applicable. Scheme B has a load balancing index of 0.492, but its network latency exceeds the limit and it is unusable. Due to forced flattening, Scheme C has some relay nodes reaching the maximum number of connections (5), while some nodes only have 12 connections, resulting in poor load balancing with an index of 2.400. Scheme D has a load balancing index of 0.492, comparable to this invention. The data shows that this invention achieves excellent load balancing performance comparable to random load balancing schemes while optimizing resources and latency, far superior to schemes that only optimize latency. This avoids some relay nodes becoming overloaded and bottlenecks, ensuring the integrity of parameter aggregation and system stability in each round of training.

[0130] 3. Improved Final Training Accuracy: After 20 rounds of global training, the global model trained using the method of this invention achieved a classification accuracy of 68.5% on the independent test set. Scheme A achieved 66.2%, Scheme B suffered from excessive communication latency, resulting in a severely delayed training progress and an accuracy of only 52.1%, Scheme C achieved 65.8%, and Scheme D achieved 67.9%. The data shows that this invention, by constructing a stable, efficient, and low-cost communication topology, ensures the timeliness and reliability of parameter aggregation during training, thereby achieving higher model convergence accuracy within the same number of global training rounds.

[0131] A second aspect of the present invention provides a federated learning resource scheduling device for non-uniform edge environments, namely an edge server, comprising a memory and a controller connected in sequence. The memory stores a computer program, and the controller is used to read the computer program and execute the federated learning resource scheduling method for non-uniform edge environments described in the first aspect.

[0132] A third aspect of the present invention provides a federated learning resource scheduling system for non-uniform edge environments, comprising:

[0133] The second aspect describes a federated learning resource scheduling device for a non-uniform edge environment.

[0134] At least two terminal devices are signal-connected to the federated learning resource scheduling device of the non-uniform edge environment.

[0135] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A federated learning resource scheduling method for non-uniform edge environments, characterized in that, The method includes the following steps: A base tree is determined based on an undirected graph and based on preset conditions for resource consumption. The undirected graph includes at least two nodes representing devices and edges representing the communication relationship between the two nodes. Each node includes a root node representing an edge server and at least one child node representing a terminal device. The attributes of the edges include communication latency and resource consumption. The base tree includes a root node and at least one child node in the undirected graph. The child node corresponding to each edge of the base tree is determined by the resource consumption from the parent node to the child node and the maximum load capacity of the parent node. Calculate the path delay from the root node to all child nodes in the base tree, filter out the longest path, and compare the path delay of the longest path with the maximum end-to-end communication delay allowed in the current training round. In response to the longest path's path delay being greater than the maximum end-to-end communication delay allowed in the current training round, the edges in the base tree are replaced or the subtrees are reassigned based on the undirected graph and the principle that the maximum path delay of the replaced base tree is less than the longest path's path delay to obtain an aggregate tree. The model parameters are aggregated and uploaded based on the aggregated tree.

2. The federated learning resource scheduling method for non-uniform edge environments according to claim 1, characterized in that: The step of determining the base tree based on the undirected graph and based on the resource consumption meeting preset conditions includes: Step S21: Add all nodes of the undirected graph to the waiting list, set the number of loops XH to 1, and select a first number of child nodes with smaller resource consumption from the child nodes directly connected to the root node as the candidate Xth child node of the base tree. The first number is the minimum value between the maximum load capacity of the root node and the first threshold. Step S22: Select a second number of child nodes with lower resource consumption from the child nodes directly connected to the candidate Xth child node to form a candidate child node set for the candidate Xth child node. The second number is the minimum value between the maximum load capacity of the candidate Xth child node and the second threshold. Step S23: Calculate the average resource consumption cost of each candidate child node set, take the child node of the candidate child node set with the minimum average resource consumption cost as the (X+1)th child node of the base tree, take the first candidate child node corresponding to the candidate child node set with the minimum average resource consumption cost as the Xth child node of the base tree, and delete the Xth child node and the (X+1)th child node from the waiting list. Step S24: Increment XH by 1, and repeat steps S22 to S23 until the waiting list is empty, thus obtaining the base tree.

3. The federated learning resource scheduling method for non-uniform edge environments according to claim 1, characterized in that: The step of determining the base tree based on the undirected graph and based on preset conditions satisfying resource consumption includes, prior to: Construct an undirected graph based on the communication relationships between edge servers and terminal devices. Calculate the reachable transmission rate between the two nodes corresponding to each edge in the undirected graph. ,in, , In the formula, , Let these be the two nodes corresponding to the edge. For bandwidth, For channel gain, For transmission power, Noise power; Based on the achievable transmission rate The communication delay is determined by the size of the model parameters that need to be transmitted. and resource consumption ,in, , , In the formula, The size of the model parameters to be transmitted; The communication delay and resource consumption Add attributes to the edges in the undirected graph.

4. The federated learning resource scheduling method for non-uniform edge environments according to claim 1, characterized in that: The process of replacing edges in the base tree or reassigning subtrees based on an undirected graph and on the path delay of the replaced path being less than that of the longest path to obtain an aggregate tree includes: For each edge in the longest path, a replaceable edge is determined in the undirected graph. The principle for determining the replaceable edge is that the maximum path delay of the base tree after replacement is less than the path delay of the longest path. If there are at least two replaceable edges for this edge, calculate the total resource consumption of the base tree after each replaceable edge, and select the replaceable edge with the minimum total resource consumption to replace this edge. Calculate the path delay from the root node to all child nodes of the base tree after edge replacement, until the path delay of the longest path is less than or equal to the maximum end-to-end communication delay allowed in the current training round.

5. The federated learning resource scheduling method for non-uniform edge environments according to claim 4, characterized in that: After determining the replaceable edges in the undirected graph, the process further includes: If there is only one replaceable edge for a given edge, then that replaceable edge is used to replace the given edge.

6. The federated learning resource scheduling method for non-uniform edge environments according to claim 4, characterized in that: After determining the replaceable edges in the undirected graph, the process further includes: In response to the fact that there is no replaceable edge, at least two leaf nodes of the last relay node on the longest path are assigned to the other leaf nodes of the base tree, resulting in multiple assignment schemes; Calculate the path delay from the root node to all child nodes in the base tree for each allocation scheme; In response to the fact that the path delay of the longest path in at least one allocation scheme is less than or equal to the maximum end-to-end communication delay allowed in the current training round, the base tree corresponding to the allocation scheme with the minimum total resource consumption is determined as the aggregation tree.

7. The federated learning resource scheduling method for non-uniform edge environments according to claim 6, characterized in that: The calculation of the path delay from the root node to all child nodes in the allocated base tree is followed by: In response to the fact that the path delay of the longest path in the no allocation scheme is less than or equal to the maximum end-to-end communication delay allowed in the current training round, the base tree corresponding to the allocation scheme with the least increase in total resource consumption is determined as the aggregation tree.

8. A federated learning resource scheduling device for a non-uniform edge environment, comprising a memory and a controller connected in sequence, wherein the memory stores a computer program, characterized in that: The controller is used to read the computer program and execute the federated learning resource scheduling method for non-uniform edge environments as described in any one of claims 1-7.

9. A federated learning resource scheduling system for non-uniform edge environments, characterized in that, include: A federated learning resource scheduling device for a non-uniform edge environment as described in claim 8; At least two terminal devices are signal-connected to the federated learning resource scheduling device of the non-uniform edge environment.