Multi-space rail transit passenger flow prediction method based on deep learning
By calculating the accessibility probability and average reachable time of rail transit stations, combining the importance of spatially similar stations, distinguishing between normalized and abnormal passenger flows, the problem of insufficient accuracy and interpretability in the existing passenger flow prediction methods is solved, and the accuracy of passenger flow prediction is improved.
Patent Information
- Application Number
- CN202510258508.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The existing rail transit passenger flow prediction methods cannot accurately distinguish between normalized and abnormal passenger flow, resulting in poor interpretability and low accuracy of prediction results.
By obtaining the reachability probability and average reachable time of the site, calculating the normalized passenger flow index of the daily and weekly cycles, combining the importance of spatially similar sites, weighted summing is carried out to obtain the normalized and abnormal passenger flow of the site.
It improves the accuracy of obtaining normalized and abnormal passenger flow, and improves the training and prediction accuracy of passenger flow prediction models.
Smart Images

Figure CN119740891B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of passenger flow prediction, and in particular to a multi-space rail transit passenger flow prediction method based on deep learning. Background Art
[0002] Rail transit passenger flow forecasting is a key link in operation management and service optimization. Accurate and reliable short-term passenger flow forecasting can provide support for urban rail transit operations in many aspects, such as alleviating station congestion, reducing the probability of accidents, optimizing train timetables, and improving the efficiency of operation organization and resource allocation. However, passenger flow forecasting is highly challenging due to the influence of multiple external factors and complex spatiotemporal characteristics.
[0003] Most of the existing rail transit passenger flow prediction methods use deep learning models to learn historical passenger flow data for prediction. During the deep learning model learning process, it is often necessary to directly learn, analyze and output passenger flow data and other related factors, without accurately distinguishing historical passenger flow data from normalized passenger flow. Since normalized passenger flow has a strong regularity, abnormal passenger flow has a greater impact on the prediction performance of the model. Therefore, the obtained prediction results are not only poorly interpretable, but also have a low prediction accuracy. Summary of the invention
[0004] In order to solve the technical problem that the existing passenger flow data cannot accurately distinguish between normalized and abnormal passenger flows, the purpose of the present invention is to provide a multi-space rail transit passenger flow prediction method based on deep learning. The technical solution adopted is as follows:
[0005] In a first aspect of the present invention, a multi-space rail transit passenger flow prediction method based on deep learning is provided, comprising:
[0006] Obtain the passenger flow data of the site within a preset historical time period;
[0007] According to the passenger flow data, obtain the reachability probability and average reachability time of the station to other stations;
[0008] According to the difference in the accessibility probability of the station on any two days and the difference in the average accessibility time, the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of the station are obtained;
[0009] Obtaining daily spatially similar sites of the site within a first preset time interval, and obtaining the daily cycle importance of the site according to the maximum number of similar sites in the same space;
[0010] Based on the importance of the daily cycle, a weighted sum of the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index is performed to obtain the normalized passenger flow index of the station;
[0011] Based on the normalized passenger flow index, the normalized passenger flow and the abnormal passenger flow of the station are obtained.
[0012] In an exemplary embodiment, the process of obtaining the reachability probability includes:
[0013] Acquire the number of passengers entering the station from the first station within the second preset time interval to obtain a first number of passengers;
[0014] Obtain the number of passengers exiting from the second station in the first number of passengers to obtain the second number of passengers; the first station and the second station are any two different stations;
[0015] Calculating the ratio of the second number of passengers to the first number of passengers to obtain a probability of reaching the second station from the first station within a second preset time interval;
[0016] The process of obtaining the average reachable time includes:
[0017] Obtain the time taken by each passenger corresponding to the second number of passengers to obtain a first reachable time;
[0018] Based on the second number of passengers and the first reachable time of each passenger, the average reachable time for passengers to reach the second station from the first station within the second preset time interval is obtained.
[0019] In an exemplary embodiment, the multi-space rail transit passenger flow prediction method further includes:
[0020] Based on the reachability probability of the site to each other site, construct a reachability probability matrix corresponding to the second preset time interval of the site;
[0021] Based on the average reachable time from the site to other sites, an average reachable time matrix corresponding to a second preset time interval of the site is constructed; the time length of the second preset time interval is less than the time length of a day.
[0022] In an exemplary embodiment, obtaining the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index of the station according to the difference in the reachability probability of the station on any two days and the difference in the average reachability time includes:
[0023] Obtain a daily reachable probability matrix sequence and an average reachable time matrix sequence of the first site, wherein the reachable probability matrix sequence is composed of reachable probability matrices of multiple second preset time intervals of each day arranged in time sequence; the average reachable time matrix sequence is composed of average reachable time matrices of multiple second preset time intervals of each day arranged in time sequence;
[0024] Obtain the difference between the matrices at corresponding positions in the reachability matrix sequence of the first day and the second day of the first station to obtain the reachability probability difference, and obtain the difference between the matrices at corresponding positions in the average reachability time matrix sequence of the first day and the second day of the first station to obtain the average reachability time difference; the first day and the second day are any two different dates;
[0025] According to the reachability probability difference and the average reachability time difference, the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index of the first station are obtained.
[0026] In an exemplary embodiment, the process of obtaining the daily cycle normalized passenger flow index includes:
[0027] Obtain the difference in reachability probability and average reachability time of any two adjacent days of the first station in a first preset number of consecutive days;
[0028] The normalized passenger flow difference between any two consecutive days is obtained by integrating the difference in the probability of reaching the destination and the difference in the average reaching time between any two consecutive days;
[0029] The daily cycle normalized passenger flow index of the first station is obtained by integrating the normalized passenger flow differences of any two adjacent days among the first preset number of consecutive days.
[0030] In an exemplary embodiment, the process of obtaining the weekly normalized passenger flow index includes:
[0031] Obtain the difference in reachability probabilities and the difference in average reachability times on the same day of any two adjacent weeks of the first station in a second preset number of consecutive weeks;
[0032] The normalized passenger flow difference on the same day is obtained by integrating the difference in the probability of accessibility and the difference in the average time of accessibility on the same day of any two adjacent weeks;
[0033] The normalized passenger flow differences of all the same days in the second preset number of consecutive weeks are integrated to obtain the weekly normalized passenger flow index of the first station.
[0034] In an exemplary embodiment, obtaining spatially similar sites of a site every day within a first preset time interval includes:
[0035] Obtain the daily reachability probability difference and average reachability time difference between the first site and other sites within a first preset time interval; the first site is any site;
[0036] The difference in reachability probability and the difference in average reachability time are integrated to obtain the daily normalized passenger flow difference between the first station and other stations;
[0037] The station corresponding to the smallest daily normalized passenger flow difference between the first station and other stations is obtained as the spatially similar station of the first station in the first preset time interval.
[0038] In an exemplary embodiment, obtaining the daily cycle importance of a site according to the maximum number of similar sites in the same space includes:
[0039] According to the daily spatially similar sites of the first site within the first preset time interval, a maximum number of spatially similar sites is obtained; the first site is any site;
[0040] The ratio of the maximum number to the number of days in the first preset time interval is used as the daily cycle importance degree of the first site.
[0041] In an exemplary embodiment, obtaining the normalized passenger flow and the abnormal passenger flow of a site based on the normalized passenger flow index includes:
[0042] The product of the actual passenger flow of the station during the preset period of time and the normalized passenger flow index is used as the normalized passenger flow of the station during the preset period of time; the difference between the actual passenger flow and the normalized passenger flow is used as the abnormal passenger flow of the station during the preset period of time.
[0043] In an exemplary embodiment, the multi-space rail transit passenger flow prediction method further includes:
[0044] Obtaining a normalized passenger flow matrix and an abnormal passenger flow matrix for the preset historical time period of the site;
[0045] Sliding the normalized passenger flow matrix according to a preset window size to obtain each window, the normalized passenger flow in each window is used as a training set of the normalized passenger flow prediction model, the output of the normalized passenger flow prediction model is the normalized passenger flow after each window and adjacent to each window, and the normalized passenger flow prediction model is trained;
[0046] The daily influencing factors in the preset historical time period are obtained, and the daily influencing factors are used as the input of the abnormal passenger flow prediction model. The output of the abnormal passenger flow prediction model is the daily abnormal passenger flow, and the abnormal passenger flow prediction model is trained.
[0047] The present invention has the following beneficial effects: the present invention obtains the reachability probability and average reachability time of the station to other stations according to the passenger flow data of the station in a preset historical time period, thereby obtaining the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of the station according to the difference in the reachability probability of the station on any two days and the difference in the average reachability time. The daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index can reflect the daily and weekly normalized passenger flow conditions of the station. These two data are necessary parameters for obtaining the normalized passenger flow index of the station, which can improve the accuracy of obtaining the subsequent normalized passenger flow and abnormal passenger flow of the station; according to the spatial similarity of the station every day within the first preset time interval, the daily cycle importance degree of the station is obtained, and the daily cycle importance degree is used as a weight coefficient, and the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index are weighted and summed to obtain the normalized passenger flow index of the station. Finally, according to the normalized passenger flow index, the normalized passenger flow and abnormal passenger flow of the station are obtained, which can improve the accuracy of obtaining the normalized passenger flow and abnormal passenger flow of the station. Then, when the normalized passenger flow and abnormal passenger flow of the station are applied to the subsequent model training and passenger flow prediction, the accuracy of the trained model and the accuracy of the passenger flow prediction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flowchart of a multi-space rail transit passenger flow prediction method based on deep learning provided by an embodiment of the present invention;
[0049] Figure 2 is a flow chart of obtaining reachability probability provided by an embodiment of the present invention;
[0050] Figure 3 is a flowchart for obtaining the average reachable time provided by an embodiment of the present invention;
[0051] Figure 4 A multi-space rail transit passenger flow prediction method based on deep learning provided by an embodiment of the present invention also includes a flowchart of method steps;
[0052] Figure 5 is a schematic diagram of the structure of a reachable matrix provided by an embodiment of the present invention;
[0053] Figure 6 is a flowchart of step 3 provided by an embodiment of the present invention;
[0054] Figure 7 This is a flow chart for obtaining a daily cycle normalized passenger flow index provided by an embodiment of the present invention;
[0055] Figure 8 This is a flow chart for obtaining a weekly normalized passenger flow index provided by an embodiment of the present invention;
[0056] Fig. 9 is a flowchart of obtaining spatially similar sites provided by an embodiment of the present invention;
[0057] Fig.10 is a flowchart for obtaining the importance degree of a daily cycle provided by an embodiment of the present invention;
[0058] Fig.11 A multi-space rail transit passenger flow prediction method based on deep learning provided by an embodiment of the present invention also includes a prediction flow chart. DETAILED DESCRIPTION
[0059] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs. The passenger flow data involved in this application are obtained with full consent and authorization, and the collection, use and processing of relevant information must comply with relevant laws, regulations and standards of relevant countries and regions.
[0061] This embodiment provides a multi-space rail transit passenger flow prediction method based on deep learning, which is aimed at a specific scenario: used to obtain the normalized passenger flow and abnormal passenger flow of a single station of rail transit.
[0062] For each station, there are usually normal passenger flows and abnormal passenger flows. Normal passenger flows follow certain rules in daily life and are less affected by special factors, such as weather, holidays, activities, etc., with good predictability and controllability. Modern models can accurately predict future passenger flow trends; on the contrary, abnormal passenger flows have a greater impact on the final model prediction results and are difficult to accurately predict using ordinary methods. Therefore, this embodiment provides a multi-space rail transit passenger flow prediction method based on deep learning, which mainly distinguishes normal passenger flows from abnormal passenger flows based on historical passenger flow data.
[0063] like Figure 1 As shown, the multi-space rail transit passenger flow prediction method based on deep learning provided in this embodiment includes the following steps:
[0064] Step 1: Obtain the passenger flow data of the station within a preset historical time period;
[0065] Step 2: Based on the passenger flow data, obtain the reachability probability and average reachability time of the station to other stations;
[0066] Step 3: According to the difference in the accessibility probability of the station on any two days and the difference in the average accessibility time, the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of the station are obtained;
[0067] Step 4: Obtain the daily spatially similar sites of the site within the first preset time interval, and obtain the daily cycle importance of the site according to the maximum number of similar sites in the same space;
[0068] Step 5: Based on the importance of the daily cycle, the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index are weighted and summed to obtain the normalized passenger flow index of the station;
[0069] Step 6: Based on the normalized passenger flow index, obtain the normalized passenger flow and abnormal passenger flow of the station.
[0070] The following is a detailed description of the various steps of a multi-space rail transit passenger flow prediction method based on deep learning provided in this embodiment.
[0071] Step 1: Obtain the passenger flow data of the site within a preset historical time period.
[0072] A historical time period is preset, and the length of the historical time period is set according to actual needs, such as three months of history, that is, 90 days.
[0073] Obtain passenger flow data for each rail transit station within a preset historical time period. It should be understood that this embodiment obtains passenger flow data by obtaining card swiping information of passengers with traceable identity information according to the control center. Remove the passenger information whose identity information cannot be traced, such as screening out passengers who do not use entry and exit identity codes. For example, the passenger information using the "Subway One-Day Card" cannot be tracked and confirmed. Since most passengers currently use code scanning to enter and exit the station, the number of passengers whose identities cannot be traced is small, and it is believed that their impact on the overall passenger flow is small.
[0074] Passenger flow data includes passengers' boarding station information (i.e. entry station information), alighting station information (i.e. exit station information), entry time and exit time, etc.
[0075] Step 2: Based on the passenger flow data, obtain the reachability probability and average reachability time of the station to other stations.
[0076] According to the passenger flow data, the reachability probability and average reachability time of each station can be obtained. In an exemplary embodiment, the process of obtaining the reachability probability is as follows: Figure 2 As shown, including:
[0077] Step 2-1: Obtain the number of passengers entering the station from the first station within the second preset time interval to obtain the first number of passengers.
[0078] A time interval is preset, which is defined as a second preset time interval. The second preset time interval is a unit time period, and the length of the time period is set according to actual needs, such as one hour. Moreover, the setting of the second preset time interval needs to satisfy that a certain number of passengers enter the station from the station within the second preset time interval, that is, at least one passenger enters the station from the station.
[0079] And for the convenience of explanation, the first site and the second site are set to be any two different sites.
[0080] Since the passenger flow data includes data information such as the passenger's entry station information, exit station information, entry time, and exit time, etc. Therefore, according to the passenger flow data, the number of passengers entering the station from the first station within the second preset time interval is obtained to obtain the first number of passengers, for example, the number of passengers entering the station from the first station within each hour is obtained to obtain the first number of passengers.
[0081] Step 2-2: Obtain the number of passengers exiting from the second station in the first number of passengers to obtain the second number of passengers.
[0082] Passengers entering the station at the first station have the possibility of exiting the station from other stations. In this case, passengers entering the station at the first station have a certain possibility of exiting the station from the second station. Therefore, the number of passengers exiting the station from the second station is obtained from the first number of passengers, and the number of passengers exiting the second station in the first number of passengers is defined as the second number of passengers.
[0083] Step 2-3: Calculate the ratio of the second number of passengers to the first number of passengers to obtain the reachability probability of passengers from the first station to the second station within the second preset time interval.
[0084] The ratio of the second number of passengers to the first number of passengers is calculated, and the ratio is the reachability probability of the passengers from the first station to the second station within the second preset time interval.
[0085] In an exemplary embodiment, the calculation formula of the reachability probability is as follows:
[0086] ;
[0087] in, represents the reachability probability of a passenger from station A to station B within the i-th second preset time interval, that is, the possibility of a passenger from station A to station B; represents the number of passengers entering the station from station A during the i-th second preset time interval; Indicates the number of passengers obtained from the ride record. The number of passengers exiting from station B.
[0088] The process of obtaining the average reachable time is as follows: Figure 3 As shown, including:
[0089] Step 2-4: Obtain the time taken by each passenger corresponding to the second number of passengers to obtain the first reachable time.
[0090] Each passenger corresponding to the second number of passengers enters the station from the first station and exits the station from the second station. Therefore, the time taken by each passenger corresponding to the second number of passengers from entering the station from the first station to exiting the station from the second station, that is, the travel time, is defined as the first reachable time.
[0091] Step 2-5: Based on the second number of passengers and the first reachable time of each passenger, obtain the average reachable time for passengers to reach the second station from the first station within the second preset time interval.
[0092] In an exemplary embodiment, the calculation formula of the average reachable time is as follows:
[0093] ;
[0094] in, represents the average achievable time for passengers to reach station B from station A during the i-th second preset time interval; express The first accessible time of the mth passenger in . It should be understood that if is 0, that is If there are no passengers exiting from station B, then The average reachable time is set to 0.
[0095] Therefore, through the above process, the reachability probability and average reachability time of the first station to each other station in each second preset time interval are obtained.
[0096] In order to facilitate subsequent data processing, in an exemplary embodiment, Figure 4 As shown, the multi-space rail transit passenger flow prediction method also includes the following steps:
[0097] Step 2-6: Based on the reachability probabilities from the site to other sites, construct a reachability probability matrix corresponding to the second preset time interval of the site.
[0098] Usually, rail transit has more than one route, for example, many cities have multiple subway lines, and each line has multiple stations.
[0099] Therefore, a reachable matrix is constructed based on multiple routes and multiple stations. Each column of the reachable matrix represents each route, and each row of the matrix represents the number of stations on all routes. For example, the first row represents the first station on all routes. Figure 5 As shown, there are three routes in the figure, and the longest route has 6 stations, so the reachable matrix has 6 rows and 3 columns.
[0100] Based on the reachability probability of a site to other sites, and Figure 5 The reachable matrix structure shown in FIG. 1 constructs a reachable probability matrix corresponding to the second preset time interval of the site. Specifically, the reachable probability of the site to each other site is filled as follows: Figure 5 The corresponding positions in the reachable matrix shown are used to obtain the reachable probability matrix corresponding to the second preset time interval of the station. Taking the third station in line 2 (represented by a32) as an example, the reachable probabilities of the third station in line 2 and other stations in line 2, as well as the stations in the other two lines, are filled into the corresponding positions in the reachable matrix to obtain the reachable probability matrix corresponding to the third station in line 2 in the second preset time interval. It should be understood that for lines with less than 6 stations, such as line 2 has only four stations, then there is no reachable probability between the third station in line 2 and the fifth and sixth stations in line 2, then the reachable probability of the corresponding position in the reachable probability matrix is a missing value and is set to 0.
[0101] Step 2-7: Based on the average reachable time from the site to each other site, construct an average reachable time matrix corresponding to the second preset time interval of the site.
[0102] Similar to the above reachability probability matrix, according to the average reachable time from the site to other sites, and Figure 5 The reachable matrix structure shown in FIG. 1 constructs an average reachable time matrix corresponding to the second preset time interval of the site. Specifically, the average reachable time from the site to each other site is filled as follows: Figure 5 The corresponding position in the reachable matrix shown is used to obtain the average reachable time matrix corresponding to the second preset time interval of the station. Taking the third station in Line 2 as an example, the average reachable time of the third station in Line 2 and other stations in Line 2, as well as the average reachable time of each station in the other two lines, is filled into the reachable matrix to obtain the average reachable time matrix corresponding to the third station in Line 2 in the second preset time interval. It should be understood that for lines with less than 6 stations, such as Line 2 has only four stations, then there is no average reachable time between the third station in Line 2 and the fifth and sixth stations in Line 2, then the average reachable time of the corresponding position in the average reachable time matrix is a missing value and is set to 0.
[0103] The reachability probability matrix of the i-th second preset time interval of station A is expressed as , the average reachable time matrix of the i-th second preset time interval of site A is expressed as .
[0104] The reachability probability matrix and average reachable time matrix of each other second preset time interval of site A are obtained according to the above process, and the reachability probability matrix and average reachable time matrix of each second preset time interval of other sites are obtained according to the above process.
[0105] Step 3: According to the difference in the accessibility probability of the station on any two days and the difference in the average accessibility time, the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of the station are obtained.
[0106] Usually, the setting of rail transit stations needs to take into account the actual function of the station. For example, there may be high-density residential areas, industrial areas, commercial areas, etc. near the station. Therefore, passengers generally ride with a purpose, and it can be assumed that passengers at different stations are more likely to have the same purpose when exiting the same station.
[0107] At the same time, each station has a certain proportion of normal passenger flow. These passengers have the same purpose and are less affected by special factors, such as weather and activities. Therefore, the normal passenger flow shows certain periodic characteristics. On the contrary, the abnormal passenger flow has its own characteristics and the periodic performance is not obvious.
[0108] Therefore, the reachability matrix of a station reflects the distribution of passengers at the station, and the degree of normalized passenger flow at the station can be determined based on the change in the reachability matrix. However, the periodic characteristics of the normalized passenger flow at a station may not be stable, and it is generally believed to be a daily or weekly cycle. For example, the passenger flow at a station is affected by the traffic restriction policy, and the passenger flow changes with the week, and it is more likely to be a weekly cycle.
[0109] For a departure station, the more consistent the passenger's reachability matrix is, the more the normalized passenger flow accounts for; and for two departure stations, the more consistent the passenger's reachability matrix is, the more similar the passenger distribution of the two stations is, and the more consistent the spatial characteristics of the stations are. The distribution of similar stations on consecutive days can also determine the cycle of normalized passenger flow. If the daily cycle characteristics of the spatially similar station distribution of a station are more obvious in a continuous period of days, the daily cycle characteristics of the normalized passenger flow of the station are more obvious; and the daily cycle characteristics of the station sequence with similar station space are manifested in the continuous appearance of the same similar station, so the higher the number of consecutive appearances of the same station in a similar station sequence of consecutive days, the higher the possibility of a daily cycle.
[0110] Therefore, on the one hand, the normalized passenger flow index can be determined by the changes in the station’s own reachability probability matrix and average reachability time matrix, as well as the differences between them. On the other hand, it is necessary to determine the impact of the spatial characteristics of different stations on the normalized passenger flow index.
[0111] Therefore, we first obtain the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of each station based on the difference in the accessibility probability of the station on any two days and the difference in the average accessibility time. Then, we obtain the normalized passenger flow index of each station based on the importance of the daily cycle.
[0112] In an exemplary embodiment, Figure 6 As shown, a specific implementation process of step 3 is given as follows:
[0113] Step 3-1: Obtain the daily reachability probability matrix sequence and average reachability time matrix sequence of the first station.
[0114] Since the second preset time interval is a unit time period, the time length of the second preset time interval is less than the time length of a day. For example, the second preset time interval is set to 1 hour in the above text. Moreover, the time length of a day (i.e., one day) can be divided into multiple second preset time intervals, that is, each day is divided into multiple second preset time intervals, and each second preset time interval in each day is sorted in chronological order. It should be understood that since the rail transit has a certain operating time in a day, then, specifically, the operating time of the rail transit in a day is divided into multiple second preset time intervals. For example, if the operating time of the rail transit in a day is 16 hours, then the operating time of the rail transit in a day is divided into 16 second preset time intervals.
[0115] Since the first site has a corresponding reachable probability matrix in each second preset time interval, the reachable probability matrix sequence and the average reachable time matrix sequence of the first site are obtained every day. Among them, the reachable probability matrix sequence is composed of the reachable probability matrices of multiple second preset time intervals every day arranged in time sequence; the average reachable time matrix sequence is composed of the average reachable time matrices of multiple second preset time intervals every day arranged in time sequence. For example, the reachable probability matrix sequence is composed of the reachable probability matrices of 16 second preset time intervals every day arranged in time sequence, and the average reachable time matrix sequence is composed of the average reachable time matrices of 16 second preset time intervals every day arranged in time sequence. Thus, the reachable probability matrix sequence and the average reachable time matrix sequence of each site every day are obtained.
[0116] Step 3-2: Obtain the difference between the matrices at corresponding positions in the reachability matrix sequence of the first site on the first day and the second day to obtain the reachability probability difference, and obtain the difference between the matrices at corresponding positions in the average reachability time matrix sequence of the first site on the first day and the second day to obtain the average reachability time difference.
[0117] For the sake of convenience, the first day and the second day are assumed to be any two different dates. Then, the first day and the second day may be two adjacent dates or non-adjacent dates.
[0118] The difference between the matrices at the corresponding positions in the reachability matrix sequence of the first station on the first day and the second day is obtained to obtain the reachability probability difference, and the difference between the matrices at the corresponding positions in the average reachability time matrix sequence of the first station on the first day and the second day is obtained to obtain the average reachability time difference. The difference is specifically the absolute value of the difference.
[0119] Step 3-3: According to the difference in reachability probability and the difference in average reachability time, obtain the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index of the first station.
[0120] In an exemplary embodiment, Figure 7 As shown in the figure, the process of obtaining the daily cycle normalized passenger flow index includes:
[0121] Step 3-3-1: Obtain the difference in reachability probability and average reachability time of any two adjacent days of the first station in a first preset number of consecutive days;
[0122] Step 3-3-2: Combine the difference in reachability probability and the difference in average reachability time between any two consecutive days to obtain the normalized passenger flow difference between any two consecutive days;
[0123] Step 3-3-3: Combine the normalized passenger flow differences between any two adjacent days in the first preset number of consecutive days to obtain the daily cycle normalized passenger flow index of the first station.
[0124] In an exemplary embodiment, the calculation formula of the normalized passenger flow difference is as follows:
[0125] ;
[0126] in, represents the difference in normalized passenger flow between the mth day and the nth day at the Kth station, where the mth day and the nth day are two different dates; b represents the number of matrices in the matrix sequence, that is, the number of second preset time intervals per day; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the Kth station on the mth day; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the Kth station on the nth day; represents the jth average reachable time matrix in the mth day average reachable time matrix sequence of the Kth station; represents the jth average reachable time matrix in the sequence of average reachable time matrices of the Kth station on the nth day; It represents the difference in reachability probability between the j-th reachability probability matrix of the K-th station on the m-th day and the n-th day. Specifically, the absolute value of the difference between the two reachability probability matrices is obtained first, and then the sum is calculated, which is the reachability probability difference; It represents the average reachable time difference between the j-th average reachable time matrix of the K-th site on the m-th day and the n-th day. Specifically, the absolute value of the difference between the two average reachable time matrices is first obtained, and then the sum is calculated, which is the average reachable time difference.
[0127] Among them, if the mth day and the nth day are two adjacent dates, then the normalized passenger flow difference obtained is the normalized passenger flow difference of two adjacent dates; if the mth day and the nth day are not two adjacent dates, then the normalized passenger flow difference obtained is the normalized passenger flow difference of two non-adjacent dates.
[0128] A first preset number is set, which is less than the number of days in the preset historical time period. The first preset number is a positive integer greater than 3. The specific value is set according to actual needs. For example, if it is 10, the first preset number of consecutive days is 10 consecutive days.
[0129] For the selected passenger flow data, the more consistent the reachability matrix sequence and the average reachability time matrix sequence between consecutive days are, the more obvious the daily cycle characteristics of the normalized passenger flow of the station are. In an exemplary embodiment, the calculation formula of the daily cycle normalized passenger flow index is as follows:
[0130] ;
[0131] in, represents the daily cycle normalized passenger flow index of the K-th station; represents a first preset number of consecutive days, and i represents the i-th day in the first preset number of consecutive days; represents the difference in normalized passenger flow between the i-th day and the i+1-th day at the K-th station, Express Negative correlation normalization.
[0132] The smaller the difference in normalized passenger flow, the more consistent the performance of the reachable matrix sequence and the average reachable time matrix sequence, and the larger the daily cycle normalized passenger flow index.
[0133] It should be understood that the normalization and negative correlation normalization methods in this embodiment can be specifically set according to actual conditions. For example, the normalization can adopt the maximum and minimum value normalization method, or the following common methods: , represents the processing object, and exp represents the exponential function with the natural constant e as the base. Negative correlation normalization can be done in the following common ways: .
[0134] In an exemplary embodiment, Figure 8 As shown in the figure, the process of obtaining the weekly normalized passenger flow index includes:
[0135] Step 3-3-4: Obtain the difference in reachability probability and average reachability time of the first station on the same day of any two adjacent weeks in a second preset number of consecutive weeks;
[0136] Step 3-3-5: Combine the difference in accessibility probability and average accessibility time on the same day in any two consecutive weeks to obtain the normalized passenger flow difference on the same day;
[0137] Step 3-3-6: Merge the normalized passenger flow differences of all the same days in a second preset number of consecutive weeks to obtain the weekly normalized passenger flow index of the first station.
[0138] A second preset number is preset, and the second preset number is a positive integer greater than 3. The specific value of the second preset number is set according to actual needs. The purpose of the second preset number is to determine a second preset number of consecutive weeks, such as 8 consecutive weeks, that is, 8 consecutive weeks.
[0139] In an exemplary embodiment, the calculation formula of the weekly normalized passenger flow index is as follows:
[0140] ;
[0141] in, represents the weekly normalized passenger flow index of the Kth station; n represents week n (i.e. week n); 7 represents that there are 7 days in a week, from Monday to Sunday; Indicates the second preset quantity, i.e., the total number of days in the same weekday; Indicates the hth week n; represents the h+1th week n; represents the normalized passenger flow difference between the hth week n and the h+1th week n of the Kth station, Express Negative correlation normalization.
[0142] The smaller the difference in normalized passenger flow, the more consistent the performance of the reachable matrix sequence and the average reachable time matrix sequence, and the larger the weekly normalized passenger flow index.
[0143] Step 4: Obtain the daily spatially similar sites of the site within the first preset time interval, and obtain the daily cycle importance of the site according to the maximum number of the same spatially similar sites.
[0144] For any two departure stations, if the passenger's reachability probability matrix and average reachability time matrix are more consistent, it means that the passenger distribution of the two stations is more similar, and the spatial characteristics of the stations are more consistent. Therefore, based on the daily reachability probability matrix sequence and the average reachability time matrix sequence, the daily spatially similar stations can be obtained.
[0145] In an exemplary embodiment, Fig. 9 As shown, a specific process of obtaining spatially similar sites is given as follows, including:
[0146] Step 4-1: Obtain the daily reachability probability difference and average reachability time difference between the first site and other sites within a first preset time interval.
[0147] A first preset time interval is preset, and the time length of the first preset time interval is set according to actual needs. In this embodiment, the first preset time interval is a certain number of days, such as 10 days, which is used to obtain the daily reachability probability difference and the average reachability time difference within the first preset time interval.
[0148] The second site is taken as an example for other sites. The daily reachability probability difference and average reachability time difference between the first site and the second site within the first preset time interval are obtained.
[0149] Step 4-2: The difference in reachability probability and the difference in average reachability time are integrated to obtain the daily normalized passenger flow difference between the first station and other stations.
[0150] It should be understood that the normalized passenger flow difference here is obtained by using the calculation method of the normalized passenger flow difference in the above text, except that the reachability probability matrix and average reachability time matrix of the same station on two days in the calculation method of the normalized passenger flow difference in the above text are replaced by the reachability probability matrix and average reachability time matrix of the two stations on the same day. In an exemplary embodiment, the calculation formula of the normalized passenger flow difference here is given as follows:
[0151] ;
[0152] in, represents the difference in normalized passenger flow between the Zth station and the Wth station on day o; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the zth station on the oth day; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the Wth station on the oth day; represents the jth average reachable time matrix in the sequence of average reachable time matrices of the zth station on the oth day; represents the jth average reachable time matrix in the sequence of average reachable time matrices of the Wth station on the oth day; The reachability probability difference between the j-th reachability probability matrix of the Z-th station and the W-th station on the o-th day is represented by: firstly calculating the absolute value of the difference between each position in the two reachability probability matrices, and then summing them up, and the sum obtained is the reachability probability difference; It represents the average reachable time difference of the j-th average reachable time matrix of the Z-th station and the W-th station on the o-th day. Specifically, the absolute value of the difference between the two average reachable time matrices for each position is calculated first, and then the sum is obtained, and the sum is the average reachable time difference.
[0153] By adopting the above method, the daily normalized passenger flow difference between the first station and other stations in the first preset time interval can be obtained.
[0154] Step 4-3: Obtain the station corresponding to the smallest daily normalized passenger flow difference between the first station and other stations as the spatially similar station of the first station in the first preset time interval.
[0155] It should be understood that the smaller the difference in normalized passenger flow between two stations, the higher the similarity in spatial passenger distribution between the two stations. Therefore, for any day in the first preset time interval, the smallest normalized passenger flow difference between the first station and other stations on that day is obtained, and the station corresponding to the smallest normalized passenger flow difference is determined, that is, the station corresponding to the largest spatial passenger distribution similarity is determined, and the station is the spatially similar station of the first station on that day. In this way, the spatially similar stations of the first station on each day in the first preset time interval are obtained.
[0156] In an exemplary embodiment, a spatially similar site sequence is formed based on the spatially similar sites of the first site on each day within the first preset time interval. The number of elements in the spatially similar site sequence is the number of days included in the first preset time interval. As an example, the first preset time interval is 4 days, and the first site is site A. The spatially similar site sequence of site A is: [C, E, E, F].
[0157] Since the probability of a site with similar spatial characteristics appearing is generally higher, the more obvious the daily cycle characteristics are, therefore, the daily cycle importance of the site is obtained according to the maximum number of similar sites in the same space. Fig.10 As shown, the process of obtaining the importance of the daily cycle is given as follows:
[0158] Step 4-4: Obtain a maximum number of spatially similar sites based on the daily spatially similar sites of the first site within the first preset time interval.
[0159] Step 4-5: The ratio of the maximum number to the number of days in the first preset time interval is used as the daily cycle importance of the first site.
[0160] From the sequence of spatially similar sites in the first preset time interval of the first site, determine the site with the most occurrences, that is, the maximum number of spatially similar sites. For example, in the sequence of spatially similar sites of site A: [C, E, E, F], the site with the most occurrences is site E, and the number is 2, that is, the maximum number is 2. The number of days in the first preset time interval is 4, so the ratio of 2 to 4 is used as the daily cycle importance of the first site.
[0161] Step 5: Based on the importance of the daily cycle, perform weighted summation of the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index to obtain the normalized passenger flow index of the site.
[0162] According to the importance of the daily cycle, the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index are fused in a weighted summation manner to obtain the normalized passenger flow index of the station. Among them, the higher the importance of the daily cycle, the higher the possibility of the daily cycle, the greater the proportion of the daily cycle normalized passenger flow index, and correspondingly, the smaller the proportion of the weekly cycle normalized passenger flow index. In an exemplary embodiment, the calculation formula of the normalized passenger flow index is as follows:
[0163] ;
[0164] in, represents the normalized passenger flow index of the Kth station; Indicates the importance of the daily cycle of the Kth station.
[0165] Step 6: Based on the normalized passenger flow index, obtain the normalized passenger flow and abnormal passenger flow of the station.
[0166] The normalized passenger flow index is the coefficient of the normalized passenger flow of the station, which is used to obtain the normalized passenger flow of the station. Then, the product of the actual passenger flow of the first station in the preset period and the normalized passenger flow index is taken as the normalized passenger flow of the first station in the preset period. The actual passenger flow is the number of passengers entering the first station in the preset period.
[0167] The difference between the actual passenger flow of the first station in the preset time period and the obtained normalized passenger flow of the first station in the preset time period is used as the abnormal passenger flow of the first station in the preset time period.
[0168] The preset time period is set according to actual needs, such as the second preset time interval (ie, one hour) mentioned above.
[0169] By adopting the above method, the normal passenger flow and abnormal passenger flow of the site can be obtained, which can improve the accuracy of obtaining the normal passenger flow and abnormal passenger flow.
[0170] In the future, we can use the daily normalized passenger flow and abnormal passenger flow of the station in the historical time period to predict the rail transit passenger flow.
[0171] In an exemplary embodiment, the multi-space rail transit passenger flow prediction method provided in this embodiment uses a multi-dimensional model fusion prediction method, combines the above-mentioned normalized passenger flow and abnormal passenger flow for learning, and performs prediction, thereby improving the interpretability of the traditional learning model results. Fig.11 As shown, the multi-space rail transit passenger flow prediction method also includes the following prediction process:
[0172] Step 7: Obtain the normalized passenger flow matrix and the abnormal passenger flow matrix for the preset historical time period of the site.
[0173] The normalized passenger flow of each day in the preset historical time period of the first station is obtained, and the normalized passenger flow of each day is composed of the normalized passenger flows of multiple second preset time intervals in time sequence. Then, the normalized passenger flow of each day in the preset historical time period of the first station is composed of the normalized passenger flow matrix in time sequence. Similarly, the abnormal passenger flow of each day in the preset historical time period of the first station is composed of the abnormal passenger flow matrix in time sequence.
[0174] In an exemplary embodiment, the time period for normalized passenger flow prediction is hourly prediction, the data format is serial data of the same day, and the operating time periods are numbered in order, for example: in the operating period of 4 hours, the normalized passenger flow of the first day is s1=[400,420,390,410], where each number represents the normalized passenger flow of the station per hour; s2=[1000,1050,1150,1200] of the second day, and so on; and the data within the preset historical time period are combined to form a matrix. Taking two days as an example, the matrix is represented as , where the columns of the sequence matrix represent each hour and the rows represent the normalized passenger flow data of a certain day. Thus, the 90-day historical normalized passenger flow matrix is obtained and recorded represents the one-day normalized passenger flow data farthest from the current one, s90 represents the one-day normalized passenger flow data closest to the current one, and the passenger flow sequence from s1 to s90 is recorded as . Similarly, the abnormal passenger flow matrix is obtained.
[0175] Step 8: Slide the normalized passenger flow matrix according to the preset window size to obtain each window. The normalized passenger flow in each window is used as the training set of the normalized passenger flow prediction model. The output of the normalized passenger flow prediction model is the normalized passenger flow after each window and adjacent to each window. The normalized passenger flow prediction model is trained.
[0176] This embodiment uses the Prophet algorithm to predict passenger flow at a station, and the basic main structure of the model is:
[0177] ;
[0178] In the formula, represents the predicted value, represents the normalized passenger flow prediction model; It represents the abnormal passenger flow prediction model, which represents the passenger flow affected by special events. During the operation of rail transit, it mainly fits the impact of activities, holidays, bad weather and other factors on rail passenger flow.
[0179] Among them, the prediction model needs to train a normalized passenger flow prediction model based on historical data and non-normal passenger flow prediction model Both model architectures use CNN+LSTM architecture, and the loss function uses cross entropy loss.
[0180] For the normalized passenger flow prediction model The training process is as follows: preset a window size, which is set according to actual needs, such as 60 days. According to the preset window size, the normalized passenger flow matrix is slid to obtain each window. The normalized passenger flow in each window is used as the training set of the normalized passenger flow prediction model. The output of the normalized passenger flow prediction model is the normalized passenger flow after each window and adjacent to each window. For example, the subsequent data is gradually trained with the previous 60 days of data. The training process of single-day output is: select the data from s1 to s60 of the continuous 90 days of data as the training set, and its target output is s61; select the data from s2 to s61 as the training set, and its target output is s62, and so on. The normalized passenger flow prediction model is trained and finally completed. Then, the target output for multiple days is performed in a similar way. Among them, it should be noted that the final s90 data is generally used as the validation set data.
[0181] When making predictions, the trained normalized passenger flow prediction model can be directly used to obtain normalized passenger flow data.
[0182] Step 9: Obtain the daily influencing factors in the preset historical time period, and use the daily influencing factors as the input of the abnormal passenger flow prediction model. The output of the abnormal passenger flow prediction model is the daily abnormal passenger flow, and the abnormal passenger flow prediction model is trained.
[0183] Since abnormal passenger flow is affected by influencing factors, the influencing factors of each day in the preset historical time period are obtained, such as city activity information, holiday information, and bad weather information. The influencing factors are encoded using a one-hot vector and then used as the input of the abnormal passenger flow prediction model. The output of the abnormal passenger flow prediction model is the abnormal passenger flow of the day. Therefore, the training set of the abnormal passenger flow prediction model is the daily influencing factors, and the output is the abnormal passenger flow of the day. After daily training, the training of the abnormal passenger flow prediction model is completed.
[0184] When making predictions, the influencing factors of the current or future day are obtained. This information can be obtained through big data technology and input into the trained abnormal passenger flow prediction model to output the abnormal passenger flow for that day.
[0185] The predicted normalized passenger flow and abnormal passenger flow are superimposed to obtain the predicted passenger flow data, thereby enhancing the interpretability of the prediction model.
[0186] The above prediction process adopts a model fusion approach for passenger flow prediction, and learns normal passenger flow and abnormal passenger flow with strong regularity respectively, which enhances the interpretability of passenger flow prediction by traditional models and improves the accuracy of prediction.
[0187] This embodiment also provides a multi-space rail transit passenger flow prediction system based on deep learning, including: a memory and a processor; the memory is connected to the processor, and the memory is used to store program instructions; the processor is used to implement the steps in the above-mentioned multi-space rail transit passenger flow prediction method embodiment based on deep learning when the program instructions are executed.
[0188] In an exemplary embodiment, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned deep learning-based multi-space rail transit passenger flow prediction method embodiment.
[0189] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0190] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A multi-space rail transit passenger flow prediction method based on deep learning, characterized in that: include: Obtain the passenger flow data of the site within a preset historical time period; According to the passenger flow data, obtain the reachability probability and average reachability time of the station to other stations; According to the difference in the accessibility probability of the station on any two days and the difference in the average accessibility time, the daily cycle normalized passenger flow index and weekly cycle normalized passenger flow index of the station are obtained; Obtaining daily spatially similar sites of the site within a first preset time interval, and obtaining the daily cycle importance of the site according to the maximum number of similar sites in the same space; Based on the importance of the daily cycle, a weighted sum of the daily cycle normalized passenger flow index and the weekly cycle normalized passenger flow index is performed to obtain the normalized passenger flow index of the station; Based on the normalized passenger flow index, the normalized passenger flow and the abnormal passenger flow of the station are obtained; Obtaining a normalized passenger flow matrix and an abnormal passenger flow matrix for the preset historical time period of the site; Sliding the normalized passenger flow matrix according to a preset window size to obtain each window, the normalized passenger flow in each window is used as a training set of the normalized passenger flow prediction model, the output of the normalized passenger flow prediction model is the normalized passenger flow after each window and adjacent to each window, and the normalized passenger flow prediction model is trained; Obtaining the daily influencing factors in the preset historical time period, using the daily influencing factors as the input of the abnormal passenger flow prediction model, the output of the abnormal passenger flow prediction model is the daily abnormal passenger flow, and training the abnormal passenger flow prediction model; The process of obtaining the reachability probability includes: Acquire the number of passengers entering the station from the first station within the second preset time interval to obtain a first number of passengers; Obtain the number of passengers exiting from the second station in the first number of passengers to obtain the second number of passengers; the first station and the second station are any two different stations; Calculating the ratio of the second number of passengers to the first number of passengers to obtain a probability of reaching the second station from the first station within a second preset time interval; Obtaining a station corresponding to the smallest daily normalized passenger flow difference between the first station and other stations as the daily spatially similar station of the first station in the first preset time interval; The calculation formula for normalized passenger flow difference is as follows: ; in, represents the difference in normalized passenger flow between the mth day and the nth day at the Kth station, where the mth day and the nth day are two different dates; b represents the number of matrices in the matrix sequence, that is, the number of second preset time intervals per day; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the Kth station on the mth day; represents the jth reachability probability matrix in the sequence of reachability probability matrices of the Kth station on the nth day; represents the jth average reachable time matrix in the mth day average reachable time matrix sequence of the Kth station; represents the jth average reachable time matrix in the sequence of average reachable time matrices of the Kth station on the nth day; It represents the difference in reachability probability between the j-th reachability probability matrix of the K-th station on the m-th day and the n-th day. Specifically, the absolute value of the difference between the two reachability probability matrices is obtained first, and then the sum is calculated, which is the reachability probability difference; The average reachable time difference between the average reachable time matrix of the mth day and the jth day of the nth day of the Kth station is represented by: first obtaining the absolute value of the difference between each position in the two average reachable time matrices, and then calculating the sum value, which is the average reachable time difference; The calculation formula for the daily cycle normalized passenger flow index is as follows: ; in, represents the daily cycle normalized passenger flow index of the K-th station; represents a first preset number of consecutive days, and i represents the i-th day in the first preset number of consecutive days; represents the difference in normalized passenger flow between the i-th day and the i+1-th day at the K-th station, Express Negative correlation normalization; The daily cycle importance of a site is obtained according to the maximum number of similar sites in the same space, including: According to the daily spatially similar sites of the first site within the first preset time interval, a maximum number of spatially similar sites is obtained; the first site is any site; The ratio of the maximum number to the number of days in the first preset time interval is used as the daily cycle importance degree of the first site.
2. The multi-space rail transit passenger flow prediction method based on deep learning as claimed in claim 1 is characterized in that: The process of obtaining the average reachable time includes: Obtain the time taken by each passenger corresponding to the second number of passengers to obtain a first reachable time; Based on the second number of passengers and the first reachable time of each passenger, the average reachable time for passengers to reach the second station from the first station within the second preset time interval is obtained.
3. A multi-space rail transit passenger flow prediction method based on deep learning as claimed in claim 2, characterized in that: The multi-space rail transit passenger flow prediction method further includes: Based on the reachability probability of the site to each other site, construct a reachability probability matrix corresponding to the second preset time interval of the site; Based on the average reachable time from the site to other sites, an average reachable time matrix corresponding to a second preset time interval of the site is constructed; the time length of the second preset time interval is less than the time length of a day.
4. The multi-space rail transit passenger flow prediction method based on deep learning as claimed in claim 1 is characterized in that: The process of obtaining the weekly normalized passenger flow index includes: Obtain the difference in reachability probabilities and average reachability time of the first station on the same day of any two adjacent weeks in a second preset number of consecutive weeks; The normalized passenger flow difference on the same day is obtained by integrating the difference in the probability of accessibility and the difference in the average time of accessibility on the same day of any two adjacent weeks; The normalized passenger flow differences of all the same days in the second preset number of consecutive weeks are integrated to obtain the weekly normalized passenger flow index of the first station.
5. The multi-space rail transit passenger flow prediction method based on deep learning as claimed in claim 1 is characterized in that: The obtaining of the normalized passenger flow and the abnormal passenger flow of the station based on the normalized passenger flow index includes: The product of the actual passenger flow of the station during the preset period of time and the normalized passenger flow index is used as the normalized passenger flow of the station during the preset period of time; the difference between the actual passenger flow and the normalized passenger flow is used as the abnormal passenger flow of the station during the preset period of time.
Citation Information
Patent Citations
Urban rail transit section passenger flow speculation method based on train operation timetable
CN106485359A
Method for dynamic passenger flow OD estimation of urban mass transit network
CN106875314A