A method and device for predicting passenger flow in urban rail transit section

By training a sectional passenger flow prediction model based on historical passenger flow data, the problem of inaccurate passenger flow prediction in urban rail transit is solved, and more efficient operation planning and scheduling is achieved.

CN114399099BActive Publication Date: 2025-04-18CITIC YUNWANG CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111653779.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-04-18
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The existing technology cannot accurately predict cross-section passenger flow in urban rail transit, resulting in insufficient scientific operation planning and scheduling, affecting operational efficiency and passenger flow management.

Method used

By obtaining the historical cross-sectional passenger flow information and historical inbound and outbound passenger flow information of the target section, the cross-sectional passenger flow prediction model, including the improved Prophet periodic prediction model and the LSTM-based short-term prediction model, can realize accurate prediction of cross-sectional passenger flow.

Benefits of technology

It improves the accuracy of passenger flow prediction at the cross-section of urban rail transit, can more accurately predict short-term and long-term passenger flow changes, and supports scientific operational planning and scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399099B_ABST
    Figure CN114399099B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for predicting the cross-section passenger flow of urban rail transit, wherein the prediction method comprises: obtaining historical cross-section passenger flow information and historical in-and-out passenger flow information of a target section; training a cross-section passenger flow prediction model until convergence according to the historical cross-section passenger flow information and the historical in-and-out passenger flow information, and obtaining a target cross-section passenger flow prediction model; inputting a prediction time period, a target section number, and historical in-and-out passenger flow information into the target cross-section passenger flow prediction model, and obtaining the predicted cross-section passenger flow of the target section. In the present invention, by inputting the time period to be predicted, the number of the target section, and the historical in-and-out passenger flow information into the trained target cross-section passenger flow prediction model, the predicted cross-section passenger flow of the target section in the prediction time period is obtained, which solves the defect that the cross-section passenger flow cannot be accurately predicted in the prior art, and effectively improves the accuracy of the prediction of the cross-section passenger flow of urban rail transit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cross-sectional passenger flow prediction in urban rail transit operation, and in particular to a method and device for predicting cross-sectional passenger flow in urban rail transit. Background Art

[0002] With the vigorous development of rail transit, the early warning and guidance of passenger flow peaks in stations, as well as the scientific and rational dispatching of trains and vehicles are becoming increasingly important. Section flow prediction is one of the foundations of urban rail transit planning. Using historical travel data to accurately predict the network, especially the passenger flow of each section, for a period of time in the future, provides a scientific basis for rail transit operators to reasonably arrange capacity, prepare dispatching plans, balance subway line operation loads, and analyze operating results. It can also provide a reference for urban rail transit network planning, project scheduling, and station scale design. This can play a very important role in network planning and actual operation of the organization and arrangement of driving, and is of great significance in promoting the informatization and intelligent construction of urban rail transit.

[0003] The section passenger flow of urban rail transit is a micro-indicator of the line passenger flow, which refers to the number of passengers passing through a section in any interval on the line within a certain statistical time period. At present, the most commonly used method is the trend prediction method based on time series. The basic idea of ​​the passenger flow prediction method based on time series is to statistically analyze the passenger flow in the past period of time and its changing rules, so as to predict the future passenger flow. In terms of prediction methods, it can be divided into two categories: single section prediction and multi-section prediction. Single section passenger flow prediction refers to predicting only one section in the line network as the research object. Currently, the more commonly used methods are moving average prediction method, exponential smoothing prediction method, autoregressive analysis prediction method, integrated moving average autoregressive model (ARIMA), etc. When predicting multi-section passenger flow, the correlation between sections can be used to predict two or more related sections in the line network as research objects. The most commonly used method is Kalman filtering method.

[0004] The above prediction methods only need the time series data itself, without the need for other assumptions based on business knowledge, and can better capture the trend changes of short-term cross-sectional passenger flow. However, there are two obvious defects: first, the effective execution of this type of method is based on stable time series data, and it cannot well consider the periodic characteristics of subway passenger flow; second, in the reasoning process, the statistics of cross-sectional passenger flow have a certain lag and cannot be obtained in real time, resulting in this type of method not being practical for predicting future short-term cross-sectional passenger flow;

[0005] Therefore, how to solve the problem that the existing technology cannot accurately predict cross-sectional passenger flow is an important issue that needs to be urgently solved in the field of urban rail transit cross-sectional passenger flow prediction technology. Summary of the invention

[0006] The present invention provides a method and device for predicting the cross-sectional passenger flow of urban rail transit, which are used to solve the defect that the cross-sectional passenger flow cannot be accurately predicted in the prior art, and improve the accuracy of the prediction of the cross-sectional passenger flow of urban rail transit.

[0007] On the one hand, the present invention provides a method for predicting the section passenger flow of urban rail transit, comprising: obtaining historical section passenger flow information and historical in-and-out passenger flow information of a target section; training a section passenger flow prediction model until convergence according to the historical section passenger flow information and the historical in-and-out passenger flow information to obtain a target section passenger flow prediction model; inputting a prediction period, a target section number and the historical in-and-out passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section. .

[0008] Furthermore, the acquisition of historical section passenger flow information and historical in-and-out passenger flow information of the target section includes: constructing a directed graph based on the urban rail transit operating line network; assigning corresponding weight values ​​to all directed edges of the directed graph according to the time required for train operation between adjacent stations or the time required for passengers to transfer at transfer stations; determining the actual transfer path according to the historical travel records of passengers entering and exiting the station and the corresponding weight values ​​of the directed edges, and acquiring the estimated time for the passengers to pass through each station in the actual transfer path; and acquiring the historical section passenger flow information according to the estimated time for the passengers to arrive at each station.

[0009] Further, the determining of the actual transfer path includes: obtaining multiple candidate transfer paths according to the directed graph; calculating the estimated time of each candidate transfer path according to the weight value of the directed edge; and determining the actual transfer path by comparing the estimated time of each candidate transfer path.

[0010] Furthermore, determining the actual transfer path of the passenger based on the passenger's historical entry and exit travel records and the corresponding weight values ​​of the directed edges includes: if there is abnormal data in the passenger's historical entry and exit travel records, filtering the abnormal data.

[0011] Furthermore, the target section passenger flow prediction model includes an improved Prophet section passenger flow periodic prediction model and a section passenger flow short-term prediction model; the section passenger flow short-term prediction model is constructed based on a long short-term memory neural network, and has a multi-branch structure and an encoding-decoding two-stage structure; the expression of the improved Prophet section passenger flow periodic prediction model is as follows:

[0012] y(t)=g(t)+s0(t)+δ(t)s1(t)+(1-δ(t))s2(t)+h(t)+ε t

[0013] Among them, g(t) is the trend term, s0(t) is the weekly cycle term, s1(t) is the working day cycle term, s2(t) is the non-working day cycle term, h(t) is the holiday term, δ(t) is the sign function term, ε t is a random error term.

[0014] Furthermore, the prediction time period, target section number and historical in-and-out passenger flow information are input into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section, including: inputting the prediction time period and target section number into the improved Prophet section passenger flow periodic prediction model to obtain the periodic predicted section passenger flow of the target section; and / or, inputting the historical in-and-out passenger flow information into the section passenger flow short-term prediction model to obtain the short-term predicted section passenger flow of the target section.

[0015] Furthermore, the historical inbound and outbound passenger flow information is input into the section passenger flow short-term prediction model to obtain the short-term predicted section passenger flow of the target section, including: inputting the historical inbound passenger flow and the historical outbound passenger flow into two branches of the section passenger flow short-term prediction model respectively to extract features; obtaining the extracted features of each branch and merging them to obtain the target features; inputting the target features into the fully connected layer of the section passenger flow short-term prediction model to obtain the short-term predicted section passenger flow of the target section.

[0016] In the second aspect, the present invention also provides a device for predicting cross-sectional passenger flow in urban rail transit, comprising: a target information acquisition module, used to obtain historical cross-sectional passenger flow information and historical in-and-out passenger flow information of a target section; a prediction model training module, used to train a cross-sectional passenger flow prediction model until convergence based on the historical cross-sectional passenger flow information and the historical in-and-out passenger flow information, to obtain a target cross-sectional passenger flow prediction model; a cross-sectional passenger flow prediction model, used to input a prediction time period, a target section number, and the historical in-and-out passenger flow information into the target cross-sectional passenger flow prediction model, to obtain the predicted cross-sectional passenger flow of the target section.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for predicting passenger flow in an urban rail transit section are implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for predicting passenger flow in an urban rail transit section.

[0019] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for predicting passenger flow in an urban rail transit section.

[0020] The method for predicting the cross-sectional passenger flow of urban rail transit provided by the present invention obtains the historical cross-sectional passenger flow information and the historical in-and-out passenger flow information of the target cross-sectional area, and trains the cross-sectional passenger flow prediction model until convergence according to the historical cross-sectional passenger flow information and the historical in-and-out passenger flow information, so as to obtain the target cross-sectional passenger flow prediction model. Furthermore, the time period to be predicted, the number of the target cross-sectional area and the historical in-and-out passenger flow information are input into the target cross-sectional passenger flow prediction model, so as to obtain the predicted cross-sectional passenger flow of the target cross-sectional area within the time period to be predicted. The defect that the cross-sectional passenger flow cannot be accurately predicted in the prior art is solved, and the accuracy of the prediction of the cross-sectional passenger flow of urban rail transit is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of the flow chart of the method for predicting the passenger flow of a section of urban rail transit provided by the present invention;

[0023] Figure 2 A prediction flow chart of the improved Prophet section passenger flow periodicity prediction model provided by the present invention;

[0024] Figure 3 A prediction flow chart of the short-term prediction model for cross-section passenger flow provided by the present invention;

[0025] Figure 4 A model structure diagram of the short-term prediction model for cross-section passenger flow provided by the present invention;

[0026] Figure 5 The encoding and decoding mode diagram of the branch of the cross-section passenger flow short-term prediction model provided by the present invention;

[0027] Figure 6 A comparison effect diagram of the long-term periodic section passenger flow prediction value and the actual value from the South Square to the North Square of Chongqing North Railway Station provided by the present invention;

[0028] Figure 7 The SMAPE distribution map of 364 sections of Chongqing rail transit provided by the present invention;

[0029] Figure 8A comparison effect diagram of the short-term cross-sectional passenger flow prediction value and the actual value from the South Square to the North Square of Chongqing North Railway Station provided by the present invention;

[0030] Fig. 9 A schematic diagram of the structure of a device for predicting passenger flow in urban rail transit sections provided by the present invention;

[0031] Fig.10 A schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] The existing trend prediction methods based on time series are essentially to analyze and count the historical change trends and spatiotemporal characteristics of the passenger flow at a station or section, so as to predict the passenger flow at the section in the future. However, in the actual prediction process, the statistics of the passenger flow at the section have a certain lag. For example, when a passenger enters the station from station A, it is uncertain which section the passenger will pass through before leaving the station. For the statistics of the passenger flow at the section at time t, accurate results can only be obtained when all passengers who entered the station before time t leave the station. On this basis, if the passenger flow at the section is predicted in the short term, the time span of the demand may be only 10-30 minutes. It is difficult to count the passenger flow at the section at the current moment, which greatly reduces the practicality and accuracy of this method for predicting the passenger flow at the section at the future moment.

[0034] In view of the above problems, the present invention provides a method for predicting the passenger flow of urban rail transit sections. Figure 1 The flowchart of the method for predicting the passenger flow of urban rail transit section provided by the present invention is shown. As shown in the figure, the prediction method includes:

[0035] S101, obtaining historical section passenger flow information and historical in-and-out passenger flow information of a target section.

[0036] It should be noted that cross-section passenger flow refers to the passenger flow passing through two adjacent station sections in a unit time, which has two directions, up and down. In layman's terms, cross-section passenger flow is a micro-indicator of line passenger flow, which refers to the number of passengers passing through a certain section in any section on the line within a certain statistical time period. Among them, a section refers to the section between two adjacent stations in any section on the line; the target section refers to the passenger flow prediction object, which can be any section in the rail transit network.

[0037] It is easy to understand that the historical section passenger flow refers to the number of passengers passing through a section in any section of the line in a specific statistical time period in the past period of time. The historical section passenger flow information can be calculated using the entry and exit data of the Automatic Fare Collection (AFC) system as the original information.

[0038] The historical inbound and outbound passenger flow refers to the number of passengers entering and exiting the station in a certain period of time before the current time, that is, the number of passengers passing through the entrance and exit gates by swiping cards or tickets. The historical inbound and outbound passenger flow can be obtained through the historical inbound and outbound transaction data of the automatic ticket vending and checking system.

[0039] In this step, in addition to the number of passengers, the historical cross-section passenger flow information and historical in-and-out passenger flow information may also include specific passenger identification information, entry and exit time, and entry and exit type. Passenger identification information refers to the ticket information or QR code information presented by the passenger when entering and exiting the station.

[0040] S102, training a cross-section passenger flow prediction model until convergence based on historical cross-section passenger flow information and historical in- and out-station passenger flow information, and obtaining a target cross-section passenger flow prediction model;

[0041] It can be understood that, based on the historical section passenger flow and historical in-and-out passenger flow information of the target section obtained in the previous step, the section passenger flow prediction model is trained until convergence using the historical section passenger flow information and historical in-and-out passenger flow information to obtain a trained target section passenger flow prediction model, so as to ensure that when the information required for the prediction is subsequently input into the target section prediction model, the accurate predicted section passenger flow of the target section can be obtained.

[0042] In a specific embodiment, taking the Chongqing rail transit network as an example, a target section is selected, and the historical section passenger flow information and historical in-and-out passenger flow information of the target section of Chongqing Rail Transit from November to December 23, 2019 are used as training sets to train the section passenger flow prediction model until convergence. In addition, after obtaining the trained target section prediction model, the target section passenger flow prediction model is also tested to ensure the accuracy of the target section passenger flow prediction. Among them, when training the section passenger flow prediction model, a related loss function will also be used to evaluate the training effect of the section passenger flow prediction model. Here, the loss function used is not specifically limited.

[0043] S103, input the predicted time period, the target section number and the historical in-and-out passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section.

[0044] It can be understood that, based on the previous step of training the section passenger flow prediction model to convergence and obtaining the target section passenger flow prediction model, the future time period to be predicted, the target section number to be predicted and the historical inbound and outbound passenger flow information are further input into the trained target section passenger flow prediction model. The input data is analyzed by the model to calculate the predicted value of the section passenger flow of the target section in a certain future time period. The future time period here can be long-term, such as a week or a month; it can also be short-term, such as the next half an hour or several hours.

[0045] In a specific embodiment, still taking the Chongqing rail transit network as an example, a target section is selected, and the Chongqing rail transit from December 23 to December 29, that is, the subway operation time period of the last week of December 2019 (6 am to 0 am the next day) is used as the time period to be predicted, and the historical inbound and outbound passenger flow information of all stations in this time period is input into the trained section passenger flow prediction model to obtain the predicted section passenger flow of the target section.

[0046] In this embodiment, by obtaining the historical section passenger flow information and the historical in-and-out passenger flow information of the target section, and based on the historical section passenger flow information and the historical in-and-out passenger flow information, the section passenger flow prediction model is trained to convergence to obtain the target section passenger flow prediction model. Furthermore, the time period to be predicted, the number of the target section and the historical in-and-out passenger flow information are input into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section within the time period to be predicted, which solves the defect of the prior art that the section passenger flow cannot be accurately predicted, and effectively improves the accuracy of the section passenger flow prediction of urban rail transit.

[0047] On the basis of the above embodiments, further, historical section passenger flow information and historical in-and-out passenger flow information of the target section are obtained, including: constructing a directed graph based on the urban rail transit operating line network; assigning corresponding weight values ​​to all directed edges of the directed graph according to the time required for train operation between adjacent stations or the time required for passengers to transfer at transfer stations; determining the passenger's actual transfer path according to the passenger's historical in-and-out travel records and the corresponding weight values ​​of the directed edges, and obtaining the estimated time for the passenger to pass through each station in the actual transfer path; obtaining historical section passenger flow information according to the estimated time of the passenger's arrival at each station.

[0048] It is understandable that the historical section passenger flow information and the historical in-and-out passenger flow information of the target section are obtained. Specifically, the historical section passenger flow information of the target section is obtained by obtaining the station information on each line and the adjacency relationship between stations through the rail transit operation line network diagram, for example, the line number, whether the passenger's current station is the starting station, intermediate station or terminal station, the station name of the next station, and the number of stations to be taken to the passenger's destination station. According to the station information and the adjacency relationship between stations, a directed edge is determined for every two adjacent stations, and a corresponding directed graph is constructed, and the directed graph is used to represent the rail transit operation line network.

[0049] The directed graph information is stored in json format. Taking the following data as an example, the first directed edge represents the section of Line 1 from Jiaochangkou to Xiaoshizi, and the time required for a vehicle to pass through this section (the "travel_time" field) is about two minutes. The second directed edge represents the walking section from Daping Station on Line 1 to Line 2 (Daping Station is both Station 7 on Line 1 and Station 9 on Line 2), and the walking transfer and waiting time is about 3.8 minutes. The json storage format of the directed graph is as follows:

[0050] The first directed edge: {"link_id":1,

[0051] "in_node":103,

[0052] "out_node":102,

[0053] "in_station":"Jiaochangkou",

[0054] "out_station":"Xiao Shizi",

[0055] "travel_time":2.0,

[0056] "is_transfer":false,},

[0057] The second directed edge: {"link_id":380,

[0058] "in_node":107,

[0059] "out_node":209,

[0060] "in_station":"Daping",

[0061] "out_station":"Daping",

[0062] "travel_time":3.8,

[0063] "is_transfer":true,}

[0064] After establishing the directed graph, a corresponding weight value is assigned to each directed edge according to the time required for a train to run from one station to an adjacent station, or the transfer time required by passengers at a transfer station. Among them, the time required for trains to run between stations can be obtained through the last timetable of each line obtained from public channels or through online open map inquiries; the transfer time required by passengers at transfer stations can be obtained through online open map inquiries or actual transfer experience. The longer the time required for trains to run between stations or the transfer time at transfer stations, the higher the weight value of the corresponding directed edge will be. For the convenience of calculation, the weight value of each directed edge can be determined according to the inverse of the train running time or passenger transfer time corresponding to each directed edge.

[0065] In a specific embodiment, the actual transfer path of the passenger is determined based on the passenger's historical entry and exit travel records and the corresponding weight values ​​of the directed edges, including: if there is abnormal data in the passenger's historical entry and exit travel records, the abnormal data is filtered out.

[0066] Taking Chongqing as an example, the data table format of the original historical passenger flow information obtained from the Chongqing Rail Transit Automatic Ticketing System is as follows:

[0067] TICKET_ID TXN_DATE TXN_TIME DEV_CODE TRANS_CODE 12432412 20191201 061714 03184218 21 12451240 20191201 201724 03444002 22

[0068] Among them, TICKET_ID refers to the unique identification of the passenger, including the QR code information or ticket ID information presented by the passenger when entering or exiting the station; TXN_DATE refers to the time when the passenger enters or exits the station, specifically indicating the year, month, and day; TXN_TIME also refers to the time when the passenger enters or exits the station, but specifically indicating the hour, minute, and second; DEV_CODE refers to the automatic ticket vending system equipment ID. Taking "03184218" as an example, the first two digits "03" refer to the line number, that is, Line 3, the third and fourth digits "18" indicate the 18th station on Line 3, and the last four digits indicate the automatic ticket vending system equipment number; TRANS_CODE refers to the entry and exit type. For example, "21" and "22" in the above table represent entry and exit, respectively.

[0069] According to the TICKET_ID, TRANS_CODE and the order of the recorded date and time, the passenger's travel records of the origin and destination stations (OD pairs) can be matched, and the station and line number information is retained according to actual needs. The data table structure obtained after preprocessing is as follows:

[0070]

[0071] Among them, the "IN_TIME" and "OUT_TIME" fields respectively indicate the passenger's entry and exit times for this trip; "IN_STATION" and "OUT_STATION" respectively indicate the entry and exit stations, the first two digits indicate the line number, and the last two digits indicate the station number. Taking "0316" as an example, it indicates the entry station for station No. 16 on Line 3.

[0072] If there are abnormal data in the historical records of passengers entering and exiting the station, the abnormal data will be filtered. The abnormal data here include several situations: one is that the entry and exit are the same station, that is, the entry and exit stations are the same; the second is that the entry and exit time is outside the rail transit operation time; the third is that the interval time between entering and exiting the station is significantly longer than the time required for the journey; the fourth is that the interval time between entering and exiting the station is less than the shortest estimated time required for the journey. Among them, the time required for the journey can refer to the average time corresponding to all travel records of the same OD pair. If there are too few travel records between a certain OD pair and the time difference is too large, the shortest estimated time required for the journey can be considered as a reference; the shortest estimated time required for the journey can be calculated through the directed graph constructed above and the weight value corresponding to each directed edge, which will not be repeated here.

[0073] When the obtained passenger entry and exit history records meet the above four abnormal conditions, a temporary database can be established to filter and delete abnormal data information in the database through coding, or, when there is not much sample data, it can be manually cleaned up through query.

[0074] In this specific embodiment, the actual transfer path of the passenger is determined based on the passenger's historical entry and exit travel records and the corresponding weight values ​​of the directed edges. In addition, when there are abnormal data in the passenger's historical entry and exit travel records, they are filtered to make the historical section passenger flow information obtained more accurate, thereby effectively improving the accuracy of urban rail transit section passenger flow prediction.

[0075] When passengers take a train, there are often multiple routes to choose from. According to the actual situation, the actual transfer route of the passenger is determined from multiple alternative routes of an OD pair. According to the actual transfer route, we can know which stations the route passes through, that is, we can know the one or more directed edges included in the route. Combined with the corresponding weight value of each directed edge in the directed graph, we can get the estimated time when the train passes each station in the actual transfer route. The estimated time passing each station includes the estimated time for passengers to enter and exit the station.

[0076] According to the estimated time obtained above, the historical section passenger flow information of the target section is obtained. Specifically, according to the historical travel records of passengers entering and leaving the station, and combined with the estimated time corresponding to each station, each complete historical travel record can be disassembled according to the adjacent station line segments to obtain multiple complete passenger travel records. The fields contained in each disassembled record are as follows:

[0077]

[0078] Among them, the passenger ID includes the QR code information and ticket information presented by the passenger when entering and exiting the station. The starting point and end point of the line segment are adjacent stations. The line segment types include: the starting point of the line segment is the entry station; the end point of the line segment is the exit station; the starting point and end point of the line segment are the entry station and exit station respectively; the end point of the line segment is the transfer station; the starting point and end point of the line segment are the passing stations.

[0079] According to the split travel records, the cross-sectional passenger flow in the up and down directions passing through each station within a unit time can be directly counted. The method for counting historical cross-sectional passenger flow provided in this embodiment does not require knowing the train timetable. For the half-hour and one-hour cross-sectional flow statistical granularity, the statistical time error passing through each station can have a negligible impact on the statistical results.

[0080] Taking the result table after Hive stores the split travel records as an example, the following query statement is enough to directly calculate the statistical results of the historical section passenger flow in the target time period in units of 30 minutes. The statistical methods of other implementation methods are similar:

[0081]

[0082] Hive is a data warehouse tool based on Hadoop, which is used to extract, transform and load data. Based on the multiple records obtained by disassembly, the historical passenger flow information of the target section can be obtained more accurately.

[0083] In this embodiment, a directed graph corresponding to the urban rail transit operating network is constructed, and a corresponding weight value is assigned to each directed edge in the directed graph according to the train running time between adjacent stations or the passenger transfer time at the transfer station. Then, combined with the passenger's historical travel records of entering and leaving the station, the passenger's actual transfer path is determined, and the estimated time for the passenger to pass through each station in the actual transfer path is calculated, thereby obtaining the historical section passenger flow information of the target section, which can ensure the accuracy of the section passenger flow data statistics to a certain extent and further improve the accuracy of the urban rail transit section passenger flow prediction.

[0084] On the basis of the above embodiment, further, determining the actual transfer path includes: obtaining multiple candidate transfer paths according to the directed graph; calculating the estimated time of each candidate transfer path according to the weight value of the directed edge; and determining the actual transfer path by comparing the estimated time of each candidate transfer path.

[0085] It is understandable that in the case of a single route, that is, when there is no transfer, the passenger's travel path is single, and the passenger flow passing through a certain section in a certain time period can be basically accurately calculated using the entry and exit transaction data. However, in the case of transfers, for the same starting station and destination station, passengers often face multiple path choices. The entry and exit transaction data cannot reflect the actual transfer path of the passengers at all. If you want to obtain the actual transfer path of the passengers, you need to use a certain algorithm to determine it.

[0086] Based on the rail transit operation line network diagram, a corresponding directed graph is constructed. When the starting station and the destination station of the passenger are known, multiple alternative transfer paths that meet the passenger's travel can be obtained according to the directed graph. Then, according to the weight value corresponding to the directed edge, the estimated time required to obtain each alternative transfer path is calculated. Usually, due to the corresponding time required to wait for entry and transfer, the actual time spent by passengers on the trip will be longer than the estimated time. Considering this, the calculated time difference can be evenly distributed between the initial station and each transfer station, so as to achieve the correction of the estimated time.

[0087] After calculating the estimated time of each alternative transfer path, the estimated time of all the alternative transfer paths is compared, and the alternative transfer path with the shortest estimated time is used as the actual transfer path for the passenger. Of course, in the process of determining the actual transfer path, different alternative transfer paths can also be assigned corresponding weights according to the estimated time of different alternative transfer paths. The shorter the estimated time, the higher the probability that the alternative transfer path will be selected.

[0088] In this embodiment, multiple alternative transfer paths are obtained according to a directed graph, and the estimated time of each alternative transfer path is calculated according to the weight value corresponding to each directed edge. The estimated time of all alternative transfer paths is compared to determine the actual transfer path of the passenger, and the historical cross-sectional passenger flow of the target section is calculated based on this. This can ensure the accuracy of cross-sectional passenger flow data statistics to a certain extent, thereby improving the accuracy of cross-sectional passenger flow prediction of urban rail transit.

[0089] On the basis of the above embodiment, the target section passenger flow prediction model further includes an improved Prophet section passenger flow periodic prediction model and a section passenger flow short-term prediction model; the section passenger flow short-term prediction model is constructed based on a long short-term memory neural network, and has a multi-branch structure and an encoding-decoding two-stage structure; the expression of the improved Prophet section passenger flow periodic prediction model is as follows:

[0090] y(t)=g(t)+s0(t)+δ(t)s1(t)+(1-δ(t))s2(t)+h(t)+ε t

[0091] Among them, g(t) is the trend term, s0(t) is the weekly cycle term, s1(t) is the working day cycle term, s2(t) is the non-working day cycle term, h(t) is the holiday term, δ(t) is the sign function term, ε t is a random error term.

[0092] It can be understood that the historical section passenger flow information and historical in-and-out passenger flow information of the target section are obtained, and based on these data information, the section passenger flow prediction model is trained until convergence to obtain the target section passenger flow prediction model. By inputting the prediction time period, the number of the target section, and the historical in-and-out passenger flow information into the trained target section passenger flow prediction model, the predicted section passenger flow of the target section in the future period of time can be obtained. Among them, the target section passenger flow prediction model includes the improved Prophet section passenger flow periodic prediction model and the section passenger flow short-term prediction model.

[0093] Prophet is an open source time series forecasting framework. Its algorithm principle is to analyze and fit various characteristic effects that affect the changes in time series, assign corresponding weights, and finally accumulate these effects to obtain the predicted value of the time series. The existing Prophet model is expressed as follows:

[0094] y(t)=g(t)+s(t)+h(t)+ε t

[0095] Among them, g(t) is the trend term, which is used to analyze the trend changes of non-periodic nature in time series, including piecewise linear model and saturated growth model; s(t) is the periodic term; h(t) belongs to holidays and other external factors, indicating the impact changes caused by holiday factors; ε t is a random error term.

[0096] Since the passenger flow of most subway sections presents obvious daily cycle characteristics, and weekdays and weekends often present different passenger flow distributions, considering this, this embodiment improves and adjusts the original Prophet model. The improved and adjusted model expression is as follows:

[0097] y(t)=g(t)+s0(t)+δ(t)s1(t)+(1-δ(t))s2(t)+h(t)+ε t

[0098] Among them, s0(t) is a weekly periodic term, which is used to fit the daily passenger flow variation within a week; s1(t) is a weekday periodic term, which is used to fit the variation of the passenger flow per unit time section within each weekday; s2(t) is a non-working day periodic term, which is used to fit the variation of the passenger flow per unit time section on Saturday and Sunday; δ(t) is a symbolic function term, when time t belongs to a weekday, δ(t) is equal to 1, otherwise it is 0; g(t), h(t) and ε t Same as above.

[0099] The short-term prediction model for cross-sectional passenger flow is constructed based on the Long Short-Term Memory (LSTM) neural network, which is a special type of recurrent neural network with the ability to learn long-term dependencies. In this embodiment, the short-term prediction model for cross-sectional passenger flow also has a multi-branch structure, and multiple branches are used to extract features from different input data. The input data dimension and time series length of each branch can be flexibly adjusted without complete alignment.

[0100] In addition, each branch of the cross-section passenger flow short-term prediction model also has a two-stage structure of encoding and decoding, which can realize end-to-end prediction from the time series of inbound and outbound passenger flow to the time series of cross-section passenger flow. That is, the encoder input is the statistical time series of the historical inbound and outbound passenger flow for a period of time before the prediction time period. The encoder extracts the implicit feature state and passes it to the decoder, and then the decoder and the fully connected layer calculate to obtain the target cross-section passenger flow time series for the prediction time period. The hidden features extracted by different branches can be aggregated in the fully connected layer after the decoder output. It is only necessary to ensure that the length of the long short-term memory neural network encoder used by different branches is consistent with the length of the cross-section passenger flow time series to be predicted.

[0101] It should also be noted that the short-term cross-sectional passenger flow prediction model can predict the cross-sectional passenger flow of a single target cross-sectional area in the future, and can also predict the cross-sectional passenger flow of multiple target cross-sectional areas in the future.

[0102] In this embodiment, taking into account that the passenger flow of most subway sections presents obvious periodic characteristics, and that weekdays and weekends often present different passenger flow distributions, the original Prophet model is improved and adjusted to obtain an improved Prophet section passenger flow periodic prediction model; and taking into account the lag of section passenger flow statistics, an end-to-end section passenger flow short-term prediction model is adopted. The section passenger flow of the target section is predicted by these two models, which greatly improves the accuracy and practicality of the urban rail transit section passenger flow prediction.

[0103] On the basis of the above embodiments, further, the time period to be predicted, the target section number and the historical in-and-out passenger flow information are input into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section, including: inputting the predicted time period and the target section number into the improved Prophet section passenger flow periodic prediction model to obtain the periodic predicted section passenger flow of the target section; and / or, inputting the historical in-and-out passenger flow information into the section passenger flow short-term prediction model to obtain the short-term predicted section passenger flow of the target section. It can be understood that after obtaining the trained target section passenger flow prediction model, the time period to be predicted, the target section number and the historical in-and-out passenger flow information are input into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section. Specifically, the target section passenger flow prediction model includes an improved Prophet section passenger flow periodic prediction model and a section passenger flow short-time prediction model. Accordingly, the prediction time period and target section number and the historical inbound and outbound passenger flow information are respectively input into the improved Prophet section passenger flow periodic prediction model and the section passenger flow short-time prediction model to obtain the periodic predicted section passenger flow and short-term predicted section passenger flow of the target section respectively.

[0104] Figure 2The prediction flow chart of the improved Prophet section passenger flow periodic prediction model provided by the present invention is shown. It should be clear that the target section passenger flow prediction model is already trained, and the improved Prophet section passenger flow periodic prediction model included therein is also already trained. By predicting the long-term section passenger flow of the target section through the improved Prophet section passenger flow periodic prediction model, the accuracy of the prediction result can be guaranteed.

[0105] like Figure 2 As shown in the figure, when predicting the long-term passenger flow of the target section, it is only necessary to input the time period for predicting the passenger flow of the section in the future and the number information of the target section into the improved Prophet section passenger flow periodic prediction model, and the passenger flow prediction value corresponding to the input prediction time period and the target section number can be obtained. The passenger flow prediction values ​​output by the improved Prophet section passenger flow periodic prediction model are independent of each other, that is, for each input of a prediction time period and the number of the target section, the passenger flow prediction value of the corresponding target section in the prediction time period is output, and each input and output are one-to-one corresponding.

[0106] Figure 3 The prediction flow chart of the short-term prediction model for cross-sectional passenger flow provided by the present invention is shown. Similarly, the short-term prediction model for cross-sectional passenger flow has also been trained. By using this model to predict the short-term cross-sectional passenger flow of the target cross-section, the accuracy of the prediction result can be guaranteed.

[0107] like Figure 3 As shown in the figure, when predicting the short-term passenger flow of the target section, the historical inbound and outbound passenger flow information is used as the input of the model, and the corresponding output is the predicted value of the future short-term passenger flow. The output of the short-term passenger flow prediction model of the section passenger flow can be the short-term passenger flow prediction value of a single section in a single prediction period, the short-term passenger flow prediction value of multiple sections in a single prediction period, or the short-term passenger flow prediction value of multiple sections in multiple prediction periods.

[0108] It should be noted that, depending on the type of predicted cross-sectional passenger flow, the improved Prophet cross-sectional passenger flow periodic prediction model or the cross-sectional passenger flow short-term prediction model can be used respectively. For example, if long-term periodic cross-sectional passenger flow needs to be predicted, the improved Prophet cross-sectional passenger flow periodic prediction model is preferred for prediction; if short-term cross-sectional passenger flow needs to be predicted, the cross-sectional passenger flow short-term prediction model can be used for prediction. Or, as needed, these two models can be used simultaneously to predict the cross-sectional passenger flow of the target cross-sectional area within a period of time in the future.

[0109] In this embodiment, by inputting the prediction time period and target section number and historical inbound and outbound passenger flow information into the improved Prophet section passenger flow periodic prediction model and / or section passenger flow short-term prediction model respectively, the periodic section passenger flow and / or short-term section passenger flow of the target section is predicted, thereby effectively improving the accuracy of urban rail transit section passenger flow prediction.

[0110] On the basis of the above embodiment, further, the historical inbound and outbound passenger flow information is input into the short-term prediction model of the cross-section passenger flow to obtain the short-term predicted cross-section passenger flow of the target section, including: inputting the real-time inbound passenger flow and the real-time outbound passenger flow into the two branches of the short-term prediction model of the cross-section passenger flow respectively to extract features; obtaining the extracted features of each branch and merging them to obtain the target features; inputting the target features into the fully connected layer of the short-term prediction model of the cross-section passenger flow to obtain the short-term predicted cross-section passenger flow of the target section.

[0111] It is understandable that the historical inbound and outbound passenger flow information is input into the short-term prediction model for the section passenger flow. Specifically, the historical inbound passenger flow and the historical outbound passenger flow of the target section are respectively input into different branches of the short-term prediction model for the section passenger flow. Different branches extract features of the time series factors of inbound and outbound passenger flow of each station or other time series factors that may affect the future short-term section passenger flow. After the features are extracted by different branches of the model, the features extracted by different branches are merged, and the merged results are input into the fully connected layer of the short-term prediction model for the section passenger flow. The fully connected layer is used to calculate and predict the passenger flow of a single or multiple sections of the target section in the future. In the prediction process, the statistical time interval of the inbound and outbound passenger flow information and the unit time of the section passenger flow to be predicted can be set according to the actual situation and do not need to be consistent. For example, the short-term prediction model for the section passenger flow can predict the passenger flow of each section in the next 30 minutes by the changes in the inbound and outbound passenger flow every 10 minutes in the previous hour.

[0112] In this embodiment, the inbound passenger flow data can be expressed as:

[0113]

[0114] Where s is the number of stations. In order to predict the cross-sectional passenger flow at the next unit time of t, the implementation plan chooses to use the time series of the incoming passenger flow from t-7 to the first 8 units of time of t. The data representation of the outgoing passenger flow is similar to that of the incoming passenger flow, which can be expressed as X′ s,t .

[0115] The cross-sectional passenger flow that needs to be predicted can be expressed as:

[0116]

[0117] It represents the passenger flow of k subway sections to be predicted in the next m unit time.

[0118] When m=1, the historical inbound passenger flow and the historical outbound passenger flow are respectively extracted with implicit features through two long short-term memory neural network branches, the features extracted by the two branches are merged, and the merged results are input to the fully connected layer, and the cross-sectional passenger flow of the target section in the t+1 time period is calculated and predicted by the fully connected layer. If there are other time series factors that may affect the short-term cross-sectional passenger flow, such as weather factors, the corresponding features can be extracted by adding a long short-term memory neural network branch. Similarly, it is merged with the extracted features of other branches, and then the merged results are input to the fully connected layer, which calculates and predicts the cross-sectional passenger flow of the target section in the t+1 time period.

[0119] Specifically, Figure 4 FIG. 2 shows a model structure diagram of the short-term prediction model for cross-sectional passenger flow provided by the present invention. Figure 4 As shown in the figure, the model structure includes two branches, both of which are constructed based on long short-term memory neural networks. The historical inbound passenger flow is input to the left branch, and the historical outbound passenger flow is input to the right branch. The features of the historical inbound and outbound passenger flow are extracted through the two branches. Furthermore, the fully connected layer uses the features extracted by the two branches as input to calculate and predict the cross-sectional passenger flow of the target section within the target time period. It should be noted that in order to prevent overfitting of the model, when training the cross-sectional passenger flow short-term prediction model, based on the features extracted by the long short-term memory neural network unit, it also passes through a dropout network layer, and uses the output of the dropout network layer as the input of the fully connected layer, and the fully connected layer outputs the cross-sectional passenger flow prediction value of the target section within the target time period.

[0120] When m>1, each branch of the short-term prediction model of cross-section passenger flow adopts the encoder and decoder mode. Specifically, Figure 5 The figure shows the encoding and decoding mode of the short-term prediction model branch of the section passenger flow provided by the present invention. Figure 5 As shown in the figure, the encoder is used to extract the features of the historical inbound and outbound passenger flow information, and pass it to the decoder through the hidden layer state. The decoder uses the long short-term memory neural network unit with the same structure, and uses the output of the decoder as the input of the fully connected layer. The fully connected layer calculates and outputs the cross-section passenger flow prediction time series from t+1 to t+m. Among them, h t represents the hidden state at the current time t, c t Represents a fixed-length background variable. Similarly, the decoder output results of different branches can be merged before entering the fully connected layer.

[0121] In this embodiment, the historical inbound and outbound passenger flows are respectively input into different branches of the section passenger flow short-term prediction model for feature extraction, and the extracted features are merged to obtain the target features, which are input into the fully connected layer. The short-term predicted section passenger flow of the target section is calculated and predicted through the fully connected layer, thereby effectively improving the accuracy of short-term prediction of urban rail transit section passenger flow.

[0122] In addition, in a specific embodiment, taking the section passenger flow data of Chongqing Rail Transit in November and December 2019 as an example, the data of the subway operation period (6 am to 0 am the next day) for the last 7 days of the week from December 23 to December 29 is used as the test set, and the data of the month before December 23 is used as the training set. In December 2019, Chongqing had a total of 9 lines with a total of 364 sections (including both up and down directions)

[0123] According to the technical solutions provided by the above embodiments, the rail transit data of Chongqing in 2019 was statistically analyzed to obtain the cross-sectional passenger flow data in units of 30 minutes, and the improved Prophet model and the LSTM-based end-to-end model were trained respectively. The model obtained by training and tuning was used to predict the long-term periodic passenger flow changes and short-term real-time passenger flow changes on the test set to verify the prediction effect of the cross-sectional passenger flow.

[0124] This embodiment uses the symmetric mean absolute percentage error (SMAPE) and the weighted mean absolute percentage error (WMAPE) as the evaluation indicators of the model test set to evaluate the prediction effect of the improved Prophet section passenger flow periodic prediction model and the section passenger flow short-term prediction model provided by the present invention. The expressions of the symmetric mean absolute percentage error and the weighted absolute percentage error are as follows:

[0125]

[0126] Compared with the commonly used average percentage error, the symmetric mean absolute percentage error and the weighted mean absolute percentage error can better reflect the actual situation of the prediction value error because the deviation is converted to absolute value and there will be no positive and negative offset.

[0127] (1) Long-term periodic section passenger flow prediction effect

[0128] Figure 6 The figure shows the comparison effect of the long-term periodic section passenger flow prediction value and the actual value from the South Square to the North Square of Chongqing North Railway Station provided by the present invention. Figure 6 As shown, the horizontal axis is the date and time, and the vertical axis is the cross-sectional passenger flow. Figure 6It can be seen that the periodic fitting effect is good, and the cross-sectional passenger flow distribution on weekdays and Saturdays and Sundays is clearly distinguished.

[0129] Figure 7 The SMAPE distribution diagram of 364 sections of Chongqing rail transit provided by the present invention is shown. Figure 7 As shown in the figure, the SMAPE of the weekly forecast values ​​of most sections is concentrated between 0.1 and 0.4, which indicates that the prediction error of the long-term periodic section passenger flow is small and the prediction accuracy is high.

[0130] The commonly used seasonal autoregressive method has time limitations in calculation. In this embodiment, 10 sections out of 364 sections are randomly selected for prediction and comparison. According to the seasonal autoregressive algorithm, the average WMAPE of the predicted section passenger flow of the 10 sections is 21.87%, while the average WMAPE of the section passenger flow predicted by the improved Prophet section passenger flow periodic prediction model is 13.57%, and the error is reduced by 8.3%.

[0131] For training and prediction of a single section, the seasonal autoregressive model takes an average of 6.6 minutes, and the improved Prophet section passenger flow periodicity prediction model takes an average of 4 seconds.

[0132] In addition, the average WMAPE of all section passenger flows predicted by the improved Prophet section passenger flow periodicity prediction model on the test set is 15.77%, and the prediction effect is relatively stable.

[0133] (2) Short-term passenger flow prediction effect

[0134] The entry and exit data of all stations on the line network with a statistical interval of 10 minutes two hours before a certain moment is used as the input of the short-term prediction model of section passenger flow based on the long short-term memory neural network. The output is the passenger flow of all sections after that moment, with half an hour as the time unit. The WMAPE of single-step prediction on the test set is 9.3%.

[0135] Taking the section from South Square to North Square of Chongqing North Railway Station as an example, Figure 8 The comparison effect diagram of the short-term cross-section passenger flow prediction value and the actual value from the South Square to the North Square of Chongqing North Railway Station provided by the present invention is shown. Figure 8 It can be seen that the changes in the Monday morning peak are predicted by the short-term section passenger flow prediction model, which reduces the prediction error of the improved Prophet section passenger flow periodic prediction model to a certain extent.

[0136] Fig. 9 The schematic diagram of the structure of the prediction device for the urban rail transit section passenger flow provided by the present invention is shown. Fig. 9As shown, the prediction device includes: a target information acquisition module 901, which is used to obtain the historical cross-sectional passenger flow information and the historical in-and-out passenger flow information of the target section; a prediction model training module 902, which is used to train the cross-sectional passenger flow prediction model until convergence according to the historical cross-sectional passenger flow information and the historical in-and-out passenger flow information, and obtain the target cross-sectional passenger flow prediction model; a cross-sectional passenger flow prediction module 903, which is used to input the prediction time period, the target section number and the historical in-and-out passenger flow information into the target cross-sectional passenger flow prediction model, and obtain the predicted cross-sectional passenger flow of the target section. The prediction device for cross-sectional passenger flow of urban rail transit provided by the present invention can correspond to the prediction method for cross-sectional passenger flow of urban rail transit described above, and will not be repeated here.

[0137] In this embodiment, the historical section passenger flow information and historical in-and-out passenger flow information of the target section are obtained through the target information acquisition module 901; the prediction model training module 902 trains the section passenger flow prediction model until convergence according to the historical section passenger flow information and the historical in-and-out passenger flow information to obtain a trained target section passenger flow prediction model; the section passenger flow prediction module 903 inputs the prediction time period, the target section number and the historical in-and-out passenger flow information into the trained target section passenger flow prediction model to obtain the section passenger flow of the target section in the future period of time, which solves the defect of the prior art that the section passenger flow cannot be accurately predicted, and effectively improves the accuracy of the section passenger flow prediction of urban rail transit.

[0138] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 110, a communication interface 120, a memory 130 and a communication bus 140, wherein the processor 110, the communication interface 120 and the memory 130 communicate with each other through the communication bus 140. The processor 110 may call the logic instructions in the memory 130 to execute a method for predicting the section passenger flow of urban rail transit, the method comprising: obtaining historical section passenger flow information and historical in-and-out passenger flow information of a target section; training a section passenger flow prediction model until convergence according to the historical section passenger flow information and the historical in-and-out passenger flow information to obtain a target section passenger flow prediction model; inputting the prediction period, the target section number and the historical in-and-out passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section.

[0139] In addition, the logic instructions in the above-mentioned memory 130 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0140] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the urban rail transit section passenger flow prediction method provided by the above-mentioned methods, and the method includes: obtaining historical section passenger flow information and historical in-and-out passenger flow information of the target section; training a section passenger flow prediction model until convergence based on the historical section passenger flow information and the historical in-and-out passenger flow information to obtain a target section passenger flow prediction model; inputting the prediction time period, target section number and the historical in-and-out passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section.

[0141] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the urban rail transit section passenger flow prediction method provided by the above-mentioned methods, the method comprising: obtaining historical section passenger flow information and historical in-and-out passenger flow information of the target section; training a section passenger flow prediction model until convergence based on the historical section passenger flow information and the historical in-and-out passenger flow information to obtain a target section passenger flow prediction model; inputting the prediction time period, the target section number and the historical in-and-out passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section.

[0142] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting passenger flow in urban rail transit sections, characterized in that: include: Obtain historical section passenger flow information and historical in-and-out passenger flow information of the target section; According to the historical section passenger flow information and the historical in-and-out passenger flow information, a section passenger flow prediction model is trained until convergence to obtain a target section passenger flow prediction model; Input the predicted time period, the target section number and the historical inbound and outbound passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section; The target section passenger flow prediction model includes an improved Prophet section passenger flow periodic prediction model and a section passenger flow short-term prediction model; The model expression of the improved Prophet section passenger flow periodicity prediction model includes a periodic term for fitting the daily passenger flow variation law within a week, a working day periodic term for fitting the unit time section passenger flow variation law within each working day, and a non-working day periodic term for fitting the unit time section passenger flow variation law within one day on Saturday and Sunday; The cross-section passenger flow short-term prediction model has a multi-branch structure, each branch is a two-stage encoding-decoding structure; Inputting the predicted time period, the target section number and the historical inbound and outbound passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section, including: Input the prediction period and the target section number into the improved Prophet section passenger flow periodic prediction model to obtain the periodic predicted section passenger flow of the target section; and / or, Inputting the historical inbound and outbound passenger flow information into the short-term prediction model of the section passenger flow to obtain the short-term predicted section passenger flow of the target section; The step of inputting the historical inbound and outbound passenger flow information into the short-term prediction model for the section passenger flow to obtain the short-term predicted section passenger flow of the target section includes: Inputting the historical inbound passenger flow and the historical outbound passenger flow into two branches of the cross-section passenger flow short-term prediction model respectively to extract features; Get the extracted features of each branch and merge them to get the target features; The target features are input into the fully connected layer of the short-term prediction model of the section passenger flow to obtain the short-term predicted section passenger flow of the target section.

2. The method for predicting passenger flow of urban rail transit section according to claim 1, characterized in that: The obtaining of the historical section passenger flow information and the historical in-and-out passenger flow information of the target section includes: Construct a directed graph based on the urban rail transit operation network; According to the time required for train operation between adjacent stations or the time required for passengers to transfer at transfer stations, all directed edges of the directed graph are assigned corresponding weight values; Determine the actual transfer path of the passenger based on the historical travel records of the passenger entering and exiting the station and the corresponding weight values ​​of the directed edges, and obtain the estimated time for the passenger to pass through each station in the actual transfer path; The historical section passenger flow information is obtained based on the estimated time of arrival of passengers at each station.

3. The method for predicting passenger flow of urban rail transit section according to claim 2, characterized in that: Determining the actual transfer path of the passenger includes: According to the directed graph, obtaining multiple candidate transfer paths; Calculating the estimated time consumption of each alternative transfer path according to the weight value of the directed edge; The actual transfer path is determined by comparing the estimated time consumption of each candidate transfer path.

4. The method for predicting passenger flow of urban rail transit section according to claim 2, characterized in that: Determining the actual transfer path of the passenger based on the historical travel records of the passenger entering and exiting the station and the corresponding weight values ​​of the directed edges includes: If there are abnormal data in the passenger's entry and exit history records, the abnormal data is filtered.

5. The method for predicting passenger flow of urban rail transit section according to claim 1, characterized in that: The short-term prediction model for cross-section passenger flow is constructed based on a long short-term memory neural network; The expression of the improved Prophet section passenger flow periodicity prediction model is as follows: y(t)=g(t)+s0(t)+δ(t)s1(t)+(1-δ(t))s2(t)+h(t)+ε t Among them, g(t) is the trend term, s0(t) is the weekly cycle term, s1(t) is the working day cycle term, s2(t) is the non-working day cycle term, h(t) is the holiday and external factor term, δ(t) is the symbol function term, ε t is a random error term.

6. A device for predicting passenger flow in urban rail transit sections, characterized in that: include: A target information acquisition module is used to acquire the historical section passenger flow information and historical in-and-out passenger flow information of the target section; A prediction model training module, used to train a cross-section passenger flow prediction model until convergence based on the historical cross-section passenger flow information and the historical in-and-out passenger flow information, to obtain a target cross-section passenger flow prediction model; A cross-section passenger flow prediction model, used to input the prediction period, the target cross-section number and the historical inbound and outbound passenger flow information into the target cross-section passenger flow prediction model to obtain the predicted cross-section passenger flow of the target cross-section; The target section passenger flow prediction model includes an improved Prophet section passenger flow periodic prediction model and a section passenger flow short-term prediction model; The model expression of the improved Prophet section passenger flow periodicity prediction model includes a periodic term for fitting the daily passenger flow variation law within a week, a working day periodic term for fitting the unit time section passenger flow variation law within each working day, and a non-working day periodic term for fitting the unit time section passenger flow variation law within one day on Saturday and Sunday; The cross-section passenger flow short-term prediction model has a multi-branch structure, each branch is a two-stage encoding-decoding structure; Inputting the predicted time period, the target section number and the historical inbound and outbound passenger flow information into the target section passenger flow prediction model to obtain the predicted section passenger flow of the target section, including: Input the prediction period and the target section number into the improved Prophet section passenger flow periodic prediction model to obtain the periodic predicted section passenger flow of the target section; and / or, Inputting the historical inbound and outbound passenger flow information into the short-term prediction model of the section passenger flow to obtain the short-term predicted section passenger flow of the target section; The step of inputting the historical inbound and outbound passenger flow information into the short-term prediction model for the section passenger flow to obtain the short-term predicted section passenger flow of the target section includes: Inputting the historical inbound passenger flow and the historical outbound passenger flow into two branches of the cross-section passenger flow short-term prediction model respectively to extract features; Get the extracted features of each branch and merge them to get the target features; The target features are input into the fully connected layer of the short-term prediction model of the section passenger flow to obtain the short-term predicted section passenger flow of the target section.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for predicting passenger flow in an urban rail transit section as described in any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting passenger flow in an urban rail transit section as claimed in any one of claims 1 to 5 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for predicting passenger flow in an urban rail transit section as claimed in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Urban rail transit passenger flow analysis method based on AFC (Automatic Fare Collection) passenger ticket data

    CN104376624A

  • Rail transit section passenger flow short-time prediction method and system based on big data technology

    CN110782060A