CN113239198A - Subway passenger flow prediction method and device and computer storage medium - Google Patents

Subway passenger flow prediction method and device and computer storage medium Download PDF

Info

Publication number
CN113239198A
CN113239198A CN202110537125.8A CN202110537125A CN113239198A CN 113239198 A CN113239198 A CN 113239198A CN 202110537125 A CN202110537125 A CN 202110537125A CN 113239198 A CN113239198 A CN 113239198A
Authority
CN
China
Prior art keywords
subway
station
passenger flow
network
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110537125.8A
Other languages
Chinese (zh)
Other versions
CN113239198B (en
Inventor
唐进君
曾捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN202110537125.8A priority Critical patent/CN113239198B/en
Publication of CN113239198A publication Critical patent/CN113239198A/en
Application granted granted Critical
Publication of CN113239198B publication Critical patent/CN113239198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q50/40
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/20Individual registration on entry or exit involving the use of a pass
    • G07C9/29Individual registration on entry or exit involving the use of a pass the pass containing active electronic elements, e.g. smartcards

Abstract

The embodiment of the invention discloses a subway passenger flow prediction method, a subway passenger flow prediction device and a computer storage medium, wherein a subway trip OD matrix is generated according to subway card swiping data; the lines and columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing the subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; acquiring the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data and the knowledge graph of N time periods, wherein N is more than or equal to 1; therefore, the device can effectively realize the accurate prediction of the short-time passenger flow of each station in the subway network, and can be used for displaying the current situation of the passenger flow entering and leaving each station and the future change trend in real time, thereby assisting the operation department to develop the targeted management and control measures.

Description

Subway passenger flow prediction method and device and computer storage medium
Technical Field
The invention relates to the field of subway passenger flow prediction, in particular to a subway passenger flow prediction method, a subway passenger flow prediction device and a computer storage medium.
Background
Most cities in China suffer from the influence of various urban diseases such as traffic jam, tail gas pollution and the like, and the life quality and the travel experience of residents are seriously reduced. In recent years, the rapid development of urban public transport systems is considered to be an effective countermeasure for solving the series of urban diseases, and a great number of cities have selected transit-oriented development (TOD) as a criterion for urban planning and future development. Because the subway has the advantages of large capacity, high speed, small occupied area and the like, the subway is often regarded as the most worthy of development as an urban public transportation mode. The great advantages of the subway lead to the rapid increase of the attracted travel demand, but the great increase of the passenger flow leads to the increasingly prominent contradiction between the travel demand of passengers and the subway transportation service level. Passengers often suffer from phenomena of queuing, crowding and the like in the process of taking the subway, and the attraction of the subway to the traveling of the passengers is reduced. A large number of researches show that accurate prediction of short-term subway passenger flow is the basis of various applications such as dynamic control of the number of passengers in a station, reasonable allocation of transportation capacity resources, selection of passenger travel modes and the like, so a large number of subway passenger flow prediction methods are developed in recent years.
However, the existing research rarely considers the influence of subway travel behaviors such as "tunnel effect" and the like and the property of land use on travel demand, so that the complex space-time correlation of passenger flow of a subway network hierarchy is difficult to extract fully. In addition, because each subway station has two different types of passenger flows of entrance and exit, the two types of passenger flows have close relevance on the whole subway network, but the relevance between the two types of passenger flows is not mined. The above disadvantages cause that the prediction precision of the existing method is not high, and the actual application requirement of passenger flow dynamic management and control is difficult to meet.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a computer storage medium for predicting subway passenger flow, which are based on subway entrance and exit card swiping data and can accurately implement network-level short-time passenger flow prediction.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a subway passenger flow prediction method, including:
generating a subway trip OD matrix according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network;
constructing a knowledge graph according to the reconstructed subway network and POI data around the station;
and obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
Wherein, according to the subway card swiping data, a subway trip OD matrix is generated, which comprises the following steps:
generating an initial OD matrix W ∈ RN×NWherein N represents the total number of stations in the subway network;
acquiring all card swiping records of each passenger according to the subway card swiping data;
pairing each pair of incoming and outgoing card swiping records of each passenger according to the time sequence of card swiping;
and traversing all the paired card swiping records to obtain a starting station i and a terminal station j in the traveling process of the passenger each time, and updating the initial matrix to obtain a subway traveling OD matrix.
The method for reconstructing the subway network according to the OD matrix to obtain the reconstructed subway network comprises the following steps:
initializing a topological network comprising N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters;
identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1;
extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster;
updating the number of clusters and the similarity among the clusters;
and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
Wherein, according to the reconstructed subway network and the POI data around the site, a knowledge map is constructed, which comprises the following steps:
classifying POI data around the site;
extracting the total number of all POI categories in a preset range around each subway station;
calculating the distribution frequency of each POI category around the subway station;
taking the POI category with the highest distribution frequency as the semantic category of each subway station;
and inputting the reconstructed subway network to obtain a knowledge graph.
The method comprises the following steps of obtaining the incoming and outgoing passenger flow volume of all stations in the next time period based on the historical incoming and outgoing passenger flow data of the stations in N time periods and the knowledge graph, wherein N is more than or equal to 1, and comprises the following steps:
constructing a graph convolution network based on the knowledge graph and the relation graph convolution neural network and the separation attention mechanism;
training the graph convolution network through historical passenger flow data to obtain the trained graph convolution network;
and inputting the station outbound and inbound passenger flow data based on historical N time periods into the trained graph convolution network to obtain the outbound and inbound passenger flow of all stations in the next time period, wherein N is more than or equal to 1.
In a second aspect, an embodiment of the present invention provides a subway passenger flow prediction apparatus, including:
the data generation module is used for generating a subway trip OD matrix according to the subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
the network reconstruction module reconstructs the subway network according to the OD matrix to obtain the reconstructed subway network;
the knowledge map construction module is used for constructing a knowledge map according to the reconstructed subway network and POI data around the station;
and the passenger flow data prediction module is used for obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical N time periods of the incoming and outgoing passenger flow data of the stations and the knowledge graph, wherein N is more than or equal to 1.
In a third aspect, an embodiment of the present invention provides a subway passenger flow prediction apparatus, where the apparatus includes: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to implement the subway passenger flow prediction method of the first aspect when running the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for predicting subway passenger flow according to the first aspect is implemented.
According to the subway passenger flow prediction method, the subway passenger flow prediction device and the computer storage medium, provided by the embodiment of the invention, a subway trip OD matrix is generated according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; acquiring the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1; therefore, the device can effectively realize the accurate prediction of the short-time passenger flow of each station in the subway network, can serve as a subway passenger flow information analysis platform, can serve as a data analysis and visualization system of a subway operation department, and is used for displaying the current situation of the passenger flow of each station entering and leaving the station and the future change trend in real time, thereby assisting the operation department to develop a targeted management and control measure.
Drawings
Fig. 1 is a schematic flow chart of a subway passenger flow prediction method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an input matrix of a subway passenger flow prediction method provided in an embodiment of the present invention;
fig. 3 is a schematic diagram of an algorithm flow of a subway passenger flow prediction method according to an embodiment of the present invention;
FIG. 4 is a schematic view of passenger flow feature decomposition provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a graph convolution network according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a subway passenger flow prediction device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another subway passenger flow prediction device according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further described in detail with reference to the drawings and the specific embodiments of the specification. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, the subway passenger flow prediction method provided by the embodiment of the present invention is applicable to the case of predicting the passenger flow volume of any station in a subway, and the subway passenger flow prediction method can be executed by the subway passenger flow prediction apparatus provided by the embodiment of the present invention, and the subway passenger flow prediction apparatus can be implemented by software and/or hardware, and in a specific application, the subway passenger flow prediction apparatus can be specifically a terminal such as a desktop computer, a notebook computer, a smart phone, a personal digital assistant, a tablet computer, or the like. The subway passenger flow prediction method comprises the following steps:
step 101: generating a subway trip OD matrix according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
here, the OD (origin destination) matrix is a matrix in which all traffic zones are sorted by row (origin zone) and column (destination zone), and the travel volume (OD volume) of residents or vehicles between any two zones is used as an element, the OD matrix is an english abbreviation of a source-destination matrix, a so-called point is actually a traffic divided zone, and data in the matrix is the traffic flow from zone a to zone B, which is actually the congestion degree on a path from one place to another place.
Step 102: reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network;
step 103: constructing a knowledge graph according to the reconstructed subway network and POI data around the station;
step 104: and obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
In the embodiment of the invention, the subway trip OD matrix is generated according to the subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; acquiring the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1; therefore, the method can effectively realize the accurate prediction of the short-time passenger flow of each station in the subway network, and is used for displaying the current situations of the passenger flow entering and leaving each station and the future change trend in real time, thereby assisting the operation department to develop the targeted management and control measures. Specifically, here, the subway operation department mainly includes: the method has the advantages of reducing the congestion degree of stations and carriages, reasonably allocating transportation capacity resources, early warning for sudden large passenger flows and the like. The passenger mainly comprises: the method has the advantages of avoiding congestion in the traveling process, assisting passengers to reasonably plan the traveling mode, reducing waiting time (operation departments can adjust operation schedules in real time according to future changes so as to reduce the waiting time of the passengers), and the like.
In an embodiment, the generating a subway trip OD matrix according to the subway card swiping data includes:
generating an initial OD matrix W ∈ RN×NWherein N represents the total number of stations in the subway network;
acquiring all card swiping records of each passenger according to the subway card swiping data;
pairing each pair of incoming and outgoing card swiping records of each passenger according to the time sequence of card swiping;
and traversing all the paired card swiping records to obtain a starting station i and a terminal station j in the traveling process of the passenger each time, and updating the initial matrix to obtain a subway traveling OD matrix.
Here, referring to FIG. 2, assume that the dimension of the traffic matrix is RN×MWherein N represents the number of subway stations and M represents the total number of historical time points. Taking the card swiping data of 6:00-23:00 in one month (30 days) as an example, the passenger flow is counted according to the time interval of 10 minutes, and then 6 time intervals are provided in one hour, wherein M is 6 x (23-6) x 30 is 3360. For example, if the passenger flow data of the previous 12 time periods is used for predicting the passenger flow data of the future 1 time period, the training matrix has M-12 input matrixes, wherein each input matrix X ist∈RN×(2×T)With a corresponding predicted target of Yt∈RN×2. Wherein N represents the total number of stations, T-12 represents the preamble of several time periods, and 2 × T represents the inbound traffic and outbound traffic using training data of the previous T time periods. Therefore, the row of the input matrix represents a subway station, and the column indicates the number of preamble periods. For example, when T is 12, if the predicted target is all stations in the subway networkFor inbound and outbound traffic during 8:00-8:10, the input matrix is the inbound and outbound traffic for 12 slots of N stations between 6:00-8:00 (1 slot every 10 minutes).
In an embodiment, the reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network includes:
initializing a topological network comprising N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters;
identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1;
extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster;
updating the number of clusters and the similarity among the clusters;
and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
Here, in a first step, a topological network is initialized that contains only N isolated nodes. Each node represents a cluster, and the maximum OD passenger flow between every two clusters is used as the similarity between the clusters. And secondly, identifying two clusters with the highest similarity, and respectively calculating the average similarity of the two clusters. If the average similarity meets the threshold requirement, connecting edges are added between at most k pairs of nodes in the two clusters that meet the requirement. And thirdly, extracting all the mutually disconnected subgraphs in the network, and placing all the nodes in each subgraph in the same cluster. And fourthly, updating the number of the clusters and the similarity among the clusters. And fifthly, judging whether the number of the clusters in the network graph is 1. If the value is larger than 1, returning to the second step; otherwise, jumping out of the loop to obtain a final directed graph.
In an embodiment, the constructing a knowledge graph according to the reconstructed subway network and POI data around the station includes:
classifying POI data around the site;
extracting the total number of all POI categories in a preset range around each subway station;
calculating the distribution frequency of each POI category around the subway station;
taking the POI category with the highest distribution frequency as the semantic category of each subway station;
and inputting the reconstructed subway network to obtain a knowledge graph.
Here, the POI data around the site is classified, and specifically, all the POI data may be classified into 5 categories: residential areas, industrial areas, entertainment areas, educational areas, and traffic areas; the total number of all POI categories extracted in the preset range around each subway station can be the total number of all POI categories extracted in the range of 1km around each subway station, and the distribution frequency of each POI category around the subway station is calculated; and taking the POI category with the highest distribution frequency in 1km around each subway station as the semantic category of the station, and converting the directed graph obtained by reconstruction into a knowledge graph.
In an embodiment, the obtaining of the inbound and outbound passenger flow volume of all the sites in the next time period based on the historical inbound and outbound passenger flow data of the sites in N time periods and the knowledge graph, where N is greater than or equal to 1, includes:
constructing a graph convolution network based on the knowledge graph and the relation graph convolution neural network and the separation attention mechanism;
training the graph convolution network through historical passenger flow data to obtain the trained graph convolution network;
inputting the station outbound and inbound passenger flow data based on historical N time periods into the graph convolution network after training to obtain the outbound and inbound passenger flow of all stations in the next time period, wherein N is more than or equal to 1
Here, the graph convolution network may be a separation attention relationship graph convolution neural network (SARGCN), and is used to realize accurate prediction of inbound passenger flow and outbound passenger flow of each station in a large-scale subway network on the basis of a constructed subway knowledge map.
Here, refer toReferring to fig. 3, the system mainly comprises an R-GCN network, a split-attention mechanism and an LSTM network, and uses residual connection for improving the convergence performance of the model. Suppose that the previous inbound and outbound traffic data entered into the model are represented as IτAnd OτThe specific calculation steps of the model mainly comprise the following five stages.
The first stage, according to the characteristic decomposition process shown in FIG. 4, respectivelytAnd OtAnd decomposing the passenger flow into 6 passenger flows of long-term incoming passenger flow, medium-term incoming passenger flow, short-term incoming passenger flow, long-term outgoing passenger flow, medium-term outgoing passenger flow, short-term outgoing passenger flow and the like according to the time dimension.
And in the second stage, each group of passenger flows obtained by decomposition is respectively input into an R-GCN model, and 6 groups of different output characteristics are respectively obtained. Each group of output features can reflect the spatial dependence of the mined inbound passenger flow or outbound passenger flow under different time dimensions.
And in the third stage, 6 groups of output characteristics are input into the same LSTM network, and the time dependence between the output characteristics under different time dimensions is researched.
And in the fourth stage, a split-attribution mechanism is utilized to mine global semantic information in the output of the third stage, and meanwhile, the mechanism can also explore the relevance between the inbound passenger flow and the outbound passenger flow under the network level. The structure of the split-attention mechanism mainly comprises a global pooling layer, a BP neural network layer and a softmax layer.
And in the fifth stage, the relation between the input features and the output features is enhanced by utilizing residual connection, and the convergence speed and the prediction stability of the deep learning model are improved.
The SARGCN model designed by the present invention can be regarded as being formed by stacking a plurality of SARGCN blocks, and the specific structure of the SARGCN block is shown in fig. 5. The modular composition mode is convenient for changing the model structure, and can also obviously reduce the memory occupation in the deep learning model training process.
Based on the same inventive concept of the foregoing embodiment, referring to fig. 6, it shows a subway passenger flow prediction device provided by the embodiment of the present invention, which may include: the system comprises a data generation module 10, a network reconstruction module 20, a knowledge graph construction module 30 and a passenger flow data prediction module 40; wherein the content of the first and second substances,
the data generation module 10 is used for generating a subway trip OD matrix according to the subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
the network reconstruction module 20 reconstructs the subway network according to the OD matrix to obtain the reconstructed subway network;
the knowledge map construction module 30 is used for constructing a knowledge map according to the reconstructed subway network and POI data around the station;
and the passenger flow data prediction module 40 is used for obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
In summary, in the subway passenger flow prediction apparatus provided in the above embodiment, a subway trip OD matrix is generated according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; acquiring the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1; therefore, the device can effectively realize the accurate prediction of the short-time passenger flow of each station in the subway network, can serve as a subway passenger flow information analysis platform, can serve as a data analysis and visualization system of a subway operation department, and is used for displaying the current situation of the passenger flow of each station entering and leaving the station and the future change trend in real time, thereby assisting the operation department to develop a targeted management and control measure.
Optionally, the data generating module 10 is further configured to generate an initial OD matrix W e RN×NWherein N represents the total number of stations in the subway network;
acquiring all card swiping records of each passenger according to the subway card swiping data;
pairing each pair of incoming and outgoing card swiping records of each passenger according to the time sequence of card swiping;
and traversing all the paired card swiping records to obtain a starting station i and a terminal station j in the traveling process of the passenger each time, and updating the initial matrix to obtain a subway traveling OD matrix.
Optionally, the network reconfiguration module 20 is further configured to initialize a topology network including N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters;
identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1;
extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster;
updating the number of clusters and the similarity among the clusters;
and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
Optionally, the knowledge graph building module 30 is further configured to classify POI data around a site;
extracting the total number of all POI categories in a preset range around each subway station;
calculating the distribution frequency of each POI category around the subway station;
taking the POI category with the highest distribution frequency as the semantic category of each subway station;
and inputting the reconstructed subway network to obtain a knowledge graph.
Optionally, the passenger flow data prediction module 40 is further configured to construct a graph convolution network based on a knowledge graph and a relational graph convolution neural network and a separation attention mechanism;
training the graph convolution network through historical passenger flow data to obtain the trained graph convolution network;
and inputting the station outbound and inbound passenger flow data based on historical N time periods into the trained graph convolution network to obtain the outbound and inbound passenger flow of all stations in the next time period, wherein N is more than or equal to 1.
In another embodiment, as shown in fig. 7, there is also provided a computer apparatus including: at least one processor 210 and a memory 211 for storing computer programs capable of running on the processor 210; the processor 210 illustrated in fig. 7 is not used to refer to the number of processors as one, but is only used to refer to the position relationship of the processor with respect to other devices, and in practical applications, the number of processors may be one or more; similarly, the memory 211 illustrated in fig. 7 is also used in the same sense, i.e., it is only used to refer to the position relationship of the memory with respect to other devices, and in practical applications, the number of the memory may be one or more.
Wherein, when the processor 210 is used for running the computer program, the following steps are executed:
generating a subway trip OD matrix according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; and obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
In an alternative embodiment, the processor 210 is further configured to execute the following steps when the computer program runs:
generating an initial OD matrix W ∈ RN×NWherein N represents the total number of stations in the subway network; acquiring all card swiping records of each passenger according to the subway card swiping data; according to the time sequence of card swiping, each pair of incoming and outgoing card swiping records of each passenger are recordedPairing; and traversing all the paired card swiping records to obtain a starting station i and a terminal station j in the traveling process of the passenger each time, and updating the initial matrix to obtain a subway traveling OD matrix.
In an alternative embodiment, the processor 210 is further configured to execute the following steps when the computer program runs:
initializing a topological network comprising N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters; identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1; extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster; updating the number of clusters and the similarity among the clusters; and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
In an alternative embodiment, the processor 210 is further configured to execute the following steps when the computer program runs:
classifying POI data around the site; extracting the total number of all POI categories in a preset range around each subway station; calculating the distribution frequency of each POI category around the subway station; taking the POI category with the highest distribution frequency as the semantic category of each subway station; and inputting the reconstructed subway network to obtain a knowledge graph.
The computer device may further include: at least one network interface 212. The various components on the transmit side are coupled together by a bus system 213. It will be appreciated that the bus system 213 is used to enable communications among the connections of these components. The bus system 213 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 213 in fig. 7.
The memory 211 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 211 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 211 in the embodiment of the present invention is used to store various types of data to support the operation of the transmitting end. Examples of such data include: any computer program for operating on the sender side, such as an operating system and application programs. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
The embodiment further provides a computer storage medium, for example, including a memory 211 storing a computer program, which can be executed by a processor 210 in the transmitting end to perform the steps of the foregoing method. The computer storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories, such as a smart phone, a tablet computer, a notebook computer, and the like. A computer storage medium having a computer program stored therein, the computer program, when executed by a processor, performing the steps of:
wherein, when the processor 210 is used for running the computer program, the following steps are executed:
generating a subway trip OD matrix according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j; reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network; constructing a knowledge graph according to the reconstructed subway network and POI data around the station; and obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
generating an initial OD matrix W ∈ RN×NWherein N represents the total number of stations in the subway network; acquiring all card swiping records of each passenger according to the subway card swiping data; pairing each pair of incoming and outgoing card swiping records of each passenger according to the time sequence of card swiping; traversing all the paired card swiping records to obtain a starting station i and a terminal station j in each trip process of the passenger, and further comparing the initial matrixAnd newly, obtaining a subway trip OD matrix.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
initializing a topological network comprising N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters; identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1; extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster; updating the number of clusters and the similarity among the clusters; and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
classifying POI data around the site; extracting the total number of all POI categories in a preset range around each subway station; calculating the distribution frequency of each POI category around the subway station; taking the POI category with the highest distribution frequency as the semantic category of each subway station; and inputting the reconstructed subway network to obtain a knowledge graph.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
As used herein, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, including not only those elements listed, but also other elements not expressly listed.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A subway passenger flow prediction method is characterized by comprising the following steps:
generating a subway trip OD matrix according to subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network;
constructing a knowledge graph according to the reconstructed subway network and POI data around the station;
and obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical station incoming and outgoing passenger flow data of N time periods and the knowledge graph, wherein N is more than or equal to 1.
2. A subway passenger flow prediction method according to claim 1, wherein said generating a subway trip OD matrix according to subway swipe data comprises:
generating an initial OD matrix W ∈ RN×NWherein N represents the total number of stations in the subway network;
acquiring all card swiping records of each passenger according to the subway card swiping data;
pairing each pair of incoming and outgoing card swiping records of each passenger according to the time sequence of card swiping;
and traversing all the paired card swiping records to obtain a starting station i and a terminal station j in the traveling process of the passenger each time, and updating the initial matrix to obtain a subway traveling OD matrix.
3. A method according to claim 1, wherein the reconstructing a subway network according to the OD matrix to obtain a reconstructed subway network comprises:
initializing a topological network comprising N isolated nodes; each node represents a cluster, and the first OD passenger flow between every two clusters is used as the similarity between the clusters;
identifying two clusters with similarity meeting a first preset condition, respectively calculating the average similarity of the two clusters, and if the average similarity meets the requirement of a threshold value, adding a connecting edge between at most k pairs of nodes meeting the requirement in the two clusters; wherein k is more than or equal to 1;
extracting all mutually disconnected subgraphs in the topological network, and placing all nodes in the subgraphs in the same cluster;
updating the number of clusters and the similarity among the clusters;
and confirming that the number of the clusters is 1 to obtain the reconstructed subway network.
4. A method as claimed in claim 1, wherein the step of constructing a knowledge map according to the reconstructed subway network and site surrounding POI data comprises:
classifying POI data around the site;
extracting the total number of all POI categories in a preset range around each subway station;
calculating the distribution frequency of each POI category around the subway station;
taking the POI category with the highest distribution frequency as the semantic category of each subway station;
and inputting the reconstructed subway network to obtain a knowledge graph.
5. A subway passenger flow prediction method as claimed in claim 1, wherein said obtaining the incoming and outgoing passenger flow volume of all stations in the next time period based on historical N time period station incoming and outgoing passenger flow data and said knowledge map, where N is greater than or equal to 1, comprises:
constructing a graph convolution network based on the knowledge graph and the relation graph convolution neural network and the separation attention mechanism;
training the graph convolution network through historical passenger flow data to obtain the trained graph convolution network;
and inputting the station outbound and inbound passenger flow data based on historical N time periods into the trained graph convolution network to obtain the outbound and inbound passenger flow of all stations in the next time period, wherein N is more than or equal to 1.
6. A subway passenger flow prediction device, comprising:
the data generation module is used for generating a subway trip OD matrix according to the subway card swiping data; the rows and the columns of the OD matrix represent each subway station, and elements W (i, j) in the OD matrix represent the total number of passengers going from the station i to the station j;
the network reconstruction module reconstructs the subway network according to the OD matrix to obtain the reconstructed subway network;
the knowledge map construction module is used for constructing a knowledge map according to the reconstructed subway network and POI data around the station;
and the passenger flow data prediction module is used for obtaining the incoming and outgoing passenger flow volume of all the stations in the next time period based on the historical N time periods of the incoming and outgoing passenger flow data of the stations and the knowledge graph, wherein N is more than or equal to 1.
7. A subway passenger flow prediction device, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to implement the subway passenger flow prediction method according to any one of claims 1 to 5 when running the computer program.
8. A computer storage medium, characterized in that a computer program is stored which, when being executed by a processor, enables the subway passenger flow prediction as claimed in any one of claims 1 to 5.
CN202110537125.8A 2021-05-17 2021-05-17 Subway passenger flow prediction method and device and computer storage medium Active CN113239198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110537125.8A CN113239198B (en) 2021-05-17 2021-05-17 Subway passenger flow prediction method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110537125.8A CN113239198B (en) 2021-05-17 2021-05-17 Subway passenger flow prediction method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN113239198A true CN113239198A (en) 2021-08-10
CN113239198B CN113239198B (en) 2023-10-31

Family

ID=77134866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110537125.8A Active CN113239198B (en) 2021-05-17 2021-05-17 Subway passenger flow prediction method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN113239198B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657934A (en) * 2021-08-16 2021-11-16 京东城市(北京)数字科技有限公司 Passenger flow prediction model training method and passenger flow prediction method and device
CN113886181A (en) * 2021-09-30 2022-01-04 中南大学 Dynamic threshold prediction method, device and medium applied to AIOps fault early warning
CN115018215A (en) * 2022-08-09 2022-09-06 北京融信数联科技有限公司 Population residence prediction method, system and medium based on multi-modal cognitive map
CN116343486A (en) * 2023-05-19 2023-06-27 中南大学 Expressway network group mobility identification method based on abnormal field
CN117273287B (en) * 2023-11-23 2024-03-08 山东科技大学 Tensor-matrix coupling-based subway passenger flow prediction method

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150348068A1 (en) * 2014-05-28 2015-12-03 International Business Machines Corporation Predicting waiting passenger count and evaluation
CN105489056A (en) * 2015-12-28 2016-04-13 中兴软创科技股份有限公司 Parking requirement prediction method based on OD matrix
CN107291668A (en) * 2017-07-14 2017-10-24 中南大学 A kind of subway based on machine learning passenger flow forecasting in short-term
CN108564227A (en) * 2018-04-26 2018-09-21 重庆大学 A kind of track traffic for passenger flow amount prediction technique based on space-time characteristic
CN109308543A (en) * 2018-08-20 2019-02-05 华南理工大学 The short-term passenger flow forecasting of subway based on LS-SVM and real-time big data
CN109584552A (en) * 2018-11-28 2019-04-05 青岛大学 A kind of public transport arrival time prediction technique based on network vector autoregression model
US20190122111A1 (en) * 2017-10-24 2019-04-25 Nec Laboratories America, Inc. Adaptive Convolutional Neural Knowledge Graph Learning System Leveraging Entity Descriptions
CN110019568A (en) * 2019-04-12 2019-07-16 深圳市和讯华谷信息技术有限公司 Site selecting method, device, computer equipment and storage medium based on space clustering
CN110941767A (en) * 2019-10-24 2020-03-31 浙江工业大学 Network community detection countermeasure enhancement method based on multi-similarity integration
CN111160471A (en) * 2019-12-30 2020-05-15 腾讯云计算(北京)有限责任公司 Method and device for processing point of interest data, electronic equipment and storage medium
CN111915090A (en) * 2020-08-10 2020-11-10 哈尔滨安天科技集团股份有限公司 Prediction method and device based on knowledge graph, electronic equipment and storage medium
CN112418696A (en) * 2020-11-27 2021-02-26 北京工业大学 Method and device for constructing urban traffic dynamic knowledge map
CN112686428A (en) * 2020-12-15 2021-04-20 广州新科佳都科技有限公司 Subway passenger flow prediction method and device based on subway network station similarity

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150348068A1 (en) * 2014-05-28 2015-12-03 International Business Machines Corporation Predicting waiting passenger count and evaluation
CN105489056A (en) * 2015-12-28 2016-04-13 中兴软创科技股份有限公司 Parking requirement prediction method based on OD matrix
CN107291668A (en) * 2017-07-14 2017-10-24 中南大学 A kind of subway based on machine learning passenger flow forecasting in short-term
US20190122111A1 (en) * 2017-10-24 2019-04-25 Nec Laboratories America, Inc. Adaptive Convolutional Neural Knowledge Graph Learning System Leveraging Entity Descriptions
CN108564227A (en) * 2018-04-26 2018-09-21 重庆大学 A kind of track traffic for passenger flow amount prediction technique based on space-time characteristic
CN109308543A (en) * 2018-08-20 2019-02-05 华南理工大学 The short-term passenger flow forecasting of subway based on LS-SVM and real-time big data
CN109584552A (en) * 2018-11-28 2019-04-05 青岛大学 A kind of public transport arrival time prediction technique based on network vector autoregression model
CN110019568A (en) * 2019-04-12 2019-07-16 深圳市和讯华谷信息技术有限公司 Site selecting method, device, computer equipment and storage medium based on space clustering
CN110941767A (en) * 2019-10-24 2020-03-31 浙江工业大学 Network community detection countermeasure enhancement method based on multi-similarity integration
CN111160471A (en) * 2019-12-30 2020-05-15 腾讯云计算(北京)有限责任公司 Method and device for processing point of interest data, electronic equipment and storage medium
CN111915090A (en) * 2020-08-10 2020-11-10 哈尔滨安天科技集团股份有限公司 Prediction method and device based on knowledge graph, electronic equipment and storage medium
CN112418696A (en) * 2020-11-27 2021-02-26 北京工业大学 Method and device for constructing urban traffic dynamic knowledge map
CN112686428A (en) * 2020-12-15 2021-04-20 广州新科佳都科技有限公司 Subway passenger flow prediction method and device based on subway network station similarity

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIE ZENG等: "Combining knowledge graph into metro passenger flow prediction: A split-attention relational graph convolutional network", 《EXPERT SYSTEMS WITH APPLICATIONS》, vol. 213, pages 1 - 18 *
YONG HAN等: "Predicting Station-Level Short-Term Passenger Flow in a Citywide Metro Network Using Spatiotemporal Graph Convolutional Neural Networks", 《ISPRS INTERNATIONAL JOURNAL OF GEO-INFORMATION》, pages 1 - 25 *
陈镇元: "基于图卷积神经网络的地铁客流预测方法", 《科学技术创新》, no. 3, pages 88 - 89 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657934A (en) * 2021-08-16 2021-11-16 京东城市(北京)数字科技有限公司 Passenger flow prediction model training method and passenger flow prediction method and device
CN113886181A (en) * 2021-09-30 2022-01-04 中南大学 Dynamic threshold prediction method, device and medium applied to AIOps fault early warning
CN115018215A (en) * 2022-08-09 2022-09-06 北京融信数联科技有限公司 Population residence prediction method, system and medium based on multi-modal cognitive map
CN115018215B (en) * 2022-08-09 2022-11-25 北京融信数联科技有限公司 Population residence prediction method, system and medium based on multi-modal cognitive atlas
CN116343486A (en) * 2023-05-19 2023-06-27 中南大学 Expressway network group mobility identification method based on abnormal field
CN116343486B (en) * 2023-05-19 2023-07-25 中南大学 Expressway network group mobility identification method based on abnormal field
CN117273287B (en) * 2023-11-23 2024-03-08 山东科技大学 Tensor-matrix coupling-based subway passenger flow prediction method

Also Published As

Publication number Publication date
CN113239198B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
CN113239198B (en) Subway passenger flow prediction method and device and computer storage medium
CN109872535B (en) Intelligent traffic passage prediction method, device and server
US10636293B2 (en) Uncertainty modeling in traffic demand prediction
Wang et al. Spatio-temporal modeling of criminal incidents using geographic, demographic, and Twitter-derived information
CN110414732B (en) Travel future trajectory prediction method and device, storage medium and electronic equipment
Jiang et al. Deep ROI-based modeling for urban human mobility prediction
Carreno et al. A cellular automaton approach to spatial electric load forecasting
Dias et al. Predicting occupancy trends in Barcelona's bicycle service stations using open data
CN102298608A (en) Information processing apparatus, information processing method and program
He et al. Evaluation of city-scale built environment policies in New York City with an emerging-mobility-accessible synthetic population
Kim et al. An evacuation route choice model based on multi-agent simulation in order to prepare Tsunami disasters
Zhang et al. An optimization model for guiding pedestrian–vehicle mixed flows during an emergency evacuation
Yedavalli et al. Microsimulation analysis for network traffic assignment (MANTA) at metropolitan-scale for agile transportation planning
Lai et al. Understanding drivers' route choice behaviours in the urban network with machine learning models
Inakawa et al. Effect of ambulance station locations and number of ambulances to the quality of the emergency service
Huang et al. Hierarchical destination prediction based on GPS history
CN112529294A (en) Training method, medium and equipment for individual random trip destination prediction model
Li et al. Hexagon raster‐based method for distribution network planning considering line routes and pole locations
Hossein Rashidi et al. A clustering algorithm for bi‐criteria stop location design with elastic demand
CN114638434A (en) Variable bus area station optimization method, device and computer storage medium
Sudo et al. Human mobility estimation following massive disaster using filtering approach
Daneshvar et al. Designing a hybrid intelligent transportation system for optimization of goods distribution network routing problem
Olczyk et al. Finding routes in a public transport network. A case study
Zhao et al. Practical model with strong interpretability and predictability: An explanatory model for individuals' destination prediction considering personal and crowd travel behavior
Pozdnukov et al. Demand Forecasting and Activity-based Mobility Modelling from Cell Phone Data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant