A Federated Learning Method Based on Two-Way Authentication in an Industrial Internet Edge Computing Environment
By introducing a two-way authentication and dynamic reputation assessment mechanism based on the OPAQUE protocol in the industrial internet edge computing environment, the security and adaptability issues of centralized and decentralized federated learning are solved, and a secure and robust model training and transmission process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2026-03-13
AI Technical Summary
Existing centralized federated learning methods are vulnerable to man-in-the-middle attacks and identity forgery attacks. Decentralized federated learning methods have high network complexity and difficulty in node authentication, making it difficult to support dynamic node joining and leaving. Furthermore, they do not evaluate the legitimacy of client identities and the reliability of training behavior, which makes the model susceptible to interference from low-quality or malicious nodes, thus reducing the overall model performance.
A two-way authentication mechanism based on the OPAQUE protocol is adopted, combined with a dynamic participant reputation assessment and screening mechanism. Secure authentication is constructed through blinded cryptography, and a model upload validity verification and reputation update mechanism are introduced to ensure secure communication between the client and the central server, and to perform real-time screening and management of client reputation.
It effectively prevents man-in-the-middle attacks and identity forgery, supports dynamic node joining and leaving, suppresses interference from low-quality or malicious nodes, improves the security and adaptability of model training, and ensures privacy protection and tamper-proof capabilities during model transmission and aggregation.
Smart Images

Figure CN120768650B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial internet and distributed machine learning security, and more specifically, relates to a federated learning method based on two-way authentication in an industrial internet edge computing environment. Background Technology
[0002] In recent years, Federated Learning (FL) has attracted much attention for its ability to collaboratively train models without disclosing users' local data, and has been widely applied in various industrial scenarios such as smart manufacturing, industrial edge control, and distributed energy management. This framework achieves a balance between data privacy protection and modeling performance by delegating model training tasks to various edge nodes and only uploading local model updates to the central server for aggregation after training.
[0003] Currently, federated learning, as an important method for achieving data collaboration and model sharing in the Industrial Internet, has developed several typical architectures, mainly including centralized federated learning methods, decentralized federated learning methods, and cross-device federated learning methods. Among them, the centralized method uses a central server as a coordinator, and after training locally through multiple edge nodes, the model parameters are uploaded to the server for aggregation and update; the decentralized method eliminates the fixed center and usually uses point-to-point negotiation updates or graph computation to achieve model synchronization; while the cross-device federated learning method is oriented towards distributed collaboration of heterogeneous computing resources or cross-regional terminals, emphasizing the optimized design with fault tolerance and asynchronous communication mechanisms.
[0004] However, all of the above-mentioned federated learning methods have some significant drawbacks, including:
[0005] First, the aforementioned centralized federated learning methods generally rely on the implicit trust of the client in the central server and do not introduce an effective identity authentication mechanism, making them extremely vulnerable to man-in-the-middle attacks and identity forgery attacks in actual deployments, making it difficult to guarantee the overall security of the federated system.
[0006] Second, although the above-mentioned decentralized federated learning method weakens the dependence on the central server, its network complexity is high, the authentication between nodes is difficult, and it is difficult to support the addition and removal of dynamic nodes, resulting in poor adaptability in large-scale edge computing environments.
[0007] Third, although the two federated learning methods mentioned above take into account the issues of device heterogeneity and communication asymmetry, they usually do not evaluate and screen the legitimacy of the client's identity and the reliability of the training behavior. They are easily interfered with by low-quality or malicious nodes, which can reduce the overall model performance or even cause model pollution. Summary of the Invention
[0008] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a federated learning method based on two-way authentication in an industrial internet edge computing environment. Its purpose is to solve the technical problems of existing centralized federated learning methods, which are highly vulnerable to man-in-the-middle attacks and identity forgery attacks in practical deployments due to the lack of an effective identity authentication mechanism, making it difficult to guarantee the overall security of the federated system; the technical problems of existing decentralized federated learning methods, which suffer from high network complexity, difficulty in inter-node authentication, and difficulty in supporting the addition and removal of dynamic nodes, resulting in poor adaptability in large-scale edge computing environments; and the technical problems of existing federated learning methods, which typically do not evaluate and screen the legitimacy of client identities and the reliability of training behavior, making them susceptible to interference from low-quality or malicious nodes in the model update process, thereby reducing overall model performance or even causing model pollution.
[0009] To achieve the above objectives, according to one aspect of the present invention, a federated learning method based on two-way authentication is provided in an industrial internet edge computing environment, the industrial internet edge computing environment including a central server and multiple clients, the federated learning method comprising the following steps:
[0010] (1) The central server initializes the current federated learning round number t=1 and sets the training number t_last that last completed aggregation to 0;
[0011] (2) The central server determines whether the current round number t is equal to the training number t_last+1 of the most recent completed aggregation. If so, proceed to step (3); otherwise, proceed to step (26).
[0012] (3) The central server retrieves all clients that have completed registration with the central server from the local registration database, as well as the unique identifier ID of each client. i The unique identifiers of all clients constitute the first unique identifier set. Where N represents the total number of clients that have completed registration with the central server, i∈[1,N];
[0013] (4) Set the counter cnt1 = 1 on the central server;
[0014] (5) The central server determines whether the counter cnt1 is equal to the total number N of clients that have completed registration with the central server. If yes, proceed to step (8); otherwise, proceed to step (6).
[0015] (6) The first unique identifier set obtained by the central server from step (3) Get the unique identifier ID of the cnt1th client. cnt1 And based on this unique identifier ID cnt1Check the local registration database of the central server to see if the corresponding client has been bound to the central server; if so, proceed to step (7); otherwise, proceed to step (6-1).
[0016] (7) The central server sets the counter cnt1 = cnt1 + 1 and returns to step (5);
[0017] (8) The central server obtains a second set of unique identifiers consisting of the unique identifiers of all clients that have completed binding with the central server. Where n represents the second unique identifier set Size;
[0018] (9) Set the counter cnt2 = 1 on the central server;
[0019] (10) The central server determines whether the counter cnt2 is equal to the second unique identifier set obtained in step (8). If the size n is greater than or equal to n, proceed to step (15); otherwise proceed to step (11).
[0020] (11) The central server uses the second unique identifier set Get the unique identifier ID of the cnt2th client. cnt2 Retrieve the historical communication delay records {d1,d2,...,d...} from the local historical record database of the central server during the most recent M training sessions for the client cnt2. M} and task participation rating records {q1,q2,...,q M}, and based on the historical communication delay record and the task participation scoring record, obtain the average response delay (Delay) of the cnt2th client. cnt2 And behavioral rating Trust cnt2 The value of M ranges from 5 to 20;
[0021] (12) The average delay of the central server to the 2nd client obtained in step (11) is Delay. cnt2 And behavioral rating Trust cnt2 Perform a weighted calculation to obtain the reputation value R of the cnt2th client. cnt2 ;
[0022] (13) The central server determines the reputation value R of the second client obtained in step (12). cnt2 Is it greater than or equal to the preset reputation threshold R? th If so, then add the cnt2th client to the training set. Then proceed to step (14); otherwise proceed directly to step (14).
[0023] (14) The central server sets cnt2 = cnt2 + 1 and returns to step (10);
[0024] (15) The client generates an authentication random number r′, performs blinding processing on the local registration password P and the authentication random number r′ to obtain a second blinding request u′, and sends the second blinding request u′ to the central server;
[0025] (16) The central server performs OPRF operation on the second blinding request u′ from the client to obtain the authentication response value v′, retrieves the encrypted registration credential EncEnv from the local registration database of the central server, and sends the authentication response value v′ and the encrypted registration credential EncEnv to the client.
[0026] (17) The client performs deblinding processing on the authentication response value v′ from the central server to obtain the original authentication value v, and uses the AES-256-GCM encryption algorithm to decrypt the encrypted registration credential EncEnv to obtain the key env_key;
[0027] (18) The client concatenates the original authentication value v and the key env_key obtained in step (17) and inputs the concatenation result into the key derivation function KDF to generate the shared key K;
[0028] (19) The client uses the Argon2 algorithm to perform an expansion operation on the shared key K obtained in step (18) to obtain the encryption key SK and the integrity key MK;
[0029] (20) The central server retrieves the global model parameter vector w obtained after training round t_last, which is stored locally. t _last The encryption key SK and integrity key MK obtained in step (19) are used to modify the parameter vector w. t_last Perform AES-256-GCM symmetric encryption to obtain the global encryption model Enc after training round t_last. SK (w t_last The global model integrity label (MAC) obtained after training t_last rounds. MK (w t_last The global encryption model and its corresponding global model integrity tag are sent to each client.
[0030] (21) Each client performs symmetric decryption and integrity verification on the encrypted model and corresponding integrity label from the central server in sequence to obtain the parameter vector w of the global model after training round t_last. t_last ;
[0031] (22) Each client uses its locally stored local data sample set D i The parameter vector w of the global model obtained after training the t_last rounds obtained in step (21) t_last Perform local model training to obtain the client model parameter vector w for the i-th client after t rounds of training. i t Where i∈[1, the total number of clients in the industrial internet edge computing environment];
[0032] (23) Each client uses the encryption key SK and integrity key MK obtained in step (19) to modify the client model parameter vector w obtained by the i-th client after t rounds of training in step (22). i t Perform AES-256-GCM symmetric encryption to obtain the client encryption model Enc obtained by the i-th client after t rounds of training. SK (w i t ), and the client model integrity label (MAC) obtained by the i-th client after t rounds of training. MK (w i t ), and encode the client encryption model Enc SK (w i t Client-side model integrity label (MAC) MK (w i t ), and the local data sample set D stored locally on the client. i The total number of samples n i Send to the central server;
[0033] (24) The central server processes the client encryption model Enc obtained from the i-th client after t rounds of training. SK (w i t The client model integrity label (MAC) obtained by the i-th client after t rounds of training. MK (w i t The decryption and label verification operations are performed sequentially to obtain the client model parameter vector w obtained by the i-th client after t rounds of training. i t , where i∈[1, the total number of clients in the industrial internet edge computing environment];
[0034] (25) The central server uses the local data sample set D stored by the client. iThe total number of samples n i A weighted average aggregation operation is performed on the parameter vectors of all client models obtained in step (24) after t rounds of training to generate the global model parameter vector w after t rounds of training. t ;
[0035] (26) The central server will use the global model parameter vector w obtained after t training rounds obtained in step (25) t Store locally, update the training ID t_last = t for the most recent aggregation, and calculate the global model parameter vector w obtained after t training rounds. t The global model parameter vector w obtained after t-1 training rounds t-1 Euclidean distance between them ||w t -w t-1 ||2, and determine the Euclidean distance||w t -w t-1 If ||2 is greater than the preset convergence threshold ∈, then return to step (2); otherwise, the process ends.
[0036] Preferably, the process of binding the client to the central server includes the following sub-steps:
[0037] (6-1) The client obtains the local user credentials P, performs blinding processing on the obtained local user credentials P to obtain the first blinding request u, and sends the first blinding request u to the central server; wherein the length of the local user credentials P is not less than 8 characters;
[0038] (6-2) The central server performs an indistinguishable pseudo-random function OPRF operation on the first blinded request u from the client to obtain the response value v;
[0039] (6-3) The central server will combine the response value v obtained in step (6-2) with the unique identifier ID of the cnt1th client. cnt1 The concatenation process is performed, and the concatenated result is symmetrically encrypted using the key stored therein to obtain the encrypted registration credential EncEnv. The encrypted registration credential EncEnv is then stored in the local registration database of the central server, and the encrypted registration credential is sent to the client.
[0040] (6-4) The client decrypts the encrypted registration credential EncEnv from the central server to obtain the registration information and stores the registration information in the client's local registration database to complete the registration binding with the central server.
[0041] Preferably, the first blinding request u in step (6-1) is obtained using the following formula:
[0042] u=H1(P)r
[0043] Where H1 represents the hash function, and r is a random number generated by the client, with a value range of [1, 2]. 128 -1];
[0044] The symmetric encryption process in step (6-3) uses the AES-256-GCM encryption algorithm;
[0045] The decryption process in step (6-4) uses the AES-256-GCM decryption algorithm.
[0046] Preferably, in step (11), the average response delay is Delay cnt2 The calculation formula is as follows:
[0047]
[0048] Behavioral score q in each round i It is determined by three metrics: local model effectiveness (a), response latency (b), and data integrity (c) of the cnt2 client during the M training cycles. The calculation formula is as follows:
[0049] q i =λ·a+μ·b+v·c,
[0050] Where λ, μ, and v are all weight values, and the sum of the three is 1;
[0051] Behavioral rating Trust cnt2 The calculation formula is as follows:
[0052]
[0053] Preferably, step (12) uses the following calculation formula:
[0054] R i =α·Trust cnt2 +β·(1 / Delay cnt2 )
[0055] Here, α and β are weighting coefficients, and satisfy α+β=1, with the values of α and β both ranging from [0,1].
[0056] Preferably, step (18) uses the following formula:
[0057] K = KDF(v||env_key).
[0058] Preferably, step (25) uses the following formula:
[0059]
[0060] In general, the technical solutions conceived by this invention, compared with the prior art, can achieve the following beneficial effects:
[0061] (1) Since the present invention adopts steps (3) to (7), it effectively prevents man-in-the-middle attacks and identity forgery attacks through the two-way identity authentication mechanism between the client and the central server based on the OPAQUE protocol. This solves the technical problem that the existing centralized federated learning method is easily threatened by man-in-the-middle attacks and identity forgery attacks in actual deployment due to the lack of an effective identity authentication mechanism, making it difficult to guarantee the overall security of the federated system.
[0062] (2) Since the present invention adopts steps (8) to (14), it dynamically selects reliable clients to participate in aggregation through a dynamic participant reputation evaluation and screening mechanism. Therefore, it can support the dynamic joining and leaving of nodes, thereby solving the technical problems of high network complexity, difficulty in inter-node authentication, and difficulty in supporting the joining and leaving of dynamic nodes in existing decentralized federated learning methods, resulting in poor adaptability in large-scale edge computing environments.
[0063] (3) Since the present invention adopts step (11), its model upload validity verification mechanism and reputation update mechanism can effectively suppress the interference of low-quality or malicious nodes on model training, thereby solving the technical problem that the two existing federated learning methods usually do not evaluate and screen the legality of client identity and the reliability of training behavior, and are easily interfered with by low-quality or malicious nodes in the model update process, thereby reducing the overall model performance or even causing model pollution.
[0064] (4) The present invention introduces the OPAQUE protocol in the identity authentication process, uses blind cryptography to achieve secure authentication without password leakage, and negotiates a unique session key through the Diffie-Hellman protocol, thereby ensuring that the authentication process has forward security and resistance to offline dictionary attacks.
[0065] (5) The client selection mechanism of the present invention integrates communication performance and historical behavior factors, takes into account both response efficiency and behavior reliability, and can adapt to the actual situation of strong communication heterogeneity and unstable edge node quality in industrial scenarios. Attached Figure Description
[0066] Figure 1 This is a diagram illustrating the application environment of the present invention;
[0067] Figure 2 This is a simplified flowchart of the federated learning method based on two-way authentication in the industrial internet edge computing environment of this invention. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0069] The basic idea of this invention is to address the challenges faced by federated learning systems in industrial internet edge computing scenarios, such as identity forgery, man-in-the-middle attacks, strong client heterogeneity, and high node dynamism. It proposes a federated learning method that integrates two-way authentication and dynamic participant management mechanisms. This method constructs a two-way authentication framework between the client and the central server based on the OPAQUE protocol, ensuring a secure and reliable communication connection is established before each round of federated learning tasks. Simultaneously, it introduces a reputation calculation method combining communication latency and historical behavior scoring to perform real-time screening and management of participating clients, thereby improving the security and robustness of the training process. Furthermore, by constructing a model validity verification and dynamic reputation update mechanism, it prevents low-quality or malicious nodes from interfering with the model aggregation results, ultimately realizing a federated learning system with strong security and dynamic adaptability for industrial edge environments.
[0070] like Figure 1 and Figure 2 As shown, this invention provides a federated learning method based on two-way authentication in an industrial internet edge computing environment. This industrial internet edge computing environment includes a central server and multiple clients. The federated learning method includes the following steps:
[0071] (1) The central server initializes the current federated learning round number t=1 and sets the training number t_last that last completed aggregation to 0;
[0072] (2) The central server determines whether the current round number t is equal to the training number t_last+1 of the most recent completed aggregation. If so, proceed to step (3); otherwise, proceed to step (26).
[0073] (3) The central server retrieves all clients that have completed registration with the central server from the local registration database, as well as the unique identifier ID of each client. i The unique identifiers of all clients constitute the first unique identifier set. Where N represents the total number of clients that have completed registration with the central server, i∈[1,N];
[0074] (4) Set the counter cnt1 = 1 on the central server.
[0075] (5) The central server determines whether the counter cnt1 is equal to the total number N of clients that have completed registration with the central server. If yes, proceed to step (8); otherwise, proceed to step (6).
[0076] (6) The first unique identifier set obtained by the central server from step (3) Get the unique identifier ID of the cnt1th client. cnt1 And based on this unique identifier ID cnt1 Check the local registration database of the central server to see if the corresponding client has been bound to the central server; if so, proceed to step (7); otherwise, proceed to step (6-1).
[0077] The process of binding the client to the central server includes the following sub-steps:
[0078] (6-1) The client obtains the local user credentials P, performs blinding processing on the obtained local user credentials P to obtain the first blinding request u, and sends the first blinding request u to the central server; wherein the length of the local user credentials P is not less than 8 characters;
[0079] The first blinding request u is obtained in this step using the following formula:
[0080] u=H1(P)r
[0081] Where H1 represents the hash function, and r is a random number generated by the client, with a value range of [1, 2]. 128 -1], preferably a 128-bit integer.
[0082] (6-2) The central server performs an Oblivious Pseudo-Random Function (OPRF) operation on the first blinded request u from the client to obtain the response value v.
[0083] (6-3) The central server will combine the response value v obtained in step (6-2) with the unique identifier ID of the cnt1th client. cnt1 The concatenation process is performed, and the concatenated result is symmetrically encrypted using the key stored therein to obtain the encrypted registration credential EncEnv. The encrypted registration credential EncEnv is then stored in the local registration database of the central server, and the encrypted registration credential is sent to the client.
[0084] Specifically, the symmetric encryption process in this step uses the AES-256-GCM encryption algorithm.
[0085] (6-4) The client decrypts the encrypted registration credential EncEnv from the central server to obtain the registration information and stores the registration information in the client's local registration database to complete the registration binding with the central server.
[0086] Specifically, the decryption process in this step uses the AES-256-GCM decryption algorithm.
[0087] The advantage of the above sub-steps (6-1) to (6-4) is that the blind authentication and credential exchange mechanism built through the OPAQUE protocol realizes a one-time secure binding between the client and the central server, effectively preventing man-in-the-middle attacks and credential replay attacks.
[0088] (7) The central server sets the counter cnt1 = cnt1 + 1 and returns to step (5);
[0089] (8) The central server obtains a second set of unique identifiers consisting of the unique identifiers of all clients that have completed binding with the central server. Where n represents the second unique identifier set Size;
[0090] (9) Set the counter cnt2 = 1 on the central server;
[0091] (10) The central server determines whether the counter cnt2 is equal to the second unique identifier set obtained in step (8). If the size n is greater than or equal to n, proceed to step (15); otherwise proceed to step (11).
[0092] (11) The central server uses the second unique identifier set Get the unique identifier ID of the cnt2th client. cnt2 Retrieve the historical communication delay records {d1,d2,...,d...} from the local historical record database of the central server during the most recent M training sessions for the client cnt2. M} and task participation rating records {q1,q2,...,q M}, and based on the historical communication delay record and the task participation scoring record, obtain the average response delay (Delay) of the cnt2th client. cnt2 And behavioral rating Trust cnt2 The value of M ranges from 5 to 20, preferably 10;
[0093] Among them, the average response delay is Delay cnt2 The unit is milliseconds, and its calculation formula is as follows:
[0094]
[0095] Behavioral score q in each round i The performance of the client during the M training cycles is determined by three factors: local model effectiveness metric a, response latency b, and data integrity metric c. The calculation formula is as follows:
[0096] q i =λ·a+μ·b+ν·c,
[0097] Where λ, μ, and v are weight values, and their sum is 1. Preferably, λ = 0.6, μ = 0.3, and v = 0.1. The calculated q... i The value range is [0,1], and it is used to determine whether the client has the qualification to participate in trust.
[0098] Behavioral rating Trust cnt2 The calculation formula is as follows:
[0099]
[0100] The advantage of this step (11) is that it quantifies historical performance into measurable indicators, supporting subsequent objective screening mechanisms.
[0101] (12) The average delay of the central server to the 2nd client obtained in step (11) is Delay. cnt2 And behavioral rating Trust cnt2 Perform a weighted calculation to obtain the reputation value R of the cnt2th client. cnt2 ;
[0102] Specifically, the following calculation formula is used in this step:
[0103] R i =α·Trust cnt2 +β·(1 / Delay cnt2 )
[0104] Where α and β are weighting coefficients, and satisfy α+β=1. The range of values for α and β is [0,1], and the preferred values are α=0.7 and β=0.3.
[0105] (13) The central server determines the reputation value R of the second client obtained in step (12). cnt2 Is it greater than or equal to the preset reputation threshold R? th If so, then add the cnt2th client to the training set. (It is initially empty), then proceed to step (14), otherwise proceed directly to step (14).
[0106] In this step, the preset reputation threshold R thThe value range is [0.1, 0.9], preferably 0.6.
[0107] (14) The central server sets cnt2 = cnt2 + 1 and returns to step (10).
[0108] The advantage of steps (8) to (14) above is that, through a reputation evaluation mechanism based on historical data, clients with poor communication capabilities or poor historical performance can be effectively filtered out, thereby improving training stability and convergence speed.
[0109] (15) The client generates an authentication random number r′, performs blinding processing on the local registration password P and the authentication random number r′ to obtain a second blinding request u′, and sends the second blinding request u′ to the central server;
[0110] Specifically, the calculation formula in this step is exactly the same as that in step (6-1), and will not be repeated here.
[0111] (16) The central server performs OPRF operation on the second blinding request u′ from the client to obtain the authentication response value v′, retrieves the encrypted registration credential EncEnv from the local registration database of the central server, and sends the authentication response value v′ and the encrypted registration credential EncEnv to the client.
[0112] (17) The client performs deblinding on the authentication response value v′ from the central server to obtain the original authentication value v, and uses the AES-256-GCM encryption algorithm to decrypt the encrypted registration credential EncEnv to obtain the key env_key.
[0113] (18) The client concatenates the original authentication value v and the key env_key obtained in step (17) and inputs the concatenation result into the key derivation function KDF to generate the shared key K;
[0114] This step uses the following formula:
[0115] K = KDF(v||env_key)
[0116] The output bit length of the shared key K is 256 bits, and the derivation function is preferably HKDF-SHA256.
[0117] (19) The client uses the Argon2 algorithm to perform an expansion operation on the shared key K obtained in step (18) to obtain the encryption key SK and the integrity key MK;
[0118] (20) The central server retrieves the global model parameter vector w obtained after training round t_last, which is stored locally. t _lastThe encryption key SK and integrity key MK obtained in step (19) are used to modify the parameter vector w. t_last Perform AES-256-GCM symmetric encryption to obtain the global encryption model Enc after training round t_last. SK (w t_last The global model integrity label (MAC) obtained after training t_last rounds. MK (w t_last The global encryption model and its corresponding global model integrity tag are sent to each client.
[0119] The advantage of this step (20) is that it ensures the confidentiality and integrity verification capabilities of the model distribution process, effectively preventing model poisoning and man-in-the-middle tampering attacks.
[0120] (21) Each client performs symmetric decryption and integrity verification on the encrypted model and corresponding integrity label from the central server in sequence to obtain the parameter vector w of the global model after training round t_last. t_last .
[0121] (22) Each client uses its locally stored local data sample set D i The parameter vector w of the global model obtained after training the t_last rounds obtained in step (21) t_last Perform local model training to obtain the client model parameter vector w for the i-th client after t rounds of training. i t ; where i∈[1, the total number of clients in the industrial internet edge computing environment].
[0122] (23) Each client uses the encryption key SK and integrity key MK obtained in step (19) to modify the client model parameter vector w obtained by the i-th client after t rounds of training in step (22). i t Perform AES-256-GCM symmetric encryption to obtain the client encryption model Enc obtained by the i-th client after t rounds of training. SK (w i t ), and the client model integrity label (MAC) obtained by the i-th client after t rounds of training. MK (w i t ), and encode the client encryption model Enc SK (w i t Client-side model integrity label (MAC) MK (w it ), and the local data sample set D stored locally on the client. i The total number of samples n i Send to the central server;
[0123] The advantage of this step (23) is that it ensures that the uploaded model is not leaked or tampered with during transmission through a dual mechanism of encryption and integrity protection.
[0124] (24) The central server processes the client encryption model Enc obtained from the i-th client after t rounds of training. SK (w i t The client model integrity label (MAC) obtained by the i-th client after t rounds of training. MK (w i t The decryption and label verification operations are performed sequentially to obtain the client model parameter vector w obtained by the i-th client after t rounds of training. i t , where i∈[1, the total number of clients in the industrial internet edge computing environment].
[0125] (25) The central server uses the local data sample set D stored by the client. i The total number of samples n i A weighted average aggregation operation is performed on the parameter vectors of all client models obtained in step (24) after t rounds of training to generate the global model parameter vector w after t rounds of training. t .
[0126] Specifically, this step uses the following formula:
[0127]
[0128] The advantage of this step (25) is that it completes model fusion while taking into account the fairness of the data volume, which helps to improve the global fitting ability and training efficiency of the model.
[0129] (26) The central server will use the global model parameter vector w obtained after t training rounds obtained in step (25) t Store locally, update the training ID t_last = t for the most recent aggregation, and calculate the global model parameter vector w obtained after t training rounds. t The global model parameter vector w obtained after t-1 training rounds t-1 Euclidean distance between them ||w t -w t-1 ||2, and determine the Euclidean distance||w t -wt-1 If ||2 is greater than the preset convergence threshold ∈, then return to step (2); otherwise, the process ends.
[0130] Specifically, the convergence threshold ∈ ranges from [1e-4, 1e-2], with the preferred value being 1e-3.
[0131] The advantage of the above steps (20) to (26) is that by using multiple rounds of key protection and end-to-end integrity verification, each stage of model transmission, update and aggregation is guaranteed to have anti-tampering and privacy protection capabilities, thereby constructing a robust, secure and efficient federated learning process.
[0132] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A federated learning method based on two-way authentication in an industrial internet edge computing environment, characterized in that, include: (1) The central server initializes the current learning round number t=1 and sets the training number t_last that last completed aggregation to 0; (2) Determine if t is equal to t_last + 1. If yes, proceed to (3); otherwise, proceed to (26). (3) The central server retrieves all registered clients and their unique identifiers (IDs) from the local registration database. i All IDs i The first unique identifier set 𝒞 = {ID1, ID2, ..., ID_N} is formed, where N represents the total number of registered clients, i∈[1,N]; (4) The central server sets the counter cnt1 = 1; (5) Determine if cnt1 is equal to N. If yes, proceed to (8); otherwise, proceed to (6). (6) The central server obtains the unique identifier ID of the cnt1th client from 𝒞. cnt1 and according to ID cnt1 Determine whether the corresponding client has completed the binding with the central server; if so, proceed to (7); otherwise, proceed to (7) after the client has completed the registration and binding with the central server. (7) Set cnt1=cnt1+1 and return (5); (8) The central server obtains a second unique identifier set 𝒞′ = {ID1, ID2, ..., ID}, consisting of the unique identifiers of all clients that have completed binding with the central server. n }, where n represents the size of the second unique identifier set 𝒞′; (9) Set the counter cnt2 = 1; (10) Determine if cnt2 is equal to n. If yes, go to (15); otherwise, go to (11). (11) The central server obtains the unique identifier ID of the second client from 𝒞′. cnt2 Retrieve the historical communication delay records of the 2nd client during the most recent M training sessions from the local historical record database on the central server. and task participation rating record And obtain the average response delay Delay based on the historical communication delay record. cnt2 A behavioral score, Trust, is obtained based on task participation and scoring records. cnt2 ,in The value range is from 5 to 20; (12) The central server handles the above-mentioned Delay cnt2 and Trust cnt2 We perform a weighted calculation to obtain the reputation value R of the 2nd client (cnt2th client). cnt2 ; (13) Determine R cnt2 Is it greater than or equal to the preset reputation threshold R? th If so, add the second client cnt2 to the training set 𝒞″ and then go to (14); otherwise go directly to (14). (14) Set cnt2 = cnt2 + 1 and return (10); (15) The client generates an authentication random number r′, performs blinding processing on the local registration password P and r′ to obtain a second blinding request u′, and sends u′ to the central server; (16) The central server performs OPRF operation on u′ to obtain the authentication response value v′, retrieves the encrypted registration credential EncEnv from the local registration database of the central server, and sends v′ and EncEnv to the client; (17) The client performs deblinding to obtain the original authentication value v, and uses the AES-256-GCM encryption algorithm to decrypt EncEnv to obtain the key env_key; (18) The client concatenates v and env_key, inputs the concatenation result into the key derivation function KDF, and generates the shared key K; (19) The client uses Argon2 to perform an extension operation on K to obtain the encryption key SK and the integrity key MK; (20) The central server obtains the global model parameter vector w obtained after training in round t_last, which is stored locally. t_last Using SK and MK to w t_last Perform AES-256-GCM symmetric encryption to obtain the global encryption model Enc. SK (w t_last ) and global model integrity label MAC MK (w t_last Then it is sent to each client; (21) Each client performs symmetric decryption and integrity verification on the encryption model and the corresponding integrity tag in sequence to obtain the parameter vector w of the global model. t_last ; (22) Each client uses its locally stored local data sample set D i , for w t_last Perform local model training operations to obtain the client model parameter vector w after each of the t training rounds. i t ; Where i∈[1, the total number of clients in the industrial internet edge computing environment]; (23) Each client uses the above SK and MK to w i t AES-256-GCM symmetric encryption is performed to obtain the client encryption model Enc after t rounds of training. SK (w i t ), and the client-side model integrity label (MAC) obtained after t rounds of training. MK (w i t ), and will the Enc SK (w i t ), MAC MK (w i t ), and set D i Samples in Send to the central server; (24) The central server to Enc SK (w i t ) and MAC MK (w i t The decryption and tag verification operations were performed sequentially to obtain w. i t , where i∈[1, the total number of clients]; (25) The central server according to w for all clients obtained in (24) i t Perform a weighted average aggregation operation to generate the global model parameter vector w after t rounds of training. t ; (26) The central server will w t Store locally, update t_last = t, and calculate w after t training rounds. t w obtained after t-1 training rounds t−1 The Euclidean distance between them ||w t -w t−1 ∥2, and determine ∥w t -w t−1 Is ∥2 greater than the preset convergence threshold? If yes, return (2); otherwise, the process ends.
2. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 1, characterized in that, The process of binding the client to the central server includes the following sub-steps: (6-1) The client obtains the local user credentials P, performs blinding processing on the obtained local user credentials P to obtain the first blinding request u, and sends the first blinding request u to the central server. The length of the local user credential P shall be no less than 8 characters; (6-2) The central server performs an indistinguishable pseudo-random function OPRF operation on the first blinded request u from the client to obtain the response value v; (6-3) The central server will use the response value v obtained in step (6-2) and the unique identifier ID of the cnt1th client. cnt1 The concatenation process is performed, and the concatenated result is symmetrically encrypted using the key stored therein to obtain the encrypted registration credential EncEnv. The encrypted registration credential EncEnv is then stored in the local registration database of the central server, and the encrypted registration credential is sent to the client. (6-4) The client decrypts the encrypted registration credential EncEnv from the central server to obtain the registration information and stores the registration information in the client's local registration database to complete the registration binding with the central server.
3. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 2, characterized in that, The first blinding request u in step (6-1) is obtained using the following formula: 𝑢=𝐻1(𝑃) 𝑟 ; Where H1 represents the hash function, and r is a random number generated by the client, with a value range of [1, 2]. 128 -1]; The symmetric encryption process in step (6-3) uses the AES-256-GCM encryption algorithm; The decryption process in step (6-4) uses the AES-256-GCM decryption algorithm.
4. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 1, characterized in that, In step (11), the average response delay is Delay cnt2 The calculation formula is as follows: ; Behavioral scoring in each round It is determined by three metrics: local model effectiveness (a), response latency (b), and data integrity (c) of the cnt2 client during the M training cycles. The calculation formula is as follows: ; in, , , All three are weight values, and their sum is 1. Behavioral rating Trust cnt2 The calculation formula is as follows: 。 5. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 1, characterized in that, Step (12) uses the following calculation formula: 𝑅 𝑖 =𝛼⋅𝑇𝑟𝑢𝑠𝑡 cnt2 +𝛽⋅(1 / 𝐷𝑒l𝑎𝑦 cnt2 ); Here, α and β are weighting coefficients, and satisfy α+β= 1, and the range of values for α and β is [0, 1].
6. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 1, characterized in that, Step (18) uses the following formula: 𝐾=KDF(𝑣||𝑒𝑛𝑣_𝑘𝑒𝑦).
7. The federated learning method based on two-way authentication in the industrial internet edge computing environment according to claim 1, characterized in that, Step (25) uses the following formula: 。
Citation Information
Patent Citations
Medical data federal learning method and system based on trusted execution environment
CN116484426A
Robust security training method based on double-server reputation evaluation mechanism in federated learning
CN117421776A