Metro OD passenger flow volume prediction method and device during large-scale activity field, and medium
Through the passenger flow prediction model and subway particle size technology based on random forests, the accuracy and particle size problems of subway OD passenger flow prediction during large-scale events are solved, and the prediction of higher fine-grained and accurate is achieved, and the science of subway operation and management is supported. decision making.
Patent Information
- Application Number
- CN202410960862.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to accurately predict the subway OD passenger flow during the period of large-scale events, and the prediction granularity is large and the accuracy is low, so it cannot effectively support subway operation and management.
Using a random forest-based passenger flow prediction model, combining basic data and large-scale activity-related data, standardized processing of influencing factors, establish training and verification sets, conduct model training and verification, subdividing the prediction granularity to 5 minutes, and passing the proportional allocation method , function expression method and other methods to allocate passenger flow.
It achieves higher fine-grained and accurate OD passenger flow prediction, improves prediction accuracy and scalability, can better support subway operation management, and reduce operational pressure.
Smart Images

Figure CN118940157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of subway OD passenger flow prediction, and in particular to a subway OD passenger flow prediction method, equipment and medium during the end of a large-scale activity. Background Art
[0002] In the daily operation of urban rail transit, the passenger flow during large-scale events (such as large-scale sports events and concerts) will exceed the normal peak period. The surge in passenger flow will also increase the operating pressure of urban rail transit companies and test their operational management capabilities and levels.
[0003] Large-scale events have a surge in passenger flow and a short duration. If they cannot be well predicted and controlled, they will have a great impact on the normal operation of urban rail transit and even lead to safety accidents. International cities like Beijing often hold large-scale events more frequently, and doing a good job in rail transit security for such large-scale events has gradually become a long-term task for rail transit. In the past, rail transit managers often deployed security measures based on relevant experience and lacked scientific theoretical support. However, planned large passenger flows are affected by many factors such as event scale, event type, event duration, venue location, weather conditions, etc., and it is often difficult to achieve refined subway operation management and safety assurance.
[0004] In the existing technology, Yang Jing et al. constructed a multi-layer convolutional neural network framework based on deep learning, fitted the mapping relationship between the characteristics of the activity passenger flow and the temporal and spatial distribution of the passenger flow, and optimized the mapping relationship to ensure its applicability in the case of a large passenger flow entering the station after the event. Liang Qiangsheng summarized the historical laws of background passenger flow and activity passenger flow, and constructed a subway station passenger flow prediction model during large-scale events based on the gray prediction theory for activity passenger flow. The above research has alleviated the urgent needs to a certain extent within a certain time and geographical scope, but the following problems still exist:
[0005] (1) The above studies predicted the number of passengers entering the station, but failed to predict the number of passengers leaving the station, and thus could not accurately support subway operations;
[0006] (2) The passenger flow prediction granularity of the above studies is large and the accuracy is low;
[0007] (3) The actual passenger flow after a planned large-scale event is affected by multiple factors. Summary of the invention
[0008] In order to solve the technical problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a method, device and storage medium for predicting subway OD passenger flow during the end of a large-scale event, which can achieve more fine-grained and accurate OD passenger flow prediction.
[0009] To achieve the above-mentioned purpose, the present invention provides a method for predicting subway OD passenger flow during the end of a large-scale event, comprising the following steps:
[0010] Step S1: Obtain basic data of the target site and data related to large-scale activities, and construct a training set and a validation set;
[0011] Step S2, determining factors affecting passenger flow, and performing standardization processing on each of the factors affecting passenger flow;
[0012] Step S3: Establish a passenger flow prediction model based on random forest, and use the processed training set to train the model;
[0013] Step S4: using the total passenger flow granularity subdivision method after the show, the predicted subway OD passenger flow during the entire show period is allocated to a 5-minute granularity;
[0014] Step S5: Use the verification set to complete the verification of the passenger flow prediction model, and perform subway OD passenger flow prediction during the period when the large-scale event is over based on the verified passenger flow prediction model.
[0015] According to a technical solution of the present invention, it also includes:
[0016] Step S6: Compare the predicted passenger flow with the actual passenger flow in terms of errors in three aspects: OD passenger flow, route and total number of inbound and outbound passengers, and complete the evaluation of the passenger flow prediction model.
[0017] According to a technical solution of the present invention, in step S1, the basic data at least includes: AFC card swiping data on the day of the large-scale event, the previous day and the same period last week, and the AFC card swiping data at least includes the entry line number, the entry station number, the exit line number, the exit station time, and the exit time;
[0018] The data related to the large-scale event: event name, date type, weather type, venue, event start time, stations near the venue, and the distance between the venue and the subway station;
[0019] The activity scale or number of participants of the large-scale activity is obtained through operation scheduling notification or estimation of the activity scale and number of participants.
[0020] According to a technical solution of the present invention, in step S3, the input of the passenger flow prediction model is a training set D = {(x 1 ,y 1 ),(x 2 ,y 2 ),…(x m ,y m )}, the number of features is N, the number of iterations of the weak classifier is T,
[0021] Perform t random samplings with replacement on the training set, for a total of m times, to obtain a sampling set D containing m samples t ;
[0022] Using the sampling set D t Train the tth weak classifier G t (x) When training a node of a decision tree model, randomly select a portion of sample features n from all sample features on the node, where the number of n is much smaller than N, and select an optimal feature from the randomly selected portion of sample features to divide the decision tree into left and right subtrees;
[0023] For any sample in the training set, the number of iterations is T, and there are T classification results. All classification voting results are obtained through random forest, and the category with the most votes is designated as the final output.
[0024] According to a technical solution of the present invention, in step S3, a rolling forecast verification solution is adopted in combination with the actual transportation production situation, and the processed training set is used for model training.
[0025] According to a technical solution of the present invention, in step S4, the method for granularity subdivision of the total passenger flow after the show includes a proportional allocation method and a function expression method;
[0026] The proportion allocation method includes: the total inbound quantity table lookup allocation method, the OD quantity table lookup allocation method and the peak proportion reverse calculation method.
[0027] According to a technical solution of the present invention, the estimated activity scale and number of people specifically includes:
[0028] According to the rules of subway passenger flow in time and space during the planned large-scale events, the relationship between the number of subway station departures A(T) near the venue two hours before the large-scale event, the total number of departures during the regular time period, and the number of subway station arrivals C(T) during the event is obtained: A(T)-B(T)≈C(T);
[0029] The scale and number of participants of the event are estimated by subtracting the total number of outbound trips B(T) during the regular time period from the total number of outbound trips A(T) within the two hours before the event.
[0030] According to a technical solution of the present invention, in step S6, the absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated at the OD passenger flow level. The specific calculation formula is as follows:
[0031] Absolute error = |predicted value - true value|
[0032] Relative error = absolute error / true value*100%;
[0033] At the line level, the predicted passenger flow and the actual passenger flow of each line are obtained by summing up the OD passenger flow of the corresponding stations of each line, and the absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated. The specific calculation formula is as follows:
[0034] Absolute error i号线 =|Prediction value i号线 -True value i号线 |
[0035] Relative error i号线 = Absolute error i号线 / True value i号线 *100%
[0036] Wherein, i represents the corresponding line number;
[0037] At the level of total inbound and outbound traffic, the absolute error and relative error between the predicted total inbound traffic and the actual traffic are calculated using the total inbound traffic at the end of a large-scale event. The specific calculation formula is as follows:
[0038] Absolute error 总 =|Prediction value 总 -True value 总 |
[0039]
[0040] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes a method for predicting subway OD passenger flow during the end of a large-scale event as described in any one of the above technical solutions.
[0041] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, a method for predicting subway OD passenger flow during the end of a large-scale event as described in any of the above technical solutions is implemented.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The present invention proposes a method, device and storage medium for predicting subway OD passenger flow during the end of a large-scale event. It conducts a comprehensive data analysis on the passenger flow pattern during the end of a large-scale event, qualitatively analyzes the six factors that affect the passenger flow of large-scale events, and standardizes the influencing factors. It proposes a passenger flow prediction framework based on random forests, and predicts based on the six influencing factors. The prediction framework is scalable and generalizable, and can standardize the features of different factors and incorporate them into the prediction framework for prediction.
[0044] Compared with the existing technology, this application proposes model evaluation indicators at three levels: OD passenger flow level, line level and total number of inbound and outbound levels. In the experimental verification stage, the random forest prediction model proposed in the application was compared with common models such as moving average method, SVM and XGBoost, and the accuracy and stability of the random forest model were verified. The experimental results also prove that the prediction model architecture based on random forest has a better prediction effect on the passenger flow after large-scale events.
[0045] The prediction granularity of this application is refined to 5-minute OD passenger flow, and four innovative methods for granular segmentation of total passenger flow after the show are proposed, which provides considerable support for the actual implementation of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 Schematically showing an implementation architecture diagram of a method for predicting subway OD passenger flow during the end of a large-scale event provided in accordance with one embodiment of the present invention;
[0048] Figure 2 A schematic diagram schematically shows a flow chart of a method for predicting subway OD passenger flow during the end of a large-scale event provided in one embodiment of the present invention;
[0049] Figure 3 A PP diagram schematically showing a normal distribution test in one embodiment of the present invention;
[0050] Figure 4 A diagram schematically showing a polynomial fitting result in one embodiment of the present invention;
[0051] Figure 5 A probability density function diagram in one embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0052] The description of the embodiments of this specification should be combined with the corresponding drawings, which should be considered as part of the complete specification. In the drawings, the shape or thickness of the embodiments may be enlarged and indicated for simplification or convenience. Furthermore, the parts of each structure in the drawings will be described separately. It is worth noting that the elements not shown in the drawings or not described in words are in a form known to ordinary technicians in the relevant technical field.
[0053] The description of the embodiments herein and any reference to directions and orientations are only for the convenience of description and are not to be construed as any limitation on the scope of protection of the present invention. The following description of the preferred embodiments may involve combinations of features, which may exist independently or in combination, and the present invention is not particularly limited to the preferred embodiments. The scope of the present invention is defined by the claims.
[0054] Subway OD passenger flow refers to the station's "origin-destination" flow, which is an indicator used to measure the passenger flow of subway stations and is used for transportation planning and operation management.
[0055] like Figure 1 As shown, the present invention first prepares basic data and data related to large-scale activities, including the scale and number of people in the activities; secondly, the factors affecting passenger flow (O-point station, date type, activity type, weather type, number of people in the activities, and the distance between the venue and the station) are standardized; then a passenger flow prediction model based on random forest is established to predict the OD passenger flow during the end-of-event period; then, in combination with the actual situation of transportation production, a rolling prediction verification scheme is proposed, that is, multiple predictions are made in combination with the latest data over time to gradually improve the prediction accuracy; finally, the predicted passenger flow in the entire end-of-event period is allocated to a 5-minute granularity through the granularity subdivision method of the total passenger flow after the end of the event.
[0056] like Figure 1 and Figure 2 As shown, a method for predicting subway OD passenger flow during the end of a large-scale event of the present invention comprises the following steps:
[0057] Step S1: Obtain basic data of the target site and data related to large-scale activities, and construct a training set and a validation set;
[0058] The basic data at least includes: AFC card swiping data on the day of the large-scale event, the previous day and the same period last week, and the AFC card swiping data at least includes the entry line number, entry station number, exit line number, exit station time, and exit time;
[0059] The data related to the large-scale event: event name, date type, weather type, venue, event start time, stations near the venue, and the distance between the venue and the subway station;
[0060] The activity scale or number of participants of the large-scale event is obtained through the operation scheduling notification or the estimated activity scale number. Generally, when a planned large-scale event occurs, the Transportation Committee issues a notice to prepare the operation scheduling in advance, which includes the estimated scale number and the start and end time of the event; if the above information is not available, the activity scale number can be estimated. According to the law of subway passenger flow in the time and space range during the planned large-scale event, the relationship between the exit volume A(T) of the subway station near the venue two hours before the large-scale event, the total exit volume during the regular time period, and the entrance volume C(T) of the subway station during the event is obtained: A(T)-B(T)≈C(T). Therefore, when the traffic scale number cannot be obtained, the total exit volume A(T) within two hours before the event minus the total exit volume B(T) during the regular time period can be used to estimate the activity scale number.
[0061] Step S2: determining factors affecting passenger flow, and performing standardization on each of the factors affecting passenger flow, which can be specifically expressed as:
[0062] (1) O-point station: indicated by station code;
[0063] (2) Date type: set to 1 for weekdays and 2 for weekends;
[0064] (3) Event type: sports events are set to 1, concerts are set to 2;
[0065] (4) Weather type: Weather classification is shown in Table 1 below;
[0066] (5) Number of people at the event: If there is a notification issued by the Transportation Commission, the notification data will be used. If there is no notification, the total number of people leaving the station within two hours before the event, A(T), minus the total number of people leaving the station during the regular time period, B(T), will be used to estimate the number of people at the event.
[0067] (6) Distance between the venue and the station.
[0068] The above six factors affecting passenger flow are used as characteristic variables, that is, independent variables (X), for case verification. The passenger flow from O to each D is used as the dependent variable (Y).
[0069] Weather Type clear partly cloudy light rain moderate rain heavy rain Classification Number 1 2 3 4 5 Weather Type shower Thunderstorm rainstorm fog haze Classification Number 6 7 8 9 10 Weather Type Frost typhoon storm Light Snow Moderate Snow Classification Number 11 12 13 14 15 Weather Type heavy snow Sleet hail Dust Blowing sand Classification Number 16 17 18 19 20
[0070] Table 1
[0071] Step S3: Establish a passenger flow prediction model based on random forest, and use the processed training set to train the model;
[0072] The core idea of Random Forest (RF) is bagging, which is mainly based on Bootstap sampling. Random Forest uses CART decision tree as its weak classifier and randomly selects some sample features of nodes on the decision tree. In layman's terms, Random Forest uses a random method to build a forest, which consists of many decision trees. There is no correlation between each decision tree in the Random Forest. After obtaining the forest, when a new input sample enters, each decision tree in the forest is judged separately to see which category the sample should belong to, and then see which category is selected the most, and predict that the sample belongs to that category.
[0073] Input: Sample set D = {(x 1 ,y 1 ),(x 2 ,y 2 ),…(x m ,y m )}, the number of features is N, and the number of iterations of the weak classifier is T.
[0074] Output: The final strong classifier is f(x)
[0075] Steps: For t = 1, 2…, T, perform t random samplings with replacement on the training set, for a total of m times, to obtain a sampling set D containing m samples t .
[0076] Using the sampling set D t Train the tth weak classifier G t (x) When training the nodes of the decision tree model, a portion of sample features n is randomly selected from all sample features on the node, where the number of n is much smaller than N. An optimal feature is selected from the randomly selected sample features to divide the decision tree into left and right subtrees.
[0077] For classification problems, for any sample in the training set, the number of iterations is T, and T trees will have T classification results. Random forest integrates all classification voting results and designates the category with the most votes as the final output.
[0078] For regression problems, the arithmetic mean of the regression results obtained by T weak learners is the final model output.
[0079] In step S3, a rolling forecast verification scheme is adopted in combination with the actual transportation production situation, and the processed training set is used for model training.
[0080] In the present invention, the accuracy of the basic data of the passenger flow prediction model directly affects the accuracy of the prediction results. The number of station entries, event scale (number of tickets sold), etc. are key characteristic variables that affect the accuracy of the model. However, there are objective limitations on the availability and effectiveness of the basic data of the model. As time goes by, the information obtained by the transportation department about the next event may gradually become clear.
[0081] Therefore, in combination with the actual situation of transportation production, the present invention proposes a rolling verification method, which makes multiple predictions based on the latest data as time goes by, gradually improves the prediction accuracy, guides the implementation of driving scheduling measures such as preparing vehicles and adding vehicles in different stages of rail transit operating departments, and deploys transportation capacity that matches the transportation volume in advance, so as to meet the needs of planned large passenger flows, improve transportation capacity, and alleviate the pressure on rail transit facilities and equipment.
[0082] The reference scheme of characteristic variables used in rolling forecast is shown in Table 3 below.
[0083]
[0084] Table 3
[0085] Step S4: using the total passenger flow granularity subdivision method after the show, the predicted subway OD passenger flow during the entire show period is allocated to a 5-minute granularity;
[0086] In order to allocate the predicted OD passenger flow in the entire end-of-show period to a 5-minute granularity, the present invention proposes four allocation methods, of which the first three are proportional methods and the last one is a function expression method.
[0087] 1. Proportional Allocation Method
[0088] The total amount of station traffic is allocated by table lookup. By analyzing historical data, the 5-minute granularity allocation ratio of passenger flow during the entire end-of-station period is determined, and the total amount of station traffic is divided into each 5-minute period.
[0089] OD volume lookup table allocation method. By analyzing historical data, determine the 5-minute granularity allocation ratio of passenger flow during the entire end-of-show period, and divide each OD passenger flow into each 5-minute period. The distribution ratio is shown in the following table. Since most OD passenger flows are small, the value will be smaller after being divided by proportion. Therefore, it is recommended to retain the original decimal after multiplying the OD passenger flow by the proportion so that the total amount after summing will not have too large deviations.
[0090] The percentage of passenger flow at each 5-minute granularity to the total passenger flow after the station is shown in Table 4. It can be seen that 50%-60% of the passenger flow will be evacuated during the peak period of passenger flow entering the station.
[0091]
[0092] Table 4
[0093] Peak ratio back calculation method:
[0094] Step 1: Determine the peak ratio. Since the station's entry capacity is limited, divide the station's maximum entry capacity (unit: person / 5min) by the total evacuation passenger flow to obtain a peak evacuation ratio.
[0095] Step 2: Determine the number of peaks. During the peak period, 50%-60% of the incoming passengers should be evacuated. If the proportion that can be evacuated by a single peak is less than 50%-60%, increase the number of peaks until the evacuation proportion during the peak period reaches 50%-60%.
[0096] Step 3: Determine the minimum ratio. Divide the number of passengers entering the station before the end of the evacuation by the total passenger flow to obtain the minimum ratio.
[0097] Step 4: Determine other proportions. Determine the duration of other proportions based on the duration of the stop and the number of peaks, and determine the remaining proportions based on the remaining time in an arithmetic progression.
[0098] Step 5: Allocate the total passenger flow leaving the station according to the proportion of passenger flow entering the station within each 5-minute period determined in Steps 1-4.
[0099] 2. Function Expression Method
[0100] Find the functional relationship between the pit stop time and the pit stop volume, that is, obtain the pit stop volume at any pit stop time.
[0101] Since the obtained station entry data has a granularity of 5 minutes, we can only analyze the cumulative distribution function of the station entry volume first, and then obtain the probability density function of the station entry volume after derivation.
[0102] Definition: x: the proportion of the study period to the total end-of-session period; Y: the proportion of the cumulative number of arrivals during the study period to the total number of arrivals (cumulative distribution function); y: the probability density function of Y.
[0103] (1) Normal distribution
[0104] First, check whether x and Y(y) satisfy the normal distribution. Figure 3 As can be seen from the PP diagram shown, the actual cumulative probability is not highly consistent with the theoretical cumulative probability.
[0105] The Kolmogorov-Smirnov test (KS test) is based on the sample cumulative distribution function. The KS test result of the Y variable is: KstestResult (statistic = 0.8413447460685429, pvalue = 1.2815952992139096e-198). Since P (pvalue) < 0.05, Y does not obey the normal distribution.
[0106] (2) Lognormal distribution
[0107] Since the cumulative distribution function of the lognormal distribution is unknown, and the probability distribution data of the arrival volume is unknown (if the probability distribution data is known, it can be fitted using Excel's LOGNORMDIST function), the lognormal distribution function cannot fit the existing data.
[0108] (3) Polynomial
[0109] like Figure 4 As shown, it shows the polynomial fitting result graph.
[0110] As can be seen from the figure above, Y and x are fitted to obtain a cubic function: Y = -1.3659x 3 +1.8928x 2 +0.4852x-0.0158(x∈(0,1)), goodness of fit R 2 =0.97, indicating that the function has a high degree of fit. Therefore, the probability density function is y = -4.0977x 2 +3.7856x+0.4852(x∈(0,1)), as follows Figure 5 As shown, Figure 5 It shows the probability density function graph.
[0111] Example: It is known that the total passenger flow after the event is 3,000 people, and the evacuation time is 30 minutes. According to the following formula, the passenger flow in the 30 seconds from 12 minutes to 12.5 minutes after the large passenger flow starts to enter the station is calculated:
[0112]
[0113] Y(x 1 )=-1.3659×0.4 3 +1.8928×0.4 2 +0.4852×0.4-0.0158=0.3937
[0114] Y(x 2 )=-1.3659×0.417 3 +1.8928×0.417 2+0.4852×0.417-0.0158=0.4166
[0115] Y(x 2 )-Y(x 1 )=0.0229
[0116] Then: the passenger flow entering the station in the 30 seconds from 12min to 12.5min is 0.0229×3000=69 people.
[0117] Step S5: Use the verification set to complete the verification of the passenger flow prediction model, and perform subway OD passenger flow prediction during the period when the large-scale event is over based on the verified passenger flow prediction model.
[0118] Step S6: Compare the predicted passenger flow with the actual passenger flow in terms of errors in three aspects: OD passenger flow, route and total number of inbound and outbound passengers, and complete the evaluation of the passenger flow prediction model.
[0119] The absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated at the OD passenger flow level. The specific calculation formula is as follows:
[0120] Absolute error = |predicted value - true value|
[0121] Relative error = absolute error / true value*100%;
[0122] Among them, absolute error refers to the absolute value of the difference between the predicted value and the true value, reflecting the degree of deviation of the predicted passenger flow from the actual passenger flow. The smaller the absolute error, the closer the predicted passenger flow is to the actual passenger flow, and the better the prediction effect. Relative error refers to the ratio of absolute error to the measured true value, expressed as a percentage. The relative error is equivalent to the percentage of the absolute error of the predicted passenger flow to the actual passenger flow. The smaller the relative error, the higher the credibility of the predicted passenger flow.
[0123] Since the OD passenger flow is too random, the OD passenger flow prediction cannot guarantee sufficient accuracy. Since the small passenger flow (OD passenger flow ≤20 during the entire dispersal period) has little impact on rail transit operations, the error of this part of the passenger flow is discarded, that is, the corresponding predicted passenger flow when the actual passenger flow is less than or equal to 20 is considered to be 100% correct.
[0124] At the line level, the predicted passenger flow and the actual passenger flow of each line are obtained by summing up the OD passenger flow of the corresponding stations of each line, and the absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated. The specific calculation formula is as follows:
[0125] Absolute error i号线 =|Prediction value i号线 -True value i号线 |
[0126] Relative errori号线 = Absolute error i号线 / True value i号线 *100%
[0127] Wherein, i represents the corresponding line number;
[0128] At the line level, the relative error is smaller, and it is more practical than the predicted passenger flow at the OD passenger flow level. Within a certain error range, reasonable prediction of line passenger flow can help management departments make arrangements in advance for the surge in passenger flow that may be caused by large-scale events, such as appropriately adding vehicles, shortening parking intervals, or adjusting driving organization plans for lines that may generate passenger flow gatherings. Therefore, mastering passenger flow forecast information at the line level has positive significance for the daily operation of urban rail transit, which is conducive to the scientific response of relevant departments to the surge in passenger flow caused by large-scale events, thereby meeting passenger needs. On the other hand, it can effectively avoid the waste of train capacity, reduce transportation costs, and ensure the balance of the transportation capacity resources of the entire urban rail transit network.
[0129] At the level of total inbound and outbound traffic, the absolute error and relative error between the predicted total inbound traffic and the actual traffic are calculated using the total inbound traffic at the end of a large-scale event. The specific calculation formula is as follows:
[0130] Absolute error 总 =|Prediction value 总 -True value 总 |
[0131]
[0132] At the level of total passenger flow, after a large-scale event ends, the crowds gathered at the event venue spread outward, so the passenger flow into the station shows a short-term high-burst state. Reasonable passenger flow forecasting of the station entrance volume is helpful to test whether the capacity of the station can meet the needs of passenger evacuation. To a certain extent, it can provide decision-making information support for relevant managers, thereby maximizing passenger demand, optimizing passenger flow organization plans, avoiding accidents, and ensuring station management safety.
[0133] The following is an illustration with specific examples.
[0134] All data obtained on the major event days at Wukesong Station in 2019 were used as training data, and the data on January 2, 2020 were used as verification data.
[0135] 1. Model prediction results
[0136] The average absolute error and relative average error of the OD prediction results of 385 stations in the whole network are statistically analyzed. Because the case only uses the data of Wukesong, the two characteristic variables of O point data and the distance between the venue and the station do not play a substantial role in this case.
[0137] 1. Error results of OD passenger flow
[0138] Under the joint effect of the six characteristic variables, the error results of the random forest algorithm in predicting OD passenger flow are shown in Table 5 below.
[0139] In Table 5, OD passenger flow refers to the passenger flow of a pair of ODs from the station where the venue is located as O and other stations as D during the period after the large-scale event ends; the sample number refers to the number of OD pairs whose OD passenger flow is within the set interval. The meaning of the table headers in the following text is the same as above.
[0140] OD passenger flow Sample size Mean absolute error Mean relative error x>100 1 5 4.20% 50<x≤100 1 3 3.34% 40<x≤50 0 —— —— 30<x≤40 3 3 10.35% 20<x≤30 2 7 28.99% 10<x≤20 38 5 31.04% 0<x≤10 227 2 68.68% x=0 113 0 0.00%
[0141] Table 5
[0142] 2. Errors at the line level
[0143] There are the following problems in predicting from the OD level:
[0144] (1) During the entire period of the show, the OD passenger flow is extremely small (98.18% of the OD passenger flow is below 20). Simply focusing on the accuracy of OD passenger flow prediction is of little significance in terms of order of magnitude.
[0145] (2) The essential purpose of OD prediction is to guide driving plans. From this essential purpose, there is no need to be overly concerned about whether the specific value of each OD is accurate. If certain rules can be obtained from a more macroscopic line level, it can play a role in guiding the adjustment of driving plans.
[0146] Table 6 below shows the accuracy of OD prediction results at the line level. In Table 6, point O is Wukesong, and point D is replaced by the line where it is located.
[0147]
[0148] Table 6
[0149] As can be seen from the above table, the results of OD prediction show high accuracy at the line level and can provide a decision-making basis for the adjustment of the actual driving plan.
[0150] 3. Error in the amount of entry
[0151] From the perspective of the total number of passengers entering the station after the event at Wukesong Station, the actual value of the total number of passengers entering the station when the event ended on January 2, 2020 was 1895, the predicted value was 1921, the absolute error was 26, and the relative error was 1.37%. This shows that the results of OD prediction show high accuracy in terms of the number of passengers entering the station, which can provide a decision-making basis for the organization of on-site work at the station.
[0152] (II) Analysis of causes of errors
[0153] Since the prediction date, January 2, 2020, is a weekday and the Cadillac Center is hosting a sports event, the historical data under the same conditions (weekday, sports event) on which the prediction algorithm is based (taking samples with OD passenger flow of more than 20 people as an example) are shown in Table 7 below.
[0154]
[0155] Table 7
[0156] Based on Table 7, we can see that:
[0157] (1) The OD samples with more than 20 passengers have large differences in passenger flow under similar events. Taking Wukesong→Apple Garden as an example, the minimum OD passenger flow after the event is 77 and the maximum is 240. Therefore, the original OD passenger flow data does not have a strong regularity.
[0158] (2) The passenger flow data of each OD under 14 events of the same type showed a large standard deviation. Taking Wukesong→Pingguoyuan as an example, the standard deviation of the 14-day data was 59. This shows that the original OD passenger flow data is too discrete. The historical OD passenger flow showed great volatility and dispersion, and it can be said that there is almost no regularity. Prediction based on such raw data will not produce good results.
[0159] (3) The OD distribution of large-scale events is a random, complex problem that is affected by too many imperceptible factors. Under the influence of the factors that can be perceived, it is difficult to further improve the prediction accuracy.
[0160] (III) Model stability verification
[0161] Using the data set used in this section, the experiment was repeated three times to test the impact of the randomness of the algorithm itself on the prediction results and verify the stability of the model. The results of the three tests are shown in Table 8 below, which shows the model stability test results.
[0162]
[0163] Table 8
[0164] It can be seen from Table 8 above that the average relative error of OD passenger flow prediction for more than 20 people is about 12%, and the model has good stability.
[0165] (IV) Cross-validation
[0166] 5-fold cross validation is a type of K-fold cross validation, which divides the original passenger flow data into 5 sub-samples. A single sub-sample is retained as the data for validating the model, and the other 4 samples are used for training. In this way, each sub-sample passenger flow data is used as a validation set to obtain 5 groups of results. Finally, the 5 results are averaged or other combinations are used to obtain a single estimated passenger flow data.
[0167] The root mean square error is the square root of the ratio of the sum of the squares of the deviations between the observed value and the true value to the number of observations m (m=5). The root mean square error is calculated for the five groups of results obtained by cross-validation to measure the deviation between the predicted value and the true value.
[0168]
[0169] After the Wukesong Station activity ended, a total of 30 (30 days) OD data were used for 5-fold cross validation, that is, each group had 24 training samples and 6 test samples. The cross validation error is shown in Table 9 below:
[0170] OD passenger flow Sample size The average of the root mean square error of the 5-fold cross validation x>100 1 1915.78 50<x≤100 1 1095.73 40<x≤50 0 0.00 30<x≤40 3 906.57 20<x≤30 2 773.99 10<x≤20 38 327.83 0<x≤10 227 45.75 x=0 113 2.74
[0171] Table 9
[0172] It can be seen from Table 9 that the root mean square error of the 5-fold cross validation is high. The reasons are as follows:
[0173] (1) Insufficient data volume. When using cross-validation of machine learning methods on 30 data sets, there are certain problems with the data volume.
[0174] (2) OD data is highly random. According to many analyses in this paper, OD data itself is highly random and the basic data is not very regular, so it is impossible to obtain a lower error.
[0175] (3) There is no need to be overly concerned about the errors at the OD level. The other validations in this report seek the accuracy of model predictions at the line level and the total number of inbound traffic levels, while cross-validation randomly selects data for validation at the OD level, which cannot achieve practical significance at the practical application level.
[0176] (V) Verification of other algorithms
[0177] The error results of the random forest algorithm predicting OD passenger flow are shown in Table 10 below. Table 10 shows the prediction results of the random forest algorithm.
[0178] OD passenger flow Sample size Mean absolute error Mean relative error x>100 1 5 4.20% 50<x≤100 1 3 3.34% 40<x≤50 0 —— —— 30<x≤40 3 3 10.35% 20<x≤30 2 7 28.99% 10<x≤20 38 5 31.04% 0<x≤10 227 2 68.68% x=0 113 0 0.00%
[0179] Table 10
[0180] The error results of the moving average method for predicting OD passenger flow are shown in Table 11. Taking November 8, 2019 (working day, sports event) as a test case, the data of the five activities closest to the predicted date are used for prediction. The corresponding dates of the five activities are 11.6, 11.20, 11.28, 12.10 and 12.17, respectively, to verify the OD passenger flow on November 8, 2019 (working day, sports event).
[0181]
[0182] Table 11
[0183] The error results of the support vector machine algorithm predicting OD passenger flow are shown in Table 12 below.
[0184] OD passenger flow Sample size Mean absolute error Mean relative error x>100 1 17 14.79% 50<x≤100 1 13 14.51% 40<x≤50 0 —— —— 30<x≤40 3 15 47.14% 20<x≤30 2 19 79.79% 10<x≤20 38 10 66.62% 0<x≤10 227 4 133.59% x=0 113 1 0.00%
[0185] Table 12
[0186] The error results of XGBoost algorithm predicting OD passenger flow are shown in Table 13 below.
[0187] OD passenger flow Sample size Mean absolute error Mean relative error x>100 1 15 12.97% 50<x≤100 1 9 10.03% 40<x≤50 0 —— —— 30<x≤40 3 4 12.04% 20<x≤30 2 7 30.04% 10<x≤20 38 5 34.65% 0<x≤10 227 2 74.66% x=0 113 1 0.00%
[0188] Table 13
[0189] By comparing the random forest algorithm with the moving average method, SVM algorithm and XGBoost algorithm, it can be seen that the random forest algorithm has the best result.
[0190] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes a method for predicting subway OD passenger flow during the end of a large-scale event as described in any of the above technical solutions.
[0191] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, a method for predicting subway OD passenger flow during the end of a large-scale event as described in any of the above technical solutions is implemented.
[0192] The invention discloses a method, device and storage medium for predicting subway OD passenger flow during the period of a large-scale event. The method for predicting subway OD passenger flow during the period of a large-scale event comprises: step S1, obtaining comprehensive demand and analyzing it; step S2, combining basic functional positioning and characteristics of satellite systems of different orbit types to complete task decomposition and planning; step S3, integrating and outputting global multi-system and multi-level task planning schemes according to the task planning of each satellite system; for multi-level hybrid satellite systems, stratification and classification can be performed according to basic functional positioning and characteristics, global task requirements can be decomposed into multiple types of satellite systems, and corresponding task planning scheme inputs can be generated for each type of satellite system; according to the characteristics of each process such as measurement and control, imaging and data transmission, the relevant tasks of each link are independently planned from the ground and on the satellite, and a freely combinable multi-level planning scheme is formed to achieve rapid response to emergencies and full utilization of on-satellite resources.
[0193] Furthermore, the present invention adopts an improved genetic algorithm to arrange meta-tasks. The algorithm mainly optimizes the order of meta-tasks from the perspectives of observation time, resolution and observation path. Before the iteration of the improved genetic algorithm begins, this specification also applies the Hamilton improvement circle method to obtain a better initial population by continuously selecting sub-circles (and adjusting the order).
[0194] In addition, it should be noted that the present invention can be provided as a method, an apparatus or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0195] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0197] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0198] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for those skilled in the art, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.
Claims
1. A method for predicting subway OD passenger flow during the end of a large-scale event, characterized in that: The following steps are involved: Step S1: Obtain basic data of the target site and data related to large-scale activities, and construct a training set and a validation set; Step S2, determining factors affecting passenger flow, and performing standardization processing on each of the factors affecting passenger flow; Step S3: Establish a passenger flow prediction model based on random forest, and use the processed training set to train the model; Step S4: using the total passenger flow granularity subdivision method after the show, the predicted subway OD passenger flow during the entire show period is allocated to a 5-minute granularity; Step S5: Use the verification set to complete the verification of the passenger flow prediction model, and perform subway OD passenger flow prediction during the period when the large-scale event is over based on the verified passenger flow prediction model.
2. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 1 is characterized in that: Also includes: Step S6: Compare the predicted passenger flow with the actual passenger flow in terms of errors in three aspects: OD passenger flow, route and total number of inbound and outbound passengers, and complete the evaluation of the passenger flow prediction model.
3. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 1 or 2, characterized in that: In step S1, the basic data at least includes: AFC card swiping data on the day of the large-scale event, the previous day and the same period last week, and the AFC card swiping data at least includes the entry line number, the entry station number, the exit line number, the exit station time, and the exit time; The data related to the large-scale event: event name, date type, weather type, venue, event start time, stations near the venue, and the distance between the venue and the subway station; The activity scale or number of participants of the large-scale activity is obtained through operation scheduling notification or estimation of the activity scale and number of participants.
4. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 1 is characterized in that: In step S3, the input of the passenger flow prediction model is the training set D = {(x1, y1), (x2, y2), ... (x m ,y m )}, the number of features is N, the number of iterations of the weak classifier is T, Perform t random samplings with replacement on the training set, for a total of m times, to obtain a sampling set D containing m samples t ; Using the sampling set D t Train the tth weak classifier G t (x) When training a node of a decision tree model, randomly select a portion of sample features n from all sample features on the node, where the number of n is much smaller than N, and select an optimal feature from the randomly selected portion of sample features to divide the decision tree into left and right subtrees; For any sample in the training set, the number of iterations is T, and there are T classification results. All classification voting results are obtained through random forest, and the category with the most votes is designated as the final output.
5. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 1 is characterized in that: In step S3, a rolling forecast verification scheme is adopted in combination with the actual transportation production situation, and the processed training set is used for model training.
6. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 1, characterized in that: In step S4, the method for granularity subdivision of the total passenger flow after the show includes a proportional allocation method and a function expression method; The proportion allocation method includes: the total inbound quantity table lookup allocation method, the OD quantity table lookup allocation method and the peak proportion reverse calculation method.
7. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 3, characterized in that: The estimated activity scale and number of people include: According to the rules of subway passenger flow in time and space during the planned large-scale events, the relationship between the number of subway station departures A(T) near the venue two hours before the large-scale event, the total number of departures during the regular time period, and the number of subway station arrivals C(T) during the event is obtained: A(T)-B(T)≈C(T); The scale and number of participants of the event are estimated by subtracting the total number of outbound trips B(T) during the regular time period from the total number of outbound trips A(T) within the two hours before the event.
8. The method for predicting subway OD passenger flow during the end of a large-scale event according to claim 2, characterized in that: In step S6, the absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated at the OD passenger flow level. The specific calculation formula is as follows: Absolute error = |predicted value - true value| Relative error = absolute error / true value*100%; At the line level, the predicted passenger flow and the actual passenger flow of each line are obtained by summing up the OD passenger flow of the corresponding stations of each line, and the absolute error and relative error between the predicted passenger flow and the actual passenger flow are calculated. The specific calculation formula is as follows: Absolute error i号线 =|Prediction value i号线 -True value i号线 | Relative error i号线 = Absolute error i号线 / True value i号线 *100% Wherein, i represents the corresponding line number; At the level of total inbound and outbound traffic, the absolute error and relative error between the predicted total inbound traffic and the actual traffic are calculated using the total inbound traffic at the end of a large-scale event. The specific calculation formula is as follows: Absolute error 总 =|Prediction value 总 -True value 总 | 9. An electronic device, characterized in that: include: One or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes the subway OD passenger flow prediction method during the end of a large-scale event as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, implement the method for predicting subway OD passenger flow during the end of a large-scale event as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Short-time large-scale activity peripheral rail station passenger flow volume prediction method based on rail transaction data
CN110889092A
Short-time passenger flow prediction method for new line station of urban rail transit
CN113537596A
Subway inbound and outbound passenger flow prediction method based on deep learning
CN114241385A
Subway line network passenger flow prediction method
CN115953897A
A method for prediction of key performance parameter of an aero-engine transition state acceleration process based on space reconstruction
US20200184131A1
