Power terminal-oriented personalized federated multi-task learning method and related device
By adopting a personalized federated multi-task learning framework based on logical clusters in the power Internet of Things, the global multi-task model is decomposed into basic and specific modules. The logical clusters are aggregated and stored using edge servers, which solves the problem of multi-task collaboration, realizes personalized and efficient model training, and improves the accuracy and security of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER
- Filing Date
- 2023-08-14
- Publication Date
- 2026-06-19
AI Technical Summary
Existing federated learning methods cannot effectively solve the multi-task collaboration problem in the power Internet of Things, cannot provide users with personalized multi-task models, and cannot make full use of data between similar tasks for training, resulting in resource waste and privacy leakage risks.
A personalized federated multi-task learning framework based on logical clusters is adopted. The global multi-task model is decomposed into basic modules and specific task modules. Logical clusters are established through edge servers for aggregation and storage, and training and updating are performed on power terminals. Combined with user module scheduling and aggregated task scheduling strategies, personalized local learning and generalization capabilities of the global model are realized.
It improves the personalization and generalization capabilities of multi-task models in the power Internet of Things, optimizes resource utilization, reduces resource waste, and enhances the accuracy and security of the models.
Smart Images

Figure CN117290720B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of federated machine learning technology, and in particular to a personalized federated multi-task learning method and related equipment for power terminals. Background Technology
[0002] The maturity of 5G communication and edge computing has accelerated the development of the Internet of Things (IoT) and generated a large amount of valuable user data. In the power IoT, we can use user data collected from power terminals to build different machine learning models for various training services. In centralized machine learning, user's local data needs to be transmitted to a parameter server via wireless networks (such as 5G and Wi-Fi), which may pose a risk of privacy leaks. In contrast, federated learning (FL) is a novel distributed machine learning paradigm that enables multiple clients to jointly train models without requiring personal privacy data to leave their local storage. However, in the power IoT, the training data of different user groups are often not independent and identically distributed, and with the increase in business types, the single global model of traditional federated learning cannot meet the needs of diverse businesses. Therefore, for participants in federated learning in the power IoT, they prefer to obtain a personalized local multi-task model to improve the accuracy and performance of the model.
[0003] A patent and literature search revealed that the personalized federated multi-task learning method for power terminals proposed in this application has not yet been disclosed, while the disclosed patents related to this application differ significantly from the technology proposed in this application.
[0004] Publication No. CN115049522A discloses a multi-task federated learning method for power terminals in the power Internet of Things (IoT). The key steps of this method are as follows: 1) After the power service provider publishes the federated learning task on the cloud platform, the cloud platform initializes a global model; 2) The cloud platform distributes the global model sequentially to the edge aggregator and the power terminal. The power terminal trains a local model using local energy data, and after training, the local model is uploaded to the edge aggregator; 3) The edge aggregator performs edge aggregation on the edge platform and then sends the local model to the cloud platform for central aggregation to obtain the global model; the global model predicts power consumption. This method does not consider the correlation between tasks, only training models for different tasks, resulting in wasted system resources and failing to fully utilize data from similar tasks for training.
[0005] Publication No. CN116227621A discloses a federated learning model training method based on power data. The key steps of this method are as follows: 1) The server sets the initial model and training parameters and sends them to the client; 2) The client sets local control variables and updates and processes the initial model based on the local control variables to obtain a encrypted model; 3) The encrypted model and local control variables are transmitted to the server; 4) The server obtains an aggregated model based on the encrypted model. When the current iteration count is less than the total number of iterations, the server updates the server control variables and sends the aggregated model and the updated server control variables to the client, starting a new round of training on the client; 5) When the server determines that the current iteration count equals the total number of iterations, it outputs the aggregated model. This method does not consider the diversity of tasks and the heterogeneity of data, and it cannot provide personalized models for specific tasks.
[0006] Publication No. CN116049662A discloses a training method and apparatus for a power data anomaly detection model based on federated learning. The key steps of this method are as follows: 1) Obtain the current training power data; train the untrained local data anomaly detection model based on the current training power data to obtain a trained local data anomaly detection model; 2) Aggregate the trained local data anomaly detection models to obtain an untrained global data anomaly detection model, and send the untrained global data anomaly detection model back to each power concentrator; 3) Obtain the next training power data, input the next training power data into the untrained global data anomaly detection model to obtain a trained global data anomaly detection model; 4) If the trained global data anomaly detection model does not meet the preset conditions, return to obtaining the current training power data until the trained global data anomaly detection model meets the preset conditions, which can improve the security of the original data transmission process. This method does not consider the special characteristics of the task and the non-independent and identically distributed problem of user power data, and cannot provide users with high-precision personalized models. Furthermore, it does not consider that unstable network conditions may interrupt the connection with power terminal equipment.
[0007] Therefore, in order to address the above-mentioned problems, it is necessary to invent a personalized federated multi-task learning method and related equipment for power terminals. Summary of the Invention
[0008] This invention provides a personalized federated multi-task learning method and related equipment for power terminals. It proposes a personalized federated multi-task learning framework based on logical clusters to solve the multi-task collaboration problem under multiple services in the power Internet of Things scenario, and enhances the personalized learning ability and generalization ability of the global multi-task model.
[0009] In a first aspect, the present invention provides a personalized federated multi-task learning method for power terminals, applied to a federated multi-task learning system, the federated multi-task learning system comprising at least one edge server and several power terminals, the method comprising:
[0010] Based on K similar machine learning tasks, the global multi-task model is divided into a basic module for extracting common data features and K specific task modules for outputting prediction results.
[0011] The edge server establishes a corresponding logical cluster for each machine learning task, which is used to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0012] The power terminal trains the basic module and the specific task module, and completes the training through multiple iterations to obtain the updated gradient value of the specific task module.
[0013] The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding update gradient value to the edge server;
[0014] The edge server schedules the logical clusters that have been allocated computing resources to perform a global aggregation operation to obtain a global module;
[0015] The edge server combines the global module with the basic module to obtain an updated global multitasking model.
[0016] According to the personalized federated multi-task learning method for power terminals provided by the present invention, the step of establishing a corresponding logical cluster for each machine learning task on the edge server for aggregating and storing the global multi-task model includes:
[0017] Establish a first logical cluster, which is used to aggregate and store the latest specific task module and its corresponding gradient value;
[0018] A second logical cluster is established, which is used to aggregate and store the basic modules shared by all tasks.
[0019] According to a personalized federated multi-task learning method for power terminals provided by the present invention, the steps of the power terminal sending a request to the edge server and establishing a connection, downloading the latest specific task module, and uploading the corresponding updated gradient value to the edge server include:
[0020] For each communication round, the power terminal sends a connection request to the edge server;
[0021] After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal;
[0022] When the instantaneous channel state is greater than or equal to a preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least one of the specific task modules and the upload of the updated gradient value within one communication round.
[0023] According to a personalized federated multi-task learning method for power terminals provided by the present invention, the steps of the power terminal sending a request to the edge server and establishing a connection, downloading the latest specific task module, and uploading the corresponding updated gradient value to the edge server further include:
[0024] When performing machine learning tasks locally, determine the importance of each specific task module update and its corresponding first scheduling frequency;
[0025] Based on the importance and the first scheduling frequency, the local task priority is determined;
[0026] When the allocated bandwidth resources are insufficient to upload the update gradient values of all the specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded.
[0027] According to a personalized federated multi-task learning method for power terminals provided by the present invention, the step of scheduling the logical clusters with allocated computing resources on the edge server to perform a global aggregation operation to obtain a global module includes:
[0028] For each aggregation round, determine the activity level of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster;
[0029] Global task priority is determined based on the activity level, the similarity, and the second scheduling frequency;
[0030] When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module.
[0031] According to a personalized federated multi-task learning method for power terminals provided by the present invention, before the step of training the base module and the specific task module in the power terminal and completing the training through multiple iterations to obtain the updated gradient value of the specific task module, the method further includes:
[0032] The power terminal sets the task indicator flag value of the specific task module according to the machine learning task it needs to participate in;
[0033] Based on the task indicator flag value, determine whether the specific task module needs to be trained.
[0034] According to the personalized federated multi-task learning method for power terminals provided by the present invention, the step of training the base module and the specific task module in the power terminal, and completing the training through multiple iterations to obtain the updated gradient value of the specific task module includes:
[0035] Obtain the task indication flag value;
[0036] The task indicator flag value is represented as the gradient value of the specific task module that is not trainable and then frozen.
[0037] The power terminal trains the specific task module and the basic module represented by the task indication flag value as trainable;
[0038] After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
[0039] Secondly, the present invention also provides a personalized federated multi-task learning device for power terminals, applied to a federated multi-task learning system, the federated multi-task learning system including at least one edge server and several power terminals, the device comprising:
[0040] The partitioning module is used to divide the global multi-task model into a basic module for extracting common data features and K specific task modules for outputting prediction results based on K similar machine learning tasks.
[0041] The logical cluster creation module is used by the edge server to establish a corresponding logical cluster for each machine learning task, to aggregate and store the global multi-task model, and to send the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0042] The learning and training module is used by the power terminal to train the basic module and the specific task module. The training is completed through multiple iterations to obtain the updated gradient value of the specific task module.
[0043] The model update module is used for the power terminal to send a request to the edge server and establish a connection, download the latest specific task module, and upload the corresponding update gradient value to the edge server.
[0044] An aggregation module is used by the edge server to schedule the logical clusters with allocated computing resources to perform global aggregation operations to obtain a global module;
[0045] The model combination module is used by the edge server to combine the global module with the basic module to obtain an updated global multi-task model.
[0046] According to the present invention, a personalized federated multi-task learning device for power terminals is provided, wherein the logic cluster creation module is further configured to:
[0047] Establish a first logical cluster, which is used to aggregate and store the latest specific task module and its corresponding gradient value;
[0048] A second logical cluster is established, which is used to aggregate and store the basic modules shared by all tasks.
[0049] According to the present invention, a personalized federated multi-task learning device for power terminals is provided, wherein the model update module is further configured to:
[0050] For each communication round, the power terminal sends a connection request to the edge server;
[0051] After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal;
[0052] When the instantaneous channel state is greater than or equal to a preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least one of the specific task modules and the upload of the updated gradient value within one communication round.
[0053] According to the present invention, a personalized federated multi-task learning device for power terminals is provided, wherein the model update module is further configured to:
[0054] When performing machine learning tasks locally, determine the importance of each specific task module update and its corresponding first scheduling frequency;
[0055] Based on the importance and the first scheduling frequency, the local task priority is determined;
[0056] When the allocated bandwidth resources are insufficient to upload the update gradient values of all the specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded.
[0057] According to the present invention, a personalized federated multi-task learning device for power terminals is provided, wherein the aggregation module is further configured to:
[0058] For each aggregation round, determine the activity level of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster;
[0059] Global task priority is determined based on the activity level, the similarity, and the second scheduling frequency;
[0060] When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module.
[0061] According to the present invention, a personalized federated multitasking learning device for power terminals is provided, the device further comprising: a task indication flag value setting module, specifically used for:
[0062] The power terminal sets the task indicator flag value of the specific task module according to the machine learning task it needs to participate in;
[0063] Based on the task indicator flag value, determine whether the specific task module needs to be trained.
[0064] According to the present invention, a personalized federated multitasking learning device for power terminals is provided, wherein the learning and training module is further used for:
[0065] Obtain the task indication flag value;
[0066] The task indicator flag value is represented as the gradient value of the specific task module that is not trainable and then frozen.
[0067] The power terminal trains the specific task module and the basic module represented by the task indication flag value as trainable;
[0068] After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
[0069] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the personalized federated multitasking learning method for power terminals as described above.
[0070] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the personalized federated multi-task learning method for power terminals as described above.
[0071] This invention provides a personalized federated multi-task learning method and related equipment for power terminals, applied to a federated multi-task learning system, which includes at least one edge server and several power terminals. The method divides the global multi-task model into a basic module for extracting common data features and K specific task modules for outputting prediction results, based on K similar machine learning tasks. The edge server establishes a corresponding logical cluster for each machine learning task to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within its service area. The power terminals train the basic module and specific task modules, completing training through multiple iterations to obtain updated gradient values for the specific task modules. The power terminals send requests to the edge server and establish connections, downloading the latest specific task modules and uploading the corresponding updated gradient values to the edge server. The edge server schedules the allocated computing resources of the logical clusters to perform a global aggregation operation to obtain a global module. The edge server combines the global module with the basic module to obtain an updated global multi-task model. This invention proposes a personalized federated multi-task learning framework based on logical clusters. In this framework, the global multi-task model is decomposed into a basic module for feature extraction and K specific task modules for outputting prediction results. This framework achieves personalized learning through local training by establishing logical clusters on edge servers and improves the generalization ability of the global multi-task model by employing a federated multi-task learning paradigm. This invention solves the multi-task collaboration problem under multiple services in the power Internet of Things (IoT) scenario, thereby meeting the training needs of users for multi-task models in the power IoT. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0073] Figure 1 This is one of the flowcharts illustrating a personalized federated multi-task learning method for power terminals provided in an embodiment of the present invention;
[0074] Figure 2 A system architecture diagram of pFMTL based on logical clusters for embodiments of the present invention;
[0075] Figures 3a-3c This is a comparison chart of model performance under multiple test tasks based on different task training modes provided in embodiments of the present invention, wherein... Figure 3a A performance comparison chart of the models under the power load forecasting test task; Figure 3b A performance comparison chart of the models under the power load forecasting test task; Figure 3c A performance comparison chart of the models under the power dispatching strategy test task;
[0076] Figures 4a-4c This invention provides a comparison chart of loss function values and failure counts under different communication windows based on different scheduling strategies, as shown in the embodiments of the present invention. Figure 4a A comparison chart of the loss function values under a communication window of 1 second; Figure 4b A comparison chart of the loss function values under a communication window of 0.5s; Figure 4c A comparison chart of the number of failures under different communication windows;
[0077] Figure 5 A schematic diagram of the structure of a personalized federated multitasking learning device for power terminals provided in an embodiment of the present invention;
[0078] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention.
[0079] Figure label:
[0080] 21: Partitioning module; 22: Logical cluster creation module; 23: Learning and training module; 24: Model update module; 25: Aggregation module; 26: Model combination module. Detailed Implementation
[0081] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described clearly and completely below with reference to specific embodiments and accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0082] It should be noted that those skilled in the art will understand, explicitly and implicitly, that the embodiments described in this invention can be combined with other embodiments without conflict. Unless otherwise defined, the technical or scientific terms used in this invention should be understood in their ordinary sense by those skilled in the art. The terms "a," "an," "an," "the," etc., used in this invention do not indicate quantity limitation and can represent singular or plural. The terms "comprising," "including," "having," and any variations thereof used in this invention are intended to cover non-exclusive inclusion; the terms "first," "second," "third," etc., used in this invention are merely to distinguish similar objects and do not represent a specific ordering of objects.
[0083] Unlike traditional federated learning methods, personalized federated learning refers to training a personalized local model for each client, rather than training a single global model. There are three main personalization methods in federated learning: data interpolation, user clustering, and model interpolation. Multi-task learning (MTL) belongs to the third type, which achieves knowledge transfer between tasks through model parameter sharing. However, existing federated multi-task learning (FMTL) algorithms require all clients to participate in training in each communication round. But in a real-world power IoT environment, some clients may be unable to participate due to poor network conditions or occupied computing resources. Furthermore, in existing FMTL algorithms, each client can only execute one machine learning task per communication round, failing to achieve real-time multi-task functionality. To address the multi-task collaboration problem under multiple services in the power IoT scenario, this invention proposes a personalized federated multi-task learning method for power terminals.
[0084] The personalized federated multi-task learning method for power terminals provided by the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0085] Example 1
[0086] Reference Figure 1 As shown, this embodiment provides a personalized federated multi-task learning method for power terminals, applied to a federated multi-task learning system. This system includes at least one edge server and several power terminals. The method includes:
[0087] Step S1: Based on K similar machine learning tasks, divide the global multi-task model into a basic module for extracting common data features and K specific task modules for outputting prediction results.
[0088] Specifically, this embodiment provides a federated multi-task learning system, which consists of an edge server (ES) and several power terminals. The overall system architecture is as follows: Figure 2 As shown. The edge server acts as a parameter server, assuming it supports K similar machine learning tasks M = {M1, ..., M...}. k ,…,M K}, and correspondingly store K pre-trained global multi-task models W = {W1, ..., W}. k ,…,W K Each global multi-task model W k The basic module w0 shared by all tasks and the specific task module w belonging to task k. k Composition. The basic module w0 is responsible for extracting common data features, and the specific task module w... k It is responsible for outputting the prediction results for task k. Each power terminal VE i Limited and time-varying computational resources are available for local training. For any task k, each power terminal VE... i Using your own data D i,k Iteratively train its corresponding global multi-task model W i,k = <w i,0 ,w i,k >
[0089] Step S2: The edge server establishes a corresponding logical cluster for each machine learning task to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the edge server's service area.
[0090] In this embodiment, step S2 specifically includes:
[0091] Establish a first logical cluster, which is used to aggregate and store the latest task-specific modules and their corresponding gradient values;
[0092] Establish a second logical cluster, which is used to aggregate and store the basic modules shared by all tasks.
[0093] Specifically, this invention proposes a personalized federated multi-task learning framework (pFMTL) based on logical clusters. In this framework, the global multi-task model is divided into a base module for extracting data features and K specific task modules for outputting prediction results, based on K similar machine learning tasks. At the edge server, the system divides all clients into K+1 logical clusters according to task type. Within each logical cluster, multiple clients collaboratively train the base module or specific task modules through incremental gradient aggregation. The edge server provides M for each machine learning task. k Establish the corresponding first logical cluster LCk This logical cluster is responsible for aggregating and storing the latest task-specific modules w k And its gradient values. In particular, a second logical cluster LC0 is established to aggregate and store the basic module w0 shared by all tasks.
[0094] It is important to note that the communication and computing resources of the edge servers in the system are also limited. In other words, power terminals compete with each other for the communication resources of the edge servers to transmit gradient update parameters between the edge servers and the scheduled power terminals; while logical clusters compete with each other for the computing resources of the edge servers to aggregate all gradients stored in the scheduled logical clusters to obtain a new global multi-task model.
[0095] In this embodiment, before step S3, the method further includes:
[0096] The power terminal sets the task indicator flag value of a specific task module according to the machine learning task it needs to participate in;
[0097] Based on the task indicator flag value, determine whether a specific task module is to be trained.
[0098] Specifically, after initializing the training parameters of the federated multi-task learning system, the edge server will provide the latest global multi-task model W. k (including the basic module w0 and all task-specific modules w) k ) and each machine learning task M k The weight is sent to all power terminals VE within its service area. i Power terminal VE i Determine the machine learning tasks you need to participate in based on your own resources and data, and set task indicator flags a for specific task modules. i,k Set its value to a i,k =1, indicating that the task indicator flag a i,k Training is performed on a specific task module set to 1.
[0099] Step S3: Power Terminal VE i Training the basic module w0 and the task-specific module w k Training is completed through multiple iterations to obtain the updated gradient values for specific task modules.
[0100] In this embodiment, step S3 specifically includes:
[0101] Get the task indicator flag value;
[0102] The task indicator flag value is represented as the gradient value of a specific task module that is not trainable and then frozen.
[0103] The power terminal trains specific task modules and basic modules by representing task indication flag values as trainable task indicators.
[0104] After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
[0105] Specifically, the preset learning round is set to t, and the power terminal is VE. i Utilizing its own computing resources and local data D i,k Training basic modules and task indicator a i,k =1 specific task module Task indicator a i,k The remaining task-specific modules with gradients equal to 0 are not trained, and their gradient values are frozen.
[0106] For any power terminal VE i We use To represent its position in the training data D i,k The objective function for task k is shown in equation (1):
[0107]
[0108] Among them, |D i,k | represents dataset D i,k The number of samples in, l k Let represent the specific loss function for task k. Therefore, the power terminal VE i The objective function is shown in equation (2):
[0109]
[0110] Among them, a i,k ∈{0,1} represents the task indicator flag, a i,k =1 indicates the power terminal VE i It has the ability to perform task k, b k This represents the weight of task k. In this application, the weight b for all power terminals on the same task is... k They are equal.
[0111] The training results are passed through a preset objective function and iterated multiple times using stochastic gradient descent (SGD) to obtain the power terminal VE. i Obtain the first update gradient value of the base module. and the second update gradient value of the specific task module
[0112] Step S4: The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding updated gradient value to the edge server.
[0113] In this embodiment, step S4 specifically includes:
[0114] Step S41: For each communication round, the power terminal sends a connection request to the edge server;
[0115] Step S42: After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal;
[0116] Step S43: When the instantaneous channel state is greater than or equal to the preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least a single specific task module and the upload of updated gradient values within one communication round.
[0117] Specifically, in each learning round, the scheduled power terminals VE i The updated gradient values of specific task modules are uploaded to the edge server via a wireless channel, treating each learning round as a communication round, and the wireless channel state changes between communication rounds. Assume the power terminal VE... i The uplink and downlink bandwidths are equal, and the power terminal VE i Gradient values must be uploaded and a new global multi-task model downloaded within a single communication round for the next round of federated training. Therefore, the power terminal VE... i The transmission rate during learning round t The calculation is shown in equation (3):
[0118]
[0119] Among them, P i and They represent the power terminal VE respectively i The transmission power and the noise power of the wireless channel. and These represent the power terminal VE in communication round t. i The bandwidth and wireless channel status.
[0120] After establishing a connection with the edge server, the power terminal VE i The updated gradient values of the specific task module corresponding to the scheduled local machine learning task are sent to the edge server, and the latest specific task module is downloaded. Then, the power terminal VE... i Communication latency in learning round t The calculation is shown in equation (4):
[0121]
[0122] Among them, |w k | and |g k | Represents specific task modules D k The data size and its gradient parameters. Represents the scheduling variable. Time indicates task module The learning round t is scheduled.
[0123] Because unstable network conditions can disrupt connections to power terminals, edge servers must use channel sensing technology to predict the instantaneous channel state of the power terminals. When the power terminal VE... i Predicted channel state Not less than the preset threshold At that time, the edge server will agree to VE i The connection request. Preset threshold for channel state. The settings should ensure that the minimum bandwidth resource B is used. min Below, the selected power terminal VE i The default timeout interval t can be set within the learning round t. C Within the communication delay, at least one gradient value of a specific task module shall be uploaded according to equation (5):
[0124]
[0125] Select a power terminal VE i Subsequently, the edge server needs to allocate bandwidth resources for the transmission of its specific task modules and gradient values according to equation (6).
[0126]
[0127] Among them, B max This indicates the maximum bandwidth resources that the system allows to allocate to a single power terminal.
[0128] In this embodiment, step S4 further includes:
[0129] Step S44: When performing machine learning tasks locally, determine the importance of each specific task module update and the corresponding first scheduling frequency;
[0130] Step S45: Determine the local task priority based on importance and first scheduling frequency;
[0131] Step S46: When the allocated bandwidth resources are insufficient to upload the update gradient values of all specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded.
[0132] Specifically, given the limited bandwidth resources of edge servers, this invention designs a scheduling strategy that supports user module scheduling. Specifically, when the allocated bandwidth resources are insufficient to upload the update gradient values of all specific task modules within the timeout interval, the power terminal VE... i The local task priority must be calculated according to equation (7). Identify the specific task modules that need to be uploaded:
[0133]
[0134] in, Gradient of a specific task module The L2 norm, to represent a specific task module The importance of the update, with coefficients ω1 and ω2 representing the importance of the update for a specific task module. And the weight of the first scheduling frequency. Clearly, the module parameters... The larger the adjustable range, the higher the priority of local task k.
[0135] In addition, to avoid certain task modules not being scheduled for a long time in subsequent training phases, we also considered the first scheduling frequency of local task k. As shown in equation (8):
[0136]
[0137] Among them, t i,k Indicates power terminal VE i The last scheduling round of local task k. When a specific task module has not been scheduled for a long time, its probability of being scheduled will continue to increase.
[0138] Step S5: The edge server schedules the logical clusters with allocated computing resources to perform a global aggregation operation to obtain the global module.
[0139] In this embodiment, step S5 specifically includes:
[0140] Step S51: For each aggregation round, determine the activity of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster;
[0141] Step S52: Determine the global task priority based on activity, similarity, and second scheduling frequency;
[0142] Step S53: When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module.
[0143] Specifically, when the model size is large and the number of active users in the logical cluster is high, the latency of global model aggregation performed by the edge server cannot be ignored. In each aggregation round, the edge server schedules a logical cluster to aggregate all its stored gradient parameters and obtain a new task model. Since the time complexity of the aggregation operation is the product of the number of modules and the size of the gradient data, the aggregation latency is significant. It can be approximated as shown in equation (9):
[0144]
[0145] Among them, C t This represents the computing resources available to the edge server during learning round t. Indicates belonging to logical cluster LC k The number of power terminals, ρ is a scaling factor associated with a specific aggregation algorithm.
[0146] In each aggregation round, the edge server determines whether to allocate computing resources to the logical cluster based on global task priorities. Once computing resources are allocated, the logical cluster (LC)... k The aggregation operation will be performed according to equation (10) to obtain the aggregation round t+1 after the completion of the federated learning round t.
[0147] Based on the logical cluster structure, this invention designs a scheduling strategy that supports aggregation task scheduling, in order to select logical clusters to schedule aggregation tasks. Cluster aggregation scheduling refers to the process by which the edge server selects a logical cluster with high priority and allocates computing resources to perform global aggregation. When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters within the default aggregation delay of one aggregation round, the edge server must calculate the global task priority according to equation (11). Determine which logical cluster to schedule:
[0148]
[0149] in, This indicates that it is stored in a logical cluster; LC k The similarity of all specific task modules; This is the second scheduling frequency; Represents a logical cluster LC k The activity level; μ1, μ2, and μ3 are the regulators, respectively. Weight parameters; This equates to the number of active users who have uploaded gradient values for a specific task module over a given period. Clearly, performing aggregation operations within more active logical clusters to update the global modules of the included power terminals is more necessary. Simultaneously, we use the Euclidean distance of the module parameters to measure the value stored in the logical cluster LC. k Similarity of all specific task modules As shown in equation (12):
[0150]
[0151] in, and The task indicator flag a indicates that the task is within the preset learning round t. i,k For any two specific task modules with similarity = 1, when the module similarity within each logical cluster is low in the early stages, global aggregation needs to be performed as soon as possible to accelerate the convergence of the global task model. Conversely, frequent aggregation operations in the later stages will waste excessive computing resources on the edge servers. Since calculating the similarity of a large number of modules consumes a lot of computing resources, we use module sampling to periodically calculate similarity. Similar to user module scheduling, we also need to consider a second scheduling frequency. To avoid the logical clusters being left unallocated computing resources for extended periods, as shown in equation (13):
[0152]
[0153] Among them, t k Represents a logical cluster LC k The round in which it was last scheduled.
[0154] It should be noted that computational resources will be allocated preferentially to the logical cluster LC0 that trains the basic modules.
[0155] Step S6: The edge server combines the global module with the basic module to obtain an updated global multitasking model.
[0156] Specifically, when a user requests the federated multi-task learning system to learn the task model in round t... At that time, in aggregation round t+1, the edge server will transfer the basic modules in logical cluster LC0. and logic cluster LC k The specific task module that completes the aggregation Combine them to obtain the latest task model Then it is sent to the requesting user.
[0157] In summary, this embodiment provides a personalized federated multi-task learning method for power terminals, proposing a personalized federated multi-task learning framework pFMTL based on logical clusters. In this framework, the global multi-task model is decomposed into a basic module for feature extraction and k specific task modules for outputting prediction results. This framework achieves personalized learning through local training by establishing logical clusters on the edge server and improves the generalization ability of the global multi-task model by adopting a federated multi-task learning paradigm. This invention solves the multi-task collaboration problem under multiple services in the power Internet of Things (IoT) scenario, meeting the training needs of users for multi-task models in the power IoT. Furthermore, this invention proposes a modular scheduling strategy that simultaneously supports user module scheduling and aggregate task scheduling to select user modules and aggregate tasks for scheduling. The optimized scheduling strategy comprehensively considers the update importance of user modules and the active state of logical clusters, reducing the communication overhead of the federated learning system while ensuring the convergence of the multi-task model, and further improving the communication efficiency of the pFMTL framework.
[0158] To evaluate the performance of the proposed pFMTL framework, a prototype system corresponding to a federated multi-task learning system was built as an experimental platform, consisting of six computing nodes. A single process was launched on one computing node to simulate an edge server, listening for access requests on a designated port and aggregating module gradients for a logical cluster. On the remaining five nodes, two processes were launched on each node to simulate power terminals sharing limited resources.
[0159] Three related power IoT test tasks are provided: (1) power load forecasting; (2) anomaly detection; and (3) power dispatching strategy. For these three test tasks, we use relevant power datasets as the training and test sets for training the multi-task model in our experiments. In the experiments, 80% of the data in the training set was randomly divided into 10 parts and assigned to each power terminal, while the remaining data was assigned to the edge server as the test dataset.
[0160] It provides multiple task training modes and task scheduling strategies, such as:
[0161] Single-task mode: All power terminals are trained on the same single task. No logical clusters are established, and the power terminals need to upload the complete single-task model.
[0162] Multi-task mode (all-task): All power terminals train on three tasks simultaneously. No logical clusters are established, and the power terminals need to upload the complete multi-task model.
[0163] Random scheduling strategy: Establish logical clusters, but the system randomly schedules user modules and aggregate tasks.
[0164] Channel-first scheduling strategy: Establish logical clusters, but the system always schedules the power terminal module with the best channel status.
[0165] In addition to using the overall loss function to evaluate the convergence of the multi-task model, the mean accuracy (mAP@0.5) and mean intersection-over-union ratio (mIOU) are also calculated as metrics to evaluate the performance of the three tasks. Furthermore, the communication latency and number of failures under different task scheduling strategies are compared.
[0166] Regarding the impact of logical clusters on federated training:
[0167] First, the performance of single-task mode, multi-task mode, and pFMTL was compared on three test tasks, and their communication overhead was recorded. Figures 3a-3c The results show that pFMTL achieves a good balance between task accuracy and communication overhead. Compared with the multi-task mode, pFMTL reduces the average data transmission volume and transmission latency by 63.6% and 60.6%, respectively, while the accuracy on the three test tasks is slightly lower, decreasing by 4.6%, 0.7%, and 1.4%, respectively. However, the single-task mode does not offer any advantage in terms of communication overhead or task accuracy. Especially in the anomaly detection task, the mAP@0.5 of the single-task mode is 10.6% and 6.2% lower than that of the multi-task mode and pFMTL, respectively. In addition, during the initial training phase, the mIOU growth of the single-task mode in the power dispatchable policy task is slow. Compared with the multi-task mode, pFMTL sacrifices less service performance but significantly reduces the communication overhead of power terminals, making it more suitable for latency-sensitive power IoT scenarios.
[0168] The impact of scheduling strategies on federated training:
[0169] Next, the performance of pFMTL, random scheduling, and channel-first scheduling strategies in terms of model convergence speed and number of failures was compared. A failure was recorded when the power terminal failed to complete gradient upload of the scheduled module within the connection window. Figures 4a-4cAs shown, when the communication window size is set to 0.5 seconds, pFMTL's average number of failures is only 6% higher than the channel-first scheduling strategy, while the model's convergence speed is significantly improved. This is because the channel-first scheduling strategy is completely biased and ignores the varying importance of updates to different modules. Edge servers may repeatedly schedule power terminals with the best channel state, leading to overfitting later on. Although the random scheduling strategy is unbiased, it does not consider the channel state of power terminals, so communication failures occur frequently when the communication window size is insufficient. In latency-sensitive power IoT scenarios, the random scheduling strategy cannot guarantee the convergence of the multi-task model. Therefore, compared to the random scheduling strategy and the channel-first scheduling strategy, pFMTL achieves a better balance between the convergence of the multi-task model and the stability of the communication system.
[0170] Example 2
[0171] Based on the same inventive concept as the above method, and referring to... Figure 5 As shown, this embodiment provides a personalized federated multitasking learning device for power terminals, applied to a federated multitasking learning system. The federated multitasking learning system includes at least one edge server and several power terminals. The device includes:
[0172] The partitioning module 21 is used to divide the global multi-task model into a basic module for extracting common data features and K specific task modules for outputting prediction results based on K similar machine learning tasks.
[0173] The logical cluster creation module 22 is used by the edge server to establish a corresponding logical cluster for each machine learning task, to aggregate and store the global multi-task model, and to send the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0174] The learning and training module 23 is used by the power terminal to train the basic module and the specific task module. The training is completed through multiple iterations to obtain the updated gradient value of the specific task module.
[0175] Model update module 24 is used for the power terminal to send a request to the edge server and establish a connection, download the latest specific task module, and upload the corresponding update gradient value to the edge server;
[0176] Aggregation module 25 is used by the edge server to schedule the logical clusters with allocated computing resources to perform global aggregation operations to obtain a global module;
[0177] The model combination module 26 is used by the edge server to combine the global module with the basic module to obtain the updated global multi-task model.
[0178] In this embodiment, the logical cluster creation module 22 is further used for:
[0179] Establish a first logical cluster, which is used to aggregate and store the latest specific task module and its corresponding gradient value;
[0180] A second logical cluster is established, which is used to aggregate and store the basic modules shared by all tasks.
[0181] In this embodiment, the model update module 24 is further used for:
[0182] For each communication round, the power terminal sends a connection request to the edge server;
[0183] After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal;
[0184] When the instantaneous channel state is greater than or equal to a preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least one of the specific task modules and the upload of the updated gradient value within one communication round.
[0185] In this embodiment, the model update module 24 is further configured to:
[0186] When performing machine learning tasks locally, determine the importance of each specific task module update and its corresponding first scheduling frequency;
[0187] Based on the importance and the first scheduling frequency, the local task priority is determined;
[0188] When the allocated bandwidth resources are insufficient to upload the update gradient values of all the specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded.
[0189] In this embodiment, the aggregation module 25 is further configured to:
[0190] For each aggregation round, determine the activity level of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster;
[0191] Global task priority is determined based on the activity level, the similarity, and the second scheduling frequency;
[0192] When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module.
[0193] In this embodiment, the device further includes: a task indicator flag value setting module, specifically used for:
[0194] The power terminal sets the task indicator flag value of the specific task module according to the machine learning task it needs to participate in;
[0195] Based on the task indicator flag value, determine whether the specific task module needs to be trained.
[0196] In this embodiment, the learning and training module 23 is further used for:
[0197] Obtain the task indication flag value;
[0198] The task indicator flag value is represented as the gradient value of the specific task module that is not trainable and then frozen.
[0199] The power terminal trains the specific task module and the basic module represented by the task indication flag value as trainable;
[0200] After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
[0201] It should be noted that the personalized federated multitasking learning method for power terminals provided in the method embodiments of the present invention can be executed by a personalized federated multitasking learning device for power terminals, or by a control module in the personalized federated multitasking learning device for power terminals for executing the personalized federated multitasking learning method for power terminals.
[0202] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method. Therefore, relevant parts can be referred to in the description of the method embodiment, and will not be repeated here.
[0203] The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division. In actual implementation, there may be other division methods. In the embodiments, each functional module can be integrated into a processor, or each module can be a separate device, or two or more modules can be integrated into a device. Each functional module in each embodiment can be implemented in hardware or in the form of hardware plus software functional units.
[0204] Example 3
[0205] Reference Figure 6 As shown, this embodiment provides an electronic device, which includes a processor 310, a communication interface 320, a memory 330, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330. The processor 310 executes the personalized federated multi-task learning method for power terminals described in the above method embodiment, applied to a federated multi-task learning system. The federated multi-task learning system includes at least one edge server and several power terminals. The method includes:
[0206] Based on K similar machine learning tasks, the global multi-task model is divided into a basic module for extracting common data features and K specific task modules for outputting prediction results.
[0207] The edge server establishes a corresponding logical cluster for each machine learning task, which is used to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0208] The power terminal trains the basic module and the specific task module, and completes the training through multiple iterations to obtain the updated gradient value of the specific task module.
[0209] The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding update gradient value to the edge server;
[0210] The edge server schedules the logical clusters that have been allocated computing resources to perform a global aggregation operation to obtain a global module;
[0211] The edge server combines the global module with the basic module to obtain an updated global multitasking model.
[0212] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0213] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the personalized federated multi-task learning method for power terminals described in the above-described method embodiments, applied to a federated multi-task learning system. The federated multi-task learning system includes at least one edge server and several power terminals. The method includes:
[0214] Based on K similar machine learning tasks, the global multi-task model is divided into a basic module for extracting common data features and K specific task modules for outputting prediction results.
[0215] The edge server establishes a corresponding logical cluster for each machine learning task, which is used to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0216] The power terminal trains the basic module and the specific task module, and completes the training through multiple iterations to obtain the updated gradient value of the specific task module.
[0217] The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding update gradient value to the edge server;
[0218] The edge server schedules the logical clusters that have been allocated computing resources to perform a global aggregation operation to obtain a global module;
[0219] The edge server combines the global module with the basic module to obtain an updated global multitasking model.
[0220] Example 4
[0221] This embodiment provides a non-transitory computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the personalized federated multi-task learning method for power terminals described in the above-described method embodiment, and is applied to a federated multi-task learning system. The federated multi-task learning system includes at least one edge server and several power terminals. The method includes:
[0222] Based on K similar machine learning tasks, the global multi-task model is divided into a basic module for extracting common data features and K specific task modules for outputting prediction results.
[0223] The edge server establishes a corresponding logical cluster for each machine learning task, which is used to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the service area of the edge server.
[0224] The power terminal trains the basic module and the specific task module, and completes the training through multiple iterations to obtain the updated gradient value of the specific task module.
[0225] The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding update gradient value to the edge server;
[0226] The edge server schedules the logical clusters that have been allocated computing resources to perform a global aggregation operation to obtain a global module;
[0227] The edge server combines the global module with the basic module to obtain an updated global multitasking model.
[0228] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are relatively simple in description because they are fundamentally similar to the method embodiments; relevant parts can be referred to the descriptions in the method embodiments.
[0229] The devices, media, and methods provided in the embodiments of the present invention are one-to-one correspondences. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0230] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process method or product that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process method or product. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process method or product that includes that element.
[0231] The above are merely embodiments of the present invention and are not intended to limit the invention. Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A personalized federated multi-task learning method for power terminals, characterized in that, Applied to a federated multi-task learning system, the federated multi-task learning system comprising at least one edge server and several power terminals, the method includes: Based on K similar machine learning tasks, the global multi-task model is divided into a basic module for extracting common data features and K specific task modules for outputting prediction results. The edge server establishes a corresponding logical cluster for each machine learning task, which is used to aggregate and store the global multi-task model, and sends the global multi-task model and each machine learning task to all power terminals within the service area of the edge server. The power terminal trains the basic module and the specific task module, and completes the training through multiple iterations to obtain the updated gradient value of the specific task module. The power terminal sends a request to the edge server and establishes a connection, downloads the latest specific task module, and uploads the corresponding update gradient value to the edge server. The edge server schedules the logical clusters that have been allocated computing resources to perform a global aggregation operation to obtain a global module; The edge server combines the global module with the basic module to obtain an updated global multi-task model; The steps of the power terminal sending a request to the edge server and establishing a connection, downloading the latest specific task module and uploading the corresponding update gradient value to the edge server include: when performing a machine learning task locally, determining the importance of each specific task module update and the corresponding first scheduling frequency. Based on the importance and the first scheduling frequency, the local task priority is determined; When the allocated bandwidth resources are insufficient to upload the update gradient values of all the specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded. The step of scheduling the logical cluster with allocated computing resources on the edge server to perform a global aggregation operation to obtain a global module includes: For each aggregation round, determine the activity level of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster; Global task priority is determined based on the activity level, the similarity, and the second scheduling frequency; When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module.
2. The personalized federated multi-task learning method for power terminals according to claim 1, characterized in that, The step of establishing a corresponding logical cluster for each machine learning task on the edge server to aggregate and store the global multi-task model includes: Establish a first logical cluster, which is used to aggregate and store the latest specific task module and its corresponding gradient value; Establish a second logical cluster, which is used to aggregate and store the basic modules shared by all tasks.
3. The personalized federated multi-task learning method for power terminals according to claim 1, characterized in that, The steps of the power terminal sending a request to the edge server and establishing a connection, downloading the latest specific task module, and uploading the corresponding updated gradient value to the edge server also include: For each communication round, the power terminal sends a connection request to the edge server; After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal; When the instantaneous channel state is greater than or equal to a preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least one of the specific task modules and the upload of the updated gradient value within one communication round.
4. The personalized federated multi-task learning method for power terminals according to claim 1, characterized in that, Before the step of training the base module and the specific task module in the power terminal, completing the training through multiple iterations to obtain the updated gradient value of the specific task module, the method further includes: The power terminal sets the task indicator flag value of the specific task module according to the machine learning task it needs to participate in; Based on the task indicator flag value, determine whether the specific task module needs to be trained.
5. The personalized federated multi-task learning method for power terminals according to claim 4, characterized in that, The step of training the base module and the specific task module in the power terminal, and completing the training through multiple iterations to obtain the updated gradient value of the specific task module, includes: Obtain the task indication flag value; The task indicator flag value is represented as the gradient value of the specific task module that is not trainable and is then frozen. The power terminal trains the specific task module and the basic module represented by the task indication flag value as trainable; After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
6. A personalized federated multi-task learning device for power terminals, characterized in that, An apparatus for use in a federated multi-task learning system, the federated multi-task learning system comprising at least one edge server and several power terminals, the apparatus comprising: The partitioning module is used to divide the global multi-task model into a basic module for extracting common data features and K specific task modules for outputting prediction results based on K similar machine learning tasks. The logical cluster creation module is used by the edge server to establish a corresponding logical cluster for each machine learning task, to aggregate and store the global multi-task model, and to send the global multi-task model and each machine learning task to all power terminals within the service area of the edge server. The learning and training module is used by the power terminal to train the basic module and the specific task module. The training is completed through multiple iterations to obtain the updated gradient value of the specific task module. The model update module is used for the power terminal to send a request to the edge server and establish a connection, download the latest specific task module, and upload the corresponding update gradient value to the edge server. The model update module is further used for: When performing machine learning tasks locally, determine the importance of each specific task module update and its corresponding first scheduling frequency; Based on the importance and the first scheduling frequency, the local task priority is determined; When the allocated bandwidth resources are insufficient to upload the update gradient values of all the specific task modules within one communication round, the specific task modules that need to be scheduled are determined according to the local task priority, the corresponding update gradient values are uploaded, and the latest specific task modules are downloaded. An aggregation module is used by the edge server to schedule the logical clusters with allocated computing resources to perform global aggregation operations to obtain a global module; The aggregation module is further used for: For each aggregation round, determine the activity level of the logical cluster, the similarity of each module in the logical cluster, and the second scheduling frequency of the logical cluster; Global task priority is determined based on the activity level, the similarity, and the second scheduling frequency; When the available computing resources of the edge server are insufficient to complete the aggregation operation of all logical clusters in one aggregation round, the edge server schedules the logical clusters to perform global aggregation operations according to the global task priority to obtain the global module. The model combination module is used by the edge server to combine the global module with the basic module to obtain an updated global multi-task model.
7. The personalized federated multi-task learning device for power terminals according to claim 6, characterized in that, The logical cluster creation module is further used for: Establish a first logical cluster, which is used to aggregate and store the latest specific task module and its corresponding gradient value; Establish a second logical cluster, which is used to aggregate and store the basic modules shared by all tasks.
8. The personalized federated multi-task learning device for power terminals according to claim 7, characterized in that, The model update module is further used for: For each communication round, the power terminal sends a connection request to the edge server; After receiving the connection request, the edge server estimates the instantaneous channel state of the power terminal; When the instantaneous channel state is greater than or equal to a preset threshold, the edge server agrees to the connection request, allocates bandwidth resources, and completes the download of at least one of the specific task modules and the upload of the updated gradient value within one communication round.
9. The personalized federated multi-task learning device for power terminals according to claim 6, characterized in that, The device further includes: a task indicator flag value setting module, specifically used for: The power terminal sets the task indicator flag value of the specific task module according to the machine learning task it needs to participate in; Based on the task indicator flag value, determine whether the specific task module needs to be trained.
10. The personalized federated multi-task learning device for power terminals according to claim 9, characterized in that, The learning and training module is further used for: Obtain the task indication flag value; The task indicator flag value is represented as the gradient value of the specific task module that is not trainable and is then frozen. The power terminal trains the specific task module and the basic module represented by the task indication flag value as trainable; After iterating the training results through a preset objective function multiple times until convergence is achieved, the first update gradient value of the basic module and the second update gradient value of the specific task module are obtained.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the personalized federated multitasking learning method for power terminals as described in any one of claims 1-5.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the personalized federated multitasking learning method for power terminals as described in any one of claims 1-5.