Traffic flow data restoration and prediction method based on meta learning

Through a meta-learning-based method, spatial and temporal features are extracted and mixed models are constructed, which solves the problem of poor performance of existing traffic prediction methods in the absence and scarcity of data, and achieves more accurate and reliable traffic flow prediction and data restoration.

CN119694122APending Publication Date: 2025-03-25SICHUAN POLICE COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411838101.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing traffic prediction methods are not effective in dealing with data missing and data scarcity, making it difficult to achieve accurate traffic flow prediction in small and medium-sized cities or data missing.

Method used

The traffic flow data restoration and prediction method based on meta-learning is adopted, and the spatiotemporal graph data and adjacency matrix are obtained, the spatiotemporal features are extracted, interference processing and model parameter updates are performed, and the hybrid model is constructed to realize the data restoration and prediction tasks are performed simultaneously.

Benefits of technology

Improve the accuracy and reliability of traffic flow data, enhance the robustness and adaptability of the model, and provide more accurate traffic management and planning decision support in the absence or scarcity of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119694122A_ABST
    Figure CN119694122A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow data restoration and prediction method based on meta-learning, and belongs to the field of intelligent transportation, and the method comprises the following steps: obtaining time-space diagram data and an adjacent matrix based on an intelligent transportation system; performing feature extraction based on the space-time diagram data and the adjacent matrix to obtain space-time features; performing interference processing on the spatial-temporal characteristics to obtain interfered data; performing model parameter updating on the interfered data to obtain a hybrid model; and simultaneously executing a data recovery task and a traffic flow prediction task based on the hybrid model. According to the invention, the accuracy of traffic flow data and the prediction reliability are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation technology, and in particular relates to a traffic flow data restoration and prediction method based on meta-learning. Background Art

[0002] Data-driven traffic forecasting refers to the technology of using historical traffic data and real-time traffic information to predict future traffic conditions by building mathematical models and algorithms. This technology usually includes two main aspects: one is traffic flow forecasting based on time series analysis, and the other is traffic status forecasting based on machine learning and deep learning.

[0003] In traffic flow prediction based on time series analysis, statistical methods such as ARIMA (autoregressive moving average model) are usually used to model historical traffic data and predict the trend of future traffic flow. This method is suitable for short-term traffic prediction, but has limited effect on long-term prediction.

[0004] Traffic status prediction based on machine learning and deep learning has been a research direction that has attracted much attention in recent years. By utilizing big data and powerful computing power, combined with various feature engineering and model optimization techniques, a more accurate and efficient traffic prediction model can be built. Common methods include support vector machines (SVM), random forests, deep neural networks, etc. These methods can automatically learn the features and rules in the data and achieve accurate prediction of complex traffic systems.

[0005] However, to build an effective traffic prediction model, a large amount of historical traffic data is needed for training and optimization. However, many small and medium-sized cities are unable to collect historical data of sufficient scale and long term due to their low level of economic development or relatively simple traffic systems. On the other hand, even developed cities face the problem of missing data. Due to equipment failure, communication interruption and other reasons, traffic data collected by sensors often have a large number of missing values, which brings additional challenges to traffic prediction and optimization.

[0006] Current traffic prediction and optimization methods still have many shortcomings in dealing with data missing and data scarcity. Traditional reduction methods often rely on statistical analysis and rule assumptions of data, which makes it difficult to handle complex traffic data. At the same time, most existing traffic prediction models can only achieve good results when there is sufficient data, but perform poorly when there is data missing or data scarce.

[0007] Therefore, in response to the above problems, the present invention proposes a traffic flow data restoration and prediction method based on meta-learning. Summary of the invention

[0008] In order to solve the above technical problems, the present invention proposes a traffic flow data restoration and prediction method based on meta-learning to solve the problems existing in the above-mentioned prior art.

[0009] To achieve the above objectives, the present invention provides a traffic flow data restoration and prediction method based on meta-learning, comprising:

[0010] Obtaining spatiotemporal graph data and adjacency matrix based on intelligent transportation systems;

[0011] Feature extraction is performed based on spatiotemporal graph data and adjacency matrix to obtain spatiotemporal features;

[0012] Performing interference processing on the spatiotemporal features to obtain interfered data;

[0013] Updating model parameters of the disturbed data to obtain a hybrid model;

[0014] Based on the hybrid model, the data restoration task and the traffic flow prediction task are performed simultaneously.

[0015] Optionally, a missing pattern is used to perform interference processing on the spatiotemporal features, wherein the missing pattern includes random missing and block missing.

[0016] Optionally, the random missing and block missing expressions are:

[0017]

[0018] In the formula, represents the data elements after random missing processing, x ij Represents the elements in the original data matrix, u ij A random variable between 0 and 1 indicating whether a data element is masked, r rm represents the random missing rate, x i:j,u:v represents a sub-block in the original data matrix, Indicates the data block after block loss processing, U i:j,u:v represents a random variable between 0 and 1 that determines whether the entire data block is masked, r bm Indicates the block miss rate.

[0019] Optionally, the process of updating the model parameters of the disturbed data includes:

[0020] Inputting the post-interference data into an inner loop to update model parameters to obtain inner loop update parameters, wherein the inner loop update parameters include: data restoration task update parameters and traffic flow prediction update parameters;

[0021] The inner loop update parameters are input into the outer loop memory momentum update to obtain the hybrid model.

[0022] Optionally, the expressions of the data restoration task update parameters and the traffic flow prediction update parameters are:

[0023]

[0024] In the formula, Indicates the update parameters of the data restoration task. represents the updated parameters of the traffic flow prediction task, θ represents the initial model parameters, and f θ is the model with initialization parameters, β1 and β2 represent the finer step size of the gradient for the inner loop data restoration task and the traffic flow prediction task, respectively. and They represent the loss functions of the data restoration task and the traffic flow prediction task respectively, is the gradient of the loss function with respect to the model parameter θ, indicating the rate of change of the loss function relative to the model parameter, S ′ Denotes the enhanced support set data sample, S′ i Represents the support set data samples used for prediction.

[0025] Optionally, the expression of the hybrid model is:

[0026]

[0027] In the formula, represents the hybrid model parameters, γ represents the step size for the outer loop gradient update, K is the number of inner loops, and θ' K After completing K tasks in the inner loop, the model parameters are updated. is the model used for data restoration tasks, is the model used for data prediction tasks, Q′ i Input sample for the problem set of the restoration task in the i-th cycle, Input samples for the problem set of the traffic flow prediction task in the i-th cycle.

[0028] Optionally, the process of simultaneously performing the data restoration task and the traffic flow prediction task based on the hybrid model includes:

[0029] Based on the hybrid model, the model parameters of the data restoration task are updated to obtain the updated parameters of the data restoration task in the adaptation phase;

[0030] The data is restored based on the update parameters of the adaptation phase data restoration task, and then the model parameters of the traffic flow prediction task are updated based on the restored data to obtain the update parameters of the adaptation phase traffic flow prediction task.

[0031] Optionally, the update parameters of the data restoration task in the adaptation phase and the update parameters of the traffic flow prediction task in the adaptation phase are expressed as:

[0032]

[0033] Where λ1 and λ2 represent the learning rates of the data restoration task and the traffic flow prediction task respectively, and X′ i To adapt to the actual restoration data in the stage, Represents the actual forecast data during the adaptation phase.

[0034] Compared with the prior art, the present invention has the following advantages and technical effects:

[0035] The present invention proposes an innovative meta-learning-based traffic flow data restoration and prediction method, which effectively improves the accuracy of traffic flow data and the reliability of prediction. Through the spatiotemporal graph data and adjacency matrix obtained by the intelligent transportation system, this method first extracts key spatiotemporal features, providing rich information for traffic flow analysis. Subsequently, these features are interfered with to simulate the uncertainty factors in actual traffic and enhance the robustness of the model. Through the dynamic update of model parameters, a hybrid model that can adapt to different traffic conditions is constructed. Finally, the hybrid model can handle data restoration and prediction tasks simultaneously, which not only improves the efficiency of data processing, but also provides more accurate decision support for traffic management and planning, and has important practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 This is an overall framework diagram of the traffic flow data restoration and prediction method based on meta-learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0039] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] Embodiment 1

[0041] This paper proposes a traffic data restoration and prediction method based on meta-learning (DITP-ML). This method uses knowledge transfer, pre-training / fine-tuning, different missing modes and gradient loss methods to effectively deal with data missing and data scarcity problems. The flow chart of the traffic flow data restoration and prediction method based on meta-learning is as follows: Figure 1 shown.

[0042] The present invention simultaneously performs two tasks, data restoration and traffic prediction, and uses a spatiotemporal network (ST-Net) to learn meta-knowledge from a source domain with sufficient data, and transfers the learned meta-knowledge to a target domain with scarce data. In addition, the present invention uses a pre-training / fine-tuning paradigm to further improve the training efficiency without introducing additional model parameters. Finally, the present invention applies different missing patterns, adversarial attacks, and gradient-based loss methods to evaluate their impact on the robust representation capabilities of DITP-ML learning. The method proposed in the present invention outperforms other advanced baseline models in a few-sample scenario with missing data, and therefore has broad application prospects and important social significance.

[0043] Meta-learning is a method of learning how to learn. It learns the similarities and differences between different tasks to achieve rapid learning and generalization of new tasks. The traffic data restoration and prediction method based on meta-learning can not only make full use of the data-rich source domain to improve the model performance, but also transfer the learned knowledge to the data-scarce target domain to effectively deal with the problems of missing and scarce data. In addition, this method can also use pre-training / fine-tuning strategies to improve the training efficiency of the model, and introduce different missing modes and loss methods to evaluate the robustness of the model, thereby further improving the performance and generalization ability of the model.

[0044] The present invention obtains spatiotemporal graph data and adjacency matrix based on the intelligent transportation system; extracts features based on the spatiotemporal graph data and adjacency matrix to obtain spatiotemporal features; performs interference processing on the spatiotemporal features to obtain interfered data; updates model parameters on the interfered data to obtain a hybrid model; and simultaneously performs data restoration tasks and traffic flow prediction tasks based on the hybrid model. The method of the present invention mainly includes a meta-training phase and an adaptation phase:

[0045] (1) Meta-training stage

[0046] S1: Based on the traffic data, the sensors or road sections on each road are first regarded as a node in the graph. Then, the edges between nodes are established according to the actual connection relationship between roads (such as adjacent roads, intersections, or connections in the traffic network), thereby constructing an adjacency matrix.

[0047] S2: The elements in the adjacency matrix indicate whether there is a connection between nodes and the strength of the connection. Next, the traffic flow data of each node at different time points is used as the node's features and combined into spatiotemporal graph data.

[0048] S3: Prepare the spatiotemporal graph data and the adjacency matrix representing the relationship between nodes as input to extract spatiotemporal features. The data restoration and traffic flow prediction tasks can be expressed as:

[0049]

[0050] S4: Use missing patterns, mask FGSM and other methods to interfere with the input data. The specific missing patterns are random missing and block missing.

[0051]

[0052] In the formula, represents the data elements after random missing processing, x ij Represents the elements in the original data matrix, u ij Represents a random variable between 0 and 1, usually sampled from a uniform distribution. It is used to decide whether a data element is masked or not. rm Represents the random missing rate, a value between 0 and 1, indicating the probability that the data is randomly missing. i:j,u:v Represents a subblock in the original data matrix. Indicates the data block after block loss processing. i:j,u:v Represents a random variable between 0 and 1, which is used to determine whether the entire data block is masked. bm Indicates the block missing rate (Block Missing Rate), a value between 0 and 1, indicating the probability of a data block being missing.

[0053] S5: Input the data into the inner loop to obtain the inner loop update parameters, which include: data restoration task update parameters and traffic flow prediction update parameters. For the data restoration task, update the parameters from the initial model parameters θ to For the traffic flow prediction task, the parameters are updated from the initial model parameters θ to

[0054] Update the model parameters of the inner loop, where the formula for the data restoration task is The formula for the traffic flow prediction task is

[0055] In the formula, Indicates the update parameters of the data restoration task. represents the updated parameters of the traffic flow prediction task, θ represents the initial model parameters, and f θ is the model with initialization parameters, β1 and β2 represent the finer step size of the gradient for the inner loop data restoration task and the traffic flow prediction task, respectively. and They represent the loss functions of the data restoration task and the traffic flow prediction task respectively, is the gradient of the loss function with respect to the model parameter θ, indicating the rate of change of the loss function relative to the model parameter, S′ i Denotes the enhanced support set data sample, S′ i Represents the support set data samples used for prediction.

[0056] S4: Perform an outer loop and update the inner loop model parameters to obtain and Perform momentum update to obtain a hybrid model;

[0057] Update the model parameters of the outer loop and determine the update direction of the parameters based on the query set. This update step is performed on the query set (Query), and traffic flow prediction is performed after the restoration result is obtained. Finally, we get the mixed model

[0058] Where α represents the hyperparameter used to balance the data restoration task and the traffic flow prediction task in the momentum update, γ represents the step size of the outer loop gradient update; K is the number of inner loops, and θ' K After completing K tasks in the inner loop, the model parameters are updated. is the model used for data restoration tasks, is the model used for data prediction tasks, Q′ i Input sample for the problem set of the restoration task in the i-th cycle, Input samples for the problem set of the traffic flow prediction task in the i-th cycle.

[0059] (2) Adaptation phase: The process of simultaneously executing the data restoration task and the traffic flow prediction task based on the hybrid model includes: updating the model parameters of the data restoration task based on the hybrid model to obtain the updated parameters of the data restoration task in the adaptation phase; restoring the data based on the updated parameters of the data restoration task in the adaptation phase, and then updating the model parameters of the traffic flow prediction task based on the restored data to obtain the updated parameters of the traffic flow prediction in the adaptation phase. As a specific implementation of this embodiment, it includes:

[0060] S1: Meta-knowledge transfer for data restoration tasks through multi-step model parameter updates;

[0061] According to the hybrid model obtained in the meta-training stage, the present invention updates the model parameters for the data restoration task

[0062] S2: Meta-knowledge transfer for traffic flow prediction task through multi-step model parameter update;

[0063] Using Model Parameters Continue restoring data Then update the model parameters for the traffic flow prediction task

[0064] Based on the above content, this embodiment describes Algorithm 1 and Algorithm 2 in detail:

[0065]

[0066]

[0067]

[0068] This paper proposes a traffic data restoration and prediction method based on meta-learning (DITP-ML). This method utilizes knowledge transfer, pre-training / fine-tuning, different missing modes and gradient loss methods to effectively deal with data missing and data scarcity problems, and can solve traffic congestion problems more effectively in more regions.

[0069] The present invention is based on data-driven, using historical traffic data and real-time traffic information for prediction and optimization, and can more accurately reflect the urban traffic conditions. The DITP-ML method performs two tasks, data restoration and traffic prediction, at the same time, making full use of the information of traffic data and improving the comprehensive performance of the model.

[0070] The present invention adopts a meta-learning strategy, which can learn knowledge from a data-rich source domain and transfer it to a data-scarce target domain, thereby effectively coping with the problem of missing and scarce data. The introduction of a pre-training / fine-tuning strategy improves the training efficiency of the model, enables the model to adapt to new data environments more quickly, and improves the generalization ability of the model.

[0071] The present invention introduces different missing modes and loss methods to evaluate the robustness of the model, making the model more robust and more adaptable.

[0072] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A traffic flow data restoration and prediction method based on meta-learning, characterized in that: The following steps are involved: Obtaining spatiotemporal graph data and adjacency matrix based on intelligent transportation systems; Feature extraction is performed based on spatiotemporal graph data and adjacency matrix to obtain spatiotemporal features; Performing interference processing on the spatiotemporal features to obtain interfered data; Updating model parameters of the disturbed data to obtain a hybrid model; Based on the hybrid model, the data restoration task and the traffic flow prediction task are performed simultaneously.

2. The method for restoring and predicting traffic flow data based on meta-learning according to claim 1, characterized in that: The space-time feature is interfered with by using a missing pattern, wherein the missing pattern includes random missing and block missing.

3. The meta-learning-based traffic flow data restoration and prediction method according to claim 2 is characterized in that: The expressions of random missing and block missing are: In the formula, represents the data elements after random missing processing, x ij Represents the elements in the original data matrix, u ij A random variable between 0 and 1 indicating whether a data element is masked, r rm represents the random missing rate, x i:j,u:v represents a sub-block in the original data matrix, Indicates the data block after block loss processing, U i:j,u:v represents a random variable between 0 and 1 that determines whether the entire data block is masked, r bm Indicates the block missing rate.

4. The meta-learning-based traffic flow data restoration and prediction method according to claim 1, characterized in that: The process of updating the model parameters of the disturbed data includes: Inputting the post-interference data into an inner loop to update model parameters to obtain inner loop update parameters, wherein the inner loop update parameters include: data restoration task update parameters and traffic flow prediction update parameters; The inner loop update parameters are input into the outer loop memory momentum update to obtain the hybrid model.

5. The meta-learning-based traffic flow data restoration and prediction method according to claim 4 is characterized in that: The expressions of the data restoration task update parameters and the traffic flow prediction update parameters are as follows: In the formula, Indicates the update parameters of the data restoration task. represents the updated parameters of the traffic flow prediction task, θ represents the initial model parameters, and f θ is the model with initialization parameters, β1 and β2 represent the finer step size of the gradient for the inner loop data restoration task and the traffic flow prediction task, respectively. and They represent the loss functions of the data restoration task and the traffic flow prediction task respectively, is the gradient of the loss function with respect to the model parameter θ, indicating the rate of change of the loss function relative to the model parameter, S′ i Denotes the enhanced support set data sample, S′ i Represents the support set data samples used for prediction.

6. The meta-learning-based traffic flow data restoration and prediction method according to claim 5, characterized in that: The expression of the mixed model is: In the formula, represents the hybrid model parameters, γ represents the step size for the outer loop gradient update, K is the number of inner loops, and θ' K After completing K tasks in the inner loop, the model parameters are updated. is the model used for data restoration tasks, is the model used for data prediction tasks, Q′ i Input sample for the problem set of the restoration task in the i-th cycle, Input samples for the problem set of the traffic flow prediction task in the i-th cycle.

7. The meta-learning-based traffic flow data restoration and prediction method according to claim 6, characterized in that: The process of simultaneously performing the data restoration task and the traffic flow prediction task based on the hybrid model includes: Based on the hybrid model, the model parameters of the data restoration task are updated to obtain the updated parameters of the data restoration task in the adaptation phase; The data is restored based on the update parameters of the adaptation phase data restoration task, and then the model parameters of the traffic flow prediction task are updated based on the restored data to obtain the update parameters of the adaptation phase traffic flow prediction task.

8. The method for restoring and predicting traffic flow data based on meta-learning according to claim 7, characterized in that: The update parameters of the data restoration task in the adaptation phase and the update parameters of the traffic flow prediction task in the adaptation phase are expressed as: Where λ1 and λ2 represent the learning rates of the data restoration task and the traffic flow prediction task respectively, and X′ i To adapt to the actual restoration data in the stage, Represents the actual forecast data during the adaptation phase.