Resource collaborative optimization method applied to federated learning and related equipment
By employing a resource-coordinated optimization method, utilizing gradient similarity algorithms and energy cost calculations, and grouping clients and edge servers, the problem of poor convergence and convergence rate in federated learning is solved, achieving higher accuracy and resource utilization.
Patent Information
- Application Number
- CN202511804264.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-13
AI Technical Summary
Existing federated learning suffers from poor convergence and convergence rate.
A resource collaborative optimization method is adopted. By receiving resource optimization requests, model architecture data is obtained, clients and edge servers are grouped using a gradient similarity algorithm, energy overhead is calculated, a resource collaborative allocation decision is constructed, and the model training strategy is adjusted.
It improved the accuracy and resource utilization of model training while reducing training time.
Smart Images

Figure CN121664803A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a resource collaborative optimization method and related equipment applied to federated learning. Background Technology
[0002] Federated learning, as a distributed machine learning framework, allows users to train models using local datasets. During training, the data itself does not leave the user's local machine; only the changes in model parameters are shared, thus ensuring data security. Predictive performance is often better than models trained individually by each user. Therefore, it is applied in many fields, such as industrial predictive maintenance, where sensors on CNC machine tools, fans, pump stations, and other equipment in factories analyze vibration, temperature, and noise data locally. Each device is an "edge node," learning to identify its own abnormal patterns. They only upload model updates, collectively training a global model that can accurately predict equipment failures, protecting the production processes and operational data (trade secrets) of each factory. Simultaneously, it enables local real-time diagnosis, avoiding the bandwidth pressure of massive sensor data backhaul. For example, in the healthcare field, due to the extremely high data privacy requirements, federated edge learning is almost the only feasible solution for AI-assisted medical collaboration. Federated edge learning can be used for medical image-assisted diagnosis. For instance, multiple hospitals may want to jointly train a more robust disease detection model based on their own X-ray and CT scan data. Due to the sensitivity of patient and hospital data, they cannot share the raw data. Through federated edge learning, each hospital trains its model on a local server (edge node) and only exchanges model parameters, breaking down "data silos" and allowing AI models to learn from multi-center data while protecting patient data privacy.
[0003] Most current work focuses on training models that are synchronized in one go, which suffers from poor convergence and convergence rate. Summary of the Invention
[0004] The purpose of this application is to propose a resource collaborative optimization method and related equipment for federated learning, so as to solve the problems of poor convergence and convergence rate in the prior art.
[0005] To address the aforementioned technical problems, this application provides a resource collaborative optimization method applied to federated learning, employing the following technical solution: Receive resource optimization requests carrying the target network identifier; Obtain model architecture data corresponding to the target network identifier, wherein the model architecture data includes... One client, One edge server and one cloud server, , Integers greater than zero; The client and the edge server are grouped according to the gradient similarity algorithm to obtain N sub-model architectures. Each sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero. Calculate the client energy cost and edge server energy cost for each group separately; A resource collaborative allocation decision is constructed based on the client energy consumption and the edge server energy consumption. The resource allocation decision for each group is optimized separately to obtain the optimization results; The model training strategy of the target network is adjusted based on the decision optimization results.
[0006] Furthermore, the step of grouping the client and the edge server according to the gradient similarity algorithm to obtain N groups of sub-model architectures specifically includes the following steps: Calculate the model gradient similarity for each client separately; Clients whose model gradient similarity meets a preset similarity threshold are grouped together to obtain the sub-model architecture.
[0007] Furthermore, the model gradient similarity is expressed as:
[0008] in, Indicates the first The client and the first Model gradient similarity for each client Indicates the first The model gradient for each client, Indicates the first The model gradient for each client.
[0009] Furthermore, the client energy overhead is expressed as: )=
[0010] in, Indicates the client Upload The number of energy units required to power a model to a server. Indicates the client The unit energy required to upload a model; The energy overhead of the edge server is expressed as follows: )=
[0011] in, superior The number of energy units required to transport the model to the edge server. The edge server The unit energy required to upload a model once.
[0012] Furthermore, the step of constructing a resource collaborative allocation decision based on the client energy consumption and the edge server energy consumption specifically includes the following steps: Based on the client energy overhead and the edge server energy overhead, construct a transmission model energy minimization decision; Obtain the load limit and computing power value of the edge server; Decisions for maximizing resource utilization efficiency are made based on the load limit and the computing power value. The resource collaborative allocation decision is constructed based on the energy minimization decision of the transmission model and the resource utilization efficiency maximization decision.
[0013] Furthermore, the energy minimization decision of the transmission model Represented as:
[0014]
[0015]
[0016] in, This means that energy expenditure must not exceed the maximum energy output of the equipment. This means that the size of the model that the device can process must not be greater than the number of models that the device itself can collect; The decision to maximize resource utilization efficiency Represented as:
[0017]
[0018] in, The edge server The maximum load capacity, The edge server The computing power value, , The edge server The upper limit of the received and processed computing load; The resource collaborative allocation decision is expressed as follows:
[0019]
[0020] To address the aforementioned technical problems, this application also provides a resource collaborative optimization device for federated learning, employing the following technical solution: The request receiving module is used to receive resource optimization requests carrying the target network identifier; An architecture data acquisition module is used to acquire model architecture data corresponding to the target network identifier, wherein the model architecture data includes... One client, One edge server and one cloud server, , Integers greater than zero; The client grouping module is used to group the client and the edge server according to the gradient similarity algorithm to obtain N sub-model architectures. The sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero. The energy cost calculation module is used to calculate the client energy cost and edge server energy cost for each group separately. A resource collaborative allocation decision building module is used to build resource collaborative allocation decisions based on the energy consumption of the client and the energy consumption of the edge server. The decision optimization module is used to perform decision optimization processing on the resource collaborative allocation decision for each group and obtain the decision optimization result; The training strategy adjustment module is used to adjust the model training strategy of the target network based on the decision optimization results.
[0021] Furthermore, the client grouping module includes: The model gradient similarity calculation submodule is used to calculate the model gradient similarity for each client separately. The client grouping submodule is used to group clients whose model gradient similarity meets a preset similarity threshold into the same group, thus obtaining the sub-model architecture.
[0022] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the resource collaborative optimization method applied to federated learning as described above.
[0023] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the resource collaborative optimization method applied to federated learning as described above.
[0024] This application provides a resource collaborative optimization method for federated learning, comprising: receiving a resource optimization request carrying a target network identifier; acquiring model architecture data corresponding to the target network identifier, wherein the model architecture data includes M clients, K edge servers, and 1 cloud server, where M and K are integers greater than zero; grouping the clients and edge servers according to a gradient similarity algorithm to obtain N sub-model architectures, wherein each sub-model architecture includes 1 grouped edge server and m grouped clients communicatively connected to the grouped edge server, where N and m are integers greater than zero; calculating the energy cost of the clients and edge servers for each group; constructing a resource collaborative allocation decision based on the client energy cost and edge server energy cost; performing decision optimization processing on the resource collaborative allocation decision for each group to obtain a decision optimization result; and adjusting the model training strategy of the target network based on the decision optimization result. Compared with the prior art, this application not only reduces training time but also improves accuracy and resource utilization in terms of system performance indicators. Attached Figure Description
[0025] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 This is a flowchart illustrating the implementation of the resource collaborative optimization method for federated learning provided in the embodiments of this application. Figure 3 This is a schematic diagram of the structure of the resource collaborative optimization model based on group synchronous federated learning provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the resource collaborative optimization device for federated learning provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0030] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Terminal device 101 may be a laptop 1011, tablet 1012, or mobile phone 1013. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0031] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0032] Terminal device 101 can be various electronic devices with a display screen and support web browsing. In addition to laptops 1011, tablets 1012, or mobile phones 1013, terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, and a desktop computer, etc.
[0033] Server 103 can be a server that provides various services, such as a backend server that provides support for the pages displayed on terminal device 101.
[0034] It should be noted that the resource collaborative optimization method for federated learning provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the resource collaborative optimization device for federated learning is generally located in the server / terminal device.
[0035] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0036] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the resource collaborative optimization method for federated learning according to this application. The aforementioned resource collaborative optimization method for federated learning includes steps S201, S202, S203, S204, S205, S206, and S207.
[0037] In step S201, a resource optimization request carrying a target network identifier is received.
[0038] In the embodiments of this application, a user inputs a request through their terminal device, which is received by the system. The terminal device may be a mobile terminal such as a mobile phone, smartphone, laptop, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), navigation device, etc., or a fixed terminal such as a digital TV, desktop computer, etc. It should be understood that the examples of terminal devices given herein are for convenience of understanding only and are not intended to limit this application.
[0039] In step S202, model architecture data corresponding to the target network identifier is obtained, wherein the model architecture data includes One client, One edge server and one cloud server, , It is an integer greater than zero.
[0040] In this embodiment, a network model is pre-constructed, assuming the network has m clients, k edge servers, and one cloud server. Global parameters and local gradients are simultaneously transmitted to the servers. Each server broadcasts a combination of local gradients and global parameters to the cloud. The cloud can decode this combination to obtain the corresponding gradient and global parameter information, such as... Figure 3 As shown.
[0041] In step S203, the clients and edge servers are grouped according to the gradient similarity algorithm to obtain N sub-model architectures. Each sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero.
[0042] In this embodiment, a grouping algorithm based on gradient similarity is designed, specifically, Θ(Vkt,wt) wt 1) Cosine similarity between global gradient updates and local client gradients. In federated edge learning, the amount of data in a client, the energy required for computational operations within the client, and the network environment of clients within the same group may reflect the similarity between clients. Therefore, a model gradient similarity-based evaluation criterion is proposed.
[0043] In some optional implementations of the embodiments of this application, the step of grouping the client and edge server according to the gradient similarity algorithm to obtain N groups of sub-model architectures specifically includes the following steps: Calculate the model gradient similarity for each client separately; Clients whose model gradient similarity meets the preset similarity threshold are grouped together to obtain the sub-model architecture.
[0044] In some optional implementations of the embodiments of this application, the above model gradient similarity is expressed as:
[0045] in, Indicates the first The client and the first Model gradient similarity for each client Indicates the first The model gradient for each client, Indicates the first The model gradient for each client.
[0046] In this embodiment, a similarity threshold can be preset. If the similarity of the gradients of two nodes reaches the similarity threshold, then the two nodes are considered similar nodes and are grouped together. A reliability threshold is preset, and the number of similar nodes for each node is checked. If the number of similar nodes for a node reaches the reliability threshold, then the node is added to the reliable node set, thus obtaining the reliable node set.
[0047] In step S204, the client energy cost and edge server energy cost for each group are calculated respectively.
[0048] In the embodiments of this application, this application is modeled based on the optimization problem of energy and computing resource utilization.
[0049] In some optional implementations of the embodiments of this application, the above-mentioned client energy overhead is expressed as: )=
[0050] in, Indicates the client Upload The number of energy units required to power a model to a server. Indicates the client The unit energy required to upload a model; The energy overhead of the edge server is expressed as follows: )=
[0051] in, The edge server superior The number of energy units required to transport each model to the edge server. The edge server The unit energy required to upload a model once.
[0052] In step S205, a resource collaborative allocation decision is constructed based on the energy consumption of the client and the energy consumption of the edge server.
[0053] In some optional implementations of the embodiments of this application, the step of constructing resource collaborative allocation decisions based on client energy consumption and edge server energy consumption specifically includes the following steps: Based on the energy consumption of the client and the energy consumption of the edge server, construct the energy minimization decision of the transmission model; Obtain the load limit and computing power value of the edge server; Decisions are made to maximize resource utilization efficiency based on load limits and computing power values. Based on the energy minimization decision and resource utilization efficiency maximization decision of the transmission model, a resource collaborative allocation decision is constructed.
[0054] In some optional implementations of the embodiments of this application, the above-described transmission model energy minimization decision... Represented as:
[0055]
[0056]
[0057] in, This means that energy expenditure must not exceed the maximum energy output of the equipment. This means that the size of the model that the device can process must not be greater than the number of models that the device itself can collect; The decision to maximize resource utilization efficiency Represented as:
[0058]
[0059] in, The edge server The maximum load capacity, The edge server The computing power value, , The edge server The upper limit of the received and processed computing load.
[0060] The resource collaborative allocation decision is expressed as follows:
[0061]
[0062] In this embodiment of the application, the energy model of the client is as follows: Client Upload Each model is sent to the server. The energy expenditure is: Furthermore, the client energy overhead is expressed as: )=
[0063] in, Indicates the client Upload The number of energy units required to power a model to a server. Indicates the client The unit energy required to upload a model; The energy overhead of the edge server is expressed as follows: )=
[0064] in, The edge server superior The number of energy units required to transport each model to the edge server. The edge server The unit energy required to upload a model once.
[0065] Based on the above model, establish the energy minimization optimization model P1 for the transmission model:
[0066]
[0067]
[0068] in, This means that energy expenditure must not exceed the maximum energy output of the equipment. This means that the size of the model that the device can process must not be greater than the number of models that the device itself can collect; The decision to maximize resource utilization efficiency Represented as:
[0069]
[0070] in, The edge server The maximum load capacity, The edge server The computing power value, , The edge server The upper limit of the received and processed computing load.
[0071] The resource collaborative allocation decision is expressed as follows:
[0072]
[0073] In step S206, the resource collaborative allocation decision for each group is optimized to obtain the optimization result.
[0074] In step S207, the model training strategy of the target network is adjusted based on the decision optimization results.
[0075] In this embodiment, based on the aforementioned optimization problem modeling, a joint optimization algorithm is proposed to solve the resource collaborative allocation problem P3 based on federated edge learning. The problem is solved collaboratively in parallel by servers, with intermediate calculation results sent to the coordinator (Cloud) in the executable federated edge learning system. Global traffic partitioning distributes the problem into K sub-problems, each of which can be solved through server optimization. In the proposed algorithm framework, each server first evaluates the model uploaded from the client in the edge network. To solve P3, we utilize IBM ILOG CPLEX Optimization Studio to obtain the optimal solution, i.e., the optimal solution for energy and resource utilization.
[0076] This application provides a resource collaborative optimization method for federated learning, comprising: receiving a resource optimization request carrying a target network identifier; obtaining model architecture data corresponding to the target network identifier, wherein the model architecture data includes M clients, K edge servers, and 1 cloud server, where M and K are integers greater than zero; grouping the clients and edge servers according to a gradient similarity algorithm to obtain N sub-model architectures, wherein each sub-model architecture includes 1 grouped edge server and m grouped clients communicating with the grouped edge server, where N and m are integers greater than zero; calculating the energy cost of the clients and edge servers for each group; constructing a resource collaborative allocation decision based on the client energy cost and edge server energy cost; performing decision optimization processing on the resource collaborative allocation decision for each group to obtain a decision optimization result; and adjusting the model training strategy of the target network based on the decision optimization result. Compared with the prior art, this application not only reduces training time but also improves accuracy and resource utilization in terms of system performance indicators.
[0077] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0078] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0079] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0080] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0081] Further reference Figure 4 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a resource collaborative optimization device applied to federated learning, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0082] like Figure 4 As shown, the resource collaborative optimization device 200 for federated learning in this embodiment of the application includes: The request receiving module 210 is used to receive resource optimization requests carrying a target network identifier; Architecture data acquisition module 220 is used to acquire model architecture data corresponding to the target network identifier, wherein the model architecture data includes One client, One edge server and one cloud server, , Integers greater than zero; The client grouping module 230 is used to group clients and edge servers according to the gradient similarity algorithm to obtain N sub-model architectures. Each sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero. The energy expenditure calculation module 240 is used to calculate the client energy expenditure and edge server energy expenditure for each group respectively. Resource collaborative allocation decision building module 250 is used to build resource collaborative allocation decisions based on client energy consumption and edge server energy consumption. The decision optimization module 260 is used to perform decision optimization processing on the resource collaborative allocation decision for each group and obtain the decision optimization result; The training strategy adjustment module 270 is used to adjust the model training strategy of the target network based on the decision optimization results.
[0083] In this embodiment of the application, a resource collaborative optimization device 200 for federated learning is provided, comprising: a request receiving module 210 for receiving a resource optimization request carrying a target network identifier; and an architecture data acquisition module 220 for acquiring model architecture data corresponding to the target network identifier, wherein the model architecture data includes... One client, One edge server and one cloud server, , The integers N and m are greater than zero. The client grouping module 230 is used to group clients and edge servers according to a gradient similarity algorithm, resulting in N sub-model architectures. Each sub-model architecture includes one grouped edge server and m grouped clients connected to the grouped edge server, where N and m are greater than zero. The energy cost calculation module 240 is used to calculate the client energy cost and edge server energy cost for each group. The resource collaborative allocation decision construction module 250 is used to construct resource collaborative allocation decisions based on the client energy cost and edge server energy cost. The decision optimization module 260 is used to optimize the resource collaborative allocation decisions for each group, obtaining the optimization results. The training strategy adjustment module 270 is used to adjust the model training strategy of the target network based on the optimization results. Compared with existing technologies, this application not only reduces training time but also improves accuracy and resource utilization in terms of system performance indicators.
[0084] In some optional implementations of the embodiments of this application, the client grouping module 230 includes: The model gradient similarity calculation submodule is used to calculate the model gradient similarity for each client separately. The client grouping submodule is used to group clients whose model gradient similarity meets a preset similarity threshold into the same group, thus obtaining the sub-model architecture.
[0085] In some optional implementations of the embodiments of this application, the resource collaborative allocation decision construction module 250 includes: The energy minimization decision building submodule is used to build energy minimization decisions for the transmission model based on the energy overhead of the client and the energy overhead of the edge server. The capability value acquisition submodule is used to obtain the load limit and computing capability value of the edge server; The Efficiency Maximization Decision Building Submodule is used to build resource utilization efficiency maximization decisions based on load limits and computing power values. The resource collaborative allocation decision-making construction submodule is used to construct resource collaborative allocation decisions based on the energy minimization decision and the resource utilization efficiency maximization decision of the transmission model.
[0086] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 5 , Figure 5 This is a basic structural block diagram of a computer device according to an embodiment of this application.
[0087] Computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected via a system bus. It should be noted that only computer device 300 with components 310-330 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0088] Computer devices can include desktop computers, laptops, handheld computers, and cloud servers. These devices allow for human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0089] The memory 310 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 310 may also be an external storage device of the computer device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 300. Of course, the memory 310 may include both internal storage units and external storage devices of the computer device 300. In the embodiments of this application, the memory 310 is typically used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions for resource collaborative optimization methods applied to federated learning. In addition, the memory 310 can also be used to temporarily store various types of data that have been output or will be output.
[0090] In some embodiments, processor 320 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 320 is typically used to control the overall operation of computer device 300. In embodiments of this application, processor 320 is used to execute computer-readable instructions stored in memory 310 or to process data, such as executing computer-readable instructions applied to a resource collaborative optimization method in federated learning.
[0091] The network interface 330 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the computer device 300 and other electronic devices.
[0092] The computer equipment provided in this application not only reduces training time but also improves accuracy and resource utilization in terms of system performance indicators.
[0093] This application also provides another implementation, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the resource collaborative optimization method applied to federated learning as described above.
[0094] The computer-readable storage medium provided in this application not only reduces training time but also improves accuracy and resource utilization in terms of system performance indicators.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of this application.
[0096] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A resource collaborative optimization method applied to federated learning, characterized in that, Includes the following steps: Receive resource optimization requests carrying the target network identifier; Obtain model architecture data corresponding to the target network identifier, wherein the model architecture data includes... One client, One edge server and one cloud server, , Integers greater than zero; The client and the edge server are grouped according to the gradient similarity algorithm to obtain N sub-model architectures. Each sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero. Calculate the client energy cost and edge server energy cost for each group separately; A resource collaborative allocation decision is constructed based on the client energy consumption and the edge server energy consumption. The resource allocation decision for each group is optimized separately to obtain the optimization results; The model training strategy of the target network is adjusted based on the decision optimization results.
2. The resource collaborative optimization method applied to federated learning according to claim 1, characterized in that, The step of grouping the client and the edge server according to the gradient similarity algorithm to obtain N groups of sub-model architectures specifically includes the following steps: Calculate the model gradient similarity for each client separately; Clients whose model gradient similarity meets a preset similarity threshold are grouped together to obtain the sub-model architecture.
3. The resource collaborative optimization method applied to federated learning according to claim 2, characterized in that, The gradient similarity of the models is expressed as: in, Indicates the first The client and the first Model gradient similarity for each client Indicates the first The model gradient for each client, Indicates the first The model gradient for each client.
4. The resource collaborative optimization method applied to federated learning according to claim 1, characterized in that, The client energy overhead is expressed as follows: )= in, Indicates the client Upload The number of energy units required to power a model to a server. Indicates the client The unit energy required to upload a model; The energy overhead of the edge server is expressed as follows: )= in, The edge server superior The number of energy units required to transport each model to the edge server. The edge server The unit energy required to upload a model once.
5. The resource collaborative optimization method applied to federated learning according to claim 1, characterized in that, The step of constructing a resource collaborative allocation decision based on the client energy consumption and the edge server energy consumption specifically includes the following steps: Based on the client energy overhead and the edge server energy overhead, construct a transmission model energy minimization decision; Obtain the load limit and computing power value of the edge server; Decisions for maximizing resource utilization efficiency are made based on the load limit and the computing power value. The resource collaborative allocation decision is constructed based on the energy minimization decision of the transmission model and the resource utilization efficiency maximization decision.
6. The resource collaborative optimization method applied to federated learning according to claim 1, characterized in that, The energy minimization decision of the transmission model Represented as: in, This means that energy expenditure must not exceed the maximum energy output of the equipment. This means that the size of the model that the device can process must not be greater than the number of models that the device itself can collect; The decision to maximize resource utilization efficiency Represented as: in, The edge server The maximum load capacity, The edge server The computing power value, , The edge server The upper limit of the received and processed computing load; The resource collaborative allocation decision is expressed as follows: 。 7. A resource collaborative optimization device for federated learning, characterized in that, include: The request receiving module is used to receive resource optimization requests carrying the target network identifier; An architecture data acquisition module is used to acquire model architecture data corresponding to the target network identifier, wherein the model architecture data includes... One client, One edge server and one cloud server, , Integers greater than zero; The client grouping module is used to group the client and the edge server according to the gradient similarity algorithm to obtain N sub-model architectures. The sub-model architecture includes one grouped edge server and m grouped clients that communicate with the grouped edge server. N and m are data that are greater than zero. The energy cost calculation module is used to calculate the client energy cost and edge server energy cost for each group separately. A resource collaborative allocation decision building module is used to build resource collaborative allocation decisions based on the energy consumption of the client and the energy consumption of the edge server. The decision optimization module is used to perform decision optimization processing on the resource collaborative allocation decision for each group and obtain the decision optimization result; The training strategy adjustment module is used to adjust the model training strategy of the target network based on the decision optimization results.
8. The resource collaborative optimization device for federated learning according to claim 7, characterized in that, The client grouping module includes: The model gradient similarity calculation submodule is used to calculate the model gradient similarity for each client separately. The client grouping submodule is used to group clients whose model gradient similarity meets a preset similarity threshold into the same group, thus obtaining the sub-model architecture.
9. A computer device, comprising a memory and a processor, characterized in that, The memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the resource collaborative optimization method for federated learning as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the resource collaborative optimization method for federated learning as described in any one of claims 1 to 6.