A vehicle flow prediction method and system based on bimodal optimization embedded learning model

By integrating multi-source data through a bimodal optimization embedding learning model, the problems of insufficient multi-source heterogeneous data fusion capability and robustness in existing technologies are solved, and high-precision vehicle flow prediction is achieved to meet the needs of complex traffic scenarios.

CN120356348BActive Publication Date: 2025-09-19FUJIAN NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510831040.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-19
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

Existing vehicle flow prediction methods have problems such as insufficient multi-source heterogeneous data fusion capabilities and limited robustness and generalization capabilities in complex traffic scenarios. They are unable to cope with emergencies and nonlinear dynamic traffic conditions, resulting in large prediction errors and insufficient adaptability.

Method used

A bimodal optimization-based embedding learning model is adopted. By integrating multi-source data, a cross-modal feature fusion mechanism and a robust model architecture are designed. Features are extracted using layer-normalized pre-Transformer and GPT-2 models, and feature fusion and prediction are performed in combination with attention alignment and multi-head self-attention mechanisms.

Benefits of technology

It improves the accuracy and reliability of vehicle flow prediction, can provide high-precision prediction support in complex traffic scenarios, reduces prediction errors, and enhances the adaptability and stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120356348B_ABST
    Figure CN120356348B_ABST
Patent Text Reader

Abstract

The present invention provides a vehicle flow prediction method and system based on a bimodal optimization embedded learning model, including a data preprocessing module, a bimodal encoding module, an attention alignment module and a sequence prediction module. The method is suitable for the field of intelligent transportation and aims to solve the problem of insufficient prediction accuracy of traditional methods in complex traffic scenarios through multi-source data fusion and deep model architecture innovation, providing efficient decision-making support for urban traffic management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a vehicle flow prediction method and system based on a dual-modal optimization embedded learning model. Background Art

[0002] With the acceleration of global urbanization, the number of motor vehicles in cities has exploded. Traffic congestion and inefficient commuting have become serious challenges in modern urban governance. Accurate vehicle flow forecasting, a core component of intelligent transportation systems, provides critical decision-making support for traffic planning, signal timing optimization, dynamic route guidance, and other areas. It is crucial for alleviating congestion and improving the operational efficiency of transportation systems. However, the limitations of existing forecasting methods in complex traffic scenarios are becoming increasingly apparent, and technological breakthroughs are urgently needed.

[0003] Traditional statistical forecasting methods, such as moving averages and exponential smoothing, rely primarily on the time series patterns of historical data, capturing trends through simple weighting or smoothing. These methods are simple in principle and computationally inexpensive, but they suffer from a significant limitation: they can only characterize linear relationships and are unable to model the complex, nonlinear dynamics of traffic systems. For example, during sudden gatherings like large-scale sporting events and concerts, traffic flow in localized areas of a city can exhibit dramatic, non-periodic fluctuations. Traditional methods, lacking the ability to detect external factors, can have forecast errors exceeding 50% during peak hours, making them unable to cope with sudden changes in traffic conditions.

[0004] Predictive models that rely on a single data source also have significant shortcomings. While road sensor networks can collect key indicators such as traffic volume and speed in real time, they suffer from limited coverage, data loss due to equipment failures, and only reflect the status of local road sections. Traffic monitoring video data is limited by camera viewing angles, weather conditions, and target recognition accuracy, making it difficult to provide stable global traffic information. More importantly, a single data source cannot integrate multi-dimensional influencing factors such as the behavior of traffic participants and the distribution of urban functional areas, resulting in insufficient adaptability of predictive models to complex scenarios. For example, when extreme weather causes some sensors to malfunction, models that rely solely on sensor data will fail due to incomplete data. Lacking the support of supplementary data sources such as social media, it is difficult to obtain real-time road conditions through other channels, ultimately leading to errors in traffic diversion decisions.

[0005] In recent years, the development of machine learning and deep learning technologies has provided new approaches for traffic forecasting. Methods such as support vector machines and artificial neural networks have improved the ability to fit complex patterns through nonlinear mapping, but they still face two core challenges:

[0006] (1) Insufficient ability to integrate multi-source heterogeneous data: Traffic systems involve modal information such as numerical time series data, textual semantic data, and visual image data. Existing models are unable to efficiently integrate the feature associations of different modalities within a unified framework, resulting in insufficient information utilization.

[0007] (2) Limited robustness and generalization capabilities: Data defects such as sensor noise and image recognition errors will significantly affect model performance, and most models rely on traffic pattern training in specific cities. In scenarios with different road network structures and travel habits, the prediction accuracy will drop sharply. Summary of the Invention

[0008] In view of this, the purpose of the present invention is to provide a vehicle flow prediction method and system based on a bimodal optimization embedded learning model. By integrating multi-source data, designing a cross-modal feature fusion mechanism and a robust model architecture, it breaks through the bottleneck of traditional methods and provides a high-precision and highly generalized prediction solution for urban traffic management.

[0009] To achieve the above objectives, the present invention adopts the following technical solution: a vehicle flow prediction method based on a bimodal optimization embedded learning model, comprising the following steps:

[0010] S1: Preprocessing of time series data and text data;

[0011] S2: The preprocessed data is fed into a bimodal optimized embedding learning model for training. The bimodal optimized embedding learning model includes a bimodal encoding module, an attention alignment module, and a sequence prediction module.

[0012] In the bimodal encoding module, when encoding pre-processed time series data, a layer-normalized pre-Transformer is used to extract features to obtain time series features. When encoding pre-processed text data, a customized traffic event prompt template is used to guide GPT-2 to convert the prompt input into tokens. After processing by the pre-trained encoder, a semantic vector representation containing the event type and impact level is obtained, namely the text features.

[0013] The attention alignment module uses the attention mechanism to align and integrate time series features and text features;

[0014] The sequence prediction module integrates time series features and text features to predict vehicle flow in future time periods.

[0015] In a preferred embodiment, the time series data includes traffic volume, vehicle speed and lane occupancy, and the text data includes traffic event descriptions, congestion complaint information and road construction reminder content.

[0016] In a preferred embodiment, the data preprocessing in S1 uses a filtering algorithm to remove noise in the data, uses an outlier detection algorithm to identify and process abnormal data points, and then uses a normalization formula to convert the data so that data from different data sources have the same scale.

[0017] In a preferred embodiment, the sequence prediction module in S2 performs vehicle flow sequence prediction based on the integrated features, adopts a layer-normalized front-end Transformer architecture, and the number of hidden units ranges from [200, 800]. The number of hidden units is adjusted according to the amount of data and the length of the time series. The number of training iterations ranges from [1000, 5000], and the learning rate ranges from [0.001, 0.01]. The learning rate and number of iterations are adjusted according to the convergence speed and performance during the training process.

[0018] In a preferred embodiment, the customized traffic event prompt template in S2 refers to a text template containing the structured fields of "[event type], [road section name] and [impact level]" to guide GPT-2 to process traffic-related text, so that the semantic vector output by the model contains key information such as traffic event type, occurrence location and impact level.

[0019] In a preferred embodiment, the future time period division in S2 refers to the demand for real-time control, management decision-making and strategic planning in the field of traffic forecasting, including short-term of 5-15 minutes, medium-term of 1-3 hours and long-term of 1-7 days; the accuracy of the prediction results is evaluated by the mean square error and mean absolute error indicators.

[0020] In a preferred embodiment, the attention alignment module in S2 generates query Q, key K and value V respectively by linear transformation of temporal features and text features, and uses the scaled dot product attention formula

[0021]

[0022] Calculate inter-modal correlation scores , and through the dynamic weight formula

[0023] Adjust the text feature weights by scaling factors Weighted fusion is achieved after balancing the feature weights, and T represents transpose.

[0024] In a preferred embodiment, the sequence prediction module in S2 processes the embedded sequence through a multi-head self-attention mechanism, which projects the embedded sequence into multiple subspaces through a multi-head self-attention mechanism and calculates the attention weight matrix of each subspace in parallel. ,in iRepresents the first i An attention head, Q i is the query matrix, K i is the bond matrix, V i is a value matrix used to calculate the attention weight in the subspace; then concatenated and passed through the feedforward neural network

[0025] Enhanced nonlinear expression, where x represents the feature vector input to the feedforward neural network, W 1 and W 2 are the weight matrices of different layers, b 1 and b 2 To correspond to the bias term, the nonlinear transformation of the features is achieved through matrix operations and activation functions; then after residual connection and layer normalization, the prediction sequence is generated by the linear function y=xW+b, where W is the prediction layer weight matrix and b is the bias; subsequently, the feedforward neural network is used to enhance the nonlinear expression ability of the features, and the training stability is optimized through residual connection and layer normalization; finally, the processed features are mapped to the target space through the linear prediction function to generate a prediction sequence for multiple time steps in the future.

[0026] The present invention also provides a vehicle flow prediction system based on a bimodal optimization embedded learning model, which runs the vehicle flow prediction method based on a bimodal optimization embedded learning model, including a data preprocessing module, a bimodal encoding module, an attention alignment module and a sequence prediction module.

[0027] Compared with the existing technology, the present invention has the following beneficial effects: through multi-source data fusion and deep model optimization, it improves prediction accuracy and reliability, and provides refined support for urban traffic management. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic structural diagram of a preferred embodiment of the present invention;

[0029] Figure 2 Schematic diagram of a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.

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

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

[0033] A vehicle flow prediction method based on bimodal optimization embedding learning model, reference Figure 1-2 , including the following steps:

[0034] The first step is multi-source data collection and integration: connecting with the road sensor system of the urban traffic management department to obtain raw data covering multiple dimensions of the traffic system from multiple channels, including: collecting core time series data such as traffic volume, vehicle speed, lane occupancy, etc. in real time through the urban road sensor network at a frequency of no less than every 5 minutes to accurately reflect the real-time traffic status of the road; connecting with mainstream map navigation software to obtain real-time macro-traffic situation data such as road congestion status, road condition changes, and estimated travel time; using web crawler technology to capture traffic-related text information on social media platforms on an hourly basis, and filtering effective content such as traffic event descriptions, congestion complaints, and construction reminders posted by users through keywords to supplement emergency information not timely covered by official data sources, forming a bimodal raw data set containing numerical time series data and text semantic data.

[0035] The second step is data cleaning and standardization preprocessing: (1) In the data cleaning process, for multi-source heterogeneous traffic-related data, a combination of filtering algorithms and outlier detection algorithms is used to improve data quality: for time series data such as traffic volume and speed collected by road sensors, the median filtering algorithm is used to effectively remove noise caused by environmental interference, equipment failure and other factors, and statistical methods such as the 3σ principle are used to identify and process abnormal peaks and valleys to ensure the reliability of time series data; for unstructured data such as social media texts and map navigation software, keyword filtering, text deduplication and logical verification are used to eliminate junk information, duplicate content and invalid data that are not related to traffic, and retain key information such as effective traffic event descriptions and congestion status.

[0036] (2) In the data standardization processing stage, in order to eliminate the scale differences between different data sources, a normalization method adapted to the characteristics of bimodal data is adopted: for numerical data such as traffic flow and speed, the Z-score normalization formula is used to convert them into standard normal distribution to unify the dimensions of continuous variables; for road condition classification data, numerical mapping or one-hot encoding is used to convert them into digital features that can be recognized by the model; for social media text data, after completing preprocessing such as word segmentation and stop word removal, the word vector model is used to convert them into semantic vectors of fixed dimensions to achieve feature scale alignment between text information and numerical time series data, providing standardized and unified input data for subsequent bimodal model training.

[0037] The third step is bimodal model training and feature fusion: the preprocessed data is input into a three-layer architecture model including bimodal encoding, attention alignment, and sequence prediction:

[0038] (1) Bimodal encoding module: For time series data, a pre-normalized Transformer architecture is used, layer normalization is used to stabilize the training process, a multi-head self-attention mechanism is used to capture time step dependencies, and a feedforward network is used to extract deep time series features. For text data, a customized traffic event prompt template (such as "[event type] occurred at [road section name] at [time], causing a traffic impact of [degree of impact]") is used to guide GPT-2 to convert the prompt input into a tag. After processing by the pre-trained encoder, a 768-dimensional semantic vector representation containing the event type (such as accident / construction), the affected road section, and the level is obtained.

[0039] (2) Attention alignment module: The attention alignment module generates query Q, key K and value V respectively by linear transformation of temporal features and text features, and uses the scaled dot product attention formula Calculate the intermodal correlation score, where the scaling factor ( d k Weighted fusion is achieved by balancing feature weights (where is the key vector dimension). For example, time series features are used as queries, and text features are used as keys and values, with higher weights assigned to highly relevant text features.

[0040] (3) Sequence prediction module: The sequence prediction module adopts a pre-normalized Transformer variant architecture, projects the embedded sequence into multiple subspaces through a multi-head self-attention mechanism, and calculates the attention weight matrix of each subspace in parallel. , and then spliced ​​through the feedforward neural network Enhanced nonlinear expression (where x is the input feature vector, W 1 and W 2 is the weight matrix,b 1 and b 2 is a bias term), and after residual connection and layer normalization, the prediction sequence is generated by the linear function y=xW+b.

[0041] The fourth step is multi-time span traffic prediction and application: (1) Traffic prediction: A fully trained model can predict vehicle traffic in the future. In practical applications, the prediction time span is set according to different needs. For example, in the traffic signal control scenario, short-term vehicle traffic prediction is required to adjust the timing of traffic lights in real time. In the traffic planning scenario, medium-term or long-term prediction may be required to provide a basis for the construction and optimization of traffic facilities. At a busy intersection, the trained model is used to predict the changes in traffic flow in the next 15 minutes. The model comprehensively considers the current road sensor data, the vehicle queue situation in the traffic monitoring video, the surrounding road congestion information provided by the map navigation software, and the traffic incident reports on social media, and provides a relatively accurate traffic flow prediction result.

[0042] exist Figure 1 In the equation, RV(t) represents the traffic flow fluctuation value, X T represents the input feature vector of traffic flow time series data, Represents the hidden layer features of the time series data after being processed by the RV encoder, represents the output feature of the i+1th layer of the RV encoder, P S Represents the prompt template output before the text data is processed by GPT-2, Represents the semantic feature vector of text data after GPT-2 encoding, represents the normalized semantic weight output by the text encoder, H C represents the fusion feature vector of temporal features and text features after attention alignment, X M Represents the final prediction output.

[0043] (2) Application example: Traffic management departments adjust traffic management strategies in a timely manner based on the prediction results of the model. When it is predicted that the traffic volume on a certain road will increase significantly in the future and congestion may occur, measures are taken in advance, such as adjusting the timing of signal lights, increasing the green light duration in the direction of the road; issuing traffic guidance information to guide vehicles to avoid congested sections; arranging traffic police to the scene for diversion, etc. During a large-scale event in a certain city, the vehicle flow prediction method of the present invention accurately predicted the changes in traffic flow on the roads around the event. The traffic management department formulated a detailed traffic diversion plan in advance, effectively avoiding the occurrence of traffic congestion, ensuring the smooth progress of the event and the normal travel of surrounding residents. Verified by actual traffic data, this method significantly reduces prediction errors, can effectively integrate dynamic factors such as sudden accidents and holiday effects, and provide accurate support for traffic signal timing optimization, path guidance and resource planning. In a concert scenario, the social media text "XX Stadium Concert will end at 20:00" was mapped to "Event Type = Large-Scale Event Ending, Road Section = Around XX Stadium, Impact Level = Severe" using a prompt template. The weight of the "Ending" dimension in the semantic vector generated by GPT-2 was increased by 40%. The model predicted peak traffic volume three hours in advance, at 2.8 times the normal rate (predicted 1,800 vehicles / hour, actual 1,750 vehicles / hour). This enabled traffic authorities to optimize traffic diversion strategies and improve traffic efficiency. This invention, which breaks through the limitations of traditional methods and achieves accurate modeling of the complex dynamics of urban traffic, has significant theoretical significance and engineering application value.

Claims

1. A vehicle flow prediction method based on a bimodal optimization embedded learning model, characterized in that: The following steps are involved: S1: Preprocessing of time series data and text data; S2: The preprocessed data is fed into a bimodal optimized embedding learning model for training. The bimodal optimized embedding learning model includes a bimodal encoding module, an attention alignment module, and a sequence prediction module. In the bimodal encoding module, when encoding the preprocessed time series data, a layer normalization pre-Transformer is used to extract features to obtain time series features; When encoding the pre-processed text data, a customized traffic event prompt template is used to guide GPT-2 to convert the prompt input into tokens. After processing by the pre-trained encoder, a semantic vector representation containing the event type and impact degree is obtained, namely the text feature; The attention alignment module uses the attention mechanism to align and integrate time series features and text features; The sequence prediction module integrates time series features and text features to predict vehicle flow in future periods; The attention alignment module in S2 generates query Q, key K and value V respectively by linear transformation of time series features and text features, and uses the scaled dot product attention formula Calculate inter-modal correlation scores , and through the dynamic weight formula Adjust the text feature weights by a scaling factor Weighted fusion is achieved after balancing feature weights, where T represents transposition; The sequence prediction module in S2 processes the embedded sequence through a multi-head self-attention mechanism, which projects the embedded sequence into multiple subspaces and calculates the attention weight matrix of each subspace in parallel. ,in i Represents the first i An attention head, Q i is the query matrix, K i is the bond matrix, V i is a value matrix used to calculate the attention weight in the subspace; Then splice and pass through the feedforward neural network Enhanced nonlinear expression, where x represents the feature vector input to the feedforward neural network, W 1 and W 2 are the weight matrices of different layers, b 1 and b 2 To correspond to the bias term, the nonlinear transformation of the features is achieved through matrix operations and activation functions; then after residual connection and layer normalization, the prediction sequence is generated by the linear function y=xW+b, where W is the prediction layer weight matrix and b is the bias; subsequently, the feedforward neural network is used to enhance the nonlinear expression ability of the features, and the training stability is optimized through residual connection and layer normalization; finally, the processed features are mapped to the target space through the linear prediction function to generate a prediction sequence for multiple time steps in the future.

2. The vehicle flow prediction method based on a bimodal optimization embedded learning model according to claim 1 is characterized in that: The time series data includes traffic volume, vehicle speed and lane occupancy, and the text data includes traffic event descriptions, congestion complaint information and road construction reminder content.

3. The vehicle flow prediction method based on a bimodal optimization embedded learning model according to claim 1 is characterized in that: The data preprocessing in S1 uses a filtering algorithm to remove noise in the data, uses an outlier detection algorithm to identify and process abnormal data points, and then uses a normalization formula to convert the data so that data from different data sources have the same scale.

4. The vehicle flow prediction method based on a bimodal optimization embedded learning model according to claim 1 is characterized in that: The sequence prediction module in S2 performs vehicle flow sequence prediction based on the integrated features, adopts a layer-normalized pre-Transformer architecture, and has a number of hidden units in the range of [200, 800]. The number of hidden units is adjusted according to the amount of data and the length of the time series. The number of training iterations is in the range of [1000, 5000], and the learning rate is in the range of [0.001, 0.01]. The learning rate and number of iterations are adjusted according to the convergence speed and performance during training.

5. The vehicle flow prediction method based on a bimodal optimization embedded learning model according to claim 1 is characterized in that: The customized traffic event prompt template in S2 refers to a text template containing the structured fields "[event type], [road section name] and [impact level]" to guide GPT-2 to process traffic-related text, so that the semantic vector output by the model contains key information such as the type of traffic event, the location of occurrence and the impact level.

6. The vehicle flow prediction method based on a bimodal optimization embedded learning model according to claim 1 is characterized in that: The future time period division in S2 refers to the demand for real-time control, management decision-making and strategic planning in the field of traffic forecasting, including short-term of 5-15 minutes, medium-term of 1-3 hours and long-term of 1-7 days; the accuracy of the prediction results is evaluated by the mean square error and mean absolute error indicators.

7. A vehicle flow prediction system based on a bimodal optimization embedded learning model, characterized by A vehicle flow prediction method based on a bimodal optimization embedding learning model as described in any one of claims 1 to 6 above includes a data preprocessing module, a bimodal encoding module, an attention alignment module and a sequence prediction module.

Citation Information

Patent Citations

  • CEEMDAN-RF-LSTM-based traffic flow time sequence data prediction method and system

    CN117574080A

  • Urban road traffic flow state prediction method and system based on big data

    CN118447687A