A traffic flow online prediction method

CN117456728BActive Publication Date: 2026-09-29NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311387884.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2026-09-29
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

[0005]本发明旨在解决现有交通流量在线预测方法在环境快速变化时的适应问题,本发明公开的一种基于重启机制的新型交通流量在线预测方法能够快速应对环境的变化,从而提高交通流量在线预测的效率和准确性

Benefits of technology

[0032]有益效果:与现有的基于集成学习的技术相比,本发明设计了一种面向交通流量在线预测方法,利用小波变换技术,只需要维护并动态重启一个模型,能够快速检测并适应环境变化。因此,在面对交通流量的快速变化时,如高峰时段、突发事件或大型活动等,都能够提供更准确和及时的预测结果,从而更准确地预测交通流量并实时判断交通兴趣点。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117456728B_ABST
    Figure CN117456728B_ABST
Patent Text Reader

Abstract

The application discloses a traffic flow online prediction method, realizes quick detection and adaptation of a traffic flow prediction system, and performs online learning and prediction. An intelligent prediction device including a learner and a detector is designed. Offline initialization is first performed, and then when online traffic flow data is received, the detector first detects whether a drastic change occurs in the environment: if yes, a restart signal is sent to make the learner restart; and if no, the learner continues learning and updating, so that the environment change is quickly detected and adapted. On the detector, a wavelet transform-based environment change detection method is designed, frequency domain information is used to estimate the change, and the environment change is effectively and quickly detected and adapted. On the learner, a weight adjustment mechanism is designed by using online data information, and the learner model is dynamically updated based on the weight adjustment mechanism. The method can make the learner run in a relatively stable interval by using the self-adaptive restart mechanism, and cope with the rapidly changing environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the task of rapid learning and adaptation for online traffic flow forecasting, and particularly to a method for online traffic flow forecasting. Background Technology

[0002] With the continuous development of urbanization, urban traffic conditions are becoming increasingly complex. Accurate traffic flow forecasting can provide strong decision-making support for management departments, assisting in the rational allocation of traffic resources, alleviating traffic congestion, and organizing large-scale events. Traffic flow forecasting is often based on sensor / visual data such as remote sensing information, smart street light sensors, road sensors, and GPS maps. This data accumulates continuously in a "stream" form, thus requiring the development of machine learning algorithms capable of online forecasting for streaming data and real-time identification of traffic points of interest. However, online traffic flow forecasting systems often face the challenge of rapidly changing environments in practical applications, such as rapid changes in the types of observation information, traffic flow types, and data acquisition equipment, making the task of online traffic flow forecasting increasingly complex. Traditional online traffic flow forecasting methods often rely on large amounts of existing data for learning and model building. This makes it difficult for the forecasting system to adapt to new environmental changes in a timely manner, thus affecting its forecasting performance. Therefore, the need for intelligent forecasting devices that can quickly adapt to environmental changes has been proposed.

[0003] Traditional online learning and decision-making methods typically offer good theoretical support in static environments. Specifically, existing methods require that the average online performance of intelligent prediction devices be comparable to their average offline performance. However, in practical applications, environments can change drastically and rapidly, where traditional online decision-making methods often perform poorly. Currently, traffic flow prediction methods often require significant time and computational resources to relearn and update models when facing rapid environmental changes, and this delay often leads to inaccurate predictions. Furthermore, these methods lack effective adaptation strategies when dealing with changing environments, resulting in a significant reduction in prediction performance in such environments. In real-world applications, we often need to deal with rapidly changing environments, such as time-varying traffic flow fluctuations, traffic route modifications or closures, or changes in traffic flow due to weather, seasons, etc.; and the replacement or upgrading of data acquisition equipment also leads to changes in the type and format of acquired information. These are all environmental changes that online traffic flow monitoring needs to adapt to quickly. Summary of the Invention

[0004] Objective: To address the problems and shortcomings of existing technologies, this invention aims to design an online traffic flow prediction method that can quickly and timely adapt to rapid environmental changes and maintain high predictive performance under various changing conditions. A restart strategy is employed to enable online decision-making in the face of rapidly changing environments. The core challenge of the restart mechanism lies in estimating environmental changes and designing restart criteria when encountering uncertainties. Then, based on the degree of environmental change and thresholds, a decision is made on whether to restart, thereby helping intelligent prediction devices make more accurate and reliable decisions more quickly.

[0005] This invention aims to address the problem of adapting existing online traffic flow forecasting methods to rapid environmental changes. The novel online traffic flow forecasting method based on a restart mechanism disclosed in this invention can quickly respond to environmental changes, thereby improving the efficiency and accuracy of online traffic flow forecasting.

[0006] Technical Solution: A method for online traffic flow prediction is proposed to quickly detect and adapt to environmental changes, thereby completing the online traffic flow prediction task. Specifically, an intelligent traffic flow prediction device is designed, comprising a learner and a detector. This intelligent prediction device is particularly suitable for rapidly changing traffic environments. The intelligent prediction device designed in this invention can quickly adapt to these changes, providing more accurate traffic prediction results. First, to ensure good performance of the initial model, the learner and detector are initialized offline. Next, the detector predicts whether the environment has undergone drastic changes. If so, the learner is restarted; otherwise, the learner continues to learn and update, thereby quickly detecting and adapting to environmental changes. Drastic changes refer to changes exceeding a set threshold. Finally, the intelligent prediction device updates its internal state, and the environment changes due to the decisions made by the intelligent prediction device. In the design of the detector, an environmental change detection method based on wavelet transform is designed, utilizing frequency domain information to estimate changes, effectively and quickly detecting and adapting to environmental changes. In the design of the learner, a dynamic weight adjustment mechanism is designed using information from online data, and the weights of the learner model are dynamically adjusted and updated based on this mechanism. Ultimately, the intelligent prediction device can operate the learner within a relatively stable range through an adaptive restart mechanism to cope with rapidly changing environments. Compared with existing intelligent prediction methods based on ensemble learning, this invention can detect and adapt to environmental changes more quickly to complete online learning and decision-making tasks in complex scenarios.

[0007] To ensure good performance of the initial model, the specific steps of the offline prediction stage initialization training method are as follows:

[0008] Step 100: Collect traffic flow information dataset offline. in This represents a feature vector composed of spliced ​​information from various sensing / visual sources, including remote sensing data, smart street light sensors, road sensors, and GPS maps. Represents the d-dimensional real space; y n ∈{0, 1, ..., K} represents the types of traffic flow (smooth flow, congestion, severe congestion, etc.), with a total of K types.

[0009] Step 101, Select a classifier in These represent the model parameter space and feature space, respectively. Represents the space of real numbers.

[0010] Step 102, Select the loss function in Represents the tag space.

[0011] Step 103: On the traffic flow information dataset collected in step 100, using the classifier and loss function selected in steps 101 and 102, minimize the loss function to obtain the offline initial model parameters.

[0012] The specific steps of the detector's adaptive restart mechanism are as follows:

[0013] Step 200: Real-time sampling and collection of traffic flow data features x t .

[0014] Step 201, Initialize wavelet statistics

[0015] Step 201: In each round t = 1, 2, ..., T, update the wavelet coefficients using the streaming wavelet algorithm, specifically as follows: Steps 2011-2015:

[0016] Step 2011, use a binary index tree to process the collected x. t Group them.

[0017] Step 2012: Determine the wavelet coefficients based on the labels of the binary index tree. Does it need to be updated? Specifically, the set of parameters that need to be updated is: like If updates are needed, the wavelet coefficients are updated using convolution operations.

[0018] Step 2013: Determine the wavelet coefficients based on the labels of the binary index tree. Is the information outdated? Specifically, the set of outdated parameters is: like If it is outdated information, then the wavelet coefficients will be... throw away.

[0019] Step 2014, based on wavelet coefficients Calculate the magnitude of environmental change. Where [s,t] represents the s-th to t-th positions of the wavelet coefficients, F represents the Frobenius norm, and δ γ For the soft threshold function [δ γ (A)] i,j =sign(A i,j )·max{|A i,j |-γ,0}, where γ is the user-defined threshold, i.e., the soft threshold function applies to each element A in the matrix. i,j Do max{|A i,j Operations on |-γ,0}.

[0020] Step 2015, if the magnitude of environmental change... If the threshold τ is exceeded, a restart signal is sent to restart the learner. In practice, the threshold τ is set to the variance of the offline traffic flow information dataset S0.

[0021] The specific steps of the learner dynamic weight adjustment mechanism are as follows:

[0022] Step 300: Obtain the initialization model parameters w0 according to step 103.

[0023] Step 301: In each prediction round t = 1, 2, ..., T, execute the following steps 3012-3016:

[0024] Step 3012: Obtain online unmarked traffic information data at the current time t. in This indicates the number of unlabeled data points.

[0025] Step 3013: Utilize the offline initial model parameters w0 obtained in step 300 and the online traffic flow information data S obtained in step 3012. t Estimate the current round's marker distribution vector μ t .

[0026] Step 3014: Use the label distribution vector μ estimated in step 3013 t Adjust the weights of the initial model Where h0 is the offline initialization model. Represents the normalization parameter, [μ] t ] j This represents the j-th element of the label distribution vector. Describes the distribution of the j-th class of labels, [h t (x)] j Model ht The probability that feature x is predicted to be of class j.

[0027] Step 3015, using the model h with adjusted weights t Conduct online traffic flow forecasting.

[0028] Step 3016: If a detector restart signal is received, reinitialize the model parameters to w0 and the label distribution vector μ. t .

[0029] The classifiers that can be selected in step 101 include linear classifiers, generalized linear classifiers, neural network classifiers, etc.

[0030] The loss functions that can be selected in step 102 include the squared loss function, the logistic loss function, the sigmoid loss function, etc.

[0031] In step 3013, the available label distribution estimation methods for estimating the label distribution vector of the current round include maximum likelihood-based label distribution estimation, confusion matrix-based label distribution estimation, and distribution matching-based label distribution estimation.

[0032] Beneficial Effects: Compared with existing ensemble learning-based techniques, this invention designs an online traffic flow prediction method. Utilizing wavelet transform technology, it only requires maintaining and dynamically restarting a single model, enabling rapid detection and adaptation to environmental changes. Therefore, it can provide more accurate and timely prediction results when facing rapid changes in traffic flow, such as peak hours, emergencies, or large-scale events, thereby more accurately predicting traffic flow and determining traffic points of interest in real time. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating the online traffic flow prediction process according to an embodiment of the present invention.

[0034] Figure 2 This is a flowchart of a method for detecting the degree of environmental change according to an embodiment of the present invention;

[0035] Figure 3 This is a flowchart of a method for dynamically adjusting model parameters using a learner according to an embodiment of the present invention. Detailed Implementation

[0036] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0037] A method for online traffic flow prediction is proposed, which designs an intelligent traffic flow prediction device comprising a learner and a detector. This intelligent prediction device is particularly suitable for rapidly changing traffic environments, enabling it to quickly adapt to these changes and provide more accurate traffic prediction results. First, to ensure good performance of the initial model, the learner and detector are initialized offline. Next, the detector predicts whether the environment has undergone drastic changes; if so, the learner is restarted; otherwise, the learner continues to learn and update, thus quickly detecting and adapting to environmental changes. Finally, the intelligent prediction device updates its internal state, and the environment changes in response to the decisions made by the intelligent prediction device.

[0038] This embodiment first requires training an offline initialization model. The workflow of the offline initialization model training method is as follows: Figure 1 As shown. First, traffic flow data is collected offline. The data sources include remote sensing information, smart street light sensors, road sensors, map GPS, and other sensor / visual data. The traffic flow information dataset is represented as follows. in This represents a feature vector composed of spliced ​​information from remote sensing data, smart street light sensors, road sensors, map GPS, and other sensor / visual information. Represents the d-dimensional real space; y n ∈{0, 1, ..., K} represents the types of traffic flow (smooth flow, congestion, severe congestion, etc.), with a total of K types.

[0039] Next, a linear classifier and a log-odds regression loss function are used. On the offline traffic flow data dataset, the optimal offline model parameters can be obtained using the stochastic gradient descent method. w0 is the obtained offline initialization model.

[0040] The workflow of the detector's adaptive restart mechanism is as follows: Figure 2 As shown.

[0041] In each round, a binary search tree is used to maintain the wavelet coefficients of the online features. Specifically, the wavelet coefficients are first determined based on the labels in the binary search tree. Does it need to be updated? Specifically, the set of parameters that need to be updated is: like If updates are needed, the wavelet coefficients are updated using convolution operations. Next, the wavelet coefficients are determined according to the labels in the binary index tree. Is the information outdated? Specifically, the set of outdated parameters is: like If it is outdated information, then the wavelet coefficients will be... Discard. Finally, based on the wavelet coefficients... Calculate the magnitude of environmental change. Where δ γ For the soft threshold function [δ γ (A)] i,j =sign(A i,j )·max{|A i,j |-γ,0}. Where F represents Frobenius norm. If the magnitude of environmental change... If the threshold τ is exceeded, a restart signal is sent to restart the classifier. In practice, the threshold τ is set to the variance of the offline data S0.

[0042] The workflow of the learner dynamic weight adjustment mechanism is as follows: Figure 3 As shown.

[0043] At each time point, first acquire the online unlabeled traffic information data for the current time t. in This represents the number of unlabeled data points. Then, using the offline initial model parameters w0 and the acquired online unlabeled traffic information data S... t Estimate the current round's marker distribution vector μ t Finally, the weights of the initial model are adjusted. Specifically, this is done based on the label distribution vector μ. t Adjust the weights of the initial model in Represents the normalization parameter, [h t (x)] j Model h t The probability of predicting feature x as belonging to class j. In each round, the model h with adjusted weights is used. t Perform online traffic flow prediction. At the end of each round, if a detector restart signal is received, reinitialize the model parameters to w0 and the label distribution vector μ. t .

Claims

1. A method for online traffic flow prediction, used to complete the task of online traffic flow prediction, characterized in that, Design a traffic flow intelligent prediction device. The intelligent prediction device includes a learner and a detector. The learner and detector are initialized in the offline stage. Then, the detector predicts whether the environment has changed drastically. If so, the learner is restarted. If not, the learner continues to learn and update. The drastic change refers to the degree of change exceeding a set threshold. Finally, the intelligent prediction device updates its internal state, and the environment changes due to the decision made by the intelligent prediction device. The detector implements a wavelet transform-based environmental change detection method, which uses frequency domain information to estimate changes in order to detect and adapt to environmental changes. In the learner, a dynamic weight adjustment mechanism is designed using information from line data, and the weights of the learner model are dynamically adjusted and updated based on this mechanism. Finally, the intelligent prediction device can use an adaptive restart mechanism to allow the learner to operate in a relatively stable range in order to cope with rapidly changing environments. The specific steps for initializing the training method during the offline phase are as follows: Step 100: Collect traffic flow information dataset offline. ,in The feature vector representing traffic flow data, express 3D real space; Indicates the types of traffic flow, total kind; Step 101, Select a classifier ,in , These represent the model parameter space and feature space, respectively. Represents the space of real numbers; Step 102, Select the loss function ,in Represents the tag space; Step 103: On the traffic flow information dataset collected in step 100, using the classifier and loss function selected in steps 101 and 102, minimize the loss function to obtain the initial model parameters. ; The specific steps of the dynamic weight adjustment mechanism of the learner are as follows: Step 300: Obtain initial model parameters ; Step 301, in each prediction round Perform the following steps 3012-3016: Step 3012: Obtain the current time. Online unmarked traffic information data ,in Indicates the number of unlabeled data. The feature vector representing traffic flow data; Step 3013: Utilize the initial model parameters obtained in step 300. And the online traffic flow information data obtained in step 3012 Estimate the current round's marker distribution vector ; Step 3014: Use the label distribution vector estimated in step 3013. Adjust the weights of the initial model ,in Represents the normalization parameter. The first vector representing the distribution vector of the label One element, Indicates the first Distribution of class tags, Representation Model Features Predicted as the first The probability of a class; Step 3015: Utilize the model with adjusted weights. Perform online traffic flow forecasting; Step 3016: If a restart signal from the detector is received, the model parameters are reinitialized. and the label distribution vector .

2. The online traffic flow prediction method according to claim 1, characterized in that, The specific steps of the detector's adaptive restart mechanism are as follows: Step 200: Real-time sampling and collection of traffic flow data features ; Step 201, Initialize wavelet statistics ; Step 201, in each round The wavelet coefficients are updated using the streaming wavelet algorithm, specifically through the following steps (2011-2015): Step 2011, use a binary index tree to analyze the collected data. Grouping; Step 2012: Determine the wavelet coefficients based on the labels of the binary index tree. Does it need to be updated? The set of parameters that need to be updated is: ,like If updates are needed, the wavelet coefficients are updated using convolution operations. ; Step 2013: Determine the wavelet coefficients based on the labels of the binary index tree. Is it outdated information? The set of outdated parameters is: ,like If it is outdated information, then the wavelet coefficients will be... throw away; Step 2014, based on wavelet coefficients Calculate the magnitude of environmental change. Where F stands for Frobenius norm, Soft threshold function That is, for the matrix Each element Do Operation; Step 2015, if the magnitude of environmental change... Exceeding the threshold If so, a restart signal is sent to restart the learner.

3. The online traffic flow prediction method according to claim 1, characterized in that, Offline traffic flow information dataset ,in Feature vectors representing traffic flow data of sensing / visual types, including remote sensing information data, smart street light sensors, road sensors, and GPS map data; It indicates the types of traffic flow, including smooth flow, congestion, and severe congestion.

4. The online traffic flow prediction method according to claim 2, characterized in that, In step 2015, the threshold Traffic flow information dataset set to be collected offline The variance.

5. The online traffic flow prediction method according to claim 1, characterized in that, The classifiers available for selection in step 101 include linear classifiers, generalized linear classifiers, and neural network classifiers.

6. The online traffic flow prediction method according to claim 1, characterized in that, The loss functions available for selection in step 102 include the squared loss function, the logistic loss function, and the sigmoid loss function.

7. The method for online traffic flow prediction according to claim 1, characterized in that, In step 3013, the available label distribution estimation methods for estimating the label distribution vector of the current round include maximum likelihood-based label distribution estimation, confusion matrix-based label distribution estimation, and distribution matching-based label distribution estimation.

Citation Information

Patent Citations

  • A city traffic dynamic prediction system and method with real time and continuous feature

    CN101188002A

  • Incremental learning-based traffic exception detection method and device, and storage medium

    CN108173708A