Multi-edge cooperation load prediction method based on personalized federal deep learning

By adopting personalized federated deep learning and multi-edge collaboration load prediction methods in edge computing environments, the problems of high noise, high variability and insufficient data volume are solved, and efficient and accurate prediction of edge loads and the improvement of model generalization capabilities are achieved.

CN119865435AActive Publication Date: 2025-04-22FUZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510039223.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-22
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

In edge computing environments, load data has problems such as high noise, high variability and insufficient data volume, resulting in insufficient prediction accuracy and generalization capabilities of existing load prediction models.

Method used

Using a multi-edge collaborative load prediction method based on personalized federated deep learning, multi-edge collaboration and personalized federated deep learning are integrated through collaborative training of parameter servers and clients, time-dependent prediction is performed using RNN-based methods, and time-dependent relationships are captured through data preprocessing and model training.

Benefits of technology

It realizes efficient and accurate prediction of edge loads, improves the generalization ability and prediction accuracy of the model, and reduces the risk of noise interference and model overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865435A_ABST
    Figure CN119865435A_ABST
Patent Text Reader

Abstract

The invention provides a multi-edge cooperation load prediction method based on personalized federal deep learning, and the method comprises the following steps: 1, a parameter server selects a client to participate in federal aggregation of this round, and transmits a work request to the client; step 2, the selected client decides whether to participate in the federal aggregation of this round according to the state of the current edge server, and returns an accepting / rejecting reply to the parameter server; 3, the parameter server distributes the global model # imgabs0 # and the global control parameter # imgabs1 # to clients participating in federal aggregation; 4, the client preprocesses historical load data on an edge server of the client, wherein the preprocessing comprises data cleaning, resampling, normalization and denoising; according to the technical scheme, multi-edge cooperation and personalized federal deep learning are integrated, and efficient and accurate prediction of the edge load is adaptively realized by solving the key problems of high noise, high variability, insufficient data volume, poor model generalization ability and the like of load data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a multi-edge collaborative load prediction method based on personalized federated deep learning. Background Art

[0002] As an emerging computing paradigm in the Internet of Things (IoT) era, edge computing can effectively reduce the response time of IoT applications (such as autonomous driving, AR / VR, and smart cities) by deploying computing and storage resources at the edge of the network closer to terminal devices, thereby improving the user's service experience. By 2025, the total number of IoT-connected devices installed worldwide is expected to reach 30.9 billion. If the operating data and computing tasks of all IoT applications on terminal devices are uploaded to remote cloud data centers, it will undoubtedly consume a lot of bandwidth resources and bring a huge processing burden to cloud data centers. At the same time, long-distance data transmission between cloud data centers and terminal devices will also cause serious response delays. Relatively speaking, edge computing can greatly reduce the delay of transmitting data and processing tasks, reduce system costs to a certain extent, and improve service quality. Therefore, the emergence of edge computing can effectively support the high demand for operating performance of a large number of emerging IoT applications.

[0003] As an important technical support in edge computing, load prediction can better support the edge system to configure and allocate resources in advance, thereby achieving more efficient and reasonable resource supply. For example, when a large number of service requests reach the edge server at the same time, insufficient resource allocation will increase the response time. When only a small number of service requests arrive at the edge server for a long time, excessive resource allocation will lead to frequent idle states, resulting in resource waste. If the edge load changes in the future can be predicted, and the supply of resources can be increased or reduced, the service level agreement (SLA) can be better guaranteed and the operating efficiency of the edge system can be effectively improved. For example, the edge system can use the load prediction results to guide the allocation and migration of virtual machines, alleviating problems such as server overload or network congestion. In addition, load prediction can also effectively improve the resource utilization of the edge system and reduce operating costs.

[0004] Most of the existing research on load forecasting focuses on cloud environments, which usually use regression, heuristic or classical neural networks. Classical neural networks can achieve accurate predictions for loads with obvious changing trends, but they usually only contain shallow network structures, such as multilayer perceptrons (MLP) and radial basis functions (RBF). Therefore, when faced with highly variable edge loads, classical neural networks cannot achieve high prediction accuracy because they cannot effectively capture the pattern of edge load changes. To address this problem, recurrent neural networks (RNNs) have been proposed and applied to load forecasting, which have shown good performance in time series data modeling and processing. However, due to the vanishing gradient problem, classical RNNs are difficult to learn long-term memory dependencies. To solve this problem, some improved variants of RNNs have been proposed, such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), which have shown excellent learning capabilities for long-term memory. In addition, due to the noise interference of the original data, nonlinear models often have problems of overfitting and difficulty in generalization, which greatly affects the prediction accuracy of the model. Unlike cloud environments, servers in edge environments are usually deployed on a smaller scale, more discretely distributed, and with limited historical load data stored, which brings the following huge challenges to edge load prediction.

[0005] (1) High variability and high noise in load. Due to the dynamic nature of the edge environment, the diversity of user requests, and the elastic supply of resources, the loads of different edge servers are usually highly variable and unevenly distributed over a period of time. For example, the maximum difference in the load of edge servers across sites is 19.8 times, and the maximum difference in the load of edge servers in the same site is 14.3 times. In addition, the complex edge environment also introduces a lot of noise to the load data. This high variability and high noise pose great difficulties for accurate and efficient load prediction.

[0006] (2) Limited historical load data in a single edge server. Load prediction models based on deep learning usually need to be trained with a large amount of historical load data to support high accuracy. However, compared with cloud data centers, the amount of historical load data owned by a single edge server is usually small, making it difficult to obtain a high-precision prediction model by independently training local load data.

[0007] (3) Poor model generalization ability. The load conditions of different edge servers are constantly changing dynamically due to their deployment environment and application scenarios, which leads to large differences in the distribution of load data between different edge servers. In the case of highly different data samples, the generalization ability of the load prediction model trained by a single edge server is seriously insufficient and cannot adapt well to different edge environments. Summary of the invention

[0008] In view of this, the purpose of the present invention is to provide a multi-edge collaborative load prediction method based on personalized federated deep learning, integrating multi-edge collaboration with personalized federated deep learning, and adaptively achieving efficient and accurate prediction of edge load by solving key problems such as high noise, high variability, insufficient data volume, and poor model generalization ability of load data.

[0009] To achieve the above object, the present invention adopts the following technical solution: a multi-edge collaborative load prediction method based on personalized federated deep learning, comprising the following steps:

[0010] Step 1: The parameter server selects a client to participate in this round of federation aggregation and sends a work request to the client;

[0011] Step 2: The selected client decides whether to participate in this round of federation aggregation based on the current state of the edge server, and returns an acceptance / rejection reply to the parameter server;

[0012] Step 3: The parameter server distributes the global model w and global control parameters c to the clients participating in the federation aggregation;

[0013] Step 4: The client preprocesses the historical load data on its edge server, including data cleaning, resampling, normalization, and denoising, so as to extract important representations from the original data;

[0014] Step 5: Based on the global model w, global control parameter c and local control parameter c k , the client updates the local load prediction model w after several rounds of training, verification and testing k and local control parameter c k ;

[0015] Step 6: The trained model can be used to predict future edge loads, which will help edge service providers develop appropriate resource scheduling plans to achieve load balancing between edge servers;

[0016] Step 7: The parameter server waits for all clients participating in the federation aggregation to complete local training and upload their local models and local control parameters;

[0017] Step 8: The parameter server aggregates all received local models and updates the global model, and then starts the next round of federated learning training.

[0018] In a preferred embodiment, the objective function of the multi-edge collaborative load prediction general framework MC-2PF based on personalized federated deep learning is defined as:

[0019]

[0020] Among them, w k is the local model of client k.

[0021] In a preferred embodiment, the MC-2PF model uses an RNN-based method as a federated client model for time series prediction. Through data preprocessing and model training, the RNN-based method captures the temporal dependencies in the sequence and uses past observations to predict future changes. Based on historical memory and current input, the future prediction output is defined as:

[0022]

[0023] Among them, s t 、x t and t Represent the hidden state, input and output at time t respectively.

[0024] In a preferred embodiment, the indicators for evaluating the performance of MC-2PF include:

[0025] (1) MSE is the mean square error, which is defined as:

[0026]

[0027] Among them, y t is the true value of the load at time t, is the load prediction value at time t, L is the prediction length;

[0028] (2) MAE is the mean absolute error, which is defined as:

[0029]

[0030] (3)R 2 is the coefficient of determination, which reflects the fitting ability of the model and is defined as:

[0031]

[0032] in, R 2 The value of is in the interval [-∞,1], when R 2The closer it is to 1, the better the model fit is.

[0033] In a preferred embodiment, the workflow of the MC-2PF model includes: first, the parameter server initializes the global model w, the global control parameter c and the number of clients K; each client maintains the local control parameter c k , c and c k All are initialized to 0 to ensure For each communication round, the parameter server randomly selects max(C·K,1) clients from all K clients according to the selection ratio C to participate in the federation aggregation and form a client set S, where the function max(,) is used to avoid training interruptions caused by no client being selected; then, the parameter server distributes the global model and global control parameters (w,c) to the clients in S.

[0034] In a preferred embodiment, the workflow of the MC-2PF model includes: Next, the client k (k∈S) receives (w, c) and updates the local model to w k ←w; Specifically, each client obtains historical load data from the local server for local model training; these load data contain the runtime information of the edge server; the CPU usage rate, which best reflects the operating performance of the edge system, is used as the main prediction indicator; for an edge server, x t represents the CPU usage at time t. The historical load sequence of the edge server can be recorded as X = {x1, x2, ..., x n}; In the process of data preprocessing, it is replaced by taking the interval average value and compressed by resampling; it is normalized to speed up the convergence of the local model; after normalization, the original data is mapped to the interval [0,1]; it is defined as:

[0035]

[0036] Among them, X is the original load data; X max and X min They are the maximum and minimum CPU usage in the original load data respectively;

[0038] Design a Savitzky-Golay based filter to preprocess the original load data and define a subsequence of:

[0039]

[0040] in, q is S q The center point, S q The length of is (2w+1), where w is half of the window length.

[0041] In a preferred embodiment, the workflow of the MC-2PF model includes: Next, for S q Fit each element in :

[0042]

[0043] in, and x′ are the elements to be fitted and the elements after fitting, respectively; a is the fitting parameter, and γ is the degree of the polynomial;

[0044] The fitting of the elements in the window is achieved by solving a γ-dimensional linear equation system; specifically, by S q The elements in form (2w+1) equations, forming a γ-dimensional linear equation system, and then the fitting parameter a can be determined by the least squares method; the proposed SG-based filter works in a sliding window manner until all load data are processed.

[0045] In a preferred embodiment, the workflow of the MC-2PF model includes: then, dividing the pre-processed load X′ into multiple batches as local training data for the client; each client performs E rounds of local model training; the local model w k The update definition is as follows:

[0046]

[0047] Among them, the difference term (c w -c) to estimate the client's offset and correct the direction of local updates in time;

[0048] After E rounds of local updates, the local control parameters are updated; the process is defined as:

[0049]

[0050] Where η is the learning rate; the local control parameter c k The update of takes into account the global control parameter c and the difference between the global model and the updated local model, denoted as (ww k ).

[0051] In a preferred embodiment, the workflow of the MC-2PF model includes: after completing local training, the client k uploads the updated w k and c k To the parameter server; after receiving the model updates uploaded by all clients, the parameter server will update the global model w and global control parameters c and start the next round of FL training; the process is defined as:

[0052]

[0053] In a preferred embodiment, the design control parameters c and c k , estimates the convergence direction of the global model and the local model; by using c, each client obtains relevant information about the update direction of the global model and other local models during the update of its local model; as shown in formula (9), a correction term (c k -c); the movement of the local update will be corrected back to the ideal convergence direction, thereby achieving a better convergence effect; after the client completes the local model update, according to formulas (10) and (11), the local control parameter c of each client is k And the global control parameter c is updated; c k The update of estimates the convergence direction of the local model, and the update of c estimates the convergence direction of the global model, which also contains information about the update directions of all clients.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] 1. For the first time, a general load prediction framework for multi-edge collaboration is proposed. In particular, the proposed MC-2PF innovatively integrates multi-edge collaboration with personalized federated deep learning, and adaptively achieves efficient and accurate prediction of edge loads by solving key problems such as high noise and high variability of load data, insufficient data volume, and poor model generalization ability.

[0056] 2. A set of model control parameters are designed on the cloud server and each edge server to help create a personalized prediction model for each edge server. The designed control parameters intuitively estimate the update direction of the local model and the global model and correct them, overcoming the client offset phenomenon caused by large differences in data distribution in classic federated learning. In addition, a Savitzky-Golay (SG)-based filter is developed to smooth the raw load data, reducing noise interference and alleviating model overfitting.

[0057] 3. The effectiveness of the proposed model control parameters in guiding the learning direction of each edge load prediction model in the training process of personalized federated learning is theoretically analyzed, and the generalization bound of the proposed MC-2PF is proved. In particular, a practical case is used to demonstrate the workflow of MC-2PF applied to RNN-based prediction models, verifying its feasibility and versatility.

[0058] 4. Using real-world testbeds and edge load datasets, a large number of experiments have verified the effectiveness and practicality of the proposed MC-2PF. The results show that MC-2PF can be applied to the training of a variety of advanced RNN-based prediction models (including LSTM, GRU, BiLSTM and S2S) and achieve efficient and accurate prediction performance. Compared with the application of a single edge training framework on different RNN-based prediction models, MC-2PF shows stronger adaptability and achieves higher prediction accuracy. Compared with the advanced federated learning framework, MC-2PF can also further improve the prediction accuracy and convergence speed at different prediction lengths. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic diagram of an overview of MC-2PF in a preferred embodiment of the present invention;

[0060] Figure 2 A schematic diagram showing how control parameters improve model convergence in a preferred embodiment of the present invention;

[0061] Figure 3 A schematic diagram of the basic structure of an LSTM unit in a preferred embodiment of the present invention;

[0062] Figure 4 Schematic diagram of comparison of load data before and after using SG filtering in a preferred embodiment of the present invention; wherein (a) is w=7, p=5, (b) is w=15, p=3, and (c) is w=30, p=2;

[0063] Figure 5 Schematic diagram of prediction performance of SG filters with different settings in different scenarios according to a preferred embodiment of the present invention; wherein (a) is minute-level prediction, (b) is hour-level prediction, and (c) is day-level prediction;

[0064] Figure 6 Schematic diagram of the comparison of convergence of models on different edge servers under FedAvg and MC-2PF in a preferred embodiment of the present invention; wherein (a) is client 1, (b) is client 2, (c) is client 3, and (d) is client 4;

[0065] Figure 7 Schematic diagram of the performance of S2S-GRU with MC-2PF under different prediction lengths in a preferred embodiment of the present invention; wherein (a) is minute-level prediction, (b) is hour-level prediction, and (c) is day-level prediction;

[0066] Figure 8Schematic diagram of the performance of S2S-GRU with MC-2PF under different prediction lengths in a preferred embodiment of the present invention; wherein (a) is minute-level prediction, (b) is hour-level prediction, and (c) is day-level prediction;

[0067] Fig. 9 The figure is a schematic diagram of the performance of S2S-GRU with MC-2PF of a preferred embodiment of the present invention for different types of loads at a prediction length of minute level; wherein, (a) is a highly periodic load (type 1), (b) is a highly periodic load (type 2), (c) is a highly random load (type 1), and (d) is a highly random load (type 2). DETAILED DESCRIPTION

[0068] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0069] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0070] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.

[0071] A multi-edge collaborative load prediction method based on personalized federated deep learning, reference Figure 1-9 In order to better meet user service requests, edge systems need to be able to efficiently schedule resources such as computing and storage according to current and future load conditions, thereby achieving system load balancing. However, due to the high variability of edge loads, it is difficult to quickly formulate an ideal resource scheduling plan, which will seriously affect the user experience. At the same time, unreasonable resource scheduling plans will also lead to excessive operation and maintenance costs or violation of SLAs. Different from traditional centralized load prediction, the proposed MC-2PF adopts a collaborative training method based on federated learning in a multi-edge environment. Specifically, the site ID to which the edge server belongs is used as the basis for dividing the collaborative training area. The edge servers in the same site are regarded as clients in federated learning, and they will be collaboratively trained with the cloud servers (regarded as parameter servers in federated learning). Specifically, the workflow of MC-2PF is as follows.

[0072] Step 1: The parameter server selects some (or all) clients to participate in this round of federation aggregation and sends work requests to the clients.

[0073] Step 2: The selected client decides whether to participate in this round of federation aggregation based on the current state of the edge server and returns an acceptance / rejection reply to the parameter server.

[0074] Step 3: The parameter server distributes the global model w and global control parameters c to the clients participating in the federation aggregation.

[0075] Step 4: The client preprocesses the historical load data on its edge server, including data cleaning, resampling, normalization, and denoising, so as to extract important representations from the original data.

[0076] Step 5: Based on the global model w, global control parameter c and local control parameter c k , the client updates the local load prediction model w after several rounds of training, verification and testing k and local control parameter c k .

[0077] Step 6: The trained model can be used to predict future edge loads, which will assist edge service providers in developing appropriate resource scheduling plans to achieve load balancing between edge servers.

[0078] Step 7: The parameter server waits for all clients participating in the federation aggregation to complete local training and upload their local models and local control parameters.

[0079] Step 8: The parameter server aggregates all received local models and updates the global model, and then starts the next round of federated learning training.

[0080] Classic federated learning (such as FedAvg) usually expects to obtain a global model with good performance, so a test set is usually created specifically to verify the effectiveness of the global model, but this approach may not be applicable to all application scenarios of federated learning. Unlike existing research, it is expected that each client (i.e., edge server) can learn a good and personalized load prediction model. Therefore, more attention is paid to whether MC-2PF can effectively improve the prediction performance of the client model. In particular, a test set is extracted for each client from the local historical load data to more specifically test the performance of each client's load prediction model on the local test set. Accordingly, the objective function of MC-2PF is defined as:

[0081]

[0082] Among them, w kis the local model of client k (such as RNN-based load prediction model).

[0083] In view of the complex and changeable edge load change pattern, the proposed MC-2PF will minimize the error between the predicted load and the actual load on each edge server to help improve the operating efficiency and service quality of the edge system. Specifically, the MC-2PF model uses the RNN-based method as a federated client model for time series prediction. Through proper data preprocessing and model training, the RNN-based method can effectively capture the temporal dependencies in the sequence and use past observations to predict future changes. Based on historical memory and current input, the future prediction output is defined as:

[0084]

[0085] Among them, s t 、x t and t Represent the hidden state, input and output at time t respectively.

[0086] In addition, the following accuracy metrics commonly used in time series prediction problems are used to comprehensively evaluate the performance of MC-2PF.

[0087] (1) MSE (Mean Squared Error) is the mean square error, which is defined as:

[0088]

[0089] Among them, y t is the true value of the load at time t, is the load prediction value at time t, and L is the prediction length.

[0090] (2) MAE (Mean Absolute Error) is the mean absolute error, which is defined as:

[0091]

[0092] (3)R 2 (R-Square) is the coefficient of determination, which reflects the fitting ability of the model and is defined as:

[0093]

[0094] in, R 2 The value of is in the interval [-∞,1], when R 2 The closer it is to 1, the better the model fit is.

[0095] Overview of the proposed MC-2PF technical solution

[0096]

[0097]

[0098] Algorithm 1 shows the key steps of MC-2PF. First, the parameter server initializes the global model w, the global control parameter c, and the number of clients K (line 2). Each client maintains a local control parameter c. k , c and c k All are initialized to 0 to ensure For each communication round, the parameter server randomly selects max(C·K,1) clients from all K clients according to the selection ratio C to participate in the federation aggregation and form the client set S (Lines 4-5), where the function max(,) is used to avoid training interruptions caused by no client being selected. Then, the parameter server distributes the global model and global control parameters (w,c) to the clients in S (Line 6).

[0099] Then, client k(k∈S) will receive (w,c) and update the local model to w k ←w (lines 8-10). Specifically, each client obtains historical load data from the local server for local model training (line 15). These load data contain runtime information of the edge server (such as CPU usage, memory usage, disk usage, and upload and download bandwidth). If all of this runtime information is used as training data, it will undoubtedly increase the redundancy and complexity of the model training process. Therefore, the CPU usage, which best reflects the operating performance of the edge system, is used as the main prediction indicator. For an edge server, x t represents the CPU usage at time t. The historical load sequence of the edge server can be recorded as X = {x1, x2, ..., x n}. Since the original edge load data is sampled at a higher frequency, it is inevitably accompanied by a lot of noise. For invalid data, it is replaced by taking the interval average value during data preprocessing, and compressed by resampling, so as to effectively extract the important features of the load data. In addition, the value range of the original load data in different time periods varies greatly, so it is normalized (line 16) to speed up the convergence of the local model. After normalization, the original data is mapped to the interval [0,1]. The process is defined as:

[0100]

[0101] Where X is the original load data. max and X min They are the maximum and minimum CPU usage in the original load data.

[0102] In order to solve the problem of high noise which will seriously affect the prediction accuracy and lead to high computational complexity, a filter based on Savitzky-Golay (SG) is designed to preprocess the original load data (line 16) to reduce the interference of noise and improve the smoothness of the data. In particular, a filter about subsequence of:

[0103]

[0104] in, q is S q The center point, S q The length of is (2w+1), where w is half of the window length.

[0105] Next. For S q Fit each element in :

[0106]

[0107] in, and x′ are the elements to be fitted and the elements after fitting, respectively. a is the fitting parameter, and γ is the degree of the polynomial.

[0108] Therefore, by solving a γ-dimensional linear equation system, the fitting of the elements in the window can be achieved. q The elements in form (2w+1) equations, which constitute a γ-dimensional linear equation system, and then the fitting parameter a can be determined by the least squares method. The proposed SG-based filter works in a sliding window manner until all load data are processed.

[0109] Next, the preprocessed load X′ is divided into multiple batches as the client’s local training data (line 17). Each client performs E rounds of local model training (lines 18-22). The local model w k The update definition is as follows:

[0110]

[0111] Among them, the difference term (c w -c) to estimate the client's offset and correct the direction of local updates in time.

[0112] After E rounds of local updates, the local control parameters are updated (line 23), and the process is defined as:

[0113]

[0114] Where η is the learning rate. The local control parameter ck The update of takes into account the global control parameter c and the difference between the global model and the updated local model, denoted as (ww k ).

[0115] After completing local training, client k uploads the updated w k and c k To the parameter server (line 24). After receiving the model updates uploaded by all clients, the parameter server will update the global model w and global control parameters c and start the next round of FL training. The process is defined as:

[0116]

[0117] Improving convergence by controlling parameters

[0118] In order to better show the control parameters c and c k The positive impact of improving edge load prediction performance is first briefly explained in the classic federated learning, and then the c and c are theoretically analyzed. k How the design effectively solves this problem.

[0119] Figure 2 The changes in the convergence of the load prediction model on two clients are shown, including the convergence direction of the local and global models and the convergence point of the client model. Due to the large differences in data distribution between different clients, the final convergence points of the client models are also different. In this case, the convergence direction of some clients is affected by other clients and deviates, which is called the client drift phenomenon. This phenomenon brings great difficulty to FL training and also seriously reduces the performance and generalization ability of the model. In the classic FedAvg, each client receives the global model w and updates it locally:

[0120]

[0121] When the data of all clients are independent and identically distributed, the update process is unbiased, so the update of each client can move towards its own convergence point. However, when there are large differences in data distribution between clients, the difference in the convergence direction of the clients will be relatively large. In this case, the classic FedAvg cannot guarantee that the updates of all clients can move towards their convergence points, which seriously affects the accuracy and convergence speed of the model.

[0122] In order to solve this problem, the control parameters c and c are designed. k, an estimate of the convergence direction of the global model and the local model. By using c, each client can obtain relevant information about the update direction of the global model and other local models during the update of its local model. As shown in formula (9), a correction term (c k -c). Therefore, the movement of the local update will be corrected back to the ideal convergence direction, thereby achieving a better convergence effect. After the client completes the local model update, the local control parameter c of each client will be adjusted according to formulas (10) and (11). k and the global control parameter c are updated. k The update of estimates the convergence direction of the local model, and the update of c estimates the convergence direction of the global model, which also contains information about the update directions of all clients.

[0123] Application of RNN-based load forecasting model in MC-2PF

[0124] In order to verify the feasibility and versatility of the proposed MC-2PF, an example is used to demonstrate its application in the training process of a RNN-based load prediction model (i.e., LSTM). Specifically, in this example, LSTM is used to verify the feasibility of MC-2PF. It is worth noting that MC-2PF can also be applied to other RNN-based models, such as GRU, BiLSTM, and Seq2Seq.

[0125] LSTM is an improved variant of RNN. Compared with the classic RNN, it has improved the ability to judge information. LSTM can selectively forget or retain information, solving the gradient vanishing or exploding problem of RNN in long sequence prediction. Figure 3 As shown, the LSTM unit uses three gates to control the incoming information flow, including the input gate i t 、Forget gate t and output gate o t . and t Represent the current and previous unit states respectively. t Decided The information that was discarded, t Determines what will be stored in y t The new information, t Calculate the hidden layer output h at time t t . Specifically, they are defined as:

[0126]

[0127] Among them, the trainable parameters are defined as the set W = {W y ,W f ,Wi ,W o} and b={b y ,b f ,b i ,b o For the parameter server and each client in MC-2PF, according to W and b A set of control parameters with the same structure is designed accordingly, denoted as W c = {W y ′,W f ′,W i ′,W o ′} and b c = {b′ y ,b′ f ,b i ′,b o ′}, and ensure that the global control parameter is the average value of all local control parameters.

[0128] Based on the above settings, the parameter server selects clients to participate in the federated aggregation, and the selected clients perform E rounds of training locally. Specifically, each client uses stochastic gradient descent (SGD) to update W and b. Each time the local model is updated, W c and b c It will be used to correct the update direction of the learnable parameters. When a client completes the local model update, it will also update the control parameters. After all clients upload their local models and control parameters, the parameter server will perform a federated average of the learnable parameters and control parameters. Then, MC-2PF enters the next round of training and continuously updates until the model converges. The proposed MC-2PF is also applicable to other RNN-based load prediction models (such as GRU, BiLSTM, and S2S). In the next section, the feasibility and versatility of MC-2PF are fully verified through a large number of experiments.

[0129] Method evaluation

[0130] Dataset and Experimental Settings

[0131] A real-world test bed was built based on hardware devices to simulate multi-edge collaborative load prediction scenarios. The test bed consists of a workstation and a group of Jetson TX2. The workstation is used as a cloud data center (i.e., parameter server), which is equipped with two NVIDIA GeForce GTX 3090 GPUs, an Intel (R) Xeon (R) CPU Silver 4208@2.1GHz, and a memory size of 32GB. Jetson TX2 is used as an edge server (i.e., client), each equipped with an NVIDIA Pascal GPU with 256 CUDA cores, and a CPUCluster consisting of 2-core Denver2 and 4-core ARM CortexA57. The workstation and all Jetson TX2 are located in the same local area network, where end-to-end communication between the workstation and Jetson TX2 is established based on the FLASK framework. At the same time, the Ubuntu 18.04 operating system is used, with CUDA v100 and cuDNN v7.5.0.

[0132] A real-world edge load dataset was used, which recorded the load changes of 6,870 edge servers within one month with a sampling frequency of 1 minute. Specifically, the CPU usage rate was used as a performance indicator, and key information such as the site ID to which the edge server belongs, the start recording time, the end recording time, and the sampling frequency were extracted. The dataset is divided into a training set (50%), a validation set (25%), and a test set (25%). The training set is used for model training (calculating the weights of the neural network), the validation set is used for model parameter selection (selecting hyperparameters and preventing overfitting), and the test set is used for model performance evaluation. At the same time, multiple load instances were generated according to the input and prediction length of the load, and three scenarios with prediction lengths of minutes, hours, and days were set. For minute-level prediction scenarios, the input length and prediction length are set to 10 minutes; for hour-level prediction scenarios, the input length and prediction length are set to 1 hour; for day-level prediction scenarios, the input and prediction lengths are set to 1 day.

[0133] To verify the superiority of the proposed MC-2PF, it is compared with the following three benchmark frameworks on different RNN-based models:

[0134] (1) Local: Each edge server uses only its local data as an independent training model.

[0135] (2) FedAvg: Multiple edge servers adopt the classic FedAvg collaborative training model.

[0136] (3) FedPer: Improves the performance and generalization ability of personalized models through a combination of personalized model aggregation and parameter update strategies.

[0137] (4) pFedMe: Uses a two-layer optimization structure and Moreau envelope regularization method to achieve personalized federated learning.

[0138] Each edge server uses five RNN-based load prediction models, including:

[0139] (1) LSTM: As an improved RNN, LSTM introduces gating structures and memory units to capture and process long-term dependencies.

[0140] (2) GRU: Compared with LSTM, GRU simplifies the gating structure and aims to handle long-term dependencies more efficiently.

[0141] (3) BiLSTM: Compared with LSTM, BiLSTM considers both forward and reverse sequence information to more comprehensively capture the context and dependencies in time series data.

[0142] (4) S2S-LSTM: S2S-LSTM combines the gating structure of LSTM and the sequence generation capability of Seq2Seq.

[0143] (5) S2S-GRU: S2S-GRU combines the gating structure of GRU and the sequence generation capability of Seq2Seq.

[0144] Based on Python 3.9 and PyTorch 1.12.1, MC-2PF and FedAvg as well as five RNN-based load prediction models are implemented. For MC-2PF and FedAvg, the maximum number of communications is 500, the number of local training times for each client is 10, the batch size is 64, and the learning rate is 0.001. For the five RNN-based load prediction models, similar network structures are adopted so that they have similar model scales. Specifically, in LSTM and GRU, 4 hidden layers are set, each containing 64 neurons. In BiLSTM, since its parameter scale is twice that of LSTM, 2 hidden layers are set, each containing 64 neurons. In S2S, 2 encoder layers and 2 decoder layers are set, each containing 64 neurons.

[0145] Experimental results and analysis

[0146] First, the hyperparameter selection of the SG filter is analyzed. When using the SG filter to preprocess the load data, it is necessary to set the window length w and the fitting polynomial order p. The window length refers to the size of the sliding window used to fit the data, which determines the number of adjacent data points for fitting the polynomial coefficients. Figure 4 The load data before and after using the SG filter are compared. Figure 4 As shown in (a), when using a shorter window length (w = 7) and a larger fitting polynomial order (p = 5), the SG filter can retain more details of the data, but it cannot smooth it well. Figure 4 As shown in (c), when a longer window length (w=30) and a smaller fitting polynomial order (p=2) are used, the SG filter can smooth the data better, but some detail information may be lost.

[0147] Furthermore, the prediction performance of the SG filter in three different prediction scenarios was tested when different combinations of window lengths and fitting polynomial coefficients were used. Figure 5 As shown in (a), in the minute-level prediction scenario, the prediction accuracy is improved as the window length increases. When a smaller fitting polynomial order is used, the model can achieve higher prediction accuracy. Therefore, in the minute-level prediction scenario, it is more suitable to use a combination of a larger window length and a smaller fitting polynomial order. This is because the load change pattern at the minute level is easier to capture, and a long window length and a low-order polynomial can help clarify the load change pattern, thereby achieving better prediction results. In the minute-level prediction scenario, there are certain restrictions on the time series length of the input network, so for subsequent experiments on minute-level prediction scenarios, the largest possible window and the smallest possible fitting polynomial order will be used. As shown Figure 5 As shown in (b) and (c), with the increase of window length, the model prediction performance does not show a clear upward trend, and even shows a downward trend in some cases. This shows that in scenarios with large prediction lengths, too large window lengths will reduce prediction accuracy. At the same time, although reducing the order of the fitting polynomial can reduce the computational complexity, it will reduce the prediction accuracy of the model. This is because as the prediction length increases, the load change model becomes more complex. In this case, using a lower fitting polynomial order and a larger window length can improve the smoothness of the load data, but at the same time lose the key features of the data part, which affects the prediction accuracy. According to the test results, in hourly prediction scenarios, the fitting polynomial order is set to 3 and the window length is 29. In daily prediction scenarios, the fitting polynomial order is set to 6 and the window length is 21.

[0148] Figure 6 The convergence of the load prediction models trained on different edge servers using FedAvg and MC-2PF is demonstrated, where MC-2PF can converge to a better loss value faster. Specifically, Figure 6As shown in (a), compared with FedAvg, MC-2PF has the most obvious convergence advantage at 100 to 300 rounds. This is because the designed control parameters can correct the convergence direction of the model back to the ideal direction, so it can find the optimal solution faster than FedAvg. Figure 6 As shown in (b), (c) and (d), when FedAvg is used, the Loss curve has a higher frequency of abnormal fluctuations. This is because there are large differences in data distribution between edge servers, and the performance of the model after federation aggregation may decline compared to the previous local model. Therefore, the edge server needs to perform multiple rounds of local training and adjustment to restore the performance before aggregation. By introducing control parameters, MC-2PF corrects the convergence direction of the model and greatly reduces the large fluctuations in the model training process, so that convergence can be achieved more stably. This makes the global model obtained after aggregation have better adaptability to all edge environments, effectively reducing the fluctuations in the training process.

[0149] For scenarios with different prediction lengths (including min-level, hour-level, and day-level), the performance and convergence speed of five RNN-based load prediction models (including GRU, LSTM, BiLSTM, and S2S) under different training frameworks are evaluated. As shown in Table 1, when the Local training framework is used, in scenarios with different prediction lengths, R 2 The values ​​of are all negative, reflecting the poor fitting ability of the model. This is because it is difficult to obtain a good model by training the prediction model independently on a single edge. Compared with Local, the performance of the model trained by the FedAvg framework shows a significant improvement. This is because FedAvg not only uses local load data when training the model, but also draws on the experience of other edge servers in the same area to a certain extent, which shows good prediction performance when facing highly variable loads. However, the huge differences in data distribution between different edge servers seriously limit the generalization ability of the FedAvg training framework, and more data and training time may be required to enable each model to achieve higher prediction accuracy. In addition, FedPer and pFedMe perform poorly in edge load prediction. This is because FedPer and pFedMe lack targeted design for edge environments, and their general personalized methods confuse the data pattern relationship between edge clients, which makes their performance poor. Compared with FedAvg, MC-2PF further improves the prediction performance of various models when facing highly variable loads. This is because MC-2PF uses control parameters to enable the load prediction conditions of edge servers in the region to be mutually referenced, optimizing the convergence direction of each model and thus improving the prediction performance of each model.

[0150] Figure 7 The comparison of the number of communication rounds required for LSTM and S2S-GRU load forecasting models to achieve the corresponding performance indicators (MSE = 0.008, 0.009 and 0.012 in min-level, hour-level and day-level forecasting scenarios) using different training frameworks (FedAvg and MC-2PF) is shown. Compared with the classic FedAvg, MC-2PF can spend fewer communication rounds to achieve the target accuracy in most forecasting scenarios under different local training rounds (i.e., 5, 10 and 20). In the minute-level forecasting scenario, the number of communication rounds required is much less than that in the hour-level and day-level forecasting scenarios because the load change pattern is easy to capture. As the forecast length increases, the load fluctuation becomes more complex and changeable, so more communication rounds are required to achieve the target accuracy. In the face of more complex load scenarios (such as hour-level and day-level forecasting scenarios), MC-2PF can reduce the number of communication rounds by 15-25% compared with FedAvg. This is because MC-2PF uses control parameters to correct model training, which significantly improves the efficiency of multi-edge collaborative training.

[0151] Table 1 Performance of RNN-based models under different training frameworks at various prediction lengths

[0152]

[0153] Next, the performance of the S2S-GRU prediction model trained by the proposed MC-2PF is tested when facing different prediction lengths (i.e., min-level, hour-level, and day-level) and multiple types (i.e., highly periodic and highly random) of loads. Figure 8 The performance of S2S-GRU trained by MC-2PF at different prediction lengths is shown. Specifically, the trained model can obtain accurate predictions in different scenarios, and the performance is best in the minute-level prediction scenario. As the prediction length gradually increases, the prediction performance of the model decreases to a certain extent, but it can still capture the overall fluctuation trend of the load. Fig. 9 The performance of S2S-GRU trained by MC-2PF for different types of loads in minute-level prediction scenarios is demonstrated. The trained model can achieve good prediction performance when facing highly periodic or highly random load change patterns. Specifically, when facing highly periodic loads, the prediction model can capture the load change pattern very accurately. For example, when encountering sudden load peaks, such as Fig. 9At the 8000-minute moment in (b), the model can also accurately predict its changes, which helps to make early warnings or pre-allocate resources during operation. Fig. 9 As shown in (c) and (d), when faced with different types of highly random loads, the trained model can still accurately capture the load change pattern and maintain high prediction accuracy. This is because the proposed MC-2PF effectively improves the generalization ability of the model, enabling it to adaptively achieve efficient and accurate prediction of edge loads.

[0154] Finally, in order to verify the effectiveness of the designed SG filter in the edge environment, three backbone networks, BiLSTM, LSTM_S2S and GRU_S2S, were used for comparative tests under three federated learning algorithms, MC-2PF, pFedMe and FedAvg. As shown in Table 2. The experimental results show that in all cases, the performance of most models is significantly improved after adding the SG filter. For example, in MC-2PF, the performance of S2S-GRU is improved by 50% in an environment where the prediction unit is day. This shows that the SG filter plays an important role in reducing noise and smoothing data, which helps to improve the accuracy and reliability of edge load prediction. It effectively suppresses high-frequency noise and retains key low-frequency signals, so that the model can better capture the essential characteristics of the data. The key features in the data are enhanced through smoothing processing, which facilitates data pattern learning. The generalization ability of the model is improved to make it more adaptable to the complex and changeable data distribution in the edge environment.

[0155] Table 2 Ablation experiments based on SG filters in different training frameworks and various RNN-based models

[0156]

[0157] Advantages and uses of this product

[0158] A novel general framework for multi-edge collaborative load prediction based on deep learning (MC-2PF) is proposed. MC-2PF integrates multi-edge collaboration and personalized federated deep learning, and adaptively achieves efficient and accurate prediction of edge loads by addressing key issues such as high noise, high variability, insufficient data volume, and poor model generalization ability of load data. Specifically, a SG-based filter is designed to smooth the original load data, reducing noise interference and alleviating model overfitting. In particular, a new set of model control parameters is designed to solve the client drifting phenomenon caused by large data distribution differences in classical federated learning, and the effectiveness of the design is theoretically analyzed and verified. Using real-world test beds and edge load datasets, a large number of experiments verify the effectiveness and practicality of the proposed MC-2PF. The results show that the SG-based filter can promote the improvement of prediction accuracy and the reduction of computational complexity. In addition, MC-2PF can be applied to the training of a variety of advanced RNN-based load prediction models (including LSTM, GRU, BiLSTM, and S2S) and achieve efficient and accurate prediction performance. Compared with the application of single edge training framework on different RNN-based prediction models, MC-2PF shows stronger adaptability and achieves higher prediction accuracy. Compared with the advanced FedAvg, MC-2PF can also further improve the prediction accuracy under different prediction lengths and different types of loads, and reduce the number of communication rounds by 15-25%.

[0159] The process or method of using the product

[0160] (1) MC-2PF randomly selects a certain proportion of clients and distributes the generated global model and global control parameters to the selected clients.

[0161] (2) MC-2PF uses SG filter to denoise the load data in each customer.

[0162] (3) MC-2PF uses the designed model parameter update formula in the client to update the model parameters to avoid deviation in the convergence direction.

[0163] (4) MC-2PF sends the client parameters to the parameter server to update the global model and global control parameters.

[0164] The client's load prediction results are sent to the edge server for the edge computing service provider to adjust the resource management strategy.

Claims

1. A multi-edge collaborative load prediction method based on personalized federated deep learning, characterized in that: The following steps are involved: Step 1: The parameter server selects a client to participate in this round of federation aggregation and sends a work request to the client; Step 2: The selected client decides whether to participate in this round of federation aggregation based on the current state of the edge server, and returns an acceptance / rejection reply to the parameter server; Step 3: The parameter server distributes the global model w and global control parameters c to the clients participating in the federation aggregation; Step 4: The client preprocesses the historical load data on its edge server, including data cleaning, resampling, normalization, and denoising, so as to extract important representations from the original data; Step 5: Based on the global model w, global control parameter c and local control parameter c k , the client updates the local load prediction model w after several rounds of training, verification and testing k and local control parameter c k ; Step 6: The trained model can be used to predict future edge loads, which will help edge service providers develop appropriate resource scheduling plans to achieve load balancing between edge servers; Step 7: The parameter server waits for all clients participating in the federation aggregation to complete local training and upload their local models and local control parameters; Step 8: The parameter server aggregates all received local models and updates the global model, and then starts the next round of federated learning training.

2. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 1 is characterized in that: The objective function of the general framework MC-2PF for multi-edge collaborative load forecasting based on personalized federated deep learning is defined as: Among them, w k is the local model of client k.

3. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 1 is characterized in that: The MC-2PF model uses the RNN-based method as a federated client model for time series forecasting. Through data preprocessing and model training, the RNN-based method captures the temporal dependencies in the sequence and uses past observations to predict future changes. Based on historical memory and current input, the future forecast output is defined as: Among them, s t 、x t and t Represent the hidden state, input and output at time t respectively.

4. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 3 is characterized in that: The indicators used to evaluate the performance of MC-2PF include: (1) MSE is the mean square error, which is defined as: Among them, y t is the true value of the load at time t, is the load prediction value at time t, L is the prediction length; (2) MAE is the mean absolute error, which is defined as: (3)R 2 is the coefficient of determination, which reflects the fitting ability of the model and is defined as: in, R 2 The value of is in the interval [-∞,1], when R 2 The closer it is to 1, the better the model fit.

5. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 1 is characterized in that: The workflow of the MC-2PF model includes: first, the parameter server initializes the global model w, the global control parameter c and the number of clients K; each client maintains the local control parameter c k , c and c k All are initialized to 0 to ensure For each communication round, the parameter server randomly selects max(C·K,1) clients from all K clients according to the selection ratio C to participate in the federation aggregation and form a client set S, where the function max(,) is used to avoid training interruptions caused by no client being selected; then, the parameter server distributes the global model and global control parameters (w,c) to the clients in S.

6. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 5 is characterized in that: The workflow of the MC-2PF model includes: Next, the client k (k∈S) will receive (w, c) and update the local model to w k ←w; Specifically, each client obtains historical load data from the local server for local model training; these load data contain the runtime information of the edge server; the CPU usage rate, which best reflects the operating performance of the edge system, is used as the main prediction indicator; for an edge server, x t represents the CPU usage at time t. The historical load sequence of the edge server can be recorded as X = {x1, x2, ..., x n }; In the process of data preprocessing, it is replaced by taking the interval average value and compressed by resampling; it is normalized to speed up the convergence of the local model; after normalization, the original data is mapped to the interval [0,1]; it is defined as: Among them, X is the original load data; X max and X min They are the maximum and minimum CPU usage in the original load data respectively; Design a Savitzky-Golay based filter to preprocess the original load data and define a subsequence of: in, q is S q The center point, S q The length of is (2w+1), where w is half of the window length.

7. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 5 is characterized in that: The workflow of the MC-2PF model includes: Next, for S q Fit each element in : in, and x′ are the elements to be fitted and the elements after fitting, respectively; a is the fitting parameter, and γ is the degree of the polynomial; The fitting of the elements in the window is achieved by solving a γ-dimensional linear equation system; specifically, by S q The elements in form (2w+1) equations, forming a γ-dimensional linear equation system, and then the fitting parameter a can be determined by the least squares method; the proposed SG-based filter works in a sliding window manner until all load data are processed.

8. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 5 is characterized in that: The workflow of the MC-2PF model includes: Then, the pre-processed load X′ is divided into multiple batches as the local training data of the client; each client performs E rounds of local model training; the local model w k The update definition is as follows: Among them, the difference term (c w -c) to estimate the client's offset and correct the direction of local updates in time; After E rounds of local updates, the local control parameters are updated; the process is defined as: Where η is the learning rate; the local control parameter c k The update of takes into account the global control parameter c and the difference between the global model and the updated local model, denoted as (ww k ).

9. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 5 is characterized in that: The workflow of the MC-2PF model includes: after completing local training, client k uploads the updated w k and c k To the parameter server; after receiving the model updates uploaded by all clients, the parameter server will update the global model w and global control parameters c and start the next round of FL training; the process is defined as:

10. The multi-edge collaborative load prediction method based on personalized federated deep learning according to claim 1 is characterized in that: Design control parameters c and c k , estimates the convergence direction of the global model and the local model; by using c, each client obtains relevant information about the update direction of the global model and other local models during the update of its local model; as shown in formula (9), a correction term (c k -c); the movement of the local update will be corrected back to the ideal convergence direction, thereby achieving a better convergence effect; after the client completes the local model update, according to formulas (10) and (11), the local control parameter c of each client is k And the global control parameter c is updated; c k The update of estimates the convergence direction of the local model, and the update of c estimates the convergence direction of the global model, which also contains information about the update directions of all clients.

Citation Information

Patent Citations

  • Federal learning method for dynamic weight in edge scene

    CN115526333A

  • Electricity consumption personalized electricity load prediction method based on ensemble function

    CN118798320A

  • Park power load prediction method based on federated learning

    CN119150046A

  • Edge anomaly detection method based on global-personalized collaborative federated learning

    CN119202839A