Multi-period traffic prediction method based on federated learning

Through federated learning technology and the Gated cyclic unit GRU model, the problems of privacy leakage and data islands in traditional traffic prediction methods are solved, and high-precision multi-time traffic prediction is achieved, adapting to the characteristics of different regions and time periods, and enhancing the model's Adaptability and predictive ability.

CN119314328AInactive Publication Date: 2025-01-14ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411356986.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional traffic prediction methods rely on centralized data collection and processing, which has the risk of privacy leakage and data silos, and it is difficult to adapt to the differences in traffic characteristics in different regions and time periods.

Method used

Using a multi-time traffic prediction method based on federated learning, the Gated cyclic unit GRU model is trained, the model is further optimized through client local data, periodic features are used to improve prediction accuracy, and model parameters are shared between the server and client , ensure data privacy and adaptability.

Benefits of technology

It realizes that while maintaining data privacy, the model is improved to improve the adaptability of traffic characteristics of different regions and time periods, enhances prediction accuracy and generalization capabilities, and avoids data island phenomenon.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314328A_ABST
    Figure CN119314328A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-period traffic prediction method based on federated learning, and the method employs a federated learning technology to allow clients in different regions to share an intermediate result of model training while maintaining data localization, thereby achieving the sharing and optimization of knowledge. Each client divides a day into a plurality of time periods and independently processes and analyzes the data of each time period, so that the model can capture unique traffic characteristics of each time period, the adaptability of the model to the traffic characteristics of different areas and time periods is improved, and the generalization ability of the model is enhanced. According to the method, privacy protection, multi-period adaptability and collaborative optimization of global and local models can be realized, and meanwhile, the prediction precision is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic forecasting, and in particular to a multi-period traffic forecasting method based on federated learning. Background Art

[0003] Traditional traffic prediction methods often rely on centralized data collection and processing, which is not only inefficient but also poses a risk of privacy leakage. Traffic data often contains sensitive privacy information, such as personal location and driving trajectory, which may have serious impacts on individuals and society once leaked. In order to protect privacy, owners of traffic data are often reluctant to share data, which leads to the phenomenon of data silos, that is, traffic data in different regions are independent of each other and cannot be shared. Secondly, traffic data is periodic, and different traffic areas may have different characteristics. Even in the same area, traffic characteristics in different time periods may be significantly different. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides a multi-period traffic prediction method based on federated learning, which uses a trained federated global model as a pre-training model of a multi-period traffic prediction model, and the model has realized the sharing and integration of model knowledge. The model is further trained on the client using data from the same time period every day to better understand and analyze the changing patterns of traffic conditions. By making full use of the periodic characteristics of traffic data, the prediction accuracy of the model can be significantly improved. The method can protect privacy and adapt to traffic characteristics in different regions and time periods.

[0005] The specific technical solutions of the present invention are as follows:

[0006] A multi-period traffic prediction method based on federated learning includes a server and multiple clients; the server and each client deploy a gated recurrent unit GRU; the multi-period traffic prediction method includes the following steps:

[0007] S1: The server initializes the parameters of the gated recurrent unit GRU and sends them to each of the clients;

[0008]

[0009] in, represents the local model parameters of N clients at time t, Represents the global model parameters of the server at time t;

[0010] S2: Local model training: Each client uses its own traffic data set to train the gated recurrent unit GRU. After the training is completed, the client sends the updated local model parameters back to the server. The server calculates the average value of the model parameters of all clients to update the global model parameters, and sends the updated model parameters to each client again;

[0011] S3: Each of the clients continues to retrain the gated recurrent unit GRU using its own traffic data set, and sends the updated local model parameters back to the server;

[0012] S4: Repeat steps S2 and S3 until the model converges, obtain the global model parameters of the gated recurrent unit GRU that has completed the first training, and send the global model parameters to each client;

[0013] S5: Each of the clients divides its own traffic data set into traffic data of multiple different time periods, and further trains the gated recurrent unit GRU based on the global model parameters using the traffic data of different time periods to obtain local model parameters for multiple time periods;

[0014] S6: Use local multi-period model parameters to make traffic predictions for multiple future periods.

[0015] Furthermore, the client divides its own traffic data set into traffic data of multiple different time periods according to corresponding time periods of each day, with each four hours being a time period.

[0016] Furthermore, the traffic data set includes traffic speed, time information and spatial information.

[0017] Furthermore, when training the gated recurrent unit GRU, the loss function is minimized by using the Adam algorithm.

[0018] Furthermore, the loss function is mean square error (MSE).

[0019] A multi-period traffic prediction system based on federated learning, the system comprises a server and multiple clients; the server and each client are deployed with a gated recurrent unit (GRU); the system is used to implement a multi-period traffic prediction method based on federated learning.

[0020] The beneficial effects of the present invention are as follows:

[0021] (1) The present invention utilizes federated learning technology to allow clients in different regions to share intermediate results of model training while maintaining data localization, thereby achieving knowledge sharing and optimization.

[0022] (2) By dividing a day into multiple time periods and processing and analyzing the data of each time period separately, the model can capture the unique traffic characteristics of each time period, thereby improving the adaptability of the model to the traffic characteristics of different regions and time periods, enhancing the generalization ability of the model, and improving the prediction accuracy of the model. This method can protect privacy and adapt to the traffic characteristics of different regions and time periods. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a framework diagram of the multi-period traffic prediction method based on federated learning of the present invention.

[0024] Figure 2 This is a model diagram of the multi-period traffic prediction method based on federated learning of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be described in detail below based on the accompanying drawings and preferred embodiments, and the purpose and effects of the present invention will become more clear. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0026] The multi-period traffic prediction method based on federated learning of the present invention uses the method of federated learning to realize knowledge sharing and integration, makes full use of the periodic characteristics of traffic data, and can improve the prediction accuracy of the model. The method can protect privacy and adapt to traffic characteristics in different regions and time periods.

[0027] like Figure 1 As shown, the multi-period traffic prediction method based on federated learning in this embodiment includes a server and multiple clients; the server and each client deploy a gated recurrent unit GRU, and the method specifically includes the following steps:

[0028] Step 1: The server initializes the parameters of the gated recurrent unit GRU, randomly generates initial parameters, and sends them to each client;

[0029]

[0030] in, represents the local model parameters of N clients at time t, Represents the global model parameters of the server at time t.

[0031] Step 2: Local model training: Figure 2As shown in the figure, each client uses its own traffic data set to train the gated recurrent unit GRU. After the training is completed, the client sends the updated local model parameters back to the server. The server calculates the average value of the model parameters of all clients to update the global model parameters, and sends the updated model parameters to each client again. Each client's own traffic data set may contain a variety of traffic-related data such as traffic speed, time information, and spatial information. During the training process, the client will adjust the model parameters according to the characteristics of its data in order to obtain the best local model performance. The server calculates the average value of the model parameters of all clients, thereby effectively balancing the data differences between different clients, realizing the sharing and fusion of model knowledge, and improving the generalization ability of the global model.

[0032] Step 3: Each client continues to train the gated recurrent unit GRU with its own traffic dataset and sends the updated local model parameters back to the server.

[0033] Step 4: Repeat steps 2 and 3 until the model converges, obtain the global model parameters of the gated recurrent unit GRU that has completed the first training, and send the global model parameters to each client.

[0034] Step 5: Each client divides its own traffic data set into traffic data of multiple different time periods, and uses the traffic data of different time periods to further train the gated recurrent unit GRU based on the global model parameters to obtain local multiple time period model parameters.

[0035] Each client divides its own traffic data set into a period of four hours, and divides it into traffic data of multiple different time periods. In addition, when training the gated recurrent unit GRU, the Adam algorithm is used to minimize the loss function, and the loss function uses the mean square error MSE.

[0036] Step 6: Use local multi-period model parameters to make traffic forecasts for multiple time periods in the future.

[0037] On the other hand, an embodiment of the present invention also provides a multi-period traffic prediction system based on federated learning, which includes a server and multiple clients. The server and each client are deployed with a gated recurrent unit GRU to implement a multi-period traffic prediction method based on federated learning.

[0038] The following is an experiment combining traffic data to illustrate the superiority of the method of the present invention. The experiment used the METR-LA dataset. The METR-LA dataset records the traffic speed information of 207 loop detectors on Los Angeles County highways. The recording time is from March 1, 2012 to June 30, 2012, and the data points are sampled every 5 minutes. In order to ensure the consistency and comparability of the data, we use the Z-score method to process the data. In the experiment of traffic speed prediction, we use the data of the past 12 time steps (i.e. 60 minutes) to predict the speed of the next 3 time steps (i.e. 15 minutes). This setting can capture short-term traffic trends and changes, thereby improving the accuracy of the prediction.

[0039] In this embodiment, each client divides its own traffic data set into K time periods according to the corresponding time periods of each day, and in this embodiment, K = 6. The traffic data of different time periods are used to further train the gated recurrent unit GRU based on the global model parameters to obtain local multiple time period model parameters.

[0040] For comparison, the client local model is also used to predict traffic flow, and the results are shown in Table 1.

[0041] Table 1 Traffic prediction experimental results

[0042] method RMSE R^2 Client local training 7.0621 0.8570 Multi-period traffic prediction method based on federated learning 6.9630 0.8613

[0043] From the results shown in Table 1, it can be seen that the multi-period traffic prediction method based on federated learning of the present invention has higher prediction accuracy. In addition, the method of the present invention can capture the unique traffic characteristics of each period while allowing clients in different regions to maintain data localization, thereby improving the adaptability of the model to traffic characteristics of different regions and time periods and enhancing the generalization ability of the model.

[0044] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention shall be included in the protection scope of the invention.

Claims

1. A multi-period traffic prediction method based on federated learning, characterized in that: Including server side and multiple clients; The server and each client are deployed with a gated recurrent unit GRU; The multi-period traffic prediction method The following steps are involved: S1: The server initializes the parameters of the gated recurrent neural network GRU and sends them to each of the clients; in, represents the local model parameters of N clients at time t, Represents the global model parameters of the server at time t; S2: Local model training: Each client uses its own traffic data set to train the gated recurrent unit GRU. After the training is completed, the client sends the updated local model parameters back to the server. The server calculates the average value of the model parameters of all clients to update the global model parameters, and sends the updated model parameters to each client again; S3: Each of the clients continues to retrain the gated recurrent unit GRU using its own traffic data set, and sends the updated local model parameters back to the server; S4: Repeat steps S2 and S3 until the model converges, obtain the global model parameters of the gated recurrent unit GRU that has completed the first training, and send the global model parameters to each client; S5: Each of the clients divides its own traffic data set into traffic data of multiple different time periods, and further trains the gated recurrent unit GRU based on the global model parameters using the traffic data of different time periods to obtain local model parameters for multiple time periods; S6: Use local multi-period model parameters to make traffic predictions for multiple future periods.

2. The multi-period traffic prediction method based on federated learning according to claim 1 is characterized in that: The client divides its own traffic data set into traffic data of multiple different time periods according to corresponding time periods of each day, with each four hours being a time period.

3. The multi-period traffic prediction method based on federated learning according to claim 1 is characterized in that: The traffic data set includes traffic speed, time information and spatial information.

4. The multi-period traffic prediction method based on federated learning according to claim 1 is characterized in that: When training the gated recurrent unit GRU, the loss function is minimized by the Adam algorithm.

5. The multi-period traffic prediction method based on federated learning according to claim 4 is characterized in that: The loss function is the mean square error MSE.

6. A multi-period traffic prediction system based on federated learning, characterized in that: The system includes a server and multiple clients; the server and each client are deployed with a gated recurrent unit GRU; the system is used to implement the multi-period traffic prediction method based on federated learning as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Time-phased multi-parameter short-term traffic flow prediction method based on time-space characteristics

    CN105513350A

  • Traffic flow prediction method based on federated learning

    CN114881371A

  • Traffic flow prediction method and system based on federated learning, and medium

    CN115909746A

  • Road traffic flow estimation method and device, electronic equipment and storage medium

    CN116416804A