Federal learning processing method and device, storage medium and program product
The client determines personalized training strategies and optimization algorithms based on local data and business needs, generates upload parameters, and aggregates them in the central coordinator, which solves the problem of poor flexibility of existing federated learning systems and achieves differentiated demand satisfaction and improved model adaptability in multiple scenarios.
Patent Information
- Application Number
- CN202510734307.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-26
AI Technical Summary
The existing federated learning system adopts a unified global model, which has poor flexibility and cannot meet the differentiated needs in multiple scenarios.
The client determines personalized local training strategies and optimization algorithms based on local data and business needs, generates upload parameters, and supports encryption processing. The central coordinator aggregates the model based on the aggregation weight.
The flexibility of the model is improved to meet the differentiated needs of different clients in multiple scenarios, and the adaptability and personalized service quality of the model are improved.
Smart Images

Figure CN120706509A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of federated learning technology, and in particular to a processing method, device, storage medium, and program product for federated learning. Background Art
[0002] Federated Learning, as a distributed learning technology, is expected to create a new landscape for intelligent development across various industries. Its application in related industries is booming, with numerous achievements in various fields.
[0003] Currently, federated learning systems usually use preset optimization algorithms for local training to update global model parameters.
[0004] However, existing technologies use a unified global model with poor flexibility and cannot meet the differentiated needs in multiple scenarios. Summary of the Invention
[0005] This application provides a processing method, device, storage medium, and program product for federated learning to address the problem that existing technologies have poor flexibility and cannot meet differentiated needs in multiple scenarios.
[0006] In a first aspect, the present application provides a method for processing federated learning, which is applied to a client and includes:
[0007] Receive the initial model sent by the central coordinator;
[0008] Obtaining local data and business requirements of the client;
[0009] Determining, according to the local data and the business requirements, a local training strategy of the client for the initial model;
[0010] Performing local training processing on the initial model according to the local training strategy to obtain local update parameters of the client;
[0011] Generate upload parameters according to the local update parameters;
[0012] The upload parameters are uploaded to the central coordinator, so that after receiving the upload parameters sent by all the clients, the central coordinator generates a target global model according to the upload parameters sent by all the clients.
[0013] In one possible implementation, determining the local training strategy of the client for the initial model based on the local data and the business requirements includes: determining the optimization algorithm of the client for the initial model based on the local data and the business requirements; determining the parameters to be trained of the client for the initial model based on the local data and the business requirements.
[0014] In one possible implementation, determining the optimization algorithm of the client for the initial model based on the local data and the business needs includes: obtaining a plurality of algorithms to be selected; wherein the algorithms to be selected include a federated learning algorithm based on a personalized layer, a personalized federated learning algorithm based on a Morrow envelope, and a federated averaging algorithm with momentum; determining at least one alternative algorithm from the algorithms to be selected based on the local data and the business needs, and displaying the alternative algorithm on a preset selection interface, and determining the optimization algorithm of the client for the initial model based on the user's selection operation on the preset selection interface; or, determining the optimization algorithm of the client for the initial model from the algorithms to be selected based on the local data and the business needs.
[0015] In a possible implementation, generating upload parameters based on the local update parameters includes: obtaining transmission requirement information of the client; and determining all or part of the local update parameters as the upload parameters based on the transmission requirement information.
[0016] In one possible implementation, determining all or part of the local update parameters as the upload parameters based on the transmission requirement information includes: performing at least one of quantization processing, pruning processing, and distillation processing on the local update parameters based on the transmission requirement information to obtain the upload parameters.
[0017] In one possible implementation, the transmission requirement information includes at least one of privacy data information, communication link information, local data ratio information of the client, client device status information, and user requirement information; accordingly, determining all or part of the local update parameters as the upload parameters based on the transmission requirement information includes: determining the part of the local update parameters that is unrelated to the privacy data information as the upload parameter based on the privacy data information; and\or, determining the upload ratio of the local update parameters based on at least one of the communication link information, the local data ratio information, the client device status information, and the user requirement information, and determining all or part of the local update parameters as the upload parameters based on the upload ratio.
[0018] In one possible implementation, uploading the upload parameters to the central coordinator includes: obtaining the encryption requirements of the client; determining the encryption method corresponding to the client based on the encryption requirements; wherein the encryption method includes at least one of differential privacy encryption, homomorphic encryption, and multi-party secure computing; according to the encryption method, encrypting the upload parameters to obtain encrypted upload parameters; and uploading the encrypted upload parameters to the central coordinator.
[0019] In a second aspect, the present application provides a method for processing federated learning, which is applied to a central coordinator, comprising:
[0020] Send the initial model to the client;
[0021] Receive upload parameters sent by all clients, wherein the upload parameters are for the client to obtain the client's local data and business requirements; determine the client's local training strategy for the initial model based on the local data and the business requirements; perform local training on the initial model according to the local training strategy to obtain the client's local update parameters; generate according to the local update parameters;
[0022] A target global model is generated according to the upload parameters sent by all the clients.
[0023] In one possible implementation, generating a target global model based on the upload parameters sent by all the clients includes: obtaining aggregate parameter information of all the clients; wherein the aggregate parameter information is determined by the parameter amount of the client's upload parameters and / or the priority pre-configured for the client; determining the aggregation weight corresponding to the client based on the aggregate parameter information; aggregating the upload parameters of all the clients based on the aggregation weight to obtain an updated global model; and iteratively executing a federated learning process with all the clients based on the updated global model until a target global model is generated.
[0024] In a third aspect, the present application provides a processing device for federated learning, including: a memory, a processor;
[0025] The memory stores computer-executable instructions;
[0026] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect, or executes the above second aspect and / or various possible implementations of the second aspect.
[0027] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect and / or various possible implementation methods of the first aspect, or to implement the second aspect and / or various possible implementation methods of the second aspect.
[0028] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect, or implements the second aspect and / or various possible implementations of the second aspect.
[0029] The processing method, device, storage medium and program product of federated learning provided in this application can determine the local training strategy for local training on the client in a targeted manner for each client based on its own local data and business needs, which can improve the flexibility of the model and meet the differentiated needs of different clients in multiple scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0031] Figure 1 A schematic diagram of a scenario illustrating a method for processing federated learning provided in an embodiment of the present application;
[0032] Figure 2 Schematic diagram of the process of the federated learning processing method provided in the embodiment of this application Figure 1 ;
[0033] Figure 3 Schematic diagram of the process of the federated learning processing method provided in the embodiment of this application Figure 2 ;
[0034] Figure 4 A schematic diagram of the interactive process of the federated learning processing method provided in an embodiment of the present application;
[0035] Figure 5 A schematic diagram of the system architecture of federated learning provided in an embodiment of the present application;
[0036] Figure 6 A schematic diagram of the structure of the customized module provided in the embodiment of the present application;
[0037] Figure 7 Schematic diagram of the structure of the processing device for federated learning provided in the embodiment of the present application Figure 1 ;
[0038] Figure 8Schematic diagram of the structure of the processing device for federated learning provided in the embodiment of the present application Figure 2 ;
[0039] Figure 9 A schematic diagram of the structure of a federated learning processing device provided in an embodiment of the present application.
[0040] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0042] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0043] Currently, the operational process of a federated learning system primarily involves: each participant performs local training based on a local dataset and global model parameters according to a pre-set optimization algorithm, generating updated model parameters. The participant then uploads these updated model parameters to a central coordinator. The central coordinator aggregates the model parameters uploaded by all participants to generate a new global model. Existing federated learning systems lack personalized support. They typically employ a unified global model, making them unsuitable for diverse scenarios.
[0044] The federated learning processing method provided in this application can flexibly meet the different requirements of different participants for the model and adapt to the needs of diversified scenarios by specifically determining the training strategy for training on the client based on the client's local data and business needs.
[0045] Figure 1 A schematic diagram of a scenario of a processing method for federated learning provided in an embodiment of the present application, such as Figure 1 As shown, the specific application scenarios of this application include: a client 101 and a central coordinator 102.
[0046] There are multiple clients 101 .
[0047] Specifically, the central coordinator 102 sends the initial model to the client 101; the client 101 locally trains the initial model according to the local training strategy to obtain upload parameters; the client sends the upload parameters to the central coordinator 102; the central coordinator 102 generates a target global model based on the upload parameters of all clients 101.
[0048] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0049] Figure 2 Schematic diagram of the process of the federated learning processing method provided in the embodiment of this application Figure 1 The execution entity of this embodiment can be Figure 1 The client 101 shown in FIG may also be other computer devices, and this embodiment does not impose any particular restrictions on this. Figure 2 As shown, the method includes:
[0050] S201: Receive an initial model sent by a central coordinator.
[0051] S202: Acquire the client's local data and business requirements.
[0052] Among them, local data includes non-independent and identically distributed data, etc.
[0053] S203: Determine the client's local training strategy for the initial model based on local data and business requirements.
[0054] Specifically, data features of local data are obtained; a target algorithm is selected from multiple preset optimization algorithms based on the data features and business requirements; wherein the data features include data distribution; and an appropriate target model structure is selected based on the data distribution and business requirements.
[0055] S204: Perform local training on the initial model according to the local training strategy to obtain local update parameters of the client.
[0056] Specifically, according to the target algorithm and target model structure, the initial model is locally trained to obtain the client's local update parameters.
[0057] S205: Generate upload parameters based on local update parameters.
[0058] Specifically, the upload format of the central coordinator is obtained; and the upload parameters are generated according to the upload format and the local update parameters.
[0059] S206: Upload the upload parameters to the central coordinator, so that the central coordinator generates a target global model according to the upload parameters sent by all the clients after receiving the upload parameters sent by all the clients.
[0060] The federated learning processing method provided in the embodiment of the present application determines, for each client, a local training strategy for local training on the client in a targeted manner based on its own local data and business needs, which can improve the flexibility of the model and meet the differentiated needs of different clients in multiple scenarios.
[0061] In one embodiment of the present application, based on the above embodiment, step S203 further provides another implementation method, which is described in detail as follows:
[0062] S2031: Determine the client's optimization algorithm for the initial model based on local data and business requirements.
[0063] Specifically, S2031 includes Sa~Sb:
[0064] Sa: Obtain multiple algorithms to be selected; the algorithms to be selected include a personalized layer-based federated learning algorithm, a Morrow envelope-based personalized federated learning algorithm, and a momentum-based federated averaging algorithm.
[0065] Sb: Based on local data and business needs, determine at least one alternative algorithm from the algorithms to be selected, and display the alternative algorithms on a preset selection interface. Based on the user's selection operation on the preset selection interface, determine the client's optimization algorithm for the initial model; or, based on local data and business needs, determine the client's optimization algorithm for the initial model from the algorithms to be selected.
[0066] Specifically, data features of local data are obtained; and at least one alternative algorithm is determined from among the algorithms to be selected based on the data features and business requirements.
[0067] Among them, data characteristics include data distribution, etc.
[0068] S2032: Determine the client's parameters to be trained for the initial model based on local data and business requirements.
[0069] Among them, the parameters to be trained include learning rate, batch size, communication frequency, etc.
[0070] Specifically, the data features of the local data are determined; the important features in the local data are determined according to business needs; and the parameters to be trained for the initial model of the client are determined according to the important features.
[0071] In one embodiment of the present application, the data characteristics include computing resources and the like.
[0072] It should be noted that clients can choose a model complexity that suits their computing resources. Clients can also set task priorities to ensure that resource-constrained clients can participate in federated learning efficiently.
[0073] The federated learning processing method provided in the embodiment of the present application supports the client to dynamically adjust the parameters to be trained according to computing resources and business needs, thereby achieving efficient utilization of resources.
[0074] The federated learning processing method provided in the embodiment of the present application achieves personalization in the selection of optimization algorithms and model training parameters. It can not only effectively improve the adaptability of the model to heterogeneous data and reduce the underfitting or overfitting problems of the global model on specific clients, but also support the client to perform local fine-tuning based on the global model to further optimize the model performance, thereby achieving higher personalized service quality and more accurate business demand matching.
[0075] In one embodiment of the present application, based on the above embodiment, step S205 further provides another implementation method, which is described in detail as follows:
[0076] S2051: Obtain the client's transmission requirement information.
[0077] S2052: Determine all or part of the local update parameters as upload parameters according to the transmission requirement information.
[0078] The federated learning processing method provided in the embodiment of the present application selectively determines all or part of the local update parameters as upload parameters by transmitting demand information, and can adapt to client devices with different computing resources to meet the operating requirements of different clients.
[0079] In one embodiment of the present application, based on the above embodiment, step S2052 further provides another implementation method, which is detailed as follows:
[0080] According to the transmission requirement information, at least one of quantization processing, pruning processing, and distillation processing is performed on the local update parameters to obtain upload parameters.
[0081] The federated learning processing method provided in this application embodiment significantly reduces model size and inference time by quantizing, pruning, and distilling locally updated parameters, thereby improving inference efficiency. It can reduce storage and computing resource consumption while ensuring model performance, and flexibly adapt to the operating requirements of low-resource devices.
[0082] In one embodiment of the present application, based on the above embodiment, the transmission demand information includes at least one of privacy data information, communication link information, local data ratio information of the client, client device status information and user demand information.
[0083] The communication link information includes: transmission communication conditions, transmission resources, etc.
[0084] Accordingly, step S2052 also provides another implementation method, which is described in detail as follows:
[0085] Based on the privacy data information, the portion of the local update parameters that is not related to the privacy data information is determined as the upload parameter; and\or, based on at least one of the communication link information, the local data ratio information, the client device status information and the user demand information, the upload ratio of the local update parameters is determined, and based on the upload ratio, all or part of the local update parameters are determined as the upload parameters.
[0086] The federated learning processing method provided in the embodiment of the present application determines upload parameters based on privacy data information, communication link information, client local data ratio information, client device status information and user demand information, which can meet the diverse needs of different clients and different users and improve the flexibility of the model.
[0087] In one embodiment of the present application, based on the above embodiment, step S206 further provides another implementation method, which is described in detail as follows:
[0088] S2061: Obtain the encryption requirements of the client.
[0089] Among them, encryption requirements include encryption levels.
[0090] Among them, encryption levels include advanced privacy protection and ordinary privacy protection.
[0091] Among them, the encryption requirements of the client can be pre-set or obtained based on the user's input operation on the encryption requirements page, which is not limited in this application.
[0092] S2062: Determine the encryption method corresponding to the client based on the encryption requirements; wherein the encryption method includes at least one of differential privacy encryption, homomorphic encryption and multi-party secure computing.
[0093] S2063: Encrypt the uploaded parameters according to the encryption method to obtain encrypted uploaded parameters.
[0094] S2064: Upload the encrypted upload parameters to the central coordinator.
[0095] The federated learning processing method provided in the embodiment of the present application encrypts the uploaded parameters according to the encryption requirements of the client, which can meet the encryption requirements of different clients and help the client balance privacy protection and model performance.
[0096] Figure 3 Schematic diagram of the process of the federated learning processing method provided in the embodiment of this application Figure 2 The execution entity of this embodiment can be Figure 1 The central coordinator 102 shown in FIG can also be other computer devices, which is not particularly limited in this embodiment. Figure 3 As shown, the method includes:
[0097] S301: Sending the initial model to the client.
[0098] Among them, the initial model includes model architecture, model parameters, optimizer, etc.
[0099] S302: Receive upload parameters sent by all clients, where the upload parameters are for the client to obtain the client's local data and business needs; determine the client's local training strategy for the initial model based on the local data and business needs; perform local training on the initial model according to the local training strategy to obtain the client's local update parameters; and generate based on the local update parameters.
[0100] S303: Generate a target global model according to the upload parameters sent by all clients.
[0101] Specifically, S303 includes S3031 to S3034:
[0102] S3031: Obtain aggregate parameter information of all clients; wherein the aggregate parameter information is determined by the parameter quantity of the client's upload parameter and / or the priority pre-configured for the client.
[0103] S3032: Determine the aggregation weight corresponding to the client according to the aggregation parameter information.
[0104] It should be noted that the aggregation parameter information is positively correlated with the aggregation weight, that is, the greater the aggregation parameter information, the greater the corresponding aggregation weight.
[0105] S3033: Aggregate the uploaded parameters of all clients according to the aggregation weight to obtain an updated global model.
[0106] Specifically, according to the aggregation weight, the weighted federated averaging algorithm is used to aggregate the uploaded parameters of all clients to obtain the updated global model.
[0107] S3034: Iteratively execute the federated learning process with all clients according to the updated global model until the target global model is generated.
[0108] Specifically, the updated global model is used as the initial model, and steps S301 to S303 are repeatedly performed until the preset conditions are met to obtain the target global model.
[0109] The preset conditions may include target accuracy or a preset number of rounds.
[0110] The federated learning processing method provided in this embodiment determines the aggregation weight corresponding to each client based on the aggregation parameter information; and aggregates the uploaded parameters of all clients according to the aggregation weight. It supports dynamic adjustment of the aggregation weight for different clients, which can improve the flexibility of the model and meet the differentiated needs of different clients in multiple scenarios.
[0111] Figure 4 This is a schematic diagram of the interactive process of the federated learning processing method provided in the embodiment of this application. Figure 4 As shown, the method includes:
[0112] S401: The central coordinator sends an initial model to all clients.
[0113] S402: Any client among all clients obtains its own local data and business requirements.
[0114] S403: Any client determines a local training strategy for the initial model based on local data and business requirements.
[0115] S404: Any client performs local training on the initial model according to the local training strategy to obtain local update parameters of the client.
[0116] S405: Any client generates upload parameters based on local update parameters.
[0117] S406: The central coordinator receives the upload parameters sent by all clients.
[0118] S407: The central coordinator obtains the aggregation parameter information of all clients.
[0119] S408: The central coordinator determines the aggregation weight corresponding to the client according to the aggregation parameter information.
[0120] S409: The central coordinator aggregates the uploaded parameters of all clients according to the aggregation weight to obtain an updated global model.
[0121] S410: The central coordinator iteratively executes the federated learning process with all clients according to the updated global model until a target global model is generated.
[0122] The federated learning processing method provided in the embodiment of the present application determines, for each client, a local training strategy for local training on the client in a targeted manner based on its own local data and business needs. The central coordinator determines the corresponding aggregation weight of each client based on the aggregation parameter information of each client; the uploaded parameters of all clients are aggregated according to the aggregation weight, and the central coordinator is supported to dynamically adjust the aggregation weight for different clients, which can improve the flexibility of the model and meet the differentiated needs of different clients in multiple scenarios.
[0123] Figure 5 Schematic diagram of the system architecture of federated learning provided in the embodiment of this application. Figure 5 As shown in the figure, the federated learning system includes the system application layer, model service layer, federated workflow, security management, computing service layer, network interaction layer and device access layer.
[0124] The system application layer includes the federated platform system portal and customized modules. The federated platform system portal provides users with access to the federated learning platform and supports tasks creation, monitoring, and management. The customized modules support federated learning applications tailored to business needs, which can be one or more of the following: specific industries, enterprises, and users.
[0125] The model service layer includes: model deployment, model registration center, model format conversion, model usage log and model multi-version management. Model deployment is responsible for deploying federated learning models to edge devices or servers, supporting model distribution and execution. The model registration center is used to manage the registration of all federated learning models, including model name, version, structure and other information. Model format conversion is used to support model format conversion to adapt to different devices and frameworks. Adaptable frameworks include Open Neural Network Exchange (ONNX), TensorFlow and PyTorch. Model usage log is used to record model usage, including the number of calls, execution time and performance indicators. Model multi-version management is used to support model version control and facilitate model updates and rollbacks.
[0126] The federated workflow includes: federated party management, federated data collection, federated feature engineering, federated training tasks, and federated inference services. Federated party management is used to manage all parties involved in federated learning, including functions such as data viewing, task publishing, and participation. Federated data collection is used to collect audio and video data from edge devices and structured data from edge devices, such as sensor data or log information. Federated feature engineering is used to standardize data in horizontal federated learning, bin features in vertical federated learning, and perform one-hot encoding on features in vertical federated learning. Federated training tasks are used to support a variety of model training algorithms, such as logistic regression, linear regression, decision trees, boosted trees, and neural networks. Federated inference services are used to provide inference capabilities for federated learning models, supporting real-time or batch inference.
[0127] Security management includes: system management, federated collaboration, operation and maintenance monitoring, and network security. System management includes: (1) User management: managing user accounts on the platform; (2) Role management: assigning roles and permissions to different users; (3) Permission management: defining user access rights to system resources. Federated collaboration includes: (1) Homomorphic encryption: encrypting data to ensure privacy protection during the computation process; (2) Multi-party secure computation: performing secure computation between multiple parties to protect data from being leaked; (3) Secret sharing: splitting data into multiple parts and storing them in different locations to improve security; (4) Oblivious transfer: a data transmission technology that ensures that the data content cannot be inferred during transmission; (5) RSA (Rivest-Shamir-Adleman): an asymmetric encryption algorithm used for data encryption and signing. Operation and maintenance monitoring includes: (1) Cluster monitoring: monitoring the computing cluster status of the platform; (2) Application monitoring: monitoring the running status of federated learning applications; (3) Security scanning: performing vulnerability scanning on the system to ensure security. Network security includes: (1) Communication encryption: encrypting communication data; (2) Firewall: protecting the system from external attacks; Federated security network: providing a secure federated learning network environment; (3) Network policy: defining network access rules and permissions.
[0128] The computing service layer includes: data resource module, task resource module, algorithm resource module, model training component and visualization component. The data resource module includes: (1) distributed storage: providing distributed data storage capabilities; (2) federated storage: storing intermediate data or models generated during the federated learning process; (3) edge data acquisition: collecting data from edge devices and preprocessing. The task resource module includes: (1) distributed storage: providing distributed data storage capabilities; (2) federated storage: storing intermediate data or models generated during the federated learning process; (3) edge data acquisition: collecting data from edge devices and preprocessing. The algorithm resource module includes: (1) algorithm registration center: managing the registration of federated learning algorithms; (2) algorithm configuration: configuring algorithm parameters; (3) algorithm information display: displaying detailed information of the algorithm. The model training component includes: (1) data preprocessing: performing operations such as cleaning, standardization, and feature extraction on data; (2) federated model training: executing training of federated learning models; (3) non-federated model training: supporting single-machine or distributed non-federated model training; (4) custom algorithm expansion: supporting the integration of user-defined algorithms. Federated graph network algorithms: support federated learning of graph-structured data; (5) Non-federated graph network algorithms: support non-federated learning of graph-structured data. Visualization components include: (1) Task dashboard: displays the execution status and progress of tasks; (2) Task workflow: displays the execution process of tasks; (3) Model training indicators: displays the performance indicators of model training.
[0129] The network interaction layer includes: federated private networks, encrypted transmission, and network resource management. The federated private network provides private network support for federated learning, ensuring data transmission security. Encrypted transmission supports encrypted data transmission based on network communication protocols, including HTTP (Hypertext Transfer Protocol). Network resource management manages the allocation and use of network resources.
[0130] The device access layer includes: federated access devices, access resource management, and access methods. Federated access devices are used to support access from a variety of devices, including ARM (Advanced RISC Machines, advanced reduced instruction set architecture processor) architecture devices, X86 architecture devices, GPUs (Graphics Processing Units, graphics processors), computing cards, and edge computers. Access resource management includes resource containers and container image repositories for resource management and image management and distribution. Access methods include: (1) public / private cloud, used to support access through cloud platforms; (2) server / workstation, used to support access through local servers or workstations; (3) secure media / industrial control equipment, used to support access through secure media or industrial control equipment.
[0131] Figure 6 This is a schematic diagram of the structure of the customized module provided in the embodiment of this application. Figure 6 As shown, the customized modules include: personalized model training, customized feature engineering, personalized model evaluation, dynamic task configuration, personalized privacy protection, personalized model reasoning, custom algorithm expansion, and visualization and monitoring.
[0132] Personalized model training dynamically adjusts the model structure or training strategy based on each client's data characteristics (e.g., non-IID data) and business needs to achieve personalized model optimization. Specifically, this includes: supporting client-side local model fine-tuning: fine-tuning the global model using local data; providing support for multiple optimization algorithms; and allowing clients to select a model structure that suits their own data distribution and business needs.
[0133] Customized feature engineering is used to support clients to perform specific feature engineering based on their own data characteristics. Customized feature engineering includes: horizontal federated learning and vertical federated learning. Horizontal federated learning includes: (1) Data standardization: normalizing or standardizing local data of different clients; (2) Feature selection: selecting the most relevant features based on business needs. Vertical federated learning includes: (1) Feature alignment: aligning data features of different clients through privacy protection mechanisms; (2) Feature binning: dividing continuous variables into discrete intervals to improve the adaptability of the model; (3) One-hot encoding: encoding categorical variables for easier model use.
[0134] Personalized model evaluation is used to provide personalized evaluation indicators and methods for each client's model training results, including: supporting multiple evaluation indicators (such as accuracy, recall, F1 score, AUC (Area Under Curve), etc.); providing personalized evaluation methods, including (1) customized evaluation based on the client's business goals; (2) dynamically adjusting evaluation weights to adapt to different scenario requirements.
[0135] Dynamic task configuration allows clients to dynamically adjust parameter configurations in federated learning tasks to meet personalized needs. Specifically, it supports dynamic adjustment of training parameters such as learning rate, batch size, and communication frequency; clients select model complexity that suits their own computing resources; and provide task priority settings to ensure that resource-constrained clients can efficiently participate in federated learning.
[0136] It's important to note that dynamic task configuration can improve the participation efficiency of resource-constrained clients, reduce computational and communication costs during training, and ensure the efficient completion of critical tasks by dynamically adjusting task priorities. It also optimizes the overall communication and computational overhead of the system, significantly improving the operational efficiency of federated learning systems and supporting efficient collaboration in diverse scenarios.
[0137] Personalized privacy protection is used to provide differentiated privacy protection strategies based on the client's privacy needs, including: supporting the client to choose different privacy protection mechanisms (such as differential privacy, homomorphic encryption, multi-party secure computing, etc.); providing privacy budget management functions to help the client balance privacy protection and model performance; supporting personalized privacy protection level settings, including: (1) high privacy protection: suitable for sensitive data; (2) normal privacy protection: suitable for general business data.
[0138] Personalized model inference is used to provide personalized model inference services for each client, supporting online or offline inference. Specifically, it includes: supporting clients to select inference modes (such as real-time inference and batch inference) according to business needs; providing model optimization tools (such as quantization and pruning) to improve inference efficiency; supporting clients to deploy personalized inference services and adapt to different hardware environments (such as edge devices and cloud servers).
[0139] It's important to note that the customized module supports heterogeneous devices, enabling efficient operation on resource-constrained devices and reducing hardware dependency. It also provides a unified interface and optimization tools to simplify deployment. Whether running on high-performance servers or low-resource devices, it ensures efficient model operation, meeting the differentiated needs of diverse business scenarios and laying the foundation for the widespread application of federated learning.
[0140] Custom algorithm expansion is used for clients to integrate custom algorithms or models according to their own needs. Specifically, it is used to: provide an open algorithm interface to support clients to upload custom algorithms; support seamless integration of multiple algorithm frameworks (such as TensorFlow, PyTorch, and Scikit-learn); and provide an algorithm testing environment to ensure the correctness and compatibility of custom algorithms.
[0141] It's important to note that custom algorithm expansion provides clients with an algorithm testing environment, ensuring the correctness and stability of custom algorithms. It also enhances the system's flexibility and scalability, enabling it to adapt to diverse scenario requirements. The open interface design reduces the complexity of custom development, helping clients quickly deploy and iterate personalized solutions, thereby improving system applicability and user satisfaction.
[0142] Visualization and monitoring is used to provide clients with personalized task monitoring and visualization tools, including: providing a task dashboard to display key indicators of the training process (such as loss function and accuracy); supporting clients to customize chart types and display content; and providing real-time monitoring functions to help clients view task progress and resource usage in real time.
[0143] It should be noted that the customized module is highly flexible and compatible, and can adapt to the needs of different scenarios through modular design, allowing clients to enable or disable specific functions according to their own needs. In addition, this module also supports the client to independently select a hybrid federated learning algorithm and hardware environment, including horizontal, vertical and hybrid federated learning scenarios under edge devices and cloud servers. At the same time, taking into account the heterogeneity of clients in terms of data, resources, etc., the customized module provides a lightweight personalized model optimization tool that supports incremental learning, model compression, model distillation and other capabilities to ensure the model performance of federated learning and improve the efficiency of model training and model inference. In addition, the personalized federated learning system integrates a variety of privacy protection technologies to ensure the security of data and models, and allows clients to independently select privacy policies to match different privacy protection scenarios (high-performance scenarios, high-efficiency scenarios, etc.) to fully meet differentiated needs. It can improve model adaptability, protect data privacy and optimize business processes.
[0144] Figure 7 Schematic diagram of the structure of the processing device for federated learning provided in the embodiment of the present application Figure 1 ,like Figure 7 As shown, the federated learning processing device 70 provided in this embodiment includes: a receiving module 701, an acquisition module 702, a determination module 703, a training module 704, a generation module 705 and an upload module 706.
[0145] Receiving module 701, used for receiving the initial model sent by the central coordinator;
[0146] An acquisition module 702 is configured to acquire local data and service requirements of the client;
[0147] A determination module 703 is configured to determine a local training strategy of the client for the initial model based on the local data and the business requirements;
[0148] A training module 704 is configured to perform local training on the initial model according to the local training strategy to obtain local update parameters of the client;
[0149] A generating module 705 is configured to generate upload parameters according to the local update parameters;
[0150] The uploading module 706 is configured to upload the upload parameters to the central coordinator, so that the central coordinator generates a target global model according to the upload parameters sent by all the clients after receiving the upload parameters sent by all the clients.
[0151] In one possible implementation, the determination module 703 is specifically used to: determine the optimization algorithm of the client for the initial model based on the local data and the business requirements; determine the parameters to be trained of the client for the initial model based on the local data and the business requirements.
[0152] In one possible implementation, the determination module 703, when "determining the optimization algorithm of the client for the initial model based on the local data and the business needs", is specifically used to: obtain multiple algorithms to be selected; wherein the algorithms to be selected include a federated learning algorithm based on a personalized layer, a personalized federated learning algorithm based on a Morrow envelope, and a federated averaging algorithm with momentum; determine at least one alternative algorithm from the algorithms to be selected based on the local data and the business needs, and display the alternative algorithm on a preset selection interface, and determine the optimization algorithm of the client for the initial model based on the user's selection operation on the preset selection interface; or, determine the optimization algorithm of the client for the initial model from the algorithms to be selected based on the local data and the business needs.
[0153] In a possible implementation, the generating module 705 is specifically configured to: obtain transmission requirement information of the client; and determine all or part of the local update parameters as the upload parameters according to the transmission requirement information.
[0154] In one possible implementation, the generation module 705, when "determining all or part of the local update parameters as the upload parameters based on the transmission requirement information", is specifically used to: perform at least one of quantization processing, pruning processing and distillation processing on the local update parameters based on the transmission requirement information to obtain the upload parameters.
[0155] In one possible implementation, the transmission requirement information includes at least one of privacy data information, communication link information, local data ratio information of the client, client device status information and user requirement information; accordingly, the generation module 705, when "determining all or part of the local update parameters as the upload parameters according to the transmission requirement information", is specifically used to: determine the part of the local update parameters that is not related to the privacy data information as the upload parameter according to the privacy data information; and\or, determine the upload ratio of the local update parameters according to at least one of the communication link information, the local data ratio information, the client device status information and the user requirement information, and determine all or part of the local update parameters as the upload parameters according to the upload ratio.
[0156] In one possible implementation, the upload module 706 is specifically used to: obtain the encryption requirements of the client; determine the encryption method corresponding to the client based on the encryption requirements; wherein the encryption method includes at least one of differential privacy encryption, homomorphic encryption and multi-party secure computing; according to the encryption method, encrypt the upload parameters to obtain encrypted upload parameters; and upload the encrypted upload parameters to the central coordinator.
[0157] The federated learning processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0158] Figure 8 Schematic diagram of the structure of the processing device for federated learning provided in the embodiment of the present application Figure 2 ,like Figure 8 As shown, the federated learning processing device 80 provided in this embodiment includes: a sending module 801, a receiving module 802 and a generating module 803.
[0159] The sending module 801 is used to send the initial model to the client;
[0160] The receiving module 802 is configured to receive upload parameters sent by all clients, wherein the upload parameters are for the client to obtain the client's local data and business requirements; determine the client's local training strategy for the initial model based on the local data and the business requirements; perform local training on the initial model according to the local training strategy to obtain the client's local update parameters; and generate the local update parameters according to the local update parameters;
[0161] The generation module 803 is configured to generate a target global model according to the upload parameters sent by all the clients.
[0162] In one possible implementation, the generation module 803 is specifically used to: obtain the aggregate parameter information of all the clients; wherein the aggregate parameter information is determined by the parameter quantity of the uploaded parameters of the client and / or the priority pre-configured for the client; determine the aggregation weight corresponding to the client based on the aggregate parameter information; aggregate the uploaded parameters of all the clients based on the aggregation weight to obtain an updated global model; iteratively execute the federated learning process with all the clients based on the updated global model until the target global model is generated.
[0163] The federated learning processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0164] Figure 9 This is a schematic diagram of the structure of the processing device for federated learning provided in the embodiment of this application. Figure 9 As shown, the federated learning processing device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 90 also includes a communication component 903. The processor 901, the memory 902, and the communication component 903 are connected via a bus 904.
[0165] During the specific implementation process, at least one processor 901 executes the computer-executable instructions stored in the memory 902, so that the at least one processor 901 performs the above method.
[0166] The specific implementation process of the processor 901 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0167] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules in the processor.
[0168] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0170] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0171] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0172] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0173] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0174] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.
[0175] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0176] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0177] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0179] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. It is not limited to the precise structure described above and shown in the drawings, and various modifications and changes may be made without departing from the scope of this application. The scope of this application is limited solely by the appended claims.
Claims
1. A method for processing federated learning, characterized in that: Applied to a client, the method includes: Receive the initial model sent by the central coordinator; Obtaining local data and business requirements of the client; Determining, according to the local data and the business requirements, a local training strategy of the client for the initial model; Performing local training processing on the initial model according to the local training strategy to obtain local update parameters of the client; Generate upload parameters according to the local update parameters; The upload parameters are uploaded to the central coordinator, so that after receiving the upload parameters sent by all the clients, the central coordinator generates a target global model according to the upload parameters sent by all the clients.
2. The method according to claim 1, characterized in that The determining, based on the local data and the business requirements, a local training strategy of the client for the initial model includes: Determining an optimization algorithm for the client for the initial model based on the local data and the business requirements; Determine parameters to be trained for the initial model on the client according to the local data and the business requirements.
3. The method according to claim 2, characterized in that The determining, based on the local data and the business requirements, an optimization algorithm for the initial model by the client includes: Acquire multiple algorithms to be selected; wherein the algorithms to be selected include a personalized layer-based federated learning algorithm, a Morrow envelope-based personalized federated learning algorithm, and a momentum-based federated averaging algorithm; Determining at least one candidate algorithm from the to-be-selected algorithms based on the local data and the business requirements, and displaying the candidate algorithm on a preset selection interface; and determining an optimization algorithm for the client for the initial model based on a selection operation by a user on the preset selection interface; Alternatively, based on the local data and the business requirements, an optimization algorithm of the client for the initial model is determined from the algorithms to be selected.
4. The method according to any one of claims 1 to 3, characterized in that Generating upload parameters according to the local update parameters includes: Obtaining transmission requirement information of the client; According to the transmission requirement information, all or part of the local update parameters are determined as the upload parameters.
5. The method according to claim 4, characterized in that The determining, according to the transmission requirement information, all or part of the local update parameters as the upload parameters includes: According to the transmission requirement information, at least one of quantization processing, pruning processing, and distillation processing is performed on the local update parameter to obtain an upload parameter.
6. The method according to claim 4, characterized in that The transmission requirement information includes at least one of privacy data information, communication link information, local data ratio information of the client, client device status information and user requirement information; Accordingly, determining all or part of the local update parameters as the upload parameters according to the transmission requirement information includes: According to the private data information, determining a portion of the local update parameter that is unrelated to the private data information as an upload parameter; and\or, The upload ratio of the local update parameters is determined based on at least one of the communication link information, the local data ratio information, the client device status information and the user demand information, and based on the upload ratio, all or part of the local update parameters are determined as upload parameters.
7. The method according to any one of claims 1 to 3, characterized in that The uploading of the upload parameters to the central coordinator includes: Obtaining the encryption requirements of the client; Determining an encryption method corresponding to the client according to the encryption requirement; wherein the encryption method includes at least one of differential privacy encryption, homomorphic encryption, and multi-party secure computing; Encrypting the upload parameters according to the encryption method to obtain encrypted upload parameters; The encrypted upload parameters are uploaded to the central coordinator.
8. A method for processing federated learning, characterized in that: Applied to a central coordinator, the method includes: Send the initial model to the client; Receive upload parameters sent by all clients, wherein the upload parameters are for the client to obtain the client's local data and business requirements; determine the client's local training strategy for the initial model based on the local data and the business requirements; perform local training on the initial model according to the local training strategy to obtain the client's local update parameters; generate according to the local update parameters; A target global model is generated according to the upload parameters sent by all the clients.
9. The method according to claim 8, characterized in that Generating a target global model according to the upload parameters sent by all the clients includes: Obtaining aggregate parameter information of all the clients; wherein the aggregate parameter information is determined by the parameter quantity of the upload parameters of the clients and / or the priority pre-configured for the clients; Determining an aggregation weight corresponding to the client according to the aggregation parameter information; Aggregating the uploaded parameters of all the clients according to the aggregation weight to obtain an updated global model; The federated learning process with all the clients is iteratively performed according to the updated global model until a target global model is generated.
10. A processing device for federated learning, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs any one of claims 1 to 7 or performs the method according to claim 8 or 9.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement any one of claims 1 to 7 or to execute the method according to claim 8 or 9 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements any one of claims 1 to 7 or performs the method according to claim 8 or 9.