Traffic prediction method, device and equipment and computer readable storage medium

By performing similarity analysis and optimization on the model parameters of multiple clients, the problem of high computation and communication costs for high-dimensional and sparse graphical data in federated learning systems is solved, achieving efficient communication and accuracy for traffic prediction models.

CN114139782BActive Publication Date: 2026-04-28SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2021-11-19
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing federated learning systems based on graph neural networks suffer from high computational and communication costs in traffic prediction, especially when dealing with high-dimensional and sparse graph structure data, which leads to increased communication and storage requirements.

Method used

By acquiring model parameters from multiple clients, similarity analysis and clustering are performed to divide the model parameters into corresponding clusters, and the parameters in the clusters are optimized to reduce communication overhead.

Benefits of technology

Through similarity analysis and optimization, the communication overhead of traffic prediction model update transmission is reduced, and the computational efficiency and model accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139782B_ABST
    Figure CN114139782B_ABST
Patent Text Reader

Abstract

The application discloses a traffic prediction method, device and equipment and a computer readable storage medium. The traffic prediction method comprises the following steps: acquiring a plurality of model parameters sent by a plurality of clients, performing similarity analysis on the plurality of model parameters, dividing the plurality of model parameters into corresponding clusters, optimizing the model parameters in the clusters, determining the optimized model parameters in the clusters, sending the optimized model parameters to a server, receiving a traffic prediction model established by the server according to the optimized model parameters, acquiring traffic data to be analyzed, and substituting the traffic data to be analyzed into the traffic prediction model to obtain a traffic prediction result. The application can reduce the communication overhead of traffic prediction model update transmission by acquiring and analyzing the optimized model parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a traffic prediction method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] In the era of big data, people's travel experience greatly benefits from real-time and accurate traffic conditions, which requires calculations based on massive amounts of traffic record data. To achieve higher accuracy, data-driven methods, such as machine learning (ML) and deep learning (DL), have become the preferred choice for traffic prediction tasks. Among various data-driven methods, graph neural network (GNN)-based methods are widely recognized as the most advanced, as they are well-suited for extracting spatial features of traffic networks, contributing to their successful application in traffic prediction.

[0003] Traditional GNN-based model training is centralized, which raises significant privacy concerns when multiple data providers are involved. Federated learning (FL) emerged to address the privacy issues associated with centralized training. Federated learning's distributed training eliminates the need for raw data transfer; data providers only need to store and train data locally, thus protecting their privacy.

[0004] While most optimization methods for graph-based systems are developed and evaluated using traditional machine learning (ML / DL) models, it's not surprising to extend FL to GNN-based models. However, much research on GNNs and FL has highlighted a practical problem. Specifically, for FL, most FL systems employ an averaging algorithm (i.e., FedAvg) to develop a global model, requiring multiple participants to upload their local models to a central server. This significantly increases the network communication costs and storage requirements of the central server. Compared to traditional DNN models that handle regular grid-like data, GNNs are computationally more difficult to process and require more parameters for high-dimensional and sparse graph-structured data. Therefore, adopting a GNN-based model would substantially increase the overall computational and communication costs of the FL system. Summary of the Invention

[0005] This invention aims to address at least one of the technical problems existing in the prior art. To this end, this invention proposes a traffic prediction method that can reduce the communication overhead of model update transmission.

[0006] This invention also proposes a traffic prediction method.

[0007] The present invention also proposes a traffic prediction device.

[0008] The present invention also proposes a traffic prediction device.

[0009] The present invention also proposes a computer-readable storage medium.

[0010] In a first aspect, one embodiment of the present invention provides a traffic prediction method, comprising:

[0011] Retrieve multiple model parameters sent by multiple clients;

[0012] Similarity analysis is performed on the multiple model parameters to divide them into corresponding clusters;

[0013] The model parameters in the cluster are optimized to determine the optimized model parameters for the cluster.

[0014] The optimized model parameters are sent to the server to receive the traffic prediction model built by the server based on the optimized model parameters;

[0015] Obtain traffic data to be analyzed, and substitute the traffic data into the traffic prediction model to obtain traffic prediction results.

[0016] The traffic prediction method of this invention has at least the following beneficial effects: First, by acquiring data information sent by multiple users and stored on the client, multiple model parameters can be obtained. Then, similarity analysis is performed on the multiple model parameters, and the multiple model parameters are clustered according to the similarity analysis results, dividing the multiple model parameters into corresponding clusters. Second, the model parameters in the clusters are optimized to determine the optimized model parameters in the clusters. Then, the optimized model parameters are sent to the server, and the traffic prediction model built by the server based on the optimized model parameters is received. Finally, by acquiring traffic data to be analyzed and substituting the data into the traffic prediction model, traffic prediction results can be obtained, and the optimized model parameters can be obtained for analysis and prediction, which can reduce the communication overhead of updating and transmitting the traffic prediction model.

[0017] According to other embodiments of the traffic prediction method of the present invention, the step of performing similarity analysis on the plurality of model parameters to divide the plurality of model parameters into corresponding clusters includes:

[0018] The multiple model parameters are subjected to similarity analysis using a clustering algorithm to divide the multiple model parameters into corresponding clusters.

[0019] According to other embodiments of the traffic prediction method of the present invention, the step of performing similarity analysis on the plurality of model parameters using a clustering algorithm to divide the plurality of model parameters into corresponding clusters includes:

[0020] The multiple model parameters are dimensionality reduced to obtain multiple low-dimensional parameters;

[0021] Similarity calculations are performed on the multiple low-dimensional parameters to obtain the similarity of the multiple parameters;

[0022] The model parameters are divided into corresponding clusters based on the parameter similarity of the model parameters.

[0023] According to other embodiments of the traffic prediction method of the present invention, the step of dimensionality reduction processing of the plurality of model parameters to obtain low-dimensional parameters includes:

[0024] The multiple model parameters are subjected to dimensionality reduction using principal component analysis to obtain the low-dimensional parameters.

[0025] According to other embodiments of the traffic prediction method of the present invention, the step of optimizing the model parameters in the cluster to determine the optimized model parameters in the cluster includes:

[0026] The model parameters in the cluster are initially optimized to obtain the first optimized parameters;

[0027] The first optimization parameter is then further optimized to obtain the second optimization parameter;

[0028] Obtain the fitness value of the second optimization parameter, and use the second optimization parameter with the smallest fitness value as the optimization model parameter.

[0029] According to other embodiments of the traffic prediction method of the present invention, the preliminary optimization of the model parameters in the cluster to obtain first optimized parameters includes:

[0030] The particle swarm optimization algorithm is used to perform preliminary optimization on the model parameters in the cluster to obtain the first optimized parameters.

[0031] According to other embodiments of the traffic prediction method of the present invention, the step of performing secondary optimization on the first optimization parameter to obtain the second optimization parameter includes:

[0032] The first optimization parameter is optimized a second time using the gradient descent method to obtain the second optimization parameter.

[0033] Secondly, one embodiment of the present invention provides a traffic prediction device comprising:

[0034] The acquisition module is used to acquire multiple model parameters sent by multiple clients;

[0035] The analysis module is used to perform similarity analysis on the multiple model parameters in order to divide the multiple model parameters into corresponding clusters;

[0036] An optimization module is used to optimize the model parameters in the cluster in order to determine the optimized model parameters in the cluster.

[0037] The sending and receiving module is used to send the optimized model parameters to the server and receive the traffic prediction model established by the server based on the optimized model parameters.

[0038] The traffic prediction module is used to acquire traffic data to be analyzed and to substitute the traffic data into the traffic prediction model to obtain the traffic prediction result.

[0039] The traffic prediction device of this invention has at least the following beneficial effects: First, the acquisition module obtains multiple model parameters by acquiring data information sent by multiple users and stored on the client. Then, the acquisition module transmits the multiple model parameters to the analysis module, which performs similarity analysis on the multiple model parameters and clusters them according to the similarity analysis results, classifying the multiple model parameters into corresponding clusters. Second, the analysis module transmits the clusters to the optimization module, which optimizes the model parameters in the cluster to determine the optimized model parameters. Then, the optimization module transmits the optimized model parameters to the sending and receiving module, which sends the optimized model parameters to the server and receives the traffic prediction model established by the server based on the optimized model parameters. Finally, the traffic prediction module obtains traffic prediction results by acquiring traffic data to be analyzed and substituting the data into the traffic prediction model. By acquiring optimized model parameters for analysis and prediction, the communication overhead of updating and transmitting the traffic prediction model can be reduced.

[0040] Thirdly, one embodiment of the present invention provides a traffic prediction device, comprising:

[0041] At least one processor, and,

[0042] A memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the traffic prediction method as described in the first aspect.

[0044] Fourthly, one embodiment of the present invention provides a computer-readable storage medium, comprising: the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the traffic prediction method as described in the first aspect.

[0045] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description

[0046] Figure 1 This is a schematic flowchart of a specific embodiment of the traffic prediction method in this invention;

[0047] Figure 2 yes Figure 1 A schematic diagram of a specific embodiment of step S200;

[0048] Figure 3 yes Figure 2 A schematic diagram of a specific embodiment of step S210;

[0049] Figure 4 yes Figure 3 A schematic flowchart of a specific embodiment of step S211;

[0050] Figure 5 yes Figure 1 A schematic diagram of a specific embodiment of step S300;

[0051] Figure 6 yes Figure 5 A schematic flowchart of a specific embodiment of step S310;

[0052] Figure 7 yes Figure 5 A schematic flowchart of a specific embodiment of step S320;

[0053] Figure 8 This is a block diagram of a specific embodiment of the traffic prediction device in this invention. Attached image description:

[0055] The module includes: acquisition module 100, analysis module 200, optimization module 300, sending and receiving module 400, and traffic prediction module 500. Detailed Implementation

[0056] The following will describe the concept and technical effects of the present invention clearly and completely with reference to embodiments, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention.

[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0058] It should be noted that although the system diagram shows functional modules and the flowchart shows the logical order, in some cases, the steps shown or described may be executed in a different order than the module division in the system or the order in the flowchart.

[0059] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0060] First, let's analyze some of the terms used in this application:

[0061] Internet of Things (IoT) sensors, acting as the nerve endings of the IoT, are the core components for humanity's comprehensive perception of nature. The large-scale deployment and application of various sensors are indispensable basic conditions for the formation of the IoT. To obtain information from the outside world, people must rely on their sensory organs. However, relying solely on our own sensory organs is far from sufficient for studying natural phenomena and laws, as well as for production activities. To adapt to this situation, IoT sensors are needed.

[0062] Global optimization is a branch of applied mathematics and numerical analysis that attempts to find the minimum or maximum value of a function on a given set. It is often described as a minimization problem because the maximization of a real-valued function can be deduced by analogy from the minimization method.

[0063] In quantitative forecasting, the most crucial task is establishing a predictive mathematical model. A predictive model is a mathematically descriptive formula used for forecasting, describing the quantitative relationships between things. It reveals, to a certain extent, the inherent regularities between things and serves as the direct basis for calculating predicted values. Therefore, it has a significant impact on the accuracy of forecasts. Every specific forecasting method is characterized by its specific mathematical model. There are many types of forecasting methods, each with its corresponding predictive model.

[0064] Cluster analysis, also known as group analysis, is a statistical analysis method used to study problems such as sample or indicator classification, and it is also an important algorithm in data mining. Cluster analysis consists of several patterns, typically a vector of metrics or a point in a multidimensional space. Cluster analysis is based on similarity; patterns within a cluster are more similar than patterns in different clusters.

[0065] The K-means clustering algorithm is an iterative clustering analysis algorithm. Its steps are as follows: First, the data is pre-divided into K groups. Then, K objects are randomly selected as initial cluster centers. Next, the distance between each object and each seed cluster center is calculated, and each object is assigned to the nearest cluster center. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster centers are recalculated based on the existing objects in the cluster. This process is repeated until a termination condition is met. The termination condition may be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers change, or the sum of squared errors reaches a local minimum.

[0066] GNN, or Graph Neural Network, is a type of neural network that operates directly on a graph structure. A typical application of GNN is node classification. Essentially, each node in the graph is associated with a label, and we want to predict the label of unlabeled nodes.

[0067] Principal component analysis is a statistical method that uses orthogonal transformations to convert a set of potentially correlated variables into a set of linearly uncorrelated variables; this transformed set of variables is called the principal components.

[0068] FedAvg, or Federated Average, is essentially about averaging the weights trained by each user. The weight of each weight varies depending on the number of samples the user has.

[0069] Particle swarm optimization, also known as particle swarm optimization, is an evolutionary computation technique derived from the simulation of a simplified social model.

[0070] Gradient descent is a first-order optimization algorithm. To find a local minimum of a function using gradient descent, it is necessary to iteratively search towards points at a predetermined step distance in the opposite direction of the gradient corresponding to the current point or the approximate gradient.

[0071] Reference Figure 1 The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, steps S100 to S500.

[0072] Step S100: Obtain multiple model parameters sent by multiple clients;

[0073] Data is collected through a large number of IoT sensors, which then send the collected data to clients. The clients then upload model parameters to the server. Therefore, by acquiring data from multiple clients, multiple corresponding model parameters can be obtained.

[0074] It should be noted that this application does not specifically limit the number of multiple clients and the corresponding number of model parameters, and one client can obtain one model parameter.

[0075] Step S200: Perform similarity analysis on multiple model parameters to divide the multiple model parameters into corresponding clusters;

[0076] In step S200, a similarity analysis is performed on multiple model parameters, and a preset similarity value is used to limit the range of similarity. Furthermore, by performing similarity analysis between two model parameters, similar model parameters are identified, and then these similar model parameters are clustered. Finally, the model parameters are assigned to their corresponding clusters, where the similarity value is a threshold used to determine whether two model parameters are similar.

[0077] It should be noted that each similarity analysis is performed between two model parameters, and then for each model parameter individually. Based on the similarity analysis results, it can be determined whether one model parameter is similar to another, and these two model parameters are grouped into the same cluster. Each cluster contains multiple model parameters. Since the model parameters in a cluster are obtained based on similarity values, the range between different clusters is also limited by the similarity values.

[0078] Step S300: Optimize the model parameters in the cluster to determine the optimized model parameters in the cluster;

[0079] In step S300, all model parameters of each cluster are optimized. Optimizing all model parameters of all clusters can achieve global optimization, and the optimized model parameters of each cluster can be obtained.

[0080] Step S400: Send the optimized model parameters to the server to receive the traffic prediction model built by the server based on the optimized model parameters;

[0081] In step S400, the optimized model parameters are sent to the server, and the traffic prediction model established by the server is received. The server learns and trains based on all the received optimized model parameters to construct the traffic prediction model.

[0082] Step S500: Obtain traffic data to be analyzed, and substitute the traffic data to be analyzed into the traffic prediction model to obtain traffic prediction results.

[0083] In step S500, the traffic data to be analyzed is first obtained, and then the traffic data to be analyzed is substituted into the traffic prediction model received from the server. The traffic prediction model performs prediction calculations based on the traffic data to be analyzed to obtain the traffic prediction results.

[0084] First, multiple model parameters collected and uploaded by IoT sensors to multiple clients are acquired. Then, similarity analysis is performed on these model parameters, and they are grouped into corresponding clusters based on the analysis results. Next, each model parameter in each cluster is optimized to obtain optimized model parameters. Then, the optimized model parameters are sent to a server, which builds a traffic prediction model based on these parameters. Finally, by substituting the acquired traffic data to be analyzed into the traffic prediction model for prediction calculations, the traffic prediction results are obtained.

[0085] It should be noted that we can represent the entire transportation network as an undirected graph G = (V, ε, A) with undirected edges, where V is the set of nodes, each node is defined as a road segment, ε is the set of edges, and A ∈ A |V|*|V| It is the adjacency matrix of G. For any v i v j ∈V, if v i and v j If the two road segments are connected, then we can represent it as [A] ij ] = 1, otherwise it is represented as [A ij ] = 0, where [A ij ] is an entry for A, used to represent node v. i and v j The connections between nodes.

[0086] Traffic data information on a traffic network G can be represented as a feature matrix X∈A within the graph region. |V|*F , where F is the dimension of the participating feature of each node. Let vector X t ∈A |V| This represents the traffic flow data acquired at time t∈F, and the traffic flow data is used to train and learn a traffic prediction model. We treat the traffic prediction model as a predictor f(.). Given historical traffic observation data at T time intervals (i.e., a historical time interval of T), this predictor can predict the traffic forecast for the entire map over the next s timestamps (i.e., a prediction time interval of s). The traffic prediction result can be represented as X. t+1 X t+2 , ..., X t+s .

[0087] Specifically, we define the transportation network G as a transformation diagram of the entire transportation network of a region. Multiple organizations are set up throughout the region for divide-and-conquer operations. Each organization refers to a small part of the entire region. Let C = {C1, C2, ..., C...} M Let M be the set of organizations, where M is the number of organizations. Each organization manages a certain number of sensor stations, which collect traffic data.

[0088] To enable each organization to fully leverage spatial correlations, each organization has free access to the complete topological information of G; however, for privacy reasons, traffic data between organizations is not transmitted to other participating organizations. Furthermore, no two organizations share a jointly managed sensor station. The central server distributes copies of the adopted GNN-based model to each organization. These organizations treat the received model as a local model and train it using the stored training data and topological structure.

[0089] Reference Figure 2 The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, step S210.

[0090] Step S210: Perform similarity analysis on multiple model parameters using a clustering algorithm to divide the multiple model parameters into corresponding clusters.

[0091] In step S210, multiple model parameters are clustered, similarity analysis is performed using a clustering algorithm, and all model parameters are clustered separately based on the similarity analysis results. Furthermore, multiple model parameters that are clustered together are assigned to the same corresponding cluster to obtain multiple clusters.

[0092] It should be noted that the clustering algorithm can use the K-means clustering algorithm. First, k organizations are arbitrarily selected as initial cluster centers from n model parameters. For the remaining organizations, they are assigned to the cluster set represented by the most similar cluster center based on their similarity to these cluster centers, i.e., the distance value obtained from similarity analysis. Finally, the cluster center of each newly obtained cluster is calculated, which is the mean of all organizations in each cluster. This process is repeated until the standard measure function begins to converge, resulting in multiple corresponding clusters.

[0093] Reference Figure 3 The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, steps S211 to S213.

[0094] Step S211: Perform dimensionality reduction on multiple model parameters to obtain multiple low-dimensional parameters;

[0095] In step S211, perform dimensionality reduction on multiple model parameters, convert the high-dimensional parameters of the model parameters into low-dimensional parameters, and obtain multiple low-dimensional parameters.

[0096] It should be noted that dimension is a concept relative to the sample size. The model parameters based on GNN have high-dimensional characteristics, and the model parameters are limited. In the case of limited model parameters, the distance between high-dimensional model parameters will be very small. Conducting similarity analysis on high-dimensional model parameters will make many model parameters have similarity, resulting in too many model parameters being clustered into one cluster. Therefore, dimensionality reduction processing can better perform partitioning and clustering.

[0097] Step S212: Calculate the similarity of multiple low-dimensional parameters to obtain multiple parameter similarities;

[0098] In step S212, calculate the similarity of each low-dimensional parameter. By calculating pairwise between each low-dimensional parameter vector, the distance value between two low-dimensional parameter vectors can be calculated, and multiple parameter similarities can be obtained.

[0099] It should be noted that according to the K-means algorithm, given a cluster number k << M, randomly select k organizations as the initial cluster centers. For each organization, we calculate the parameter similarity between the model parameter vector of the organization and the parameter vector of the cluster center one by one. In particular, for any two organizations C i and C j , for the low-dimensional parameter vectors A i and A j of organizations C i and C j , the distance between them can be calculated by the formula: sim i,j = sim(A i , A j ) = [Σ d l=1 (A i [l] - A j [l]) 2 1 / 2 , where d is the dimension of vector A, l is the index number, and the distance value between the low-dimensional parameter vectors A i and A j of organizations C i and C j is the parameter similarity.

[0100] Step S213: Partition the model parameters into corresponding clusters according to the parameter similarity of the model parameters.​

[0101] In step S213, by comparing the similarity between the model parameters and the parameters of each clustering center, the cluster most similar to the model parameters can be obtained, and then the model parameters are classified into the corresponding cluster.

[0102] It should be noted that the organization is assigned to the cluster with the highest parameter similarity, and this optimization process is repeated until the best cluster assignment scheme is found, that is, the cluster assigned to each organization no longer changes.

[0103] First, the multiple model parameters are dimensionally reduced, converted from high-dimensional parameters to low-dimensional parameters, and multiple low-dimensional parameters are obtained. Then, by calculating the similarity between each pair of low-dimensional parameter vectors, the distance value between two low-dimensional parameter vectors is calculated, and multiple parameter similarities can be obtained. Finally, by comparing the parameter similarities, the cluster most similar to each model parameter can be obtained, and the model parameters are classified into the corresponding most similar cluster.

[0104] Refer to Figure 4 , which shows the schematic flow diagram of the traffic prediction method in the embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes but is not limited to step S2111.

[0105] Step S2111, the multiple model parameters are dimensionally reduced by using the principal component analysis algorithm to obtain low-dimensional parameters.

[0106] Perform principal component analysis on each model parameter. By extracting the principal components of each model parameter, the dimensional reduction of the model parameters is achieved, and low-dimensional parameters are obtained according to the principal components.

[0107] It should be noted that the principal component analysis (PCA) is used to reduce the dimension of the model parameters, and the local models of each organization are pre-trained. For organization C i and its data X i ∈A |V|*F , we randomly sample from the time series window and use a part of its historical data, X * i ∈A |V|*F is the sampled data set that satisfies F * <<F. Subsequently, X * i is used to train the local model, and the model parameters θ * i we regard as the pre-learned model parameters. Regarding the model parameters θ * i as the high-dimensional vector θ h i , we use PCA to project the high-dimensional to the low-dimensional space: Ai =PCA Σσ*σ (θ h i A i These are the lower-dimensional parameters after dimensionality reduction. PCA(.) represents the PCA process, and Σσ*σ is the total variance of all individual principal components. Σσ*σ can also be expressed as Σσ 2 The default setting can be Σσ 2 =0.9 to avoid information loss.

[0108] Reference Figure 5 The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, steps S310 to S330.

[0109] Step S310: Perform preliminary optimization on the model parameters in the cluster to obtain the first optimized parameters;

[0110] In step S310, each model parameter in the cluster is initially optimized by calculating the corresponding formula. After the initial optimization, a first optimized parameter can be obtained for each model parameter.

[0111] Step S320: Perform secondary optimization on the first optimization parameters to obtain the second optimization parameters;

[0112] In step S320, the model parameters are optimized again by calculating the corresponding formula, that is, each first optimization parameter is optimized twice. After the second optimization, a second optimization parameter can be obtained for each first optimization parameter.

[0113] Step S330: Obtain the fitness value of the second optimization parameter, and use the second optimization parameter with the minimum fitness value as the optimization model parameter.

[0114] In step S330, multiple second optimization parameters are randomly sampled, and a fitness value can be obtained based on the prediction performance of the second optimization parameters. Then, by comparing each fitness value pairwise, the minimum fitness value can be obtained, and the second optimization parameter corresponding to the minimum fitness value is used as the optimization model parameter.

[0115] First, each model parameter in the cluster is initially optimized using a formula to obtain the corresponding first optimized parameter. Then, the first optimized parameter is further optimized using a formula to obtain the corresponding second optimized parameter. Finally, the second optimized parameter is randomly sampled and its prediction performance is obtained. Based on the prediction performance, a fitness value is obtained, and the optimized model parameters are then derived based on the fitness value.

[0116] It should be noted that, in order to find the optimal model parameters, we introduced a fitness value into the organization. This value is obtained from the prediction performance of the two-step optimized model parameters on a randomly sampled dataset, and its performance is measured by the mean absolute percentage error (MAPE), where MAPE = 1 / n[Σ n i=1 |(x i -x` i ) / x i |*100%], where x i To observe traffic speed, x` i The predicted traffic speed is used. After receiving all fit values ​​from the customer, the cluster server performs a fit evaluation, finds the minimum fit value, and identifies the most fit organization. Subsequently, the cluster server requests its model parameters to be uploaded to the central server via a token, while simultaneously storing a temporary copy, denoted as cb. * j .

[0117] Based on the divide-and-conquer strategy of federated learning, which is based on cluster hierarchies and two-step optimization, a system with θ is first established for different clusters through fitness evaluation. j best The subglobal model. Therefore, we can directly choose to develop the model parameters with the minimum fit as the subglobal parameters, instead of aggregating all model parameters. From a communication optimization perspective, in this case, only one client needs to upload the model parameters, which obviously reduces the overall communication cost. Then, we aggregate the subglobal models from different clusters to the central server and use FedAvg to update the global model: θ global =1 / k(Σ j∈k θ j best ), where θ global This indicates the update of model parameters for the global model.

[0118] Instead of directly assigning the global model to the organization from the central server, the cluster servers distribute the previously stored CB (Central Business Model) data. * j and the received global model θ global To average, i.e.: cb j =1 / 2(cb) * j +θ global Then, the cluster server sends the updated data to the included organizations for the next local model optimization iteration. In this way, we send global updates and the optimal model parameters for the cluster to the organizations.

[0119] Reference Figure 6The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, step S311.

[0120] Step S311: The particle swarm optimization algorithm is used to perform preliminary optimization on the model parameters in the cluster to obtain the first optimized parameters.

[0121] In step S311, the particle swarm optimization algorithm is used to iteratively optimize the model parameters in the cluster, thereby performing preliminary optimization of the model parameters and obtaining the first optimized parameters.

[0122] It should be noted that the particle swarm optimization algorithm is as follows:

[0123] θ pso i,j =ω*v τ i,j +U(0, Φ1)*(pb i,j -v τ i,j )+U(0,Φ2)*(cb i,j -v τ i,j ).

[0124] Among them, v τ+1 i,j =θ τ i,j +v τ+1 i,j ,pb i,j =θ τ+1 i,j , i, j represent the i-th customer in the j-th cluster; τ represents the τ-th iteration; ω represents the inertia constant; v τ i,j v represents the position of the particle during iteration. τ+1 i,j cb represents the velocity during iteration τ. i,j Representative cluster P j The "cluster optimality" is achieved by using U(0, Φ1) and U(0, Φ2) to represent two random value vectors uniformly sampled from [0, Φ1] and [0, Φ2], respectively. These vectors are initialized for each particle in each iteration. After particle swarm optimization, the model parameters can be used to obtain the first optimal parameter θ. pso i,j .

[0125] Reference Figure 7 The diagram illustrates a flowchart of the traffic prediction method in an embodiment of the present invention. This embodiment discloses a traffic prediction method, which specifically includes, but is not limited to, step S321.

[0126] Step S321: Use gradient descent to perform secondary optimization on the first optimization parameters to obtain the second optimization parameters.

[0127] In step S321, the gradient descent method is used to iteratively optimize the first optimization parameter, thereby performing a second optimization to obtain the second optimization parameter.

[0128] It should be noted that the gradient descent method is as follows: Where, θ gd i,j To represent customer C i,j The second optimization parameter of the model parameters.

[0129] Reference Figure 8 Another embodiment of the present invention discloses a traffic prediction device, which includes: an acquisition module 100, an analysis module 200, an optimization module 300, a sending and receiving module 400, and a traffic prediction module 500. The acquisition module 100, analysis module 200, optimization module 300, sending and receiving module 400, and traffic prediction module 500 are all communicatively connected. The acquisition module 100 is used to acquire multiple model parameters sent by multiple clients; the analysis module 200 is used to perform similarity analysis on the multiple model parameters to divide them into corresponding clusters; the optimization module 300 is used to optimize the model parameters in the clusters to determine the optimized model parameters in the clusters; the sending and receiving module 400 is used to send the optimized model parameters to a server to receive a traffic prediction model established by the server based on the optimized model parameters; and the traffic prediction module 500 is used to acquire traffic data to be analyzed and substitute the traffic data into the traffic prediction model to obtain traffic prediction results.

[0130] First, the acquisition module 100 obtains multiple model parameters by acquiring data sent and stored on the client by multiple users. Then, the acquisition module 100 transmits these model parameters to the analysis module 200, which performs similarity analysis on the parameters and clusters them according to the results. Next, the analysis module 200 transmits the clusters to the optimization module 300, which optimizes the model parameters within each cluster to determine the optimal parameters. Then, the optimization module 300 transmits the optimized model parameters to the sending and receiving module 400, which sends them to the server and receives the traffic prediction model built by the server based on the optimized parameters. Finally, the traffic prediction module 500 obtains traffic prediction results by acquiring the traffic data to be analyzed and substituting it into the traffic prediction model. By using optimized model parameters for analysis and prediction, the communication overhead of updating and transmitting the traffic prediction model can be reduced.

[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] Those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, AAM, AOM, EEPAOM, flash memory or other memory technologies, CD-AOM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0133] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.

Claims

1. A traffic prediction method, characterized in that, include: Retrieve multiple model parameters sent by multiple clients; The multiple model parameters are dimensionality-reduced to obtain multiple low-dimensional parameters; Similarity calculations are performed on the multiple low-dimensional parameters to obtain multiple parameter similarities; wherein, the parameter similarity is the distance value between the vectors of two of the low-dimensional parameters; The model parameters are divided into corresponding clusters based on the parameter similarity of the model parameters; The model parameters in the cluster are initially optimized to obtain the first optimized parameters; The first optimization parameter is then further optimized to obtain the second optimization parameter; Obtain the fitness value of the second optimization parameter, and use the second optimization parameter with the smallest fitness value as the optimization model parameter; wherein, the fitness value is obtained based on the prediction performance of the second optimization parameter on random sampling data, and the prediction performance is measured by the mean absolute percentage error; The optimized model parameters are sent to the server to receive the traffic prediction model built by the server based on the optimized model parameters; Obtain traffic data to be analyzed, and substitute the traffic data into the traffic prediction model to obtain traffic prediction results.

2. The traffic prediction method according to claim 1, characterized in that, The step of reducing the dimensionality of multiple model parameters to obtain low-dimensional parameters includes: The multiple model parameters are subjected to dimensionality reduction using principal component analysis to obtain the low-dimensional parameters.

3. The traffic prediction method according to claim 1, characterized in that, The preliminary optimization of the model parameters in the cluster to obtain the first optimized parameters includes: The particle swarm optimization algorithm is used to perform preliminary optimization on the model parameters in the cluster to obtain the first optimized parameters.

4. The traffic prediction method according to claim 1, characterized in that, The second optimization of the first optimization parameter to obtain the second optimization parameter includes: The first optimization parameter is optimized a second time using the gradient descent method to obtain the second optimization parameter.

5. A traffic prediction device, characterized in that, include: The acquisition module is used to acquire multiple model parameters sent by multiple clients; The analysis module is used to perform dimensionality reduction processing on multiple model parameters to obtain multiple low-dimensional parameters; Similarity calculations are performed on the multiple low-dimensional parameters to obtain multiple parameter similarities; wherein, the parameter similarity is the distance value between the vectors of two of the low-dimensional parameters; the model parameters are divided into corresponding clusters based on the parameter similarity of the model parameters; An optimization module is used to perform preliminary optimization on the model parameters in the cluster to obtain a first optimized parameter; perform secondary optimization on the first optimized parameter to obtain a second optimized parameter; obtain the fitness value of the second optimized parameter, and take the second optimized parameter with the smallest fitness value as the optimized model parameter; wherein, the fitness value is obtained based on the prediction performance of the second optimized parameter on randomly sampled data, and the prediction performance is measured by the mean absolute percentage error; The sending and receiving module is used to send the optimized model parameters to the server and receive the traffic prediction model established by the server based on the optimized model parameters. The traffic prediction module is used to acquire traffic data to be analyzed and to substitute the traffic data into the traffic prediction model to obtain the traffic prediction result.

6. A traffic prediction device, characterized in that, include: At least one processor, and, A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the traffic prediction method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the traffic prediction method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automobile road spectrum clustering synthesis method and system based on hybrid particle swarm algorithm and artificial fish swarm algorithm

    CN110414584A

  • Navigation reminding method for short-term traffic flow prediction based on SVD-PSO-LSTM

    CN111709549A

  • Traffic flow prediction method, device and equipment and computer storage medium

    CN111739285A

  • Product performance prediction method and system

    CN112529328A