Method and device for updating global model parameters of federal learning

By distinguishing the trust of the client in federated learning, using signature information and trust score weighted model parameter increments, the problem of the server updating global model parameters without collecting client data is solved, and a more reliable and efficient model update process is achieved.

CN120069126APending Publication Date: 2025-05-30SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510220232.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

During federated learning, the server needs to collect client data to update global model parameters, however this infringes on user privacy and makes it difficult to update global model parameters without collecting data.

Method used

By obtaining the signature information sent by the client and the model parameter increment, the client is divided into trusted and untrusted sets, weighted the model parameter increment based on the trust score, and averaged it with the increments of the trusted set to update the global model parameters.

Benefits of technology

This method avoids data pollution from untrusted clients, ensures the reliability of global model updates, prevents malicious attacks, reduces the negative impact of untrusted clients on the global model, and accelerates the convergence of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069126A_ABST
    Figure CN120069126A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for updating global model parameters of federal learning, and relates to the technical field of machine learning, and the method comprises the steps: obtaining signature information and model parameter increment sent by a client; dividing the clients into a credible client set and an uncredible client set based on the signature information, and then dividing model parameter increments; generating trust scores of the model parameter increments in the second model parameter increment set based on the model parameter increments; and performing weighting processing on model parameter increments in the second model parameter increment set based on the trust score, performing average value processing on a weighting result and the first model parameter increment set to obtain an average model parameter increment, and updating global model parameters based on the average model parameter increment. The technical problem of how to update global model parameters in the federal learning process without collecting client data is solved, and the technical effect of not invading user privacy is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of machine learning, and in particular, to a method and device for updating global model parameters of federated learning. Background Art

[0002] Currently, the server of federated learning needs to collect partial client data for training to obtain the server model parameter increment, and then evaluate the client model parameter increment, so as to update the global model parameters. However, the server's collection of client data raises the problem of infringing on user privacy. Therefore, how to update the global model parameters during the process of federated learning without collecting client data is an urgent problem to be solved. Summary of the Invention

[0003] The present application provides a method and device for updating global model parameters of federated learning to at least solve the problem in the related art of how to update the global model parameters during the process of federated learning without collecting client data.

[0004] The present application provides a method for updating global model parameters of federated learning, including:

[0005] Obtaining at least one signature information and at least one model parameter increment sent by at least one client, where the model parameter increment corresponds to the signature information one by one, and the model parameter increment is the increment between the global model parameters generated by at least one client in two trainings;

[0006] Dividing at least one client into a trusted client set and an untrusted client set based on at least one signature information;

[0007] Dividing at least one model parameter increment according to the trusted client set, the untrusted client set, and at least one signature information, dividing at least one model parameter increment belonging to the trusted client set into a first model parameter increment set, and dividing at least one model parameter increment of the untrusted client set into a second model parameter increment set;

[0008] Generating at least one trust score for at least one model parameter increment in the second model parameter increment set based on the model parameter increments in the first model parameter increment set and the second model parameter increment set;

[0009] Performing weighted processing on at least one model parameter increment in the second model parameter increment set based on at least one trust score, and performing an averaging process on the weighted result and the first model parameter increment set to obtain an average model parameter increment, and updating the global model parameters based on the average model parameter increment.

[0010] The present application further provides a device for updating global model parameters of federated learning, including:

[0011] An acquisition module, configured to acquire at least one signature information and at least one model parameter increment sent by at least one client, where the model parameter increments correspond to the signature information one by one, and the model parameter increment is the increment between the global model parameters generated by the at least one client in two trainings;

[0012] A first partitioning module, configured to partition at least one client into a trusted client set and an untrusted client set based on at least one signature information;

[0013] A second partitioning module, configured to partition at least one model parameter increment according to the trusted client set and the untrusted client set, and at least one signature information, partition at least one model parameter increment belonging to the trusted client set into a first model parameter increment set, and partition at least one model parameter increment of the untrusted client set into a second model parameter increment set;

[0014] A generation module, configured to generate at least one trust score for at least one model parameter increment in the second model parameter increment set based on the model parameter increments in the first model parameter increment set and the second model parameter increment set;

[0015] An update module, configured to perform a weighting process on at least one model parameter increment in the second model parameter increment set based on at least one trust score, and perform an averaging process on the weighted result and the first model parameter increment set to obtain an average model parameter increment, and update the global model parameter based on the average model parameter increment.

[0016] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of the above-mentioned method for updating the global model parameter of any kind of federated learning when executing the computer program.

[0017] This application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for updating the global model parameter of any kind of federated learning are implemented.

[0018] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for updating the global model parameter of any kind of federated learning are implemented.

[0019] With this application, by distinguishing between trusted and untrusted clients, data contamination from untrusted clients is avoided, making the global model more reliable during updates. Based on the signature information, it is ensured that the parameter increments uploaded by the clients are reliable, preventing malicious attackers from interfering with the training of the global model by manipulating the model parameters. By weighting the parameter increments from different sources based on the trust score, the global model can be updated more precisely, reducing the negative impact of untrusted clients on the global model. By weighting and averaging the increments of the model parameters, the convergence of the model can be accelerated, avoiding unnecessary iterations and computational overhead. By not collecting the clients' data but having the clients train locally and upload the model parameter increments, combined with the credibility evaluation mechanism of the signature information, it is possible to ensure that the updated global model parameters are not interfered with by untrusted clients without infringing on user privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0021] Figure 1 is one of the flowcharts of the method for updating the global model parameters of federated learning according to an embodiment of this application;

[0022] Figure 2 is the second flowchart of the method for updating the global model parameters of federated learning according to an embodiment of this application;

[0023] Figure 3 is the third flowchart of the method for updating the global model parameters of federated learning according to an embodiment of this application;

[0024] Figure 4 is a schematic diagram of the device for updating the global model parameters of federated learning according to an embodiment of this application;

[0025] Figure 5 is a schematic diagram of the hardware structure of the computer device according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of this application.

[0027] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects and not to describe a specific order or sequence.

[0028] To enable those skilled in the art of this technology to better understand the solution of this application, the following further detailed description of this application will be given in conjunction with the accompanying drawings and specific embodiments.

[0029] In this embodiment, a method for updating global model parameters of federated learning is provided, which can be used for the above-mentioned server. Figure 1 It is one of the flowcharts of the method for updating global model parameters of federated learning according to an embodiment of this application, as Figure 1 shown. This application provides a method for updating global model parameters of federated learning, and the method includes:

[0030] Step S101, obtain at least one signature information and at least one model parameter increment sent by at least one client.

[0031] Among them, the model parameter increments correspond one-to-one with the signature information, and the model parameter increment is the increment between the global model parameters generated by at least one client in two trainings.

[0032] The signature information can be generated according to a preset secret key. For example:

[0033]

[0034] Among them, the function m is the model parameter increment, s 1 , s 2 is the signature information, and the preset secret key is {N, g, λ}. h: is a hash function. (The symbol here means that the function h satisfies the following conditions. Its domain is messages of any length, the range is messages of length k, and the range is included in ). Preferably, take g = 1 + kN, which can speed up the calculation of the power of g modulo N 2 .

[0035] Step S102, based on at least one signature information, divide at least one client into a set of trusted clients and a set of untrusted clients.

[0036] One way of partitioning is as follows: Based on the signature information of each client, the clients are divided into two sets: trusted clients and untrusted clients through a certain algorithm (such as verifying the quality of training data or using secure encryption technology). The updates of trusted clients are considered reliable and can be used for global model updates; while the updates of untrusted clients may be regarded as problematic or maliciously affected.

[0037] Step S103: According to the set of trusted clients and the set of untrusted clients, as well as at least one signature information, partition at least one model parameter increment. Partition at least one model parameter increment belonging to the set of trusted clients into a first model parameter increment set, and partition at least one model parameter increment of the set of untrusted clients into a second model parameter increment set.

[0038] One way of partitioning is as follows: According to the credibility of the clients, the model increments generated by each client are respectively classified into two sets: the increments generated by trusted clients belong to the first model parameter increment set; the increments generated by untrusted clients belong to the second model parameter increment set.

[0039] Step S104: Based on the model parameter increments in the first model parameter increment set and the second model parameter increment set, generate at least one trust score for at least one model parameter increment in the second model parameter increment set.

[0040] One way of generating is as follows: Further analyze the increments in the set of untrusted clients to generate a trust score, which may be based on the validity, quality, or other criteria of the increments to evaluate whether the update is trustworthy. The trust score is used to weigh the reliability of model parameter increments from different sources.

[0041] Step S105: Based on at least one trust score, perform a weighting process on at least one model parameter increment in the second model parameter increment set, and perform an averaging process on the weighting result and the first model parameter increment set to obtain an average model parameter increment, and update the global model parameters based on the average model parameter increment.

[0042] One way of updating is as follows: Perform a weighted adjustment on the increments of untrusted clients based on the trust score (for example, the weight of increments with lower trust may be lower). Then average the weighted untrusted increments and the trusted increments to obtain the final model parameter update value. Update the global model based on this weighted and averaged model increment.

[0043] A method for updating global model parameters in federated learning provided by this application distinguishes between trusted and untrusted clients, avoiding data contamination from untrusted clients, thereby making the global model more reliable when being updated. Based on signature information, it ensures that the parameter increments uploaded by clients are reliable, preventing malicious attackers from interfering with the training of the global model by manipulating model parameters. By weighting parameter increments from different sources based on trust scores, the global model can be updated more precisely, reducing the negative impact of untrusted clients on the global model. By weighting and averaging the increments of model parameters, it can accelerate the convergence of the model, avoiding unnecessary iterations and computational overhead. By not collecting clients' data but having clients perform training locally and upload model parameter increments, combined with a credibility evaluation mechanism for signature information, it can ensure that the updated global model parameters are not interfered with by untrusted clients without violating user privacy.

[0044] In an alternative embodiment, to further accurately classify clients, Figure 2 is the second flowchart of the method for updating global model parameters in federated learning according to an embodiment of this application, as Figure 2 shown.

[0045] Step S102 includes:

[0046] Step S201: Generate a verification value for at least one signature information based on a preset key and at least one signature information.

[0047] The verification value can be generated by this arithmetic expression:

[0048] Step S202: Process at least one model parameter increment based on a preset hash function to obtain a hash value of at least one model parameter increment.

[0049] The hash value of the model parameter increment is h(m).

[0050] Step S203: Compare and determine whether the verification value of the signature information of at least one client is the same as the hash value of the model parameter increment.

[0051] That is, it can be to compare whether h(m) is the same as equal.

[0052] Step S204: If so, classify at least one client as a trusted client.

[0053] If the verification value is the same as the hash value, it means that the model parameter increment provided by this client is trusted and the signature information is valid. Therefore, the system classifies this client as a trusted client and can continue to participate in the model update and optimization process.

[0054] Step S205, if not, divide at least one client into untrusted clients.

[0055] If the verification value is not the same as the hash value, it indicates that the signature information of the client does not match the parameter increment it submitted, and there may be data tampering or fraud. In this case, the client will be divided into untrusted clients to avoid its negative impact on the global model.

[0056] The method provided in this embodiment generates a verification value for at least one signature information and processes the model parameter increment based on a hash function to ensure that only the model parameters uploaded by real and trusted clients can participate in the update of the global model. Any inconsistent signature information and hash value will be determined as untrusted, avoiding the impact of malicious clients or data tampering, thereby enhancing the security of the system. Even if some clients submit untrusted model parameters, the system can avoid the impact of bad data on the overall system through this credibility verification mechanism, improving the fault tolerance of the model update process.

[0057] In an alternative implementation, to further accurately obtain the signature information and the model parameter increment, step S101 includes:

[0058] Receive at least one encrypted ciphertext sent by at least one client; decrypt the at least one encrypted ciphertext to obtain at least one signature information and at least one model parameter increment.

[0059] In this embodiment, the server receives the encrypted ciphertext sent by the client. This ciphertext contains two important parts: the signature information is used to verify the source and authenticity of the client data, usually a digital signature generated by the client using its private key. The model parameter increment is the change or update of the model parameters relative to the global model after local training by the client. To extract the signature information and the model parameter increment from the encrypted ciphertext, the system needs to decrypt these ciphertexts. Through decryption, the system can restore the original signature information and incremental data. The decrypted signature information can be used to verify the identity of the client and the authenticity of its data. The decrypted model parameter increment can be further processed and aggregated for the update of the global model.

[0060] The method provided in this embodiment further improves the security, privacy, and data protection capabilities of the system by introducing the processing flow of encrypted ciphertexts. It enhances the system's resistance to attacks, optimizes the computing and communication efficiency, and helps to promote the secure and wide application of federated learning technology.

[0061] In an alternative implementation, before dividing the identities of at least one client into a trusted client set and an untrusted client set based on the signature information sent by at least one client, it further includes:

[0062] Generate and publish an initial data set, where the initial data set includes: a preset secret key, a global parameter model, global model parameters, and a preset multiple. The preset secret key is used for at least one client to encrypt ciphertext or for the server to decrypt ciphertext. The global parameter model is used to generate model parameter increments at at least one client. The global model parameters are used to initialize the global parameter model. The preset multiple is used to promote the model parameter increments.

[0063] Send a training instruction to at least one client, where the training instruction instructs at least one client to obtain the initial data set and generate at least one model parameter increment and at least one signature information based on the initial training set.

[0064] In this embodiment, the preset multiple is used to perform amplification or reduction operations when merging model parameters. For example, the multiple is 10. 3 That is, the parameter can be extended to the integer domain. It is usually used to adjust the contributions between different clients to ensure that their increments are merged proportionally. The purpose of generating and publishing these initial data sets is to ensure that each client can obtain the same training starting point and guarantee the synchronization and consistency of the training process. The server will send instructions to each client, informing the client to use the initial data set for training. After the client completes local training and generates model parameter increments and signature information, the server verifies the client based on the received signature information.

[0065] The method provided in this embodiment ensures that each client can obtain unified startup parameters and security configurations by publishing an initial data set, which includes a preset secret key, a global parameter model, global model parameters, and a preset multiple. It provides a necessary basis for the client to generate model parameter increments and signature information, ensuring the reliability and consistency of subsequent training and parameter updates. The preset secret key in the initial data set is used for the client to encrypt ciphertext or for the server to decrypt ciphertext, enhancing the data security in the federated learning process. The client can use the secret key to encrypt the generated model parameter increments, and the server uses the secret key for decryption, thus ensuring the confidentiality of sensitive data during transmission and preventing unauthorized access or tampering. The initialization of the global parameter model and global model parameters ensures that when model training is performed among various clients, all clients start training with the same initial model. This helps to avoid model biases among clients and ensures that all clients can train and optimize on a unified basis. By the client generating model parameter increments based on the global model, it further promotes the collaborative update of the global model.

[0066] In an alternative embodiment, before generating at least one trust score for at least one model parameter increment in the second model parameter increment set based on the model parameter increments in the first model parameter increment set and the second model parameter increment set, it further includes:

[0067] If not, delete the model parameter increment sent by the trusted client in the corresponding trusted client set from the first model parameter increment set.

[0068] In this embodiment, if the increment of a certain client is evaluated as untrusted (for example, its trust score is lower than a certain set threshold), then the corresponding increment will be deleted from the first model parameter increment set. That is, the untrusted increment will no longer participate in the update of the global model. The purpose of this process is to reduce the impact of untrusted clients on the global model by removing untrusted model increments, ensuring that the final global model is more accurate and more trustworthy.

[0069] The method provided in this embodiment deletes the corresponding increment from the first model parameter increment set when the model parameter increment uploaded by the client fails to meet the trust standard. This means that untrusted data is no longer used for training, ensuring the quality and stability of the model. This operation significantly improves the data processing efficiency in the federated learning process and reduces the interference of data noise on model training.

[0070] In an alternative embodiment, after performing a weighted process on at least one model parameter increment in the second model parameter increment set based on at least one trust score, and performing an averaging process on the weighted result and the first model parameter increment set to obtain an average model parameter increment, and updating the global model parameter based on the average model parameter increment, it further includes:

[0071] Obtain the cumulative number of average model parameter increments. The cumulative number indicates the number of average model parameter increments generated by the global parameter model training up to the current time. Based on the cumulative number, determine the actual number of iterations of the global parameter model. Based on the actual number of iterations and the preset number of iterations, determine whether the global parameter model has completed training. If so, stop iteratively updating the global model parameter of the global parameter model, and send an abort instruction to at least one client. The abort instruction instructs at least one client to stop training.

[0072] In this embodiment, the cumulative count represents the number of generated average model parameter increments during the training process of the global parameter model. That is to say, each time the global model is updated, a new average model parameter increment is generated, and the cumulative count of these increments helps us understand how many times the global model has been iterated or updated. Through the cumulative count, we can know how many times the global model has been trained, and thus can determine whether the preset number of training times has been reached. Based on the cumulative count, the actual iteration times of the global model can be deduced. Since a new average model parameter increment is generated in each iteration, the cumulative count itself reflects the actual iteration times that the global model has gone through. By comparing the actual iteration times with the preset iteration times set in advance, it is determined whether the global model has completed training. If the actual iteration times have reached or exceeded the preset times, it can be considered that the model has completed training. If the global model has completed training, then the system will send a termination instruction to all participating clients.

[0073] The method provided in this embodiment can, through the cumulative count, real-time grasp the historical progress of model training, and then optimize the training scheduling. According to the set preset iteration times, the system will regularly evaluate the actual training progress of the global model. Once the actual iteration times of the training reach the predetermined iteration times threshold, the system can determine whether the model training has been completed. If the training task has been completed, the system will decide to stop the training to avoid overtraining and wasting computing resources. When the training of the global model is judged to be completed, the system will send a termination instruction to the participating clients. This instruction instructs the clients to stop the local training process to ensure that the training process can end on time. Through this control, the system avoids ineffective repeated training and can also ensure that the computing resources of the clients are not wasted.

[0074] In an alternative embodiment, based on at least one trust score, process the first set of model parameter increments and the second set of model parameter increments to obtain an average model parameter increment, and update the global model parameters based on the average model parameter increment, including:

[0075] Generate an average model parameter increment according to the relational expression, at least one trust score, the first set of model parameter increments, and the second set of model parameter increments. Update the global model parameters according to the preset global learning rate, global model parameters, and the average model parameter increment.

[0076] Among them, the average model parameter increment can be generated through the following relational expression:

[0077]

[0078] where ind " 1 " is the number of elements in the first set of model parameter increments, ind′ 2 is the number of elements in the second model parameter increment set.

[0079] TS i is the trust score of the element in the i-th second model parameter increment set:

[0080]

[0081] where is the average value of each element in the first model parameter increment set. is an element in the second model parameter increment set.

[0082] The global model parameters can be updated through the following relational expression:

[0083]

[0084] where is the updated parameter, is the parameter before update, and α is the global learning rate.

[0085] In this embodiment, the incremental data in the first model parameter increment set and the second model parameter increment set are weighted according to the trust score, then merged and averaged to generate an average model parameter increment. This increment will be used as the basis for updating the global model. When updating the global model, a preset global learning rate is used, which is a hyperparameter that controls the step size during training. The learning rate controls how much the model should be adjusted at each update. A high learning rate may lead to over-adjustment, while a low learning rate may lead to slow convergence of the training.

[0086] The method provided in this embodiment can more fairly weight the influence of each client in the global model by comprehensively considering the trust scores of each client, thereby avoiding individual unstable or error-prone clients from having too much negative impact on the global model. By weighting the first model parameter increment set and the second model parameter increment set through at least one trust score, the average model parameter increment can be calculated more accurately. According to the relational expression, by weighting at least one trust score and the two sets of model parameter increment sets, the average model parameter increment of the global model is generated. The global model parameters and the average model parameter increment are updated using the global learning rate. The adjustment of the global learning rate can control the pace of each update, ensure that the update speed of the model is appropriate, and avoid overfitting or slow convergence. It can more efficiently absorb information from each client and continuously optimize its own performance.

[0087] Figure 3 is the third flowchart of the method for updating the global model parameters of federated learning according to the embodiments of the present application, as shown in Figure 3As shown. The server creates a public key algorithm key and the multiple by which the data is multiplied before encryption, and publishes the public key and the multiple. The trusted client creates a public key algorithm key and sends the public key to the server. The server creates a global parameter model, sets the initial value of the global model parameters, and publishes them. Then, a number of trusted clients and a number of other clients are randomly selected to participate in this round of training. The trusted client uses local data for training. After calculating the local model parameter increment, it multiplies it by the multiple, signs and encrypts it, and then sends it to the server. The other clients use local data for training. After calculating the local model parameter increment, they multiply it by the multiple and encrypt it, and then send it to the server. The server verifies the signature of the trusted client and initially aggregates the model parameter increments of the trusted client to obtain the trusted model parameter increment. The trust score of the model parameter increments of the other clients is calculated using the trusted model parameter increment, and all the local model parameter increments of the clients are aggregated using the trust score, and the global model parameters are updated. Then, it is determined whether the number of iterations reaches the requirement. If so, the iteration ends; if not, a number of trusted clients and a number of other clients are randomly selected again to participate in this round of training.

[0088] In an alternative embodiment, in order to further accurately evaluate the model parameter increment and generate the trust score of at least one model parameter increment in the second model parameter increment set, it further includes:

[0089] For each model parameter increment in the second model parameter increment set, based on a preset trust scoring model, the trust score is calculated. The trust scoring model is based on factors such as the client's historical performance, parameter update stability, and the consistency of signature information;

[0090] All the trust scores are normalized to obtain a unified standard trust score, and the second model parameter increment is weighted according to this trust score to obtain an updated trust score.

[0091] The method provided in this embodiment, by weighting the parameter increments of each client, the final global model can be more affected by the contributions of high-trust clients, thereby improving the accuracy and robustness of the global model. By introducing the trust score and the weighting mechanism, the influence of the parameter increments of untrusted clients on the global model is effectively reduced, thereby reducing the risk of the system being affected by malicious clients or incorrect data. The trust score can help quickly identify and preferentially use the increments submitted by those stable and reliable clients, avoiding the interference of invalid or inaccurate parameters and accelerating model convergence.

[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0093] An embodiment of the present application further provides an apparatus for updating global model parameters of federated learning. Figure 4 It is a schematic diagram of an apparatus for updating global model parameters of federated learning according to an embodiment of the present application, as Figure 4 shown, the apparatus includes:

[0094] An acquisition module 401, configured to acquire at least one signature information and at least one model parameter increment sent by at least one client, where the model parameter increment corresponds to the signature information one by one, and the model parameter increment is the increment between global model parameters generated by at least one client in two trainings.

[0095] A first partitioning module 402, configured to partition at least one client into a trusted client set and an untrusted client set based on at least one signature information.

[0096] A second partitioning module 403, configured to partition at least one model parameter increment according to the trusted client set, the untrusted client set, and at least one signature information, partition at least one model parameter increment belonging to the trusted client set into a first model parameter increment set, and partition at least one model parameter increment of the untrusted client set into a second model parameter increment set.

[0097] A generation module 404, configured to generate at least one trust score for at least one model parameter increment in the second model parameter increment set based on the model parameter increments in the first model parameter increment set and the second model parameter increment set.

[0098] An update module 405, configured to perform a weighting process on at least one model parameter increment in the second model parameter increment set by using at least one trust score, perform an averaging process on the weighting result and the first model parameter increment set to obtain an average model parameter increment, and update the global model parameter based on the average model parameter increment.

[0099] The apparatus further includes a processing module, configured to generate a verification value of the at least one signature information based on a preset key and the at least one signature information; process the at least one model parameter increment based on a preset hash function to obtain a hash value of the at least one model parameter increment; compare and determine whether the verification value of the signature information of the at least one client is the same as the hash value of the model parameter increment; if so, partition the at least one client into the trusted client; if not, partition the at least one client into the untrusted client.

[0100] The processing module is further configured to receive at least one encrypted ciphertext sent by at least one of the clients; decrypt the at least one encrypted ciphertext to obtain the at least one signature information and the at least one model parameter increment.

[0101] The processing module is further configured to generate and publish an initial data set, where the initial data set includes: a preset key, a global parameter model, the global model parameters, a preset multiple, the preset key is used for at least one client to encrypt the ciphertext or the server to decrypt the ciphertext, the global parameter model is used to generate the model parameter increment at at least one client, the global model parameters are used to initialize the global parameter model, and the preset multiple is used to promote the model parameter increment; send a training instruction to the at least one client, where the training instruction instructs the at least one client to obtain the initial data set and generate the at least one model parameter increment and the at least one signature information based on the initial training set.

[0102] The processing module is further configured to, if not, delete the model parameter increment sent by the trusted client in the corresponding trusted client set from the first model parameter increment set.

[0103] The processing module is further configured to obtain the cumulative number of average model parameter increments, where the cumulative number indicates the number of average model parameter increments generated when the global parameter model is trained up to the current time; determine the actual iteration number of the global parameter model according to the cumulative number; judge whether the global parameter model has completed training according to the actual iteration number and the preset iteration number; if so, stop iteratively updating the global model parameters of the global parameter model, and send an abort instruction to the at least one client, where the abort instruction instructs the at least one client to stop training.

[0104] The processing module is further configured to generate the average model parameter increment according to a relational expression, the at least one trust score, the first model parameter increment set, and the second model parameter increment set; update the global model parameters according to a preset global learning rate, the global model parameters, and the average model parameter increment.

[0105] An update device for global model parameters of federated learning provided by the present application distinguishes between trusted and untrusted clients, avoiding data contamination by untrusted clients, thus making the global model more reliable during update. Using signature information ensures the reliability of the parameter increments uploaded by clients, preventing malicious attackers from interfering with the training of the global model by manipulating model parameters. By weighting parameter increments from different sources based on trust scores, the global model can be updated more precisely, reducing the negative impact of untrusted clients on the global model. By weighting and averaging the increments of model parameters, the convergence of the model can be accelerated, avoiding unnecessary iterations and computational overhead. By not collecting clients' data but having clients perform training locally and upload model parameter increments, combined with a credibility evaluation mechanism for signature information, it is possible to ensure that the updated global model parameters are not interfered with by untrusted clients without infringing on user privacy.

[0106] For the description of the features in the corresponding embodiments of the update device for global model parameters of federated learning, reference can be made to the relevant descriptions in the corresponding embodiments of the update method for global model parameters of federated learning, which will not be elaborated here one by one.

[0107] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the update method for global model parameters of federated learning.

[0108] This electronic device can be a computer device, having Figure 4 the layout fusion device of the semiconductor device as shown.

[0109] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present application. As shown in Figure 5 , the computer device includes: one or more processors 10, a memory 20, and an interface for connecting each component, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 5 In

[0110] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include an integrated circuit. The integrated circuit can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0111] Among them, the memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the embodiments.

[0112] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network.

[0113] The memory 20 can include a volatile memory, for example, a random access memory; the memory can also include a non-volatile memory, for example, a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of various types of memories.

[0114] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.

[0115] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Among them, the computer program is set to execute the steps in any of the above embodiments of the method for updating the global model parameters of federated learning when running.

[0116] In an exemplary embodiment, the above computer-readable storage medium can include, but is not limited to: various media such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc that can store computer programs.

[0117] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the method for updating the global model parameters of federated learning.

[0118] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the method for updating the global model parameters of federated learning are implemented.

[0119] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0120] The above has introduced in detail a method and apparatus for updating the global model parameters of federated learning provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for updating global model parameters of federated learning, characterized in that: The method comprises: Obtain at least one signature information and at least one model parameter increment sent by at least one client, where the model parameter increment corresponds to the signature information one by one, and the model parameter increment is an increment between global model parameters generated by two trainings of the at least one client; Based on the at least one signature information, dividing the at least one client into a trusted client set and an untrusted client set; According to the trusted client set and the untrusted client set, and the at least one signature information, the at least one model parameter increment is divided, the at least one model parameter increment belonging to the trusted client set is divided into a first model parameter increment set, and the at least one model parameter increment of the untrusted client set is divided into a second model parameter increment set; generating, based on the model parameter increments in the first set of model parameter increments and the second set of model parameter increments, at least one trust score for at least one model parameter increment in the second set of model parameter increments; Based on the at least one trust score, at least one model parameter increment in the second model parameter increment set is weighted, and the weighted result and the first model parameter increment set are averaged to obtain an average model parameter increment, and the global model parameters are updated based on the average model parameter increment.

2. The method according to claim 1, characterized in that: The dividing the at least one client into a trusted client set and an untrusted client set based on the at least one signature information comprises: Based on a preset key and the at least one signature information, generating a verification value of the at least one signature information; Processing the at least one model parameter increment based on a preset hash function to obtain a hash value of the at least one model parameter increment; Comparing and determining whether the check value of the signature information of the at least one client and the hash value of the model parameter increment are the same; If yes, classifying the at least one client as the trusted client; If not, the at least one client is classified as the untrusted client.

3. The method according to claim 1, characterized in that The obtaining of at least one signature information and at least one model parameter increment sent by at least one client includes: receiving at least one encrypted ciphertext sent by at least one of the clients; The at least one encrypted ciphertext is decrypted to obtain the at least one signature information and the at least one model parameter increment.

4. The method according to any one of claims 1 to 3, characterized in that: Before dividing the identity of the at least one client into a trusted client set and an untrusted client set based on the signature information sent by the at least one client, the method further includes: Generate and publish an initial data set, wherein the initial data set includes: a preset key, a global parameter model, the global model parameters, and a preset multiple, wherein the preset key is used for the at least one client to encrypt the ciphertext or the server to decrypt the ciphertext, the global parameter model is used to generate the model parameter increment on the at least one client, the global model parameters are used to initialize the global parameter model, and the preset multiple is used to generalize the model parameter increment; A training instruction is sent to the at least one client, wherein the training instruction instructs the at least one client to obtain the initial data set and generate the at least one model parameter increment and the at least one signature information based on the initial training set.

5. The method according to claim 3, characterized in that: Before generating at least one trust score of at least one model parameter increment in the second set of model parameter increments based on the model parameter increments in the first set of model parameter increments and the second set of model parameter increments, the method further includes: If not, the model parameter increment sent by the corresponding trusted client in the trusted client set is deleted from the first model parameter increment set.

6. The method according to any one of claims 1 to 3, characterized in that: After weighting at least one model parameter increment in the second model parameter increment set based on the at least one trust score, performing average processing on the weighted result and the first model parameter increment set to obtain an average model parameter increment, and updating the global model parameter based on the average model parameter increment, the method further includes: Obtaining a cumulative number of average model parameter increments, where the cumulative number indicates the number of average model parameter increments generated by the global parameter model training to the current time; Determining the actual number of iterations of the global parameter model according to the accumulated number; Determining whether the global parameter model has completed training according to the actual number of iterations and the preset number of iterations; If yes, stop iteratively updating the global model parameters of the global parameter model, and send a stop instruction to the at least one client, wherein the stop instruction instructs the at least one client to stop training.

7. The method according to any one of claims 1 to 3, characterized in that: The processing of the first set of model parameter increments and the second set of model parameter increments based on the at least one trust score to obtain an average model parameter increment, and updating the global model parameter based on the average model parameter increment, comprises: generating the average model parameter increment according to a relationship, the at least one trust score, the first set of model parameter increments, and the second set of model parameter increments; The global model parameters are updated according to a preset global learning rate, the global model parameters and the average model parameter increment.

8. A device for updating global model parameters of federated learning, characterized in that: The device comprises: An acquisition module, used to acquire at least one signature information and at least one model parameter increment sent by at least one client, wherein the model parameter increment corresponds to the signature information one by one, and the model parameter increment is an increment between global model parameters generated by two trainings of the at least one client; A first division module, configured to divide the at least one client into a trusted client set and an untrusted client set based on the at least one signature information; a second partitioning module, configured to partition the at least one model parameter increment according to the trusted client set and the untrusted client set, and the at least one signature information, partition the at least one model parameter increment belonging to the trusted client set into a first model parameter increment set, and partition the at least one model parameter increment of the untrusted client set into a second model parameter increment set; a generating module, configured to generate, based on the first set of model parameter increments and the model parameter increments in the second set of model parameter increments, at least one trust score for at least one model parameter increment in the second set of model parameter increments; An updating module is used to perform weighted processing on at least one model parameter increment in the second model parameter increment set based on the at least one trust score, and average the weighted result and the first model parameter increment set to obtain an average model parameter increment, and update the global model parameter based on the average model parameter increment.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for updating the global model parameters of federated learning of any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for updating global model parameters of federated learning of any one of claims 1 to 7.