A model training node selection method for hierarchical federated edge learning
By introducing reputation and alliance blockchain management into hierarchical federated edge learning, the problem of insufficient selection and incentive mechanisms for terminal devices and edge servers is solved, the reliability of model training and reputation evaluation are improved, and the security management of reputation is achieved. Enhanced learning performance and model quality.
Patent Information
- Application Number
- CN202111612764.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-12-27
AI Technical Summary
The existing hierarchical federated edge learning technology lacks selection methods and incentive mechanisms for terminal devices and edge servers, which makes it difficult to improve learning performance and model quality, hindering the widespread application of the technology.
Introduce reputation as an indicator to measure the credibility of terminal devices and edge servers, design a weighted calculation method of historical reputation value and current reputation value, combine delay and energy consumption thresholds to limit resource consumption, and manage reputation values through the alliance blockchain to ensure credibility security and non-tamperability.
It improves the reliability of model training and the accuracy of reputation assessment, enhances the willingness of terminal devices and edge servers to participate, ensures safe and effective management of reputation, and solves the problem of credibility and reliable selection of model training nodes.
Smart Images

Figure CN114327889B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communications and federated machine learning, and in particular to a model training node selection method for hierarchical federated edge learning. Background Art
[0002] Federated Learning (FL) is an emerging machine learning technology that uses local data sets of nodes (such as edge servers and terminal devices) for distributed model training. Compared with traditional machine learning that uploads raw data from nodes to remote cloud servers, nodes in FL only share model parameters without uploading raw data, so it can provide privacy protection for network nodes.
[0003] Edge computing (EC) is an emerging technology that sinks mobile computing, network control and storage to the edge of the network (such as base stations and access points). It enables terminal devices with limited resources to run computing-intensive and delay-sensitive applications and improve the privacy of network terminal devices.
[0004] Hierarchical Federated Edge Learning (HFEL) is a new technology that integrates two emerging technologies, FL and EC. By using edge servers as hierarchical federated edge learning intermediaries to aggregate and update local models, it can reduce the transmission overhead of the core network in hierarchical federated edge learning and realize the huge potential of FL with low latency, low energy consumption and high privacy.
[0005] Existing research on hierarchical federated edge learning technology mainly focuses on designing more advanced hierarchical federated edge learning algorithms to achieve better learning performance. It is usually assumed that in the hierarchical federated edge learning process, terminal devices and edge servers unconditionally contribute computing resources, unconditionally provide real local data for model training, and unconditionally have the willingness to train models. However, there is little research on the incentive mechanism for terminal devices participating in training and the selection method of terminal devices, which hinders the development and application of hierarchical federated edge learning. Therefore, in the hierarchical federated edge learning system, it is crucial to study the selection of terminal devices and edge servers participating in model training to improve the model quality of hierarchical federated edge learning, introduce reputation to terminal devices and edge servers to improve the credibility of devices participating in model training, and introduce alliance blockchain to terminal devices and edge servers to improve the immutability of reputation. Summary of the invention
[0006] Existing research mainly focuses on designing federated learning algorithms to improve learning performance, but there is little research on challenges such as incentive mechanisms for participating training terminal devices and terminal device selection methods. These challenges have hindered the widespread application of federated learning. Therefore, this patent invents a model training node selection method for hierarchical federated edge learning. The specific technical methods used are as follows:
[0007] A model training node selection method for hierarchical federated edge learning is characterized in that reputation is introduced in hierarchical federated edge learning as a credibility indicator for measuring terminal devices and edge servers; a delay threshold and an energy consumption threshold are introduced in hierarchical federated edge learning as indicators for limiting resource consumption of terminal devices and edge servers during model training; a calculation method for weighting historical reputation values and current reputation values is designed to update the reputation values of terminal devices and edge servers participating in model training; and the method specifically comprises the following steps:
[0008] Step 1: Release of task conditions
[0009] Cloud servers publish hierarchical federated edge learning tasks Task T n Minimum credibility for terminal equipment Requirements and minimum reputation for edge servers The requirements are as follows: in each model training process of each iteration, task T n The delay threshold L for all terminal devices and edge servers participating in model training low and energy consumption threshold E low Requirements and tasks T n The accuracy requirement for each model; where T n is a hierarchical federated edge learning task numbered n, where n is a positive integer and the models include a local model, an edge model, and a global model;
[0010] Step 2: Selection of terminal devices and edge servers
[0011] According to the hierarchical federated edge learning task T published by the cloud server n The minimum reputation requirement for the terminal devices and edge servers participating in the training is that the reputation blockchain selects a reputation value not less than the hierarchical federated edge learning task T n The credibility requirement of the terminal device and edge servers And transmit the selection result to the cloud server, where The number of end devices selected for the reputation blockchain, The number of edge servers selected for the reputation blockchain, D i is the terminal device numbered i, N m is the edge server numbered m, And i and m are both positive integers;
[0012] Step 3: Conducting hierarchical federated edge learning
[0013] The cloud server performs hierarchical federated edge learning based on the terminal devices and edge servers that meet the learning conditions selected by the reputation blockchain;
[0014] Step 4: Calculation and update of reputation value
[0015] Assume that the terminal device D i The historical reputation of Edge Server N m The historical reputation of The cloud server calculates the latest reputation value by weighting the historical reputation of each terminal device and edge server and the reputation obtained through model training, and updates and stores it in the reputation blockchain to provide a reputation basis for the selection of terminal devices and edge servers in the model training process of the next task; The highest reputation value that a terminal device and edge server can obtain, set by the reputation manager.
[0016] Further technical solutions include:
[0017] The hierarchical federated edge learning in step 3 includes the following processes:
[0018] Process (1): System initialization; the cloud server sends the initial parameters of the global model to the hierarchical federated edge learning task T selected by the reputation blockchain n The terminal device D and edge server N required by reputation;
[0019] Process (2): Local model training; the terminal device D first calculates whether the delay condition and energy consumption condition of the local model training are met at the same time. If not, the terminal device does not participate in the model training of this iteration. If both are met, the local model is trained based on the data it has and the parameters of the cloud server, and then the local model parameters are transmitted to the edge server N.
[0020] Process (3): Elimination of unreliable terminal devices and edge model training; the edge server evaluates the quality of each local model and removes the terminal devices whose local model update quality drops by more than the system-given threshold from the terminal device set D that meets the learning conditions. The removed terminal devices no longer participate in task T nThe model training process; then, the edge server calculates whether the delay condition and energy consumption condition of edge model training are met at the same time. If they are not met at the same time, the edge server does not participate in the model training of this iteration. If they are met at the same time, the edge server aggregates and updates the parameters of the local model after elimination to obtain the latest edge model, and sends the edge model parameters to the terminal device after elimination;
[0021] Process (4): Repeat process (2) and process (3) until the edge model training reaches the accuracy given by the system or the loss function in the training process converges, and then transmit the updated edge model parameters to the cloud server;
[0022] Process (5): Elimination of unreliable edge servers and global model training; the cloud server evaluates the quality of each edge model and eliminates edge servers whose edge model update quality drops by more than a given threshold from the edge server set N that meets the learning conditions. The eliminated edge servers no longer participate in task T n The cloud server then aggregates and updates the global model it has and the parameters of the removed edge models to obtain the latest global model, and then transmits the global model parameters to the remaining edge servers and terminal devices;
[0023] Process (6): Repeat process (2), process (3), process (4) and process (5) until the global model training reaches the accuracy given by the system or the loss function in the training process converges.
[0024] The update calculation process of the reputation value in step 4 is:
[0025] Assume that the terminal devices and edge servers are not excluded during the entire model training process, that is, the hierarchical federated edge learning task T is completed. n The reputation gained is in, λ is the task completed by the terminal device and edge server T n The maximum credit value that can be obtained is set by the cloud server manager. Assume that task T n The importance of terminal device D is α D , and its calculation formula is Task T n The importance of edge server N is α N , and its calculation formula is
[0026] If the terminal device D i It is not excluded during the entire federated edge learning model training process, assuming Then the terminal device D i The latest reputation value Expressed as:
[0027] If the terminal device D i It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the terminal device D i The latest reputation value Expressed as:
[0028] If the edge server N m It is not excluded during the entire federated edge learning model training process, assuming Then the edge server N m The latest reputation value Expressed as:
[0029] If the edge server N m It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the edge server N m The latest reputation value Expressed as:
[0030] When the reputation value update calculation of the edge server and terminal device is completed, the cloud server stores the latest reputation value in the reputation blockchain to provide a reputation basis for the selection of terminal devices and edge servers in the model training process of the next task.
[0031] The process in which the terminal device in step 3 (2) calculates whether the delay condition and energy consumption condition of local model training are met at the same time is:
[0032] Assume that the terminal device D i The CPU frequency is The amount of data for model training And the number of CPU revolutions required for local model training 1 bit of data Therefore, the terminal device D i Time required to train a local model Need to be lower than the delay threshold L low , that is, satisfying:
[0033] Terminal device D i Energy consumption of training local models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the terminal device D i The constant coefficient related to the CPU structure, in this method The value is 10 -26 .
[0034] The process of the edge server calculating whether the delay condition and energy consumption condition of edge model training are met at the same time in the process (3) of step three is as follows:
[0035] Assume that the edge server N m The CPU frequency is The amount of data for model training And the number of CPU revolutions required for edge model training 1 bit of data Therefore, the edge server N m Time required to train edge models Need to be lower than the delay threshold L low , that is, satisfying:
[0036] Edge Server N m Energy consumption of training edge models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the edge server N m The constant coefficient related to the CPU structure, in this method The value is 10 -28 .
[0037] The method for the edge server in the process (3) of step three to perform quality assessment on each local model is as follows: the edge server uses an attack detection scheme to detect the local models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the edge server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the edge server uses the FoolsGold attack detection method.
[0038] The method for the cloud server in the process (5) of step three to perform quality assessment on each edge model is as follows: the cloud server uses an attack detection scheme to detect the edge models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the cloud server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the cloud server uses the FoolsGold attack detection method.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] In many real-life scenarios, reputation can be used as an effective currency. Therefore, the present invention provides a model training node selection method for hierarchical federated edge learning. By introducing reputation as a credibility indicator for measuring terminal devices and edge servers in hierarchical federated edge learning, and introducing latency and energy consumption as resource consumption indicators for measuring terminal devices and edge servers, the reliability of model training can be enhanced collaboratively, and the problem of reliable selection of model training nodes in the network can be solved. The present invention designs a reputation update calculation method in hierarchical federated edge learning, and obtains the latest reputation value by weighted calculation of the historical reputation of the terminal device or edge server and the reputation value obtained in the current model training, which can improve the accuracy of the hierarchical federated edge learning system's reputation evaluation of the terminal device and edge server, and solve the problem of credibility evaluation of model training nodes in the network. The present invention manages the reputation values of terminal devices and edge servers in a distributed manner by introducing alliance blockchain in hierarchical federated edge learning, which can achieve safe and effective management of reputation and ensure the non-tamperability and non-repudiation of reputation. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The present invention will be further described below in conjunction with the accompanying drawings:
[0042] Figure 1 A system overall architecture diagram of a model training node selection method for hierarchical federated edge learning provided for a specific implementation of the present invention.
[0043] Figure 2 A flowchart of a model training node selection method for hierarchical federated edge learning provided by the present invention.
[0044] Figure 3 A specific learning process flow chart of hierarchical federated edge learning in step three of a model training node selection method for hierarchical federated edge learning provided by the present invention. DETAILED DESCRIPTION
[0045] The present invention is described in detail below in conjunction with the accompanying drawings:
[0046] The present invention provides a model training node selection method for hierarchical federated edge learning. In order to make the selection method and features of the present invention clearer, the present invention will be described in detail below with reference to the accompanying drawings.
[0047] Figure 1The overall system architecture diagram of a model training node selection method for hierarchical federated edge learning provided by the specific embodiment of the present invention. In the figure, the whole system is divided into three parts: hierarchical federated edge learning, alliance blockchain management and reputation value update. Among them, in the hierarchical federated edge learning part, E represents edge model parameters, G represents global model parameters, L represents local model parameters, dotted arrows represent uploading of model parameter data, and solid arrows represent downloading of model parameter data. In hierarchical federated edge learning, there are three layers: cloud layer, edge layer and terminal layer. The cloud layer is the publisher of hierarchical federated edge learning tasks and the setter of requirements for the entire system, and is composed of cloud servers, where cloud servers are large servers; the edge layer is located between the cloud layer and the terminal layer, and is composed of base stations and small servers. Local model aggregation updates are performed during hierarchical federated edge learning, which can reduce the core network transmission overhead, reduce latency, reduce energy consumption and improve privacy; the terminal layer is the layer where the terminal devices in the entire system are located, and is composed of terminal devices (for example: laptops, smart phones, smart homes and other devices), which play a role in training local models in hierarchical federated edge learning. The present invention introduces reputation as a credibility indicator for measuring terminal devices and edge servers in hierarchical federated edge learning, and introduces latency and energy consumption as resource consumption indicators for measuring terminal devices and edge servers, which can collaboratively enhance the reliability of model training, solve the problem of reliable selection of model training nodes in the network, and introduce alliance blockchain management into the system to manage and store the reputation data of terminal devices and edge servers in a distributed manner. The server in the alliance blockchain management module stores the reputation data of terminal devices and edge servers. The present invention designs a method for calculating the reputation value update, such as Figure 1 As shown in the reputation update module in , the latest reputation can be calculated by weighting the historical reputation and the reputation value obtained by the device (including terminal devices and edge servers) through model training. Finally, the alliance blockchain will store and update the calculation results of the latest reputation.
[0048] Figure 2 This is a flowchart of a model training node selection method for hierarchical federated edge learning of the present invention. The entire selection method can be divided into four main parts: publishing of requirements, selection of terminal devices and edge servers, implementation of hierarchical federated edge learning, and calculation and update of reputation values.
[0049] The specific steps of this method are as follows:
[0050] First, the cloud server publishes the hierarchical federated edge learning task Task T n Minimum credibility for terminal equipment Requirements and minimum reputation for edge servers The requirements are as follows: in each model training process of each iteration, task T n The delay threshold L for all terminal devices and edge servers participating in model training low and energy consumption threshold E low Requirements and tasks T n The accuracy requirement for each model; where T n is a hierarchical federated edge learning task numbered n, where n is a positive integer and the models include a local model, an edge model and a global model.
[0051] Then, according to the hierarchical federated edge learning task T published by the cloud server n The minimum reputation requirement for the terminal devices and edge servers participating in the training is that the reputation blockchain selects a reputation value not less than the hierarchical federated edge learning task T n The credibility requirement of the terminal device and edge servers And transmit the selection result to the cloud server, where The number of end devices selected for the reputation blockchain, The number of edge servers selected for the reputation blockchain, D i is the terminal device numbered i, N m is the edge server numbered m, And both i and m are positive integers.
[0052] Secondly, the cloud server performs hierarchical federated edge learning based on the terminal devices and edge servers that meet the learning conditions selected by the reputation blockchain. The hierarchical federated edge learning process is mainly divided into four parts: system initialization, local model training, removal of unreliable terminal devices and edge model training, and removal of unreliable edge servers and global model training. The specific learning process flow chart is as follows: Figure 3 As shown, the specific description of the learning process is shown in process (1) to process (6):
[0053] Process (1): System initialization. The cloud server sends the initial parameters of the global model to the hierarchical federated edge learning task T selected by the reputation blockchain. n The terminal device D and edge server N required by reputation.
[0054] Process (2): Local model training. The terminal device D first calculates whether the delay condition and energy consumption condition of the local model training are met at the same time. If they are not met at the same time, the terminal device does not participate in the model training of this iteration. If they are met at the same time, the local model is trained based on the data it has and the parameters of the cloud server, and then the local model parameters are transmitted to the edge server. The specific calculation method is described as follows:
[0055] Assume that the terminal device D i The CPU frequency is The amount of data for model training And the number of CPU revolutions required for local model training 1 bit of data Therefore, the terminal device D i Time required to train a local model Need to be lower than the delay threshold L low , that is, satisfying:
[0056] Terminal device D i Energy consumption of training local models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the terminal device D i The constant coefficient related to the CPU structure, in this method The value is 10 -26 .
[0057] Process (3): Elimination of unreliable terminal devices and edge model training. The edge server evaluates the quality of each local model and removes terminal devices whose local model update quality drops by more than a given threshold from the terminal device set D that meets the learning conditions. The removed terminal devices no longer participate in task T n model training process; then, the edge server calculates whether the delay condition and energy consumption condition of edge model training are met at the same time. If not, the edge server does not participate in the model training of this iteration. If both are met, the edge server aggregates and updates the parameters of the eliminated local models based on the edge model it owns to obtain the latest edge model, and sends the edge model parameters to the eliminated terminal devices.
[0058] Among them, the specific method for the edge server to evaluate the quality of each local model is: the edge server uses an attack detection scheme to detect the local models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the edge server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the edge server uses the FoolsGold attack detection method.
[0059] The specific calculation process of whether the edge server calculates whether it meets the delay conditions and energy consumption conditions of edge model training at the same time is:
[0060] Assume that the edge server N m The CPU frequency is The amount of data for model training And the number of CPU revolutions required for edge model training 1 bit of data Therefore, the edge server N m Time required to train edge models Need to be lower than the delay threshold L low , that is, satisfying:
[0061] Edge Server N m Energy consumption of training edge models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the edge server N m The constant coefficient related to the CPU structure, in this method The value is 10 -28 .
[0062] Process (4): Repeat process (2) and process (3) until the edge model training reaches the accuracy given by the system or the loss function in the training process converges, and then transmit the updated edge model parameters to the cloud server.
[0063] Process (5): Elimination of unreliable edge servers and global model training. The cloud server evaluates the quality of each edge model and removes edge servers whose edge model update quality drops by more than a given threshold from the edge server set N that meets the learning conditions. The removed edge servers no longer participate in task T n The cloud server then aggregates and updates the global model it owns and the parameters of the removed edge models to obtain the latest global model, and then transmits the global model parameters to the remaining edge servers and terminal devices.
[0064] Among them, the specific method of the cloud server to evaluate the quality of each edge model is: the cloud server uses an attack detection scheme to detect the edge models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the cloud server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the cloud server uses the FoolsGold attack detection method.
[0065] Process (6): Repeat process (2), process (3), process (4) and process (5) until the global model training reaches the accuracy given by the system or the loss function in the training process converges.
[0066] Finally, suppose that the terminal device D i The historical reputation of Edge Server N m The historical reputation of The cloud server calculates the latest reputation value by weighting the historical reputation of each terminal device and edge server and the reputation obtained through model training; The highest reputation value that a terminal device and edge server can obtain, set by the reputation manager.
[0067] In the specific implementation process, it is assumed that Then the historical reputation range of the terminal device and edge server is The reputation weighted calculation method of the terminal device and edge server is described as:
[0068] Assume that the terminal devices and edge servers are not excluded during the entire model training process, that is, the hierarchical federated edge learning task T is completed. n The reputation gained is In the specific implementation process, it is advisable to set the cloud server management party, the terminal device and the edge server to complete the task T n The maximum achievable reputation value λ is taken as 10, so The value range is Assume that task T n The importance of terminal device D is α D , and its calculation formula is Task T n The importance of edge server N is α N , and its calculation formula is
[0069] If the terminal device D i It is not excluded during the entire federated edge learning model training process, assuming Then the terminal device D i The latest reputation value Expressed as:
[0070] If the terminal device D i It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the terminal device D i The latest reputation value Expressed as:
[0071] If the edge server N m It is not excluded during the entire federated edge learning model training process, assuming Then the edge server N m The latest reputation value Expressed as:
[0072] If the edge server N m It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the edge server N m The latest reputation value Expressed as:
[0073] When the reputation value update calculation of the edge server and terminal device is completed, the cloud server stores the latest reputation value in the reputation blockchain to provide a reputation basis for the selection of terminal devices and edge servers in the model training process of the next task.
Claims
1. A model training node selection method for hierarchical federated edge learning, characterized in that: In hierarchical federated edge learning, reputation is introduced as a credibility indicator for measuring terminal devices and edge servers. In hierarchical federated edge learning, delay thresholds and energy consumption thresholds are introduced as indicators to limit resource consumption of terminal devices and edge servers during model training. A weighted calculation method of historical reputation value and current reputation value is designed to update the reputation value of terminal devices and edge servers participating in model training. The specific steps include: Step 1: Release of task conditions; Cloud servers publish hierarchical federated edge learning tasks Task T n Minimum credibility for terminal equipment Requirements and minimum reputation for edge servers The requirements are as follows: in each model training process of each iteration, task T n The delay threshold L for all terminal devices and edge servers participating in model training low and energy consumption threshold E low Requirements and tasks T n The accuracy requirement for each model; where T n is a hierarchical federated edge learning task numbered n, where n is a positive integer and the models include a local model, an edge model, and a global model; Step 2: Selection of terminal devices and edge servers; According to the hierarchical federated edge learning task T published by the cloud server n The minimum reputation requirement for the terminal devices and edge servers participating in the training is that the reputation blockchain selects a reputation value not less than the hierarchical federated edge learning task T n The credibility requirement of the terminal device and edge servers And transmit the selection result to the cloud server, where The number of end devices selected for the reputation blockchain, The number of edge servers selected for the reputation blockchain, D i is the terminal device numbered i, N m is the edge server numbered m, And i and m are both positive integers; Step 3: Conduct hierarchical federated edge learning; The cloud server performs hierarchical federated edge learning based on the terminal devices and edge servers that meet the learning conditions selected by the reputation blockchain; Step 4: Calculation and update of reputation value; Assume that the terminal device D i The historical reputation of Edge Server N m The historical reputation of The cloud server calculates the latest reputation value by weighting the historical reputation of each terminal device and edge server and the reputation obtained through model training, and updates and stores it in the reputation blockchain to provide a reputation basis for the selection of terminal devices and edge servers in the model training process of the next task; l is the highest reputation value that the terminal device and edge server can obtain, set by the reputation management party.
2. According to a model training node selection method for hierarchical federated edge learning according to claim 1, it is characterized in that: The hierarchical federated edge learning in step 3 includes the following processes: Process (1): System initialization; the cloud server sends the initial parameters of the global model to the hierarchical federated edge learning task T selected by the reputation blockchain n The terminal device D and edge server N required by reputation; Process (2): Local model training; the terminal device D first calculates whether the delay condition and energy consumption condition of the local model training are met at the same time. If not, the terminal device does not participate in the model training of this iteration. If both are met, the local model is trained based on the data it has and the parameters of the cloud server, and then the local model parameters are transmitted to the edge server N. Process (3): Elimination of unreliable terminal devices and edge model training; the edge server evaluates the quality of each local model and removes the terminal devices whose local model update quality drops by more than the system-given threshold from the terminal device set D that meets the learning conditions. The removed terminal devices no longer participate in task T n The model training process; Then, the edge server calculates whether the delay condition and energy consumption condition of edge model training are met at the same time. If they are not met at the same time, the edge server does not participate in the model training of this iteration. If they are met at the same time, the edge server aggregates and updates the parameters of the local model after elimination to obtain the latest edge model, and sends the edge model parameters to the terminal device after elimination. Process (4): Repeat process (2) and process (3) until the edge model training reaches the accuracy given by the system or the loss function in the training process converges, and then transmit the updated edge model parameters to the cloud server; Process (5): Elimination of unreliable edge servers and global model training; the cloud server evaluates the quality of each edge model and removes edge servers whose edge model update quality drops by more than a given threshold from the edge server set N that meets the learning conditions. The removed edge servers no longer participate in task T n The cloud server then aggregates and updates the global model it has and the parameters of the removed edge models to obtain the latest global model, and then transmits the global model parameters to the remaining edge servers and terminal devices; Process (6): Repeat process (2), process (3), process (4) and process (5) until the global model training reaches the accuracy given by the system or the loss function in the training process converges.
3. According to a model training node selection method for hierarchical federated edge learning according to claim 2, it is characterized in that: The update calculation process of the reputation value in step 4 is: Assume that the terminal devices and edge servers are not excluded during the entire model training process, that is, the hierarchical federated edge learning task T is completed. n The reputation gained is in, λ is the task completed by the terminal device and edge server T n The maximum credit value that can be obtained is set by the cloud server manager. Assume that task T n The importance of terminal device D is α D , and its calculation formula is Task T n The importance of edge server N is α N , and its calculation formula is If the terminal device D i It is not excluded during the entire federated edge learning model training process, assuming Then the terminal device D i The latest reputation value Expressed as: If the terminal device D i It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the terminal device D i The latest reputation value Expressed as: If the edge server N m It is not excluded during the entire federated edge learning model training process, assuming Then the edge server N m The latest reputation value Expressed as: If the edge server N m It is eliminated during the training process of the entire federated edge learning model, that is, it fails to complete the hierarchical federated edge learning task T n , assuming Then the edge server N m The latest reputation value Expressed as: When the reputation value update calculation of the edge server and terminal device is completed, the cloud server stores the latest reputation value in the reputation blockchain to provide a reputation basis for the selection of terminal devices and edge servers in the model training process of the next task.
4. A model training node selection method for hierarchical federated edge learning according to claim 2 or claim 3, characterized in that: The process in which the terminal device in step 3 (2) calculates whether the delay condition and energy consumption condition of local model training are met at the same time is: Assume that the terminal device D i The CPU frequency is The amount of data for model training And the number of CPU revolutions required for local model training 1 bit of data Therefore, the terminal device D i Time required to train a local model Need to be lower than the delay threshold L low , that is, satisfying: Terminal device D i Energy consumption of training local models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the terminal device D i The constant coefficient related to the CPU structure, in this method The value is 10 -26 .
5. A model training node selection method for hierarchical federated edge learning according to claim 2 or claim 3, characterized in that: The process of the edge server calculating whether the delay condition and energy consumption condition of edge model training are met at the same time in the process (3) of step three is as follows: Assume that the edge server N m The CPU frequency is The amount of data for model training And the number of CPU revolutions required for edge model training 1 bit of data Therefore, the edge server N m Time required to train edge models Need to be lower than the delay threshold L low , that is, satisfying: Edge Server N m Energy consumption of training edge models The energy consumption threshold E must be lower than low , that is, satisfying: in, Indicates that the edge server N m The constant coefficient related to the CPU structure, in this method The value is 10 -28 .
6. A model training node selection method for hierarchical federated edge learning according to claim 2 or claim 3, characterized in that: The method for the edge server in the process (3) of step three to perform quality assessment on each local model is as follows: the edge server uses an attack detection scheme to detect the local models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the edge server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the edge server uses the FoolsGold attack detection method.
7. A model training node selection method for hierarchical federated edge learning according to claim 2 or claim 3, characterized in that: The method for the cloud server in the process (5) of step three to perform quality assessment on each edge model is as follows: the cloud server uses an attack detection scheme to detect the edge models it receives one by one. During the detection process, for independent and identically distributed data scenarios, the cloud server uses the RONI attack detection method, and for non-independent and identically distributed data scenarios, the cloud server uses the FoolsGold attack detection method.
