Traffic flow prediction method and system based on long short-term expert attention network, medium and equipment

By modeling long-term and short-term expert attention networks separately, the problem of limited model expressiveness in existing technologies is solved, and more accurate long-term and short-term traffic flow prediction is achieved.

CN118070167BActive Publication Date: 2025-10-21SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410283298.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2025-10-21
Estimated Expiration
2044-03-13

AI Technical Summary

Technical Problem

Existing technologies have limited model expression capabilities in long-term traffic flow forecasting, making it difficult to fully utilize traffic data characteristics at different time scales, resulting in insufficient prediction accuracy.

Method used

Long-term and short-term expert attention networks are used to model the long-term and short-term prediction tasks respectively. Through standardization, temporal information embedding, linear fusion, multi-head attention computation, and feedforward neural layer computation, the features of long-term and short-term traffic data are extracted and enhanced respectively.

Benefits of technology

It effectively improves the accuracy and capability of short- and long-term traffic flow forecasting, and enhances the predictive performance of the model at different time scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118070167B_ABST
    Figure CN118070167B_ABST
Patent Text Reader

Abstract

The application discloses a traffic flow prediction method and system based on a long-short-term expert attention network, a medium and equipment, and the method comprises the following steps: acquiring a traffic flow data set and preprocessing, dividing historical data into a short-term historical data and two long-term historical data, and adding and aggregating with time information embedding, and linearly fusing the two long-term historical data with embedded time information into long-term historical data; the short-term historical data with embedded time information is input into a short-term expert attention network layer, and the linearly fused long-term historical data is input into a stacked long-term expert attention network layer; the outputs of the long-term expert attention network layer and the short-term expert attention network layer are calculated through a multilayer perceptron and inverse normalization calculation, and long-term traffic flow prediction values and short-term traffic flow prediction values are obtained respectively. The application fully utilizes the traffic data characteristics of different time scales, and effectively enhances the long-term and short-term prediction capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a traffic flow prediction method, system, medium and equipment based on long-term and short-term expert attention networks. Background Art

[0002] Intelligent transportation systems effectively integrate advanced information technology, data communications technology, sensor technology, electronic control technology, and computer technology into the overall transportation management system, thereby establishing a comprehensive, large-scale, and comprehensive transportation and management system that is real-time, accurate, and efficient. As a key component of intelligent transportation systems, accurate traffic flow forecasting can provide accurate traffic route predictions and assist in road traffic planning. Real-time predictions of future traffic flows are crucial for route planning, helping drivers select travel routes, improving road traffic efficiency, and reducing congestion.

[0003] Due to its great potential in many practical applications (such as intelligent traffic diversion and travel optimization), it has attracted extensive research interest from academia and industry in recent years. However, accurately predicting long-term traffic is still very challenging. Traffic flow patterns are complexly affected by temporal dynamics and the underlying road network structure, and traffic data has nonlinear and complex relationships in space and time.

[0004] To accurately predict future traffic flow, many previous studies have focused on extracting two key features of traffic data: spatial features and temporal features. These studies have adopted a unified model for both short-term and long-term prediction tasks. However, this may limit the model's expressive power and hinder its full potential. Summary of the Invention

[0005] In order to overcome the defects and shortcomings of the existing technology, the present invention provides a traffic flow prediction method based on long- and short-term expert attention networks. The present invention adopts long- and short-term expert attention networks to model long- and short-term prediction tasks respectively, making full use of the traffic data characteristics of different time scales and effectively enhancing the long- and short-term prediction capabilities.

[0006] The second object of the present invention is to provide a traffic flow prediction system based on long-term and short-term expert attention networks;

[0007] A third object of the present invention is to provide a computer-readable storage medium;

[0008] A fourth object of the present invention is to provide a computer device.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] The present invention provides a traffic flow prediction method based on a long-term and short-term expert attention network, comprising the following steps:

[0011] Obtain a traffic flow data set, process the traffic flow data based on standardization, and then divide the historical data into a short-term historical data segment and two long-term historical data segments. The short-term historical data segment is the historical data of the same length as the time period of the traffic data to be predicted, and the two long-term historical data segments are the historical traffic data of the previous day and the previous week in the same time period as the traffic data to be predicted.

[0012] A short-term historical data segment and two long-term historical data segments are embedded with time information and aggregated, and the two long-term historical data segments embedded with time information are linearly fused into a long-term historical data segment.

[0013] The short-term historical data embedded with time information is input into the stacked short-term expert attention network layer, and the long-term historical data after linear fusion is input into the stacked long-term expert attention network layer. The outputs of the previous long-term expert attention network layer and the short-term expert attention network layer are passed through an information interaction module to obtain the input of the next long-term expert attention network layer and the short-term expert attention network layer.

[0014] The outputs of the last layer of long-term expert attention network layer and short-term expert attention network layer are calculated by multi-layer perceptron and inverse normalized to obtain long-term traffic flow prediction values ​​and short-term traffic flow prediction values ​​respectively.

[0015] As a preferred technical solution, the traffic flow data is processed based on standardization, which is specifically expressed as follows:

[0016]

[0017] Among them, X norm represents the standardized data, X represents the standardized traffic flow data at each time step, X max and X min are the maximum and minimum values ​​of traffic flow data in the dataset respectively.

[0018] As a preferred technical solution, the embedding and addition of one short-term historical data segment, two long-term historical data segments and time information is specifically expressed as follows:

[0019] X R =X r +E D +E W

[0020] X D =X d +E D +EW

[0021] X W =X w +E D +E W

[0022] The two long-term historical data embedded with time information are linearly fused into one long-term historical data, which can be expressed as follows:

[0023] X L =X D W D +X W W W

[0024] Among them, X r represents short-term historical data, X d represents the historical traffic data of the previous day in the same time period as the traffic data to be predicted, X w represents the historical traffic data of the previous week for the same period as the traffic data to be predicted, E D represents the daily information embedding, E W Represents the week information embedding, W D 、W W is the weight parameter.

[0025] As a preferred technical solution, the embedding is obtained by linear transformation of one-hot encoding.

[0026] As a preferred technical solution, the linearly fused long-term historical data is input into the stacked long-term expert attention network layer to perform multi-head attention calculation, which is specifically expressed as:

[0027]

[0028]

[0029]

[0030] Among them, X L Represents the long-term historical data after linear fusion, W q 、W k and W v As weight parameters, the long-term historical data after linear fusion is projected into three transformation matrices Q, K, V, head i represents the i-th head, Represents the matrix splicing operation, Att and MultiHead represent single attention calculation and multi-head attention calculation respectively, H att The output result of multi-head attention calculation;

[0031] The output obtained by multi-head attention calculation is then calculated by residual addition and layer normalization LayerNorm, expressed as:

[0032] H t =LayerNorm(H att +X L )

[0033] The output of the long-term expert network is calculated by the feedforward neural layer and is expressed as:

[0034] H L =FFN(H t )=Relu(H t W1+b1)W2+b2

[0035] Among them, W1, W2, b1, b2 are weight parameter matrices, Relu is the activation function, H L is the output of the long-term expert network layer, and FFN represents the feed-forward neural layer.

[0036] As a preferred technical solution, short-term historical data embedded with time information is input into the stacked short-term expert attention network layer, and spatial features and temporal features are obtained through self-attention graph convolution operation and multi-head temporal attention calculation respectively. The self-attention graph convolution operation is specifically expressed as:

[0037]

[0038] HD=Relu(SX R W D )

[0039] Among them, W D is the weight parameter, is the short-term historical data X embedded with time information R The transpose of the matrix, d is the feature dimension, S is the weight matrix obtained by attention calculation, representing the spatial correlation in the traffic network, H D Represents the output features of the self-attention graph convolution operation;

[0040] Multi-head temporal attention computation is performed by Calculated, where the mapping Q, K, V is obtained by embedding the short-term historical data X with time information R Through linear mapping, H T Represents the output features obtained by multi-head attention calculation from the time dimension;

[0041] The output features of the self-attention graph convolution operation are added to the output features calculated by the multi-head attention to obtain the spatiotemporal features, which are then added to the residual and normalized at the layer. Specifically, it is expressed as:

[0042] H=LayerNorm(H T +H D +X R )

[0043] The spatiotemporal features are input into the feedforward neural layer to obtain the output of the short-term expert network, which is specifically expressed as:

[0044] H S =FFN(H)

[0045] Among them, FFN represents the feedforward neural layer, H S represents the output of the short-term expert network.

[0046] As a preferred technical solution, the calculation method of the information interaction module is:

[0047] I L =βH L +(1-γ)H S

[0048] I S =(1-β)H L +γH S

[0049] β=Sigmoid(Relu(H L W D1 +b D1 )W D2 +b D2 )

[0050] γ=Sigmoid(Relu(H S W W1 +b W1 )W W2 +b W2 )

[0051] Among them, β and γ are weight factors, W D1 、W D2 、W W1 、W W2 、b D1 、b D2 、b W1 、b W2 Represent weight parameters, H L 、H S are the outputs of the previous long-term expert network and short-term expert network, I L and I S They are the input of the next layer of long-term expert network and short-term expert network respectively.

[0052] In order to achieve the above second purpose, the present invention adopts the following technical solutions:

[0053] A traffic flow prediction system based on a long-term and short-term expert attention network, comprising: a traffic flow dataset acquisition module, a data preprocessing module, a time information embedding module, a linear fusion module, a short-term expert attention network layer construction module, a long-term expert attention network layer construction module, an information interaction module, and a traffic flow prediction module;

[0054] The traffic flow data set acquisition module is used to acquire a traffic flow data set;

[0055] The data preprocessing module is used to process traffic flow data based on standardization, and then divide the historical data into a short-term historical data segment and two long-term historical data segments. The short-term historical data segment is the historical data of the same length as the traffic data time segment to be predicted, and the two long-term historical data segments are the historical traffic data of the previous day and the previous week in the same time segment as the traffic data to be predicted.

[0056] The time information embedding module is used to embed and aggregate a short-term historical data segment, two long-term historical data segments and the time information;

[0057] The linear fusion module is used to linearly fuse two segments of long-term historical data embedded with time information into one segment of long-term historical data;

[0058] The short-term expert attention network layer construction module is used to construct a short-term expert attention network layer, and input the short-term historical data embedded with time information into the stacked short-term expert attention network layer;

[0059] The long-term expert attention network layer construction module is used to input the linearly fused long-term historical data into the stacked long-term expert attention network layer;

[0060] The information interaction module is used to process the output of the previous long-term expert attention network layer and the short-term expert attention network layer to obtain the input of the next long-term expert attention network layer and the short-term expert attention network layer;

[0061] The traffic flow prediction module is used to calculate and inverse normalize the outputs of the last layer's long-term expert attention network layer and short-term expert attention network layer through a multi-layer perceptron to obtain a long-term traffic flow prediction value and a short-term traffic flow prediction value, respectively.

[0062] In order to achieve the third purpose above, the present invention adopts the following technical solutions:

[0063] A computer-readable storage medium stores a program, which, when executed by a processor, implements the traffic flow prediction method based on the long-short-term expert attention network as described above.

[0064] In order to achieve the fourth purpose above, the present invention adopts the following technical solutions:

[0065] A computer device includes a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the traffic flow prediction method based on the long-short-term expert attention network as described above is implemented.

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

[0067] The present invention adopts long-term and short-term expert attention networks to model long-term and short-term prediction tasks respectively, making full use of the characteristics of traffic data at different time scales and effectively enhancing the long-term and short-term prediction capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 Schematic diagram of the flow of traffic flow prediction method based on long-term and short-term expert attention network of the present invention;

[0069] Figure 2 This is a schematic diagram of the network framework for implementing the traffic flow prediction method based on the long-term and short-term expert attention network of the present invention. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0071] Example 1

[0072] like Figure 1 、 Figure 2 As shown, this embodiment provides a traffic flow prediction method based on a long-term and short-term expert attention network, comprising the following steps:

[0073] S1: Obtain a traffic flow dataset, normalize the traffic flow data using Min-Max, and then divide the historical data into one short-term historical data segment and two long-term historical data segments;

[0074] In this embodiment, the Min-Max normalization process data is specifically expressed as follows:

[0075]

[0076] Among them, X norm represents the standardized data, X represents the standardized traffic flow data at each time step, X max and X min are the maximum and minimum values ​​of traffic flow data in the dataset respectively;

[0077] In this embodiment, short-term historical data is historical data of equal length time period adjacent to the traffic data time period to be predicted, and is defined as X r ; Long-term historical data refers to the historical traffic data of the previous day and the previous week in the same period as the traffic data to be predicted, which are defined as X d and X w ;

[0078] S2: In the input layer, short-term historical data X r And long-term historical data X d and X w By adding and aggregating the embedded time information, the two long-term historical data embedded with time information are linearly fused into one long-term historical data. The specific expression is:

[0079] X R =X r +E D +E W

[0080] X D =X d +E D +E W

[0081] X W =X w +E D +E W

[0082] X L =X D W D +X W W W

[0083] Among them, X L The fused long-term historical data is used as the input of the subsequent long-term expert network layer; the processed long-term and short-term historical data X are obtained. L and X R ;

[0084] In this embodiment, time information embedding includes day information embedding E D and weekly information embedded in E W , where the embedding is obtained by linear transformation of one-hot encoding;

[0085] S3: Processed long-term and short-term historical data X L and X R The outputs of the previous long-term and short-term expert attention network layers are respectively input into the stacked long-term and short-term expert attention network layers, where the outputs of the previous long-term and short-term expert attention network layers pass through an information interaction module to obtain the input of the next layer;

[0086] In this embodiment, the first long-term expert network layer takes the fused long-term historical data as input and performs multi-head attention calculation, which is specifically expressed as:

[0087]

[0088]

[0089]

[0090] Among them, W q 、W k and W v is the weight parameter, input X L Projected into three transformation matrices Q, K, V, head i represents the i-th head, Represents the matrix splicing operation, Att and MultiHead represent single attention calculation and multi-head attention calculation respectively, H att The output result of multi-head attention calculation;

[0091] The output obtained by multi-head attention calculation is then calculated by residual addition and layer normalization LayerNorm, expressed as:

[0092] H t =LayerNorm(H att +X L )

[0093] Finally, the output of the long-term expert network is calculated through the feedforward neural layer and is expressed as:

[0094] H L =FFN(Ht)=Relu(H t W1+b1)W2+b2

[0095] Among them, W1, W2, b1, b2 are weight parameter matrices, Relu is the activation function, H L is the output of the long-term expert network layer, FFN represents the feed-forward neural layer;

[0096] In this embodiment, the first short-term expert network layer uses the processed short-term historical data X R As input, spatial features and temporal features are obtained through self-attention graph convolution operation and multi-head temporal attention calculation respectively. The self-attention graph convolution operation is specifically expressed as:

[0097]

[0098] H D =Relu(SX R WD )

[0099] Among them, W D is the weight parameter, For X R The transpose of the matrix, d is the feature dimension, S is the weight matrix obtained by attention calculation, representing the spatial correlation in the traffic network;

[0100] Multi-head temporal attention calculation is also done by Calculated, where the mapping Q, K, V is obtained by embedding the short-term historical data X with time information R Through linear mapping, H T Represents the output features obtained by multi-head attention calculation from the time dimension;

[0101] The two features are added together to obtain the spatiotemporal features, which are then added to the residual and normalized. The specific expression is:

[0102] H=LayerNorm(H T +H D +X R )

[0103] The spatiotemporal features are input into the feedforward neural layer to obtain the output of the short-term expert network, which is specifically expressed as:

[0104] H S =FFN(H)

[0105] In this embodiment, the output of the previous long-term expert network and the output of the short-term expert network are input to the information exchange module to obtain the input of the next long-term expert network and the input of the next short-term expert network, respectively. The calculation method of the information exchange module is:

[0106] I L =βH L +(1-γ)H S

[0107] I S =(1-β)H L +γH S

[0108] β=Sigmoid(Relu(H L W D1 +b D1 )W D2 +b D2 )

[0109] γ=Sigmoid(Relu(H S W W1 +b W1 )W W2 +bW2 )

[0110] Among them, β and γ are the weight factors obtained in the calculation, W D1 、W D2 、W W1 、W W2 、b D1 、b D2 、b W1 、b W2 Represent weight parameters, I L and I S They are the inputs of the next layer of long-term expert network and short-term expert network respectively;

[0111] S4: The output layer is the output H of the long-term expert network of the last layer L and H S As input, after calculation by multi-layer perceptron and inverse Min-Max normalization, the long-term traffic flow prediction value and short-term traffic flow prediction value are obtained respectively.

[0112] Example 2

[0113] This embodiment provides a traffic flow prediction system based on a long-term and short-term expert attention network, which is used to implement the traffic flow prediction method based on a long-term and short-term expert attention network in the above-mentioned embodiment 1. The system includes: a traffic flow data set acquisition module, a data preprocessing module, a time information embedding module, a linear fusion module, a short-term expert attention network layer construction module, a long-term expert attention network layer construction module, an information interaction module, and a traffic flow prediction module;

[0114] In this embodiment, the traffic flow data set acquisition module is used to acquire the traffic flow data set;

[0115] In this embodiment, the data preprocessing module is used to process traffic flow data based on standardization, and then divide the historical data into a short-term historical data segment and two long-term historical data segments. The short-term historical data segment is the historical data of the same length as the time period of the traffic data to be predicted, and the two long-term historical data segments are the historical traffic data of the previous day and the previous week in the same time period as the traffic data to be predicted.

[0116] In this embodiment, the time information embedding module is used to embed and aggregate a short-term historical data segment, two long-term historical data segments, and the time information;

[0117] In this embodiment, the linear fusion module is used to linearly fuse two segments of long-term historical data embedded with time information into one segment of long-term historical data;

[0118] In this embodiment, the short-term expert attention network layer construction module is used to construct the short-term expert attention network layer, and input the short-term historical data embedded with time information into the stacked short-term expert attention network layer;

[0119] In this embodiment, the long-term expert attention network layer construction module is used to input the linearly fused long-term historical data into the stacked long-term expert attention network layer;

[0120] In this embodiment, the information interaction module is used to process the output of the previous long-term expert attention network layer and the short-term expert attention network layer to obtain the input of the next long-term expert attention network layer and the short-term expert attention network layer;

[0121] In this embodiment, the traffic flow prediction module is used to calculate and inverse normalize the outputs of the last layer of the long-term expert attention network layer and the short-term expert attention network layer through a multi-layer perceptron to obtain a long-term traffic flow prediction value and a short-term traffic flow prediction value, respectively.

[0122] Example 3

[0123] This embodiment provides a storage medium, which can be a storage medium such as ROM, RAM, disk, or CD. The storage medium stores one or more programs. When the program is executed by the processor, the traffic flow prediction method based on the long-term and short-term expert attention network of Example 1 is implemented.

[0124] Example 4

[0125] This embodiment provides a computing device, which can be a desktop computer, a laptop computer, a smart phone, a PDA handheld terminal, a tablet computer, or other terminal device with a display function. The computing device includes a processor and a memory, and the memory stores one or more programs. When the processor executes the program stored in the memory, the traffic flow prediction method based on the long-term and short-term expert attention network of Example 1 is implemented.

[0126] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A traffic flow prediction method based on long-term and short-term expert attention network, characterized by: The steps include: Obtain a traffic flow data set, process the traffic flow data based on standardization, and then divide the historical data into a short-term historical data segment and two long-term historical data segments. The short-term historical data segment is the historical data of the same length as the time period of the traffic data to be predicted, and the two long-term historical data segments are the historical traffic data of the previous day and the previous week in the same time period as the traffic data to be predicted. A short-term historical data segment and two long-term historical data segments are embedded with time information and aggregated, and the two long-term historical data segments embedded with time information are linearly fused into a long-term historical data segment. The embedding and aggregation of a short-term historical data segment, two long-term historical data segments and time information is specifically expressed as follows: ; ; ; The two long-term historical data embedded with time information are linearly fused into one long-term historical data, which can be expressed as follows: ; in, Represents short-term historical data, The historical traffic data of the previous day for the same time period as the traffic data to be predicted. The historical traffic data for the previous week for the same period as the traffic data to be predicted. Indicates the embedding of daily information, represents the embedding of week information, 、 is the weight parameter; The embedding is obtained by linear transformation of one-hot encoding; The short-term historical data embedded with time information is input into the stacked short-term expert attention network layer, and the long-term historical data after linear fusion is input into the stacked long-term expert attention network layer. The outputs of the previous long-term expert attention network layer and the short-term expert attention network layer are passed through an information interaction module to obtain the input of the next long-term expert attention network layer and the short-term expert attention network layer. The outputs of the last layer of long-term expert attention network layer and short-term expert attention network layer are calculated by multi-layer perceptron and inverse normalized to obtain long-term traffic flow prediction values ​​and short-term traffic flow prediction values ​​respectively.

2. The traffic flow prediction method based on long-term and short-term expert attention network according to claim 1 is characterized in that: The traffic flow data is processed based on standardization, specifically expressed as follows: ; in, represents the standardized data, represents the standardized traffic flow data at each time step, and are the maximum and minimum values ​​of traffic flow data in the dataset respectively.

3. The traffic flow prediction method based on long-term and short-term expert attention network according to claim 1 is characterized in that: The linearly fused long-term historical data is input into the stacked long-term expert attention network layer to perform multi-head attention calculation, which is specifically expressed as: ; ; ; in, represents the long-term historical data after linear fusion, 、 and As the weight parameter, the long-term historical data after linear fusion is projected into three transformation matrices , Representative Size, Represents the matrix splicing operation, 、 Represents single attention calculation and multi-head attention calculation respectively, The output result of multi-head attention calculation; The output obtained by multi-head attention calculation is then subjected to residual addition and layer normalization Calculation, expressed as: ; The output of the long-term expert network is calculated by the feedforward neural layer and is expressed as: ; in, is the weight parameter matrix, is the activation function, is the output of the long-term expert network layer, represents a feed-forward neural layer.

4. The traffic flow prediction method based on long-term and short-term expert attention network according to claim 1 is characterized in that: The short-term historical data embedded with time information is input into the stacked short-term expert attention network layer, and the spatial features and temporal features are obtained through the self-attention graph convolution operation and multi-head temporal attention calculation respectively. The self-attention graph convolution operation is specifically expressed as: ; ; in, is the weight parameter, Short-term historical data with embedded time information The transpose of the matrix, is the feature dimension, represents the weight matrix obtained by attention calculation, representing the spatial correlation in the traffic network, Represents the output features of the self-attention graph convolution operation; Multi-head temporal attention computation is performed by Calculated, where the mapping Short-term historical data with embedded time information Through linear mapping, Represents the output features obtained by multi-head attention calculation from the time dimension; The output features of the self-attention graph convolution operation are added to the output features calculated by the multi-head attention to obtain the spatiotemporal features, which are then added to the residual and normalized at the layer. Specifically, it is expressed as: ; The spatiotemporal features are input into the feedforward neural layer to obtain the output of the short-term expert network, which is specifically expressed as: ; in, represents the feedforward neural layer, represents the output of the short-term expert network.

5. The traffic flow prediction method based on long-term and short-term expert attention network according to claim 1 is characterized in that: The calculation method of the information interaction module is: ; ; ; ; in, and is the weight factor, 、 、 、 、 、 、 、 Represent the weight parameters, 、 are the outputs of the previous long-term expert network and short-term expert network, and They are the input of the next layer of long-term expert network and short-term expert network respectively.

6. A traffic flow prediction system based on long-term and short-term expert attention network, characterized by: A method for predicting traffic flow based on a long-term and short-term expert attention network according to any one of claims 1 to 5, comprising: a traffic flow data set acquisition module, a data preprocessing module, a time information embedding module, a linear fusion module, a short-term expert attention network layer construction module, a long-term expert attention network layer construction module, an information interaction module, and a traffic flow prediction module; The traffic flow data set acquisition module is used to acquire a traffic flow data set; The data preprocessing module is used to process traffic flow data based on standardization, and then divide the historical data into a short-term historical data segment and two long-term historical data segments. The short-term historical data segment is the historical data of the same length as the traffic data time segment to be predicted, and the two long-term historical data segments are the historical traffic data of the previous day and the previous week in the same time segment as the traffic data to be predicted. The time information embedding module is used to embed and aggregate a short-term historical data segment, two long-term historical data segments and the time information; The linear fusion module is used to linearly fuse two segments of long-term historical data embedded with time information into one segment of long-term historical data; The short-term expert attention network layer construction module is used to construct a short-term expert attention network layer, and input the short-term historical data embedded with time information into the stacked short-term expert attention network layer; The long-term expert attention network layer construction module is used to input the linearly fused long-term historical data into the stacked long-term expert attention network layer; The information interaction module is used to process the output of the previous long-term expert attention network layer and the short-term expert attention network layer to obtain the input of the next long-term expert attention network layer and the short-term expert attention network layer; The traffic flow prediction module is used to calculate and inverse normalize the outputs of the last layer's long-term expert attention network layer and short-term expert attention network layer through a multi-layer perceptron to obtain a long-term traffic flow prediction value and a short-term traffic flow prediction value, respectively.

7. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the traffic flow prediction method based on the long-short-term expert attention network as described in any one of claims 1 to 5 is implemented.

8. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that When the processor executes the program stored in the memory, it implements the traffic flow prediction method based on the long-short-term expert attention network as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Space-time combined traffic flow prediction method and device

    CN114529081A

  • Traffic sequence prediction method based on multivariate time series data analysis

    CN115713155A