A method and system for traffic station passenger flow congestion delay prediction
By constructing a passenger flow congestion delay prediction model, utilizing historical commuting data and external factor characteristics, and combining a spatiotemporal attention mechanism and a bidirectional recurrent layer network, the accuracy problem of passenger flow congestion delay prediction at transportation stations was solved, improving the accuracy of the prediction model and the passenger travel experience.
Patent Information
- Application Number
- CN202211269386.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-10-18
AI Technical Summary
Existing technologies struggle to accurately predict passenger congestion and delays at transportation hubs, leading to longer travel times and a decreased passenger experience. Furthermore, they fail to effectively consider the spatiotemporal correlation between hubs and the impact of external factors.
By constructing a passenger flow congestion delay prediction model, utilizing historical commuting data, traffic pattern relationship diagrams, and topology diagrams, and combining the characteristics of external influencing factors, a spatiotemporal attention mechanism and a bidirectional recurrent layer network are adopted for prediction, integrating temporal and spatial information to improve prediction accuracy.
It improves the accuracy and applicability of passenger flow congestion and delay prediction, enabling better understanding of real-time passenger flow at stations and enhancing the passenger travel experience.
Smart Images

Figure CN115660156B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of commuting delay prediction, in particular to a passenger flow congestion delay prediction method and system. BACKGROUND
[0002] With the rapid development of urban modernization, each large city has popularized the construction of subways or rapid buses, which are convenient for people to travel. However, although the subway or rapid bus has the characteristics of large passenger capacity, there is often a supply-demand imbalance during the rush hour. Due to the limitation of vehicle capacity and platform carrying capacity, a large number of passenger flows gather at a certain station on the line in a short time during the peak period. The congestion causes slow passenger flow, and the high load rate causes passengers to be unable to get on the bus, resulting in a large number of passengers being stranded on the platform, which will prolong the waiting time of passengers and delay the overall travel time of passengers. The increase of travel time caused by congestion is called passenger flow congestion delay. For the operator, mastering the current real-time passenger flow state through passenger flow congestion delay prediction can help improve the travel experience of passengers.
[0003] In reality, the passenger flow of a traffic station is influenced by many factors such as geographical location, time, traffic conditions, etc., and has complex nonlinearity. For different stations, adjacent stations in terms of physical location will influence each other, and non-adjacent stations may also have similar traffic patterns. For the same station, the historical traffic conditions are closely related to the future traffic conditions. In addition, the passenger flow congestion is closely related to external factors such as weather conditions. Therefore, to accurately predict the passenger flow congestion delay of a station, not only the historical traffic data of the station itself should be fully considered, but also the spatio-temporal correlation between stations and various external factors. SUMMARY
[0004] The purpose of the present application is to provide a passenger flow congestion delay prediction method and system, which effectively improves the accuracy of passenger flow congestion delay prediction.
[0005] To achieve the above purpose, the present application provides the following solutions:
[0006] A passenger flow congestion delay prediction method, comprising:
[0007] Obtaining historical commuting data of each traffic station.
[0008] According to the historical commuting data, determining the historical congestion delay rate of each traffic station in any historical time period to obtain a historical delay data set; the historical congestion delay rate of each traffic station is determined by the historical congestion delay rates of a plurality of directed traffic station pairs with the traffic station as the destination station or the starting station; the historical congestion delay rate of the directed traffic station pair represents the historical congestion delay rate from the starting traffic station in the directed traffic station pair to the destination traffic station in the directed traffic station pair.
[0009] According to the historical delay data set, a proximate delay data set, a daily cycle delay data set and a weekly cycle delay data set of a to-be-tested time period are determined; the proximate delay data set includes historical congestion delay rates of a plurality of time periods before the to-be-tested time period; the daily cycle delay data set includes historical congestion delay rates of the same time period in a plurality of days before the to-be-tested time period; and the weekly cycle delay data set includes historical congestion delay rates of the same time period in a plurality of weeks before the to-be-tested time period.
[0010] According to the historical congestion delay rates of each traffic station in the proximate delay data set, the daily cycle delay data set and the weekly cycle delay data set, a correlation distance between any two traffic stations is calculated.
[0011] A traffic mode relationship graph between the traffic stations is constructed; the traffic mode relationship graph includes a plurality of traffic stations and a correlation distance between each two traffic stations.
[0012] A traffic topology relationship graph between the traffic stations is constructed; the traffic topology relationship graph includes a plurality of traffic stations and a connection relationship between each two traffic stations.
[0013] Features of external influencing factors in the to-be-tested time period are extracted to obtain external influencing factor features.
[0014] The to-be-tested time period, the proximate delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor features are input into a passenger flow congestion delay rate prediction model to predict a congestion delay rate of any traffic station in the to-be-tested time period.
[0015] Optionally, the to-be-tested time period, the proximate delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor features are input into a passenger flow congestion delay rate prediction model to predict a congestion delay rate of any traffic station in the to-be-tested time period, specifically including:
[0016] Based on a space-time attention mechanism, information fusion in time and space is performed on the proximate delay data set, the daily cycle delay data set and the weekly cycle delay data set to obtain an attention-enhanced delay data set.
[0017] Convolution processing is performed on the traffic topology relationship graph, the traffic mode relationship graph and the attention-enhanced delay data set to obtain a spatial feature matrix between the traffic stations.
[0018] extracting time-dependent features of the space feature matrix in two directions of delay rate based on a bidirectional recurrent layer network, to obtain a time feature matrix.
[0019] fusing the external influence factor feature, the space feature matrix and the time feature matrix to obtain the congestion delay rate of any traffic station in the to-be-tested time period.
[0020] Optionally, before the to-be-tested time period, the adjacent delay data set, the daily period delay data set, the weekly period delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influence factor feature are input into the passenger flow congestion delay rate prediction model to obtain the congestion delay rate of any traffic station in the to-be-tested time period, the prediction method further comprises:
[0021] In the historical delay data set, any historical time period is determined as a target time period.
[0022] According to the historical delay data set, the adjacent delay data set, the daily period delay data set and the weekly period delay data set in the target time period are determined.
[0023] According to the historical congestion delay rate of each traffic station in the adjacent delay data set, the daily period delay data set and the weekly period delay data set, the correlation distance between any two traffic stations is calculated.
[0024] A traffic mode relationship graph between each traffic station is constructed; the traffic mode relationship graph includes a plurality of traffic stations and the correlation distance between each pair of traffic stations.
[0025] A traffic topology relationship graph between each traffic station is constructed; the traffic topology relationship graph includes a plurality of traffic stations and the connection relationship between each pair of traffic stations.
[0026] The features of external influence factors in the target time period are extracted to obtain external influence factor features.
[0027] The adjacent delay data set, the daily period delay data set, the weekly period delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influence factor feature are taken as the input of the passenger flow congestion delay rate prediction model, and the congestion delay rate of each traffic station in the target time period is taken as the target output, and the passenger flow congestion delay rate prediction model is trained.
[0028] Optionally, according to the historical commuting data, the historical congestion delay rate of each traffic station in any historical time period is determined to obtain a historical delay data set, specifically comprising:
[0029] For any traffic station, the estimated average travel time from the traffic station to another traffic station in any historical time period is calculated.
[0030] According to the historical commuting data, the actual average travel time from the traffic station to another traffic station in any historical time period is calculated.
[0031] For any historical time period, the congestion delay time of each passenger passing through the traffic station in the historical time period is determined according to the actual average travel time of each passenger from the traffic station to another traffic station in the historical time period and the estimated average travel time.
[0032] The number of passengers with congestion delay time passing through the traffic station in the historical time period is determined, and the number of passengers with congestion delay is obtained.
[0033] According to the number of passengers with congestion delay passing through the traffic station in the historical time period and the total number of passengers passing through the traffic station in the historical time period, the congestion delay rate of the traffic station in the historical time period is determined.
[0034] Optionally, the estimated average travel time from the traffic station to another traffic station in any historical time period is calculated according to the following formula:
[0035]
[0036] Wherein, E(t pq ) is the estimated average travel time of passengers from the traffic station p to other traffic stations q in any historical time period, p and q are both the total number of stations, is the average walking time of passengers entering the traffic station p to the waiting platform, is the departure interval time of p station, is the average train running time of p station, is the average walking time of passengers from the waiting platform to exit the traffic station q, E(Δt p ) is the average congestion delay time of passengers at the traffic station p.
[0037] Optionally, the congestion delay rate of the traffic station in the historical time period is calculated according to the following formula:
[0038]
[0039] Wherein, is the congestion delay rate of the traffic station p in the historical time period x m is the congestion delay rate of the traffic station p in the historical time period xm the number of passengers delayed by congestion at the transportation station p, for a historical time period x m the total number of passengers at the transportation station p.
[0040] The historical time period x m the number of passengers delayed by congestion at the transportation station p:
[0041]
[0042] where a is a passenger, x m is a historical time period, for a historical time period x m the set of all passengers who pass through the transportation station p to another transportation station q.
[0043] Optionally, the adjacent delay data set of the to-be-tested time period is determined according to the following formula:
[0044]
[0045] where concat[] is a sequence concatenation function, t is the to-be-tested time period, a t-1 is a congestion delay rate sequence composed of historical congestion delay rates of each transportation station in the previous historical time period of the to-be-tested time period, l c is the number of congestion delay rate sequences in the adjacent delay data set, is a real number field, N is the number of stations, and C represents the number of characteristic attributes.
[0046] The daily period delay data set of the to-be-tested time period is determined according to the following formula:
[0047]
[0048] where p d is a daily period span, l d is the number of congestion delay rate sequences in the daily period delay data set.
[0049] The weekly period delay data set of the to-be-tested time period is determined according to the following formula:
[0050]
[0051] where p w is a weekly period span, l w is the number of congestion delay rate sequences in the weekly period delay data set.
[0052] Optionally, the traffic mode relationship graph between each transportation station is constructed according to the following formula:
[0053] Gp =(V,E p ,A p ), wherein
[0054] wherein, V is a set of all traffic stations, V={v1,v2,v3,…,v N}, E p is an edge set of the traffic mode relation graph, e ij represents a connection between traffic station v i and traffic station v j , A p represents a correlation matrix, w p (i,j) represents a correlation strength between traffic station v i and traffic station v j , dtw(i,j) represents a distance between a congestion delay rate sequence of traffic station v i and a congestion delay rate sequence of traffic station v j , and β represents a decay rate of the distance calculated according to the dynamic time warping algorithm.
[0055] A traffic topology relation graph between each traffic station is constructed according to the following formula:
[0056] G r =(V,E r ,A r ), wherein
[0057] wherein, E r is an edge set of the traffic topology relation graph, A r is an adjacency matrix, A r,ij is a connection relationship between traffic station v i and traffic station v j , A r,ij is 1, representing that traffic station v i and traffic station v j are adjacent, and A r,ij is 0, representing that traffic station v i and traffic station v j are not adjacent.
[0058] Optionally, the external influencing factors include weather information, holiday information and time information; the feature of the external influencing factor in the to-be-tested time period is extracted to obtain an external influencing factor feature, and the feature extraction specifically includes:
[0059] The feature of the weather information is extracted to obtain a weather information feature.
[0060] Features of the holiday information are extracted to obtain holiday information features.
[0061] Features of the time information are extracted to obtain time information features.
[0062] Corresponding to the aforementioned passenger flow congestion delay prediction method, the application also provides a passenger flow congestion delay prediction system, which, when run by a computer, executes the passenger flow congestion delay prediction method as described above.
[0063] According to the specific embodiments of the application, the following technical effects are provided:
[0064] The application provides a passenger flow congestion delay prediction method and system, the prediction method comprising: obtaining historical commuting data of each traffic site; determining historical congestion delay rates of each traffic site in any historical time period according to the historical commuting data, to obtain a historical delay data set; determining a nearby delay data set, a daily cycle delay data set and a weekly cycle delay data set of each traffic site in a to-be-tested time period according to the historical delay data set; calculating correlation distances between each two traffic sites according to the historical congestion delay rates of each traffic site in the nearby delay data set, the daily cycle delay data set and the weekly cycle delay data set; constructing a traffic mode relationship graph and a traffic topology relationship graph between the traffic sites; extracting features of external influencing factors in the to-be-tested time period to obtain external influencing factor features; inputting the to-be-tested time period, the nearby delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor features into a passenger flow congestion delay rate prediction model to predict congestion delay rates of any traffic site in the to-be-tested time period. The passenger flow congestion delay prediction method provided by the application selects delay data of the to-be-tested time period, the same time in the past few days and the same time in the past few weeks in the historical delay data set, and constructs a traffic mode relationship graph and a traffic topology relationship graph between the traffic sites according to the data, so that the input data of the passenger flow congestion delay prediction fully considers time features of the traffic sites in the historical time dimension and spatial features of adjacent or highly correlated traffic sites in the spatial dimension, and the features of external influencing factors are also involved in the prediction of the passenger flow congestion delay, which not only fully considers historical data of the sites, but also considers the time-space correlation between the traffic sites and various external influencing factors, thereby improving the accuracy and applicability of the passenger flow congestion delay prediction model. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0066] Figure 1 A flow chart of a passenger flow congestion delay prediction method provided for Embodiment 1 of the present application;
[0067] Figure 2 A flow chart of step S2 in the prediction method provided for Embodiment 1 of the present application;
[0068] Figure 3 A flow chart of step S7 in the prediction method provided for Embodiment 1 of the present application;
[0069] Figure 4 A structural schematic diagram of a passenger flow congestion delay prediction system provided for Embodiment 2 of the present application;
[0070] Figure 5 A structural schematic diagram of a prediction model training module in the prediction system provided for Embodiment 2 of the present application. DETAILED DESCRIPTION
[0071] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0072] For the operator, it is helpful to improve the travel experience of passengers by mastering the current real-time passenger flow state through the result of passenger flow congestion delay prediction. In reality, the traffic station flow is influenced by many factors such as geographical position, time, traffic condition, etc., and has complex nonlinearity. For different stations, the stations adjacent in physical position will influence each other, and the non-adjacent stations can also have similar traffic patterns. For the same station, the historical traffic condition is closely related to the future traffic condition. Therefore, the present application provides a passenger flow congestion delay prediction method and system, which not only fully considers the historical commuting data of each station itself, but also considers the space-time correlation between each traffic station and various external influencing factors, thereby improving the accuracy of passenger flow congestion delay prediction.
[0073] In order to make the above objectives, features and advantages of the present application more apparent and understandable, the present application will be further described in detail below with reference to the drawings and specific embodiments. In order to make the above objectives, features and advantages of the present application more apparent and understandable, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0074] Embodiment 1
[0075] The embodiment provides a passenger flow congestion delay prediction method, as shown in a flowchart, the prediction method comprises the following steps: Figure 1
[0076] S1, obtaining historical commuting data of each traffic site.
[0077] S2, determining historical congestion delay rates of each traffic site in any historical time period according to the historical commuting data, to obtain a historical delay data set; the historical congestion delay rate of each traffic site is determined by historical congestion delay rates of a plurality of directed traffic site pairs with the traffic site as a destination, and the historical congestion delay rate of the directed traffic site pair represents a historical congestion delay rate from a starting traffic site in the directed traffic site pair to a destination traffic site in the directed traffic site pair; as shown in a flowchart, step S2 specifically comprises the following steps: Figure 2
[0078] S21, for any traffic site, calculating an estimated travel time mean value of passing through the traffic site to another traffic site in any historical time period.
[0079] When congestion does not occur, for a passenger to complete a travel from entering a starting traffic site to walking out of a destination traffic site, the time to be considered includes: a time of walking from entering a starting traffic site entrance to a starting traffic site waiting platform a waiting time on the waiting platform is an approximate uniform distribution U(0, H normal ), H normal is a departure interval time in a non-peak time period, a train running time of moving to a destination traffic site after getting on and a time of walking from a destination traffic site waiting platform to a destination traffic site exit after getting off at the destination The walking time of the passenger is subject to a normal distribution N(μ, σ 2 , as shown in the following formula:
[0080]
[0081] However, when the passenger travel time encounters an early peak or a late peak, a time Δt p delayed due to passenger flow congestion is added to the original time, as shown in the following formula:
[0082]
[0083] In the present embodiment, the consumed various times of all passengers and the final travel time are averaged, and the waiting time of the passengers at the waiting platform is approximated as half of the station departure interval time, and the estimated average travel time of the passengers from any historical time period through the starting traffic station p to the other destination traffic station q is calculated according to the following formula:
[0084]
[0085] wherein E'(t pq ) is the estimated average travel time of the passengers from any historical time period through the traffic station p to the other traffic station q, p and q are both the total number of stations, is the average walking time of the passengers from entering the traffic station p to the waiting platform, is the departure interval time of the p station in the peak period, is the average train running time of the p station, when the vehicle runs according to the schedule is the average walking time of the passengers from the waiting platform to walking out of the traffic station q, E(Δt p ) is the average congestion delay time of the passengers at the p station.
[0086] S22, according to the historical commuting data, the average actual travel time of any passenger from any historical time period through the traffic station to the other traffic station is calculated; the time range is divided into k periods x1, x2,..., x k , for the passengers entering the traffic station in the time x m , the actual travel time can be calculated through the AFC (Automatic Fare Collection System) data, as shown in the following formula:
[0087]
[0088] wherein E(t pq ) represents the average actual travel time of the passengers from any historical time period through the traffic station p to the other traffic station q, each data represents the actual travel time between two stations, such as , represents the actual travel time of the passengers from the second station to the first station in the x m time period.
[0089] S23. Determine the congestion delay time of passengers passing through the transportation station in any historical time period; for any historical time period, based on the average actual travel time and the average estimated travel time of each passenger from one transportation station to another in any historical time period, determine the congestion delay time of each passenger passing through the transportation station in the historical time period; after obtaining both the actual travel time and the estimated travel time, since everything except the congestion delay time is known, the congestion delay time can be obtained by subtracting the two; in this embodiment, the average congestion delay time is calculated according to the following formula:
[0090]
[0091] S24. Determine the number of passengers whose congestion delay time at the transportation station is not zero within the historical time period, and obtain the number of passengers experiencing congestion delays at the transportation station within the historical time period; in this embodiment, the historical time period x is calculated according to the following formula. m Number of passengers delayed due to congestion at transportation station p:
[0092]
[0093] Where a represents the passenger, x m For a historical time period, For historical time period x m The set of all passengers who travel from transportation station p to another transportation station q.
[0094] If passengers arrive at the platform on average, their average waiting time is equal to half the peak-hour departure interval. In other words, even without platform congestion, half of the passengers wait longer than half the departure time. Therefore, to avoid calculation errors caused by these passengers, this embodiment uses the full departure interval as the maximum waiting time for passengers delayed due to no congestion. Passengers waiting longer than the full departure time are considered delayed, and the number of delayed passengers can be calculated using the following formula:
[0095]
[0096]
[0097] Among them, P t This refers to the collection of peak time periods.
[0098] S25. Based on the number of passengers delayed by congestion at the transportation station during the historical time period and the total number of passengers at the transportation station during the historical time period, determine the congestion delay rate of the transportation station during the historical time period; in this embodiment, the congestion delay rate of the transportation station during the historical time period is calculated according to the following formula:
[0099]
[0100] in, For historical time period x m The congestion delay rate of the transportation station p mentioned above. For historical time period x m The number of passengers delayed due to congestion at transportation station p For historical time period x m The total number of passengers at transportation station p.
[0101] S3. Based on the historical delay dataset, determine the adjacent delay dataset, daily delay dataset, and weekly delay dataset for each of the traffic stations within the test time period.
[0102] The near-term delay dataset includes historical congestion delay rates from several time periods preceding the time period to be tested; the near-term delay dataset for the time period to be tested is determined according to the following formula:
[0103]
[0104] Where concat[] is the sequence concatenation function, t is the time period to be measured, and α is the sequence concatenation function. t-1 The congestion delay rate sequence is composed of the historical congestion delay rates of each traffic station in the previous historical time period of the time period to be measured. c The number of congestion delay rate sequences in the near-delay dataset. Let N be the number of stations and C be the number of feature attributes.
[0105] The daily cycle delay dataset includes historical congestion delay rates for the same time period within several days prior to the time period to be tested; the daily cycle delay dataset for the time period to be tested is determined according to the following formula:
[0106]
[0107] Where, p d For daily cycle span, The congestion delay rate sequence is composed of the historical congestion delay rates of each traffic station in the same time period preceding the test time period. d The number of congestion delay rate sequences in the daily periodic delay data set.
[0108] The weekly delay dataset includes historical congestion delay rates for the same time period within several weeks prior to the time period under test; the weekly delay dataset for the time period under test is determined according to the following formula:
[0109]
[0110] wherein p w is the span of a week cycle, is a congestion delay rate sequence composed of historical congestion delay rates of each traffic site in the same time period of the previous day of the to-be-tested time period, l w is the number of congestion delay rate sequences in the week cycle delay data set.
[0111] S4, according to the historical congestion delay rates of each traffic site in the adjacent delay data set, the daily cycle delay data set and the week cycle delay data set, the correlation distance between each traffic site is calculated.
[0112] S5, a traffic mode relationship graph between each traffic site is constructed; the traffic mode relationship graph includes a plurality of traffic sites and the correlation distance between each traffic site; the traffic mode relationship graph between each traffic site is constructed according to the following formula:
[0113] G p =(V,E p ,A p ), wherein
[0114] wherein V is the set of all traffic sites, V={v1,v2,v3,…,v N}, E p is the edge set of the traffic mode relationship graph, e ij represents the connection between traffic site v i and traffic site v j , A p represents the correlation matrix, w p (i,j) represents the correlation strength between traffic site v i and traffic site v j , dtw(i,j) represents the distance between the congestion delay rate sequence of traffic site v i and the congestion delay rate sequence of traffic site v j calculated using the dynamic time warping algorithm, and β represents the decay rate of the distance calculated according to the dynamic time warping algorithm.
[0115] S6, a traffic topology relationship graph between each traffic site is constructed; the traffic topology relationship graph includes a plurality of traffic sites and the connection between each traffic site; the traffic topology relationship graph between each traffic site is constructed according to the following formula:
[0116] G r =(V,E r ,A r ), wherein
[0117] wherein Er is the edge set of the traffic topology graph, A r is the adjacency matrix, A r,ij is a traffic station v i and a traffic station v j is connected, A r,ij is 1, it means that the traffic station v i and the traffic station v j are adjacent, A r,ij is 0, it means that the traffic station v i and the traffic station v j are not adjacent.
[0118] S7, a feature of an external influencing factor in the to-be-measured time period is extracted, to obtain an external influencing factor feature; as shown in the flowchart, in the embodiment, step S7 specifically includes: Figure 3
[0119] S71, a feature of the weather information is extracted, to obtain a weather information feature; the weather information feature is extracted according to the following formula:
[0120]
[0121] wherein, is the weather information feature, is the weather information, ext w () is a weather information feature extraction function. Specifically, the weather information is whether it is an abnormal weather at present, or more specifically, a certain type of weather, for example, generally, the passenger flow feature in rainy days is different from that in sunny days.
[0122] S72, a feature of the holiday information is extracted, to obtain a holiday information feature; the holiday information feature is extracted according to the following formula:
[0123]
[0124] wherein, is the holiday information feature, is the holiday information, ext dw () is a holiday information feature extraction function. Specifically, the holiday information is whether it is a holiday at present; generally, the passenger flow feature in holidays is different from that in ordinary days.
[0125] S73, a feature of the time information is extracted, to obtain a time information feature; the time information feature is extracted according to the following formula:
[0126]
[0127] wherein, is a time information feature, is a time information, ext dh is a time information feature extraction function. Specifically, the time information is the current day of the week, and in general, there are different features for the five weekdays of the week, especially Monday and Friday. For example, the passenger flow feature at 18:00-18:15 on Friday, which is the off-peak period, is different from the passenger flow feature at 18:00-18:15 on other weekdays.
[0128] After obtaining the input data for passenger flow congestion delay rate prediction through steps S3-S7, the discrete variables in the input data need to be digitized using One-Hot encoding, and the continuous variables are scaled to the range [0, 1] through Min-Max linear normalization. The formula of Min-Max linear normalization is:
[0129]
[0130] where X max is the maximum value of the data, and X min is the minimum value of the data.
[0131] S8, predicting the congestion delay rate of any traffic station in the to-be-tested time period through the passenger flow congestion delay prediction model; inputting the to-be-tested time period, the adjacent delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph, and the external influence factor feature into the passenger flow congestion delay rate prediction model to predict the congestion delay rate of any traffic station in the to-be-tested time period. Step S8 specifically includes:
[0132] S81, based on the spatiotemporal attention mechanism, fusing the information in time and space of the adjacent delay data set, the daily cycle delay data set, and the weekly cycle delay data set to obtain an attention-enhanced delay data set.
[0133] S82, performing convolution processing on the traffic topology relationship graph, the traffic mode relationship graph, and the attention-enhanced delay data set to obtain a spatial feature matrix between traffic stations.
[0134] S83, based on the bidirectional recurrent layer network, extracting the time-dependent features of the forward and reverse delay rates of the spatial feature matrix to obtain a time feature matrix.
[0135] S84, fusing the external influence factor feature, the spatial feature matrix, and the time feature matrix to obtain the congestion delay rate of any traffic station in the to-be-tested time period.
[0136] Optionally, before step S8, the prediction method further includes:
[0137] X1, determining any historical time period as a target time period in the historical delay data set.
[0138] X2, determining a nearby delay data set, a daily cycle delay data set and a weekly cycle delay data set of each traffic site in the target time period according to the historical delay data set.
[0139] X3, calculating the correlation distance between each traffic site according to the historical congestion delay rate of each traffic site in the nearby delay data set, the daily cycle delay data set and the weekly cycle delay data set.
[0140] X4, constructing a traffic mode relationship graph between each traffic site; the traffic mode relationship graph includes a plurality of traffic sites and the correlation distance between each traffic site.
[0141] X5, constructing a traffic topology relationship graph between each traffic site; the traffic topology relationship graph includes a plurality of traffic sites and the connection relationship between each traffic site.
[0142] X6, extracting the characteristics of external influencing factors in the target time period to obtain external influencing factor characteristics.
[0143] X7, digitizing discrete variables in the input data using One-Hot encoding, and scaling continuous variables to the range of [0, 1] through Min-Max linear normalization.
[0144] X8, jumping to step X1 to repeat steps X1-X7, and dividing the obtained multiple groups of data into training data set and test data set in proportion.
[0145] X9, training the passenger flow congestion delay rate prediction model using the training data set; using the nearby delay data set of the target time period, the daily cycle delay data set of the target time period, the weekly cycle delay data set of the target time period, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor characteristics of the target time period as the input of the passenger flow congestion delay rate prediction model, and taking the congestion delay rate of each traffic site in the target time period as the target output to train the passenger flow congestion delay rate prediction model.
[0146] X10, after the training of the passenger flow congestion delay prediction model is completed, the data of the test data set is input into the passenger flow congestion delay rate prediction model for testing, the root mean square error (RMSE) and the mean absolute error (MAE) are used as the evaluation indexes of the prediction results, when the effect of the model on the test set is not ideal, the parameters of the network model need to be adjusted until the test effect is ideal, and the trained network model architecture and network parameters are saved; the root mean square error RMSE and the mean absolute error MAE are as follows:
[0147]
[0148]
[0149] Wherein, α i and are the true value and the predicted value of the congestion delay rate of the i th traffic station entering the target time period.
[0150] When the next stage, there are also some application of deep learning method to predict passenger flow congestion delay, but these studies also have some shortcomings: the model based on CNN only considers the absolute distance relationship between stations in two-dimensional Euclidean space, and the non-Euclidean structure characteristics in the traffic network, which cannot effectively capture the spatial correlation; the model based on LSTM structure can only use forward dependence, due to the long-term memory chain, it is inevitable to filter out useful information and reduce the prediction accuracy; the effective construction of the graph based on GCN is still a problem to be solved in current research; in addition, there is a close relationship between passenger flow congestion and external factors such as weather conditions. That is, the existing research does not comprehensively consider the spatial correlation, time dependence and external influencing factors.
[0151] In order to verify the effectiveness of the prediction model proposed in the application, the passenger flow congestion delay data of 44 stations of the rapid bus in Xiamen city and the passenger flow congestion delay data of 24 stations of the subway in Xiamen city are selected as the research object, and the prediction time interval Δt = 15 min. The data set used is the passenger flow congestion delay data and weather data of Xiamen city from June 3, 2019 to December 27, 2019, Monday to Friday, 7:35-9:35. The first 125 days of data are used to train the model, and the last 25 days of data are used for testing. The passenger flow congestion delay prediction model of the application is compared with eight existing models, including shallow models and the most advanced deep learning models, and then eight models and the variant model based on the model of the application are introduced:
[0152] The prediction model provided by the present application is compared with the previous seven models (ARIMA, LSTM, BiLSTM, CNN, GCN, ASTGCN, and T-MGCN), and the prediction model of the present application is compared with seven variant models (AST-RGCN, which only uses a topological structure graph to perform a convolution operation on a graph, AST-PGCN, which only uses a traffic pattern graph to perform a convolution operation on a graph, ASTMGCN-Daily, which only considers the time characteristics of the day cycle in the time sequence characteristics, ASTMGCN-Weekly, which only considers the time characteristics of the week cycle in the time sequence characteristics, ASTMGCN-NoExt, which does not consider all external influencing factor information, ASTMGCN-None, which does not consider all auxiliary information, and ASTMGCN-NoAST, which does not consider a spatiotemporal attention mechanism) based on the prediction model. According to the root mean square error (RMSE) and the mean absolute error (MAE) as evaluation indexes, the effectiveness of the model is evaluated.
[0153] Based on the RMSE and MAE evaluation indexes, the prediction model (STA-MGCN) provided by the present application and the remaining benchmark models are verified and compared on the Xiamen bus rapid transit dataset and the Xiamen subway dataset, respectively, as shown in Table 1.
[0154] Table 1 Comparison of different models based on RMSE and MAE in two datasets
[0155]
[0156] By analyzing the results in Table 1, the following can be found: 1) The deep learning methods (LSTM, BiLSTM, CNN, GCN, ASTGCN, GCN-BiLSTM, and STA-MGCN) achieve better prediction accuracy than the traditional time series analysis (ARIMA), indicating that deep learning methods can better capture nonlinear spatiotemporal correlations; 2) The spatiotemporal deep learning methods (ASTGCN, GCN-BiLSTM, and STA-MGCN) achieve better prediction accuracy than the ordinary deep learning methods (LSTM, BiLSTM, CNN, and GCN), indicating that effectively capturing spatiotemporal correlations helps improve prediction accuracy; 3) The graph-based method can better model the traffic network than CNN, and BiLSTM can make more accurate sequence predictions than unidirectional LSTM; 4) The prediction model provided by the present application achieves the best prediction accuracy in both datasets, indicating that comprehensively considering various spatial correlations, time dependencies, and external factors helps improve prediction accuracy.
[0157] To verify the effectiveness of each module in the proposed model, an ablation experiment is performed in this embodiment, seven variant models based on the model are constructed, and experiments are performed on two datasets, as shown in Tables 2 and 3.
[0158] Table 2 Multi-graph effectiveness verification
[0159]
[0160] The multi-graph effectiveness verification of Table 2 is analyzed as shown in Table 2: 1) the performance of the model provided by the application is better than that of two variants, indicating that both correlation graphs help improve the final result; 2) among the two variant models, the model using only the traffic pattern correlation graph has better overall performance, indicating that historical traffic patterns have a strong indication effect on future traffic conditions.
[0161] Table 3 Auxiliary information effectiveness verification
[0162]
[0163] The auxiliary information effectiveness verification of Table 3 is analyzed as shown in Table 3: 1) the prediction model provided by the application performs best, while the model without all auxiliary information performs worst, indicating the effectiveness of auxiliary information; 2) the performance of only periodic information is almost the same as that of the complete model, indicating that periodic information is the most effective among all auxiliary information; 3) when the spatio-temporal attention mechanism is removed, the model performance is still better than GCN-BiLSTM, indicating that the prediction model provided by the application has an advantage in extracting spatial correlation and external influencing factor features, and when combined with the spatio-temporal attention mechanism, the prediction error can be further reduced.
[0164] In summary, the passenger flow congestion delay prediction model provided by the application not only pays attention to various spatial correlations and time dependencies, enhances the extraction of real-time spatial dependencies, but also integrates other external influencing factors. In addition, the prediction model provided by the application improves its ability to capture long-term context and generate higher-level sequence data representations through stacked bidirectional recurrent layers, and learns the dynamic spatio-temporal correlation of traffic data by fusing the spatio-temporal attention mechanism, thereby improving the prediction accuracy of the model. The effectiveness of the model proposed by the application is evaluated on two different real data sets, and the performance is significantly better than that of other benchmark models, confirming that the model of the application is more suitable for short-term prediction of passenger flow congestion delay and can better meet the needs of engineering.
[0165] Embodiment 2:
[0166] The prediction method of the embodiment 1 of the application can also be implemented by means of Figure 4 and Figure 5 the architecture of a passenger flow congestion delay prediction system as shown in Figure 4As shown, the prediction system can include: a historical delay dataset determination module, a proximate delay dataset determination module, a day cycle delay dataset determination module, a week cycle delay dataset determination module, a traffic pattern relationship graph construction module, a traffic topology relationship graph construction module, an external feature extraction module, and a prediction model training module; some modules can also have sub-units for implementing their functions, for example Figure 5 As shown, in the prediction model training module, there are a space-time attention adjustment unit, a spatial feature extraction unit, a temporal feature extraction unit, a multi-source feature fusion unit, and a prediction output unit. Of course, Figure 4 and Figure 5 The architecture shown is only exemplary, in some embodiments, other units can be added in some modules; in addition, when different functions need to be implemented, according to actual needs, some units Figure 4 and Figure 5 one or at least two components in the system shown.
[0167] The program part in the technology can be considered as a "product" or "article" in the form of executable code and / or related data, which is involved or implemented by a computer-readable medium. Tangible, permanent storage media can include any memory or storage used by a computer, processor, or similar device or related module. For example, various semiconductor memories, tape drives, disk drives, or similar devices capable of providing storage functions for software.
[0168] All software or part of it can sometimes be communicated through a network, such as the Internet or other communication network. Such communication can load software from one computer device or processor to another. For example: from a server or host computer of a video object detection device to a hardware platform of a computer environment, or other computer environments implementing systems, or similar functional systems related to providing information needed for object detection. Therefore, another medium capable of transmitting software elements can also be used as a physical connection between local devices, such as light waves, electric waves, electromagnetic waves, etc., through cables, optical cables, or air, etc. The physical medium used for carrier waves, such as cables, wireless connections, or optical cables, etc. Similar devices can also be considered as media carrying software. Unless limited to tangible "storage" media, other terms used here to indicate computer or machine "readable media" indicate media involved in the process of executing any instructions by a processor.
[0169] The above description is only a description of the principles and implementation of the present application, and the above examples are only used to help understand the method of the present application and its core ideas; those skilled in the art should understand that the above modules or steps of the present application can be realized by a general computer device, and alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device, or they can be respectively manufactured into individual integrated circuit modules, or a plurality of modules or steps among them can be manufactured into a single integrated circuit module to be realized. The present application is not limited to any specific combination of hardware and software.
[0170] Meanwhile, for those skilled in the art, there will be changes in specific implementation and application scope according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A passenger flow congestion delay prediction method characterized by, The prediction method comprises: obtaining historical commuting data of each traffic station; determining historical congestion delay rates of each traffic station in any historical time period according to the historical commuting data, to obtain a historical delay data set; the historical congestion delay rate of each traffic station is determined by historical congestion delay rates of several directed traffic station pairs with the traffic station as a destination station or a starting station; the historical congestion delay rate of the directed traffic station pair represents a historical congestion delay rate from a starting traffic station in the directed traffic station pair to a destination traffic station in the directed traffic station pair; determining a proximate delay data set, a daily cycle delay data set and a weekly cycle delay data set in a to-be-tested time period according to the historical delay data set; the proximate delay data set comprises historical congestion delay rates of several time periods before the to-be-tested time period; the daily cycle delay data set comprises historical congestion delay rates of the same time period in several days before the to-be-tested time period; the weekly cycle delay data set comprises historical congestion delay rates of the same time period in several weeks before the to-be-tested time period; calculating a correlation distance between any two traffic stations according to historical congestion delay rates of each traffic station in the proximate delay data set, the daily cycle delay data set and the weekly cycle delay data set; constructing a traffic mode relationship graph between each traffic station; the traffic mode relationship graph comprises several traffic stations and correlation distances between each two traffic stations; constructing a traffic topology relationship graph between each traffic station; the traffic topology relationship graph comprises several traffic stations and connection relationships between each two traffic stations; extracting features of external influencing factors in the to-be-tested time period to obtain external influencing factor features; inputting the to-be-tested time period, the proximate delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor features into a passenger flow congestion delay rate prediction model to predict congestion delay rates of any traffic station in the to-be-tested time period.
2. The prediction method of claim 1, wherein, The inputting the to-be-tested time period, the proximate delay data set, the daily cycle delay data set, the weekly cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influencing factor features into a passenger flow congestion delay rate prediction model to predict congestion delay rates of any traffic station in the to-be-tested time period specifically comprises: based on a space-time attention mechanism, performing information fusion on time and space of the proximate delay data set, the daily cycle delay data set and the weekly cycle delay data set to obtain an attention-enhanced delay data set; performing convolution processing on the traffic topology relationship graph, the traffic mode relationship graph and the attention-enhanced delay data set to obtain a spatial feature matrix between each traffic station; based on a bidirectional recurrent layer network, performing time-dependent feature extraction of forward and reverse delay rates on the spatial feature matrix to obtain a time feature matrix; and Fusing the external influence factor feature, the space feature matrix and the time feature matrix, a congestion delay rate of any traffic station in the to-be-tested time period is obtained.
3. The prediction method of claim 1, wherein, Before the to-be-tested time period, the adjacent delay data set, the day cycle delay data set, the week cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influence factor feature are input into the passenger flow congestion delay rate prediction model to predict the congestion delay rate of any traffic station in the to-be-tested time period, the prediction method further comprises the following steps: In the historical delay data set, any historical time period is determined as a target time period; According to the historical delay data set, an adjacent delay data set, a day cycle delay data set and a week cycle delay data set in the target time period are determined; According to the historical congestion delay rates of each traffic station in the adjacent delay data set, the day cycle delay data set and the week cycle delay data set, a correlation distance between any two traffic stations is calculated; A traffic mode relationship graph between each traffic station is constructed; the traffic mode relationship graph includes a plurality of traffic stations and a correlation distance between each two traffic stations; A traffic topology relationship graph between each traffic station is constructed; the traffic topology relationship graph includes a plurality of traffic stations and a connection relationship between each two traffic stations; Features of external influence factors in the target time period are extracted to obtain external influence factor features; The adjacent delay data set, the day cycle delay data set, the week cycle delay data set, the traffic mode relationship graph, the traffic topology relationship graph and the external influence factor feature are taken as inputs of the passenger flow congestion delay rate prediction model, and the congestion delay rate of each traffic station in the target time period is taken as a target output, so as to train the passenger flow congestion delay rate prediction model.
4. The prediction method of claim 1, wherein, According to the historical commuting data, the historical congestion delay rate of each traffic station in any historical time period is determined to obtain a historical delay data set, which specifically comprises: For any traffic station, an estimated average travel time through the traffic station to another traffic station in any historical time period is calculated; According to the historical commuting data, an actual average travel time through the traffic station to another traffic station in any historical time period is calculated; For any historical time period, according to the actual average travel time and the estimated average travel time of each passenger through the traffic station to another traffic station in the historical time period, a congestion delay time of each passenger through the traffic station in the historical time period is determined; The number of passengers with a congestion delay time through the traffic station in the historical time period is determined to obtain a congestion delay passenger number; According to the congestion delay passenger number of the traffic station in the historical time period and the total number of passengers of the traffic station in the historical time period, a congestion delay rate of the traffic station in the historical time period is determined.
5. The prediction method of claim 4, wherein, The estimated average travel time from any historical time period to another traffic station is calculated according to the following formula: E (Δt pq ) is the estimated average travel time of passengers passing through the traffic station p to other traffic station q at any historical time period, p and q are both the total number of stations, E (Δt ) is the average walking time of passengers entering the traffic station p to the waiting platform, E (Δt ) is the average walking time of passengers from the waiting platform to exit the traffic station q, E (Δt p ) is the average congestion delay time of passengers at the traffic station p.
6. The prediction method of claim 5, wherein, The congestion delay rate of the traffic station in the historical time period is calculated according to the following formula: wherein, is a historical time period x m a congestion delay rate into the traffic station p, is a historical time period x m a congestion delay passenger number of the traffic station p, is a historical time period x m a total passenger number of the traffic station p; The historical time period x is calculated according to the following formula m Congestion delay passenger quantity of traffic station p: where a is a passenger, x m is a historical time period, is a historical time period x m is the set of all passengers that pass through the transportation station p to another transportation station q.
7. The prediction method of claim 1, wherein, The adjacent delay data set of the to-be-tested time period is determined according to the following formula: where concat[] is a sequence concatenation function, t is the time period to be tested, and a t-1 is a congestion delay rate sequence composed of historical congestion delay rates of each traffic station in the historical time period before the time period to be tested, and l c is the number of congestion delay rate sequences in the adjacent delay data set, is a real number field, N is the number of stations, and C represents the number of feature attributes; The daily period delay data set of the to-be-tested time period is determined according to the following formula: where p d is the day cycle span, l d is the number of congestion delay rate sequences in the day cycle delay data set; The weekly period delay data set of the to-be-tested time period is determined according to the following formula: where p w is the period span, l w is the number of congestion delay rate sequences in the period delay data set.
8. The prediction method of claim 1, wherein, The traffic mode relationship graph between each traffic station is constructed according to the following formula: G p = (V, E p , A p ), wherein w p (i,j) = e -β×dtw(i,j) wherein V is a set of all traffic sites, V = {v1, v2, v3, …, v N}, E p is an edge set of the traffic mode relation graph, e ij represents a connection between a traffic site v i and a traffic site v j , A p represents a correlation matrix, w p (i,j) represents a correlation strength between a traffic site v i and a traffic site v j , dtw(i,j) represents a distance between a congestion delay rate sequence of a traffic site v i and a congestion delay rate sequence of a traffic site v j , and β represents a decay rate of the distance calculated according to the dynamic time warping algorithm; The traffic topology relationship graph between each traffic station is constructed according to the following formula: G r = (V, E r , A r ), wherein wherein E r is the edge set of the traffic topology graph, A r is the adjacency matrix, A r,ij is the connection relationship between traffic station v i and traffic station v j , A r,ij is 1, which represents that traffic station v i and traffic station v j are adjacent, A r,ij is 0, which represents that traffic station v i and traffic station v j are not adjacent.
9. The prediction method of claim 5, wherein, The external influence factors include weather information, holiday information and time information; the features of the external influence factors in the to-be-tested time period are extracted to obtain external influence factor features, which specifically include: The features of the weather information are extracted to obtain weather information features; The features of the holiday information are extracted to obtain holiday information features; The features of the time information are extracted to obtain time information features.
10. A passenger flow congestion delay prediction system characterized by, The passenger flow congestion delay prediction system, when executed by a computer, runs the passenger flow congestion delay prediction method according to any one of claims 1-9.