Bus bunching prediction model and system based on time-aware network

By combining a time-aware long short-term memory network and a dual attention mechanism, the problems of non-uniform intervals and noise processing in bus queue prediction are solved, achieving more accurate bus queue prediction.

CN121638899APending Publication Date: 2026-03-10BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively capture the time dependence of non-equal intervals and handle noise in bus string prediction, resulting in low prediction accuracy.

Method used

A bus queue prediction model is constructed by using a time-aware long short-term memory network, combined with Fourier analysis for data denoising, and introducing a dual attention mechanism.

Benefits of technology

It improves the accuracy of bus queue prediction, can adapt to non-equal time intervals and remove noise, and enhances the stability and reliability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638899A_ABST
    Figure CN121638899A_ABST
Patent Text Reader

Abstract

The invention discloses a bus bunching prediction method and system based on a time-aware network. The method comprises the following steps: preprocessing bus arrival data, fusing multi-source spatial-temporal characteristics, introducing time period codes, and processing abnormal and missing values; targeted denoising is performed on data with different characteristics based on Fourier analysis, so that the data quality is improved; a time perception neural network is established, local features and long-term dependence are captured through a CNN-LSTM architecture, a time decay factor mechanism is introduced, dynamic modeling of a time sequence information importance decay process is realized, and a long-term rule of data and short-term disturbance after time calibration are effectively integrated; and a dual attention mechanism of time dimension and feature dimension is fused, key features are extracted and integrated, and multi-step prediction of bus bunching is realized. According to the method, the non-linear relation and the space-time dynamic rule of the bus data can be fully captured, and the problem of unequal intervals in a bunching time sequence is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of bus bunching prediction, and particularly relates to a bus bunching prediction model and system based on a time-aware network. BACKGROUND

[0002] At present, a large number of studies have been carried out on bus bunching event prediction models, but the bus bunching prediction models based on traditional machine learning such as SVM and lightGBM lack consideration of the time correlation between factors. The patent “Bus bunching prediction method based on IC card data” (CN201510483302.3) adopts a least squares support vector machine (LS-SVM) algorithm. The paper “Bus route bunching state recognition method based on LightGBM model” (Transportation Information and Safety, 2022, 40(5): 102-111) proposes a LightGBM model based on Bayesian parameter optimization to identify the bunching state of the line on the basis of extracting the significant influencing factors of bus bunching, and the performance is better than that of XGBoost and other comparative models. The paper “Using automatic vehicle location data to model and identify determinants of bus bunching” (Transportation Research Procedia, 2017, 25: 1444-1456) uses gene expression programming and decision tree methods to achieve accurate estimation of the bunching phenomenon. The paper “On the tradeoff between sensitivity and specificity in bus bunching prediction” (Journal of Intelligent Transportation Systems, 2021, 25(4): 384-400) constructs a logistic regression model to predict the possibility of bus bunching. However, these traditional machine learning models have limitations in automatically capturing nonlinear relationships and processing massive high-dimensional data, resulting in low prediction accuracy.

[0003] A small number of studies use BP neural network model, LSTM and other shallow models to predict bus bunching, such as the patent "Bus bunching prediction method and system" (CN202310468607.1) constructs an LSTM-Att model, but is limited to the fact that the LSTM model can only process equal-length interval time series data, resulting in low prediction accuracy of the model. Traditional machine learning models (such as support vector machines, autoregressive integrated moving average models, and random forests) have difficulty effectively capturing the nonlinear relationships in bus arrival data due to their inherent linear assumptions. In contrast, deep learning models, with their powerful data processing capabilities and ability to capture complex nonlinear patterns, have become an important research direction in the field of bus bunching prediction. However, due to the interference of multiple dynamic factors during bus operation, the bus arrival time series data is non-equally spaced, and the fixed memory update mechanism of existing LSTM models cannot fully capture the time dependence under non-equally spaced intervals, resulting in some impact on the prediction effect.

[0004] The current mainstream Transformer model has attracted widespread attention in the field of time series modeling due to its unique self-attention mechanism, but the computational complexity of this mechanism increases quadratically with the sequence length, resulting in significant computational overhead. This not only increases the time cost of model training and inference, but also may cause model overfitting due to parameter redundancy, making it difficult to adapt to the real-time prediction business needs of the bus scheduling system.

[0005] More importantly, due to the ease of interference during the collection of original bus arrival time series data, it often contains a large amount of noise, and existing research has shown insufficient work in data denoising, further affecting the accuracy of the prediction model.

[0006] In summary, on the one hand, existing technologies have difficulty accurately capturing dynamic time dependence due to the fixed memory update mechanism of traditional models such as LSTM, which is typical of non-equally spaced characteristics of bus time series data. On the other hand, existing research has not paid enough attention to the large amount of impulse noise and high-frequency jitter in the original data, and lacks an appropriate denoising method, resulting in low prediction accuracy of the model. SUMMARY

[0007] In the face of the problems and improvement needs of existing technologies, the present application proposes a bus bunching event prediction model that integrates a time-aware neural network. By designing a time-aware long short-term memory network, the LSTM module is corrected by incorporating time interval information. Finally, a dual attention mechanism module is introduced to integrate and extract diverse features. This not only preserves the long-term dependence memory capability, but also accurately captures short-term fluctuations in the sequence, effectively solving the non-equally spaced problem in the bunching time series, thereby improving the prediction accuracy of the bunching event prediction model.

[0008] The technical solutions of the present application are as follows: Step 1: complete the bus arrival data set preprocessing; Step 2: bus arrival data denoising based on Fourier analysis; Step 3: time-aware neural network building; Step 4: arrival time prediction model fusing double attention mechanism. Step 1 completes the preprocessing of the bus arrival data set, specifically including: Step 1.1: collect bus operation multi-source data, including the number of traffic lights, weather, holiday information and bus arrival time data at each station on the same line, sort the stations in ascending order of station number and sort the train number from early to late according to the departure time; Step 1.2: based on the collected arrival time data, determine the arrival time of each train ( ) at each station ( ) , and the time of the previous train arriving at the current station and the previous station is and ; when the train number is , calculate the interval running time of the current train between adjacent stations, i.e. , and calculate the headway of adjacent trains at the same station, i.e. ; Step 1.3: perform outlier and missing value processing on the data: if the arrival time of a station in the same train is earlier than that of the previous station or later than that of the next station, delete the arrival time of the station; if the arrival time of a station is missing, use the linear interpolation of the arrival times of the previous and next stations in the same train to complete it.

[0009] Step 1.4: based on the original time characteristics, construct periodic time encoding, extract the hour part of the arrival time, calculate the periodic characteristics and through trigonometric functions, and obtain the time difference feature by combining time series difference; Step 2: bus arrival data denoising based on Fourier analysis, specifically including: Step 2.1: apply fast Fourier transform to the preprocessed time domain signal , convert the signal to the frequency domain, and obtain the corresponding frequency spectrum function ; Step 2.2: Analyze the energy distribution of the spectrum, locate the frequency band with noise concentration according to the set energy threshold, and select the noise reduction method according to the data characteristics. The specific steps are as follows: S1. The vehicle-to-station interval signal has a relatively gentle change characteristic, and contains important low-frequency trends and sudden pulses that may be caused by transient events. An adaptive filtering method is used for processing: wherein, is the filter coefficient ( ), which determines the degree of trust in the new sampled value, is the input signal at the current time, is the output signal at the current time, is the output signal at the previous time; S2. The time difference sequence is prone to high-frequency jitter and outliers, and a low-pass filtering method is used for processing: wherein, represents the distance of the frequency point to the center of the spectrum, is the cutoff frequency, which is the threshold value that distinguishes high and low frequencies; S3. Other features cannot determine their specific patterns, but the signal energy is usually concentrated in a specific frequency band, and the noise is correspondingly distributed in the external area. A band-pass filtering method is used for processing: wherein, is the lower limit cutoff frequency of the passband frequency range, is the upper limit cutoff frequency of the passband frequency range.

[0010] Step 2.3: Smooth the signal boundary using the Hanning window function to reduce the noise generated by signal truncation, and obtain the filtered spectrum ; Step 2.4: Perform inverse Fourier transform on the filtered spectrum to reconstruct the time-domain signal from the frequency-domain signal, and finally obtain the clean signal after noise reduction . Step 3: Build a time-aware neural network, which includes: Step 3: Build a time-aware neural network module, which is as follows: Step 3.1: Construct the preprocessed time series data into an input sequence , perform one-dimensional convolution operation on the input sequence and process it through the ReLU activation function to obtain the convolution output; apply Dropout operation to the convolution output to obtain the output sequence; perform all-time step feature average global average pooling method on the output sequence according to the feature channel to obtain the local feature vector; Step 3.2: Perform linear transformation and hyperbolic tangent activation on the cell state of the previous time step of the LSTM to decompose the cell state into short-term memory components Then, based on the time interval of the adjacent time and the learnable decay weight vector , a time decay factor is calculated . Then, the short-term memory component is combined with the time decay factor to obtain the time-modulated short-term memory , the long-term memory subspace is obtained by subtracting the short-term memory component from the original cell state , and then the adjusted cell state is formed by adding the modulated short-term memory ; Step 3.3: input the adjusted cell state , the hidden state of the previous time and the feature of the current time into the standard LSTM unit to obtain the output , hidden state and cell state of the current time:

[0011] Step 4: build a station arrival time prediction model with a fusion dual attention mechanism, which includes: Step 4.1: input the hidden state sequence of the time-aware LSTM output into the multi-head attention layer, for each attention head , the single attention head output is obtained by calculating the association between the query, key and value and normalizing, the attention head outputs are spliced and linearly transformed to obtain the attention output sequence in the time dimension, and finally the global average pooling is performed on the sequence along the time dimension to generate the time context vector ; Step 4.2: perform dimension transformation on the input feature tensor to obtain , and generate a feature token matrix by linear projection, which is used as the query, key and value to input into another multi-head attention layer to obtain the feature dimension attention output sequence; perform global average pooling on the sequence to generate a vector representing the importance of the feature dimension ; Step 4.3: splice the local feature vector extracted by CNN , the global sequence feature vector extracted by the time-aware LSTM , the time context vector , and the feature dimension importance vector to form a fusion feature vector , and apply Dropout operation to the fusion feature vector to prevent model overfitting Step 4.4: input the fusion vector after Dropout processing The input full connection layer is activated by a ReLU function to obtain an intermediate feature vector Finally, the intermediate feature vector is input into an output layer to generate a final prediction result of the bus arrival time wherein, is an output layer weight matrix, is an output layer bias vector.

[0012] Step 4.5: In the same bus route and the same driving direction, according to the prediction arrival results of the two buses, the prediction arrival time of the nth bus is recorded as , the prediction arrival time of the n-1th bus is , and the headway time of the two buses is ; based on the departure interval of the two buses on the bus route, the string car judgment threshold is set as which is 1 / 2 of the departure interval; the calculated headway time of the two buses is compared with the string car judgment threshold , if , it is determined that the adjacent buses have a string car risk.

[0013] Advantages Compared with the known prior art, the technical scheme provided by the present application has the following advantages: The present application realizes the fine prediction of the bus string car risk by fusing multi-source spatio-temporal data, local feature extraction of convolutional neural network, non-equidistant sequence modeling capability of time-aware long short-term memory network and feature importance quantification capability of double attention mechanism. The constructed time-aware LSTM can distinguish short-term disturbance information from long-term stable mode in the cell state and dynamically attenuate and adjust the short-term memory based on the real time interval, thereby effectively adapting to the non-equidistant time distribution characteristics commonly existing in the bus arrival data. The introduced time dimension and feature dimension multi-head attention module can capture the influence difference of different time steps on the prediction task and the importance of different feature dimensions, respectively, which helps to improve the sufficiency of feature utilization and the model interpretability. Through multi-level feature fusion of CNN, time-aware LSTM and double attention module, the present application realizes the joint modeling of local changes, long-term trends and multi-dimensional feature contributions, and can obtain more stable and reliable prediction results in complex traffic scenarios, thereby improving the adaptability of the model to abnormal station stop, short-term congestion and time drift. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 is a flowchart of the bus string car prediction model and system based on the time-aware network of the present application.

[0015] Figure 2This is a framework diagram of the time-aware long short-term memory network model proposed in this invention. Detailed Implementation

[0016] This invention proposes a bus queue prediction model and system based on a time-aware network, characterized by the following steps: Step 1: Preprocessing the bus arrival dataset; Step 2: Denoising bus arrival data based on Fourier analysis; Step 3: Building a time-aware neural network; Step 4: Arrival time prediction model integrating dual attention mechanism.

[0017] The specific implementation method is as follows: Step 1: Preprocessing the bus arrival dataset.

[0018] Step 1.1: Collect multi-dimensional operational data for each bus arriving at each bus stop, including the number of traffic lights, weather, holiday information, and arrival time data for each bus at each stop on the same route. Taking the arrival time of Beijing Bus Route 52 (Pingleyuan-Dianchang Xincun direction) on August 6, 2025 as an example, sort the stops in ascending order by stop number, and sort the bus numbers in order of departure time from morning to evening. The sorted bus arrival time data is shown in the following example: Table 1. Sample bus arrival time data

[0019] Step 1.2: Based on the collected arrival time data, obtain the train numbers on the route. ( Arrive at the bus stop ( Arrival time and train numbers Arrive at the bus stop and The times are respectively and and in Calculate train number On the site With the site The interval running time between these intervals is calculated using the following expression: ; exist The time is based on the arrival time of two adjacent trains at the same station. and Calculate the headway The calculation formula is: ; Table 2. Examples of calculation results for the two indicators

[0020] Step 1.3: Perform outlier handling on the collected data. If the same train meets the criteria... or Then delete the corresponding For missing arrival time use Complete the data and normalize it. Specifically: This refers to the arrival time of the bus at the previous stop for the same train / bus service. This refers to the arrival time of the bus at the next stop for the same train service.

[0021] Step 1.4: Construct a periodic time code based on the original time features and extract the arrival time. hourly portion ,pass and Calculated periodic characteristics and and time difference features obtained based on time series differencing. ; Table 3. Examples of Normalization Processing for Bus Arrival Data

[0022] Step 2: Denoise bus arrival data based on Fourier analysis.

[0023] Step 2.1: Process the preprocessed time-domain signal By applying the Fast Fourier Transform technique to transform it into the frequency domain for analysis, the corresponding spectrum function can be obtained. :

[0024] in, Angular frequency, It is a complex exponential function.

[0025] Step 2.2: Spectrum The energy distribution is analyzed, and the frequency bands where noise is concentrated are identified and located based on the set energy threshold. Different denoising methods are selected according to the characteristics of the train: the vehicle arrival interval signal has the characteristic of relatively smooth changes. For the important low-frequency trends and sudden pulses that may be caused by instantaneous events, an adaptive filtering method is used for processing.

[0026] in, For filter coefficients ( This determines the level of trust in the new sampled values. The input signal at the current moment, The output signal at the current moment. This is the output signal from the previous moment; because Time difference sequences are prone to high-frequency jitter and outliers. This paper introduces a low-pass filter to suppress their effects. The expression is as follows:

[0027] in, This represents the distance from a frequency point to the center of the spectrum. The cutoff frequency is the threshold that distinguishes between high and low frequencies.

[0028] For other characteristics, although their specific patterns cannot be determined, signal energy is usually concentrated in a specific frequency band, while noise is correspondingly distributed in the external region. Therefore, a bandpass filtering method is used.

[0029] in, This is the lower cutoff frequency of the passband frequency range. The upper cutoff frequency of the passband frequency range Step 2.3: Use the Hanning window function to smooth the signal boundaries and obtain the filtered spectrum. For length of N The coefficient of the Hanning window can be calculated using the following formula:

[0030] in, It is the first The weights of each sample point; It is the length of the window; Step 2.4: By analyzing the filtered spectrum By performing inverse Fourier transform processing, the signal is reconstructed from the frequency domain to the time domain, ultimately yielding a clean, denoised signal. :

[0031] Step 3: Building a time-aware neural network.

[0032] Step 3.1: Construct the input sequence from the preprocessed time series data. The input sequence is subjected to a one-dimensional convolution operation and then activated by ReLU to obtain the convolution output:

[0033] in, It is the sequence length. It is the input feature dimension. This represents a one-dimensional convolution operation. Represents the convolution kernel weight parameters. Indicates the bias parameter. This represents the feature matrix after convolution; Apply Dropout to the convolutional output, and during training, use probability... p =0.4 Randomly set the output of some neurons to zero to obtain the output sequence:

[0034] in, This indicates a random deactivation operation. This represents the feature matrix after Dropout processing; Global average pooling is performed on the output sequence along each feature channel dimension, and the features at all time steps are averaged to obtain the local feature vector. :

[0035] in, This indicates a global average pooling operation. This shows the extracted local feature vector. Representation matrix At time step Output all feature channels.

[0036] Step 3.2: Record the cell state from the previous time step. A linear transformation and tanh activation are performed to decompose the cell state into short-term memory components, where the short-term memory components... The calculation expression is:

[0037] in, This is the short-term memory mapping weight matrix. For bias vectors, The number of LSTM cells, It is the hyperbolic tangent activation function; Based on the time interval between the current step and the previous step, a learnable decay weight vector is introduced. The time decay factor is calculated using the following formula:

[0038] in, The time interval between two adjacent moments. This is the time decay weight vector. To take the absolute value of each element, Element-by-element multiplication It is an exponential function; The short-term memory component is multiplied element-wise by the decay factor to obtain the time-modulated short-term memory. Its formula is: ; Subtracting the short-term memory component from the cell state at the previous moment yields the long-term memory complement space. And added to the modulated short-term memory to form the adjusted cellular state. Its formula is:

[0039]

[0040] in, For long-term memory complement space, The adjusted cell state; Step 3.3: Adjust the cell state The hidden state of the previous moment and current time feature input Input a standard LSTM cell to obtain the output at the current time step. Hidden state With cell state :

[0041] The formula for a standard LSTM cell is as follows: Forgotten Gate: ; Input Gate: ; Candidate cell status: ; Cell status update: ; Output gate: ; Hidden status update: ; in, In hidden state, Input features for the current time step. 、 、 、 This is the weight matrix corresponding to the gating. 、 、 、 It is the bias vector; This is the Sigmoid activation function.

[0042] Step 4: Arrival time prediction model integrating dual attention mechanism.

[0043] Step 4.1: Process the hidden state sequence output by the time-aware LSTM branch. The input is fed into a multi-head attention layer, where For the first The hidden state at each time step For the hidden layer dimension, The sequence length; For each attention head The output calculation formula is:

[0044] in, To query the projection matrix of the key, For the first The learnable parameter matrix corresponding to each attention head and For the projection dimension, Scaling factor A normalization function executed over time. Will The attention head outputs are concatenated and linearly transformed to obtain the attention output sequence in the time dimension. , ,in, This is for outputting the projection matrix.

[0045] right Perform global average pooling along the time dimension to generate a time context vector:

[0046] in, .

[0047] Step 4.2: Convert the input feature tensor Dimensional transformation is performed to obtain ,in The input feature dimension.

[0048] right The feature token matrix is ​​obtained by performing linear projection:

[0049] in: Let be the projection matrix. For bias vectors, Will As another multi-head attention layer for the input of Query, Key, and Value, we obtain the attention output sequence along the feature dimensions. And perform global average pooling:

[0050] in, This represents the importance of the feature dimension.

[0051] Step 4.3: Concatenate the following four types of feature vectors to form a fused feature vector. :

[0052] in, Local features extracted by CNN Global sequence features extracted by time-aware LSTM. Time-dimensional attention context vector For the feature dimension, the attention feature vector; Applying Dropout to the fusion vector yields:

[0053] Dropout is a random deactivation operation; Step 4.4: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require Input a fully connected layer and use the ReLU activation function to obtain intermediate feature vectors:

[0054] in, Here is the weight matrix of the fully connected layer. For bias vectors, It is a linear rectified function; Will Input and output layers generate the final prediction result: ,in, This is the output layer weight matrix. This is the output layer bias vector. This is the final predicted value.

[0055] Step 4.5: On the same bus route and in the same direction of travel, based on the predicted arrival times of the two buses, record the predicted arrival time of the nth bus as... The predicted arrival time of the (n-1)th bus is The headway between the two vehicles was obtained as follows: Based on the departure interval between the two buses on this bus route, a threshold for determining bus overlap is set. The departure interval is 1 / 2; the calculated headway between the two trains is used as the headway. Its threshold for determining the number of vehicles in a row If a comparison is made, If so, it is determined that there is a risk of the adjacent buses crossing lanes.

[0056] This study selects Mean Square Error (MSE) as the loss function. This metric calculates the average of the squared differences between predicted and true values. Its core advantage lies in its more significant penalty effect on larger errors, guiding the model to prioritize reducing key biases and better reflecting the characteristics of data distribution in traffic flow prediction scenarios. During the model training phase, the Adam optimizer is used to iteratively adjust the core hyperparameters. MSE Minimizing the value is the goal of adaptive optimization of model parameters. MSE The calculation formula is as follows:

[0057] in This is the actual value.

[0058] To demonstrate the innovativeness and effectiveness of this invention, this application selects Mean Absolute Error (MAE) and Mean Square Error (MSE) as comparison metrics, and conducts comparative experiments between the proposed Time-Aware Long Short-Term Memory Network and traditional Long Short-Term Memory Networks (LSTM) and Transformer series neural networks. The results are shown in Table 4 below: Table 4

[0059] The observation table shows that, compared with traditional LSTM and Transformer series models, the time-aware long short-term memory network proposed in this application can dynamically adjust the contribution of short-term memory and integrate a dual attention mechanism, which greatly improves the model's prediction accuracy.

[0060] To demonstrate the effectiveness of each module in this model, we selected... MSE , MAE , Ablation experiments were conducted to evaluate the indicators, and the results are shown in Table 5 below: Table 5

[0061] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A bus stringing vehicle prediction model and system based on a time-aware network, characterized in that, The method comprises the following steps: Step 1: bus arrival data set preprocessing; Step 2: bus arrival data denoising based on Fourier analysis; Step 3: time-aware neural network building; Step 4: bus string car prediction model fusing double attention mechanism. 2.The time-aware network-based bus bunching prediction model and system according to claim 1, wherein, The bus arrival data set preprocessing step of step 1 specifically comprises: Step 1.1: collecting bus operation multi-source data, including the number of traffic lights, weather, holiday information and bus arrival time data at each station on the same line, sorting the arrival time data by station number in ascending order and by departure time from early to late; Step 1.2: Based on the collected arrival time data, determine the train numbers on the route. ( Arrival at each station ( Arrival time and the previous train Arrive at the current station Compared to the previous station The times are respectively and When the train number At that time, calculate the current train number. Inter-station travel time ,Right now And calculate the headway of adjacent trains at the same station. ,Right now ; Step 1.3: processing abnormal values and missing values: if the arrival time of a station is earlier than that of the previous station or later than that of the next station in the same car, delete the arrival time of the station; if the arrival time of a station is missing, use the linear interpolation of the arrival time of the previous and next stations in the same car to complete it; Step 1.4: based on the original time characteristics, construct the periodic time coding, extract the hour part of the arrival time, calculate the periodic characteristics through the trigonometric function, and get the time difference characteristics by combining the time series difference. 3.The time-aware network based bus bunching prediction model and system according to claim 1, wherein, The bus arrival data denoising based on Fourier analysis of step 2 specifically comprises: Step 2.1: Pre-processing of the time domain signal Applying a Fast Fourier Transform, the signal is converted into the frequency domain, resulting in a corresponding spectral function ; Step 2.2: analyze the energy distribution of the frequency spectrum, locate the frequency band where the noise is concentrated according to the set energy threshold, and select the denoising method according to the data characteristics: the vehicle arrival interval signal has the characteristics of relatively gentle change, and the adaptive filtering method is used to process it; the time difference sequence is easy to contain high-frequency jitter and abnormal values, and the low-pass filtering method is used to process it; other characteristics cannot be determined, but the signal energy is usually concentrated in a certain frequency band, and the noise is correspondingly distributed in the external area, and the band-pass filtering method is used to process it; Step 2.3: Smooth the signal boundary with Hanning window function to reduce the noise caused by signal truncation, and get the filtered frequency spectrum ; Step 2.4: Inverse Fourier transform of the filtered spectrum performing inverse Fourier transform to reconstruct the time-domain signal from the frequency-domain signal, and finally obtaining the clean signal after denoising . 4.The time-aware network based bus bunching prediction model and system according to claim 1, wherein, The time-aware neural network building module of step 3 specifically comprises: Step 3.1: Constructing the pre-processed time series data into an input sequence performing one-dimensional convolution operation on the input sequence and processing it through a ReLU activation function to obtain a convolution output; performing a Dropout operation on the convolution output to obtain an output sequence; performing an average global pooling method on all time step features on the output sequence according to the feature channel to obtain a local feature vector; Step 3.2: Decompose the cell state into short-term memory component and long-term memory component by performing linear transformation and hyperbolic tangent activation ; then compute the time decay factor based on the time interval of adjacent time steps and a learnable decay weight vector ; combine the short-term memory component with the time decay factor to obtain the time-modulated short-term memory ; subtract the short-term memory component from the original cell state to obtain the long-term memory complement subspace ; and add the modulated short-term memory to the long-term memory complement subspace to form the adjusted cell state Step 3.3: Adjust the cell state , the hidden state of the previous time step and the features of the current time step input into the standard LSTM unit to get the output of the current time step , the hidden state and the cell state : . 5.The time-aware network based bus bunching prediction model and system according to claim 1, wherein, The bus arrival time prediction model fusing double attention mechanism of step 4 specifically comprises: Step 4.1: output the hidden state sequence of the time-aware LSTM Input the multi-head attention layer, and input the query, key and value of each attention head , and obtain the output of a single attention head by calculating the correlation of the query, key and value and normalizing, and concatenate and linearly transform the outputs of the multiple attention heads to obtain an attention output sequence in the time dimension, and finally perform global average pooling on the sequence along the time dimension to generate a time context vector ; Step 4.2: Dimension transformation on input feature tensor to get , and generate feature token matrix by linear projection, input the matrix as query, key, value to another multi-head attention layer to get feature dimension attention output sequence; perform global average pooling on the sequence to generate vector representing importance of feature dimension Step 4.3: Concatenate the CNN-extracted local feature vector , the time-aware LSTM-extracted global sequence feature vector , the temporal context vector , the feature dimension importance vector to form a fusion feature vector; apply a Dropout operation to the fusion feature vector to prevent model overfitting; Step 4.4: input the fusion vector after Dropout processing into the full connection layer, get the intermediate feature vector through the ReLU activation function, and finally input the intermediate feature vector into the output layer to generate the final prediction result of the bus arrival time; Step 4.5: According to the prediction results of the two buses, the prediction arrival time of the nth bus is recorded as , and the prediction arrival time of the n-1th bus is recorded as , and the headway time of the two buses is obtained as ; based on the departure interval of the two buses on the bus route, the string car judgment threshold is set as 1 / 2 of the departure interval; the calculated headway time of the two buses is compared with the string car judgment threshold , if , it is determined that the adjacent bus has a string car risk.

Citation Information

Patent Citations

  • Bus bunching predication method based on IC card data

    CN105206040A

  • Bus bunching prediction method and system

    CN116596126A