Passenger flow prediction method, device, equipment, medium and product
By enhancing the passenger flow prediction model combined with graph convolution network and hypergraph convolution network, the existing passenger flow prediction problem is solved, and the high-order relationship mining of the site and passenger flow and the extraction of space-time features are realized, which improves the accuracy of passenger flow data prediction.
Patent Information
- Application Number
- CN202510568494.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-12
AI Technical Summary
The existing passenger flow prediction methods have the problem of insufficient accuracy.
The hybrid model of enhanced graph convolution network and hypergraph convolution network is adopted, combining the temporal feature extraction module and the full connection layer. By obtaining historical passenger flow data, topological maps and hypergraphs between stations and stations, the spatial characteristics of the site and passenger flow are extracted and spatial and temporal feature prediction is carried out.
It improves the accuracy of passenger flow data prediction, can effectively mine high-order relationships between sites, and improves the accuracy of spatial characteristics.
Smart Images

Figure CN120471218A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data technology, and in particular to a passenger flow prediction method, device, equipment, medium and product. Background Art
[0002] Urban rail transit, with its advantages of speed, safety, and convenience, plays a vital role in urban public transportation. Accurate passenger flow forecasting models can help managers effectively manage urban rail transit, alleviate passenger congestion, and avoid accidents.
[0003] Domestic and foreign scholars and experts have conducted extensive research on rail transit modeling and passenger flow forecasting. Existing passenger flow forecasting methods can be roughly divided into statistical learning methods, machine learning methods, traditional deep learning methods and graph neural network methods.
[0004] In the process of implementing the present disclosure, it was found that there are at least the following technical problems in the prior art: the existing passenger flow prediction method has the problem of inaccurate passenger flow prediction. Summary of the Invention
[0005] The present disclosure provides a passenger flow prediction method, apparatus, device, medium and product to improve the accuracy of passenger flow prediction.
[0006] According to one aspect of the present disclosure, a passenger flow prediction method is provided, comprising:
[0007] Obtain historical passenger flow data, topological maps between stations, and hypergraphs between stations;
[0008] Inputting the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain spatial features between a first station and passenger flow; inputting the historical passenger flow data and the hypergraph between the stations into a hypergraph convolutional network to obtain spatial features between a second station and passenger flow; and determining spatial features between a third station and passenger flow based on the spatial features between the first station and passenger flow and the spatial features between the second station and passenger flow;
[0009] Inputting the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow;
[0010] The spatiotemporal features of the site and passenger flow are input into the fully connected layer to obtain predicted passenger flow data.
[0011] According to another aspect of the present disclosure, a passenger flow prediction device is provided, comprising:
[0012] Traffic data acquisition module, used to obtain historical passenger flow data, topological maps between stations and hypergraphs between stations;
[0013] A spatial feature extraction module for stations and passenger flows, configured to input the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain spatial features of a first station and passenger flow; input the historical passenger flow data and the hypergraph between the stations into a hypergraph convolutional network to obtain spatial features of a second station and passenger flow; and determine spatial features of a third station and passenger flow based on the spatial features of the first station and passenger flow and the spatial features of the second station and passenger flow;
[0014] A temporal feature extraction module for stations and passenger flows, configured to input the spatial features of the third station and passenger flows into the temporal feature extraction module to obtain temporal and spatial features of the station and passenger flows;
[0015] The passenger flow data prediction module is used to input the spatiotemporal features of the site and passenger flow into the fully connected layer to obtain predicted passenger flow data.
[0016] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0017] at least one processor;
[0018] and a memory communicatively coupled to the at least one processor;
[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the passenger flow prediction method described in any embodiment of the present disclosure.
[0020] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the passenger flow prediction method described in any embodiment of the present disclosure when executed.
[0021] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the passenger flow prediction method as described in any one of the embodiments of the present disclosure.
[0022] The technical solution of the embodiment of the present disclosure obtains historical passenger flow data, a topological map between stations, and a hypergraph between stations; inputs the historical passenger flow data and the topological map between stations into an enhanced graph convolutional network to obtain the spatial features of the first station and passenger flow; inputs the historical passenger flow data and the hypergraph between stations into a hypergraph convolutional network to obtain the spatial features of the second station and passenger flow; determines the spatial features of the third station and passenger flow based on the spatial features of the first station and passenger flow and the spatial features of the second station and passenger flow; inputs the spatial features of the third station and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the station and passenger flow; and inputs the spatiotemporal features of the station and passenger flow into a fully connected layer to obtain predicted passenger flow data. In the above technical solution, by extracting the spatial features of stations and passenger flows through a hybrid of an enhanced graph convolutional network and a hypergraph convolutional network, the performance and effect of graph data processing can be improved, and high-order relationships between stations can be effectively mined, thereby improving the accuracy of the extracted spatial features of stations and passenger flows and thus improving the accuracy of passenger flow data prediction.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] Figure 1 is a flow chart of a passenger flow prediction method provided according to an embodiment of the present disclosure;
[0026] Figure 2 is a flowchart of another passenger flow prediction method provided according to an embodiment of the present disclosure;
[0027] Figure 3 is a flowchart of another passenger flow prediction method provided according to an embodiment of the present disclosure;
[0028] Figure 4 is a flowchart of another passenger flow prediction method provided according to an embodiment of the present disclosure;
[0029] Figure 5 is a schematic diagram of a passenger flow prediction model training provided according to an embodiment of the present disclosure;
[0030] Figure 6 is a structural diagram of a passenger flow prediction device provided according to an embodiment of the present disclosure;
[0031] Figure 7 It is a structural diagram of an electronic device for implementing the passenger flow prediction method of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of the present disclosure comply with the relevant provisions of national laws and regulations.
[0034] Figure 1 This is a flow chart of a passenger flow prediction method provided by an embodiment of the present disclosure. This embodiment is applicable to the case of predicting passenger flow in urban rail transit such as subways. The method can be executed by a passenger flow prediction device, which can be implemented in the form of hardware and / or software and can be configured in a terminal or electronic device. Figure 1 As shown, the method includes:
[0035] S110: Obtain historical passenger flow data, a topological map between stations, and a hypermap between stations.
[0036] The historical passenger flow data refers to the passenger flow data of rail transit collected in historical time, which may include but is not limited to entry or exit status, collection time, subway line and subway station information.
[0037] Specifically, historical passenger flow data can be divided into three categories based on its temporal attributes: adjacent passenger flow data, daily passenger flow data, and weekly passenger flow data. Adjacent passenger flow data can be passenger flow data from the period immediately preceding the forecast period, daily passenger flow data can be passenger flow data from the same time period a few days prior, and weekly passenger flow data can be passenger flow data from the same time period a few weeks prior. These historical passenger flow data can reflect trends and patterns in passenger flow changes. Therefore, historical passenger flow data can include adjacent passenger flow data, daily passenger flow data, and weekly passenger flow data.
[0038] For example, the matrix representation of historical passenger flow data can be:
[0039]
[0040] Where N represents the number of urban rail transit stations, T represents the length of the time period, and p represents the time mode, which includes weekly, daily, and recent. m represents the length of the time step used for prediction, and n represents the nth station. represents the passenger flow at the kth time step of the jth station under the p-time pattern.
[0041] The topological graph between stations can be expressed as G G =(V G ,E G ), where V G ={v1,v2,…,v n} represents the set of stations, n represents the total number of stations, E G ={e1,e2,…,e p} represents the set of physical connection relationships between stations, and p represents the number of edges. The hypergraph between stations can be represented as G H =(V H ,E H ), where V H ={v1,v2,…,v n} represents the set of station sites, E H ={e1,e2,…,e q} represents the set of high-order relationships between stations, and q represents the number of hyperedges.
[0042] S120. Input the historical passenger flow data and the topological graph between the station sites into the enhanced graph convolutional network to obtain the spatial characteristics of the first site and the passenger flow; input the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial characteristics of the second site and the passenger flow; determine the spatial characteristics of the third site and the passenger flow based on the spatial characteristics of the first site and the passenger flow and the spatial characteristics of the second site and the passenger flow.
[0043] Among them, Enhanced Graph Convolutional Networks (EGCN) are an improved graph convolutional neural network designed to improve the performance and effectiveness of graph data processing. Hypergraph Convolution Networks (HGCN) use hyperbolic geometric space to embed graph nodes, which can more naturally represent hierarchical or scale-free graph structures to describe complex high-order relationships between sites.
[0044] It should be noted that the embodiment of the present disclosure captures the spatial characteristics of sites and passenger flows by hybrid enhanced graph convolutional networks and hypergraph convolutional networks, which can improve the performance and effect of graph data processing and enhance the ability to obtain high-order information between sites.
[0045] S130: Input the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow.
[0046] The temporal feature extraction module may be a Transformer or a variant of a Transformer, which is not specifically limited here.
[0047] Exemplarily, the spatial features of the third site and passenger flow are input into the Transformer, and the Transformer extracts the temporal features of the spatial features of the third site and passenger flow, thereby obtaining the temporal-spatial features of the site and passenger flow, that is, the spatiotemporal features of the site and passenger flow.
[0048] S140: Input the spatiotemporal features of the site and passenger flow into a fully connected layer to obtain predicted passenger flow data.
[0049] The predicted passenger flow data refers to the predicted passenger flow in the future time period.
[0050] The technical solution of the embodiment of the present disclosure obtains historical passenger flow data, a topological map between stations, and a hypergraph between stations; inputs the historical passenger flow data and the topological map between stations into an enhanced graph convolutional network to obtain the spatial features of the first station and passenger flow; inputs the historical passenger flow data and the hypergraph between stations into a hypergraph convolutional network to obtain the spatial features of the second station and passenger flow; determines the spatial features of the third station and passenger flow based on the spatial features of the first station and passenger flow and the spatial features of the second station and passenger flow; inputs the spatial features of the third station and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the station and passenger flow; and inputs the spatiotemporal features of the station and passenger flow into a fully connected layer to obtain predicted passenger flow data. In the above technical solution, by extracting the spatial features of stations and passenger flows through a hybrid of an enhanced graph convolutional network and a hypergraph convolutional network, the performance and effect of graph data processing can be improved, and high-order relationships between stations can be effectively mined, thereby improving the accuracy of the extracted spatial features of stations and passenger flows and thus improving the accuracy of passenger flow data prediction.
[0051] Figure 2 This is a flowchart of another passenger flow prediction method provided by an embodiment of the present disclosure. The method of this embodiment can be combined with the various optional solutions of the passenger flow prediction method provided in the above embodiments. Based on the above embodiments, this embodiment further refines the processing process of the enhanced graph convolutional network.
[0052] like Figure 2 As shown, the method includes:
[0053] S210: Obtain historical passenger flow data, a topological map between stations, and a hypermap between stations.
[0054] S220. Input the historical passenger flow data and the topological map between the station sites into the enhanced graph convolutional network, and the enhanced graph convolutional network determines the Laplace matrix based on the topological map between the station sites; the enhanced graph convolutional network determines the enhanced Laplace matrix based on the Laplace matrix and the enhanced matrix; the enhanced graph convolutional network predicts the spatial characteristics of the first site and the passenger flow based on the enhanced Laplace matrix and the historical passenger flow data.
[0055] Among them, the graph convolution calculation formula of the enhanced graph convolutional network can be:
[0056]
[0057] in, A represents the topological graph between stations, and I represents the identity matrix; express Normalized node degree matrix of Λ∈R n×nRepresents an enhancement matrix, which is a diagonal matrix. For example, Λ=α×I, where α represents an enhancement coefficient that can be learned through training, and I represents an identity matrix. (l) represents the feature vector of the lth layer, H (0) represents historical passenger flow data, W (l) represents the weight of the lth layer, σ represents the nonlinear activation function, represents the Laplace matrix, represents the augmented Laplacian matrix.
[0058] Based on the above embodiments, optionally, determining the spatial characteristics of the third site and passenger flow based on the spatial characteristics of the first site and passenger flow and the spatial characteristics of the second site and passenger flow includes: weighted fusion of the spatial characteristics of the first site and passenger flow and the spatial characteristics of the second site and passenger flow to obtain the spatial characteristics of the third site and passenger flow.
[0059] For example, the weighted fusion formula for determining the spatial characteristics of the third site and the passenger flow may be:
[0060] Z=αZ H +(1-α)Z G ;
[0061] Among them, Z G represents the spatial characteristics of the first station and passenger flow, Z H The spatial characteristics of the second site and passenger flow, Z represents the spatial characteristics of the third site and passenger flow, α represents the weight parameter, and the weight parameter can be obtained through training and learning.
[0062] S230. Input the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial characteristics of the second site and the passenger flow; determine the spatial characteristics of the third site and the passenger flow based on the spatial characteristics of the first site and the passenger flow and the spatial characteristics of the second site and the passenger flow.
[0063] S240: Input the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow.
[0064] S250: Input the spatiotemporal features of the site and passenger flow into a fully connected layer to obtain predicted passenger flow data.
[0065] The technical solution of the embodiment of the present disclosure is to enhance the graph convolutional network to determine the Laplace matrix based on the topological graph between station sites, and then enhance the graph convolutional network to determine the enhanced Laplace matrix based on the Laplace matrix and the enhanced matrix, and then enhance the graph convolutional network to obtain the spatial characteristics of the first site and passenger flow based on the enhanced Laplace matrix and historical passenger flow data prediction, thereby realizing the effective mining and extraction of the spatial characteristics of sites and passenger flows.
[0066] Figure 3 This is a flow chart of another passenger flow prediction method provided by an embodiment of the present disclosure. The method of this embodiment can be combined with the various optional solutions in the passenger flow prediction method provided in the above embodiments. Based on the above embodiments, this embodiment further refines the time feature extraction module.
[0067] like Figure 3 As shown, the method includes:
[0068] S310: Obtain historical passenger flow data, a topological map between stations, and a hypermap between stations.
[0069] S320. Input the historical passenger flow data and the topological graph between the station sites into the enhanced graph convolutional network to obtain the spatial characteristics of the first site and the passenger flow; input the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial characteristics of the second site and the passenger flow; determine the spatial characteristics of the third site and the passenger flow based on the spatial characteristics of the first site and the passenger flow and the spatial characteristics of the second site and the passenger flow.
[0070] S330. Input the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow. The temporal feature extraction module is a Transformer model based on the Hawkes process.
[0071] Among them, the Hawkes Process is a mathematical model used to model self-excited processes. Its core feature is that the occurrence of each event will increase the probability of subsequent events through the triggering effect of time decay.
[0072] Specifically, the Transformer model based on the Hawkes process can be a Transformer HawkesProcess (THP) model. THP is a model that combines the Hawkes process and the Transformer. It aims to use the self-attention mechanism in the Transformer to improve the modeling ability of event dependencies in event sequences, so as to enhance the recognition ability of the temporal feature extraction module for temporal features.
[0073] S340: Input the spatiotemporal features of the site and passenger flow into a fully connected layer to obtain predicted passenger flow data.
[0074] The technical solution of the embodiment of the present disclosure improves the ability to recognize time features through a Transformer model based on the Hawkes process.
[0075] Figure 4This is a flow chart of another passenger flow prediction method provided by an embodiment of the present disclosure. The method of this embodiment can be combined with the various optional solutions of the passenger flow prediction method provided in the above embodiments. Based on the above embodiments, this embodiment adds a Fourier transform step.
[0076] like Figure 4 As shown, the method includes:
[0077] S410: Obtain historical passenger flow data, a topological map between stations, and a hypermap between stations.
[0078] S420. Input the historical passenger flow data and the topological graph between the station sites into the enhanced graph convolutional network to obtain the spatial characteristics of the first site and the passenger flow; input the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial characteristics of the second site and the passenger flow; determine the spatial characteristics of the third site and the passenger flow based on the spatial characteristics of the first site and the passenger flow and the spatial characteristics of the second site and the passenger flow.
[0079] S430: Perform Fourier transform on the spatial features of the third site and the passenger flow to obtain refined spatial features of the site and the passenger flow.
[0080] S440: Input the spatially refined features of the site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow.
[0081] S450: Input the spatiotemporal features of the site and passenger flow into a fully connected layer to obtain predicted passenger flow data.
[0082] In the embodiment of the present disclosure, by introducing Fourier transform, the spatial features of the station and passenger flow can be decomposed and reorganized to reduce noise interference and enhance the time features so that the subsequent time feature extraction module can perform time feature recognition and extraction.
[0083] For example, the Fourier transform formula may be:
[0084]
[0085] Among them, Z represents the spatial characteristics of the third station and passenger flow, and Dec() is used to convert Z into frequency domain characteristics. Fourier Represents the weight matrix, which is used to adjust the importance of features and filter out unnecessary features. ⊙ represents the Hadamard product, and Fus() is used to convert features back to the time domain. Represents the spatial refinement characteristics of stations and passenger flows.
[0086] Figure 5 FIG. 1 is a schematic diagram of a passenger flow prediction model training according to an embodiment of the present disclosure. Figure 5As shown in Figure 2, the steps for training the passenger flow prediction model include:
[0087] S1: Obtain historical passenger flow data, topological graphs between stations, and hypergraphs between stations.
[0088] Specifically, missing values, outliers, and duplicate values in the raw data are cleaned to ensure the completeness and accuracy of the passenger flow data. The data is then aggregated at different time intervals (such as 5, 10, or 15 minutes) to generate historical passenger flow data. The raw data can be subway card swipe data. Based on the historical passenger flow data and the adjacency matrix, a topological graph and a hypergraph between station sites are constructed.
[0089] Among them, the topological graph between stations can be expressed as G G =(V G ,E G ), where V G ={v1,v2,…,v n} represents the set of stations, n represents the total number of stations, E G ={e1,e2,…,e p} represents the set of physical connection relationships between stations, p represents the number of edges, and the adjacency matrix can be defined as:
[0090]
[0091] The hypergraph between stations can be represented as G H =(V H ,E H ), where V H ={v1,v2,…,v n} represents the set of station sites, E H ={e1,e2,…,e q} represents the set of high-order relationships between stations, q represents the number of hyperedges, and the incidence matrix can be defined as:
[0092]
[0093] Furthermore, the historical passenger flow data is aggregated into in, Represents the adjacent passenger flow data, represents daily passenger flow data, Represents weekly passenger flow data.
[0094] S2: Input historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain the spatial features of the first station and passenger flow; input historical passenger flow data and the hypergraph between the stations into a hypergraph convolutional network to obtain the spatial features of the second station and passenger flow; weightedly fuse the spatial features of the first station and passenger flow with the spatial features of the second station and passenger flow to obtain the spatial features of the third station and passenger flow. Input the spatial features of the third station and passenger flow into the flattening layer to obtain the flattened spatial features of the station and passenger flow. Input the flattened spatial features of the station and passenger flow into the fully connected layer to obtain the target spatial features of the station and passenger flow.
[0095] S3: Input the target spatial features of the site and passenger flow into the Fourier Transform layer to obtain the spatially refined features of the site and passenger flow, and input the spatially refined features of the site and passenger flow into the flattening layer to obtain the flattened spatially refined features of the site and passenger flow to enhance the temporal features.
[0096] Among them, the formula of Fourier transform can be:
[0097]
[0098] Among them, Z represents the spatial characteristics of the third station and passenger flow, and Dec() is used to convert Z into frequency domain characteristics. Fourier Represents the weight matrix, which is used to adjust the importance of features and filter out unnecessary features. ⊙ represents the Hadamard product, and Fus() is used to convert features back to the time domain. Represents the spatial refinement characteristics of stations and passenger flows.
[0099] S4: The flattened spatially refined features of the stations and passenger flows are fed into the Hawkes Attention unit to obtain their spatiotemporal features. These are then fed into the convolutional layer to obtain the convolved spatiotemporal features. Weighted feature fusion is then performed on these convolved spatiotemporal features to obtain weighted feature-fused spatiotemporal features. The weighted feature-fused spatiotemporal features are then fed into the fully connected layer to obtain predicted passenger flow data.
[0100] The Hawkes Attention unit uses the core component of the Transformer: the multi-head attention mechanism. The multi-head attention mechanism provides parallel processing, accelerates model training, and overcomes the limitations of the Fourier transform in extracting temporal features. The specific formula is:
[0101]
[0102] in, for Positional encoding, Qe represents the query matrix of the e-th attention mechanism, K e represents the bond matrix, V e Represents the value matrix, W Att Represents the weight matrix used to transform the output of multi-head attention.
[0103] Furthermore, the output of Hawkes Attention is processed through a convolutional layer, and weighted feature fusion is performed on the outputs of the three branches of neighboring passenger flow data, daily passenger flow data, and weekly passenger flow data to obtain the spatiotemporal features of weighted feature fusion. The specific formula is as follows:
[0104]
[0105] Among them, Y ′ w 、Y ′ r and Y ′ d Represent the spatiotemporal features corresponding to neighboring passenger flow data, daily passenger flow data, and weekly passenger flow data, respectively. w 、W r 、W d Represent the weight matrices corresponding to neighboring passenger flow data, daily passenger flow data, and weekly passenger flow data, respectively. Represents the spatiotemporal features of weighted feature fusion.
[0106] Compared to traditional GCNs, this paper's EGCN improves model adaptability and scalability, while HGCN enables the extraction of high-order relationships between sites. This paper also utilizes Fourier transforms to decompose and reorganize data, mitigating the impact of data noise on passenger flow prediction accuracy. Furthermore, the Hawkes process is incorporated into the attention mechanism to capture the interactive impact between events, helping to reveal their relevance and evolutionary patterns.
[0107] S5: Select mean square error (MSE) as the loss function and update the model parameters according to the calculated loss until the model training stop condition is met to obtain the passenger flow prediction model.
[0108] Among them, the loss function of mean square error (MSE) is as follows:
[0109]
[0110] Among them, Θ represents all learnable parameters of the passenger flow prediction model, N represents the number of stations, and T f Indicates the length of time.
[0111] The passenger flow prediction model uses mean average error (MAE), root mean square error (RMSE), weighted mean absolute percentage error (WMAPE) and accuracy as evaluation indicators:
[0112]
[0113]
[0114] Among them, Y tij represents the real passenger flow data, Represents the predicted passenger flow data, Y and Represents Y tij and The set of ‖·‖ F represents the F-norm.
[0115] Figure 6 This is a schematic diagram of the structure of a passenger flow prediction device provided by an embodiment of the present disclosure. Figure 7 As shown, the device includes:
[0116] Traffic data acquisition module 510, for acquiring historical passenger flow data, topological graphs between stations, and hypergraphs between stations;
[0117] The spatial feature extraction module 520 for stations and passenger flows is configured to input the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain spatial features between a first station and passenger flow; input the historical passenger flow data and the hypergraph between the stations into a hypergraph convolutional network to obtain spatial features between a second station and passenger flow; and determine spatial features between a third station and passenger flow based on the spatial features between the first station and passenger flow and the spatial features between the second station and passenger flow.
[0118] A temporal feature extraction module 530 for stations and passenger flows, configured to input the spatial features of the third station and passenger flows into the temporal feature extraction module to obtain temporal and spatial features of the station and passenger flows;
[0119] The passenger flow data prediction module 540 is used to input the spatiotemporal features of the site and passenger flow into the fully connected layer to obtain predicted passenger flow data.
[0120] The technical solution of the embodiment of the present disclosure obtains historical passenger flow data, a topological map between stations, and a hypergraph between stations; inputs the historical passenger flow data and the topological map between stations into an enhanced graph convolutional network to obtain the spatial features of the first station and passenger flow; inputs the historical passenger flow data and the hypergraph between stations into a hypergraph convolutional network to obtain the spatial features of the second station and passenger flow; determines the spatial features of the third station and passenger flow based on the spatial features of the first station and passenger flow and the spatial features of the second station and passenger flow; inputs the spatial features of the third station and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the station and passenger flow; and inputs the spatiotemporal features of the station and passenger flow into a fully connected layer to obtain predicted passenger flow data. In the above technical solution, by extracting the spatial features of stations and passenger flows through a hybrid of an enhanced graph convolutional network and a hypergraph convolutional network, the performance and effect of graph data processing can be improved, and high-order relationships between stations can be effectively mined, thereby improving the accuracy of the extracted spatial features of stations and passenger flows and thus improving the accuracy of passenger flow data prediction.
[0121] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the station and passenger flow spatial feature extraction module 520 includes:
[0122] An enhanced graph convolution unit is used to input the historical passenger flow data and the topological map between the station sites into the enhanced graph convolution network, the enhanced graph convolution network determines the Laplace matrix based on the topological map between the station sites; the enhanced graph convolution network determines the enhanced Laplace matrix based on the Laplace matrix and the enhanced matrix; the enhanced graph convolution network predicts the spatial characteristics of the first site and the passenger flow based on the enhanced Laplace matrix and the historical passenger flow data.
[0123] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the graph convolution calculation formula of the enhanced graph convolution network is:
[0124]
[0125] in, A represents the topological graph between stations, and I represents the identity matrix; express Normalized node degree matrix of Λ∈R n×n represents an enhancement matrix, which is a diagonal matrix; H (l) represents the feature vector of the lth layer, H (0) represents historical passenger flow data, W (l) represents the weight of the lth layer, and σ represents the nonlinear activation function.
[0126] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the station and passenger flow spatial feature extraction module 520 includes:
[0127] The weighted fusion unit is used to perform weighted fusion on the spatial features of the first site and the passenger flow and the spatial features of the second site and the passenger flow to obtain the spatial features of the third site and the passenger flow.
[0128] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the time feature extraction module is a Transformer model based on the Hawkes process.
[0129] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the passenger flow prediction device further includes:
[0130] A Fourier transform module, configured to perform Fourier transform on the spatial features of the third site and the passenger flow to obtain detailed spatial features of the site and the passenger flow;
[0131] Accordingly, the station and passenger flow time feature extraction module 530 is further used to:
[0132] The spatially refined features of the site and passenger flow are input into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow.
[0133] The passenger flow prediction device provided in the embodiments of the present disclosure can execute the passenger flow prediction method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0134] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0135] like Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An I / O interface 15 is also connected to the bus 14.
[0136] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0137] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the passenger flow prediction method, which includes:
[0138] Obtain historical passenger flow data, topological maps between stations, and hypergraphs between stations;
[0139] Inputting the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain spatial features between a first station and passenger flow; inputting the historical passenger flow data and the hypergraph between the stations into a hypergraph convolutional network to obtain spatial features between a second station and passenger flow; and determining spatial features between a third station and passenger flow based on the spatial features between the first station and passenger flow and the spatial features between the second station and passenger flow;
[0140] Inputting the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow;
[0141] The spatiotemporal features of the site and passenger flow are input into the fully connected layer to obtain predicted passenger flow data.
[0142] In some embodiments, the passenger flow prediction method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the passenger flow prediction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the passenger flow prediction method in any other suitable manner (e.g., via firmware).
[0143] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] Computer programs for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0145] In the context of the present disclosure, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0146] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0147] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0148] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0149] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of this disclosure can be achieved, and this document is not limited here.
[0150] An embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the passenger flow prediction method provided in any embodiment of the present disclosure.
[0151] The computer program product, during implementation, may be written in one or more programming languages, or a combination thereof, for performing the operations of the present disclosure and may include computer program code written in object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0152] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.
[0153] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A passenger flow prediction method, characterized in that: include: Obtain historical passenger flow data, topological maps between stations, and hypergraphs between stations; Inputting the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain the spatial features of the first station and the passenger flow; Inputting the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial features of the second site and the passenger flow; Determining a spatial feature between a third site and passenger flow based on the spatial feature between the first site and passenger flow and the spatial feature between the second site and passenger flow; Inputting the spatial features of the third site and passenger flow into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow; The spatiotemporal features of the site and passenger flow are input into the fully connected layer to obtain predicted passenger flow data.
2. The method according to claim 1, characterized in that Inputting the historical passenger flow data and the topological graph between the stations into the enhanced graph convolutional network to obtain the spatial features of the first station and the passenger flow includes: Input the historical passenger flow data and the topological graph between the stations into the enhanced graph convolutional network, The enhanced graph convolutional network determines a Laplacian matrix based on a topological graph between the station sites; The enhanced graph convolutional network determines an enhanced Laplacian matrix based on the Laplacian matrix and the enhanced matrix; The enhanced graph convolutional network predicts the spatial characteristics of the first site and the passenger flow based on the enhanced Laplacian matrix and the historical passenger flow data.
3. The method according to claim 2, characterized in that The graph convolution calculation formula of the enhanced graph convolutional network is: in, A represents the topological graph between stations, and I represents the identity matrix; express Normalized node degree matrix of Λ∈R n×n represents an enhancement matrix, which is a diagonal matrix; H (l) represents the feature vector of the lth layer, H (0) represents historical passenger flow data, W (l) represents the weight of the lth layer, and σ represents the nonlinear activation function.
4. The method according to claim 1, wherein The determining the spatial characteristics of the third site and the passenger flow based on the spatial characteristics of the first site and the passenger flow and the spatial characteristics of the second site and the passenger flow includes: The spatial characteristics of the first site and passenger flow and the spatial characteristics of the second site and passenger flow are weightedly fused to obtain the spatial characteristics of the third site and passenger flow.
5. The method according to claim 1, wherein The temporal feature extraction module is a Transformer model based on the Hawkes process.
6. The method according to any one of claims 1 to 5, characterized in that: Before inputting the spatial features of the third site and the passenger flow into the temporal feature extraction module to obtain the spatiotemporal features of the site and the passenger flow, the method further includes: Performing Fourier transform on the spatial features of the third site and the passenger flow to obtain detailed spatial features of the site and the passenger flow; Accordingly, the spatial features of the third site and passenger flow are input into the temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow, including: The spatially refined features of the site and passenger flow are input into a temporal feature extraction module to obtain the spatiotemporal features of the site and passenger flow.
7. A passenger flow prediction device, characterized in that: include: Traffic data acquisition module, used to obtain historical passenger flow data, topological maps between stations and hypergraphs between stations; A spatial feature extraction module for stations and passenger flows, configured to input the historical passenger flow data and the topological graph between the stations into an enhanced graph convolutional network to obtain spatial features of the first station and passenger flows; Inputting the historical passenger flow data and the hypergraph between the station sites into the hypergraph convolutional network to obtain the spatial features of the second site and the passenger flow; Determining a spatial feature between a third site and passenger flow based on the spatial feature between the first site and passenger flow and the spatial feature between the second site and passenger flow; A temporal feature extraction module for sites and passenger flows, configured to input the spatial features of the third site and passenger flows into the temporal feature extraction module to obtain temporal and spatial features of the site and passenger flows; The passenger flow data prediction module is used to input the spatiotemporal features of the site and passenger flow into the fully connected layer to obtain predicted passenger flow data.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the passenger flow prediction method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the passenger flow prediction method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the passenger flow prediction method according to any one of claims 1 to 6.