A subway fine-grained crowd quantity real-time estimation method
By using the subway automatic fare collection system and deep learning models, the problems of low data coverage and privacy leakage in subway crowd monitoring have been solved, achieving efficient and accurate real-time crowd distribution estimation, reducing system costs and improving stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN INST OF ADVANCED TECH
- Filing Date
- 2024-11-25
- Publication Date
- 2026-05-26
AI Technical Summary
Existing subway crowd monitoring technologies suffer from low data collection coverage, missing data, noise, and privacy leaks. Furthermore, the complexity of subway networks makes it difficult to accurately estimate real-time crowd distribution.
Using the automatic fare collection (AFC) system of the subway as a data acquisition sensor, and combining deep learning methods, a spatiotemporal network deep learning model is constructed. Through real-time card swiping data and train operation data, the real-time distribution of people in each functional area of the subway network is estimated.
It achieves real-time population distribution estimation with high sampling rate, timeliness and anonymization under low cost conditions, improves system stability and accuracy, and avoids the risk of privacy leakage.
Smart Images

Figure CN122087218A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and in particular to a method for real-time estimation of fine-grained crowd size in subways. Background Technology
[0002] As a crucial component of urban public transportation, the urban subway system carries over half of all urban public transport trips and faces immense transportation pressure. Due to the highly uneven spatial and temporal distribution of residents' travel, congestion is particularly severe during peak hours, with nearly half of the stations and trains experiencing severe overcrowding. Real-time crowd distribution within train and station functional areas of the subway network is essential for understanding travel demand and is a prerequisite for developing timely and effective passenger flow management plans. It plays a vital role in improving urban public transportation safety and enhancing the operational efficiency of the subway system. Therefore, real-time monitoring of fine-grained area crowd distribution in urban subways is a crucial guarantee for urban public safety.
[0003] The mainstream technologies for real-time monitoring of fine-grained population distribution in urban subways are based on computer vision or wireless sensor signals (such as mobile signaling data and WiFi channel state information (CSI) signals). These technologies obtain the number of target objects within a specific area through image analysis or signal acquisition, and then use a certain integration strategy to obtain the number of people in a designated area in real time, achieving dynamic monitoring of the population within the area. However, these technologies require the deployment of large-scale data acquisition terminals and data processing servers, resulting in high deployment costs. Furthermore, video surveillance has blind spots, and wireless signal sensors are susceptible to signal interference from obstacles (such as walls), leading to data loss or noise. Additionally, the need to collect personal terminal information or facial images presents limitations due to personal data privacy protection requirements. Summary of the Invention
[0004] In view of this, the main objective of this application is to provide a real-time estimation method for fine-grained crowd size in subways. This estimation method aims to solve the problems of low data collection coverage caused by insufficient signal acquisition deployment in existing estimation methods, data loss and noise caused by complex and dynamic environmental factors, and even privacy leaks.
[0005] Due to limitations in existing technologies such as low coverage, missing data, noise, and privacy leaks, this application uses the Automatic Fare Collection System (AFC) as the data acquisition sensor for fine-grained real-time crowd monitoring in the subway network to obtain a high sampling rate, timely, and anonymized real-time data source under limited cost conditions. The AFC system has the key advantage of not relying on additional infrastructure and being able to collect all card-swipe records in real time. However, there are some challenges in using card-swipe data for real-time monitoring of fine-grained crowd distribution in various functional areas of the subway network:
[0006] (1) Diverse and dynamic environmental factors: There are many uncontrollable and unpredictable environmental factors, such as the distribution of people in different areas of the network, the actual train timetable, dynamic subway passenger flow organization plans, sudden (or organized) urban public events, and weather, all of which affect the real-time distribution of people in the network at the current moment. Combining all these factors to obtain the real-time distribution of people in each functional area of the subway network is a complex problem.
[0007] (2) Cascading effect of complex networks: The subway network is a complex network structure, and its complexity increases significantly with the growth of stations and lines. Any train delay or crowd congestion in the passageway area may change the distribution of people on the entire line or in the entire station, resulting in new delays or exacerbating congestion.
[0008] (3) Data sparsity and data lag: According to the mechanism of the public transport smart card transaction settlement system, users swipe their cards to enter and exit the station. The system collects and records the station and time information of the user's entry and exit, but the detailed movement trajectory of the user in the subway network is missing. In addition, before the passenger swipes his card to exit the station, the system only records the user's entry information (including the entry station and entry time).
[0009] To address the aforementioned challenges, this patent aims to achieve real-time monitoring of crowd distribution in various functional areas of a subway network based on smart card swipe data. Since the travel status of online passengers in the subway network is matched one-to-one with each functional area, the real-time crowd size in each functional area can be obtained by counting the number of online passengers in the corresponding travel status within each area. Therefore, based on the definition of travel status, the movement of people between different areas of the subway network is modeled as a dynamic process of travel status transition. By constructing an end-to-end real-time crowd estimation model for each area of the subway network and using deep learning methods to calculate the real-time travel status transition probability, the problem of real-time crowd estimation in each functional area of the subway network is transformed into modeling the process of online passengers transitioning their travel status within the subway network. This allows for real-time estimation of fine-grained crowd distribution in the real-time subway network based on real-time card swipe data and train operation data.
[0010] Before detailing the proposed solution, it is necessary to introduce the data used in this application and define some concepts and issues.
[0011] Public Transportation Network: The public transportation network is a directed graph G = (S, L, E), where S = {s1, s2, ..., s...} |S| Let L = {l1, l2, ..., ln} represent the set of nodes for all stations in the network, and |S| represent the number of nodes. |N|} is the set of all lines, |N| represents the number of lines, and lines above and below the same line number are two independent lines. Stations s i The list of routes is represented as E∈R |M|×|M| This is the adjacency matrix of the network, representing the connections between adjacent stations on each line. Generally, subway (bus) lines are bidirectional. If two nodes s i and s j It is line l m Two adjacent stations on the road,
[0012] Main Functional Areas of the Subway Network: Based on the functional attributes of various granular spaces within the subway network, the network is subdivided into the following five functional areas: entrance passages, transfer passages, platforms, exit passages, and trains. Entrance passages (exit passages) are represented as... Refers to line l m ∈L i Stations i The passenger entry area specifically refers to the passageway through which passengers swipe their cards to reach the platform area (the passageway through which passengers disembark and leave the platform to reach the card swiping area); the transfer passageway is indicated as... This refers to passengers at station s i Leaving Line l m ∈L i The platform area leads to line l n ∈L i The passageway to the platform area; the platform is represented as P. i,m It refers to station S i The middle belongs to line l m ∈L i An area for passengers to wait for trains; the train is represented by q. i,m This refers to the line l m Stations i The departing train, q i,m .id represents the train number, q i,m .t indicates that the train has left the station s i The time.
[0013] Table 1 Composition of Public Transportation Network
[0014]
[0015]
[0016] Online passenger travel status: The travel status of online passengers in each functional area of the subway network is defined as follows: Entering the station (I i,m ), waiting area (W) i,m ), taking a car (T) i,m,q ), transfer (R) i,m,n ) and exit (O) i,m ).
[0017] Table 2. Travel status of online passengers (by station s) i (Taking train q as an example)
[0018]
[0019]
[0020] Trip partitioning: Given any subway trip tl, the entire journey state of a passenger from entering the station to exiting the station can be represented as G. tl ={r1,r2,…,r |G|}, r i This corresponds to the i-th trip state. Each state r... i Includes the following attributes: start time r i b. End time r i .e, duration [r i .b,r i .e), the corresponding travel state r i .s and subway network functional areas r i .z. Passengers in the previous state r i-1 The end time r of .s i-1 .e from state r i-1 .s transitions to the next state r i .s. The transition relationships between various states of online passengers in the subway network, such as... Figure 1 As shown.
[0021] Population numbers in each functional area: and This indicates that at any time t, the device is in state I in the subway network. i,m W i,m T i,m,q R i,m,n and O i,m The number of passengers refers to the number of people in each functional area of the subway network.
[0022] Furthermore, the modeling of the online passenger journey state transition process in the subway network is based on abstracting this transition as a dynamic process that occurs with passenger movement, train operation, and real-time crowd distribution in different areas of the network. The possible state transitions for passengers vary depending on their current location, such as... Figure 2 As shown, a passenger's current state in the platform area includes boarding, transferring, and exiting the station. The real-time distribution of people in various areas of the train operation and network is an external environmental factor. Train operation time affects the start time of passengers' boarding and exiting states, while the distribution of people in the entrance passage directly affects the start time of entering and waiting states.
[0023] The problem of estimating passengers' real-time states is transformed into the problem of estimating the probability of state transitions during the passenger's journey from entering to exiting the station. This is combined with... Figure 2 It can be seen that a passenger's transition from one travel state to the next is related to the passenger's walking time and the train's travel time. Regarding the passenger's walking time, without considering differences in age, gender, etc., and assuming that all passengers walk at the same speed in the subway, the walking time within a specific passage is only related to the length of the passage. Figure 2 As shown in the example, the real-time state of an online passenger at a given time t is illustrated in detail, showing the passenger's status at station s. i The status transition process after swiping a card to enter the station may include the following six categories:
[0024] (1) Start→X: When a passenger enters the station by swiping their card through the AFC system i Passengers may go to any platform of the station to wait for their train, and the corresponding state X∈{I} i,m |l m ∈L i In the following content, passengers at station s i The probability of a passenger choosing their status after entering the station is referred to as the online passenger status at station s. i The initial state distribution.
[0025] (2)I i,m →W i,m When passengers pass through the entrance passage Arrival at platform P i,m At that time, the passenger's trip status changed from I i,m Transfer to W i,m The timing of this type of journey status transition depends on the passenger's passage through the entrance channel. The walking time, i.e., the time to enter the station, is denoted as ET. i,m .
[0026] (3)W i,m →X: When train q arrives at station s iAt that time, it is in state W i,m Passengers may be transferred to a boarding status T i,m,q Or remain in a waiting state W i,m If a passenger successfully boards the vehicle, their travel status transitions to T. i,m,q Otherwise, it remains unchanged. The proportion of passengers boarding is mainly determined by the train's design load (denoted as C). max The impact of ).
[0027] (4)T i,m,q →X: When line l m Train q departs from station s i Depart and arrive at the next station. j At that time, in state T i,m,q Passengers may remain on the train, exit the station, or transfer to other lines (only if multiple lines pass through the station). j (Time). Among them, the travel status of passengers remaining on the train will be transferred to T. j,m,q Passengers exiting the station will have their travel status changed to O. j,m Transfer to another subway line n The passenger's trip status is transferred to R j,m,n That is, X∈{{O} j,m ,T j,m,q}∪{R j,m,n |l n ∈L j ,l n ≠l m This patent refers to such a travel state transition as a T-state transition, from travel state T... i,m,q The probability of transitioning to any state X is T - the state transition probability.
[0028] (5)R j,m,n →W j,n : In state R j,m,n Passengers arriving at platform P j,n At that time, its journey state transitions to W. j,n The timing of this type of journey status transition depends on the passenger's passage through the transfer corridor. From P j,m Arrival at P j,n The walking time, i.e. the transfer time, is expressed as...
[0029] (6)O j,m →End: In state O j,m Passengers on platform P j,n Get off the train and go through the exit passage Arrive at the AFC system card swiping area and leave the station. jThe time a passenger exits the station depends on their walking time through the exit passage, i.e., the departure time, denoted as OT. j,m .
[0030] The key issues that need to be addressed in estimating online passenger journey state transitions are shown in the table below, specifically including: 1) Passenger walking time in a specific area, including ET. i,m , and OT j,m 2) Estimate passenger journey state transitions, including the initial state distribution after entering the station and the state at point T. i,m,q The T-state transition probability at a given state.
[0031] Based on the above introduction, this application provides a real-time method for estimating the number of people in a subway network in a fine-grained manner, based on real-time card swiping data and train operation data. This method includes...
[0032] By acquiring historical passenger entry and exit data and train operation data, estimating travel paths, segmenting historical travel trajectories, and obtaining the historical travel state transition probability;
[0033] Deep learning is performed on the historical travel state transition probabilities to construct a spatiotemporal network deep learning model of travel state transition probabilities with mixed spatiotemporal context;
[0034] By acquiring online passenger information at a given time, the spatiotemporal network deep learning model is used to estimate the fine-grained number of people in each functional area of the subway in real time.
[0035] As one embodiment of this application, the spatiotemporal network deep learning model includes:
[0036] The time component models the periodicity of the time characteristics of the target subway station by embedding vectors;
[0037] The spatial component models spatial correlations using graph convolutional networks, while leveraging long short-term memory networks to capture order dependencies in time series.
[0038] The hybrid context learning component utilizes multiple fully connected neural network layers and a normalized exponential function to generate run state transition probabilities with hybrid spatiotemporal contexts.
[0039] Furthermore, the time features include at least monthly information, statutory holiday information, weekly information, and daily information.
[0040] As one embodiment of this application, the spatial component consists of multiple blocks, each block inputting different types of subway station features, including spatial matrix features, passenger flow features, and weather features; the output of each block is aggregated information of each type of neighbor, and the information of each type of neighbor in adjacent time periods is merged through the Long Short-Term Memory network.
[0041] As one approach in this application, the outputs of the spatial and temporal components are concatenated to create a spatiotemporal hybrid context, which is then input into the hybrid context learning component having multiple fully connected neural network layers to obtain a multidimensional vector. The travel state transition probability is then calculated using a normalized exponential function.
[0042] Furthermore, after obtaining the state transition probability, the method also includes using the mean absolute error as the loss function and using the stochastic gradient descent algorithm to minimize the average error between the prediction result and the validation set.
[0043] As an improvement to this application, the historical travel state transition probability includes the initial state distribution and the travel state transition probability, wherein...
[0044] The initial state distribution probability is the probability of a passenger's state selection after entering the subway station.
[0045] The travel state transition probability is the probability that a passenger will transition from a travel state to another state.
[0046] As one aspect of this application, the fine-grained real-time population estimation specifically includes:
[0047] Given a time and online passenger information, a spatiotemporal network deep learning model is used to calculate the travel status of online passengers. Then, the number of passengers in each travel status is counted. By analyzing the correspondence between travel status and subway network functional areas, the fine-grained number of people in each functional area of the subway is estimated in real time.
[0048] This application also includes a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method described in any of the preceding claims.
[0049] This application also includes a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, perform any of the methods described above.
[0050] In the above-mentioned technical solution of this application, by segmenting historical travel trajectories, the movement of people between different areas of the subway network is modeled as a dynamic process of travel state transition. Real-time travel state transition probabilities are calculated using deep learning methods, thereby estimating the real-time fine-grained population distribution of the subway network based on real-time card swiping data and train operation data. Compared with existing machine vision-based estimation methods, this application eliminates the need for deploying a large number of signal acquisition devices, resulting in a simpler hardware system, significantly reducing system costs while improving system stability, and eliminating the risk of privacy infringement. This application comprehensively considers relevant factors such as time, space, and weather, and uses graph convolutional networks and long short-term memory networks for modeling, which can significantly improve the accuracy of real-time population estimation in fine-grained areas of the subway. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art 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 the structures shown in these drawings without creative effort.
[0052] Figure 1 This is a schematic diagram illustrating five travel states and their transfer relationships for online passengers in a subway network, as described in an embodiment of this application.
[0053] Figure 2 This is a schematic diagram of the online passenger trip status transition process in an embodiment of this application;
[0054] Figure 3 This is a schematic diagram of a real-time method for estimating the number of people in a subway with fine-grained scale, according to an embodiment of this application.
[0055] Figure 4 This is a schematic diagram of the spatiotemporal network deep learning model architecture in an embodiment of this application;
[0056] Figure 5 This is a schematic diagram of the real-time trip status update algorithm in an embodiment of this application. Detailed Implementation
[0057] 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 a part of the embodiments of this application, and not all of them. 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.
[0058] It should be noted that all directional indicators (such as up, down, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0059] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of a person skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0060] like Figure 3 As shown, this application provides a real-time method for estimating the number of people in a subway with fine-grained data, including S1, acquiring historical passenger entry and exit data and train operation data, estimating travel paths, segmenting historical travel trajectories, and obtaining historical travel state transition probabilities;
[0061] As an improvement to this application, the historical travel state transition probability includes the initial state distribution and the travel state transition probability, wherein...
[0062] The initial state distribution probability is the probability of a passenger's state selection after entering the subway station.
[0063] The travel state transition probability is the probability that a passenger will transition from a travel state to another state.
[0064] Specifically, given a dataset of passenger entry and exit points and train operation data, by estimating the complete travel path, including the stations along the route and the trains taken, the historical travel of passengers can be segmented and the status during the travel process can be obtained.
[0065] After trip segmentation is completed, each trip tl is segmented into a set G of trip states. tl ={r1,r2,…,r |G| Let |G| represent the number of states contained in trip tl. Each state r g Includes the following attributes: start time r g b. End time r g .e, duration [r g .b,r g .e), the corresponding travel state r g .s and subway network functional areas r g .z. The population size of a region at each historical moment in the subway network is obtained by counting the number of passengers in different travel states. Given time t, the number of passengers in travel state X is denoted as #(X,t), and the calculation formula is:
[0066]
[0067] Where T is the set of all trips taken in a day, and ∥.∥ is used to calculate the number of elements in a given set.
[0068] Assume that the change in the state transition probability is asymptotic, i.e., stable over a reasonable time interval [t, t+τ), where τ is a fixed time interval. Divide a day into time intervals {T1, T2, ..., Tn} of equal length τ (in minutes). |T| Then, calculate the probability of trip state transition for each station in each time period. Given a time period T... k =[(k-1)τ,kτ), where Equation 2 represents the number of passengers who are in state X and transition to state X′ during this time period, denoted as # k (X,X′).
[0069]
[0070]
[0071] 1) Initial state distribution: Given a time period T k Site s i Passengers entering the station choose line L m ∈L i The state is I i,m The proportion of passengers is calculated using formula (4-3).
[0072]
[0073] Using set Y I ={Pr(|T k )|l m ∈L i} represents a given time period T k Sites i Passengers entering the station are transferred to state X∈{I i,m |l m ∈L i The set of proportions of}, that is, the initial state distribution of the site, Y I The sum of all terms in the formula is equal to 1, that is...
[0074] 2) T-state transition probability: given a time period T k When line l m Train q arrives at station s i The next site j At that time, from state T i,m,qThe proportion of online passengers who transition to state X∈{X} is calculated using formula (4-4), where {X}={{O j,m ,T j,m,q}∪{R j,m,n |l n ∈L i &l n ≠l m}}, Q k Refers to time period T k Arrival Stations j It belongs to line l m The trains are assembled.
[0075]
[0076] Using set Y T ={Pr(T i,m,q →X|T k |X∈{X}} represents a given time period T k and site s i Belongs to line l m The set of T-state transition probabilities, Y T The sum of all terms equals 1, i.e., ∑ X∈{X} Pr(T i,m,q →X|T k ) = 1.
[0077] S2. Perform deep learning on the historical travel state transition probabilities to construct a spatiotemporal network deep learning model of travel state transition probabilities with mixed spatiotemporal context;
[0078] Specifically, such as Figure 4 As shown, this application constructs a deep learning model based on a spatial-temporal network (STnet) for estimating the probability of real-time travel state transitions for passengers.
[0079] The spatiotemporal network deep learning model described in this application includes three sets of key input features: time features, passenger flow features, and weather features, used to predict online passengers during a given time period T. k Given site s i The initial state distribution and T-state transition probability.
[0080] • Time Features: Extract at least four types of time features, including monthly information, statutory holiday information, weekly information, and daily information. Represented as F t= (dy, ts, hd, mt), where dy ∈ {1, 2, ..., 7} represents a day of the week to distinguish between weekdays and weekends. ts ∈ {1, 2, ..., 48} represents 48 30-minute time intervals within a day. hd ∈ {0, 1} is a Boolean variable, where 0 represents statutory holidays and 1 represents non-statutory holidays. mt ∈ {1, 2, ..., 12} represents the 12 months of the year.
[0081] • Passenger flow characteristics: The station's inbound and outbound passenger flow at different time periods is extracted as passenger flow characteristics. Historical averages are calculated using historical travel data and used as model input. Given station s i and time period T k The station's passenger flow is O j,k The station's outbound passenger flow D can be calculated using formula (4-5). j,k It can be calculated using formula (4-6).
[0082] O i,k =|{tl|tl∈R,tl.s o =s i ,tl.t o ∈T k}|, 5
[0083] D i,k =|{tl|tl∈R,tl.s d =s i ,tl.t d ∈T k}|. 6
[0084] Typically, for a subway network with |S| stations, each station has two types of passenger flow characteristics (i.e., inbound passenger flow and outbound passenger flow). Given a time period T... k The passenger flow feature vector of the subway network can be represented as F k ∈R 2×|S| The passenger flow characteristics of the preceding N time periods can be represented as a sequence, denoted as F. f ={F k-P ,…,F k-1}
[0085] • Weather Features: Extract the weather features of the area where each subway station is located. The weather information includes at least four features: weather summary (sunny, cloudy, overcast, foggy, snowing, raining), temperature, humidity, and wind speed. Given a time period T k The weather feature vector of the subway network can be represented as W k ∈R 4×|S| The weather characteristics of the preceding N time periods can be represented as a sequence, denoted as F. w ={Wk-P ,…,W k-1}
[0086] The STnet architecture comprises three main components: a temporal component, a spatial component, and a hybrid context learning component. These components aim to model the temporal periodicity and spatial correlation of passenger journey state transitions using features in both the temporal and spatial dimensions. The outputs of the two components are further fused through a fully connected layer with hybrid context, and a normalized exponential function (Softmax) layer is used to output the prediction vector, where the sum of all terms is 1. The mean absolute error (MAE) is employed as the loss function, and SGD (stochastic gradient descent) with momentum is utilized to minimize the average error between the prediction result and the validation set. Specifically, the temporal component models the periodicity of the temporal features of the target subway station through embedding vectors. The embedding vectors of these temporal features are trained to learn the relationship between different temporal features and journey state transition probabilities. Any feature at any time on any day is mapped to an N-dimensional embedding vector. These embedding vectors are initially randomly initialized and then adjusted as the training algorithm and other parameters are modified.
[0087] The spatial component consists of multiple blocks with identical structures but different types of input site features. Each block includes a Graph Convolutional Neural Network (GCN) for modeling spatial correlations and a Long Short-Term Memory (LSTM) network for capturing order dependencies in the time series.
[0088] A Global Network (GCN) is defined as a graph G = (V, E), where V and E are the set of vertices and the set of adjacent edges, respectively. The graph structure consists of an adjacency matrix and a degree matrix, where the adjacency matrix A = [a...]. ij ]∈R n×n a ij This represents the connection between any vertices. The degree matrix D = diag(d1, d2, ..., dn). n )∈R n×n , This represents the number of connecting edges at each node. In spectral analysis, the properties of a graph can be represented by the Laplacian matrix L = DA. To capture the spatial local features during the convolution process, given a spatial signal x, refer to the graph convolution operation proposed by Defferard et al. (as shown in Equation (7)). Defferard et al. used the Kth element in the Laplacian matrix... th The order polynomial represents its K-locality, which depends only on nodes whose maximum step size from the center node (the Kth order neighborhood) is K.
[0089]
[0090] Kpif and other constraints restrict K=1 to produce the simplest graph convolution operation, i.e., y=σ(θLx). Further, the graph convolution operation is defined as shown in Equation (8).
[0091] X l+1 =σ(LX l W)8
[0092] Where, X l and X l+1 Let L and W represent the l-th layer and (l+1)-th layer, respectively. L is the Laplacian matrix, W represents the trainable parameters, and σ represents the activation function, such as the Sigmoid function or the ReLU function.
[0093] Subway networks are typical graph structures, with stations and train operating sections forming the set of vertices and edges. Therefore, Geographic Networks (GCNs) are chosen to model spatial correlations. To reduce the parameter space of the model, all stations are divided into |M| categories based on their distance from the target station. Then, the spatial influences of stations in the same category are aggregated into the same feature vector, and different weights are assigned to the features of stations in different categories. GCNs need to determine the range of information they can aggregate. The first-order Laplace matrix proposed by Kpif mainly focuses on the information of nearest neighbor nodes, while the K-order Laplace matrix proposed by Defferard et al. searches for nodes with a maximum step size of K from the target node based on the shortest path in the network (edge weight is 1). Because the distance between stations needs to be considered, some new matrices are defined to replace the Laplace matrix in GCNs, which can aggregate neighbor information based on weighted shortest paths (edge weight is the inter-station running time).
[0094] Assume that different types of neighbors (here, type is based on distance classification between sites) have different degrees of influence on the target site, and that sites belonging to the same type of neighbor have similar degrees of influence. To obtain the distance s from the target site... i Based on the classification of connected stations by distance, first calculate the distance C from all stations to the target station, and then divide the difference between the maximum and minimum distances into |M| equal parts: η=(C min -C max ) / |M|, calculate the difference l = CC between the distance from each station to the target station and the minimum distance to the target station. min The difference l∈(C) min +η×(k-1),C min The sites with +η×k) are assigned to the target site s. i The k-th class of neighboring nodes. When station s j If ∈S belongs to the k-th class of neighbors, then v i,j =1; otherwise, v i,j=0. The k-th type matrix represents the target site s. i The spatial structure of the k-th class of neighbors is calculated and applied to the GCN to aggregate information about the k-th class of neighbors. Matrix M k Formula (9) includes the k-type neighbor nodes of the entire network.
[0095]
[0096] The convolution operation based on the above reconstruction is shown in Equation (4-10), where This represents layer l with c features. Let M represent layer l+1 with m features. n×n It can be any spatial matrix, W c×m This represents the trainable parameters, and ReLU is the activation function.
[0097]
[0098] The input to each block in the spatial component includes a spatial matrix S and passenger flow characteristics F. f and weather characteristics F w The output of GCN in each block represents the aggregated information of each type of neighbor. This output is further fed into LSTM to merge the information of each type of neighbor in adjacent time periods.
[0099] The hybrid context learning component utilizes multiple fully connected neural network layers and a normalized exponential function to generate run-state transition probabilities with hybrid spatiotemporal contexts. Specifically,
[0100] First, the outputs of the spatial and temporal components are concatenated to create a spatiotemporal hybrid context. This context is then fed into multiple fully connected neural network layers, producing a D-dimensional vector. When calculating the initial state distribution, D represents the number of subway lines traversed by the target station. When calculating the T-state transition probability, D represents the number of possible journey states when the train arrives at the target station.
[0101] Given a D-dimensional neural network output vector z = (z1, z2, ..., z...) D The normalized state transition probabilities of the journey are calculated using the Softmax function (Equation 11). Similar to classification problems, the Softmax function is applied to the last layer. However, unlike classification methods, the prediction result is a multi-dimensional vector in which the sum of all elements is 1, and each element has a value between 0 and 1.
[0102]
[0103] Furthermore, after obtaining the state transition probability, the method also includes using the mean absolute error as the loss function and using the stochastic gradient descent algorithm to minimize the average error between the prediction result and the validation set.
[0104] Specifically, MAE (Equation 12) is used as the loss function. The predicted results of the initial state distribution and T-state transition probabilities are both represented as vectors. Since the number of subway lines traversed by each station and the number of transitional states when the train arrives at the target station differ, the length of the target vector varies for each station. Given a target station s... i Target vector y i D represents the dimension of the vector. i and These are the actual value and the predicted value, respectively. The symbol ‖.‖ represents the L1 norm of the vector.
[0105]
[0106] S3. Obtain given time and online passenger information, and estimate the fine-grained crowd size in each functional area of the subway in real time using the spatiotemporal network deep learning model. As one solution of this application, the real-time estimation of the fine-grained crowd size includes calculating the travel status of online passengers using the given time and online passenger information, then counting the number of passengers in each travel status, and estimating the fine-grained crowd size in each functional area of the subway in real time based on the correspondence between travel status and subway network functional areas.
[0107] Specifically, given time t, based on the status of online passengers, the number of passengers in each status is counted, and then, through the correspondence between the travel status and the functional areas of the subway network, the real-time crowd estimation results for each functional area of the subway network are given. (1) Given time t∈T k In the travel state I i,m The number of people is estimated using formula (13), where t′=t-ET i,m , This represents the queue entering the subway system during the time period (t′, t]. The number of passengers entering the station.
[0108]
[0109] (2) Generally, the number of people on a train only changes during the time between the train's arrival and departure from the station. For example, when line l m Train q at time t∈T k Arrival at station s i At that time, the number of people on the train will be adjusted by subtracting the number of people getting off. And add the crowd Update (e.g.) Figure 5 As shown in line 13 of Algorithm 1, where s j It is s i The previous site. Indicates at platform P i,m The number of people on train q who get off and leave the subway network (e.g.) Figure 5 (As shown in line 2 of Algorithm 1) This represents the number of people who disembark and leave the subway network on train q during a regular trip. If s i It is a transfer station. This indicates that you are getting off the train and transferring to another subway line. n The number of passengers (line 5 of Algorithm 1), This indicates getting off the train and transferring to another subway line during a regular trip. n The number of passengers. At platform P i,m The number of passengers who disembarked from train q is recorded as follows: (like Figure 5 As shown in line 8 of Algorithm 1, this represents the sum of the number of people arriving at the station and transferring. At platform P... i,m The number of passengers traveling on train q is denoted as (like Figure 5 As shown in line 12 of Algorithm 1, the actual number of passengers on board is affected by the train's maximum load C. max The impact of this requires calculating the boarding rate α, which is derived from the number of passengers waiting on the platform and the remaining capacity of the train q (Algorithm 1, line 10). Correspondingly, the number of people waiting on the platform is determined by... Figure 5 The algorithm updates line 14.
[0110] (3) Given time t∈T k In the travel state R i,m,n The number of people is estimated using formula (4-14), that is, for the time period (t′, t] from l m Transfer to l n Sum the total number of people in the population, where here, It is line l m Train q at station s i All times of arrival. Depend on Figure 5 The result is calculated in line 5 of Algorithm 1.
[0111]
[0112] (4) Given time t∈T kWhen time t represents any moment between the departure of the previous train and the arrival of the next train, the train is in the travel state. The number of people is estimated using formula (4-15), where t′ is the number of people the previous train left the station. i The time t represents the moment when the train leaves the station s. i At that moment, according to Figure 5 Algorithm 1, line 14 is updated.
[0113]
[0114] (5) Given time t∈T k In the process state O i,m The number of people is estimated using formula (4-16), that is, for the time period (t-ET) i,m [t] Arrival at station s i The number of people getting off the train U i,m,q Perform summation. This indicates that train q is at station s. i Platform P i,m Time of arrival.
[0115]
[0116] This application also includes a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method described in any of the preceding claims.
[0117] This application also includes a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, perform any of the methods described above.
[0118] In the above-mentioned technical solution of this application, by segmenting historical travel trajectories, the movement of people between different areas of the subway network is modeled as a dynamic process of travel state transition. Real-time travel state transition probabilities are calculated using deep learning methods, thereby estimating the real-time fine-grained population distribution of the subway network based on real-time card swiping data and train operation data. Compared with existing machine vision-based estimation methods, this application eliminates the need for deploying a large number of signal acquisition devices, resulting in a simpler hardware system, significantly reducing system costs while improving system stability, and eliminating the risk of privacy infringement. This application comprehensively considers relevant factors such as time, space, and weather, and uses graph convolutional networks and long short-term memory networks for modeling, which can significantly improve the accuracy of real-time population estimation in fine-grained areas of the subway.
[0119] The above are merely preferred embodiments of this application and do not limit the scope of the patent application. Any equivalent structural transformations made based on the inventive concept of this application and the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. A method for real-time estimation of fine-grained crowd size in subways, characterized in that, include By acquiring historical passenger entry and exit data and train operation data, estimating travel paths, segmenting historical travel trajectories, and obtaining the historical travel state transition probability; Deep learning is performed on the historical travel state transition probabilities to construct a spatiotemporal network deep learning model of travel state transition probabilities with mixed spatiotemporal context; By acquiring online passenger information at a given time, the spatiotemporal network deep learning model is used to estimate the fine-grained number of people in each functional area of the subway in real time.
2. The method for real-time estimation of subway crowd size with fine-grained precision as described in claim 1, characterized in that, The spatiotemporal network deep learning model includes: The time component models the periodicity of the time characteristics of the target subway station by embedding vectors; The spatial component models spatial correlations using graph convolutional networks, while leveraging long short-term memory networks to capture order dependencies in time series. The hybrid context learning component utilizes multiple fully connected neural network layers and a normalized exponential function to generate run state transition probabilities with hybrid spatiotemporal contexts.
3. The method for real-time estimation of fine-grained crowd size in subways as described in claim 2, characterized in that, The time features include at least monthly information, statutory holiday information, weekly information, and daily information.
4. The method for real-time estimation of fine-grained crowd size in subways as described in claim 2, characterized in that, The spatial component consists of multiple blocks, each block inputting different types of subway station features, including spatial matrix features, passenger flow features, and weather features; The output of each block is aggregated information of each type of neighbor, and the information of each type of neighbor in adjacent time periods is merged through the Long Short-Term Memory network.
5. The method for real-time estimation of subway crowd size with fine-grained precision as described in claim 2, characterized in that, The outputs of the spatial and temporal components are concatenated to create a spatiotemporal hybrid context, which is then input into the hybrid context learning component, which has multiple fully connected neural network layers, to obtain a multidimensional vector. The travel state transition probability is then calculated using a normalized exponential function.
6. The method for real-time estimation of fine-grained crowd size in subways as described in claim 2, characterized in that, After obtaining the state transition probability, the method also uses the mean absolute error as the loss function and utilizes the stochastic gradient descent algorithm to minimize the average error between the prediction result and the validation set.
7. The method for real-time estimation of fine-grained crowd size in subways as described in claim 1, characterized in that, The historical travel state transition probabilities include the initial state distribution and the travel state transition probabilities, wherein... The initial state distribution probability is the probability of a passenger's state selection after entering the subway station. The travel state transition probability is the probability that a passenger will transition from a travel state to another state.
8. The method for real-time estimation of fine-grained crowd size in subways as described in claim 1, characterized in that, The fine-grained real-time population size estimation specifically includes... Given a time and online passenger information, a spatiotemporal network deep learning model is used to calculate the travel status of online passengers. Then, the number of passengers in each travel status is counted. By analyzing the correspondence between travel status and subway network functional areas, the fine-grained number of people in each functional area of the subway is estimated in real time.
9. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, It stores computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-8.