Subway passenger travel behavior prediction method and system based on bipartite dynamic graph
By constructing a bipartite dynamic graph and using deep neural network analysis, the problems of data dynamism and group similarity in passenger travel behavior prediction were solved, achieving efficient and accurate passenger travel behavior prediction.
Patent Information
- Application Number
- CN202511160342.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-12-16
Smart Images

Figure CN121146151A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of transportation and data mining technology, and in particular to a method and system for predicting subway passenger travel behavior based on a bipartite dynamic graph. Background Technology
[0002] With the acceleration of urbanization, subways have become an important part of urban infrastructure, providing people with an efficient and convenient mode of transportation for daily travel. Subway systems carry massive amounts of passenger travel data every day, which exhibits continuous growth and dynamic changes, including both long-term periodic patterns and short-term sudden occurrences. Furthermore, passengers and stations share certain group similarities, making it difficult for traditional passenger travel behavior prediction methods to fully exploit the complex relationships within the data, thus limiting prediction accuracy.
[0003] Existing methods for predicting passenger travel behavior often struggle to effectively capture the dynamic growth, multi-timescale patterns (i.e., passenger travel includes both long-term periodicity and short-term suddenness), and group similarities in subway travel data. This is especially true when dealing with large-scale data, where computational efficiency is low, impacting prediction accuracy. Therefore, a breakthrough solution is urgently needed. Summary of the Invention
[0004] The purpose of this application is to provide a method and system for predicting subway passenger travel behavior based on a bipartite dynamic graph, which can efficiently and accurately predict the travel behavior of subway passengers.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] Firstly, this application provides a method for predicting subway passenger travel behavior based on a bipartite dynamic graph, including:
[0007] Based on the acquired historical passenger travel data, a bipartite dynamic graph is constructed; the bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes; the passenger nodes include the target passenger node and other passenger nodes.
[0008] Based on the aforementioned bipartite dynamic graph, a historical neighbor sequence is constructed;
[0009] The historical neighbor sequence is input into the first deep neural network layer for preliminary feature analysis to obtain preliminary node representations;
[0010] The preliminary node representation is input into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation.
[0011] The comprehensive spatiotemporal representation is input into the link prediction layer for fusion to obtain the probability that the target passenger will link with all stations, and the travel behavior of the target passenger is predicted based on the probability.
[0012] Optionally, the bipartite dynamic graph also includes the passenger ID corresponding to the passenger node and the station ID corresponding to the station node; the bipartite dynamic graph is constructed based on the acquired historical passenger travel data, specifically including:
[0013] Passengers and stations in the historical travel data are used as passenger nodes and station nodes respectively, and the passenger nodes and station nodes are uniformly ID-coded to obtain passenger number and station number respectively;
[0014] The timestamps in the passenger's historical travel data are standardized to obtain the time difference; the standardization process is to rearrange all timestamps in chronological order and then subtract the smallest timestamp from each rearranged timestamp.
[0015] Add an extra feature to the boarding and alighting records in the passenger's historical travel data to obtain the boarding and alighting features;
[0016] Based on the time difference and the boarding / alighting characteristics, an edge is established between the passenger node and the station node.
[0017] Optionally, the historical neighbor sequence includes a first-order historical neighbor interaction sequence and a second-order historical neighbor interaction sequence; based on the bipartite dynamic graph, the historical neighbor sequence is constructed, specifically including:
[0018] Based on the bipartite dynamic graph, the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes are traversed to obtain the first-order historical neighbor interaction sequence.
[0019] Based on the first-order historical neighbor interaction sequence, the second-order historical neighbor interaction sequence is obtained.
[0020] Optionally, the first-order historical neighbor interaction sequence includes the first-order historical neighbor interaction subsequence of the target passenger node and the first-order historical neighbor interaction subsequence of all station nodes; based on the bipartite dynamic graph, the first-order historical neighbor interaction sequence is obtained by traversing the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes, specifically including:
[0021] Based on the bipartite dynamic graph, the station nodes that have interacted with the target passenger node are traversed to obtain several first-order station nodes. Based on the time difference, the several first-order station nodes are sorted in chronological order to obtain the first-order historical neighbor interaction subsequence of the target passenger node.
[0022] Based on the bipartite dynamic graph, the passenger nodes that have interacted with all station nodes are traversed to obtain several first-order passenger nodes. Based on the time difference, the several first-order passenger nodes are sorted in chronological order to obtain the first-order historical neighbor interaction subsequence of all station nodes.
[0023] Optionally, the second-order historical neighbor interaction sequence includes the second-order historical neighbor interaction sub-sequence of the target passenger node and the second-order historical neighbor interaction sub-sequence of all station nodes; based on the first-order historical neighbor interaction sequence, the second-order historical neighbor interaction sequence is obtained, specifically including:
[0024] Construct a historical neighbor interaction matrix; the elements in the historical neighbor interaction matrix represent the interaction between passenger nodes and station nodes; the interaction is stored as the time difference between the most recent interaction between passenger nodes and station nodes when there is an interaction between passenger nodes and station nodes, and as 0 when there is no interaction between passenger nodes and station nodes.
[0025] Based on the historical neighbor interaction matrix and the first-order historical neighbor interaction subsequence of the target passenger node, find the passenger nodes that have interacted with the first-order station node to obtain several second-order passenger nodes. Based on the time difference, sort the several second-order passenger nodes in chronological order to obtain the second-order historical neighbor interaction subsequence of the target passenger node.
[0026] Based on the historical neighbor interaction matrix and the first-order historical neighbor interaction subsequence of all station nodes, the station nodes that have interacted with the first-order passenger nodes are found to obtain several second-order station nodes. Based on the time difference, the several second-order station nodes are sorted in chronological order to obtain the second-order historical neighbor interaction subsequence of all station nodes.
[0027] Optionally, the preliminary node representation includes passenger node representation, station node representation, edge representation, and co-occurrence representation.
[0028] Optionally, the integrated spatiotemporal representation includes integrated passenger representation and integrated station representation; the integrated spatiotemporal representation is input into the link prediction layer for fusion to obtain the probability of a target passenger linking with the corresponding station, specifically including:
[0029] The comprehensive passenger representation and comprehensive station representation are input into the link prediction layer for fusion to obtain the probability that the target passenger will link with all stations.
[0030] Optionally, the first deep neural network layer is a hybrid feature encoder based on the fusion of a fully connected layer and a Transformer encoder; the second deep neural network layer is a temporal feature extraction module of a multilayer perceptron, a long short-term memory network, or a Transformer encoder; and the link prediction layer is a network based on a multilayer perceptron.
[0031] Secondly, this application provides a subway passenger travel behavior prediction system based on a bipartite dynamic graph, including:
[0032] The bipartite graph generation module is used to construct a bipartite dynamic graph based on the acquired historical passenger travel data. The bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes. The passenger nodes include the target passenger node and other passenger nodes.
[0033] The historical neighbor sequence extraction module is used to construct a historical neighbor sequence based on the binary dynamic graph.
[0034] The preliminary characterization generation module is used to input the historical neighbor sequence into the first deep neural network layer for preliminary feature analysis to obtain preliminary node characterization.
[0035] The spatiotemporal representation generation module is used to input the preliminary node representation into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation.
[0036] The link prediction module is used to input the comprehensive spatiotemporal representation into the link prediction layer for fusion, obtain the probability that the target passenger will link with all stations, and predict the travel behavior of the target passenger based on the probability.
[0037] Optionally, the historical neighbor sequence extraction module includes a first-order neighbor extraction module and a second-order neighbor extraction module;
[0038] The first-order neighbor extraction module is used to traverse the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes based on the bipartite dynamic graph to obtain the first-order historical neighbor interaction sequence.
[0039] The second-order neighbor extraction module is used to obtain a second-order historical neighbor interaction sequence based on the first-order historical neighbor interaction sequence.
[0040] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for predicting subway passenger travel behavior based on a bipartite dynamic graph.
[0041] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for predicting subway passenger travel behavior based on a bipartite dynamic graph.
[0042] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for predicting subway passenger travel behavior based on a bipartite dynamic graph.
[0043] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0044] This application provides a method and system for predicting subway passenger travel behavior based on a bipartite dynamic graph. By forming a bipartite dynamic graph from passenger nodes, station nodes, and the boarding and alighting events between them, complex passenger travel data can be effectively transformed into computable graph-structured data. This preserves the spatiotemporal correlation characteristics of passenger travel behavior and provides clear feature representations of group similarity and multi-timescale patterns for subsequent analysis. Furthermore, the construction of the bipartite dynamic graph allows for real-time updates and reflection of the latest changes in travel behavior. Moreover, by constructing historical neighbor sequences, rich and representative input data is provided for deep feature extraction. This allows for the effective capture of feature representations of group similarity and multi-timescale patterns in passenger travel behavior through a first and second deep neural network layer, thereby enabling efficient and accurate prediction of the target passenger's travel behavior. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is an application environment diagram of a subway passenger travel behavior prediction method based on a bipartite dynamic graph in Embodiment 1 of this application;
[0047] Figure 2 This is a flowchart illustrating a method for predicting subway passenger travel behavior based on a bipartite dynamic graph, as provided in Embodiment 2 of this application.
[0048] Figure 3 This is a schematic diagram of the functional modules of a subway passenger travel behavior prediction system based on a bipartite dynamic graph, provided in Embodiment 4 of this application.
[0049] Figure 4This is a schematic diagram of the structure of a computer device provided in Embodiment 5 of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] Traditional passenger travel behavior prediction methods often struggle to efficiently compute high-order neighbor information for nodes when modeling passenger-station interactions, leading to insufficient node representation learning and consequently affecting prediction accuracy. To address this issue, this application proposes a subway passenger travel behavior prediction method and system based on a bipartite dynamic graph. By introducing a fast sampling mechanism for second-order neighbors, the method significantly improves the computational efficiency of node representations and enhances the accuracy of travel behavior prediction from the passenger's perspective. This system can be implemented using dedicated hardware or deployed through software simulation, offering high flexibility and practicality.
[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] Example 1
[0054] The subway passenger travel behavior prediction method based on bipartite dynamic graphs provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on other servers. Terminal 102 can send historical passenger travel data to server 104. Server 104 constructs a bipartite dynamic graph based on the historical passenger travel data; constructs a historical neighbor sequence based on the bipartite dynamic graph; inputs the historical neighbor sequence into a first deep neural network layer for preliminary feature analysis to obtain preliminary node representations; inputs the preliminary node representations into a second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation; inputs the comprehensive spatiotemporal representation into a link prediction layer for fusion to obtain the probability that the target passenger will link with all stations, and predicts the target passenger's travel behavior based on the probability.
[0055] The terminal 102 can be, but is not limited to, various desktop computers, laptops, and IoT devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.
[0056] In one exemplary embodiment, such as Figure 2 As shown, a method for predicting subway passenger travel behavior based on a bipartite dynamic graph is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 205. Wherein:
[0057] Step 201: Construct a bipartite dynamic graph based on the acquired passenger historical travel data; the passenger historical travel data includes the target passenger's historical travel data and other passengers' historical travel data; the passenger historical travel data includes the target passenger and other passengers; the bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes; the passenger nodes include the target passenger node and other passenger nodes.
[0058] Step 202: Construct a historical neighbor sequence based on the bipartite dynamic graph.
[0059] Step 203: Input the historical neighbor sequence into the first deep neural network layer for preliminary feature analysis to obtain preliminary node representations.
[0060] Step 204: Input the preliminary node representation into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation.
[0061] Step 205: Input the comprehensive spatiotemporal representation into the link prediction layer for fusion to obtain the probability that the target passenger will link with all stations, and predict the travel behavior of the target passenger based on the probability.
[0062] By implementing steps 201 to 205 above, and forming a bipartite dynamic graph of passenger nodes, station nodes, and their boarding and alighting events, complex passenger travel data can be effectively transformed into computable graph-structured data. This preserves the spatiotemporal correlation characteristics of passenger travel behavior, providing clear feature representations of group similarity and multi-timescale patterns for subsequent analysis. Furthermore, the construction of the bipartite dynamic graph allows for real-time updates and reflection of the latest changes in travel behavior. Moreover, by constructing historical neighbor sequences, rich and representative input data is provided for deep feature extraction. This allows for the effective capture of feature representations of group similarity and multi-timescale patterns in passenger travel behavior through the first and second deep neural network layers, thereby enabling efficient and accurate prediction of target passenger travel behavior.
[0063] Example 2
[0064] The following section provides a detailed explanation of the subway passenger travel behavior prediction method based on bipartite dynamic graphs, using specific data.
[0065] Step 1: Configure system properties, including but not limited to the number of negative samples, the location of the computing hardware, the number of passengers predicted each time, and the length of the extracted sequence. The number of negative samples is set to 1 by default, the location of the computing hardware is set to 0 by default, the number of passengers predicted each time is set to 10 by default, and the length of the extracted sequence is set to 32 by default.
[0066] Step 2: Re-encode passenger records in the existing passenger historical travel data. For all station nodes, re-encode them with station numbers from 0 to 392, and for all passenger nodes, encode them with passenger numbers from 393 onwards.
[0067] Step 3: Re-encode the existing passenger historical travel data. For all boarding and alighting records, rearrange them in chronological order; then subtract the smallest occurrence time from all occurrence times, converting the timestamp records into time difference records.
[0068] Step 4: Add tags to existing ride records. For all boarding and alighting records, extract the boarding or alighting features and record them as an additional feature to obtain the boarding / alighting features.
[0069] Step 5: Construct a bipartite dynamic graph from the completed passenger nodes and their corresponding passenger numbers, station nodes and their corresponding station numbers, time differences, and boarding / alighting features.
[0070] Step 6: For the target passenger node to be predicted, traverse the bipartite dynamic graph, find all first-order station nodes that have interacted with the target passenger node, and find all first-order passenger nodes that have interacted with all station nodes. Arrange all first-order station nodes and all first-order passenger nodes in the order of the interaction time to obtain the first-order historical neighbor interaction subsequence of the target passenger node and the first-order historical neighbor interaction subsequence of all station nodes, respectively.
[0071] Step 7: Truncate the generated first-order historical neighbor interaction subsequence of the target passenger node and the first-order historical neighbor interaction subsequence of all station nodes with a fixed length, or fill the sequences that do not meet the sequence length with zeros to obtain the final first-order historical neighbor interaction sequence.
[0072] Step 8: Construct a historical neighbor interaction matrix. The elements in the historical neighbor interaction matrix represent the interaction between passenger nodes and station nodes. When there is an interaction between passenger nodes and station nodes, the element is stored as the time difference between the most recent interaction between passenger nodes and station nodes. When there is no interaction between passenger nodes and station nodes, the element is stored as 0.
[0073] Step 9: For the first-order station nodes in the first-order historical neighbor interaction subsequence of the target passenger node, find the passenger nodes that have interacted with the first-order station nodes to obtain several second-order passenger nodes. Based on the time difference, sort the several second-order passenger nodes in chronological order to obtain the second-order historical neighbor interaction subsequence of the target passenger node. At the same time, for the first-order passenger nodes in the second-order historical neighbor interaction subsequence of all station nodes, find the station nodes that have interacted with the first-order passenger nodes to obtain several second-order station nodes. Based on the time difference, sort the several second-order station nodes in chronological order to obtain the second-order historical neighbor interaction subsequence of all station nodes.
[0074] Step 10: Truncate the generated second-order historical neighbor interaction subsequence of the target passenger node and the second-order historical neighbor interaction subsequence of all station nodes with a fixed length, or zero-padded the sequences that do not meet the sequence length requirement, to obtain the final second-order historical neighbor interaction sequence.
[0075] Step 11: Pass the generated first-order historical neighbor interaction sequence and second-order historical neighbor interaction sequence through the first deep neural network layer to obtain the node representations of passengers and stations, the edge representations of interactions, the time representations of interactions, and the co-occurrence representations between the first-order and second-order historical neighbor interaction sequences; wherein, the first deep neural network layer is a hybrid feature encoder based on the fusion of a fully connected layer and a Transformer encoder.
[0076] Step 12: Pass the generated node representations of passengers and stations, edge representations of interactions, temporal representations of interactions, and co-occurrence representations between first-order and second-order historical neighbor interaction sequences through the second deep neural network layer to obtain a unified representation containing spatiotemporal features (i.e., a comprehensive spatiotemporal representation); wherein, the second deep neural network layer is a temporal feature extraction module of a multilayer perceptron, a long short-term memory network, or a Transformer encoder.
[0077] Step 13: Pass the generated unified representation containing spatiotemporal features through the link prediction layer to obtain the probability that the target passenger is linked with all stations, and use the probability that the target passenger is linked with the corresponding station as the probability of the target passenger's travel behavior; wherein, the link prediction layer is a network based on a multilayer perceptron.
[0078] Example 3
[0079] This application also provides an application scenario in which the above-described method for predicting subway passenger travel behavior based on a bipartite dynamic graph is applied. Specifically, the method for predicting subway passenger travel behavior based on a bipartite dynamic graph provided in this embodiment can be applied to subway passenger travel behavior scenarios. Subway passenger travel behavior scenarios include a target passenger travel behavior prediction stage and a target passenger travel behavior display stage; the method for predicting subway passenger travel behavior based on a bipartite dynamic graph provided in this embodiment belongs to the target passenger travel behavior prediction stage.
[0080] Example 4
[0081] Based on the same inventive concept, this application also provides a prediction system for implementing the aforementioned method for predicting subway passenger travel behavior based on a bipartite dynamic graph. The solution provided by this system is similar to the implementation described in the above method; therefore, the specific limitations of one or more subway passenger travel behavior prediction system embodiments provided below can be found in the limitations of the subway passenger travel behavior prediction method described above, and will not be repeated here.
[0082] Specifically, the system can be implemented using a hardware box or software simulation. Its main components include a bipartite graph generation module, a historical neighbor extraction module, a preliminary representation generation module, a spatiotemporal representation generation module, and a link prediction module. By configuring the system, the number of passengers and stations predicted each time can be set at predetermined time intervals. After determining the number of predictions each time, the system extracts first-order and second-order historical neighbor interaction sequences for a fixed number of passengers and stations each time. Then, based on the first-order and second-order historical neighbor interaction sequences, it generates corresponding node representations, edge representations, temporal representations, and neighbor co-occurrence representations. Next, the representations are fused, and the spatiotemporal features in the representations are captured by a stacked encoder. Finally, the prediction module predicts the probability of links occurring between nodes, serving as the prediction result for passenger travel behavior.
[0083] In one exemplary embodiment, such as Figure 3 As shown, a subway passenger travel behavior prediction system based on a bipartite dynamic graph is provided, including:
[0084] The bipartite graph generation module is used to construct a bipartite dynamic graph based on the acquired passenger historical travel data. The passenger historical travel data includes the target passenger and other passengers. The bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes. The passenger nodes include the target passenger node and other passenger nodes.
[0085] The historical neighbor sequence extraction module is used to construct historical neighbor sequences based on a bipartite dynamic graph.
[0086] The preliminary representation generation module is used to input the historical neighbor sequence into the first deep neural network layer for preliminary feature analysis to obtain preliminary node representations.
[0087] The spatiotemporal representation generation module is used to input the preliminary node representations into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation.
[0088] The link prediction module is used to input the comprehensive spatiotemporal representation into the link prediction layer for fusion, obtain the probability that the target passenger will be linked with all stations, and predict the travel behavior of the target passenger based on the probability.
[0089] The historical neighbor sequence extraction module includes a first-order neighbor extraction module and a second-order neighbor extraction module.
[0090] The first-order neighbor extraction module is used to traverse the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes based on the bipartite dynamic graph to obtain the first-order historical neighbor interaction sequence.
[0091] The second-order neighbor extraction module is used to obtain the second-order historical neighbor interaction sequence based on the first-order historical neighbor interaction sequence.
[0092] Example 5
[0093] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores and processes data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a bipartite dynamic graph-based method for predicting subway passenger travel behavior.
[0094] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0095] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0096] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0097] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0100] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0101] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for predicting subway passenger travel behavior based on a bipartite dynamic graph, characterized in that, include: Based on the acquired historical travel data of passengers, a bipartite dynamic graph is constructed; The bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes; The passenger nodes include the target passenger node and other passenger nodes; Based on the aforementioned bipartite dynamic graph, a historical neighbor sequence is constructed; The historical neighbor sequence is input into the first deep neural network layer for preliminary feature analysis to obtain preliminary node representations; The preliminary node representation is input into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation. The comprehensive spatiotemporal representation is input into the link prediction layer for fusion to obtain the probability that the target passenger will link with all stations, and the travel behavior of the target passenger is predicted based on the probability.
2. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 1, characterized in that, The bipartite dynamic graph also includes the passenger ID corresponding to the passenger node and the station ID corresponding to the station node; based on the acquired historical passenger travel data, the bipartite dynamic graph is constructed, specifically including: Passengers and stations in the historical travel data are used as passenger nodes and station nodes respectively, and the passenger nodes and station nodes are uniformly ID-coded to obtain passenger number and station number respectively; The timestamps in the passenger's historical travel data are standardized to obtain the time difference; the standardization process is to rearrange all timestamps in chronological order and then subtract the smallest timestamp from each rearranged timestamp. Add an extra feature to the boarding and alighting records in the passenger's historical travel data to obtain the boarding and alighting features; Based on the time difference and the boarding / alighting characteristics, an edge is established between the passenger node and the station node.
3. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 1, characterized in that, The historical neighbor sequence includes a first-order historical neighbor interaction sequence and a second-order historical neighbor interaction sequence. Based on the aforementioned bipartite dynamic graph, a historical neighbor sequence is constructed, specifically including: Based on the bipartite dynamic graph, the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes are traversed to obtain the first-order historical neighbor interaction sequence. Based on the first-order historical neighbor interaction sequence, the second-order historical neighbor interaction sequence is obtained.
4. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 3, characterized in that, The first-order historical neighbor interaction sequence includes the first-order historical neighbor interaction subsequence of the target passenger node and the first-order historical neighbor interaction subsequence of all station nodes; based on the bipartite dynamic graph, the first-order historical neighbor interaction sequence is obtained by traversing the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes, specifically including: Based on the bipartite dynamic graph, the station nodes that have interacted with the target passenger node are traversed to obtain several first-order station nodes. Based on the time difference, the several first-order station nodes are sorted in chronological order to obtain the first-order historical neighbor interaction subsequence of the target passenger node. Based on the bipartite dynamic graph, the passenger nodes that have interacted with all station nodes are traversed to obtain several first-order passenger nodes. Based on the time difference, the several first-order passenger nodes are sorted in chronological order to obtain the first-order historical neighbor interaction subsequence of all station nodes.
5. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 4, characterized in that, The second-order historical neighbor interaction sequence includes the second-order historical neighbor interaction sub-sequence of the target passenger node and the second-order historical neighbor interaction sub-sequence of all station nodes; based on the first-order historical neighbor interaction sequence, the second-order historical neighbor interaction sequence is obtained, specifically including: Construct a historical neighbor interaction matrix; the elements in the historical neighbor interaction matrix represent the interaction between passenger nodes and station nodes; the interaction is stored as the time difference between the most recent interaction between passenger nodes and station nodes when there is an interaction between passenger nodes and station nodes, and as 0 when there is no interaction between passenger nodes and station nodes. Based on the historical neighbor interaction matrix and the first-order historical neighbor interaction subsequence of the target passenger node, find the passenger nodes that have interacted with the first-order station node to obtain several second-order passenger nodes. Based on the time difference, sort the several second-order passenger nodes in chronological order to obtain the second-order historical neighbor interaction subsequence of the target passenger node. Based on the historical neighbor interaction matrix and the first-order historical neighbor interaction subsequence of all station nodes, the station nodes that have interacted with the first-order passenger nodes are found to obtain several second-order station nodes. Based on the time difference, the several second-order station nodes are sorted in chronological order to obtain the second-order historical neighbor interaction subsequence of all station nodes.
6. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 1, characterized in that, The preliminary node representation includes passenger node representation, station node representation, edge representation, and co-occurrence representation.
7. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 1, characterized in that, The integrated spatiotemporal representation includes integrated passenger representation and integrated station representation; The comprehensive spatiotemporal representation is input into the link prediction layer for fusion to obtain the probability of a link between the target passenger and the corresponding station, specifically including: The comprehensive passenger representation and comprehensive station representation are input into the link prediction layer for fusion to obtain the probability that the target passenger will link with all stations.
8. The method for predicting subway passenger travel behavior based on a bipartite dynamic graph according to claim 1, characterized in that, The first deep neural network layer is a hybrid feature encoder based on the fusion of a fully connected layer and a Transformer encoder; the second deep neural network layer is a temporal feature extraction module of a multilayer perceptron, a long short-term memory network, or a Transformer encoder; the link prediction layer is a network based on a multilayer perceptron.
9. A subway passenger travel behavior prediction system based on a bipartite dynamic graph, characterized in that, The system includes: The bipartite graph generation module is used to construct a bipartite dynamic graph based on the acquired historical passenger travel data. The bipartite dynamic graph includes multiple passenger nodes, multiple station nodes, and edges connecting passenger nodes and station nodes. The passenger nodes include the target passenger node and other passenger nodes. The historical neighbor sequence extraction module is used to construct a historical neighbor sequence based on the binary dynamic graph. The preliminary characterization generation module is used to input the historical neighbor sequence into the first deep neural network layer for preliminary feature analysis to obtain preliminary node characterization. The spatiotemporal representation generation module is used to input the preliminary node representation into the second deep neural network layer for spatiotemporal feature analysis to obtain a comprehensive spatiotemporal representation. The link prediction module is used to input the comprehensive spatiotemporal representation into the link prediction layer for fusion, obtain the probability that the target passenger will link with all stations, and predict the travel behavior of the target passenger based on the probability.
10. The subway passenger travel behavior prediction system based on a bipartite dynamic graph according to claim 9, characterized in that, The historical neighbor sequence extraction module includes a first-order neighbor extraction module and a second-order neighbor extraction module; The first-order neighbor extraction module is used to traverse the station nodes that have interacted with the target passenger node and the passenger nodes that have interacted with all station nodes based on the bipartite dynamic graph to obtain the first-order historical neighbor interaction sequence. The second-order neighbor extraction module is used to obtain a second-order historical neighbor interaction sequence based on the first-order historical neighbor interaction sequence.