A hierarchical federated learning method with adaptive compression coding

Through the matching of adaptive compression coding and hierarchical federated learning architecture, the problems of training asymmetry and transmission deviation between devices are solved, and efficient data transmission and model training are achieved.

CN119210465BActive Publication Date: 2025-02-14HUNAN UNIV OF SCI & TECH

Patent Information

Application Number
CN202411579167.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-14
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

In the existing stratified federated learning technology, fixed training methods lead to out-of-synchronization of training between devices, accumulation of transmission deviations, and affecting the learning effect.

Method used

Adaptive compression coding is used to adopt a hierarchical federated learning method. By building a hierarchical federated learning architecture, the data processing performance of the terminal device is evaluated, the edge server is matched, and the adaptive compression coding and edge aggregation is performed, and finally the global aggregation is performed.

Benefits of technology

Significantly reduce data transmission communication costs, improve model comprehensiveness and accuracy, reduce training delays and network congestion, and ensure synchronous training between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119210465B_ABST
    Figure CN119210465B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electronic digital data processing, and specifically discloses a hierarchical federated learning method of adaptive compression coding, the method comprising: hierarchical federated learning architecture construction, edge server matching, model generation performance judgment, compression rate matching and hierarchical federated learning architecture judgment, firstly, a hierarchical federated learning architecture is constructed so that each layer can make full use of its computing resources, an edge server corresponding to a terminal device is obtained by matching, each terminal device is used to generate an environmental data training model, a corresponding compression rate is obtained according to the network transmission performance of the edge server, the edge server receives the environmental data training model of each terminal device and performs adaptive compression coding and edge aggregation in sequence according to the corresponding compression rate, a cloud server receives the edge aggregation result and performs global aggregation, and finally judges whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of the global aggregation to an environmental resource scheduling cloud platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a hierarchical federated learning method of adaptive compression coding. Background Art

[0002] With the development of wireless communication technology and people's increasing attention to distributed training, the hierarchical federated learning framework (HFL) based on "cloud-edge-end" collaboration has received more and more attention and is widely used in scenarios such as environmental resource allocation, location information scheduling, image and video data analysis, etc.

[0003] For example, the invention patent with announcement number CN113971090B, one or more embodiments of the above application provide a hierarchical federated learning method and device for a distributed deep neural network, including: multiple terminals use local data to perform model training respectively, and transmit the trained front-end models to the edge nodes of the same branch; the edge node aggregates the front-end models transmitted by multiple terminals under the branch to obtain a new aggregated front-end model; based on the new front-end model, the edge node cooperates with the terminal to train the overall model including the back-end model, and transmits the obtained overall model to the cloud; the cloud aggregates the overall models transmitted by multiple edge nodes, and obtains a globally unified new overall model after multiple iterations; through the above methods, the above application can significantly reduce the time consumption of task calculation, enhance the real-time requirements, solve the data skew problem at different levels, and has broad application prospects.

[0004] Combined with the above technical solutions, it is found that in the current technical solutions for hierarchical federated learning, the subsequent training model is usually obtained according to a relatively fixed training method, which leads to asynchronous training between devices and creates difficulties for aggregation operations. In addition, the fixed training method is prone to transmission deviations between devices. These deviations or errors may be accumulated and amplified in subsequent aggregations, ultimately affecting the use of hierarchical federated learning. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a hierarchical federated learning method with adaptive compression coding, which can effectively solve the problems involved in the above-mentioned background technology.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a hierarchical federated learning method with adaptive compression coding, comprising: S1. constructing a hierarchical federated learning architecture: constructing a hierarchical federated learning architecture for each terminal device, edge server and cloud server; S2. obtaining data processing related information of each terminal device, evaluating the data processing performance index of each terminal device, and matching the edge server corresponding to the terminal device according to the predefined performance index intervals; S3. each terminal device collects environmental data stored in the environmental resource scheduling cloud platform and performs model training to generate an environmental data training model for each terminal device, determines the model generation performance evaluation value of each terminal device, and compares it with the predefined model generation performance evaluation threshold The values ​​are compared to obtain the comparison result, and then enter S5; S4. The edge server monitors the network transmission performance of each input terminal, evaluates the network transmission performance index of each input terminal of the edge server, and matches the compression rate corresponding to each input terminal of the edge server; S5. Based on the comparison result, the edge server receives the environmental data training model of each terminal device and performs adaptive compression encoding and edge aggregation in turn according to the compression rate corresponding to each input terminal of the edge server to obtain the aggregation result of the edge server. The cloud server receives the aggregation result of the edge server and performs global aggregation to determine the global aggregation quality index of the cloud server, and finally determines whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of the global aggregation to the environmental resource scheduling cloud platform.

[0007] As a further method, the data processing performance index of each terminal device is evaluated, and the specific evaluation process is as follows: the data processing related information of each terminal device specifically includes the number of cores of the central processing unit of each terminal device, the clock frequency of the central processing unit of each terminal device, the data reading speed of the solid state drive of each terminal device, and the data writing speed of the solid state drive of each terminal device; based on the data processing related information of each terminal device, the data processing performance index of each terminal device is obtained by comprehensive analysis, and the specific method is as follows:

[0008] ;

[0009] In the formula, is the data processing performance index of the i-th terminal device, i is the number of each terminal device, , m is the total number of terminal devices, is the number of cores of the CPU of the i-th terminal device, is the clock frequency of the central processor of the i-th terminal device, is the data reading speed of the solid-state drive of the i-th terminal device, is the data writing speed of the solid state drive of the i-th terminal device, The weight factor corresponding to the number of cores predefined in the environment resource scheduling cloud platform, is the weight factor corresponding to the predefined clock frequency in the environment resource scheduling cloud platform, It is the weight factor corresponding to the data reading speed predefined in the environment resource scheduling cloud platform. is the weight factor corresponding to the data writing speed predefined in the environmental resource scheduling cloud platform, and e is a natural constant.

[0010] As a further method, the model generation performance evaluation value of each terminal device is determined, and the specific determination process is: obtaining model generation related data of each terminal device, specifically including the time required for model generation of each terminal device, the core number of the central processor to which the model generation of each terminal device belongs, the memory occupancy of the model generation of each terminal device, the data reading speed of the solid-state hard disk to which the model generation of each terminal device belongs, and the data writing speed of the solid-state hard disk to which the model generation of each terminal device belongs; the data reading speed of the solid-state hard disk to which the model generation of each terminal device belongs is compared with the data writing speed of the solid-state hard disk to which the model generation of each terminal device belongs, so as to obtain the data reading and writing efficiency of the solid-state hard disk to which the model generation of each terminal device belongs; extracting the memory reference occupancy from the environmental resource scheduling cloud platform; according to the time required for model generation of each terminal device, the core number of the central processor to which the model generation of each terminal device belongs, the memory occupancy of the model generation of each terminal device, the memory reference occupancy and the data reading and writing efficiency of the solid-state hard disk to which the model generation of each terminal device belongs, a comprehensive analysis is performed to obtain the model generation performance evaluation value of each terminal device.

[0011] As a further method, the comparison is made with a predefined model generation performance evaluation threshold to obtain a comparison result. The specific comparison process is: if the comparison result shows that the model generation performance evaluation value of each terminal device is greater than or equal to the model generation performance evaluation threshold, the environmental data training model of each terminal device is input into the edge server; if the comparison result shows that the model generation performance evaluation value of each terminal device is less than the model generation performance evaluation threshold, a model generation performance warning is issued to each terminal device.

[0012] As a further method, the network transmission performance indicators of each input end of the edge server are evaluated, and the specific evaluation process is: obtaining network transmission monitoring data of each input end of the edge server, specifically including the data transmission bandwidth, maximum data transmission delay duration, maximum data packet loss rate and minimum network throughput between the edge server and each input end during the data transmission cycle; based on the network transmission monitoring data of each input end of the edge server, a comprehensive analysis is performed to obtain the network transmission performance indicators of each input end of the edge server.

[0013] As a further method, the global aggregation quality index of the cloud server is determined, and the specific determination process is: obtaining the global aggregation related data of the cloud server, specifically including the amount of data completed by the cloud server for global aggregation, the total amount of data received by the cloud server, and the time required for the global aggregation of the cloud server; obtaining the network transmission monitoring data of the output end of the edge server, specifically the data transmission bandwidth between the edge server and the output end during the data transmission cycle; performing ratio processing on the amount of data completed by the cloud server for global aggregation and the total amount of data received by the cloud server to obtain the aggregation completion degree of the cloud server; based on the time required for the global aggregation of the cloud server, the aggregation completion degree of the cloud server, the memory usage generated by each terminal device model, and the data transmission bandwidth between the edge server and the output end during the data transmission cycle, a comprehensive analysis is performed to obtain the global aggregation quality index of the cloud server.

[0014] As a further method, the judgment of whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of global aggregation to the environmental resource scheduling cloud platform is as follows: the global aggregation quality index of the cloud server is compared with a predefined global aggregation quality index preset value. If the global aggregation quality index of the cloud server is greater than the global aggregation quality index preset value, the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of global aggregation to the environmental resource scheduling cloud platform. If the global aggregation quality index of the cloud server is equal to or less than the global aggregation quality index preset value, a global aggregation quality warning is issued to the cloud server to which the hierarchical federated learning architecture belongs.

[0015] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:

[0016] (1) The present invention provides a hierarchical federated learning method with adaptive compression coding. First, a hierarchical federated learning architecture is constructed so that each layer can fully utilize its computing resources and is suitable for processing large-scale data processing and model training tasks. The edge server corresponding to the terminal device is obtained by matching. Each terminal device is used to generate an environmental data training model. The corresponding compression rate is obtained according to the network transmission performance of the edge server. The edge server receives the environmental data training model of each terminal device and performs adaptive compression coding and edge aggregation in sequence according to the corresponding compression rate. The adaptive compression coding can significantly reduce the communication cost of data transmission. The cloud server receives the edge aggregation result and performs global aggregation to obtain a more comprehensive and accurate model. Finally, it is determined whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of the global aggregation to the environmental resource scheduling cloud platform.

[0017] (2) The present invention monitors the network transmission performance of each input terminal and output terminal of the edge server, evaluates the network transmission performance index of each input terminal of the edge server, and dynamically adjusts the corresponding compression according to the network transmission performance index. When the network condition is poor, the compression rate is increased to reduce the data transmission volume, thereby alleviating network congestion; when the network condition is good, the compression rate is reduced to maintain data quality and reduce data transmission delay;

[0018] (3) The present invention obtains data processing related information of each terminal device, evaluates the data processing performance index of each terminal device, and matches the edge server corresponding to the terminal device according to the predefined performance index intervals. This can ensure synchronous training between devices with similar performance and reduce training delays caused by performance differences. By reducing the asynchrony phenomenon during the training process, it can reduce the communication overhead caused by repeated training or waiting for low-performance devices, thereby improving data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention is further described with the aid of the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other accompanying drawings based on the following accompanying drawings without creative work.

[0020] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0021] Figure 2 A schematic diagram of the hierarchical federated learning architecture of the present invention;

[0022] Figure 3 It is a schematic diagram of the terminal device of the present invention;

[0023] Figure 4 Generate a performance diagram of the training time to achieve the target accuracy for the model;

[0024] Figure 5 Performance diagram of adaptive bandwidth training time;

[0025] Figure 6 Training schedule for adaptive bandwidth;

[0026] Figure 7 Schematic diagram of the impact of different methods on training time. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0028] Reference Figure 1 As shown, the present invention provides a hierarchical federated learning method with adaptive compression coding, including: S1. Hierarchical federated learning architecture construction: hierarchical federated learning architecture is constructed for each terminal device, edge server and cloud server.

[0029] The above hierarchical federated learning architecture aims to efficiently train models while protecting user privacy through collaborative work at different levels. The overall architecture usually includes three main layers: terminal device layer, edge server layer, and cloud server layer.

[0030] The overall architecture is as follows Figure 2 As shown, it is a schematic diagram of the hierarchical federated learning architecture of an embodiment of the present invention. This embodiment can be applied to the scenario of cloud-edge collaborative training.

[0031] The hierarchical federated learning architecture aggregates model updates from multiple clients by introducing an intermediate layer of edge servers, rather than sending all model updates directly to a central server. This approach reduces the number of clients that communicate directly with the central server, greatly reducing communication overhead. This advantage is particularly evident in environments with limited bandwidth or high communication costs; and by assigning computing tasks to servers at different levels, hierarchical federated learning can more efficiently utilize computing resources. Edge servers can handle preliminary computing tasks close to the data source, while central servers are responsible for more complex, global computing tasks. This distributed computing model reduces the burden on the central server and improves overall computing efficiency. At the same time, in the hierarchical federated learning architecture, the original data remains locally, and only model updates or gradient information are exchanged between servers at different levels. This data interaction method further enhances privacy protection, because even if a server at a certain level is attacked, the attacker cannot directly obtain the original data.

[0032] 1) Terminal device layer: Each terminal device is the source of data and is responsible for collecting and initially processing user data. They are installed with initialized models and use local data for model training. The number of terminal devices is large and they are widely distributed. Their computing power is relatively weak, but they have a large amount of user data.

[0033] Figure 3 It is a schematic diagram of the terminal device of the present invention, such as Figure 3As shown, the terminal device includes: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the above method of the present invention. In an embodiment of the present invention, the multiple processors include: a local server for performing task offloading when local resources are sufficient; an edge server for performing task offloading when local resources are insufficient.

[0034] 2) Edge server layer: The edge server is responsible for aggregating model updates from multiple terminal devices and performing edge-level model aggregation to generate edge models. It is close to users, has moderate computing power, and can handle time-sensitive and latency-sensitive tasks.

[0035] The above-mentioned edge-level model aggregation refers to model aggregation performed at the edge server layer. In this process, multiple geographically isolated but logically interconnected edge servers collect model updates from multiple terminal devices in their coverage area, such as gradient updates, weight updates, etc. These model updates may represent local data features on different users or different devices. The edge server aggregates these model updates to generate an edge model. This edge model is trained based on the local data of all terminal devices in the edge server coverage area, so it has certain regionality and timeliness.

[0036] The advantage of edge aggregation is that it can reduce the amount of data transmission, because only model updates (not original data) need to be transmitted to the edge server for aggregation, without transmitting all data to the cloud server. At the same time, edge aggregation can also reduce communication latency, because data is aggregated on local or nearby edge servers without having to be transmitted over long distances.

[0037] 3) Cloud server layer: The cloud server is responsible for receiving edge models from edge servers, performing global model aggregation, and updating the global model. At the same time, it can also optimize the edge aggregation interval and training latency budget according to the training situation. The cloud server has powerful computing power and is suitable for handling large-scale data processing and model training tasks.

[0038] The above global model aggregation refers to the model aggregation performed at the cloud server layer. In this process, the cloud server receives edge models from multiple edge servers and further aggregates these edge models to generate a global model. The global model is trained based on the global data of terminal devices in the coverage area of ​​all edge servers, so it has a wider range of representation and stronger generalization capabilities.

[0039] The purpose of global aggregation is to integrate the local model updates on each edge server into a unified global model for deployment and application throughout the system. Global aggregation ensures that all terminal devices can use the latest and fully trained models, thereby improving the overall performance and accuracy of the system.

[0040] Construction process: Install necessary software and hardware on terminal devices, edge servers, and cloud servers to ensure that they can support the operation of federated learning, initialize the model, and ensure that all terminal devices have the same initial model; pre-process user data on the terminal device, such as data cleaning, feature extraction, etc., and encrypt sensitive data to ensure that user privacy is not leaked during data transmission; the terminal device uses local data for model training and generates model updates, such as gradient updates, weight updates, etc. These model updates will be encrypted and uploaded to the edge server; the edge server receives model updates from multiple terminal devices and performs edge-level model aggregation. The aggregated edge model will be uploaded to the cloud server for further processing; the cloud server receives edge models from edge servers and performs global model aggregation, updates the global model based on the aggregation results, and determines whether to perform subsequent operations based on the actual needs of the updated global model.

[0041] S2. Obtain data processing related information of each terminal device, evaluate the data processing performance index of each terminal device, and match the edge server corresponding to the terminal device according to the predefined performance index ranges.

[0042] Specifically, the data processing performance index of each terminal device is evaluated, and the specific evaluation process is as follows:

[0043] The data processing related information of each terminal device specifically includes the number of cores of the central processor of each terminal device, the clock frequency of the central processor of each terminal device, the data reading speed of the solid-state hard disk of each terminal device, and the data writing speed of the solid-state hard disk of each terminal device.

[0044] The data processing related information of each of the above terminal devices can be extracted from the operation report of each terminal device.

[0045] According to the data processing related information of each terminal device, the data processing performance index of each terminal device is obtained through comprehensive analysis. The specific method is as follows:

[0046] ;

[0047] In the formula, is the data processing performance index of the i-th terminal device. In this embodiment, this index comprehensively reflects the efficiency and capability of each terminal device in data processing;

[0048] i is the number of each terminal device, , m is the total number of terminal devices;

[0049] is the number of cores of the central processor of the i-th terminal device, which refers to the number of processor cores integrated inside the central processor of each terminal device, such as 8 cores, 16 cores, etc., which affects the multi-tasking processing capability of each terminal device;

[0050] is the clock frequency of the CPU of the ith terminal device, which is an important indicator to measure the computing speed of the CPU of each terminal device. It indicates the oscillation of the digital pulse signal inside the CPU of each terminal device, that is, the frequency of the crystal oscillator inside the CPU, and the unit is Hertz (Hz). In the CPU of each terminal device, the higher the main frequency, the more instruction cycles the CPU of the terminal device can complete in the same time, and thus the faster the computing speed;

[0051] is the data reading speed of the solid-state drive of the i-th terminal device, which refers to the speed at which the solid-state drive of each terminal device retrieves data from the storage medium and transfers it to the memory of each terminal device. This speed is usually measured in terms of the amount of data transferred per second. A faster reading speed means faster data loading and smoother system response;

[0052] is the data writing speed of the solid-state drive of the i-th terminal device, which refers to the speed at which the solid-state drive of each terminal device receives data from the memory of each terminal device and stores it on the hard disk. Similarly, this speed is also measured in terms of the amount of data transferred per second. A faster writing speed can reduce waiting time and improve work efficiency;

[0053] The weight factor corresponding to the number of cores predefined in the environment resource scheduling cloud platform, is the weight factor corresponding to the predefined clock frequency in the environment resource scheduling cloud platform, It is the weight factor corresponding to the data reading speed predefined in the environment resource scheduling cloud platform. is the weight factor corresponding to the data writing speed predefined in the environmental resource scheduling cloud platform, and e is a natural constant.

[0054] In a specific embodiment, the weight factor corresponding to the number of cores, the weight factor corresponding to the clock frequency, the weight factor corresponding to the data reading speed, and the weight factor corresponding to the data writing speed can be directly obtained from the environment resource scheduling cloud platform. The factors represent the numerical values ​​of the influence of the number of cores, the clock frequency, the data reading speed, and the data writing speed on the data processing performance index of each terminal device during the data processing performance evaluation of each terminal device. The corresponding relationship can be a pre-set mapping relationship. For example, the number of cores and the weight factors corresponding to the number of cores preset in the environment resource scheduling cloud platform form a mapping set, and the real-time number of cores is brought into the mapping set to obtain the weight factor corresponding to the number of cores. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, the value range is [0, 1], the clock frequency corresponds to the clock frequency preset in the environment resource scheduling cloud platform. The weight factors form a mapping set, and the real-time clock frequency is brought into the mapping set to obtain the weight factor corresponding to the clock frequency, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and in this embodiment, its value range is [0, 1]; the data reading speed and the weight factors corresponding to the preset data reading speed in the environment resource scheduling cloud platform form a mapping set, and the real-time data reading speed is brought into the mapping set to obtain the weight factor corresponding to the data reading speed, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and in this embodiment, its value range is [0, 1]; and the data writing speed and the weight factors corresponding to the preset data writing speed in the environment resource scheduling cloud platform form a mapping set, and the real-time data writing speed is brought into the mapping set to obtain the weight factor corresponding to the data writing speed, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and in this embodiment, its value range is [0, 1].

[0055] In this embodiment, the core number and clock frequency of the central processor of the terminal device and the data reading and writing speed of the solid-state hard disk of the terminal device jointly determine the overall data processing performance of the terminal device. The central processor is responsible for processing data and instructions, while the solid-state hard disk is responsible for quickly storing and retrieving these data. When the performance of the central processor is strong and the speed of the solid-state hard disk is fast enough, each terminal device can complete the data processing task more efficiently. The performance of the central processor will also affect the read and write speed of the solid-state hard disk. For example, when the data processing speed of the central processor is slow, it may become a bottleneck for the read and write speed of the solid-state hard disk. Similarly, if the read and write speed of the solid-state hard disk is too slow, it will also limit the performance of the central processor. In order to give full play to the performance of each terminal device, it is necessary to comprehensively consider the configuration performance of hardware such as the central processor and the solid-state hard disk. Therefore, selecting the appropriate core number and clock frequency of the central processor, paying attention to the read and write speed, capacity and durability of the solid-state hard disk, etc., can better reflect the data processing performance of each terminal device. In summary, there is a close connection and mutual influence between the core number and clock frequency of the central processor and the data reading and writing speed of the solid-state hard disk. When determining the data processing performance of a terminal device, it is necessary to consider the relationship between different configuration parameters to optimize the system data processing performance.

[0056] Furthermore, the edge server corresponding to the terminal device is matched, and the specific matching process is as follows:

[0057] The data processing performance index of each terminal device is compared with each performance index interval predefined in the environmental resource scheduling cloud platform to obtain a number of terminal devices corresponding to each performance index interval whose data processing performance index belongs to each performance index interval, and the number of terminal devices corresponding to each performance index interval whose data processing performance index belongs to each performance index interval is arranged in order from large to small, and the performance index interval corresponding to the number of terminal devices ranked first is extracted, and the data processing performance level corresponding to the performance index interval is used as the corresponding level of the terminal devices, and matched with the edge server corresponding to the preset data processing performance level. The specific matching process is: obtain a mapping set of the data processing performance level of the terminal device and the edge server from the environmental resource scheduling cloud platform, first determine the corresponding level of the data processing performance of the terminal device, and assign the edge server corresponding to the level to the terminal device corresponding to the data processing performance level, so as to match the edge server corresponding to the terminal device.

[0058] S3. Each terminal device collects environmental data stored in the environmental resource scheduling cloud platform and performs model training to generate an environmental data training model for each terminal device, determines the model generation performance evaluation value of each terminal device, and compares it with the predefined model generation performance evaluation threshold to obtain a comparison result and enter S5.

[0059] The above-mentioned environmental data training model specifically uses environmental data to train machine learning or deep learning models to achieve tasks such as prediction, classification, and recognition of environmental phenomena. In this embodiment, taking a convolutional neural network model as an example, the convolutional neural network model can handle complex nonlinear relationships and perform prediction and classification by learning the feature representation of data.

[0060] The specific training process of the above-mentioned convolutional neural network model can be: collecting data from various environmental data sources, including sensor data, remote sensing data, meteorological data, etc.; cleaning, denoising, normalizing and other processing of the collected data to improve data quality and model training effect; extracting the required feature data from the original data to construct the model input. Feature selection is crucial to improving model performance and reducing computational complexity; using the preprocessed data and the selected feature data to train the model. During the training process, the model parameters need to be adjusted to minimize the loss function and improve the model performance; deploying the trained model to the actual required scenario for real-time prediction and decision support.

[0061] Specifically, the model generation performance evaluation value of each terminal device is determined, and the specific determination process is as follows:

[0062] The model generation related data of each terminal device is obtained, including the time required for model generation of each terminal device, the number of cores of the central processor to which the model generation of each terminal device belongs, the memory usage of the model generation of each terminal device, the data reading speed of the solid-state hard disk to which the model generation of each terminal device belongs, and the data writing speed of the solid-state hard disk to which the model generation of each terminal device belongs.

[0063] The model generation associated data of the above-mentioned terminal devices can be extracted through the model generation report of each terminal device.

[0064] The data reading speed of the solid-state hard disk generated by each terminal device model is compared with the data writing speed of the solid-state hard disk generated by each terminal device model to obtain the data reading and writing efficiency of the solid-state hard disk generated by each terminal device model.

[0065] The memory reference occupancy is extracted from the environment resource scheduling cloud platform.

[0066] Based on the time required for model generation of each terminal device, the number of cores of the central processor to which the model generation of each terminal device belongs, the memory usage of the model generation of each terminal device, the memory reference usage, and the data reading and writing efficiency of the solid-state hard disk to which the model generation of each terminal device belongs, a comprehensive analysis is performed to obtain the model generation performance evaluation value of each terminal device. The specific method is as follows:

[0067] ;

[0068] In the formula, Generate a performance evaluation value for the model of the i-th terminal device, which in this embodiment is a series of quantitative indicators for evaluating the comprehensive performance of each terminal device when generating or processing a model, especially a model involving the field of artificial intelligence or machine learning;

[0069] i is the number of each terminal device, , m is the total number of terminal devices;

[0070] The time required to generate the model for the i-th terminal device refers to the total time required from starting the model generation process to completing the entire model construction, training, verification and finally reaching a deployable state;

[0071] The number of cores of the central processor to which the model of the i-th terminal device belongs is related to the expression of the number of cores of the central processor of each terminal device, which refers to the number of processor cores integrated in the central processor of each terminal device under this model generation;

[0072] The data reading and writing efficiency of the solid-state hard disk generated for the i-th terminal device model refers to the speed and efficiency of the solid-state hard disks of each terminal device when processing data reading and writing operations under this model generation.

[0073] It should be explained that the data read and write efficiency ratio helps evaluate the overall performance of the SSD on different terminal devices. A higher ratio means that the read speed is faster than the write speed, which is an advantage in the scenario of frequent data reading in this embodiment. When discussing the data read and write efficiency ratio, this ratio is not the high or low of the read speed to the write speed, but reflects the relative balance or efficiency between the two, which is to measure the performance difference between the read and write operations of the SSD;

[0074] The memory usage generated for the i-th terminal device model refers to the system memory resources consumed or occupied by the model when running or generating the model on various terminal devices, such as mobile phones, tablets, embedded devices, etc.;

[0075] The memory usage is the reference amount, which refers to the standard amount of memory used by the preset model generation.

[0076] Generate the impact factor corresponding to the required time unit value for the predefined model of the environmental resource scheduling cloud platform, The weight factor corresponding to the number of cores predefined in the environment resource scheduling cloud platform, The impact factor corresponding to the unit value of data reading and writing efficiency predefined by the environmental resource scheduling cloud platform;

[0077] is the performance evaluation adjustment value, and its specific value is obtained by multiplying the impact factor corresponding to the unit value of the model generation time, the weight factor corresponding to the number of cores, and the impact factor corresponding to the unit value of data reading and writing efficiency. The value range is (0,1). The above model will generate the required time unit value corresponding to the impact factor, the weight factor corresponding to the number of cores, and the impact factor corresponding to the data read and write efficiency unit value only when they are all 0 or 1. Equal to 0 or equal to 1, but this situation is an extreme case in this example and will have a greater negative impact on the model generation performance evaluation value. Therefore, this embodiment does not consider the impact factor corresponding to the unit value of the time required for model generation, the weight factor corresponding to the number of cores, and the impact factor corresponding to the unit value of data reading and writing efficiency. All of them are 0 or 1, so the Not equal to 0 or 1.

[0078] In different terminal devices or evaluation environments, factors such as hardware performance, operating system version, and network conditions may have a significant impact on model performance. By introducing performance evaluation adjustment values, targeted optimization can be performed for different factors, that is, the performance evaluation adjustment values ​​are different, thereby reducing the interference of these factors on the evaluation results. This can significantly improve the accuracy of the evaluation results, help to more accurately understand the performance of the model in different environments, and provide strong support for subsequent model optimization.

[0079] In a specific embodiment, when used, the impact factor corresponding to the unit value of the time required for model generation, the weight factor corresponding to the number of cores, and the impact factor corresponding to the unit value of data reading and writing efficiency can be directly obtained from the environmental resource scheduling cloud platform. The factors represent the numerical values ​​of the degree of influence of the time required for model generation, the number of cores, and the data reading and writing efficiency on the model generation performance evaluation value of the terminal device during the model generation performance evaluation of each terminal device. The corresponding relationship can be a pre-set mapping relationship. For example, the time required for model generation and the impact factor corresponding to the unit value of the time required for model generation preset in the environmental resource scheduling cloud platform form a mapping set, and the real-time time required for model generation is brought into the mapping set to obtain the impact factor corresponding to the unit value of the time required for model generation. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, its value range is [0, 1] and the data reading and writing efficiency and the impact factor corresponding to the unit value of the data reading and writing efficiency preset in the environmental resource scheduling cloud platform form a mapping set. The real-time data reading and writing efficiency is brought into the mapping set to obtain the impact factor corresponding to the unit value of the data reading and writing efficiency. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, its value range is [0, 1].

[0080] It should be noted that the above The parameter categories described are all core numbers, but the value of the factor will vary depending on the specific usage scenario. The corresponding values ​​of the data processing performance index of each terminal device mentioned above The corresponding values ​​of can be the same or different.

[0081] In this embodiment, in the model generation process of each terminal device, the four factors of the time required for model generation, the number of cores of the central processing unit, the data read and write efficiency of the solid-state hard disk, and the memory usage of the model generation need to work together to achieve the best effect. For example, in the case of limited hardware resources, the memory usage and generation time can be reduced by optimizing the algorithm and reducing the size of the data set; at the same time, a high-performance central processing unit and solid-state hard disk are selected to significantly improve the efficiency of model generation. However, there is also a mutual influence between the four. The increase in the number of cores of the central processing unit can shorten the time required for model generation, but it may increase the memory usage and the read and write burden of the hard disk. The improvement of the read and write efficiency of the solid-state hard disk can accelerate the flow of data and reduce waiting time, but it may also be limited by the memory usage. The increase in memory usage may be limited by the processing power of the central processing unit and the read and write efficiency of the hard disk. In order to give full play to the performance of the model generation of each terminal device and greatly shorten the time of model generation, it is necessary to comprehensively consider the relationship between the number of cores of the central processing unit, the data read and write efficiency of the solid-state hard disk, and the memory usage of the model generation.

[0082] In this embodiment, if the model training time in the model generation process is too long, it will affect the timeliness of model aggregation and the accuracy of model generation. The advantage of the hierarchical federated learning architecture is that it uses communication between devices instead of communication between devices and servers, reducing the number of links between devices and servers and reducing communication overhead, thereby improving its timeliness.

[0083] In a specific embodiment, in order to achieve the target accuracy of model generation, two data sets CIFAR-10 and CIFAR-100 are set to verify the comparison of the training time required to run different numbers of epochs of ATCC-HFL (adaptive compression coding hierarchical federated learning method) on the two data sets, where epoch refers to the training parameter in the model training process, and a relationship diagram between training epoch and training time is drawn, such as Figure 4 As shown in the figure, it is a performance diagram of the training time for the model to achieve the target accuracy. The horizontal axis is the training parameter epoch, the unit is epoch, and the vertical axis is the training time in seconds. Figure 4 (a) is a diagram of the training time performance of the CIFAR-10 dataset. Figure 4 (b) is a diagram of the training time performance of the CIFAR-100 dataset, where Top-K (Topk), Quantization SGD (QSGD), Mask, and FedAvg methods are used as control groups to verify the advantages of ATCC-HFL.

[0084] Among them, Top-K (Topk) means finding the K largest or smallest elements from the score set. That is, Topk only transmits the k elements with the largest absolute value in the local gradient of each terminal device. QSGD is a communication-efficient algorithm for implementing parallelized stochastic gradient descent (SGD). It significantly reduces the bandwidth overhead when updating gradients between nodes by quantizing and encoding the gradients. QSGD quantizes the gradient to k times the original accuracy. During the experiment, k was fixed to 50% and 70% for comparison. Mask records non-zero gradients in a masked manner. FedAvg is a distributed machine learning framework.

[0085] Depend on Figure 4It can be seen that all methods run for a fixed number of 200 epochs. FedAvg takes the longest time to train for 200 epochs because it does not do any processing on the transmitted gradients, which contain a large number of non-zero elements and affect the transmission speed. Other methods compress the sparse gradients and reduce the training time within a certain range. However, compared with other compression methods, ATCC-HFL can achieve the lowest training time. This is because ATCC-HFL directly compresses the sparse gradients into multiple non-sparse blocks for transmission through tree-shaped gradient compression encoding, and can achieve direct aggregation without decoding on the server. Secondly, QSGD and Topk both compress the gradients at a fixed compression rate, without considering the actual communication bandwidth of different MDs. ATCC-HFL can compress the gradients to different degrees according to the specific bandwidth of different MDs, which improves the transmission speed and speeds up the training process.

[0086] Furthermore, the comparison is performed with a predefined model generation performance evaluation threshold to obtain a comparison result. The specific comparison process is as follows:

[0087] If the comparison result shows that the model generation performance evaluation value of each terminal device is greater than or equal to the model generation performance evaluation threshold predefined in the environmental resource scheduling cloud platform, the environmental data training model of each terminal device is input into the edge server. If the comparison result shows that the model generation performance evaluation value of each terminal device is less than the model generation performance evaluation threshold, a model generation performance warning is issued for each terminal device.

[0088] The above-mentioned model generation performance warning can be based on the set threshold to detect abnormal conditions in the terminal device model generation process in real time. If the model generation performance evaluation value of each terminal device is less than the model generation performance evaluation threshold, there may be problems such as a small number of CPU cores and excessive memory usage, which will lead to a decrease in generation speed and an increase in the time required for generation. When the above situation is detected, the warning signal is immediately triggered. The warning signal may be issued in a variety of ways, including but not limited to:

[0089] 1) System alarm: Display warning information or icons on the terminal device;

[0090] 2) Push notification: notify relevant personnel via email, SMS, instant messaging tools, etc.;

[0091] 3) Logging: Record abnormal events and related information in the system log for subsequent analysis.

[0092] S4. The edge server monitors the network transmission performance of each input terminal, evaluates the network transmission performance index of each input terminal of the edge server, and matches the compression rate corresponding to each input terminal of the edge server.

[0093] The above-mentioned input ends specifically refer to the network connection between the edge server and each terminal device.

[0094] Specifically, the network transmission performance indicators of each input terminal of the edge server are evaluated, and the specific evaluation process is as follows:

[0095] The network transmission monitoring data of each input end of the edge server is obtained, including the data transmission bandwidth, maximum data transmission delay, maximum data packet loss rate and minimum network throughput between the edge server and each input end during the data transmission cycle.

[0096] The above data transmission cycle is determined by the time length corresponding to when each input end, ie each terminal device, starts to transmit data to the edge server and when the data transmission of all terminal devices is completed, as the data transmission cycle.

[0097] The network transmission monitoring data of each input end of the above-mentioned edge server can be extracted from the operation report of the edge server.

[0098] Based on the network transmission monitoring data of each input end of the edge server, the network transmission performance indicators of each input end of the edge server are obtained through comprehensive analysis. The specific method is as follows:

[0099] ;

[0100] In the formula, is the network transmission performance index of the ith input end of the edge server, which in this embodiment is used to reflect the capacity and efficiency of the network connection between the edge server and each terminal device;

[0101] i is the number of each terminal device, , m is the total number of terminal devices;

[0102] The data transmission bandwidth between the edge server and the i-th input terminal in the data transmission cycle refers to the amount of data that the network can transmit within a certain period of time, usually in Mbps (megabits per second) or Gbps (gigabits per second). It determines the speed at which the network transmits data;

[0103] The maximum data transmission delay between the edge server and the i-th input terminal in the data transmission cycle refers to the maximum time required for data to be transmitted from each terminal device at the sending end to the edge server at the receiving end, usually measured in milliseconds (ms);

[0104] is the maximum packet loss rate of data between the edge server and the i-th input end during the data transmission period, which refers to the maximum value that the ratio of the number of data packets lost during network transmission to the total number of data packets can reach.

[0105] The maximum packet loss rate of data between the above edge server and the i-th input end during the data transmission cycle is shown in Table 1:

[0106] Table 1: The relationship between packet loss rate and its parameters:

[0107] .

[0108] In this embodiment, according to the table of packet loss rates between the above terminal devices and the edge server, different networks have different packet loss rates. The packet loss rate of normal network transmission is very low, and it can be considered normal between 0% and 1%. During the transmission of data packets, due to signal attenuation, noise interference, etc., the longer the distance, the higher the packet loss rate may be. But generally speaking, if the packet loss rate remains at a low level, it is generally considered that the network performance is good, and no obvious network problems will be felt during data transmission;

[0109] is the minimum network throughput between the edge server and the i-th input port during the data transmission cycle, which refers to the minimum value of the amount of data successfully transmitted by the network per unit time, reflecting the transmission capacity of the network;

[0110] is the impact factor corresponding to the unit value of data transmission bandwidth predefined in the environmental resource scheduling cloud platform, It is the impact factor corresponding to the unit value of the maximum data transmission delay time predefined in the environmental resource scheduling cloud platform. It is the impact factor corresponding to the unit value of the maximum data packet loss rate predefined in the environment resource scheduling cloud platform. It is the impact factor corresponding to the predefined network minimum throughput unit value in the environmental resource scheduling cloud platform.

[0111] In a specific embodiment, when used, the impact factor corresponding to the unit value of the data transmission bandwidth, the impact factor corresponding to the unit value of the maximum data transmission delay time, the impact factor corresponding to the unit value of the maximum data packet loss rate, and the impact factor corresponding to the unit value of the minimum network throughput can be directly obtained from the environmental resource scheduling cloud platform. The factors represent the numerical values ​​of the degree of influence of the data transmission bandwidth, the maximum data transmission delay time, the maximum data packet loss rate, and the minimum network throughput on the network transmission performance indicators of each input end of the edge server during the network transmission performance evaluation of each input end of the edge server. The corresponding relationship can be a preset mapping relationship. For example, the data transmission bandwidth and the impact factor corresponding to the unit value of the data transmission bandwidth preset in the environmental resource scheduling cloud platform form a mapping set, and the real-time data transmission bandwidth is brought into the mapping set to obtain the impact factor corresponding to the unit value of the data transmission bandwidth. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, its value range is [0, 1]. The maximum data transmission delay time and the environmental resource scheduling cloud platform The influence factors corresponding to the unit values ​​of the maximum data transmission delay time preset in the cloud platform form a mapping set, and the real-time maximum data transmission delay time is brought into the mapping set to obtain the influence factors corresponding to the unit values ​​of the maximum data transmission delay time, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and its value range in this embodiment is [0, 1]; the influence factors corresponding to the unit values ​​of the maximum data packet loss rate preset in the environment resource scheduling cloud platform form a mapping set, and the real-time maximum data packet loss rate is brought into the mapping set to obtain the influence factors corresponding to the unit values ​​of the maximum data packet loss rate, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and its value range in this embodiment is [0, 1]; and the influence factors corresponding to the unit values ​​of the minimum network throughput preset in the environment resource scheduling cloud platform form a mapping set, and the real-time minimum network throughput is brought into the mapping set to obtain the influence factors corresponding to the unit values ​​of the minimum network throughput, wherein the mapping relationship can be a one-to-one correspondence or a many-to-one relationship, and its value range in this embodiment is [0, 1].

[0112] In this embodiment, the larger the data transmission bandwidth is, the higher the transmission rate is, which can theoretically reduce the data transmission time, thereby reducing the delay in the data transmission process. At the same time, the higher the transmission bandwidth is, the larger the amount of data that the network can process, and therefore the larger the achievable network throughput is. The throughput is also affected by the packet loss rate and delay. For example, a high packet loss rate will cause the data to be retransmitted, thereby reducing the effective throughput; high delay will also slow down the response speed of the connection, affecting the continuity of data transmission. The higher the packet loss rate, the worse the network quality is, which may be caused by network congestion, unstable connection, hardware failure, etc. These reasons often lead to increased delays. For example, when the network is congested, the time for data packets to queue in the router for processing will increase, resulting in increased delays. A high packet loss rate will cause data to be retransmitted, which not only reduces the effective throughput, but also increases the time for data transmission. Because although the retransmitted data packets occupy additional bandwidth and time, they do not increase the amount of effective data actually transmitted. In summary, these four indicators are interrelated and jointly affect the overall performance of the network.

[0113] Furthermore, the compression ratio corresponding to each input end of the edge server is matched, and the specific matching process is:

[0114] According to the network transmission performance indicators of each input end of the edge server, the compression rates corresponding to the predefined network transmission performance indicator intervals are matched. The specific matching process is: a mapping set of network transmission performance indicators and compression rates of each input end of the edge server is obtained from the environmental resource scheduling cloud platform. First, the interval to which the network transmission performance indicators of each input end of the edge server belong is determined, and the compression rate corresponding to the interval is assigned to each input end of the edge server corresponding to the network transmission performance indicator, so as to match the compression rate corresponding to each input end of the edge server.

[0115] The above-mentioned matching matches the compression rate corresponding to each input end of the edge server, which can significantly reduce the amount of data in network transmission according to the network transmission performance of each input end of the edge server. The compressed data occupies less bandwidth during the transmission process, thereby improving the transmission efficiency of the overall network. The compressed data is smaller in size and the time required for transmission is correspondingly reduced, thereby reducing network latency. At the same time, the compressed data occupies less space when stored, reducing the demand for storage space.

[0116] In this embodiment, in the gradient transmission process of the hierarchical federated learning architecture, the communication bandwidth determines the speed of gradient transmission, which in turn affects the training time and model accuracy. By comparing the model generation process of different categories, three models are set as ResNet18, ResNet34 and ResNet50. ATCC-HFL (hierarchical federated learning method with adaptive compression coding) can adaptively compress the model according to different bandwidths on different models and improve the training efficiency. The experimental results are shown in Figure 5 , Figure 6 As shown, Figure 5 This is a performance diagram of the adaptive bandwidth training time of the present invention, where the horizontal axis is accuracy, in percentage, and the vertical axis is training time, in seconds. Figure 5 (a) is a performance diagram of adaptive bandwidth training time for the CIFAR-10 dataset. Figure 5 (b) is a performance diagram of adaptive bandwidth training time for the CIFAR-100 dataset. Figure 6 is the adaptive bandwidth training schedule of the present invention. Under the same bandwidth, all terminal devices communicating with the edge server share 100M bandwidth equally. Under different bandwidths, these terminal devices will randomly allocate 100M bandwidth in proportion. Figure 5 , Figure 6 It can be seen that ATCC-HFL can achieve higher model accuracy with the shortest training time.

[0117] In a specific embodiment, the target accuracy can be set to 0.55, 0.6, 0.65, and 0.7 respectively, and the training delays of ATCC-HFL and other 6 methods to achieve the target accuracy are compared on the datasets CIFAR-10 and CIFAR-100. The results are as follows Figure 7 As shown in Figure 2, ATCC-HFL can achieve the set target accuracy with shorter training delay. Figure 7 It can be seen that when the target accuracy is 0.7, ATCC-HFL reduces the training delay required by other methods by 72.35s, 228.15s, 84.4s, 211.4s, 4.3s, and 391.95s, respectively. Because in a specific embodiment, ATCC-HFL can reduce the waiting time during synchronization aggregation by grouping terminal devices according to computing power, so that the average computing power difference between each group is small.

[0118] S5. Based on the comparison results, the edge server receives the environmental data training model of each terminal device and performs adaptive compression encoding according to the compression rate corresponding to each input end of the edge server. Then, edge aggregation is performed to obtain the aggregation result of the edge server. The cloud server receives the aggregation result of the edge server and performs global aggregation to determine the global aggregation quality index of the cloud server. Finally, it is determined whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of the global aggregation to the environmental resource scheduling cloud platform.

[0119] The above-mentioned adaptive compression coding is a dynamic data compression technology, which can automatically adjust the coding strategy and parameters according to the characteristics of the data or the corresponding compression rate during the coding process to achieve the best compression effect. The core idea of ​​dynamically adjusting the coding table is to dynamically adjust the coding table according to the frequency of characters appearing in the data. During the coding process, if the frequency of a certain character increases significantly, its code in the coding table will become shorter to optimize the code length; on the contrary, if the frequency decreases significantly, the code will become longer, but due to its low frequency of occurrence, the impact on the overall compression efficiency is small; adaptive compression coding is suitable for data with large or unpredictable frequency distribution changes. It can automatically adjust the coding strategy when the data characteristics change, maintaining a high compression efficiency. Since adaptive compression coding does not require statistical frequency information in advance, its coding overhead is low. It does not need to store auxiliary information such as frequency tables, saving storage space.

[0120] Specifically, the cloud server receives the aggregation results of the edge servers and performs global aggregation. Specifically, the cloud server performs global aggregation on the aggregation results of the edge servers according to a preset aggregation interval.

[0121] It should be explained that the cloud server collects the aggregation results from the edge servers at a certain time interval (i.e., the preset aggregation interval), and globally aggregates the aggregation results of the edge servers to form a global data aggregation result, where the preset aggregation interval is not fixed, but is dynamically adjusted by the system according to the system load, data flow or other real-time performance indicators. For example, when the system load is low, the system can automatically shorten the aggregation interval to improve data processing efficiency; when the system load is high, the aggregation interval may be extended to reduce system pressure.

[0122] Furthermore, the global aggregate quality index of the cloud server is determined by:

[0123] Get the cloud server's global aggregation-related data, including the amount of data that the cloud server completes global aggregation, the total amount of data received by the cloud server, and the time required for global aggregation of the cloud server.

[0124] The network transmission monitoring data of the output end of the edge server is obtained, specifically the data transmission bandwidth between the edge server and the output end during the data transmission period, wherein the output end specifically refers to the network connection between the edge server and the cloud server.

[0125] The global aggregated correlation data of the above cloud servers can be extracted from the operation report of the cloud servers.

[0126] The network transmission monitoring data at the output end of the edge server can be extracted from the operation report of the edge server.

[0127] The amount of data globally aggregated by the cloud server is compared with the total amount of data received by the cloud server to obtain the aggregation completion degree of the cloud server.

[0128] Based on the time required for global aggregation of the cloud server, the aggregation completion of the cloud server, the memory usage of each terminal device model generation, and the data transmission bandwidth between the edge server and the output end during the data transmission cycle, the global aggregation quality index of the cloud server is obtained through comprehensive analysis, which is as follows:

[0129] ;

[0130] In the formula, is a global aggregation quality indicator of the cloud server. In this embodiment, it is a standard for measuring key aspects such as performance, reliability, and efficiency achieved by the cloud server in the process of globally aggregating data from edge servers.

[0131] The time required for global aggregation of the cloud server refers to the total time required for the cloud server to complete the unified processing, integration and aggregation of the aggregation results submitted by the edge server. This time length is calculated from the time the cloud server starts to receive the aggregated data from the edge server until all data processing, analysis and aggregation operations are completed and the final global aggregation results are generated;

[0132] The aggregation completion of the cloud server reflects the proportion or number of data sources that the cloud server has successfully collected and integrated. In the data aggregation process, it is crucial to ensure that all necessary data is correctly captured and integrated;

[0133] The memory footprint generated for the i-th terminal device model;

[0134] i is the number of each terminal device, , m is the total number of terminal devices;

[0135] It is the memory reference usage;

[0136] It is the data transmission bandwidth between the edge server and the output end during the data transmission cycle. It is related to the description of the data transmission bandwidth between the edge server and each input end during the data transmission cycle. It refers to the amount of data that can be transmitted by the network connection between the edge server and the cloud server within a certain period of time, that is, within the data transmission cycle. It is usually measured in Mbps (megabits per second) or Gbps (gigabits per second). It determines the speed of network data transmission.

[0137] It should be explained that the data transmission bandwidth between the above-mentioned edge server and each input end during the data transmission cycle, and the data transmission bandwidth between the edge server and the output end during the data transmission cycle generally have different values ​​due to differences in network architecture, equipment performance, data transmission requirements, etc.

[0138] It is the weight factor corresponding to the time required for global aggregation predefined in the environment resource scheduling cloud platform. is the weight factor corresponding to the aggregation completion degree predefined in the environment resource scheduling cloud platform, It is the impact factor corresponding to the unit value of data transmission bandwidth predefined in the environmental resource scheduling cloud platform.

[0139] In a specific embodiment, when used, the weight factor corresponding to the global aggregation required time, the weight factor corresponding to the aggregation completion degree, and the influence factor corresponding to the unit value of the data transmission bandwidth can be directly obtained from the environmental resource scheduling cloud platform. The factors represent the numerical values ​​of the influence of the global aggregation required time, the aggregation completion degree, and the data transmission bandwidth on the global aggregation quality index of the cloud server during the global aggregation quality evaluation of the cloud server. The corresponding relationship can be a pre-set mapping relationship. For example, the global aggregation required time and the weight factor corresponding to the global aggregation required time preset in the environmental resource scheduling cloud platform form a mapping set, and the real-time global aggregation required time is brought into the mapping set to obtain the weight factor corresponding to the global aggregation required time. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, its value range is [0, 1] and the aggregation completion degree and the weight factor corresponding to the aggregation completion degree preset in the environmental resource scheduling cloud platform form a mapping set. The real-time aggregation completion degree is brought into the mapping set to obtain the weight factor corresponding to the aggregation completion degree. The mapping relationship can be a one-to-one correspondence or a many-to-one relationship. In this embodiment, its value range is [0, 1].

[0140] It should be noted that the above The parameter categories described are all data transmission bandwidth, but the value of the factor will vary with the specific usage scenario. The corresponding values ​​of the network transmission performance indicators of each input end of the edge server are The corresponding values ​​of can be the same or different.

[0141] In this embodiment, when the amount of data is constant, the higher the aggregation completion, the shorter the time required for global aggregation, which determines the efficiency of the aggregation algorithm and the processing capacity of the cloud server, and the efficiency of the aggregation algorithm and the processing capacity of the cloud server will directly affect the memory usage. Some efficient algorithms can reduce memory usage and improve resource utilization while ensuring the aggregation completion. When the memory usage is too high, the cloud server may frequently perform disk input and output operations when processing data, increase processing time, and thus extend the time required for global aggregation. In the process of the edge server transmitting aggregated data to the cloud server, the size of the transmission bandwidth directly affects the speed of data transmission. The higher the bandwidth, the faster the data transmission speed, the cloud server can receive the data from the edge server faster and start aggregation processing, thereby shortening the time required for global aggregation. If the bandwidth is insufficient, the data transmission will slow down, which may cause the cloud server to start aggregation processing before receiving all the data, thereby affecting the aggregation completion and the accuracy of the results. In summary, there is a relationship of mutual correlation and mutual influence between the time required for global aggregation, the aggregation completion, the memory usage, and the transmission bandwidth. It is necessary to comprehensively analyze the relationship between these parameters to achieve efficient and stable global aggregation processing.

[0142] Specifically, the process of judging whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of global aggregation to the environment resource scheduling cloud platform is as follows:

[0143] The global aggregation quality index of the cloud server is compared with the preset value of the global aggregation quality index predefined in the environment resource scheduling cloud platform. If the global aggregation quality index of the cloud server is greater than the preset value of the global aggregation quality index, the cloud server to which the hierarchical federated learning architecture belongs will upload the corresponding result of the global aggregation to the environment resource scheduling cloud platform.

[0144] After the above is uploaded to the environmental resource scheduling cloud platform, the environmental resource scheduling cloud platform will schedule environmental resources according to actual needs.

[0145] If the global aggregation quality index of the cloud server is equal to or less than the preset value of the global aggregation quality index, a global aggregation quality warning is issued for the cloud server belonging to the hierarchical federated learning architecture.

[0146] The above-mentioned early warning of the global aggregation quality can be specifically achieved by tracking the progress and quality of global aggregation in real time through the monitoring mechanism of the hierarchical federated learning architecture to ensure that data aggregation is carried out according to the predetermined plan. When an abnormal or unexpected situation is monitored, that is, when the actual global aggregation quality is lower than the threshold, the early warning mechanism of the hierarchical federated learning architecture is automatically triggered, and relevant personnel are notified through emails, text messages, system notifications, etc.

[0147] The monitoring mechanism of the above-mentioned hierarchical federated learning architecture is mainly used to monitor the operation of data quality, security, system performance, and effectiveness of model training during the federated learning process to ensure accurate data processing.

[0148] The warning mechanism of the above hierarchical federated learning architecture is mainly used to ensure that the training process proceeds as expected. If it is found that the training progress of a certain node is seriously lagging behind or the efficiency is abnormal, an early warning can be triggered and corresponding measures can be taken.

[0149] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the present invention, they should all fall within the protection scope of the present invention.

Claims

1. A hierarchical federated learning method with adaptive compression coding, characterized in that: include: S1. Construction of hierarchical federated learning architecture: construct hierarchical federated learning architecture for each terminal device, edge server and cloud server; S2. Obtain data processing related information of each terminal device, evaluate the data processing performance index of each terminal device, and match the edge server corresponding to the terminal device according to the predefined performance index interval; S3. Each terminal device collects environmental data stored in the environmental resource scheduling cloud platform and performs model training to generate an environmental data training model for each terminal device, determines the model generation performance evaluation value of each terminal device, and compares it with the predefined model generation performance evaluation threshold to obtain a comparison result, and enters S5; S4. The edge server monitors the network transmission performance of each input terminal, evaluates the network transmission performance index of each input terminal of the edge server, and matches the compression rate corresponding to each input terminal of the edge server; S5. Based on the comparison results, the edge server receives the environmental data training model of each terminal device and performs adaptive compression encoding and edge aggregation in turn according to the compression rate corresponding to each input end of the edge server to obtain the aggregation result of the edge server. The cloud server receives the aggregation result of the edge server and performs global aggregation to determine the global aggregation quality index of the cloud server. Finally, it is determined whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of the global aggregation to the environmental resource scheduling cloud platform.

2. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The data processing performance index of each terminal device is evaluated, and the specific evaluation process is as follows: The data processing related information of each terminal device specifically includes the number of cores of the central processing unit of each terminal device, the clock frequency of the central processing unit of each terminal device, the data reading speed of the solid-state hard disk of each terminal device, and the data writing speed of the solid-state hard disk of each terminal device; According to the data processing related information of each terminal device, the data processing performance index of each terminal device is obtained through comprehensive analysis. The specific method is as follows: ; In the formula, is the data processing performance index of the i-th terminal device, i is the number of each terminal device, , m is the total number of terminal devices, is the number of cores of the CPU of the i-th terminal device, is the clock frequency of the central processor of the i-th terminal device, is the data reading speed of the solid-state drive of the i-th terminal device, is the data writing speed of the solid state drive of the i-th terminal device, The weight factor corresponding to the number of cores predefined in the environment resource scheduling cloud platform, is the weight factor corresponding to the predefined clock frequency in the environment resource scheduling cloud platform, It is the weight factor corresponding to the data reading speed predefined in the environment resource scheduling cloud platform. is the weight factor corresponding to the data writing speed predefined in the environmental resource scheduling cloud platform, and e is a natural constant.

3. The hierarchical federated learning method of adaptive compression coding according to claim 2, characterized in that: The edge server corresponding to the terminal device is matched, and the specific matching process is as follows: The data processing performance index of each terminal device is compared with the predefined performance index intervals to obtain a number of terminal devices whose data processing performance index belongs to each performance index interval, and the number of terminal devices whose data processing performance index belongs to each performance index interval is arranged in descending order, and the performance index interval corresponding to the number of terminal devices ranked first is extracted. The data processing performance level corresponding to the performance index interval is used as the corresponding level of the terminal devices, and is matched with the edge server corresponding to the preset data processing performance level, so as to obtain the edge server corresponding to the terminal device.

4. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The specific determination process of determining the model generation performance evaluation value of each terminal device is as follows: Obtain model generation-related data for each terminal device, specifically including the time required for model generation for each terminal device, the number of cores of the central processor to which the model generation of each terminal device belongs, the memory usage of the model generation of each terminal device, the data reading speed of the solid-state hard disk to which the model generation of each terminal device belongs, and the data writing speed of the solid-state hard disk to which the model generation of each terminal device belongs; The data reading speed of the solid-state hard disk generated by each terminal device model is compared with the data writing speed of the solid-state hard disk generated by each terminal device model to obtain the data reading and writing efficiency of the solid-state hard disk generated by each terminal device model; Extract the memory reference occupancy from the environment resource scheduling cloud platform; Based on the time required for model generation of each terminal device, the number of cores of the central processor to which the model of each terminal device belongs, the memory usage of the model generation of each terminal device, the memory reference usage and the data reading and writing efficiency of the solid-state drive to which the model of each terminal device belongs, a comprehensive analysis is conducted to obtain the model generation performance evaluation value of each terminal device.

5. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The comparison is performed with the predefined model generation performance evaluation threshold to obtain a comparison result. The specific comparison process is as follows: If the comparison result shows that the model generation performance evaluation value of each terminal device is greater than or equal to the model generation performance evaluation threshold, the environmental data training model of each terminal device is input into the edge server. If the comparison result shows that the model generation performance evaluation value of each terminal device is less than the model generation performance evaluation threshold, a model generation performance warning is issued to each terminal device.

6. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The network transmission performance indicators of each input end of the edge server are evaluated, and the specific evaluation process is as follows: Obtain network transmission monitoring data of each input end of the edge server, including the data transmission bandwidth, maximum data transmission delay, maximum data packet loss rate and minimum network throughput between the edge server and each input end during the data transmission cycle; According to the network transmission monitoring data of each input end of the edge server, the network transmission performance index of each input end of the edge server is obtained through comprehensive analysis.

7. The hierarchical federated learning method of adaptive compression coding according to claim 6, characterized in that: The compression ratio corresponding to each input end of the edge server is matched, and the specific matching process is: According to the network transmission performance index of each input end of the edge server, the compression ratio corresponding to each predefined network transmission performance index interval is matched, so as to match the compression ratio corresponding to each input end of the edge server.

8. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The cloud server receives the aggregation results of the edge servers and performs global aggregation. Specifically, the cloud server performs global aggregation on the aggregation results of the edge servers according to a preset aggregation interval.

9. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The global aggregate quality index of the cloud server is determined by the following specific process: Obtain the cloud server's global aggregation-related data, including the amount of data that the cloud server completes global aggregation, the total amount of data received by the cloud server, and the time required for global aggregation of the cloud server; Obtaining network transmission monitoring data of the edge server output end, specifically the data transmission bandwidth between the edge server and the output end during the data transmission cycle; The amount of data globally aggregated by the cloud server is compared with the total amount of data received by the cloud server to obtain the aggregation completion degree of the cloud server. Based on the time required for global aggregation of the cloud server, the aggregation completion degree of the cloud server, the memory usage of each terminal device model, and the data transmission bandwidth between the edge server and the output end during the data transmission cycle, a comprehensive analysis is performed to obtain the global aggregation quality index of the cloud server.

10. The hierarchical federated learning method of adaptive compression coding according to claim 1, characterized in that: The specific judgment process of judging whether the cloud server to which the hierarchical federated learning architecture belongs uploads the corresponding result of global aggregation to the environment resource scheduling cloud platform is as follows: The global aggregation quality index of the cloud server is compared with the predefined global aggregation quality index preset value. If the global aggregation quality index of the cloud server is greater than the global aggregation quality index preset value, the cloud server to which the hierarchical federated learning architecture belongs will upload the corresponding result of the global aggregation to the environmental resource scheduling cloud platform. If the global aggregation quality index of the cloud server is equal to or less than the global aggregation quality index preset value, a global aggregation quality warning will be issued to the cloud server to which the hierarchical federated learning architecture belongs.

Citation Information

Patent Citations

  • Hierarchical Federated Learning Method and Device for Distributed Deep Neural Networks

    CN113971090B

  • Federal learning-oriented data compression method and system

    CN118868958A

  • Federation learning method, system, terminal device and storage medium

    WO2021008017A1

Cited By

  • Cache aggregation method and device oriented to hierarchical federated learning and storage medium

    CN121907780A