Riding traffic behavior prediction and indication system

By deploying IMU and Transformer-LSTM models on cycling tools to collect and process driving time series data in real time, the problems of low cost, low latency and accuracy in cycling behavior prediction in existing technologies are solved, the technical challenges of cycling in complex environments are achieved, cycling safety is improved, high-precision, low-latency cycling behavior prediction and prompts are achieved, and traffic safety is enhanced.

CN120687913APending Publication Date: 2025-09-23UNIV OF SHANGHAI FOR SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510866904.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing cycling behavior prediction technologies have difficulty achieving low-cost, low-latency, and high-precision real-time predictions in complex urban environments. Traditional methods are greatly affected by the environment, have complex data processing, and lack model generalization capabilities.

Method used

The system uses an IMU unit and processor deployed on a cycling vehicle, combined with a pre-trained Transformer-LSTM hybrid model. The IMU collects driving time series data in real time, uses the Transformer to extract global features, and the LSTM to capture local features. It generates behavior prediction results and prompts other traffic participants through a behavior indicator device.

Benefits of technology

It achieves high-precision, low-latency prediction of riding behavior, improves riding safety, and can accurately predict and prompt riding intentions in real time in complex urban environments, enhancing traffic safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687913A_ABST
    Figure CN120687913A_ABST
Patent Text Reader

Abstract

The invention relates to a riding traffic behavior prediction and indication system, which is deployed on a riding vehicle and comprises a processor, an IMU unit and a behavior indication device, the IMU unit and the behavior indication device are electrically connected with the processor, and the IMU unit is used for collecting the driving time sequence data of the riding vehicle in real time; the processor adopts a pre-trained Transform-LSTM hybrid model to process the driving time sequence data, specifically, the driving time sequence data is preprocessed, and then global features are extracted through a multi-head self-attention mechanism of Transform; local features are captured through LSTM, and a feature vector of the last time step is output and comprises comprehensive representation of global and local time sequence information; and finally, through full connection layer mapping classification, outputting a vehicle driving behavior prediction result, and generating a corresponding control signal. And the behavior indication device correspondingly displays the driving behavior prompt information according to the control signal. Compared with the prior art, the riding behavior can be accurately predicted in real time and prompted to other traffic participants, and the driving safety is improved.
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 cycling traffic behavior prediction and indication system. Background Art

[0002] With the global push for sustainable transportation, bicycles, electric bicycles, and other vehicles are becoming increasingly important in urban transportation systems. However, cyclists are a vulnerable group among road users and face numerous safety risks when riding on public roads. When preparing to make a turn or change lanes, cyclists must first observe their surroundings and then use hand gestures to alert other traffic participants. However, behaviors such as looking back and holding the handlebars with one hand carry inherent risks. Therefore, developing a system that can predict and communicate cycling behavior is crucial for improving cycling safety.

[0003] Traditional cycling behavior prediction technologies fall into two main categories: camera-based external observations and inertial measurement unit (IMU)-based bicycle kinematic analysis. Camera-based methods are significantly affected by the environment, require complex data processing, are costly, and difficult to implement on a large scale. Inertial measurement unit (IMU)-based methods, however, are ideal for capturing cycling data due to their low cost, small size, high robustness, and ease of integration. However, in practice, IMUs are susceptible to vibration and bias, which can affect data quality.

[0004] In addition, existing research uses machine learning methods and deep learning models to predict cycling behavior, but traditional machine learning methods have weak generalization capabilities for multi-dimensional time series data and find it difficult to capture the global and local characteristics of complex cycling behaviors; deep learning models such as recurrent neural networks and long short-term memory networks have insufficient global modeling capabilities when processing long sequence data.

[0005] In summary, the current technical solutions for predicting and identifying cycling behavior are difficult to achieve low-cost, low-latency, and high-precision real-time prediction in complex urban environments, which is not conducive to achieving safe driving. Summary of the Invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a cycling traffic behavior prediction and indication system, which can accurately predict cycling behavior in real time and prompt other traffic participants, thereby improving driving safety.

[0007] The objectives of the present invention can be achieved through the following technical solutions: a cycling traffic behavior prediction and indication system, deployed on a cycling vehicle, comprising a processor and an IMU unit electrically connected thereto and a behavior indication device, wherein the IMU unit is used to collect real-time driving time series data of the cycling vehicle, including three-axis acceleration and three-axis angular velocity; The processor uses a pre-trained Transformer-LSTM hybrid model to process driving time series data, output vehicle driving behavior prediction results, and generate corresponding control signals; The behavior indication device displays driving behavior prompt information according to the control signal.

[0008] Furthermore, the IMU unit includes two IMUs respectively installed at the frame position and the handlebar position.

[0009] Furthermore, the processor is also connected to a memory, which is used to store the driving time series data collected in real time by the IMU unit and the driving behavior prediction results output by the processor.

[0010] Furthermore, the working process of the processor includes: S1. Preprocessing driving time series data; S2, extracting global features from the pre-processed driving time series data through the Transformer's multi-head self-attention mechanism; S3, using LSTM (Long Short-Term Memory) to capture local features from global features and output the feature vector of the last time step, obtaining a comprehensive representation that includes global and local temporal information; S4. Map the feature vector to an N-dimensional output space through a fully connected layer, and correspond to N categories of driving behaviors respectively.

[0011] Furthermore, the specific process of the pre-processing in step S1 is: standardizing the driving time series data by using the mean and standard deviation; The normalized driving time series data is projected into a 64-dimensional high-dimensional feature space through a linear mapping layer; Standard sine and cosine formulas are used to add positional encoding to the data.

[0012] Furthermore, the formula for the standardization process is: in, and are the characteristic mean and standard deviation, To prevent division by zero errors, x is any dimension of driving time series data; The formula for projecting to the 64-dimensional high-dimensional feature space is: in, T is the time step, B is the batch size; The formula for the position encoding is: in, POS is the sequence position, i is the dimension index, d = 64-dimensional feature dimension.

[0013] Furthermore, the specific process of step S2 is as follows: The preprocessed driving time series data is compared with three different linear transformation matrices W Q 、 W K 、 W V Multiply and generate Query 、 Key and Value , that is, the query Q ,key K Sum V , the dimensions are d k , where the preprocessed driving time series data contains multiple sets of input variables, W Q 、 W K 、 W V Query Q ,key K ,value V The weight matrix of After linear transformation, we get Q 、 K and V The matrix is ​​divided into several heads, each with its own independent Query 、 Key and Value Matrix, for each head, a scaled dot product attention is performed ( Scaled Dot-Product Attention ) operation to obtain the corresponding single-head attention result; Based on the multi-head attention mechanism, multiple single-head attention results are connected together to obtain global features corresponding to multiple groups of input variables.

[0014] Furthermore, in the multi-head attention mechanism, the single-head attention is expressed as the attention distribution weight formula. iThe attention distribution weights and probability distributions of the input variables satisfy , the formula is as follows: , in, Indicates the i The attention distribution weights of the input variables, It is i The attention scores of the input variables, is the probability distribution; The input variable And the corresponding attention distribution weight After multiplication, we can get the sum: ,in, Z It is the new expression of the input variable after being processed by the attention mechanism. is the multiplication matrix.

[0015] Furthermore, in step S3, LSTM captures local temporal features through a quadruple gating mechanism, and the feature dimension of LSTM is consistent with that of Transformer.

[0016] Furthermore, the fully connected layer in step S4 specifically maps the feature vector to a four-dimensional output space to correspond to the classification of four riding states, namely, going straight, turning left, turning right, and decelerating.

[0017] Compared with the prior art, the present invention has the following advantages: The present invention deploys a cycling traffic behavior prediction and indication system on a cycling vehicle. The system includes a processor, an electrically connected IMU unit, and a behavior indication device. The IMU unit collects the vehicle's driving time-series data (including three-axis acceleration and three-axis angular velocity) in real time. The processor processes this data using a pre-trained Transformer-LSTM hybrid model to output a prediction of the vehicle's driving behavior and generate corresponding control signals. The behavior indication device then displays driving behavior prompts based on the control signals. This system can accurately predict cycling behavior in real time and provide prompts to other traffic participants, improving driving safety.

[0018] In the present invention, the IMU unit includes two IMUs installed at the frame position and the handlebar position respectively. The IMU at the frame position can be used to compensate for the misjudgment of the IMU at the handlebar position. The dual IMU method can complement each other's shortcomings, thereby obtaining a high-precision and highly sensitive driving time series data feature sequence, which is conducive to subsequent accurate riding behavior prediction.

[0019] This paper uses a Transformer-LSTM hybrid model to process the three-axis acceleration and angular velocity detected by the IMU and predict riding behavior. It extracts global features through the Transformer's multi-head self-attention mechanism and captures local features through the LSTM. The model outputs a feature vector for the last time step, which contains a comprehensive representation of global and local temporal information. This model can better capture potential feature associations within the sequence and effectively capture long-term dependencies in temporal data. It addresses the shortcomings of traditional models in processing long-term temporal data, improves global and local feature extraction capabilities, and thus enhances the accuracy of riding behavior prediction.

[0020] The present invention maps the feature vector to a four-dimensional output space through a fully connected layer, and corresponds to four categories of driving behavior, namely going straight, turning left, turning right, and decelerating. The corresponding display is then made through a behavior indication device, which enables traffic participants behind to clearly know the next behavior of the cyclist in front in advance, thereby achieving safe driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the structure of the cycling traffic behavior prediction and indication system in the embodiment; Figure 2 This is a schematic diagram of the installation effect of the cycling traffic behavior prediction and indication system in the embodiment; Figure 3 Schematic diagram of the working process of the processor in the present invention; Figure 4 Schematic diagram of the framework flow of the traffic behavior prediction and indication system in the embodiment; Figure 5 Schematic diagram of the workflow of the Transformer-LSTM hybrid model in the embodiment; Figure 6 A comparison chart of the classification accuracy of the Transformer-LSTM hybrid model and the traditional model in the embodiment; Figure 7 This is a comparison chart of the F1 scores of the Transformer-LSTM hybrid model and the traditional model in the embodiment; Figure 8 Schematic diagram of the prediction delay of the Transformer-LSTM hybrid model in the embodiment; Figure 9 Schematic diagram of the training process of the Transformer-LSTM hybrid model and the traditional model in the embodiment; Description of the marks in the figure: 1. Processor, 2. IMU unit, 3. Behavior indication device, 4. Housing, 5. Battery. DETAILED DESCRIPTION

[0022] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] Example

[0024] This solution proposes a traffic behavior prediction and indication system, which is deployed on a vehicle, such as a bicycle, electric bicycle, two-wheeled electric vehicle or three-wheeled electric vehicle, and is used to predict the driving behavior of the vehicle, including going straight, turning left, turning right and decelerating.

[0025] like Figure 1 As shown, in this embodiment, the above-mentioned traffic behavior prediction and indication system includes a processor 1 and an IMU unit 2 and a behavior indication device 3 electrically connected to the processor 1, and also includes a housing 4. The processor 1 and the behavior indication device 3 are both installed in the housing 4. The housing 4 is usually installed at the rear of the vehicle, such as Figure 2 As shown, it can be used as a taillight, for example, and a battery 5 for supplying power to various electrical devices is also installed in the housing 4.

[0026] The IMU unit 2 is used to detect time-series vehicle driving data, including three-axis acceleration and three-axis angular velocity, for a total of six dimensions. In this embodiment, the IM948 sensor is used. In this embodiment, the vehicles have similar characteristics, including a frame and handlebars. Accordingly, two IMUs are configured, one mounted on the frame (e.g., below the seat) and the other on the handlebars.

[0027] Processor 1 analyzes the driving time series data detected by IMU unit 2 to predict the vehicle's driving behavior and generate corresponding control signals. Behavior indicator device 3 displays the driving behavior based on the control signals it receives, thereby conveying the driving intention to the outside world.

[0028] Specifically, the process of collecting data by IMU unit 2 includes: First, establish a rectangular coordinate system for the installation positions of the two IMUs and the center of the frame, such as Figure 2 As shown, the handlebars and the seat are the IMU coordinate systems. To reduce the error and make the results more stable, the two IMU coordinate systems are transformed into the frame center coordinate system. It represents the transformation matrix from the IMU coordinate system to the center coordinate of the frame; the connecting rod length l Indicates the length of the common perpendicular line between two joints on a connecting rod; connecting rod angle α Indicates the rotation angle from the IMU joint axis to the center joint axis of the frame; connecting rod offset Indicates the distance between common axes; joint angle Indicates the angle around the common axis, indicating the angle between the X-axis of the IMU coordinate system and the X-axis of the frame center coordinate system; according to the actual installation situation, a specific value can be entered to reduce the error. Figure 2 It can be seen that the two IMUs correspond to l, α, d, θ .

[0029] (1) The raw data read by the IMU are three-axis acceleration data and three-axis angular velocity data. It should be noted that in order to ensure the accuracy of the calculation, in actual calculations, the average of the two adjacent frames of data is generally taken as the data source. Combined with the actual installation position of the IMU, the motion equation of the IMU acceleration can be derived, namely formula (2) and formula (3). In the two formulas, the left side of the equal sign is the approximate value of the IMU acceleration. It represents the coordinate transformation matrix from the IMU coordinate system on the handlebar to the coordinate system of the center of the frame. It represents the coordinate transformation matrix from the IMU coordinate system under the seat to the coordinate system of the center of the frame. g is the local acceleration due to gravity, a is the acceleration of the vehicle itself, at the center of gravity, 、 represents zero bias, 、 Represents measurement noise. On bumpy roads, the noise from the handlebar-mounted IMU is particularly noticeable, significantly impacting acceleration. Because the IMU under the seat is close to the vehicle's center of gravity, its measured acceleration is relatively stable and less affected by vibration and uneven roads. Compared to frame-mounted IMUs, its data is smoother and more stable, thus more accurately reflecting overall motion.

[0030] (2) (3) The moment of inertia detected by the IMU on the handlebar is Indicates that the moment of inertia detected by the IMU under the seat is Expressed as follows, see formula (4) and formula (5). Where, G is the weight of the IMU, is the distance between the handlebar IMU and the riding center of gravity, It is the distance between the IMU under the seat and the riding center of gravity (usually small or close to 0). From the formula, we can see that the change in the moment of inertia on the handlebar is larger than that under the seat, which means that the IMU on the handlebar is more sensitive to small-amplitude operations and instantaneous changes.

[0031] (4) (5) (6) The torque detected by the IMU on the handlebar is used As shown in formula (7), the torque detected by the IMU under the seat is expressed as Expressed as formula (8), where is the angular acceleration of the handlebar, is the angular acceleration under the seat, and the two are equal, as shown in Formula (9). Analysis of the formula shows that the moment of inertia on the handlebar changes significantly, and the torque changes accordingly. The torque monitored by the IMU on the handlebar changes rapidly when the rider rotates rapidly, and the IMU on the handlebar can follow and adjust in time, showing high sensitivity.

[0032] (7) (8) (9) In summary, because the moment of inertia and torque are both calculated from acceleration and angular velocity data, a comparison of the moment of inertia and torque of the handlebar IMU and the seat IMU shows that the out-of-vehicle IMU responds more sensitively, while the seat IMU responds more stably. Therefore, the seat IMU can compensate for the misjudgment of the handlebar IMU. By proposing a dual IMU installation, they can complement each other's shortcomings and obtain a high-precision, high-sensitivity feature sequence.

[0033] In this embodiment, the processor 1 is configured as an edge computing platform based on the RK3566 chip, using the Ubuntu 20.04 system, and receives the data detected by the IMU unit 2 through the Bluetooth signal provided by the Bluetooth module (which is also arranged in the housing 4). Of course, in actual applications, the processor 1 and the IMU unit 2 can also be connected by wire.

[0034] In addition, the processor 1 may be connected to a memory for storing the time-series driving data collected by the IMU unit 2 and the driving behavior prediction results output by the processor 1. When multiple consecutive identical driving behaviors are stored, the processor 1 generates a corresponding control signal. The memory may also be arranged in the housing 4. The memory can receive and store the time-series driving data detected by the IMU unit 2 via Bluetooth signals provided by the Bluetooth module. The time-series driving data is stored in the memory in a table file. The processor 1 analyzes and processes the data stored in the table file and outputs a control signal.

[0035] It is easy to understand that since the motion state of a vehicle changes very sensitively during driving, in order to avoid misjudgment, the prediction result output by the processor 1 will first be saved in the buffer of the memory. When multiple consecutive (i.e., more than two, which can be configured according to actual conditions) identical prediction results are accumulated and stored in the buffer, the processor 1 outputs a control signal to the behavior indication device 3, thereby displaying the driving behavior of the vehicle to the outside world.

[0036] Processor 1 deploys a pre-trained Transformer-LSTM hybrid model to analyze driving time series data and predict the driving behavior of vehicles. The working process of processor 1 is as follows Figure 3 As shown, the following steps are included: S1. Preprocessing driving time series data; S2, extracting global features from the pre-processed driving time series data through the Transformer's multi-head self-attention mechanism; S3, using LSTM (Long Short-Term Memory) to capture local features from global features and output the feature vector of the last time step, obtaining a comprehensive representation that includes global and local temporal information; S4. Map the feature vector to an N-dimensional output space through a fully connected layer, and correspond to N categories of driving behaviors respectively.

[0037] The preprocessing of driving time series data includes: standardizing the driving time series data through mean and standard deviation; projecting the standardized driving time series data into a 64-dimensional high-dimensional feature space through a linear mapping layer; and adding position encoding to the data to make up for the Transformer's perception defects of time series order.

[0038] The formula for normalizing driving time series data is: (10) Where, m and s are the characteristic mean and standard deviation, To prevent division by zero errors, x This is one dimension of the driving time series data. Based on the data collection frequency, a sliding window of length 60 is set to extract time series segments from the continuous driving time series data to ensure that the model captures a sufficiently complete temporal context. The mean and standard deviation of these time series segments are then extracted. During model training, the mean and standard deviation of the training set are extracted for standardization.

[0039] By projecting the standardized six-dimensional driving time series data into a 64-dimensional high-dimensional feature space, the feature expression capability is improved and a richer input representation is achieved. The formula is: (11) Where, T is the time step, B is the batch size.

[0040] The standard sine and cosine formulas are used for position encoding, which are as follows: (12) Where, POS is the sequence position, i is the dimension index, d = 64-dimensional feature dimension, by adding position encoding to input features, the temporal perception ability is enhanced.

[0041] like Figure 4 and Figure 5 As shown in Figure 2, the process of extracting global features through the Transformer's multi-head self-attention mechanism specifically includes: Input Matrix X By using 3 different linear transformation matrices W Q 、 W K 、 W V Multiply, generate Query 、 Key and Value , that is, query Q ,key K Sum V , the dimensions are d k , the formula is as follows: (13) The input matrix X is the pre-processed driving time series data, which contains multiple sets of input variables. W Q 、 W K 、 W V The query Q ,key K ,value V The weight matrix of After linear transformation, we get Q 、 K and V The matrix is ​​divided into several heads, each with its own independent Query 、 Key and Value Matrix, for each head, a scaled dot product attention is performed ( Scaled Dot-Product Attention ) operation, the formula is as follows: (14) In order to better capture the potential feature correlation in the sequence, the input matrix X Subjected to multiple linear transformation matrices to obtain multiple sets Q, K, V The matrix connects the output attention results together and is ultimately used to enhance the performance of the model. The expression of the multi-head attention mechanism is as follows: (15) in, h For the number of heads, W O is the final output transformation matrix, Concat Represents a splicing operation; In the multi-head attention mechanism, the single-head attention is expressed as the attention distribution weight formula. i The attention distribution weights and probability distributions of the input variables satisfy , the formula is as follows: (16) in, Indicates the i The attention distribution weights of the input variables, It is i The attention scores of the input variables, is the probability distribution; Input variables And the corresponding attention distribution weight After multiplication, we can get the sum: (17) Where, Z It is the new expression of the input variable after being processed by the attention mechanism. is the multiplication matrix.

[0042] The data processed by Transformer is then input into a single LSTM layer. The Long Short-Term Memory Network (LSTM) is a special type of Recurrent Neural Network (RNN) that dynamically adjusts the information flow through a gating mechanism, thereby effectively capturing the long-term dependencies in time series data. Figure 4 and Figure 5 As shown in Figure 2, the core operation of the LSTM unit includes a quadruple gating mechanism: Forget Gate: (18) Input Gate: (19) Candidate memory: (20) Output gate: (twenty one) Each gate is controlled by Sigmoid ( ) or tanh activation function regulates the information flow, and the final output is updated as: , (twenty two) Where, is the learnable weight matrix, is the hidden layer dimension, is the input dimension, is the bias term, is the Hadamard product, is the Sigmoid function, tanh is the hyperbolic tangent activation function, For the i The input feature vector of time steps, For the Layer hidden state With the current input The splicing, is the memory unit of the current time step, is a candidate memory unit, and the left side of the equal sign in the gating formula represents the output of the current gate.

[0043] In this embodiment, the Transformer-LSTM hybrid model utilizes a six-layer Transformer encoder. Each encoder layer utilizes an eight-head self-attention mechanism and a feedforward network to process driving time series data in parallel, capturing global dependency features and supplemented by dropout to prevent overfitting. Subsequently, a single-layer unidirectional LSTM captures local time series features through a gating mechanism. The feature dimension matches the 64-dimensional Transformer to balance model complexity and performance. The feature vector at the last time step is output, representing the comprehensive information of the entire sequence. This is then classified and mapped into a four-dimensional output space by a fully connected layer to correspond to the four riding states: straight ahead, left turn, right turn, and deceleration.

[0044] In this embodiment, the behavior indication device 3 is configured as an indicator light, such as an LED display module, which is connected to the processor 1 via an I2C interface and used as a taillight of a vehicle. It is designed to display driving behavior categories such as going straight, turning left, turning right and decelerating in the form of changing graphics or patterns. For example, an upward green arrow pattern represents going straight, a left red arrow pattern represents turning left, a right red arrow pattern represents turning right, and a square pattern represents deceleration.

[0045] To verify the effectiveness of this solution, this embodiment uses this solution to conduct experimental comparisons with traditional prediction models (including Transformer, LSTM, CNN-LSTM, and RNN). The experiments show that this solution has the following advantages: 1. High Accuracy: In the prediction of four key cycling behaviors (going straight, turning left, turning right, and slowing down), the classification accuracy rate reached 96.03%. Figure 6 As shown, the F1 score exceeds 0.95, as Figure 7 As shown in Figure 3, it significantly outperforms traditional RNN, LSTM and CNN models.

[0046] 2. Strong real-time performance: Verified by the embedded experimental platform, the predicted delay is less than 70ms, meeting the needs of real-time applications. Figure 8 The figure shows a line chart of the delay results of all prediction processes in the experiment. The delay refers to the prediction end time - prediction start time, and 70ms is the average prediction delay.

[0047] 3. Strong adaptability: In tests on complex urban roads, the overall accuracy exceeded 90%, demonstrating good environmental adaptability.

[0048] 4. High efficiency: The Transformer-LSTM hybrid model is applied to cyclist behavior prediction for the first time, which solves the shortcomings of traditional models in processing long time series data, improves the global and local feature extraction capabilities, and also has the characteristics of fast model training convergence, such as Figure 9 shown.

[0049] 5. Easy operation: The system is integrated into embedded hardware, which is simple to deploy and low-cost. It can achieve real-time prediction and warning without complicated operations.

Claims

1. A cycling traffic behavior prediction and indication system, deployed on a cycling vehicle, characterized in that: The invention comprises a processor (1) and an IMU unit (2) and a behavior indication device (3) electrically connected thereto, wherein the IMU unit (2) is used to collect real-time driving time series data of a riding vehicle, including three-axis acceleration and three-axis angular velocity; The processor (1) uses a pre-trained Transformer-LSTM hybrid model to process driving time series data, outputs a vehicle driving behavior prediction result, and generates a corresponding control signal; The behavior indication device (3) displays driving behavior prompt information according to the control signal.

2. A cycling traffic behavior prediction and indication system according to claim 1, characterized in that: The IMU unit (2) comprises two IMUs respectively mounted on the frame and the handlebar.

3. The cycling traffic behavior prediction and indication system according to claim 1, characterized in that: The processor (1) is also connected to a memory, and the memory is used to store the driving time series data collected in real time by the IMU unit (2) and the driving behavior prediction result output by the processor (1).

4. The cycling traffic behavior prediction and indication system according to claim 1, characterized in that: The working process of the processor (1) includes: S1. Preprocessing driving time series data; S2, extracting global features from the pre-processed driving time series data through the Transformer's multi-head self-attention mechanism; S3, capture local features from global features through LSTM and output the feature vector of the last time step to obtain a comprehensive representation containing global and local temporal information; S4. Map the feature vector to an N-dimensional output space through a fully connected layer, and correspond to N categories of driving behaviors respectively.

5. The cycling traffic behavior prediction and indication system according to claim 4, characterized in that: The specific process of the pre-processing in step S1 is: standardizing the driving time series data by using the mean and standard deviation; The normalized driving time series data is projected into a 64-dimensional high-dimensional feature space through a linear mapping layer; Standard sine and cosine formulas are used to add positional encoding to the data.

6. A cycling traffic behavior prediction and indication system according to claim 5, characterized in that: The formula for the standardization process is: in, and are the characteristic mean and standard deviation, To prevent division by zero errors, x is any dimension of driving time series data; The formula for projecting to the 64-dimensional high-dimensional feature space is: in, T is the time step, B is the batch size; The formula for the position encoding is: in, POS is the sequence position, i is the dimension index, d = 64-dimensional feature dimension.

7. The cycling traffic behavior prediction and indication system according to claim 5, characterized in that: The specific process of step S2 is: The preprocessed driving time series data is compared with three different linear transformation matrices W Q 、 W K 、 W V Multiply and generate Query 、 Key and Value , that is, the query Q ,key K Sum V , the dimensions are d k , where the preprocessed driving time series data contains multiple sets of input variables, W Q 、 W K 、 W V Query Q ,key K ,value V The weight matrix of After linear transformation, we get Q 、 K and V The matrix is ​​divided into several heads, each with its own independent Query 、 Key and Value Matrix, for each head, a scaled dot product attention is performed ( Scaled Dot-Product Attention ) operation to obtain the corresponding single-head attention result; Based on the multi-head attention mechanism, multiple single-head attention results are connected together to obtain global features corresponding to multiple groups of input variables.

8. The cycling traffic behavior prediction and indication system according to claim 7, characterized in that: In the multi-head attention mechanism, the single-head attention is expressed as the attention distribution weight formula. i The attention distribution weights and probability distributions of the input variables satisfy , the formula is as follows: , in, Indicates the i The attention distribution weights of the input variables, It is i The attention scores of the input variables, is the probability distribution; The input variable And the corresponding attention distribution weight After multiplication, we can get the sum: ,in, Z It is the new expression of the input variable after being processed by the attention mechanism. is the multiplication matrix.

9. The cycling traffic behavior prediction and indication system according to claim 4, characterized in that: In step S3, LSTM captures local temporal features through a quadruple gating mechanism, and the feature dimension of LSTM is consistent with that of Transformer.

10. The cycling traffic behavior prediction and indication system according to claim 4, characterized in that: The fully connected layer in step S4 specifically maps the feature vector to a four-dimensional output space to correspond to the classification of four riding states, namely, going straight, turning left, turning right, and decelerating.