Rail transit platform passenger flow monitoring method, medium and system

By constructing a three-dimensional human spatial occupancy model using a multi-resolution camera array and an improved OpenPose algorithm, and combining it with dynamic equations and risk assessment functions, the problem of insufficient accuracy in monitoring passenger flow at rail transit platforms was solved. This enabled precise perception and dynamic prediction of passenger flow, thereby improving the level of intelligent platform safety management.

CN120259978BActive Publication Date: 2025-12-16QINGDAO HENGXUN IND & TRADE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510422328.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-12-16
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

Existing passenger flow monitoring technologies for rail transit platforms lack precision, are unable to accurately identify individuals in crowded scenarios, and lack multi-scale spatial perception capabilities and real-time risk warning mechanisms, resulting in inaccurate or untimely hazard warnings.

Method used

A multi-resolution camera array is used to acquire platform images. An improved OpenPose algorithm is used to extract the human skeleton. A three-dimensional space occupancy model is established by constructing the maximum and minimum cylindrical virtual shells. Combined with human dynamics equations and risk assessment optimization functions, a human motion variation matrix is ​​generated. The overlap matrix is ​​analyzed to achieve accurate perception and dynamic prediction of pedestrian flow.

Benefits of technology

It enables accurate identification and tracking of individuals in crowded scenarios, improves spatial perception accuracy, can intelligently identify potential congestion bottlenecks and predict short-term passenger flow trends, providing sufficient time for risk warning and significantly enhancing the intelligence level and accuracy of platform safety management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259978B_ABST
    Figure CN120259978B_ABST
Patent Text Reader

Abstract

The present application provides a kind of rail transit platform crowd monitoring method, medium and system, belong to rail transit safety technical field, the present application constructs multiscale space monitoring network using multistage resolution camera array, extracts human posture feature point by improved OpenPose algorithm, establishes human three-dimensional space occupation model based on maximum cylinder virtual shell and minimum cylinder virtual shell.The system calculates human motion variation matrix to realize individual trajectory analysis, generates crowd density distribution map to evaluate the degree of crowding, and analyzes overlapping matrix to quantify the risk of crowding.By constructing weighted directed flow network, the maximum flow minimum cut algorithm is applied to identify congestion bottleneck points, combined with deep learning model to predict the trend of crowd flow to realize early warning.When the platform risk coefficient exceeds the preset threshold, the system triggers the hierarchical response mechanism to start the emergency response process, solving the problem of insufficient precision of rail transit platform crowd monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of rail transit safety technology, and in particular, relates to a rail transit platform passenger flow monitoring method, medium and system. BACKGROUND

[0002] Rail transit platform passenger flow monitoring is an important link to ensure the safe operation of public transportation. Traditional monitoring techniques mainly rely on single-view cameras, infrared sensors or pressure sensors and other equipment, and realize passenger flow statistics through simple counting or density estimation methods. These techniques usually use planar two-dimensional image processing or single-point detection methods, and realize personnel counting and simple spatial distribution analysis based on image segmentation, target detection and contour recognition algorithms.

[0003] However, the traditional monitoring techniques have many limitations in practical application. Single-view cameras are easily affected by occlusion, resulting in monitoring blind spots; simple two-dimensional image processing cannot accurately identify individuals in crowded scenes; traditional density estimation methods ignore the dynamic characteristics of human bodies and the interaction between individuals, and cannot accurately predict potential risks. In addition, the evaluation of the degree of passenger flow congestion by these techniques is usually based on static thresholds, lacking adaptability to dynamic scenes and early warning mechanisms.

[0004] In the face of dense passenger flow and complex flow at peak hours on rail transit platforms, existing techniques cannot simultaneously achieve high-precision individual identification and macro passenger flow situation awareness, cannot accurately establish individual spatial occupation models and dynamic change characteristics, and cannot real-time evaluate congestion risks and provide early warning of potential dangers. This technical problem seriously restricts the improvement of rail transit platform safety management efficiency. That is, there is a technical problem of insufficient rail transit platform passenger flow monitoring precision in existing techniques, which leads to inaccurate or timely danger warning. SUMMARY

[0005] Therefore, the present application provides a rail transit platform passenger flow monitoring method, medium and system, which can solve the technical problem of insufficient rail transit platform passenger flow monitoring precision in existing techniques, which leads to inaccurate or timely danger warning.

[0006] The present application is implemented as follows: The first aspect of the present application provides a rail transit platform passenger flow monitoring method, which uses a multi-level resolution camera array to obtain a panoramic image and a local high-definition image of the platform; uses an improved OpenPose algorithm to extract human skeletons from images in a multi-scale spatial monitoring network; constructs a maximum cylindrical virtual shell and a minimum cylindrical virtual shell for each detected human body, and establishes a human three-dimensional space occupation model; applies a human dynamics equation to predict and correct the individual motion state, and generates a human motion variation matrix; analyzes the overlap matrix, and uses a risk assessment optimization function to quantitatively evaluate the potential risk of passenger flow congestion.

[0007] wherein, the maximum cylindrical virtual shell refers to a minimum volume cylinder constructed based on the set of human posture feature points, which completely encloses the human body, and is used to represent the maximum occupation range of the human body in the platform space; the minimum cylindrical virtual shell refers to a cylinder constructed based on the center axis of the human body trunk determined in the set of human posture feature points, which only contains the core parts of the human body, and is used to accurately calculate the core position and movement characteristics of the human body.

[0008] wherein, the human motion variation matrix refers to a numerical matrix recording the position change, speed size and direction of each detected human body maximum cylindrical virtual shell and minimum cylindrical virtual shell between consecutive time frames, which is used for quantitative analysis of human flow dynamic characteristics.

[0009] wherein, the overlap matrix refers to a two-dimensional matrix calculating the spatial overlap degree between any two maximum cylindrical virtual shells or minimum cylindrical virtual shells in the platform area, and the matrix element value represents the closeness between the corresponding two human bodies.

[0010] wherein, the human flow density distribution map refers to a two-dimensional density map generated based on the spatial distribution of the maximum cylindrical virtual shell in the platform area, which is used to visually represent the human flow density of each area in the platform.

[0011] wherein, the risk assessment optimization function is used to map the multi-dimensional congestion characteristics to the standardized risk score, the input includes the maximum cylindrical virtual shell and minimum cylindrical virtual shell overlap degree obtained from the overlap matrix, the relative speed difference obtained from the human motion variation matrix, the spatial density gradient obtained from the human flow density distribution map, the human flow direction entropy value calculated from the human motion variation matrix, and the historical risk coefficient obtained from the historical data, and the output is the normalized risk score and the risk distribution heat map for platform risk coefficient calculation and risk visualization.

[0012] wherein, the platform risk coefficient refers to a dimensionless index calculated by considering the human flow density in the human flow density distribution map, the moving speed inconsistency in the human motion variation matrix, the direction inconsistency and the overlap degree in the overlap matrix, which is used to quantitatively evaluate the current safety state of the platform.

[0013] wherein, the human dynamics equation is used to predict and correct the motion state and future position of the human body in the platform environment based on Newton's law of motion, the input includes the estimated human body mass estimated from the set of human posture feature points, the current speed vector obtained from the human motion variation matrix, the environmental resistance coefficient obtained from the platform environment parameters, the human applied force estimated from the change of the set of human posture feature points, and the time increment obtained from the system settings, and the output is the corrected human body position and speed vector for updating the human motion variation matrix.

[0014] The second aspect of the present application provides a computer readable storage medium, wherein program instructions are stored in the computer readable storage medium, and the program instructions are used to execute the rail transit platform crowd monitoring method when running in a computer.

[0015] The third aspect of the present application provides a rail transit platform crowd monitoring system, comprising the computer readable storage medium described above, wherein the system is any one of a computer, a server and a single-chip microcomputer, the computer readable storage medium is arranged in the system, and a microprocessor for executing the program instructions stored in the computer readable storage medium is arranged in the system.

[0016] The present application constructs a multi-scale spatial monitoring network from individuals to groups. By introducing a human three-dimensional space occupation model of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell, combining a human dynamics equation and a risk assessment optimization function, accurate perception and dynamic prediction of platform crowd are realized.

[0017] The method effectively overcomes the limitations of traditional technologies, realizes accurate identification and tracking of individuals in crowded scenes, and eliminates monitoring blind spots; the crowd density analysis based on the human three-dimensional space occupation model improves the spatial perception accuracy; the introduction of the overlap matrix and the human motion variation matrix enables the system to accurately capture the dynamic characteristics of the crowd and the interaction between individuals. At the same time, through the weighted directed flow network and the deep learning model, the system can intelligently identify potential congestion bottleneck points and predict short-term crowd change trends, providing sufficient time for risk warning.

[0018] The present application successfully solves the technical problems of insufficient rail transit platform crowd monitoring accuracy, lack of multi-scale spatial perception ability and real-time risk warning mechanism by constructing a complete multi-scale crowd monitoring and risk assessment system, significantly improving the intelligent level and warning accuracy of platform safety management. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The flowchart of the method of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0021] As shown in Figure 1 Fig. 1 is a flowchart of a rail transit platform crowd monitoring method according to the first aspect of the present application, and the method comprises the following steps:

[0022] S01, a multi-level resolution camera array is used to acquire a platform panoramic image and a local high-definition image, and a multi-scale spatial monitoring network is constructed;

[0023] S02. Using the improved OpenPose algorithm, human skeletons are extracted from the panoramic and local high-definition images of the stations in the acquired multi-scale spatial monitoring network to form a set of human posture feature points.

[0024] S03. Based on the extracted set of human posture feature points, construct the maximum and minimum cylindrical virtual shells for each detected human body to establish a three-dimensional space occupancy model of the human body.

[0025] S04. Calculate the displacement vector of each maximum and minimum cylindrical virtual shell between adjacent time frames, apply the human dynamics equation to predict and correct the individual's motion state, generate the human motion variation matrix, and realize the analysis of the individual's movement trajectory.

[0026] S05. Calculate the number density of the largest cylindrical virtual shells in the platform area, construct a pedestrian density distribution map, and realize the assessment of the degree of pedestrian congestion;

[0027] S06. Analyze the overlap matrix between adjacent largest and smallest cylindrical virtual shells, and use the risk assessment optimization function to quantify the potential risk of crowd congestion, so as to achieve real-time risk level classification.

[0028] S07. Construct a weighted directed flow network for the platform area, combine the individual movement speed and direction consistency in the human motion variation matrix and the degree of overlap in the overlap matrix, apply the maximum flow minimum cut algorithm to identify potential congestion bottlenecks, calculate the platform risk coefficient for each area, and establish a multi-threshold early warning mechanism.

[0029] S08. Based on historical pedestrian density distribution data and real-time monitoring results, a deep learning model is applied to predict short-term pedestrian flow trends and achieve early warning.

[0030] S09. When the platform's hazard factor exceeds the preset threshold, a graded response mechanism is triggered, sending an early warning message to the platform management system and initiating the emergency response process.

[0031] Among them, the maximum cylindrical virtual shell refers to the smallest volume cylinder that completely surrounds the human body, based on the set of human posture feature points, and is used to represent the maximum area occupied by the human body in the platform space.

[0032] Among them, the minimum cylindrical virtual shell refers to a cylinder that is constructed with the central axis of the human torso determined in the set of human posture feature points as the central axis, and contains only the core part of the human body. It is used to accurately calculate the core position and movement characteristics of the human body.

[0033] Among them, the human motion variation matrix refers to the numerical matrix that records the position changes, velocity magnitude and direction of each detected human body's largest and smallest cylindrical virtual shells between consecutive time frames, and is used to quantitatively analyze the dynamic characteristics of human flow.

[0034] The overlap matrix refers to a two-dimensional matrix that calculates the degree of spatial overlap between any two largest or smallest cylindrical virtual shells within the platform area. The matrix element values ​​represent the degree of proximity between the corresponding two human bodies.

[0035] Among them, the crowd density distribution map refers to a two-dimensional density map generated based on the spatial distribution of the largest cylindrical virtual shell within the platform area, which is used to intuitively represent the crowd density in each area of ​​the platform.

[0036] Among them, the platform hazard coefficient is a dimensionless index calculated by comprehensively considering the pedestrian density in the pedestrian density distribution map, the inconsistency of movement speed and direction in the human movement variation matrix, and the degree of overlap in the overlap matrix. It is used to quantitatively assess the current safety status of the platform.

[0037] The human dynamics equation is used to predict and correct the motion state and future position of the human body in the platform environment based on Newton's laws of motion. The inputs include the estimated human mass value estimated from the set of human posture feature points, the current velocity vector obtained from the human motion variation matrix, the environmental drag coefficient obtained from the platform environment parameters, the human applied force estimated from the changes in the set of human posture feature points, and the time increment obtained from the system settings. The output is the corrected human position and velocity vector used to update the human motion variation matrix.

[0038] The risk assessment optimization function maps multidimensional congestion features to a standardized risk score. The inputs include the maximum and minimum cylindrical virtual shell overlap obtained from the overlap matrix, the relative speed difference obtained from the human motion variation matrix, the spatial density gradient obtained from the pedestrian density distribution map, the pedestrian flow direction entropy value calculated from the human motion variation matrix, and the historical risk coefficient obtained from historical data. The outputs are a normalized risk score and a risk distribution heatmap used for platform hazard coefficient calculation and risk visualization.

[0039] The specific implementation methods of the above steps are described in detail below. Step S01 involves installing multiple cameras of different resolutions on the rail transit platform to form a multi-level resolution camera array. First, a panoramic camera with a resolution of 1920×1080 pixels and a field of view of 120 degrees is installed on the top of the platform, covering the entire platform area. Then, local high-definition cameras with a resolution of 3840×2160 pixels and a field of view of 60 degrees are installed at key locations on the platform, such as entrances / exits, waiting areas, and platform edges, focusing on monitoring densely populated areas. These cameras ensure that the acquired images are time-aligned through a time synchronization mechanism, with a sampling frequency of 10Hz. The multi-level resolution camera array aims to balance monitoring coverage and detail capture capabilities. The panoramic camera provides macroscopic information on pedestrian distribution, while the local high-definition cameras provide microscopic information on human posture, together forming a multi-scale spatial monitoring network.

[0040] The specific implementation of step S02 involves extracting the human skeleton from images acquired in a multi-scale spatial monitoring network. First, the images are preprocessed, including illumination equalization, noise reduction, and image enhancement. Then, an improved OpenPose algorithm is used for human detection and keypoint localization. This algorithm is based on a convolutional neural network architecture and uses PAF (Part Affinity Fields) technology to connect human joints. The improved OpenPose algorithm improves detection accuracy by introducing an attention mechanism and multi-scale feature fusion, achieving over 90% accuracy in human detection in panoramic images and over 95% accuracy in human detection in local high-definition images. Through this step, the coordinates of 18 key skeletal nodes for each human body are extracted from the image, forming a set of human pose feature points. These feature points include the three-dimensional coordinate information of key positions such as the head, neck, shoulders, elbows, wrists, hips, knees, and ankles.

[0041] The specific implementation of step S03 involves constructing a virtual shell model based on a set of human posture feature points. First, the human torso's central axis is fitted using the least squares method to determine the central axis. Then, based on the spatial distribution of the human posture feature points, the parameters of the maximum circumscribed cylinder are calculated to construct a maximum cylindrical virtual shell. Its radius is the maximum distance from the human posture feature points to the central axis, and its height is the vertical distance from the top of the head to the bottom of the feet. Next, based on the key points of the human torso, a minimum cylindrical virtual shell is constructed. Its radius is 1.2 times the average distance from the key points of the torso to the central axis, and its height is the vertical distance from the neck to the hip. The maximum cylindrical virtual shell represents the maximum area occupied by the human body in the platform space and is suitable for congestion risk assessment; the minimum cylindrical virtual shell represents the core position of the human body and is suitable for precise trajectory tracking. Together, these two virtual shells constitute a three-dimensional spatial occupancy model of the human body.

[0042] The specific implementation of step S04 is to calculate human motion parameters based on the changes in the position of the virtual shell in continuous time frames. First, the Hungarian algorithm is used to match the corresponding human body between adjacent frames. Then, the displacement vectors of the center points of the largest and smallest cylindrical virtual shells for each corresponding human body are calculated between two adjacent frames. Next, the human motion state is predicted and corrected using the human dynamics equation. The human dynamics equation is based on Newton's laws of motion, considering parameters such as the estimated human mass, current velocity vector, environmental drag coefficient, applied force, and time increment, outputting the corrected human position and velocity vectors. The estimated human mass is estimated based on the distribution range of the human posture feature point set and statistical data; the environmental drag coefficient is set to 0.3; and the time increment is the time interval between adjacent frames, typically 0.1 seconds. This step generates a human motion variation matrix containing position, velocity, and acceleration information, providing a data foundation for subsequent trajectory analysis.

[0043] The specific implementation of step S05 is to calculate pedestrian density based on the spatial distribution of the largest cylindrical virtual shell. First, the platform area is divided into grid cells of 0.5m × 0.5m. Then, the number of largest cylindrical virtual shells within each grid cell is counted. Next, a kernel density estimation algorithm is used to smooth the discrete quantity distribution, generating a continuous pedestrian density distribution map. The kernel density estimation algorithm uses a Gaussian kernel function, with a bandwidth parameter set to 1.5m, determined based on the average human body width and platform environmental characteristics. Pedestrian density thresholds are set as follows: low density 0–2 people / m², medium density 2–4 people / m², high density 4–6 people / m², and ultra-high density greater than 6 people / m². The pedestrian density distribution map visually displays the pedestrian density in different areas of the platform through color gradients, providing a quantitative basis for assessing pedestrian congestion.

[0044] The specific implementation of step S06 involves calculating the spatial relationship between virtual shells and assessing congestion risk. First, the shortest distance and overlap volume between any two largest cylindrical virtual shells within the platform area are calculated; then, the shortest distance and overlap volume between any two smallest cylindrical virtual shells are calculated. Next, an overlap matrix is ​​constructed, where each element represents the proximity between two corresponding human figures, ranging from 0 to 1, where 0 indicates no contact and 1 indicates complete overlap. Based on the overlap matrix, a risk assessment optimization function is used to quantify and assess congestion risk. The risk assessment optimization function uses a weighted summation form. Inputs include the overlap degree between the largest and smallest cylindrical virtual shells, relative speed difference, spatial density gradient, pedestrian flow direction entropy, and historical risk coefficient. The weights for each parameter are 0.3, 0.2, 0.2, 0.2, and 0.1, respectively. Outputs a normalized risk score and a risk distribution heatmap. Risk level thresholds are set as follows: low risk 0–0.3, medium risk 0.3–0.6, high risk 0.6–0.8, and extremely high risk 0.8–1.0.

[0045] The specific implementation of step S07 is based on graph theory to analyze passenger flow bottlenecks and calculate platform risk coefficients. First, the platform area is abstracted as a weighted directed graph, where nodes represent platform area units, edges represent passenger movement paths, and edge weights are determined comprehensively based on the flow rate in the human motion variation matrix and the congestion level in the overlap matrix. Then, the maximum flow minimum cut algorithm is applied to identify bottleneck points in the network, which are typically high-incidence areas of passenger congestion. The maximum flow minimum cut algorithm effectively identifies potential congestion points in the platform by finding the maximum flow rate from the entrance node to the exit node and the minimum cut set that divides the graph into two parts. Based on the identified bottleneck points and the risk distribution heatmap, the platform risk coefficient for each area is calculated. The platform risk coefficient calculation considers passenger flow density, inconsistency in movement speed, inconsistency in direction, and degree of overlap, and sets a multi-level threshold early warning mechanism: a warning threshold of 0.5, a warning threshold of 0.7, and an emergency threshold of 0.9.

[0046] The specific implementation of step S08 involves using deep learning to predict the changing trends of passenger flow on the platform. First, a time-series dataset is constructed, including historical passenger flow density distribution data and the platform hazard coefficient for the corresponding time period. Then, a deep learning model combining a long short-term memory network and an attention mechanism is used for training. The model input is time-series data from the past 30 minutes, with a time step of 1 minute, and the output is the passenger flow prediction result for the next 5 minutes. The model training uses mean squared error as the loss function, employs the Adam optimizer for parameter updates, sets the learning rate to 0.001, and performs 100 training epochs. The prediction accuracy threshold is set to 85%; if it falls below this threshold, the model parameters need to be readjusted. Through the deep learning model, the system can predict short-term passenger flow trends on the platform and issue early warning information 3-5 minutes in advance, providing platform management personnel with sufficient response time.

[0047] The specific implementation of step S09 involves establishing a tiered response mechanism based on risk factors. First, a three-tiered response strategy is set according to the platform's risk factor: When the platform's risk factor exceeds the warning threshold of 0.5 but is below the alert threshold of 0.7, the system sends a Level 1 warning to platform management personnel, suggesting an increase in patrol frequency; when the platform's risk factor exceeds the alert threshold of 0.7 but is below the emergency threshold of 0.9, the system sends a Level 2 warning to platform management personnel and simultaneously broadcasts guidance information through the station's public address system to manage passenger flow; when the platform's risk factor exceeds the emergency threshold of 0.9, the system sends a Level 3 warning to platform management personnel and simultaneously initiates emergency response procedures, including temporary restrictions on entry and the addition of temporary trains. The execution time requirements for the response mechanism are: Level 1 warning response time not exceeding 30 seconds, Level 2 warning response time not exceeding 20 seconds, and Level 3 warning response time not exceeding 10 seconds. Through this tiered response mechanism, the system can take corresponding prevention and control measures according to the degree of risk, effectively preventing platform overcrowding and stampedes.

[0048] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for monitoring passenger flow at a rail transit platform.

[0049] A third aspect of the present invention provides a rail transit platform passenger flow monitoring system, comprising the aforementioned computer-readable storage medium. The system is any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.

[0050] The mathematical model or calculation process involved in this invention will be described in detail below.

[0051] In step S04, the human body dynamics equations involve multiple calculation processes, as detailed below:

[0052]

[0053] In the formula, Let t be the human body position vector at time t; Let t be the human body velocity vector. Let t be the human acceleration vector at time t; Δt is the time increment. Applying force to the human body; C d The environmental resistance coefficient; m h This is an estimate of body mass. These are the error vectors for position, velocity, and acceleration, respectively.

[0054] The parameter acquisition method is as follows: and Obtained from the human motion variation matrix of the previous frame; Δt is the time interval between adjacent frames, usually set to 0.1 seconds; The estimation is derived by analyzing the changes in the set of human pose feature points across consecutive frames, and the calculation formula is as follows: Where k f This is a force estimation coefficient, with a value ranging from 20 to 50 Newtons per meter. C is the displacement vector of the key attitude point; d The environmental resistance coefficient is set to 0.3 based on the platform's environmental characteristics; it is dimensionless. (m) h The estimated human body mass is calculated by combining the distribution range of the human posture feature point set with statistical data. The formula is as follows: Where k m The quality estimation coefficient is 3.5, h. h Human height, in meters; The ranges are ±0.05 m, ±0.03 m / s, and ±0.01 m / s, respectively. 2 .

[0055] The human dynamics equations are constructed based on Newton's laws of motion, taking into account the physical characteristics of human movement. The first equation describes the change in position over time, using a second-order Taylor expansion, and includes velocity, acceleration, and position error terms, enabling relatively accurate prediction of short-term positional changes. The second equation describes the change in velocity over time, considering the effects of acceleration and velocity error terms. The third equation, based on Newton's second law, describes the calculation process of acceleration, considering the body's active force, environmental drag, and acceleration error terms. The environmental drag term is proportional to velocity, consistent with the drag characteristics of low-speed motion. Introducing error terms compensates for the effects of model simplification and measurement errors, improving prediction accuracy.

[0056] In step S05, the kernel density estimation algorithm is used to generate a pedestrian density distribution map, as shown below:

[0057]

[0058] In the formula, D(x, y) is the pedestrian density at point (x, y); n is the number of people in the platform area; h is the bandwidth parameter; (x i y i ) represents the center position of the largest cylindrical virtual shell of the i-th human body; K(u, v) is the two-dimensional Gaussian kernel function; ε d This is the density estimation error term.

[0059] The parameters are obtained as follows: n is obtained by calculating the total number of the largest cylindrical virtual shells; h is the bandwidth parameter, set to 1.5 meters, determined based on the average human body width and platform environment characteristics; (x i yi ) Obtained from the spatial location information of the largest cylindrical virtual shell; ε d The range is ±0.2 people / square meter.

[0060] The kernel density estimation algorithm employs a non-parametric density estimation method, generating a smooth, continuous distribution by placing kernel functions around each observation point and superimposing them. The Gaussian kernel function is chosen because of its favorable mathematical properties and smoothing characteristics, capable of handling the randomness and uncertainty of human body positions. The bandwidth parameter h controls the degree of smoothing; a larger value results in a stronger smoothing effect. This algorithm can transform discrete human body position information into a continuous density distribution, intuitively reflecting the crowd density in different areas of the platform and providing a quantitative basis for congestion risk assessment.

[0061] In step S06, the calculation of the overlap matrix involves the following formula:

[0062]

[0063] In the formula, O ij V represents the overlap between the i-th and j-th cylindrical virtual shells in the overlap matrix; overlap (C i C j V represents the overlapping volume of two cylindrical virtual shells; i V j Let d represent the volumes of the i-th and j-th cylindrical virtual shells, respectively; ij r is the horizontal distance between the central axes of the two cylindrical virtual shells. i r j , h, are the radii of the i-th and j-th cylindrical virtual shells, respectively; min h max These represent the lower and upper limits of the overlapping height range of the two cylindrical virtual shells, respectively; ε o This is the error term for overlapping calculations.

[0064] The parameter acquisition method is: V i V j r i r j Obtain from the geometric parameters of the largest or smallest cylindrical virtual shell; (x i y i ), (x j y j Obtained from the spatial location information of the cylindrical virtual shell; h min h max The height range of the two cylindrical virtual shells was calculated, specifically h. min =max(h i,bottom h j,bottom ), h max =min(h)i,top h j,top ), where h i,bottom h i,top h j,bottom h j,top These are the heights of the bottom and top of the two cylinders, respectively; ε o The range is ±0.01.

[0065] The overlap matrix calculation formula is based on geometric principles, considering the intersection relationship between cylinders in three-dimensional space. The overlap degree is defined as the ratio of the overlapping volume to the smaller volume, ensuring a value between 0 and 1 for ease of subsequent risk assessment. The overlapping volume calculation formula considers two cases: when the distance between the central axes of the two cylinders is less than the sum of their radii, the overlapping volume is calculated through integration; otherwise, the overlap degree is 0. Introducing an error term compensates for the effects of approximate calculation and measurement errors. This calculation method can quantify the spatial proximity between people, providing a key indicator for crowding risk assessment.

[0066] In step S06, the calculation of the risk assessment optimization function involves the following formula:

[0067] R(p)=w1O p +w2V p +w3G p +w4H p +w5H p,hist +ε r ;

[0068]

[0069] In the formula, R(p) is the risk score at location p; w1, w2, w3, w4, and w5 are weighting coefficients, with values ​​of 0.3, 0.2, 0.2, 0.2, and 0.1, respectively; O p V represents the average overlap within the neighborhood of location p; p G represents the average relative velocity difference within the neighborhood of position p; p H is the normalized density gradient at position p; p H represents the entropy value of the pedestrian flow direction at position p; p,hist ε is the historical risk coefficient at location p; r For risk assessment error term; n p N represents the number of people in the neighborhood of location p; p Let p be the set of neighborhoods of position p; V is the velocity vector of human body i and j; max Maximum speed threshold; G is the gradient norm of the pedestrian density at location p; max P is the maximum gradient threshold; kLet p be the probability that the flow of people at position p moves in the k-th direction; K is the number of directions.

[0070] The parameter acquisition method is: O ij Obtained from the overlap matrix; Obtained from the human motion variation matrix; V max The speed was set to 2 meters per second, based on the upper limit of normal walking speed for humans in the platform environment. G is obtained by calculating the spatial derivative of the pedestrian density distribution map. max The value is set at 4 people / square meter / meter, based on experience with crowded platform scenarios; Pk 通 The distribution of human motion directions within the neighborhood of position p is obtained through statistical analysis, and the calculation formula is as follows: Where n k H represents the number of people moving in the k-th direction; K is set to 8, meaning the 360 ​​degrees are divided into 8 equal directions; p,hist Obtained from historical data, the calculation method is an index-weighted average of the risk scores for that location over the past 10 minutes; ε r The range is ±0.05.

[0071] The risk assessment optimization function employs a weighted summation form, comprehensively considering various congestion characteristics. The average overlap term reflects the spatial proximity between people, and has the highest weight because spatial overlap is the most direct indicator of congestion risk. The average relative speed difference term measures the inconsistency in pedestrian flow speed; a larger speed difference indicates more chaotic flow and higher risk. The normalized density gradient term measures the spatial rate of change in pedestrian density; a large gradient implies abrupt density changes, easily leading to congestion points. The pedestrian flow direction entropy term quantifies directional consistency; a higher entropy value indicates more chaotic direction and higher risk. The historical risk coefficient term incorporates temporal continuity, considering the cumulative effect of risk. All terms are normalized to ensure values ​​range from 0 to 1, facilitating comprehensive assessment. The weighting coefficients are determined based on importance and experimental verification; adjusting the weights can adapt to the risk assessment needs of different scenarios.

[0072] In step S07, the construction of the weighted directed flow network and the application of the maximum flow minimum cut algorithm involve the following formulas:

[0073] G = (V, E, C);

[0074] C(e ij )=α·F ij ·(1-β·O ij );

[0075]

[0076] Cut(S, T) = ∑ i∈S,j∈T C(e ij );

[0077] In the formula, G is a weighted directed graph; V is a set of nodes representing platform area units; E is a set of edges representing pedestrian movement paths; C is a capacity function representing the weight of the edges; e ij Let be the edge from node i to node j; α be the flow weight coefficient; β be the congestion impact coefficient; O ij F represents the average overlap between nodes i and j; ij The average pedestrian flow from node i to node j; T is the length of the statistical time window; n ij (t) represents the number of people who move from node i to node j at time t; MaxFlow(G, s, t) represents the maximum flow from source node s to sink node t; Cut(S, T) represents the capacity of the cut set (S, T).

[0078] The parameter acquisition method is as follows: the node set V is generated by dividing the platform area into 1m × 1m grid cells; the edge set E is determined based on the connectivity between adjacent grid cells, with each node connected to its 8 surrounding adjacent nodes; α is set to 1.5, adjusted based on experiments; β is set to 2.0, adjusted based on experiments; O ij Obtain the average value from the overlap matrix of the corresponding region; n ij (t) is obtained by counting the number of people who move from node i to node j at time t; T is set to 300 seconds, or 5 minutes.

[0079] The weighted directed flow network model, based on graph theory, abstracts the platform area into discrete grid cells and connectivity relationships. The capacity function design considers two factors: passenger flow F. ij Reflecting historical traffic capacity, the congestion impact factor (1-β·O) ij The expression () represents the weakening effect of congestion on traffic capacity. The maximum flow minimum cut algorithm, based on network flow theory, effectively identifies bottlenecks in a station by finding the maximum flow from the entry node to the exit node and the minimum cut set that divides the graph into two parts. This algorithm is chosen because it accurately reflects the bottleneck effect in the network; bottlenecks typically correspond to potentially congested areas within the station. The algorithm's complexity is O(|V|). 2 |E|), the computational efficiency is acceptable in station-scale networks.

[0080] In step S07, the calculation of the platform hazard factor involves the following formula:

[0081] DS(r)=γ1·D n (r)+γ2·VS(r)+γ3·DS(r)+γ4·OS(r)+γ5·BF(r)+ε ds ;

[0082] D n(r)=min{D(r) / D crit ,1};

[0083]

[0084] In the formula, DS(r) is the platform hazard coefficient for region r; γ1, γ2, γ3, γ4, and γ5 are weighting coefficients, which are 0.25, 0.2, 0.2, 0.25, and 0.1, respectively; D n ε(r) represents the normalized pedestrian density of region r; VS(r) represents the speed inconsistency index of region r; DS(r) represents the directional inconsistency index of region r; OS(r) represents the average overlap of region r; BF(r) represents the bottleneck factor; ε ds The error term for the hazard factor calculation; D(r) is the population density in area r; D crit The critical population density; n r N represents the number of people within region r; r Let r be the set of human bodies within region r; V represents the standard deviation of the human body's velocity vector i within the time window; std,max δ is the maximum threshold for the standard deviation of velocity; δ is a small constant to prevent the denominator from being zero.

[0085] The parameter is obtained as follows: D(r) is obtained from the pedestrian density distribution map; D crit The limit is set at 6 people per square meter, based on safe crowd density standards. Obtained from the human motion variation matrix; V std,max The speed was set at 0.5 m / s, determined experimentally; O ij Obtained from the overlap matrix; bottleneck points are identified using the maximum flow minimum cut algorithm; δ is set to 0.01; ε ds The range is ±0.03.

[0086] The platform hazard coefficient calculation formula uses a weighted summation method, comprehensively considering multiple risk factors. The normalized crowd density term reflects the basic level of congestion and uses a piecewise function; the risk reaches its maximum when the density exceeds a critical value. The speed inconsistency index measures the volatility of crowd speed by calculating the speed standard deviation; greater volatility indicates more unstable crowd flow. The direction inconsistency index measures the degree of disorder in crowd direction by calculating the consistency of speed vectors; a value closer to 1 indicates more dispersed directions. The average overlap term directly reflects the degree of contact between people and is a direct indicator of personal safety risk. The bottleneck factor considers network structure characteristics, increasing the risk rating for areas containing bottleneck points. The weighting coefficients for each term are determined based on importance and experimental verification and can be adjusted according to different scenario requirements. This calculation method can comprehensively assess the safety status of the platform area, providing a quantitative basis for early warning mechanisms.

[0087] Optionally, in step S02, the improved OpenPose algorithm involves the calculation process of human pose feature point extraction, as specifically shown below:

[0088] S j =F j (I)·(1+λA j (I))+ε s ;

[0089] F j (I) = CNN pose (I) j ;

[0090]

[0091]

[0092] In the formula, S j F is the score for the j-th person's key points; j (I) represents the detection result of the basic pose feature extraction function on the j-th keypoint in image I; λ is the weight coefficient of the attention mechanism; A j (I) is the attention enhancement function; ε s Error term extraction for feature points; CNN pose Convolutional Neural Network (CNN) for pose estimation; att This is a convolutional neural network with an attention mechanism; σ is the sigmoid activation function; w jk P represents the weight of the k-th attention feature to the j-th keypoint; K is the number of attention features; P conf J represents the confidence level for human posture detection; J represents the total number of human key points.

[0093] The parameter acquisition method is as follows: I represents the image acquired by a multi-resolution camera array; CNN pose and CNN att The pre-trained model was fine-tuned for the platform scenario using transfer learning; λ was set to 0.5 and determined through validation set optimization; w jk Obtained through backpropagation training; K is set to 16, based on the model architecture design; J is set to 18, corresponding to the 18 key points of the standard human skeleton model; ε s The range is ±0.05.

[0094] The improved OpenPose algorithm is based on the original OpenPose framework, but improves detection accuracy by introducing an attention mechanism. The basic pose feature extraction function F... j (I) Extracting key human features using a convolutional neural network constitutes the main part of the detection process. Attention enhancement function A j(I) An attention map is generated through another convolutional neural network and normalized to between 0 and 1 using the sigmoid function to enhance the feature representation of important regions. The two are weighted and combined to form the final keypoint score, with the λ parameter introduced to control the influence of the attention mechanism. The confidence score is calculated by averaging all keypoint scores to evaluate the overall detection quality and is used to filter valid detection results. Compared to the original OpenPose, this algorithm improves detection capabilities in crowded scenes, especially in handling partial occlusion.

[0095] Optionally, in step S03, the construction of the maximum and minimum cylindrical virtual shells involves the following calculations:

[0096]

[0097] r max =max j=1,2,...,J d(P j ,L)+δ r ;

[0098]

[0099] In the formula, This represents the central axis of the human torso, starting from the... and direction vector Determined; d(P) j L) is point P j The distance to line L; Let t be the three-dimensional coordinates of the j-th human body key point; j For projection parameters; ε l For the central axis fitting error term; r max δ is the radius of the maximum cylindrical virtual shell; r For radius safety margin; h max This represents the maximum height of the cylindrical virtual shell. The height coordinates of the key points; δ h For a high safety margin; r min The minimum cylindrical virtual shell radius; T is the set of key points of the torso; h min This represents the minimum height of the cylindrical virtual shell. The elevation coordinates of the key points in the neck; These are the height coordinates of key points on the hip.

[0100] The parameter acquisition method is as follows: Obtained from a set of human posture feature points; T includes an index set of key points for the shoulders, chest, and waist; δ r The setting is 0.1 meters for safety reasons; δ hThe value was set to 0.05 meters for safety reasons; the fitting process employed the least squares method through iterative optimization; ε l The range is ±0.02 meters.

[0101] The virtual shell construction formula is based on geometric principles, abstracting the human body as a cylinder. The central axis fitting formula uses the least squares method, finding the best-fit line by minimizing the sum of the squared distances from all key points to the line. The point-to-line distance formula is based on vector calculation, representing the Euclidean distance from a point to its projection point on the line. The maximum cylinder parameter calculation is based on the envelope principle: the radius is the maximum distance from all key points to the central axis plus a safety margin, and the height is the maximum height difference of key points plus a safety margin, ensuring complete enclosure of the human body. The minimum cylinder parameter calculation is based on the core area of ​​the human body: the radius is the average distance from the torso key points to the central axis multiplied by a coefficient of 1.2, and the height is the distance from the neck to the hip, focusing on representing the core area of ​​the human body. The two virtual shell designs balance safety and accuracy, providing spatial representations of different granularities for subsequent congestion risk assessment and trajectory analysis.

[0102] Optionally, in step S08, the crowd prediction using the long short-term memory network combined with the attention mechanism involves the following calculation process:

[0103]

[0104]

[0105] In the formula, Let be the LSTM hidden state vector at time t; LSTM is the Long Short-Term Memory network function. Let be the input feature vector at time t; ε represents the LSTM cell state at time t-1; h Let α be the hidden state error vector; t,i is the attention weight, representing the degree of attention given to historical time i at current time t; score is the attention score function; Here is the parameter matrix of the attention mechanism; tanh is the hyperbolic tangent activation function; Indicates a vector concatenation operation; This is a context vector, representing a weighted combination of historical information; To predict the output vector; These are the output layer parameters; This is the prediction error vector.

[0106] The parameter acquisition method is as follows: The features of the crowd density distribution map at time t, the platform hazard coefficient, and time-coded information are extracted from the raw data through a feature extraction network; the LSTM network structure contains 3 layers, with 128 hidden units in each layer. The sequence was trained using the backpropagation algorithm; the input sequence length T was set to 30, corresponding to 30 minutes of historical data. The range is ±0.01; The range is ±0.05.

[0107] The crowd flow prediction model is based on sequence learning theory, employing an LSTM network to capture long-term dependencies in time series data and incorporating an attention mechanism to enhance the utilization of key historical information. The LSTM function handles input, forgetting, and output through gating, effectively learning patterns in long-sequence data. The attention mechanism assigns weights based on the correlation between the current hidden state and historical hidden states, enabling the model to dynamically focus on relevant historical information. The attention score function uses an additive approach, calculating correlation scores from trainable parameters and then normalizing them using softmax to obtain attention weights. The context vector is generated by weighted combination of historical hidden states, containing important historical information. Final prediction is performed by concatenating the current hidden state and the context vector, fully utilizing both current and historical information. This model can capture complex spatiotemporal patterns of crowd flow changes, achieving high-precision short-term crowd flow prediction and providing crucial support for early warning systems.

[0108] Specifically, the principle of this invention is: the technical principle of this invention is based on the organic combination of a multi-dimensional human body space model and a dynamic risk assessment system. By constructing a multi-level monitoring framework from micro-individuals to macro-groups, it realizes all-round passenger flow monitoring and early warning at rail transit platforms.

[0109] First, the application of a multi-resolution camera array solves the blind spot problem of traditional single-view monitoring systems. By simultaneously deploying panoramic cameras and local high-definition cameras, the system can simultaneously acquire overall platform status and local detail information, establishing a multi-scale spatial monitoring network. The improved OpenPose algorithm optimizes traditional skeleton extraction techniques, enhancing detection capabilities in crowded scenes and providing a high-quality set of human pose feature points for subsequent analysis.

[0110] In human body space occupancy modeling, this invention innovatively introduces a two-layer representation method using a maximum and minimum cylindrical virtual shell. The maximum cylindrical virtual shell completely surrounds the human body, reflecting the individual's maximum occupancy area in space; the minimum cylindrical virtual shell accurately describes the core location of the human body for trajectory analysis. This two-layer representation method solves the problem that traditional point or rectangular representations cannot accurately reflect the characteristics of human body space occupancy, providing a more accurate basis for human flow density calculation and risk assessment.

[0111] The introduction of human dynamics equations enables the system to physically model individual motion states based on Newton's laws of motion, allowing for the prediction and correction of future positions. The human motion variation matrix and overlap matrix quantify the relative motion states and spatial relationships between individuals, providing multi-dimensional feature inputs for risk assessment. The risk assessment optimization function integrates these features, mapping complex crowd flow states to standardized risk scores, thus achieving precise quantification of congestion risk.

[0112] At the macro level, the system constructs the platform as a weighted directed flow network, applies the maximum flow minimum cut algorithm to identify potential congestion bottlenecks, and combines a deep learning model to analyze historical data to predict short-term passenger flow trends. A multi-threshold early warning mechanism adaptively triggers different levels of response measures based on changes in the platform's risk coefficient, ensuring the timeliness and accuracy of risk warnings.

[0113] Through this complete technical chain, from individual spatial modeling to group dynamic analysis, and then to risk prediction and early warning, this invention achieves comprehensive perception and intelligent control of passenger flow on rail transit platforms, providing a systematic solution to solve core technical problems.

[0114] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.

[0115] The specific implementation of step S01 involves installing multiple cameras with different resolutions on the rail transit platform, forming a multi-level resolution camera array. First, a panoramic camera with a resolution of 1920×1080 pixels and a field of view of 120 degrees is installed on the platform top, covering the entire platform area. Then, local high-definition cameras with a resolution of 3840×2160 pixels and a field of view of 60 degrees are installed at key locations on the platform, such as entrances / exits, waiting areas, and platform edges, focusing on monitoring densely populated areas. These cameras ensure image time alignment through a time synchronization mechanism, with a sampling frequency of 10Hz. The multi-level resolution camera array aims to balance monitoring coverage and detail capture capabilities. The panoramic camera provides macroscopic information on pedestrian distribution, while the local high-definition cameras provide microscopic information on human posture, together forming a multi-scale spatial monitoring network. The ratio of panoramic cameras to high-definition cameras is 1:3, ensuring high-precision monitoring coverage of key areas of the platform. The cameras are installed at a height of 3–4 meters, with a downward viewing angle of 30–45 degrees to reduce the impact of human occlusion. The overlapping field of view between cameras accounts for 20% to 30% of the total field of view, which is used for multi-view fusion and seamless stitching.

[0116] The specific implementation of step S02 involves extracting the human skeleton from images acquired in a multi-scale spatial monitoring network. First, the images are preprocessed, including illumination equalization, noise reduction, and image enhancement. Then, an improved OpenPose algorithm is used for human detection and keypoint localization. This algorithm is based on a convolutional neural network architecture and uses Part Affinity Fields technology to connect human joints. The specific calculation process of the improved OpenPose algorithm is as follows: S j =F j (I)·(1+λA j (I))+ε s ;F j (I) = CNN pose (I) j ; In the formula, S j F is the score for the j-th person's key points; j (I) is the detection result of the basic pose feature extraction function on the j-th keypoint in image I; λ is the weight coefficient of the attention mechanism, set to 0.5; A j (I) is the attention enhancement function; ε s The feature point extraction error term is defined, with a range of ±0.05; CNN pose Convolutional Neural Network (CNN) for pose estimation; att This is a convolutional neural network with an attention mechanism; σ is the sigmoid activation function; w jk P represents the weight of the k-th attention feature to the j-th keypoint; K is the number of attention features, set to 16; conf The confidence score for human pose detection is set to J, representing the total number of human keypoints, which is set to 18. This step extracts the coordinates of 18 key skeletal nodes for each human body from the image, forming a set of human pose feature points. The keypoint confidence threshold is set to 0.6; detection results below this threshold are filtered out. For occlusion, the algorithm uses spatiotemporal consistency constraints for compensation, predicting the location of occluded keypoints based on the keypoint trajectories of adjacent frames.

[0117] The specific implementation of step S03 is to construct a virtual shell model based on the set of human posture feature points. First, the central axis of the human torso is fitted using the least squares method to determine the human central axis. Then, based on the spatial distribution of the human posture feature point set, the parameters of the maximum circumscribed cylinder are calculated to construct the maximum cylindrical virtual shell. Next, based on the key points of the human torso, the minimum cylindrical virtual shell is constructed. The calculation process for constructing the virtual shell is specifically represented as follows: r max =max j=1,2,...,J d(P j ,L)+δr ; In the formula, This represents the central axis of the human torso, starting from the... and direction vector Determined; d(P) j L) is point R j The distance to line L; Let t be the three-dimensional coordinates of the j-th human body key point; j For projection parameters; ε l The central axis fitting error term has a range of ±0.02 meters; r max δ is the radius of the maximum cylindrical virtual shell; r For the radius safety margin, it is set to 0.1 meters; h max This represents the maximum height of the cylindrical virtual shell. The height coordinates of the key points; δ h For a high safety margin, it is set at 0.05 meters; min The minimum cylindrical virtual shell radius; T is the set of key points of the torso; h min This represents the minimum height of the cylindrical virtual shell. The elevation coordinates of the key points in the neck; The height coordinates of key hip points are shown. The maximum cylindrical virtual shell represents the maximum area occupied by the human body in the platform space, suitable for crowding risk assessment; the minimum cylindrical virtual shell represents the core position of the human body, suitable for precise trajectory tracking. The two virtual shells together constitute the three-dimensional spatial occupancy model of the human body. For abnormal posture situations, a threshold of 3.0 is set for the ratio of the maximum to minimum cylinder radii; exceeding this threshold will trigger an anomaly detection mechanism.

[0118] The specific implementation of step S04 is to calculate human motion parameters based on the positional changes of the virtual shell in continuous time frames. First, the Hungarian algorithm is used to match the corresponding human bodies between adjacent frames; then, the displacement vectors of the center points of the largest and smallest cylindrical virtual shells for each corresponding human body are calculated between two adjacent frames; finally, the human motion state is predicted and corrected using the human dynamics equations. The human dynamics equations are specifically expressed as follows: In the formula, Let t be the human body position vector at time t; Let t be the human body velocity vector. Let t be the human acceleration vector at time t; Δt is the time increment, set to 0.1 seconds; Applying force to the human body, through formula Calculate, where k f This is a force estimation coefficient, with a value ranging from 20 to 50 Newtons per meter. C is the displacement vector of the key attitude point; dThe environmental drag coefficient is set to 0.3; m h The estimated human body mass is obtained through the formula. Calculate, where k m The quality estimation coefficient is 3.5, h. h Human height; These are the error vectors for position, velocity, and acceleration, respectively, with ranges of ±0.05 m, ±0.03 m / s, and ±0.01 m / s. 2 The similarity threshold for the matching algorithm is set to 0.7; matches below this threshold are rejected, considered as the appearance of a new target or the disappearance of the original target. This step generates a human motion variation matrix containing position, velocity, and acceleration information, providing a data foundation for subsequent trajectory analysis. For sudden motion changes, an acceleration threshold of 2.0 m / s is set. 2 Exceeding this threshold will trigger abnormal behavior detection.

[0119] The specific implementation of step S05 is to calculate pedestrian density based on the spatial distribution of the largest cylindrical virtual shell. First, the platform area is divided into grid cells of size 0.5m × 0.5m; then, the number of largest cylindrical virtual shells within each grid cell is counted; next, a kernel density estimation algorithm is used to smooth the discrete quantity distribution, generating a continuous pedestrian density distribution map. The kernel density estimation algorithm is specifically expressed as follows: In the formula, D(x, y) is the pedestrian density at point (x, y); n is the number of people in the platform area; h is the bandwidth parameter, set to 1.5 meters; (x i y i ) represents the center position of the largest cylindrical virtual shell of the i-th human body; K(u, v) is the two-dimensional Gaussian kernel function; ε d The density estimation error term is set at ±0.2 people / m². Crowd density thresholds are set as follows: low density 0–2 people / m², medium density 2–4 people / m², high density 4–6 people / m², and ultra-high density greater than 6 people / m². The crowd density distribution map uses a color gradient to visually display the crowd density in different areas of the platform: green represents low density, yellow represents medium density, orange represents high density, and red represents ultra-high density. A warning threshold of 0.5 people / m² / second is set for the density change rate; exceeding this threshold indicates rapid crowd accumulation and requires close monitoring.

[0120] The specific implementation of step S06 involves calculating the spatial relationship between virtual shells and assessing congestion risk. First, the shortest distance and overlap volume between any two largest cylindrical virtual shells within the platform area are calculated; then, the shortest distance and overlap volume between any two smallest cylindrical virtual shells are calculated; next, an overlap matrix is ​​constructed, and the congestion risk is quantified using a risk assessment optimization function. The calculation of the overlap matrix is ​​specifically represented as follows:

[0121] In the formula, O ij V represents the overlap between the i-th and j-th cylindrical virtual shells in the overlap matrix; overlap (C i C j V represents the overlapping volume of two cylindrical virtual shells; i V j Let d represent the volumes of the i-th and j-th cylindrical virtual shells, respectively; ij r is the horizontal distance between the central axes of the two cylindrical virtual shells. i r j , h, are the radii of the i-th and j-th cylindrical virtual shells, respectively; min h max These represent the lower and upper limits of the overlapping height range of the two cylindrical virtual shells, respectively; ε o The error term is calculated for overlap, with a range of ±0.01. The specific expression of the risk assessment optimization function is as follows: R(p)=w1O p +w2V p +w3G p +w4H p +w5H p,hist +ε r ; In the formula, R(p) is the risk score at location p; w1, w2, w3, w4, and w5 are weighting coefficients, with values ​​of 0.3, 0.2, 0.2, 0.2, and 0.1, respectively; O p V represents the average overlap within the neighborhood of location p; p G represents the average relative velocity difference within the neighborhood of position p; p H is the normalized density gradient at position p; p H represents the entropy value of the pedestrian flow direction at position p; p,hist ε is the historical risk coefficient at location p; r This represents the risk assessment error term, with a range of ±0.05; n p N represents the number of people in the neighborhood of location p; p Let p be the set of neighborhoods of position p; V is the velocity vector of human body i and j; max The maximum speed threshold is set to 2 meters per second. G is the gradient norm of the pedestrian density at location p; max The maximum gradient threshold is set to 4 people / square meter / meter; P kLet p be the probability that the flow of people at position p moves in the k-th direction; K is the number of direction divisions, set to 8. Risk level thresholds are set as follows: low risk 0–0.3, medium risk 0.3–0.6, high risk 0.6–0.8, and very high risk 0.8–1.0. For the rate of change in risk scores, a warning threshold of 0.1 / second is set; exceeding this threshold indicates a rapid increase in risk, requiring immediate attention.

[0122] The specific implementation of step S07 is based on graph theory to analyze passenger flow bottlenecks and calculate platform hazard coefficients. First, the platform area is abstracted as a weighted directed graph, where nodes represent platform area units, edges represent passenger flow paths, and edge weights are determined based on a combination of flow rate in the human motion variation matrix and congestion level in the overlap matrix. Then, the maximum flow minimum cut algorithm is applied to identify bottleneck points in the network, which are typically high-incidence areas of passenger congestion. Finally, based on the identified bottleneck points and the risk distribution heatmap, the platform hazard coefficient for each area is calculated. The weighted directed flow network and the maximum flow minimum cut algorithm are specifically represented as follows: G = (V, E, c); c(e ij )=α·F ij ·(1-β·O ij ); Cut(S, T) = ∑ i∈S,j∈T C(e ij In the formula, G is a weighted directed graph; V is a set of nodes representing platform area units; E is a set of edges representing pedestrian movement paths; C is a capacity function representing the weight of the edges; e ij Let be the edge from node i to node j; α is the flow weight coefficient, set to 1.5; β is the congestion impact coefficient, set to 2.0; O ij F represents the average overlap between nodes i and j; ij Let be the average pedestrian flow from node i to node j; T is the statistical time window length, set to 300 seconds; n ij (t) represents the number of people moving from node i to node j at time t; MaxFlow(G, s, t) is the maximum flow from source node s to sink node t; Cut(S, T) is the capacity of the cut set (S, T). The platform hazard coefficient is calculated as follows: DS(r) = γ1·D n (r)+γ2·VS(r)+γ3·DS(r)+γ4·OS(r)+γ5·BF(r)+ε ds ;D n (r)=min{D(r) / D crit ,1}; In the formula, DS(r) is the platform hazard coefficient for region r; γ1, γ2, γ3, γ4, and γ5 are weighting coefficients, which are 0.25, 0.2, 0.2, 0.25, and 0.1, respectively; D n ε(r) represents the normalized pedestrian density of region r; VS(r) represents the speed inconsistency index of region r; DS(r) represents the directional inconsistency index of region r; OS(r) represents the average overlap of region r; BF(r) represents the bottleneck factor; ε ds The error term for the hazard factor calculation is ±0.03; D(r) is the population density in area r; D crit The critical pedestrian density is set at 6 people per square meter; n r N represents the number of people within region r; r Let r be the set of human bodies within region r; V represents the standard deviation of the human body's velocity vector i within the time window; std,max The maximum threshold for the standard deviation of velocity is set to 0.5 m / s; δ is a small constant to prevent the denominator from being zero, set to 0.01. The platform hazard factor thresholds are set as follows: warning threshold 0.5, alert threshold 0.7, and emergency threshold 0.9. For the rate of change of the hazard factor, the warning threshold is set to 0.05 / s; exceeding this threshold indicates a rapid deterioration of the hazardous situation, requiring the activation of the emergency plan.

[0123] The specific implementation of step S08 involves using deep learning methods to predict the changing trends of passenger flow on the platform. First, a time-series dataset is constructed, including historical passenger flow density distribution data and the platform hazard coefficient for the corresponding time period. Then, a deep learning model combining a long short-term memory network and an attention mechanism is trained to achieve passenger flow prediction. The calculation process of the prediction model is specifically represented as follows: In the formula, Let be the LSTM hidden state vector at time t; LSTM is the Long Short-Term Memory network function. Let be the input feature vector at time t; ε represents the LSTM cell state at time t-1; h Let α be the hidden state error vector, ranging from ±0.01; t,i The attention weights are used for the focus; the score is the attention scoring function. Here is the parameter matrix of the attention mechanism; tanh is the hyperbolic tangent activation function; Indicates a vector concatenation operation; For context vectors; To predict the output vector; These are the output layer parameters; The prediction error vector ranges from ±0.05. The model training uses mean squared error as the loss function, employs the Adam optimizer for parameter updates, sets the learning rate to 0.001, and performs 100 training epochs. The prediction accuracy threshold is set to 85%; below this threshold, model parameters need to be readjusted. The input sequence length is set to 30, corresponding to 30 minutes of historical data; the prediction length is set to 5, corresponding to predictions for the next 5 minutes. A warning threshold of 30% is set for prediction error changes; exceeding this threshold indicates unreliable predictions, requiring a switch to conservative warning mode.

[0124] The specific implementation of step S09 involves establishing a graded response mechanism based on the risk factor. First, a three-level response strategy is set according to the platform risk factor: When the platform risk factor exceeds the warning threshold of 0.5 but is below the alert threshold of 0.7, the system sends a Level 1 warning to platform management personnel, suggesting an increase in patrol frequency; when the platform risk factor exceeds the alert threshold of 0.7 but is below the emergency threshold of 0.9, the system sends a Level 2 warning to platform management personnel and simultaneously broadcasts guidance information through the station's public address system to manage passenger flow; when the platform risk factor exceeds the emergency threshold of 0.9, the system sends a Level 3 warning to platform management personnel and simultaneously initiates emergency response procedures, including temporary restrictions on entry and the addition of temporary trains. The response mechanism is implemented using a state machine model, including four states: normal, alert, warning, and emergency. State transitions are based on the risk factor and its rate of change. Response information is transmitted through three methods: visual alarms, audio prompts, and message push notifications from the platform management system, ensuring multi-channel alerts. Level 1 warnings use yellow visual markers, Level 2 warnings use orange visual markers, and Level 3 warnings use red visual markers. Different levels of warnings use different frequencies of audio prompts. The early warning information includes four key pieces of information: the location of the danger zone, the danger level, the type of congestion, and recommended response measures. The response mechanism's execution time requirements are: Level 1 warning response time no more than 30 seconds, Level 2 warning response time no more than 20 seconds, and Level 3 warning response time no more than 10 seconds. For repeated warning triggers, the system uses an exponential backoff algorithm to control the warning frequency and avoid frequent disruptions.

[0125] This embodiment implements a complete process from image acquisition, human detection, virtual shell construction, motion analysis, density calculation, risk assessment, bottleneck identification, trend prediction to early warning response through the above nine steps. This method comprehensively utilizes a double-layer cylindrical virtual shell model to achieve the accuracy and applicability of human spatial representation; the introduction of human dynamics equations considers the physical characteristics of pedestrian flow; the overlap matrix and risk assessment optimization function achieve comprehensive quantification of multi-dimensional congestion characteristics; the weighted directed flow network and the maximum flow minimum cut algorithm effectively identify pedestrian bottlenecks; and the prediction model combining a long short-term memory network and an attention mechanism achieves high-precision short-term pedestrian flow prediction. In practical applications, this method can detect potential risks 3-5 minutes in advance, providing platform managers with sufficient response time, effectively preventing stampede incidents, and improving the safety management level of rail transit platforms. The threshold parameters and weight coefficients can be adjusted according to the specific platform environment and passenger flow characteristics to improve the system's adaptability and effectiveness.

[0126] To better understand and implement this invention, the following is a specific application scenario example 2: At a subway station in a certain city, platform congestion frequently occurs during peak hours. When the subway doors are about to close, some passengers who haven't boarded often get too close to the doors due to overcrowding. Staff need to patrol and issue verbal reminders, which is detrimental to safety management. Furthermore, there is also the phenomenon of large-scale congestion in different locations within the station near train arrival and departure times, affecting safety. To improve safety management, researchers implemented a crowd monitoring system based on a multi-resolution camera array at this station in January 2024. The platform is 120 meters long and 12 meters wide, and a total of 4 panoramic cameras and 12 local high-definition cameras were installed. The panoramic camera is installed 3.8 meters high at the top of the platform, with a resolution of 1920×1080 pixels and a field of view of 120 degrees, covering the entire platform area. Local high-definition cameras are installed 3.6 meters high at key locations such as platform entrances / exits, waiting areas, and platform edges, with a resolution of 3840×2160 pixels and a field of view of 60 degrees, focusing on monitoring areas with high pedestrian traffic. The overlapping field of view between cameras accounts for 25% of the total field of view, used for multi-view fusion and seamless stitching.

[0127] The system employs an improved OpenPose algorithm to extract human skeletons from panoramic and local high-resolution images of stations acquired in a multi-scale spatial monitoring network. In the algorithm implementation, the attention mechanism weight coefficient λ is set to 0.5, and the feature point extraction error term ε... s The accuracy was controlled within ±0.05, the total number of human body key points J was set to 18, and the confidence threshold for key points was set to 0.6. Testing showed that the system achieved a human body detection accuracy of 98.2% in a platform environment, with an average key point positioning error of less than 0.08 meters.

[0128] Based on the extracted set of human pose feature points, the system constructs a maximum and minimum cylindrical virtual shell for each detected human body. During the construction process, the midline fitting error term ε... l The radius safety margin δ is controlled within ±0.02 meters. r Set to 0.1 meters, height safety margin δ h The height was set to 0.05 meters. By analyzing data from the peak period of 17:30 to 18:30 on a certain weekday, the parameters of the maximum and minimum cylindrical virtual shells for people in different height ranges were statistically analyzed, as shown in Table 1.

[0129] Table 1. Statistics on virtual shell parameters for people in different height ranges

[0130]

[0131] The system calculates human motion parameters based on the positional changes of the virtual shell in continuous time frames, with the time increment Δt set to 0.1 seconds and the force estimation coefficient k. f The value is taken as 35 Newtons / meter, and the environmental drag coefficient C d Set to 0.3, quality estimation coefficient k m The value is set to 3.5. The error vector ranges for position, velocity, and acceleration are controlled within ±0.05 m, ±0.03 m / s, and ±0.01 m / s, respectively. 2 By analyzing the distribution of pedestrian flow speed in different areas during peak hours, the statistical results shown in Table 2 were obtained:

[0132] Table 2. Statistics on pedestrian flow speed in different areas of the platform.

[0133] Platform area Average speed (m / s) Speed standard deviation (m / s) Main direction consistency People proportion (%) Entry area 0.76 0.28 0.83 22.3 Waiting area A 0.12 0.08 0.92 31.6 Waiting area B 0.15 0.11 0.89 27.5 Exit area 0.92 0.31 0.78 18.6

[0134] The system divides the platform area into 0.5m x 0.5m grid cells and counts the number of maximum cylindrical virtual shells within each grid cell. A kernel density estimation algorithm is used to smooth the discrete quantity distribution, with the bandwidth parameter h set to 1.5m and the density estimation error term ε... d The density was controlled within ±0.2 people / square meter. Based on data from the peak period of 18:00–18:10, the system generated statistics on pedestrian density distribution, as shown in Table 3.

[0135] Table 3. Statistics on pedestrian density in platform areas

[0136] Density level Density range (people / m 2 ) Area proportion (%) Risk rating Low density 0~2 42.6 Low risk Medium density 2~4 38.2 Medium risk High density 4~6 15.7 High risk Super high density >6 3.5 Extremely high risk

[0137] The system calculates the overlap between any two largest and two smallest cylindrical virtual shells within the platform area, constructing an overlap matrix. The overlap calculation error term ε... oThe risk assessment error is controlled within ±0.01. In the risk assessment optimization function, the weight coefficients w1, w2, w3, w4, and w5 are set to 0.3, 0.2, 0.2, 0.2, and 0.1, respectively. The risk assessment error term ε... r The risk level was controlled within ±0.05. Based on the risk score, the platform area was divided into different risk levels, and statistical analysis was performed. The results are shown in Table 4.

[0138] Table 4. Statistics on Risk Levels of Platform Areas

[0139]

[0140]

[0141] The system abstracts the platform area as a weighted directed graph, divided into 96 nodes and 240 edges. The flow weight coefficient α is set to 1.5, the congestion impact coefficient β is set to 2.0, and the statistical time window length T is set to 300 seconds. The maximum flow minimum cut algorithm is applied to identify three main bottleneck points, located in the area before the escalator at Exit B, the entrance to the passageway at Exit A, and the edge area of ​​the central platform. Based on the identified bottleneck points and the risk distribution heatmap, the hazard coefficient of each platform area is calculated. The weight coefficients γ1, γ2, γ3, γ4, and γ5 are set to 0.25, 0.2, 0.2, 0.25, and 0.1, respectively, and the hazard coefficient calculation error term ε is... ds The risk level was controlled within ±0.03. At 18:05 during peak hours, the system detected a platform hazard factor of 0.76 in the area in front of the escalator at Exit B, triggering a Level 2 warning.

[0142] The system constructs a time-series dataset based on historical data and trains it using a deep learning model that combines a long short-term memory network with an attention mechanism. The hidden state error vector ε h The prediction error vector ε is controlled within ±0.01. y The risk level was controlled within ±0.05. The model training used mean squared error as the loss function, employed the Adam optimizer for parameter updates, set the learning rate to 0.001, and trained for 100 epochs. At 18:05, the system predicted the trend of platform hazard coefficient changes in the area in front of the escalator at Exit B over the next 5 minutes, as shown in Table 5.

[0143] Table 5. Prediction of Hazard Factor of Platform Area in Front of Exit Escalator B.

[0144] Time point Predicted risk coefficient Predicted confidence Risk level Recommended measures 18:06 0.78 0.93 High risk Enhanced guidance 18:07 0.81 0.91 Extremely high risk Dissipate passenger flow 18:08 0.86 0.89 Extremely high risk Limit entry 18:09 0.89 0.87 Extremely high risk Limit entry 18:10 0.85 0.85 Extremely high risk Dissipate passenger flow

[0145] Based on the prediction results, the platform management system automatically triggered a Level 2 warning at 18:07, sending a warning message to platform management personnel. Simultaneously, guidance information was broadcast through the station's public address system, and two staff members were dispatched to the area in front of the escalator at Exit B to manage passenger flow. At 18:08, the system predicted the risk factor would exceed 0.85, triggering a Level 3 pre-warning response, and temporary flow control measures were implemented at Exit B in advance. Actual observation showed that due to the timely implementation of the warning measures, the actual risk factor in the area in front of the escalator at Exit B at 18:10 was 0.74, lower than the predicted value, successfully avoiding the potential risk of overcrowding.

[0146] Traditional methods for monitoring passenger flow on platforms mainly rely on fixed-view cameras and simple human detection algorithms, which struggle to accurately capture individual position and posture information in the complex environment of a platform, and cannot effectively assess congestion risks. This invention employs a multi-resolution camera array to construct a multi-scale spatial monitoring network, combined with an improved OpenPose algorithm to achieve high-precision human skeleton extraction. For each detected human body, a maximum and minimum cylindrical virtual shell are constructed, establishing a three-dimensional spatial occupancy model of the human body. By calculating the spatial relationships between the virtual shells and human motion parameters, a passenger flow density distribution map, an overlap matrix, and a human motion variation matrix are generated, enabling precise quantification of passenger flow density, congestion level, and movement characteristics. Based on graph theory and deep learning methods, the system can identify platform bottlenecks, predict passenger flow trends, and issue early warnings. Compared with traditional methods, this invention improves passenger flow monitoring accuracy by approximately 30%, increases the average warning lead time by 3 minutes, and effectively reduces the incidence of platform congestion events. Implementation results demonstrate that this method has significant practical value for the safety management of rail transit platforms.

[0147] It should be noted that the variables involved in this invention are explained in detail in Tables 6, 7, and 8 below.

[0148] Table 6. Variable Explanation Table (Part 1)

[0149]

[0150]

[0151] Table 7. Variable Explanation Table (Part Two)

[0152]

[0153]

[0154] Table 8. Variable Explanation Table (Part 3)

[0155]

[0156] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for monitoring passenger flow on rail transit platforms, comprising: Acquire panoramic and local high-resolution images of the platform to construct a multi-scale spatial monitoring network; Extract the set of human pose feature points; This paper establishes a three-dimensional human body spatial occupancy model; analyzes individual movement trajectories; constructs a pedestrian density distribution map; quantitatively assesses the potential risk of pedestrian congestion; identifies potential congestion bottlenecks; predicts short-term pedestrian flow trends; and triggers a graded response mechanism. Its key features include: using a multi-resolution camera array to acquire panoramic and local high-definition images of the platform; extracting the human skeleton from images in a multi-scale spatial monitoring network using an improved OpenPose algorithm; constructing a maximum and minimum cylindrical virtual shell for each detected human body to establish a three-dimensional human body spatial occupancy model; applying human dynamics equations to predict and correct individual movement states, generating a human movement variation matrix; analyzing the overlap matrix; and using a risk assessment optimization function to quantitatively assess the potential risk of pedestrian congestion. Among them, the maximum cylindrical virtual shell refers to the smallest volume cylinder that completely surrounds the human body based on the set of human posture feature points, which is used to represent the maximum area occupied by the human body in the platform space; the minimum cylindrical virtual shell refers to the cylinder that only contains the core part of the human body, with the central axis of the human torso determined in the set of human posture feature points as the central axis, which is used to accurately calculate the core position and movement characteristics of the human body. The two virtual shells together constitute the three-dimensional space occupation model of the human body. Among them, the human motion variation matrix refers to the numerical matrix that records the position changes, velocity magnitude and direction of each detected human body's largest and smallest cylindrical virtual shells between consecutive time frames, and is used to quantitatively analyze the dynamic characteristics of human flow. Among them, the overlap matrix refers to a two-dimensional matrix that calculates the degree of spatial overlap between any two largest or smallest cylindrical virtual shells within the platform area, and the matrix element values ​​represent the degree of proximity between the corresponding two human bodies. The risk assessment optimization function maps multidimensional congestion features to a standardized risk score. The inputs include the maximum and minimum cylindrical virtual shell overlap obtained from the overlap matrix, the relative speed difference obtained from the human motion variation matrix, the spatial density gradient obtained from the pedestrian density distribution map, the pedestrian flow direction entropy value calculated from the human motion variation matrix, and the historical risk coefficient obtained from historical data. The outputs are a normalized risk score and a risk distribution heatmap used for platform hazard coefficient calculation and risk visualization.

2. The method for monitoring passenger flow on rail transit platforms according to claim 1, characterized in that, A pedestrian density distribution map is a two-dimensional density map generated based on the spatial distribution of the largest cylindrical virtual shell within the platform area. It is used to visually represent the density of pedestrian flow in various areas of the platform.

3. The method for monitoring passenger flow on rail transit platforms according to claim 2, characterized in that, The platform hazard factor is a dimensionless index calculated by comprehensively considering the pedestrian density in the pedestrian density distribution map, the inconsistency of movement speed and direction in the human movement variation matrix, and the degree of overlap in the overlap matrix. It is used to quantitatively assess the current safety status of the platform.

4. The method for monitoring passenger flow on rail transit platforms according to claim 3, characterized in that, The human dynamics equation is used to predict and correct the motion state and future position of the human body in the platform environment based on Newton's laws of motion. The inputs include the estimated human mass value estimated from the set of human posture feature points, the current velocity vector obtained from the human motion variation matrix, the environmental drag coefficient obtained from the platform environment parameters, the human applied force estimated from the changes in the set of human posture feature points, and the time increment obtained from the system settings. The output is the corrected human position and velocity vector used to update the human motion variation matrix.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the method for monitoring passenger flow at rail transit platforms as described in any one of claims 1-4.

6. A passenger flow monitoring system for rail transit platforms, characterized in that, The system includes the computer-readable storage medium of claim 5, wherein the system is any one of a computer, a server, or a microcontroller, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.

Citation Information

Patent Citations

  • Subway fire scene robot-assisted pedestrian flow evacuation simulation method

    CN118798042A

  • Rail transit passenger flow volume safety monitoring management method and system

    CN119417678A