Multi-scale adaptive federated aggregation method and system, device identification method and system

CN123012976APending Publication Date: 2026-10-30QINGDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611158317.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]为了解决或至少缓解以上问题中的一个或多个,提供了一种多尺度自适应联邦聚合方法及系统、设备识别方法及系统,可以解决传统联邦聚合中高权重客户端过度支配、低权重客户端互补信息利用不足以及全局模型稳定性差的问题,并在原始流量保持本地的条件下形成可统一部署的全局设备识别模型

Benefits of technology

本发明中,联合利用当前训练准确率、当前训练损失和近期历史训练准确率生成客户端评分,相比等权、样本数量权重或单一性能权重,能够更全面地反映本轮客户端模型质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012976A_ABST
    Figure CN123012976A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of federated learning and Internet of Things security, and discloses a multi-scale adaptive federated aggregation method and system, and a device identification method and system. A central server calculates initial relative weights according to local model parameters and training performance indicators of each client, obtains a performance-aware weighted aggregation model through hierarchical adjustment, compensates and aggregates low-weight client models to obtain a compensation aggregation model, fuses the two types of aggregation models according to the proportion of low-weight clients to obtain a global model. The global model is verified and monitored, and partial parameter incremental updating is performed when the conditions are met, and the best global model is saved. After training, the network traffic of the Internet of Things device to be identified is input into the best global model after preprocessing under the condition that the original traffic is retained locally, and a device category prediction result is obtained. The present application can alleviate the problems of excessive domination of high-weight clients, insufficient use of information of low-weight clients, and unstable training of global models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of federated learning, Internet of Things security, and network traffic analysis, and particularly to a multi-scale adaptive federated aggregation method and system, and a device identification method and system. Background Technology

[0002] IoT device type identification generates device fingerprints by analyzing stable behavioral patterns in device communication traffic, providing foundational capabilities for device access control, asset management, network forensics, and anomaly detection. Centralized identification methods typically aggregate raw traffic collected from multiple management domains to a unified server for training. While this leverages global data, it increases the risks of transmission, storage, and leakage of raw communication content and network identifiers. Federated learning allows clients to retain raw data, exchanging only model parameters or updates, making it suitable for collaborative device identification across management domains such as homes, enterprises, factories, and data centers.

[0003] Existing federated IoT device identification methods often employ federated averaging, sample-size weighting, or single-performance weighting to form a global model. These methods rely on a single aggregation criterion and typically fail to simultaneously reflect the client's current training quality, loss state, and recent historical performance. Furthermore, when client data distributions vary significantly, the aggregation results tend to favor a few local models. While local normalization, weighted loss, proximal regularization, or personalized models can improve training performance, these primarily focus on local optimization or client personalization, failing to adequately address the challenge of achieving a balance between server-side performance awareness, suppressing over-domination, and preserving low-weight client information.

[0004] Therefore, the existing technology still has the following problems: (1) Existing aggregation methods usually use equal weight, sample number weight or a single performance index, and cannot jointly utilize the client's current training accuracy, current training loss and recent historical performance to dynamically evaluate the client's contribution; (2) In single-stage weighted aggregation, high-weight clients may over-dominate the global model; if high-weight clients are simply suppressed, the aggregation may lose its performance perception capability. Existing technologies lack a mechanism to differentiate the processing of different weight states based on the weight distribution of this round. (3) Low-weight clients may contain rare device categories or local distribution information that is complementary to other clients, but their model contribution in a single weighted aggregation is easily weakened; existing technologies lack independent compensation aggregation for low-weight clients and an adaptive fusion mechanism with the main aggregation result. (4) Most methods lack continuous validation of the global model in each round, preservation of the optimal global model, and stagnation detection. When the aggregation result no longer improves over a long period of time, iterating in a fixed manner can easily lead to training oscillations or local stagnation. (5) Class imbalance and local model drift within the client will further reduce the quality of the uploaded model; if specific traffic representation, specific local network structure and all training strategies are solidified as necessary conditions, the applicability of the server-side aggregation method in different federated tasks will be limited. It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] To address or at least mitigate one or more of the above problems, a multi-scale adaptive federated aggregation method and system, and a device identification method and system are provided. These methods and systems can solve the problems of excessive dominance by high-weight clients, insufficient utilization of complementary information by low-weight clients, and poor stability of the global model in traditional federated aggregation. Furthermore, they can form a globally deployable device identification model while keeping the original traffic local.

[0006] To achieve the above objectives, according to a first aspect of the present invention, a multi-scale adaptive federated aggregation method is provided, characterized by comprising the following steps: S1. Federated Training Input Preparation: The central server obtains the current global model and sends it to multiple clients participating in this round of federated training. Each client uses its local training data to perform local model training, obtains local model parameters and multiple local training performance metrics, and uploads them to the central server. S2, Three-stage multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. S3. Verification Monitoring and Incremental Updates: Perform validation monitoring on the current global model, and perform incremental updates on some parameters of the current global model when the preset incremental update trigger conditions are met, to obtain the updated global model, while saving the global model with the best validation performance during training. S4. Global model deployment and iteration termination: The updated global model is sent to each client as the current global model for the next communication round. Each client repeats the local model training, and the central server repeats the three-stage multi-scale adaptive aggregation, verification monitoring and incremental update until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

[0007] Furthermore, each client uses its own local training data to perform local model training, obtaining local model parameters and multiple local training performance metrics, including: No. In round-robin communication, the client receives the current global model parameters sent by the central server and uses them as the initial parameters of the local model. It then performs a preset number of local training rounds using the local training data. After training, the client obtains the local model parameters and multiple local training performance metrics, including the current local training accuracy and the current local training loss, and updates the local training accuracy history.

[0008] Furthermore, the central server performs multi-performance indicator client scoring on each client, calculating the initial relative weights, including: The central server maintains the local training accuracy history for each client and calculates the average training accuracy of each client over the most recent communication rounds. The central server constructs the performance vector of each client using the current local training accuracy, the reciprocal of the current local training loss, and the average training accuracy. It then forms a decision matrix from the performance vectors of all clients, performs normalization, and calculates the relative proximity of each client using the approximation of the ideal solution sorting method. It performs interval pruning on the relative proximity to obtain the pruning score of each client, and calculates the initial relative weight of each client using the median of the pruning scores of all clients as a reference.

[0009] Furthermore, the first stage uses the initial relative weights of each client to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model; the second stage uses the initial relative weights to filter the set of low-weight clients and performs compensatory aggregation to form a low-weight client compensatory aggregation model; the third stage merges the performance-aware weighted aggregation model and the low-weight client compensatory aggregation model according to the proportion of low-weight clients to obtain the global model for this round, including: The central server calculates the mean and standard deviation of the initial relative weights for this round, and calculates the standardized deviation of each client. Based on the relationship between the standardized deviation and the preset deviation threshold, the initial relative weights of each client are adjusted in a hierarchical manner to obtain the calibration weights of each client. The calibration weights of each client are normalized to obtain the first-stage aggregate weights, and the first-stage performance-aware weighted aggregate model is calculated through weighting operations. The set of low-weight clients is selected by initial relative weight of each client. When the set of low-weight clients is not empty, the local models in the set of low-weight clients are aggregated with equal weight to obtain the low-weight client compensation aggregation model. Calculate the proportion of low-weight clients out of the total number of participating clients. , the proportion As the fusion coefficient of the low-weight client compensation aggregation model, As the fusion coefficient of the performance-aware weighted aggregation model, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are weighted and fused to obtain the global model for this round. When the low-weight client set is empty, the global model in this round is directly set to equal the performance-aware weighted aggregation model.

[0010] Furthermore, validation monitoring is performed on the global model in this round, and incremental updates are performed on some parameters of the global model in this round when the preset incremental update trigger conditions are met, to obtain the updated global model. At the same time, the global model with the best validation performance during training is saved, including: Initialize before the first validation monitoring: initialize the historical best validation accuracy to negative infinity, initialize the best global model to a copy of the global model in round 0, and initialize the incremental update counter to 0; After each round of aggregation, the current validation accuracy of the current global model is calculated using preset validation data; If the current validation accuracy is greater than the historical best validation accuracy, then update the best validation accuracy to the current validation accuracy, save the copy of the current global model as the best global model, and set the incremental update counter to zero. If the current validation accuracy is not greater than the historical best validation accuracy, then check if the incremental update counter is greater than or equal to 1; if the incremental update counter is greater than or equal to 1, randomly select a proportion from the parameter key set of the current global model. The parameter key is used to replace the model parameter of the corresponding parameter key in the current global model with the average value of the model parameters of all participating clients; then, if the incremental update counter is less than the preset upper limit, the incremental update counter is incremented by 1, otherwise the incremental update counter is reset to 0.

[0011] To achieve the above objectives, according to a second aspect of the present invention, a multi-scale adaptive federated aggregation system is provided, comprising: The federated training input preparation module is used for federated training input preparation: the central server obtains the current global model and sends it to multiple clients participating in this round of federated training; each client uses its own local training data to perform local model training, obtains local model parameters and multiple local training performance metrics, and uploads them to the central server; The three-stage multi-scale adaptive aggregation module is used for multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. The verification monitoring and incremental update module is used for verification monitoring and incremental update: it performs verification monitoring on the global model in this round, and performs incremental update on some parameters of the global model in this round when the preset incremental update trigger conditions are met, so as to obtain the updated global model, and saves the global model with the best verification performance during the training process. The global model distribution and iteration termination module sends the updated global model as the current global model for the next communication round to each client. Each client repeatedly executes local model training, and the central server repeatedly executes the three-stage multi-scale adaptive aggregation, verification monitoring, and incremental updates until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

[0012] To achieve the above objectives, according to a third aspect of the present invention, a device identification method is provided, which applies the multi-scale adaptive federated aggregation method as described above, and includes the following steps: Training phase: The raw network traffic generated by multiple known categories of IoT devices is acquired and preprocessed to obtain a traffic grayscale image. The traffic grayscale image is then used as local training data for federated training through a multi-scale adaptive federated aggregation method to obtain the optimal global model. Reasoning stage: The network traffic generated by the IoT device to be identified is acquired, and the network traffic is preprocessed in the same way as in the training phase to obtain a grayscale image of the traffic to be identified. The grayscale image of the traffic to be identified is then input into the optimal global model, and the device category prediction result is output.

[0013] To achieve the above objectives, according to a fourth aspect of the present invention, a device identification system is provided, comprising the multi-scale adaptive federated aggregation system as described above, and further comprising: The local traffic preprocessing module is used to collect raw network traffic generated by multiple known categories of IoT devices, perform traffic preprocessing to obtain a traffic grayscale image, and provide the traffic grayscale image as local training data to the multi-scale adaptive federated aggregation system for federated training to obtain the best global model. The model inference module is used to acquire the network traffic generated by the IoT device to be identified, perform the same traffic preprocessing as in the training phase on the network traffic to obtain a grayscale image of the traffic to be identified, input the grayscale image of the traffic to be identified into the optimal global model, and output the device category prediction result.

[0014] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: In this invention, the current training accuracy, current training loss and recent historical training accuracy are used together to generate a client score, which can more comprehensively reflect the quality of the client model in this round compared with equal weight, sample size weight or single performance weight.

[0015] In this invention, MSAA identifies high-weight, intermediate-weight, and low-weight states based on the standardized deviation of the initial relative weights, and applies dominance penalty, maintenance, and nonlinear calibration respectively. Removing this mechanism reduces the accuracy from 94.35% to 74.11%, indicating that stratified adjustment is a crucial source of the core technology's effectiveness.

[0016] In this invention, clients below the threshold not only participate in the first-stage performance-aware aggregation, but also form an independent low-weight client compensation aggregation model, so that rare device categories and local distribution characteristics are not completely weakened due to their low initial weight.

[0017] In this invention, the fusion coefficient of the low-weight client compensation aggregation model is determined by the proportion of low-weight clients to all clients, requiring no additional learning parameters; when the threshold... When the values ​​are between 0.3 and 0.7, the accuracy remains above 94%, indicating that the fusion mechanism has good parameter stability.

[0018] In this invention, the optimal global model is saved using the validation accuracy in each round, and client-side mean replacement is performed only on a subset of parameters when performance stagnates. Removing this module resulted in an accuracy drop to 90.67% and increased training volatility.

[0019] In this invention, using only 20% of the training data, the invention achieves 94.35% and 87.72% accuracy on the UNSW and Aalto datasets, respectively, in a scenario with severe label distribution skewness. On the Aalto dataset, it improves upon DA-PFL by 14.33 percentage points.

[0020] In this invention, with a fixed total data volume and an increase in the number of clients to 30, the invention still achieves an accuracy rate of 84.62%; the overall time complexity on the MSAA server side is... It is at the same asymptotic level as the regular federal average.

[0021] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0022] The accompanying drawings, as part of this invention, are provided to further illustrate the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation thereof. Clearly, the drawings described below are merely some embodiments; those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0023] In the attached diagram: Figure 1 This is a flowchart illustrating the multi-scale adaptive federated aggregation method in this specific embodiment; Figure 2 This is a schematic diagram of the structure of the multi-scale adaptive federated aggregation system in this specific embodiment; Figure 3 This is a flowchart illustrating the device identification and reasoning stage in this specific embodiment; Figure 4 This is a schematic diagram of the feature extraction and device identification process in this specific embodiment; Figure 5 This is a schematic diagram of the device identification system in this specific embodiment; Figure 6 The image shows a comparison of training performance in the federated independent identically distributed scenario in this specific implementation, where (a) is the UNSW dataset and (b) is the Aalto dataset. Figure 7 The image shows a comparison of training performance in a non-independent, identically distributed, skewed scenario in this specific implementation, where (a) is the UNSW dataset and (b) is the Aalto dataset. Figure 8 The image shows a comparison of training performance in a scenario with severe label distribution skew in this specific implementation, where (a) is the UNSW dataset and (b) is the Aalto dataset. Figure 9 This is a graph showing the training accuracy changes of the complete scheme of the present invention and different ablation variants in a scenario with severe label distribution skewness in this specific embodiment; Figure 10 This is a graph showing the change in recognition accuracy under different numbers of clients in this specific implementation. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0025] In the following description, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] Example 1: Please see Figure 1 This invention provides a multi-scale adaptive federated aggregation method, comprising the following steps: S1. Federated Training Input Preparation: The central server obtains the current global model and sends it to multiple clients participating in this round of federated training. Each participating client uses its local training data to perform local model training, obtains local model parameters and multiple local training performance metrics, and uploads them to the central server. S2, Three-stage multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. S3. Verification Monitoring and Incremental Updates: Perform validation monitoring on the current global model, and perform incremental updates on some parameters of the current global model when the preset incremental update trigger conditions are met, to obtain the updated global model, while saving the global model with the best validation performance during training. S4. Global model deployment and iteration termination: The updated global model is sent to each client as the current global model for the next communication round. Each client repeats the local model training, and the central server repeats the three-stage multi-scale adaptive aggregation, verification monitoring and incremental update until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

[0028] Specifically, the set of local clients participating in federated training is denoted as... The number of participating clients is recorded as The central server initializes the global model parameters for round 0, and in the round... In each communication round, the current global model parameters are sent to each client. The participating entities execute according to the predetermined training and aggregation protocol, without considering the situation where the client deliberately falsifies model parameters.

[0029] In practical applications, each client uses its own local training data to perform local model training, obtaining local model parameters and multiple local training performance metrics, including: No. In round-robin communication, the client receives the current global model parameters sent by the central server and uses them as the initial parameters of the local model. It then performs a preset number of local training rounds using the local training data. After training, the client obtains the local model parameters and multiple local training performance metrics, including the current local training accuracy and the current local training loss, and updates the local training accuracy history.

[0030] For example, the first In round-robin communication, each client receives the current global model parameters sent by the central server. The local training data is used as the initial parameters of the local model. A preset number of local training rounds are performed using the local training data. To simultaneously alleviate class imbalance within the client and client drift, the local training objective is expressed as: (1); (2); in, Indicates the local training objective; This indicates a method used to mitigate focus loss due to class imbalance within the client. Indicates the proximal canonical strength; This indicates the parameters of the local model that are being optimized. Indicates the first Each communication round receives the current global model parameters sent by the central server; This indicates the number of samples the client participated in during this training round. Indicates the local sample index. Indicates the first The true class index of each sample This indicates that the local model will be the first The probability that a sample is predicted to be its true class. This represents the category balance factor corresponding to the true category. This represents an adjustment factor that reduces the weight of easily classified samples.

[0031] After training is complete, the client Obtain local model parameters Current local training accuracy and current local training loss Update local training accuracy history. .

[0032] Three-stage multi-scale adaptive aggregation: Please continue reading Figure 1 In other embodiments, the central server performs multi-performance index client scoring on each client to calculate the initial relative weight, including: The central server maintains the local training accuracy history for each client and calculates the average training accuracy of each client over the most recent communication rounds. The central server constructs the performance vector of each client using the current local training accuracy, the reciprocal of the current local training loss, and the average training accuracy. It then forms a decision matrix from the performance vectors of all clients, performs normalization, and calculates the relative proximity of each client using the approximation of the ideal solution sorting method. It performs interval pruning on the relative proximity to obtain the pruning score of each client, and calculates the initial relative weight of each client using the median of the pruning scores of all clients as a reference.

[0033] Specifically, in the first phase, adaptive weighted aggregation forms a performance-aware aggregation model from all clients. The second phase starts with a low-weight client set. Forming a low-weight client compensation aggregation model The third stage integrates the aforementioned performance-aware aggregation model based on the proportion of low-weight clients. Low-weight client compensation aggregation model To obtain the global model .

[0034] Specifically, the central server is the client. Maintain the local training accuracy history and calculate the average training accuracy over the last 5 communication rounds. .

[0035] Specifically, the central server uses the current local training accuracy. The reciprocal of the current local training loss and average training accuracy Components of the client The performance vectors of all clients are used to form a decision matrix. For the decision matrix Maximum value normalization is performed, and the relative proximity of the client is calculated using a sorting method that approximates the ideal solution. .

[0036] Specifically, to avoid relative proximity Numerical instability caused by being too close to 0 or 1 affects the relative closeness. Perform range clipping and obtain the clipping score from the client, represented as: ; in, Represents the clipping constant. (.) indicates a range clipping operation. This indicates the client's cropping score; when season ;when season In other cases, let ; Then, using the median of all client cropping scores as a reference, the initial relative weight of each client is calculated, expressed as: (3); in, Indicates client The initial relative weights, , or At that time, respectively, they represent the client. The cropping score is lower than, equal to or higher than the median cropping score of the participating clients in this round.

[0037] Please continue reading Figure 1In some embodiments, the first stage uses the initial relative weights of each client to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model; the second stage uses the initial relative weights to filter the set of low-weight clients and performs compensation aggregation to form a low-weight client compensation aggregation model; the third stage merges the performance-aware weighted aggregation model and the low-weight client compensation aggregation model according to the proportion of low-weight clients to obtain the global model for this round, including: The central server calculates the mean and standard deviation of the initial relative weights for this round, and calculates the standardized deviation of each client. Based on the relationship between the standardized deviation and the preset deviation threshold, the initial relative weights of each client are adjusted in a hierarchical manner to obtain the calibration weights of each client. The calibration weights of each client are normalized to obtain the first-stage aggregate weights, and the first-stage performance-aware weighted aggregate model is calculated through weighting operations. The set of low-weight clients is selected by initial relative weight of each client. When the set of low-weight clients is not empty, the local models in the set of low-weight clients are aggregated with equal weight to obtain the low-weight client compensation aggregation model. Calculate the proportion of low-weight clients out of the total number of participating clients. , the proportion As the fusion coefficient of the low-weight client compensation aggregation model, As the fusion coefficient of the performance-aware weighted aggregation model, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are weighted and fused to obtain the global model for this round. When the low-weight client set is empty, the global model in this round is directly set to equal the performance-aware weighted aggregation model.

[0038] Hierarchical adaptive adjustment based on weight distribution: The central server calculates the mean of the initial relative weights for this round. and standard deviation and calculate the client Standardization bias , is represented as: (4); in, Indicates client Standardization bias, This represents the initial relative weight vector; Based on standardized deviation Deviation threshold from preset The relationship is used to perform a hierarchical adjustment of the initial relative weights of the clients: when When the client is in a high-weight state, a dominance penalty is used to suppress the excessive influence of the high-weight client; when At this time, the client is in an intermediate weight state, maintaining its initial relative weight; when At this time, the client is in a low-weight state. An S-shaped nonlinear function is used to recalibrate the low-weight client, expressed as: (5); in, Indicates client Calibration weights before normalization This represents the dominance penalty coefficient for high-weight clients. and These represent the slope factor and translation parameter of the S-shaped nonlinear calibration, respectively. The calibration weights are normalized to obtain the first-stage aggregate weights. The first-stage performance-aware weighted aggregation model is calculated through weighted operations and is expressed as follows: (6); (7); in, Indicates client Calibration weights before normalization This represents a performance-aware weighted aggregation model obtained by all clients according to the aggregation weights in the first phase. Indicates client Uploaded local model parameters.

[0039] Low-weight client compensation aggregation: The set of clients with low weights is selected based on the initial relative weights, as follows: (8); in, This represents the set of clients participating in this round of federated aggregation. This represents a set of low-weight clients. This represents the threshold for low-weight clients to select, and satisfies... ; because Based on the median of the client cropping scores in this round, the low-weight client selection threshold only selects clients whose initial relative weight is lower than the median cropping score reference level; When the low-weight client set is not empty, i.e. At that time, equal-weighted secondary aggregation is performed on the local models in the low-weight client set to obtain the low-weight client compensation aggregation model, which is represented as: (9); in, This represents a set of low-weight clients. This indicates the number of low-weight clients. Indicates client Uploaded local model parameters, This represents the low-weight client compensation aggregation model obtained by equal-weight secondary aggregation of the low-weight client local model.

[0040] The ratio of performance-aware weighted aggregation model to low-weight client-compensated aggregation model is fused: After obtaining the performance-aware aggregation model and the low-weight client compensation aggregation model for the first stage, calculate the proportion of low-weight clients to the total number of participating clients: (10); in, This indicates the total number of clients participating in this round of federated aggregation; and proportion As the fusion coefficient of the low-weight client compensation aggregation model, As the fusion coefficient of the performance-aware weighted aggregation model, the low-weight client compensation aggregation model and the performance-aware weighted aggregation model are proportionally fused to obtain the global model for this round, which is expressed as: (11); in, This represents the global model obtained from the three-stage multi-scale adaptive aggregation in this round, which will be used for model distribution and local training in the next communication round.

[0041] Specifically, formula (11) integrates a low-weight client compensation aggregation model while retaining all client performance-aware aggregation models; wherein, the fusion coefficient is adaptively determined according to the proportion of the number of low-weight clients to the total number of participating clients, without the need for additional training of learnable parameters.

[0042] In some embodiments, validation monitoring is performed on the current global model, and incremental updates are performed on some parameters of the current global model when a preset incremental update trigger condition is met, resulting in an updated global model. Simultaneously, the global model with the best validation performance during training is saved, including: Initialize before the first validation monitoring: initialize the historical best validation accuracy to negative infinity, initialize the best global model to a copy of the global model in round 0, and initialize the incremental update counter to 0; After each round of aggregation, the current validation accuracy of the current global model is calculated using preset validation data; If the current validation accuracy is greater than the historical best validation accuracy, then update the best validation accuracy to the current validation accuracy, save the copy of the current global model as the best global model, and set the incremental update counter to zero. If the current validation accuracy is not greater than the historical best validation accuracy, then check if the incremental update counter is greater than or equal to 1; if the incremental update counter is greater than or equal to 1, randomly select a proportion from the parameter key set of the current global model. The parameter key is used to replace the model parameter of the corresponding parameter key in the current global model with the average value of the model parameters of all participating clients; then, if the incremental update counter is less than the preset upper limit, the incremental update counter is incremented by 1, otherwise the incremental update counter is reset to 0.

[0043] Verification monitoring and incremental updates: Specifically, before the initial verification monitoring and incremental update, the historical best verification accuracy will be used. Initialize to negative infinity, and use the optimal global model. Initialize as a copy of the global model from round 0, and incrementally update the counter. Initialize to 0.

[0044] Verification data can be deployed in an independent, non-sensitive verification environment on a central server, or each client can verify the data separately and only upload the verification metrics.

[0045] If the accuracy rate is verified Greater than the historical best verification accuracy This will result in the best verification accuracy. Update to the current validation accuracy, and save the current copy of the global model as the best global model. And update the counter incrementally. Set to zero; otherwise, update the counter based on the increment. Determine whether the incremental update counter is greater than or equal to 1.

[0046] Retrieve all parameter keys of the current global model to form a parameter key set. This is used when incrementally updating the counter. At that time, a proportion is randomly selected from the parameter key set of the current global model. The parameter key; for each selected parameter key Replace the parameter value of the corresponding parameter key in the current global model with the average value of the corresponding parameters of all participating clients. replace ; After completing the above judgment, set the upper limit of the incremental update counter to M. If the incremental update counter... Less than the upper limit M of the incremental update counter, i.e. Incrementally update the counter Increase by 1 Otherwise, the counter will be updated incrementally. Reset to 0 .

[0047] Preferably, , The verification monitoring and incremental update operations only update a portion of the parameters and do not re-average all global parameters. After this round of updates is completed, the final output is the global model for this round. Optimal global model Historical best verification accuracy and incremental update counter .

[0048] MSAA algorithm pseudocode: To further clarify the data dependencies between the processing steps, a preferred algorithm flow for multi-scale adaptive aggregation, verification monitoring, and incremental updates is presented below. This is for illustrative purposes only and does not limit the specific programming language, function name, data structure, or execution environment; each mathematical operation corresponds to the aforementioned formulas (3) to (11).

[0049] Algorithm 1: Core Process of Multi-Scale Adaptive Aggregation

[0050] Input: Collection of participating clients Client-side model Historical accuracy Current local training accuracy Current local training loss and parameter clipping constant function slope factor S-shaped nonlinear function translation parameters Deviation threshold , Threshold selection for low-weight clients .

[0051] Output: The global model obtained from this round of three-stage multi-scale adaptive aggregation. .

[0052]

[0053] Algorithm 2: Verification Monitoring and Incremental Update Process

[0054] Input: Current global model Client-side model Current verification accuracy Historical best verification accuracy Incremental update counter Parameter update ratio and the upper limit of the incremental update counter .

[0055] Output: Updated global model Optimal global model Historical best verification accuracy and incremental update counter .

[0056]

[0057] Global model distribution and iteration termination: The central server distributes the current global model to each client, and each client continues to perform local model training. The central server continues to perform three-stage multi-scale adaptive aggregation, validation monitoring, and incremental updates. When new traffic samples are added locally or the local dataset changes, the local traffic collection and preprocessing operations are re-executed until the preset number of communication rounds is reached, the validation performance meets the requirements, or the validation performance stabilizes within a preset range. Preferably, the maximum number of communication rounds is 60 rounds, and each client executes 5 local training cycles per round. After training, the best historical global model is output, rather than simply outputting the model from the last round.

[0058] Example 2: Please see Figure 2 Based on the same inventive concept, the present invention also provides a multi-scale adaptive federated aggregation system, comprising: The federated training input preparation module is used for federated training input preparation: the central server obtains the current global model and sends it to multiple clients participating in this round of federated training; each client uses its own local training data to perform local model training, obtains local model parameters and multiple local training performance metrics, and uploads them to the central server; The three-stage multi-scale adaptive aggregation module is used for multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. The verification monitoring and incremental update module is used for verification monitoring and incremental update: it performs verification monitoring on the global model in this round, and performs incremental update on some parameters of the global model in this round when the preset incremental update trigger conditions are met, so as to obtain the updated global model, and saves the global model with the best verification performance during the training process. The global model distribution and iteration termination module sends the updated global model as the current global model for the next communication round to each client. Each client repeatedly executes local model training, and the central server repeatedly executes the three-stage multi-scale adaptive aggregation, verification monitoring, and incremental updates until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

[0059] Example 3: Please see Figure 3 and Figure 4 Based on the same inventive concept, the present invention also provides a device identification method, which applies the multi-scale adaptive federated aggregation method as described above, and includes the following steps: Training phase: The raw network traffic generated by multiple known categories of IoT devices is acquired and preprocessed to obtain a traffic grayscale image. The traffic grayscale image is then used as local training data for federated training through a multi-scale adaptive federated aggregation method to obtain the optimal global model. Reasoning stage: The network traffic generated by the IoT device to be identified is acquired, and the network traffic is preprocessed in the same way as in the training phase to obtain a grayscale image of the traffic to be identified. The grayscale image of the traffic to be identified is then input into the best global model, and the device category prediction result is output.

[0060] Specifically, preprocessing operations are performed on the raw network traffic to obtain a traffic grayscale image, including: Flow segmentation: The source Internet Protocol address, destination Internet Protocol address, source port, destination port, and transport protocol in the collected raw network traffic are formed into a 5-tuple, and the local traffic is segmented into network flows according to the 5-tuple; Identification field processing: Replace fields in the network flow that can directly identify the device or network location with preset values; Fixed-length processing: A preset length of bytes is retained from the network stream after processing the segmentation and identification fields of each stream; if the network stream length is greater than the preset length, it is truncated; if the network stream length is less than the preset length, it is padded to the preset length using a preset value. Grayscale representation generation: Map each byte's value to a grayscale pixel, and arrange all pixels into a single-channel grayscale representation to obtain the flow grayscale map.

[0061] For example, the identification field is processed by replacing fields in the network stream that directly identify the device or network location, such as the Media Access Control address and Internet Protocol address, with a preset value of 0x00 to reduce the risk of the model directly memorizing explicit identification information. Fixed-length processing: 784 bytes are retained from each stream segmentation and identification field processing in the network stream; if the network stream length is greater than 784 bytes, it is truncated; if the network stream length is less than 784 bytes, it is padded with the preset value 0x00. Grayscale representation generation: The value of each byte is mapped to a grayscale pixel, and... The pixels are arranged as follows The single-channel grayscale representation is used to obtain a grayscale image, which is then used as input to the local model.

[0062] Specifically, each local client corresponds to an independent IoT management domain, which is used to collect and process network traffic generated by IoT devices connected within the IoT management domain; the collected network traffic is kept on the local client and is not uploaded to the central server.

[0063] Please see Figure 3 The model employs a lightweight three-convolutional block network, with the input being... Single-channel flow grayscale image, extracting discriminative device features: the first convolutional block uses Convolutional kernels and 32 output channels, followed by batch normalization and... Max pooling output 32 Feature map; the second convolutional block uses Convolutional kernels and 64 output channels, followed by batch normalization and... Max pooling output Feature map; the third convolutional block uses Convolutional kernels and 128 output channels, followed by batch normalization and... Max pooling, output Feature map. Output of the third convolutional block. After the feature map is flattened into a 1152-dimensional vector, device identification is performed: it passes through a 256-dimensional fully connected layer, ReLU activation, a random deactivation layer with a dropout rate of 0.5, a 128-dimensional fully connected layer, ReLU activation, and a fully connected layer with an output dimension G equal to the number of device categories. Finally, the category prediction probability vector is obtained through normalized exponential mapping.

[0064] Model parameters were initialized using the Kaiming method, and the local optimizer employed an adaptive moment estimation optimizer with decoupled weight decay. Optimal settings included: 5 epochs of local training per round, a maximum of 60 communication rounds, an initial learning rate of 0.0001, a batch size of 128, and a proximal regularization strength of [value missing]. Clipping constant Deviation threshold Domination penalty coefficient Slope factor of sigmoid function Translation parameters Low-weight clients select threshold Incremental update ratio upper limit of the counter The above parameters can be adjusted according to the data scale and deployment environment.

[0065] Example 4: Please see Figure 5 Based on the same inventive concept, the present invention also provides a device identification system, including a multi-scale adaptive federated aggregation system as described above, and further including: The local traffic preprocessing module is used to collect raw network traffic generated by multiple known categories of IoT devices, perform traffic preprocessing to obtain a traffic grayscale image, and provide the traffic grayscale image as local training data to the multi-scale adaptive federated aggregation system for federated training to obtain the best global model. The model inference module is used to acquire the network traffic generated by the IoT device to be identified, perform the same traffic preprocessing as in the training phase on the network traffic to obtain a grayscale image of the traffic to be identified, input the grayscale image of the traffic to be identified into the best global model, and output the device category prediction result.

[0066] The functions, implementation methods, and data processing procedures of each module can be found in the description of Example 1, and will not be repeated here.

[0067] Example 5: Experimental Verification: Experimental platform, dataset, and data partitioning: To verify the effectiveness of the technology, a federated learning experimental platform consisting of a central server and multiple logical clients was built on a Windows 10 computer. The hardware included an Intel Core i7-8750H processor, 16GB of memory, and an NVIDIA GTX 1050 Ti graphics processor; the software environment included CUDA 11.6, Python 3.7, and PyTorch 1.12.1.

[0068] The experiment uses two publicly available IoT traffic datasets: UNSW and Aalto. The UNSW dataset contains 23 representative IoT device classes, with significant differences in the number of traffic per class. The Aalto dataset is derived from smart home environments, and 16 device classes are selected. Each dataset is divided into a 20% training set, a 10% validation set, and a 70% test set. The training set is used for local model optimization and client-side training performance metric calculation. The validation set is used for global model monitoring and optimal global model selection in each round. The test set is kept isolated until the end of training and is used only for final performance evaluation.

[0069] Federal data distribution scenario setup: Three federated experimental scenarios were set up: Scenario 1 was an independent and identically distributed scenario, where the data quantity and category distribution of each client were approximately the same; Scenario 2 was a skewed quantity distribution scenario, using a symmetric Dirichlet distribution with a concentration parameter of 0.5 to divide the samples into categories; Scenario 3 was a severely skewed label distribution scenario, using a symmetric Dirichlet distribution with a concentration parameter of 0.01 to ensure that the device category sets of different clients did not highly overlap. These three scenarios were used to verify the aggregation performance of MSAA under ideal data distribution, heterogeneous quantity distribution, and heterogeneous label distribution conditions, respectively. All methods used the same training, validation, and testing methods.

[0070] Overall performance comparison of MSAA in ideal and heterogeneous federation scenarios: To verify the overall technical effectiveness of the complete solution centered on MSAA under different federated data distribution conditions, this invention is compared with four representative methods: a novel privacy-preserving horizontal federated learning based scheme for IoT device identification (HFedDI), an edge device identification method based on federated learning and network traffic feature engineering (FedeEDI), a personalized federated learning with state-adaptive IoT device scheduling in mobile edge computing (ACE), and a dynamic affinity aggregation in personalized federated learning under class imbalance (DA-PFL). Table 1 shows the device identification accuracy of two datasets under three federated scenarios—independent and identically distributed, skewed quantity distribution, and severely skewed label distribution—when only 20% of the training data is used. The three scenarios gradually transition from ideal data distribution to more robust client-side heterogeneous conditions, which are used to comprehensively evaluate the recognition accuracy, heterogeneous adaptability, and training robustness of MSAA.

[0071] Table 1 Device identification accuracy under different federated data distribution scenarios

[0072] In the independent and identically distributed environment of Federated Scenario 1, the accuracy of this invention on the UNSW and Aalto datasets reached 98.92% and 92.08%, respectively, both higher than the comparison methods. Figure 6 This further demonstrates that the present invention can converge quickly and stably under ideal data distribution, indicating that multi-stage aggregation does not cause significant loss of accuracy or training instability.

[0073] Even under the skewed distribution of data in Federated Scenario 2 and the severely skewed label distribution in Federated Scenario 3, this invention maintains high recognition performance. Particularly in the most challenging Federated Scenario 3, the accuracy of this invention on the UNSW and Aalto datasets reaches 94.35% and 87.72%, respectively; representing improvements of 1.67 and 14.33 percentage points compared to DA-PFL, and improvements of 35.80 and 43.45 percentage points compared to FedeEDI. Combined with... Figure 7 and Figure 8 As can be seen from the convergence curve, MSAA can enter the high accuracy range faster and maintain a relatively stable training trajectory under both quantity skew and label skew conditions, indicating that performance-aware main aggregation and low-weight client compensation aggregation have complementary effects.

[0074] Figure 6 This is a comparison chart of training performance under a federated, independent, and identically distributed scenario. Figure 6 The results show that in a federated environment where the amount and category distribution of data from each client are approximately consistent, this invention exhibits fast convergence speed and stable training trajectories on both the University of New South Wales IoT Traffic Traces Dataset (UNSW) and the Aalto University IoT Devices Captures Dataset (Aalto), with the final accuracy remaining at a high level. This demonstrates that MSAA can also work stably when the distribution of client data is balanced.

[0075] Figure 7 This is a comparison chart of training performance under a skewed scenario with non-independent and identically distributed numbers. Figure 7 This indicates that, in scenarios with skewed quantity distribution, the present invention demonstrates faster convergence speed and more stable final recognition accuracy on both datasets.

[0076] Figure 8 This is a comparison chart of training performance in scenarios with severe label distribution skew. Figure 8This indicates that, even in the most challenging scenario of severe label distribution skew, the present invention can more quickly escape the low accuracy range and maintain a more stable upward trend in subsequent communication rounds, demonstrating that the proposed multi-scale adaptive aggregation has a stronger adaptability to heterogeneous client updates.

[0077] MSAA core mechanism ablation experiment

[0078] In the case of severe label skew in the UNSW dataset, the effectiveness of the core aggregation scheme on the server side was verified by removing the MSAA method or replacing MSAA with other aggregation methods. The results are shown in Table 2.

[0079] The variants of MSAA replaced by Federated Averaging (FedAvg), Federated Proximal (FedProx), Federated Learning with Dynamic Weight Adjustment (FedDWA), and Federated Averaging with Server Momentum (FedAvgM) in this invention are denoted as MsaaDI-FedAvg, MsaaDI-FedProx, MsaaDI-FedDWA, and MsaaDI-FedAvgM, respectively.

[0080] Table 2: Ablation Experiment Results of the Method of the Present Invention

[0081] The variant MSaDI-NoWeightAdj, which removes stratified weight adjustments, drops accuracy from 94.35% to 74.11%, a decrease of 20.24 percentage points, representing one of the most significant performance losses among all ablation variants. This indicates that direct normalization using only initial performance weights is insufficient to address severe label skew; differentiating high-weight, medium-weight, and low-weight clients based on weight distribution is crucial for MSAA to achieve stable aggregation results. Variants replacing MSAA with Federated Averaging (FedAvg), Federated Proximal (FedProx), Federated Learning with Dynamic Weight Adjustment (FedDWA), and Federated Averaging with Server Momentum (FedAvgM) are denoted as MsaaDI-FedAvg, MsaaDI-FedProx, MsaaDI-FedDWA, and MsaaDI-FedAvgM, respectively. Their accuracy is lower than the complete scheme, further demonstrating the advantages of the three-stage aggregation structure of this invention compared to existing aggregation methods. The variant MsaaDI-NoMonitor, which removes the validation monitoring module, has an accuracy drop to 90.67% and increased training volatility, indicating that this module is suitable as a preferred auxiliary mechanism to improve training stability.

[0082] Figure 9 This is a comparison chart of the convergence performance of the complete scheme of this invention and different ablation variants. Figure 9 To further illustrate, the complete scheme of this invention maintains a superior accuracy trajectory throughout the entire training process. The English names in the figure are unified identifiers for each ablation variant, and their corresponding Chinese meanings and specific processing methods are shown in Table 2. Specifically, MsaDI-NoWeightAdj represents the experimental variant that removes hierarchical weight adjustment, and MsaDI-NoMonitor represents the experimental variant that removes the validation monitoring module; after removing the above mechanisms, the model's convergence performance and stability both significantly decrease.

[0083] Stability analysis of low-weight compensation threshold: In the federated scenario 3, the low-weight client selection threshold is set. The value was adjusted from 0.1 to 0.9, while the other parameters remained unchanged. The results are shown in Table 3.

[0084] Table 3: Selection Threshold for Low-Weight Clients Impact on accuracy

[0085] When low-weight clients select thresholds When the threshold is between 0.3 and 0.7, the recognition accuracy remains above 94%, indicating that the low-weight compensation mechanism is stable over a wide parameter range. Low-weight client selection threshold. After a short time, only a small number of clients logged in. The compensation effect is limited; low-weight clients select thresholds. When it is too large, enter The increase in the number of clients may weaken the effect of the first-stage performance-aware weighting.

[0086] MSAA Client Scale Expansion Experiment: With a fixed total data volume, the number of participating clients was increased from 2 to 30 to verify the scalability of MSAA under conditions of increased clients, reduced sample size per client, and further fragmentation of label distribution. Table 4 shows the accuracy of different methods.

[0087] Table 4: Device recognition accuracy under different numbers of clients

[0088] As the number of clients increases, the number of available samples per client decreases and the label distribution becomes more fragmented, leading to a decline in the performance of all methods. However, the present invention, based on MSAA, achieves the highest accuracy in configurations ranging from 2 to 30 clients, reaching 84.62% even with 30 clients. This result demonstrates that hierarchical weight adjustment, low-weight client compensation, and proportional fusion can alleviate the data heterogeneity and knowledge fragmentation problems caused by the expansion of federated systems.

[0089] Figure 10 This is a graph showing the change in recognition accuracy with different numbers of clients. Figure 10 This indicates that as the number of participating clients increases and the degree of data fragmentation improves, the performance of each method decreases, but the present invention consistently maintains its leading position across different client scales.

[0090] MSAA computational complexity analysis: Let the set of participating clients be Each model contains Several parameters are required. Client-side rating, weight adjustment, and weight normalization all need to be performed. This operation, adaptive weighted model aggregation requires... This operation requires compensation aggregation for low-weight clients. This operation, proportional polymerization requires... This operation, incremental update requires This operation. Due to... and The overall time complexity of the multi-scale adaptive aggregation server remains unchanged. It is at the same asymptotic level as the regular federal average.

[0091] Unless otherwise defined, the technical or scientific terms used in this invention shall have the general meaning understood by one of ordinary skill in the art to which this invention pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this invention do not indicate quantitative limitations and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this invention are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this invention are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “A plurality” used in this invention refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. In this invention, the terms "first," "second," "third," etc., are used only to distinguish similar objects and do not represent a specific order of objects.

[0092] Obviously, the accompanying drawings are merely some examples or embodiments of the present invention. Those skilled in the art can apply the present invention to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, certain design, manufacturing, or production modifications made according to the technical content disclosed in the present invention are merely conventional technical means and should not be considered as insufficient disclosure of the present invention.

[0093] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can also be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A multi-scale adaptive federated aggregation method, characterized in that, Includes the following steps: S1. Federated Training Input Preparation: The central server obtains the current global model and sends it to multiple clients participating in this round of federated training. Each client uses its own local training data to perform local model training, obtain local model parameters and multiple local training performance metrics, and uploads them to the central server; S2, Three-stage multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. S3. Verification Monitoring and Incremental Updates: Perform validation monitoring on the current global model, and perform incremental updates on some parameters of the current global model when the preset incremental update trigger conditions are met, to obtain the updated global model, while saving the global model with the best validation performance during training. S4. Global model deployment and iteration termination: The updated global model is sent to each client as the current global model for the next communication round. Each client repeats the local model training, and the central server repeats the three-stage multi-scale adaptive aggregation, verification monitoring and incremental update until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

2. The method according to claim 1, characterized in that, Each client uses its own local training data to perform local model training, obtaining local model parameters and multiple local training performance metrics, including: No. In round-robin communication, the client receives the current global model parameters sent by the central server and uses them as the initial parameters of the local model. It then performs a preset number of local training rounds using the local training data. After training, the client obtains the local model parameters and multiple local training performance metrics, including the current local training accuracy and the current local training loss, and updates the local training accuracy history.

3. The method according to claim 2, characterized in that, The central server performs multi-performance index client scoring on each client and calculates the initial relative weights, including: The central server maintains the local training accuracy history for each client and calculates the average training accuracy of each client over the most recent communication rounds. The central server constructs the performance vector of each client using the current local training accuracy, the reciprocal of the current local training loss, and the average training accuracy. It then forms a decision matrix from the performance vectors of all clients, performs normalization, and calculates the relative proximity of each client using the approximation of the ideal solution sorting method. It performs interval pruning on the relative proximity to obtain the pruning score of each client, and calculates the initial relative weight of each client using the median of the pruning scores of all clients as a reference.

4. The method according to claim 3, characterized in that, The first stage uses the initial relative weights of each client to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model; the second stage uses the initial relative weights to filter the set of low-weight clients and performs compensation aggregation to form a low-weight client compensation aggregation model. The third stage, based on the proportion of low-weight clients, integrates the performance-aware weighted aggregation model and the low-weight client compensation aggregation model to obtain the global model for this round, including: The central server calculates the mean and standard deviation of the initial relative weights for this round, and calculates the standardized deviation of each client. Based on the relationship between the standardized deviation and the preset deviation threshold, the initial relative weights of each client are adjusted in a hierarchical manner to obtain the calibration weights of each client. The calibration weights of each client are normalized to obtain the first-stage aggregate weights, and the first-stage performance-aware weighted aggregate model is calculated through weighting operations. The set of low-weight clients is selected by initial relative weight of each client. When the set of low-weight clients is not empty, the local models in the set of low-weight clients are aggregated with equal weight to obtain the low-weight client compensation aggregation model. Calculate the proportion of low-weight clients out of the total number of participating clients. , the proportion As the fusion coefficient of the low-weight client compensation aggregation model, As the fusion coefficient of the performance-aware weighted aggregation model, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are weighted and fused to obtain the global model for this round. When the low-weight client set is empty, the global model in this round is directly set to equal the performance-aware weighted aggregation model.

5. The method according to claim 1, characterized in that, The global model for this round is validated and monitored. When the preset incremental update trigger condition is met, some parameters of the global model for this round are incrementally updated to obtain the updated global model. At the same time, the global model with the best validation performance during training is saved, including: Initialize before the first validation monitoring: initialize the historical best validation accuracy to negative infinity, initialize the best global model to a copy of the global model in round 0, and initialize the incremental update counter to 0; After each round of aggregation, the current validation accuracy of the current global model is calculated using preset validation data; If the current validation accuracy is greater than the historical best validation accuracy, then update the best validation accuracy to the current validation accuracy, save the copy of the current global model as the best global model, and set the incremental update counter to zero. If the current validation accuracy is not greater than the historical best validation accuracy, then check if the incremental update counter is greater than or equal to 1; if the incremental update counter is greater than or equal to 1, randomly select a proportion from the parameter key set of the current global model. The parameter key is used to replace the model parameter of the corresponding parameter key in the current global model with the average value of the model parameters of all participating clients; then, if the incremental update counter is less than the preset upper limit, the incremental update counter is incremented by 1, otherwise the incremental update counter is reset to 0.

6. A multi-scale adaptive federated aggregation system, characterized in that, include: The federated training input preparation module is used for federated training input preparation: the central server obtains the current global model and sends the current global model to multiple clients participating in this round of federated training; Each client uses its own local training data to perform local model training, obtain local model parameters and multiple local training performance metrics, and uploads them to the central server; The three-stage multi-scale adaptive aggregation module is used for multi-scale adaptive aggregation: The central server performs multi-performance index client scoring on each client and calculates the initial relative weights. In the first stage, the initial relative weights of each client are used to perform hierarchical adaptive adjustment based on weight distribution to form a performance-aware weighted aggregation model. In the second stage, the initial relative weights are used to filter the set of low-weight clients and perform compensation aggregation to form a low-weight client compensation aggregation model. In the third stage, the performance-aware weighted aggregation model and the low-weight client compensation aggregation model are merged according to the proportion of low-weight clients to obtain the global model for this round. The verification monitoring and incremental update module is used for verification monitoring and incremental update: it performs verification monitoring on the global model in this round, and performs incremental update on some parameters of the global model in this round when the preset incremental update trigger conditions are met, so as to obtain the updated global model, and saves the global model with the best verification performance during the training process. The global model distribution and iteration termination module sends the updated global model as the current global model for the next communication round to each client. Each client repeatedly executes local model training, and the central server repeatedly executes the three-stage multi-scale adaptive aggregation, verification monitoring, and incremental updates until the preset iteration termination condition is met, and outputs the best global model saved during the training process.

7. A device identification method, characterized in that, The multi-scale adaptive federated aggregation method according to any one of claims 1-5 includes the following steps: Training phase: The raw network traffic generated by multiple known categories of IoT devices is acquired and preprocessed to obtain a traffic grayscale image. The traffic grayscale image is then used as local training data for federated training through a multi-scale adaptive federated aggregation method to obtain the optimal global model. Reasoning stage: The network traffic generated by the IoT device to be identified is acquired, and the network traffic is preprocessed in the same way as in the training phase to obtain a grayscale image of the traffic to be identified. The grayscale image of the traffic to be identified is then input into the optimal global model, and the device category prediction result is output.

8. A device identification system, characterized in that, The multi-scale adaptive federated aggregation system of claim 6 further includes: The local traffic preprocessing module is used to collect raw network traffic generated by multiple known categories of IoT devices, perform traffic preprocessing to obtain a traffic grayscale image, and provide the traffic grayscale image as local training data to the multi-scale adaptive federated aggregation system for federated training to obtain the best global model. The model inference module is used to acquire the network traffic generated by the IoT device to be identified, perform the same traffic preprocessing as in the training phase on the network traffic to obtain a grayscale image of the traffic to be identified, input the grayscale image of the traffic to be identified into the optimal global model, and output the device category prediction result.