Festival and holiday subway passenger flow prediction method and system based on space-time dynamic graph clustering

Through the method of combining spatio-temporal dynamic graph clustering and deep learning, the problem of low accuracy of subway passenger flow prediction during holidays is solved, more accurate passenger flow pattern identification and prediction is achieved, adapting to the dynamic needs of holidays, and improving operational efficiency and passenger experience.

CN118863984AActive Publication Date: 2024-10-29ZHEJIANG UNIV

Patent Information

Application Number
CN202410889934.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-29
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Existing technology is difficult to accurately predict subway passenger flow changes during holidays. Traditional methods cannot effectively capture the complex dynamic relationships and connections in the subway network, resulting in low passenger flow prediction accuracy and inability to adapt to dynamic demand changes during different holidays.

Method used

Using a method based on spatio-temporal dynamic graph clustering, by obtaining holiday characteristic variable information, the dynamic graph clustering algorithm is used to cluster subway network sites with group characteristics, build a passenger flow prediction model, and combine social media data and deep learning algorithms to dynamically identify passenger flow Patterns and behavioral characteristics, establish a topological adaptive graph convolution network and a multi-head self-attention mechanism, and build a more accurate passenger flow prediction model.

Benefits of technology

It improves the precision and accuracy of subway passenger flow forecast during holidays, can better capture the cyclical changes and special patterns of passenger flow, provides more efficient operation plan adjustments, and improves the comfort of subway services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863984A_ABST
    Figure CN118863984A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of passenger flow prediction, and particularly relates to a holiday subway passenger flow prediction method and system based on space-time dynamic graph clustering, and the method comprises the steps: obtaining holiday characteristic variable information; according to station passenger flow characteristic variable information, realizing metro network station grouping characteristics by using a dynamic graph clustering algorithm, and clustering stations with similar travel modes; on the basis of the obtained holiday characteristic variable information, a passenger flow prediction model is constructed in different station clustering clusters by means of the result of a dynamic graph clustering algorithm, holiday passenger flow of subway stations is predicted, and a GTN method combining a Transform architecture and a graph neural network is adopted for predicting the whole-network pull-in passenger flow of the subway in the holiday and the festival. According to the method, a self-attention mechanism is expanded to nodes and edges of a subway travel network graph, weighted attention is performed on connection relationships between different stations, the relevance of passenger flow modes between different stations is more accurately grasped, and the prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of passenger flow prediction, and in particular to a method and system for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering. Background Art

[0002] With the acceleration of urbanization and the increase in transportation demand, subway networks have been rapidly developed and expanded in many cities. As a fast and efficient public transportation mode, subway has become an important choice for urban residents to travel. With the continuous extension of subway lines and the expansion of coverage, subway passenger flow has also shown a rapid growth trend. It is becoming more and more important to predict subway passenger flow, especially during holidays such as New Year's Day, Dragon Boat Festival, Mid-Autumn Festival, and "National Day". The passenger flow fluctuations on different holidays are diverse.

[0003] Each holiday has its own unique characteristics and influencing factors, which lead to different changes in passenger flow. The Spring Festival is the most important traditional festival in China. During the Spring Festival, the population flow between cities is very active. The passenger flow from the city center to the rural areas around the city increases significantly, while the passenger flow in the city center area decreases. In addition, shopping and tourism activities also reach a peak during the Spring Festival, and the passenger flow in commercial areas and tourist attractions will also increase significantly.

[0004] The National Day holiday usually lasts for seven days. During this time, people use the holiday to travel and visit relatives and friends. The passenger flow in tourist attractions and popular destinations will increase sharply, while the passenger flow in office areas and commercial areas will usually decrease. Compared with the relatively stable normal period due to the constraints of commuting time, school dismissal time and commercial activities, the mechanism and pattern of passenger flow during holidays are completely different. Passenger flow will change dramatically during this period, which brings great challenges to passenger flow forecasting. By accurately predicting the changing trend of subway passenger flow during holidays, subway management departments can reasonably arrange personnel dispatch at stations, better meet passenger flow needs, alleviate passenger congestion, and provide passengers with a safer and more comfortable travel experience.

[0005] There is a close correlation between subway holiday passenger flow and social media data. Social media data can provide real-time and diverse information, which helps to deeply understand and respond to passenger flow during holidays. With the development of the Internet, social media platforms have gradually become an important channel for people to communicate, share and obtain information. Weibo is one of the largest social media platforms in China, similar to Twitter in the world. It is popular among users for its real-time, short text, hot topics and social interaction, and has become one of the important platforms for Chinese Internet users to share information, obtain news and express opinions. Social media data can provide real-time and large-scale user behavior information. By monitoring user activities and topic discussions on social media, people's travel intentions, travel plans, event participation and other information during holidays can be obtained. These data can reflect people's travel needs and behavioral tendencies, thereby providing a real-time reference for passenger flow forecasting and helping to predict changes in passenger flow in specific time periods and regions. Social media data can provide geographic location information and user distribution, provide a reference for geographical distribution for passenger flow forecasting, help determine passenger flow around popular attractions, business districts or transportation hubs, and then guide transportation organization and resource scheduling.

[0006] It is necessary and advantageous to dynamically cluster data when predicting subway passenger flow during holidays. Dynamic clustering can dynamically identify typical features and passenger flow trends between different stations based on the real-time update and change trend of passenger flow data, providing a basis for predictive modeling, which is particularly important for passenger flow changes under special circumstances such as holidays. Clustering algorithms classify similar objects into the same cluster by calculating the similarity or distance between objects, and assign dissimilar objects to different clusters. The subway system consists of a large number of stations and a complex line network. There are obvious spatial relationships between nodes, and this spatial relationship changes with passenger flow changes at different times. Traditional static clustering methods based on feature similarity may not be able to fully capture these complex dynamic relationships and connections. The dynamic graph clustering method can capture the topological structure of the subway network and the connection relationship between nodes in real time, dynamically reveal the geographical, functional and behavioral similarities in the subway network, and more accurately characterize the passenger flow patterns and interactive effects between stations, because stations in the same class usually have similar passenger flow change trends, boarding and alighting numbers and other characteristics.

[0007] During holidays, passenger flow changes in different regions and stations at different times vary. For example, the passenger flow around tourist attractions will decrease on the day before the holiday, while the passenger flow in commercial centers will increase. On the first day of the holiday, the passenger flow around tourist attractions will increase, while the passenger flow in commercial centers will decrease. General prediction models may not be able to adapt well to the dynamic demand changes of various stations during holidays. Through dynamic graph clustering analysis, different passenger flow patterns and behavioral characteristics can be identified, and specific model algorithms can be selected for different holiday situations, providing a basis for customized prediction models, helping operators to better predict and adjust holiday operation plans and provide more efficient and comfortable subway services.

[0008] With the rapid development of the Internet, the Internet of Things and digital technology, a large amount of data is constantly being generated, collected and stored. The rise of big data has provided favorable conditions for the popularity of deep learning algorithms. Deep learning uses a multi-level neural network structure to perform pattern recognition and feature extraction. It relies on large-scale data to train and optimize models and performs well in clustering and prediction tasks. In terms of clustering, deep learning algorithms can automatically cluster data by learning feature representations and similarities in data in real time. Compared with traditional clustering algorithms, deep learning algorithms can dynamically learn higher-level and more abstract feature representations, thereby better capturing the potential structures and patterns in irregular passenger flow data during holidays. For example, using autoencoders or variational autoencoders, unsupervised clustering can be achieved on large-scale data sets. In terms of prediction, deep learning algorithms can build complex models to predict future trends and results by learning a large amount of multi-dimensional historical feature data.

[0009] Subway passenger flow in normal times usually shows certain regularities, such as during rush hour, passenger flow is concentrated in specific time periods and subway lines. Traditional methods can better predict this regular passenger flow because they are easier to model and predict. However, passenger flow during holidays often shows irregular, sudden and volatile characteristics. Summary of the invention

[0010] In order to make up for the deficiencies of the prior art and solve the above-mentioned technical problems, the present invention proposes a holiday subway passenger flow prediction method and system based on spatiotemporal dynamic graph clustering.

[0011] On the one hand, the present invention proposes a method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering, the method comprising the following steps:

[0012] S10: Obtain holiday characteristic variable information;

[0013] S20: Based on the variable information of passenger flow characteristics of the stations, a dynamic graph clustering algorithm is used to realize the cluster characteristics of subway network stations, and stations with similar travel modes are clustered;

[0014] S30: Based on the obtained holiday characteristic variable information, using the results of the dynamic graph clustering algorithm, a passenger flow prediction model is constructed in different station clusters to predict the holiday passenger flow of subway stations.

[0015] Specifically, S10 includes:

[0016] S101: Obtain the blog posting volume on the social media platform to obtain passenger travel data, where the blog posting volume includes the current blog posting volume and the blog posting volume in the historical time step:

[0017] S102: Define the number of blog posts in period t as b t , select the blog posting volume of the historical time step to assist in predicting the passenger flow in the next period; where:

[0018] B t+1 =[b t-s ,b t-s+1 ,…,b t ]

[0019] Among them, s is the historical time step;

[0020] S103: Introduce holiday coding features to predict subway holiday passenger flow changes.

[0021] Specifically, the dynamic graph clustering algorithm in S20 includes:

[0022] S201: Use topology adaptive method to embed graphs and generate spatial topology adapted to input data;

[0023] S202: embed the solver of the lower-level clustering task as a differentiable layer into the training process of the deep learning model;

[0024] S203: Establish a topology-adaptive graph convolutional network and construct a dynamic travel network topology map based on passenger travel data in Represents the nodes of the graph, i.e., the stations, and ε represents the edges of the graph, i.e., the connections between the stations. The characteristics of the edges in the graph are described by the travel volume between the starting point and the end point;

[0025] S204: Using the adjacency matrix Describes the spatial connection relationship between sites, N is the number of sites;

[0026] S205: Node feature matrix x of the graph t Including the longitude and latitude of the station, daily inbound and outbound passenger flow demand, and hourly inbound and outbound passenger flow demand.

[0027] Specifically, establishing a topology adaptive graph convolutional network in S203 includes:

[0028] S2031: Use the graph convolutional network model to create a filter in the Fourier domain and perform convolution operations on the graph nodes;

[0029] S2032: Capture the spatial features between nodes by capturing the first-order neighbor relationship of the nodes, and construct a graph convolutional network model by stacking multiple convolutional layers, where the formula is as follows:

[0030]

[0031] in, is the normalized adjacency matrix of the graph, is the adjacency matrix, I N is the identity matrix, is the degree matrix of the travel network l represents the lth hidden layer, represents the f-th graph filter, are the polynomial coefficients of the graph filter, and the graph convolution is the product of the matrix and the vector is the fth output feature map, b f is a learnable bias term, is the output of layer l, σ is the activation function such as ReLU;

[0032] S2033: Formula Improved to The filter of the topology adaptive graph convolutional network dynamically adapts to the topological structure of the graph during the convolution process, where k is the size of the filter,

[0033] Among them, the following formula is used to calculate the information transmission weight between nodes;

[0034]

[0035] Among them, p represents a path from node j to i with a path length of k, and the node sequence of p is

[0036] S2034: Modularity is used as a loss function for error back propagation, parameters are optimized, and graph representation learning and cluster assignment are iteratively improved. The modularity is represented by Q and is calculated using the following formula:

[0037]

[0038] Where m is the total number of edges in the network; c is the number of cluster categories; A ij is the adjacency matrix of the network, indicating whether there is a connection between node i and node j; d i is the degree of node i; if node i is assigned to category c, r icis 1 if the value is true, otherwise it is 0.

[0039] Specifically, building a passenger flow prediction model in S30 includes:

[0040] S301: Establish a multi-head self-attention mechanism to obtain relevant information in different subspaces. The multi-head attention calculation formula is as follows:

[0041]

[0042] in, represents the input vector, d c is the hidden layer size of the cth attention head. For each attention head, first use different trainable parameters Respectively Convert to query vector Key Vector Sum value vector

[0043] S3022: Encode the edge features and add them to the key vector as additional information for each layer. The multi-head attention mechanism for the edge from node j to node i is calculated by the following formula:

[0044] e c,ij =W c,e e ij +b c,e #(14)

[0045]

[0046] in, is the feature of the node, e ij is the feature of the edge;

[0047] S3023: Based on the graph multi-head attention, the message aggregation from the distant node j to the source node i is calculated by the following formula:

[0048]

[0049] Among them, || represents the concatenation operation of C attention heads, and the multi-head attention matrix replaces the original normalized adjacency matrix to become the transition matrix of message passing;

[0050] On the other hand, the present invention proposes a holiday subway passenger flow prediction system based on spatiotemporal dynamic graph clustering, the system comprising:

[0051] The acquisition module is used to obtain holiday characteristic variable information;

[0052] The clustering module is used to realize the cluster characteristics of subway network stations based on the variable information of station passenger flow characteristics and cluster stations with similar travel modes using a dynamic graph clustering algorithm;

[0053] The prediction module is used to build a passenger flow prediction model in different station clusters based on the obtained holiday characteristic variable information and the results of the dynamic graph clustering algorithm to predict the holiday passenger flow of subway stations.

[0054] The beneficial effects of the present invention are as follows:

[0055] 1. This paper adopts the GTN method that combines the Transformer architecture and the graph neural network to predict the passenger flow of the entire subway network during holidays. This method extends the self-attention mechanism to the nodes and edges of the subway travel network graph, pays weighted attention to different stations and the connection relationship between stations, more accurately grasps the correlation of passenger flow patterns between different stations, and improves the prediction accuracy.

[0056] 2. The present invention takes into account multi-dimensional data such as social media data and holiday codes. Social media data can provide information about people’s activities, interests and behaviors during holidays; holiday code data provides information such as holiday types and duration, which can provide a more comprehensive understanding of people’s travel destination preferences during holidays and better capture the periodic changes and special patterns of passenger flow.

[0057] 3. The present invention proposes an end-to-end dynamic graph clustering algorithm TAkmeans to dynamically cluster subway travel networks. Different from the simple combination of graph convolutional networks and clustering technology, it iteratively optimizes neural network parameters through graph representation and clustering, integrates the two into a unified framework, and realizes fully automated training. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The present invention will be further described below in conjunction with the accompanying drawings.

[0059] Figure 1 It is a flow chart of training to maximize accuracy in the present invention;

[0060] Figure 2 It is a flow chart of training maximization decision quality in the present invention;

[0061] Figure 3 It is a local topological structure diagram of Beijing subway lines provided in the present invention;

[0062] Figure 4 It is a passenger flow fluctuation diagram of a certain commercial area station during the National Day week and a normal week after the National Day week in the experiment provided in the present invention in 2023;

[0063] Figure 5 is the number of blog posts in each time period of each day in a week in the experiment provided by the present invention;

[0064] Figure 6It is a correlation coefficient matrix diagram of the passenger flow into the station and the blog publishing volume in the experiment provided by the present invention;

[0065] Figure 7 This is a graph showing the evolution of the local graph clustering of the Beijing subway dynamic travel network over time in the experiment provided by the present invention;

[0066] Figure 8 A comparison chart of the actual value of the passenger flow entering the station during a normal week and the National Day holiday and the predicted value of the GTN algorithm at different functional area stations in the experiment provided by the present invention;

[0067] Fig. 9 Flow chart of the method of the present invention. DETAILED DESCRIPTION

[0068] An embodiment of the present invention provides a holiday subway passenger flow prediction method based on spatiotemporal dynamic graph clustering, and adopts a GTN method that combines the Transformer architecture and a graph neural network to predict the subway holiday network passenger flow. This method extends the self-attention mechanism to the nodes and edges of the subway travel network graph, and pays weighted attention to the connection relationships between different stations and stations, so as to more accurately grasp the correlation between passenger flow patterns between different stations and improve prediction accuracy.

[0069] After introducing the basic principles of the present invention, various non-limiting implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0070] Embodiment 1:

[0071] like Fig. 9 As shown, an embodiment of the present invention provides a method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering, the method comprising the following steps:

[0072] S10: Obtain holiday characteristic variable information;

[0073] S20: Based on the variable information of passenger flow characteristics of the stations, a dynamic graph clustering algorithm is used to realize the cluster characteristics of subway network stations, and stations with similar travel modes are clustered;

[0074] S30: Based on the obtained holiday characteristic variable information, using the results of the dynamic graph clustering algorithm, a passenger flow prediction model is constructed in different station clusters to predict the holiday passenger flow of subway stations.

[0075] Specifically, firstly, for holiday characteristic variable information, social media data provides a way to indirectly reflect the changes in subway passenger flow during holidays compared to normal days. During holidays, people tend to share their travel plans, activity arrangements, and attraction recommendations on social media;

[0076] The number and content of these social media activities reflect people’s interest and demand for travel during holidays. Blog publishing volume is an important indicator of social media activity, which can reflect users’ attention, activity and travel information;

[0077] By monitoring the number of blog posts on social media platforms, some valuable insights can be obtained. For example, an increase in blog posts may mean that more people plan to take the subway during holidays, or that more people are heading to certain popular destinations. On the contrary, if the number of blog posts decreases, it may mean that people choose other modes of travel or choose to stay at home during holidays. By incorporating blog posts into the subway passenger flow prediction model, the present invention can better understand and predict passenger flow during holidays;

[0078] This prediction model that comprehensively considers social media data can help subway operators more accurately predict holiday passenger flow and adjust transportation capacity and operation strategies accordingly to alleviate the pressure caused by the surge in passenger flow. The present invention counts the number of blog posts with "Beijing subway station" as the keyword by time period, and defines the number of blog posts in time period t as b t ,The blog posting volume in the historical time step is selected to assist in predicting the passenger flow in the next period;

[0079] B t+1 =[b t-s ,b t-s+1 ,…,b t ]

[0080] Among them, s is the historical time step.

[0081] In order to accurately predict the changes in subway passenger flow during holidays, it is necessary to consider not only the passenger flow on the holiday day, but also the day before the holiday, the day after the holiday, and a longer time frame. The passenger flow patterns on different days of the holiday may be significantly different. For example, the day before the holiday is usually when people prepare for the holiday. People need to go to the store to buy food and gifts, or go to the city center to purchase special items;

[0082] Therefore, the subway may face slightly increased passenger flow pressure on this day. On holidays, people tend to celebrate at home rather than go out frequently, which means that the subway system may face relatively stable passenger flow on this day. However, the second day of the holiday will present a completely different situation. People start to go out to visit relatives and friends, visit scenic spots or travel. On this day, the subway system may face a high passenger flow peak, and reasonable scheduling and arrangements need to be made in advance to ensure the travel experience of passengers. In order to incorporate the impact of these date types in the passenger flow prediction model, integer encoding can be used to add holiday features as a discrete feature column to the prediction model;

[0083] Based on this feature, the model can learn the passenger flow patterns and trends of different date types to more accurately predict the changes in passenger flow during holidays. Through integer encoding, different date types can be represented as integers such as -1, 0, 1, 2, 3, 4, etc. For example, -1 can represent the day before a holiday, 0 represents a non-holiday working day, 1 represents the first day of a holiday, 2 represents the second day of a holiday, 3 represents the third day of a holiday, and so on. By introducing the holiday encoding feature, the model can learn that the passenger flow may be higher on the day before a holiday, while the passenger flow may be lower on non-holiday working days. Such features can help the model more accurately predict the changes in subway passenger flow during holidays.

[0084] Secondly, this embodiment discloses a new method TAkmeans that combines node feature representation and clustering algorithm, which dynamically mines the subway space-time travel network structure through graph learning and optimization. It goes beyond the simple combination of graph convolutional network and clustering technology. The simple combination method first uses the standard loss to train the model, and then inserts the obtained node representation into the clustering algorithm. The two stages are completely separate, such as Figure 1 As shown. This kind of training to minimize the standard loss function (for example, cross entropy) is not designed for a specific clustering task, so the clustering performance is limited. The graph clustering method introduced in this section uses a topology adaptive method to embed the graph, generate a spatial topology that adapts to the input data, and embed the solver of the underlying clustering task as a differentiable layer into the training process of the deep learning model. It iteratively optimizes the neural network parameters through graph representation and clustering, takes the quality of solving the downstream problem as the loss function, and integrates the two into a unified framework to achieve fully automated training, such as Figure 2 shown.

[0085] Graph Convolutional Network (GCN) breaks through the limitation of convolutional neural network that it is limited to processing Euclidean structure data. It takes into account neighbor nodes and updates the features of the current node by aggregating the information of neighbor nodes. This information propagation mechanism enables GCN to effectively process non-Euclidean structure data and performs well in extracting spatial dependencies of subway networks. However, GCN uses fixed-size convolution kernels for smooth shift, pooling, and nonlinear activation functions, and assumes that the topological structure of the input graph is fixed. The subway system is a dynamic transportation network affected by multiple factors such as peak or non-peak hours, weekdays or weekends, and holidays. The topological structure of the subway spatiotemporal travel network changes dynamically. In order to dynamically mine the changes in the subway spatiotemporal travel network and explore different travel network structures, this section proposes a representation learning model called Topology Adaptive Graph Convolutional Networks (TAGCN). TAGCN combines the mechanisms of adaptive neighbor sampling and adaptive weight aggregation to adapt to graph data with different topological structures.

[0086] Constructing a dynamic travel network topology based on passenger travel data in Represents the nodes of the graph, i.e., the sites, and ε represents the edges of the graph, i.e., the connections between sites. Describes the spatial connection relationship between sites, N is the number of sites. The node feature matrix x of the graph t It consists of the longitude and latitude of the station, the daily inbound and outbound passenger flow demand, the hourly inbound and outbound passenger flow demand, etc. The characteristics of the edge in the graph are described by the travel volume between the starting point and the end point. The GCN model creates a filter in the Fourier domain, performs convolution operations on the graph nodes, captures the spatial features between nodes by capturing the first-order neighbor relationship of the nodes, and constructs the GCN model by stacking multiple convolutional layers, as shown in Formula 2-5.

[0087]

[0088] in, is the normalized adjacency matrix of the graph, is the adjacency matrix, I N is the identity matrix, is the degree matrix of the travel network l represents the lth hidden layer, represents the f-th graph filter, are the polynomial coefficients of the graph filter, and the graph convolution is the product of the matrix and the vector is the fth output feature map, b fis a learnable bias term, is the output of layer l, and σ is an activation function such as ReLU.

[0089] TAGCN is a variant of GCN. First, TAGCN dynamically selects neighbor nodes for each node through adaptive neighbor sampling. Figure 3 This is a local topological structure diagram of Beijing subway lines. The connection of the edge represents the entry and exit of passengers between the starting point and the end point (OD) during a certain period of time, and the OD passenger flow is the weight of the edge. Taking station 1 (Nanluoguxiang Station) as an example, the GCN that only uses the Chebyshev polynomial with k=1 to approximate the convolution kernel only considers the fixed first-order neighbor stations of the road network, that is, only considers stations 2 and 7, while TAGCN uses a set of diverse k-localized filters to implement graph convolution in the vertex domain. The size of these filters is variable, ranging from 1 to K, so that each filter can be flexibly adjusted according to the characteristics of the graph, that is, TAGCN will consider the first-order neighbor stations 2 and 7, the second-order stations 3, 4 and 6, and so on. This flexibility is achieved through the polynomial coefficients of the filter. Therefore, TAGCN improves GCN's formula 3 to formula 6, so that the filter of TAGCN dynamically adapts to the topological structure of the graph during the convolution process.

[0090]

[0091] Where k is the size of the filter.

[0092] Secondly, TAGCN adjusts the information transfer weights between nodes through adaptive weight aggregation. Traditional GCN uses a fixed weight aggregation method and cannot adapt to the relationship between different nodes. TAGCN calculates the importance of each node's neighbor nodes and dynamically adjusts the weights according to the importance, so that each node can better integrate the information of neighbor nodes. The information transfer weight calculation method between nodes is shown in Formula 7. For example, Figure 3 There are two paths with a length of 3 (i.e., k = 3) from site 1 to site 6: (1,2,7,6) and (1,2,3,6), represented by blue and purple shadows respectively. Then according to formula 7, we can get Then the output of layer f in TAGCN Formula 4 is improved to Formula 8 for calculation.

[0093]

[0094] Among them, p represents a path from node j to c with a path length of k, and the node sequence of p is

[0095] After extracting node and edge features using the TAGCN layer, the structure and attribute information of the original travel network are represented by reduced dimension. Subsequently, the output of the hidden layer is passed as input to the clustering module, and the present invention uses a differentiable K-means clustering algorithm for operation. K-means clustering aims to divide data points into different clusters by assigning them to the nearest centroid. The core idea of ​​the algorithm is to iteratively optimize and find the best cluster center to achieve data clustering and grouping. However, the k-means algorithm itself is a non-differentiable process because it contains a hard threshold function and a discrete cluster assignment step. In order to achieve differentiable k-means clustering, the present invention adopts the Gumbel Softmax approximation method, uses the Gumbel distribution to approximate the discrete cluster assignment process, and uses the Softmax function to associate the probability distribution with the data point. Specifically, it uses the Gumbel-Softmax distribution to assign a probability distribution to each data point, which represents the probability that the data point belongs to each cluster. Then, the centroid of the cluster is updated by maximizing the expected distance between the data point and the centroid of the cluster. This way, the whole process becomes differentiable, and optimization methods such as gradient descent can be used to optimize the centroids and cluster assignments. Backpropagation is allowed during the optimization process, allowing joint training with other neural network models.

[0096] The present invention proposes a graph clustering algorithm TAKmeans that combines feature representation and clustering. It uses TAGCN to extract and represent the dynamic spatiotemporal travel network structure and features, and then uses a differentiable K-means clustering algorithm to group and assign the data to the corresponding clusters according to their similarity. The final clustering result uses modularity as a loss function for error back propagation, parameter optimization, and iterative improvement of graph representation learning and cluster assignment. This framework fully integrates graph representation learning and optimization, and realizes customized training. Modularity is an indicator for measuring the quality of graph network structure division. It measures the difference between the actual graph network structure and the random expected network structure. If a graph network structure has a high modularity value, it means that the connections between nodes in the structure are more restricted to the subgraph, while the connections between subgraphs are less, and the network structure is better divided. Generally, a Q value between 0.3 and 0.7 is considered to be a strong network modularity, which is calculated by formula 9.

[0097]

[0098] Where m is the total number of edges in the network; c is the number of cluster categories; A ij is the adjacency matrix of the network, indicating whether there is a connection between node i and node j; d i is the degree of node i; if node i is assigned to category c, r ic is 1 if the value is true, otherwise it is 0.

[0099] Finally, the present invention discloses a prediction algorithm GTN combining Transformer and graph neural network, which better predicts the subway passenger flow during holidays by extending the self-attention mechanism to the nodes and edges of the subway network to capture the local and global dependencies in the network. Each neuron in the hidden layer of the recurrent neural network receives the state of the previous neuron and the current input, calculates the new state and output, and then passes it to the next neuron. This limits the size of its input and output, which is usually fixed in a certain task and has sequential calculation characteristics, and cannot be parallelized, resulting in slow training speed and difficulty in handling long-distance dependencies. In order to solve these problems, Vaswani et al. proposed the Transformer model in 2017, which is a sequence-to-sequence model based on the self-attention mechanism. The main components of the Transformer model include an encoder and a decoder. The encoder is stacked with multiple identical layers, and each layer includes two sublayers: a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism allows the model to pay attention to all positions in the input sequence at each time step, and weights the sum value vector by calculating the attention weight. The feedforward neural network is a fully connected feedforward network used to perform nonlinear transformations on the output of the self-attention mechanism. The decoder is also stacked with multiple identical layers, each of which consists of three sublayers: a multi-head self-attention mechanism, an encoder-decoder attention mechanism, and a feedforward neural network. The encoder-decoder attention mechanism allows the decoder to pay attention to the encoder's hidden representation and generate a context vector based on the attention weights. This enables the decoder to obtain information from the encoder to help generate the correct output sequence.

[0100] Transformer takes all positions in the input sequence into consideration at the same time and performs parallel calculations by introducing a multi-head self-attention mechanism and position encoding. This enables the Transformer model to better capture long-distance dependencies in the sequence and has a faster training speed. Position encoding is used to embed the position information in the sequence into the model. It is achieved by adding position information to the embedding vector of the input sequence, so that the model can perceive the relative order relationship between different positions in the sequence. The essence of the multi-head self-attention mechanism is the splicing of multiple independent and parallel attention mechanisms. Through this splicing, relevant information on different subspaces can be obtained. Formula 10-13 is the calculation formula for multi-head attention.

[0101]

[0102] in, represents the input vector, d cis the hidden layer size of the cth attention head. For each attention head, first use different trainable parameters Respectively Convert to query vector Key Vector Sum value vector

[0103] GTN combines the Transformer architecture with graph neural networks, and uses the self-attention mechanism to pay weighted attention to different parts of the graph data during representation learning. The importance of each node or edge is determined by calculating the similarity between the node or edge and its neighbors, and the features of the neighbors are weighted summed according to the importance. This mechanism enables it to better capture the relevance of nodes and edges to their surroundings when learning their features, thereby improving the understanding and representation of graph structures. Compared with traditional graph neural networks, a significant advantage of GTN is that it can automatically learn useful connections and node representations from raw graph data, reducing the reliance on manually designed features, enhancing the generalization and adaptability of the model, and having a wider applicability when processing various types of graph data, and can achieve state-of-the-art performance in different fields and tasks. Unlike processing sequence data, GTN operates on the adjacency matrix and feature matrix of the graph, encodes the structural information of the graph into the self-attention mechanism, and calculates the weighted sum of the representations of neighboring nodes. Specifically, it encodes and adds the edge features to the key vector as additional information for each layer, and the multi-head attention mechanism for the edge from node j to node i is calculated by formula 15.

[0104] e c,ij =W c,e e ij +b c,e

[0105]

[0106] in, is the feature of the node, e ij The feature of the edge.

[0107] After obtaining the graph multi-head attention, the message aggregation from distant node j to source node i is calculated by Formula 16.

[0108]

[0109] Here, || represents the concatenation operation of C attention heads, and the multi-head attention matrix replaces the original normalized adjacency matrix to become the transition matrix of message passing.

[0110] Embodiment 2, the present invention provides a holiday subway passenger flow prediction system based on spatiotemporal dynamic graph clustering, the system comprising:

[0111] The acquisition module is used to obtain holiday characteristic variable information;

[0112] The clustering module is used to realize the cluster characteristics of subway network stations based on the variable information of station passenger flow characteristics and cluster stations with similar travel modes using a dynamic graph clustering algorithm;

[0113] The prediction module is used to build a passenger flow prediction model in different station clusters based on the obtained holiday characteristic variable information and the results of the dynamic graph clustering algorithm to predict the holiday passenger flow of subway stations.

[0114] In order to prove the accuracy of the holiday subway passenger flow prediction method based on spatiotemporal dynamic graph clustering provided by the present invention, the present invention conducted the following experiments:

[0115] The automatic fare collection (AFC) card swiping data and social media data of Beijing's urban rail transit in September and October 2023 are used to analyze the passenger travel patterns and rules during holidays. AFC card swiping data refers to the passenger entry and exit card swiping information recorded by the rail transit system, including the entry and exit card swiping time, entry and exit stations, etc. By analyzing the AFC card swiping data, it can be revealed that the subway travel patterns during holidays are different from those on weekdays. Figure 4 The fluctuations in passenger flow in and out of a certain commercial district station during the National Day week in 2023 and in a normal week after the National Day week.

[0116] It can be seen that the overall travel pattern of holiday passenger flow is very different from that of normal weeks. The number of passengers entering the commercial district station on a normal weekday is 19,892; while the number of passengers entering the station on a holiday weekday is 38,111, an increase of 18,219 passengers compared to normal days. Therefore, accurately predicting passenger flow, especially holiday passenger flow, is still a necessary and challenging task. Social media data is content posted by users related to subway travel collected from social media platforms (mainly Weibo), such as travel plans, experience sharing, and attraction recommendations. By analyzing social media data, we can understand information such as travel purposes during holidays, traffic at popular attractions, and passengers' travel experience. Figure 5 It is the number of blog posts in each time period of each day of the week. The horizontal axis is the time period and the vertical axis is the number of posts. The number of posts in each time period of each day is superimposed on the column in a cumulative manner. It can be found that people are more inclined to post blogs related to subway travel between 10:00 and 12:00 at the beginning of the holiday. For example, 17 blogs were posted between 11:30 and 12:00 on Tuesday, while there were only 2 blogs posted between 20:30 and 21:00.

[0117] By quantitatively describing and analyzing social media data and subway inbound passenger flow data, the correlation between the number of Weibo posts and the subway inbound passenger flow can be explored. Taking 30 minutes as the time granularity, count the number of Weibo posts and the subway inbound passenger flow within different unit times, and draw a correlation coefficient matrix diagram as shown in Figure 6 shown.

[0118] The correlation coefficient matrix diagram can visually express the correlation between the number of blog posts and the inbound flow. The numbers in the figure represent the Pearson correlation coefficient. The closer the value is to 1, the stronger the positive correlation between the two variables. For example, the correlation coefficient between the inbound passenger flow on October 3 and the blog release volume on October 2 is 0.52. The larger the origin in the figure, the stronger the correlation. The positive correlation is red, and the negative correlation is blue; the redder the origin, the closer the correlation coefficient is to 1, and the stronger the positive correlation. The * in the origin is a significance marker. When the significance level p <= 0.001, it is marked as ***; for secondary correlation 0.001 < p <= 0.01, it is marked as **; p <= 0.05 is marked as *. It can be seen from the figure that there is a significant positive correlation between the number of blog posts and the inbound passenger flow at a significance level of 0.05.

[0119] Among them, the comparative analysis of the dynamic graph clustering algorithm is as follows:

[0120] The dynamic graph clustering method TAkmeans first obtains node features through representation learning, and then performs clustering analysis on these node features to obtain the clustering results in the subway network. The present invention conducts a comparative analysis on the proposed TAkmeans in terms of the graph neural network algorithm for representation learning and the clustering task based on the Beijing subway network. In terms of the selection of the graph neural network algorithm for representation learning, algorithms such as GCN and Graph Attention Network (GAT) are compared to select the most suitable one. In terms of the selection of the algorithm for the clustering task, the present invention will compare the traditional K-means algorithm and some other commonly used clustering algorithms, such as K-means++ and Mean Shift, etc. By comparing their performance in the subway network clustering task, the most suitable clustering algorithm for this study can be determined, and its differences from other algorithms can be evaluated.

[0121] Among them, GCN can adapt to the spatial correlation between stations in the subway network and use information such as the geographical location of adjacent stations and the inbound and outbound passenger flow to enrich the feature representation, and has greater flexibility in dealing with non-Euclidean features and graph structure relationships;

[0122] GAT is a graph neural network model based on the attention mechanism. It effectively captures the important relationships between subway stations by learning the attention weights between stations and their neighbor stations in the subway network, thereby improving the performance of the graph neural network;

[0123] Simplifying Graph Convolutional Networks (SGCN) is a model for processing spatiotemporal graph structured data. It combines GCN and spatiotemporal modeling methods, can effectively capture spatiotemporal relationships and evolutionary patterns between nodes, and is suitable for spatiotemporal data analysis and prediction tasks. This is of great significance for the dynamic identification of communities in subway networks where the network structure and node characteristics of inbound and outbound passenger flow change at any time.

[0124] The Graph Sample and Aggregated Convolution (GraphSAGE) algorithm updates node representations by sampling and aggregating the features of neighboring nodes, thereby effectively capturing local and global information in graph data. GraphSAGE can reduce computational complexity while retaining the contextual information of nodes, which is very suitable for processing rail networks containing a large number of subway stations and lines.

[0125] The Feature Statistics Convolution (FeaStConv) algorithm updates the features of the graph data by modeling the summary statistics of node features such as passenger flow and location (such as maximum, mean, variance, etc.). It can capture the distribution information of node features more comprehensively, and can effectively analyze and understand the similarities and differences between different stations, as well as their role in the entire subway network.

[0126] The Local Edge Convolution (LEConv) algorithm determines the degree of association between nodes and edges by calculating the similarity between node features and edge features, and uses it to update node representations. This helps understand the connectivity and importance of different stations in the subway network and provides valuable insights for the dynamic division of the subway network.

[0127] Residual Gated Graph Convolution (ResGatedConv) is a graph convolution layer that combines residual connection and gating mechanism. It adds the original features to the updated features through residual connection to retain the original information; it controls the flow of information and the importance of features through the gating mechanism, so as to better capture the association and feature distribution between stations in the subway network and make more reasonable classification of the subway network.

[0128] Table 1 shows the comparison results of the proposed TAGCN algorithm with other algorithms in terms of modularity values ​​on weekdays and holidays. Modularity is an indicator to measure the quality of the graph network structure partitioning. It measures the difference between the actual graph network structure and the random expected network structure. The closer the modularity value is to 1, the more nodes in the graph network structure are connected inside the subgraph, and the connections between subgraphs are less, that is, the network structure partitioning is better. On weekdays, GCN obtained a modularity value of 0.683 on the subway network. However, SGCN only had 0.519. By adopting GAT, ResGatedConv, and LEConv layers, modularity values ​​of 0.687, 0.698, and 0.710 were obtained respectively. However, the modularity value using the TAGCN layer was higher, reaching 0.769. During holidays, the modularity values ​​of the GCN layer and the GAT layer on the subway network were 0.669 and 0.693, while TAGCN obtained a higher modularity value of 0.770. These results show that the TAGCN algorithm for data representation performs best in subway networks and achieves higher modularity values ​​compared to the baseline algorithms.

[0129] Table 1 Modularity comparison of TAGCN and other benchmark algorithms

[0130]

[0131] Note: The clustering algorithms used in the subsequent clustering tasks in the table all adopt the differentiable K-means algorithm.

[0132] In terms of algorithm selection for clustering tasks, the present invention compares the performance of the classic K-means algorithm with some commonly used clustering algorithms. Table 2 compares the modularity results of different clustering algorithms (including differentiable K-means, K-means++ and MeanShift) on the subway travel network. K-means++ is an improved k-means clustering algorithm that uses a probability weighted approach when selecting the initial centroid, making data points that are farther away from the selected centroid more likely to become the next centroid, thereby improving the convergence speed of the algorithm. Mean Shift is a density-based non-parametric clustering algorithm used to discover clustering structures in data. Its main idea is to locate the cluster center by iteratively finding the maximum direction of the density gradient of data points. The differentiability of K-means++ and Mean Shift can also be implemented using the Gumbel Softmax approximation method. However, since K-means++ itself is an iterative, local optimization process, it may fall into a local optimal solution during the optimization process.

[0133] The computational complexity of the Mean Shift algorithm is proportional to the size and dimension of the dataset. For large-scale datasets and high-dimensional data, the execution time of the algorithm will increase significantly, resulting in low efficiency. As can be seen from Table 2, for the subway travel dataset, for most feature extraction algorithms, the differentiable K-means algorithm has the best clustering effect. For example, for the LEConv feature extraction algorithm, the modularity of the differentiable K-means during weekdays is 0.710, while the modularity of the K-means++ and Mean Shift clustering algorithms are 0.618 and 0.360, respectively, which are significantly lower than K-means. The same is true during holidays. The K-means algorithm with a modularity value of 0.609 performs better than the K-means++ and Mean Shift clustering algorithms with modularity values ​​of 0.589 and 0.375, respectively. In addition, using TAGCN for feature extraction and using differentiable K-means, K-means++ and Mean Shift clustering algorithms for community segmentation, the modularity values ​​obtained during weekdays were 0.769, 0.756 and 0.579, respectively, while the modularity values ​​during holidays were 0.770, 0.718 and 0.557, respectively. This result shows that compared with other graph-based feature extraction algorithms (such as LEConv and GAT) and clustering algorithms (such as K-means++ and Mean Shift), the use of the TAKmeans algorithm can obtain a higher modularity. In addition, it is worth noting that the MeanShift algorithm requires more training time.

[0134] Table 2 Comparison of modularity of clustering algorithms

[0135]

[0136]

[0137] Figure 7 This is the result of the clustering of the local graph of the Beijing subway dynamic travel network over time. The color of the station represents the station category, and stations of the same category are represented by the same color. The connection relationship between stations is determined by whether there is passenger flow during the period, and the weight (thickness) and color of the connection edge reflect the size of the passenger flow. Figure 7 (a) is the local clustering result from 7:00-7:30 in the morning. It can be seen that the TAKmeans algorithm will cluster the sites with strong connections to each other into category A (red), while the sites with weak connections to category A sites will be classified into other categories (yellow and purple, etc.). As time goes by, during the period from 12:00 to 12:30, the connection between some sites and category A sites gradually strengthens, so some sites will be transferred from other categories to category A, such as Figure 7As shown in (b), this transition is highlighted by the green arrow. However, during the period of 18:00-18:30, the OD passenger flow between some stations has a significant decreasing trend, so some stations have left the original category A and have been classified into other categories, such as Figure 7 As shown in (c), this transition is highlighted by the green arrow. As time goes by, in the period of 21:00-21:30, as the OD volume between stations increases and decreases, the classification of station categories changes with the strength of the connection relationship between stations, such as Figure 7 (d) as shown.

[0138] The specific analysis is as follows:

[0139] In order to study the impact of each characteristic variable on the prediction of inbound passenger flow, the present invention developed multiple models for experiments. The first is the model M-FL that only uses the inbound and outbound passenger flow of the historical time step and the historical same period and the longitude and latitude of the station as the graph node features. In order to explore the impact of clustering on the improvement of passenger flow prediction accuracy, the M-FLC model was constructed, which adds the site category features obtained using the graph clustering algorithm TAKmeans on the basis of the time series features of inbound and outbound passenger flow and the site location features. In order to evaluate the impact of social media data and holiday integer coding on holiday passenger flow, the present invention created the model M-FLCSH, which added the blog posting volume and holiday features of the historical time step.

[0140] In order to evaluate the effectiveness of the model that integrates clustering, social media data, and holiday integer coding features for passenger flow prediction on weekdays and holidays, the present invention uses two months of real Beijing subway AFC data, the month of National Day and the month before National Day, for experiments. The proposed prediction model GTN is compared with various travel demand prediction baseline models including Random Forest (RF), Gradient Boosting Decision Trees (GBDT), GCN, GAT, SGCN, and TAGCN. The accuracy of the model is measured by the coefficient of determination (R 2 ), mean absolute error (MAE) and root mean square error (RMSE) for evaluation.

[0141]

[0142] where y t and are the actual value and predicted value of the passenger flow entering the station at time t, is the average value of the actual passenger flow entering the station at time t, T is the final end time, and N is the total number of time points experienced from the start to the end time.

[0143] Table 3 shows the performance of the three models M-FL, M-FLC, and M-FLCSH on holiday and weekday passenger flow prediction. The results show that compared with other prediction algorithms, GTN has better performance on both weekdays and holidays. For example, on weekdays, RF, SGCN, and TAGCN have a higher R 2 The R values ​​of GTN on the M-FLCSH model are 0.71, 0.46, and 0.72, respectively, the MAEs are 92, 138, and 94, and the RMSEs are 258, 335, and 253, respectively. 2 , MAE, and RMSE are 0.75, 82, and 220, respectively, which are 4.17%, 10.86%, and 13.04% higher than the best baseline model. During the holidays, RF, SGCN, and TAGCN have the highest R 2 The R values ​​of GTN on the M-FLCSH model are 0.71, 0.40, and 0.73, respectively, the MAEs are 96, 122, and 89, and the RMSEs are 259, 306, and 202, respectively. 2 , MAE, and RMSE are 0.75, 75, and 195. In addition, adding clustering, social media data, and holiday integer coding features can improve the prediction accuracy. 2 , MAE, and RMSE are 0.69, 103, and 251 respectively; while in the M-FLC model with clustering features, R 2 , MAE, and RMSE are 0.72, 119, and 245 respectively, and the prediction accuracy has been improved to a certain extent, which shows that clustering is conducive to improving the prediction accuracy. 2 , MAE, and RMSE are 0.75, 82, and 220 respectively. Compared with M-FL, adding clustering, social media data, and holiday integer coding features can reduce the R 2 The improvement is 8.70%, MAE is 20.39%, and RMSE is 12.35%.

[0144] Figure 8 The chart shows the comparison between the actual passenger flow entering different functional areas during a normal week and the National Day holiday and the predicted value by the GTN algorithm.

[0145] Figure 8 (a)(b) shows the comparison results of passenger flow prediction on weekdays and holidays at residential stations. It can be found that the passenger flow at residential stations decreases significantly during holidays. Although the basic trends of predicted passenger flow and actual passenger flow are consistent, there is still a lot of room for improvement. Figure 8(c) and (d) show the passenger flow prediction results of commercial area stations on weekdays and holidays. Due to factors such as commuting, the population flow in the commercial area is relatively large on weekdays, but the passenger flow is relatively small on weekends. In the first few days of holidays, the passenger flow decreases significantly because more people turn from commuting to leisure and tourism. The GTN algorithm captures this large change in passenger flow during holidays very well, and the prediction is relatively accurate. Figure 8 (e)(f) show the comparison results of passenger flow prediction at scenic spots on weekdays and during holidays. It can be seen from the figure that the passenger flow at scenic spots increases significantly during holidays, from hundreds to thousands, and the holiday passenger flow no longer shows obvious differences between weekdays and weekends. However, the GTN algorithm proposed in the present invention can adapt well to this regular fluctuation and make more accurate predictions.

[0146] Table 3. Inbound passenger flow prediction performance of each model integrating different features

[0147]

[0148]

[0149] Note: This table uses a clustering-then-prediction framework to predict passenger flow.

[0150] The above embodiments show and describe the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. Holiday subway passenger flow prediction method based on spatiotemporal dynamic graph clustering, It is characterized in that The method is as follows: S10: Obtain holiday characteristic variable information; S20: Based on the variable information of passenger flow characteristics of the stations, a dynamic graph clustering algorithm is used to realize the cluster characteristics of subway network stations, and stations with similar travel modes are clustered; S30: Based on the obtained holiday characteristic variable information, using the results of the dynamic graph clustering algorithm, a passenger flow prediction model is constructed in different station clusters to predict the holiday passenger flow of subway stations.

2. The method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering as claimed in claim 1, It is characterized in that S10 includes: S101: Obtain the blog posting volume on the social media platform to obtain passenger travel data, where the blog posting volume includes the current blog posting volume and the blog posting volume in the historical time step: S102: Define the number of blog posts in period t as b t , select the blog posting volume of the historical time step to assist in predicting the passenger flow in the next period; where: B t+1 =[b t-s ,b t-s+1 ,…,b t ] Among them, s is the historical time step; S103: Introduce holiday coding features to predict subway holiday passenger flow changes.

3. The method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering as claimed in claim 2, It is characterized in that The dynamic graph clustering algorithms in S20 include: S201: Use topology adaptive method to embed graphs and generate spatial topology adapted to input data; S202: embed the solver of the lower-level clustering task as a differentiable layer into the training process of the deep learning model; S203: Establish a topology-adaptive graph convolutional network and construct a dynamic travel network topology map based on passenger travel data in Represents the nodes of the graph, i.e., the stations, and ε represents the edges of the graph, i.e., the connections between the stations. The characteristics of the edges in the graph are described by the travel volume between the starting point and the end point; S204: Using the adjacency matrix Describes the spatial connection relationship between sites, N is the number of sites; S205: Node feature matrix x of the graph t Including the longitude and latitude of the station, daily inbound and outbound passenger flow demand, and hourly inbound and outbound passenger flow demand.

4. The method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering as claimed in claim 3, It is characterized in that The establishment of a topology adaptive graph convolutional network in S203 includes: S2031: Use the graph convolutional network model to create a filter in the Fourier domain and perform convolution operations on the graph nodes; S2032: Capture the spatial features between nodes by capturing the first-order neighbor relationship of the nodes, and construct a graph convolutional network model by stacking multiple convolutional layers, where the formula is as follows: in, is the normalized adjacency matrix of the graph, is the adjacency matrix, I N is the identity matrix, is the degree matrix of the travel network l represents the lth hidden layer, represents the f-th graph filter, are the polynomial coefficients of the graph filter, and the graph convolution is the product of the matrix and the vector is the fth output feature map, b f is a learnable bias term, is the output of layer l, σ is the activation function such as ReLU; S2033: Formula Improved to The filter of the topology adaptive graph convolutional network dynamically adapts to the topology of the graph during the convolution process, where k is the size of the filter, Among them, the following formula is used to calculate the information transmission weight between nodes; Among them, p represents a path from node j to i with a path length of k, and the node sequence of p is S2034: Modularity is used as a loss function for error back propagation, parameters are optimized, and graph representation learning and cluster assignment are iteratively improved. The modularity is represented by Q and is calculated using the following formula: Among them, m is the total number of edges in the network; c is the number of cluster categories; A ij is the adjacency matrix of the network, indicating whether there is a connection between node i and node j; d i is the degree of node i; if node i is assigned to category c, r ic is 1 if the value is true, otherwise it is 0.

5. The method for predicting subway passenger flow on holidays based on spatiotemporal dynamic graph clustering as claimed in claim 4, It is characterized in that The passenger flow prediction model constructed in S30 includes: S301: Establish a multi-head self-attention mechanism to obtain relevant information in different subspaces. The multi-head attention calculation formula is as follows: in, represents the input vector, d c is the hidden layer size of the cth attention head. For each attention head, first use different trainable parameters Respectively Convert to query vector Key Vector Sum value vector S3022: Encode the edge features and add them to the key vector as additional information for each layer. The multi-head attention mechanism for the edge from node j to node i is calculated by the following formula: have been c,ij =W c,e have been ij +b c,e in, is the feature of the node, e ij is the feature of the edge; S3023: Based on the graph multi-head attention, the message aggregation from the distant node j to the source node i is calculated by the following formula: Here, || represents the concatenation operation of C attention heads, and the multi-head attention matrix replaces the original normalized adjacency matrix to become the transition matrix of message passing.

6. Holiday subway passenger flow prediction system based on spatiotemporal dynamic graph clustering, It is characterized in that The system includes: The acquisition module is used to obtain holiday characteristic variable information; The clustering module is used to realize the cluster characteristics of subway network stations based on the variable information of station passenger flow characteristics and cluster stations with similar travel modes using a dynamic graph clustering algorithm; The prediction module is used to build a passenger flow prediction model in different station clusters based on the obtained holiday characteristic variable information and the results of the dynamic graph clustering algorithm to predict the holiday passenger flow of subway stations.

Citation Information

Patent Citations

  • Rail transit passenger flow prediction method based on dynamic hypergraph convolution network

    CN111860951A

  • Online booked vehicle flow prediction method based on deep learning

    CN112669595A

  • Urban rail transit holiday short-time passenger flow prediction method based on GCN-Transformer

    CN115034496A

  • Long-term and short-term public traffic flow prediction method

    CN115440032A

  • Hypergraph-based space-time hypergraph convolution traffic flow prediction method and system

    CN115565369A

Cited By

  • Transform-based networked autonomous vehicle trajectory prediction method

    CN119598316A

  • Commercial district passenger flow prediction method, system and device based on graph neural network

    CN119887280A

  • Urban rail transit short-time OD passenger flow prediction method based on multi-task learning

    CN120197764A

  • Short-term OD passenger flow prediction method for urban rail transit based on multi-task learning

    CN120197764B