Rail transit platform people flow monitoring method, medium and system
The three-dimensional space occupation model of the human body is constructed through a multi-level resolution camera array and an improved OpenPose algorithm. Combining dynamic equations and risk assessment optimization functions, the problem of insufficient flow monitoring accuracy on the rail transit station is solved, high-precision dynamic flow monitoring and timely early warning is achieved, and the platform safety management level is improved.
Patent Information
- Application Number
- CN202510422328.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-07
AI Technical Summary
The prior art has insufficient accuracy in monitoring of people flow on rail transit stations, and it is impossible to accurately identify individuals and evaluate the risk of dynamic congestion, resulting in inaccurate or timely risk warnings.
The platform image is obtained by using a multi-level resolution camera array, and the improved OpenPose algorithm is used to extract the human posture feature points, and a three-dimensional spatial occupation model of the largest cylindrical virtual shell and the smallest cylindrical virtual shell is constructed. Combining the human dynamics equation and risk assessment optimization function, a flow density distribution map and overlapping matrix are generated, and bottleneck points are identified through a weighted directed flow network and the change trend of the flow are predicted.
It realizes accurate perception and dynamic prediction of people flow on rail transit stations, eliminates monitoring blind spots, improves spatial perception accuracy and the accuracy of risk warnings, and can issue early warnings 3-5 minutes in advance, effectively preventing the occurrence of crowded events.
Smart Images

Figure CN120259978A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rail transit safety, and specifically relates to a method, medium and system for monitoring the flow of people on a rail transit platform. Background Art
[0002] The monitoring of the flow of people on a rail transit platform is an important link in ensuring the safe operation of public transportation. Traditional monitoring technologies mainly rely on devices such as single-view cameras, infrared sensors or pressure sensors, and achieve the statistics of the number of people through simple counting or density estimation methods. These technologies usually adopt planar two-dimensional image processing or single-point detection methods, and realize the counting of people and simple spatial distribution analysis based on image segmentation, object detection and contour recognition algorithms.
[0003] However, traditional monitoring technologies have many limitations in practical applications. Single-view cameras are easily affected by occlusion, resulting in monitoring blind spots; simple two-dimensional image processing is difficult to accurately identify individuals in crowded scenes; traditional density estimation methods ignore the dynamic characteristics of the human body and the interaction effects between individuals, and cannot accurately predict potential risks. In addition, the evaluation of the degree of crowding of the flow of people by these technologies is usually based on static thresholds, lacking the adaptability to dynamic scenarios and early warning mechanisms.
[0004] In the face of the situation of dense and complex flow of people on a rail transit platform during peak hours, the existing technologies are difficult to simultaneously achieve high-precision individual recognition and macroscopic flow of people situation perception, unable to accurately establish an individual space occupancy model and dynamic change characteristics, and difficult to real-time evaluate the crowding risk and early warning of potential dangers. This technical problem seriously restricts the improvement of the safety management efficiency of rail transit platforms. That is to say, there is a technical problem in the existing technology that the accuracy of monitoring the flow of people on a rail transit platform is insufficient, resulting in inaccurate or untimely danger warnings. Summary of the Invention
[0005] In view of this, the present invention provides a method, medium and system for monitoring the flow of people on a rail transit platform, which can solve the technical problem in the existing technology that the accuracy of monitoring the flow of people on a rail transit platform is insufficient, resulting in inaccurate or untimely danger warnings.
[0006] The present invention is implemented as follows: In the first aspect of the present invention, a method for monitoring the flow of people on a rail transit platform is provided. A multi-level resolution camera array is used to obtain a panoramic image and a local high-definition image of the platform; an improved OpenPose algorithm is used to extract the human skeletons from the images in the multi-scale space monitoring network; a maximum cylindrical virtual shell and a minimum cylindrical virtual shell are constructed for each detected human body to establish a three-dimensional space occupancy model of the human body; the human dynamics equation is applied to predict and correct the individual motion state to generate a human motion change matrix; the overlapping matrix is analyzed, and the risk assessment optimization function is used to quantitatively evaluate the potential risk of crowding of the flow of people.
[0007] Among them, the maximum cylindrical virtual shell refers to the smallest-volume cylinder that completely encloses the human body based on the set of human body posture feature points, and is used to represent the maximum occupied range of 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 body trunk determined from the set of human body posture feature points as the central axis, and is used to accurately calculate the core position and movement characteristics of the human body.
[0008] Among them, the human body movement change matrix refers to the numerical matrix that records the position changes, speed magnitudes and directions of each detected human body's maximum cylindrical virtual shell and minimum cylindrical virtual shell between consecutive time frames, and is used to quantitatively analyze the dynamic characteristics of the crowd flow.
[0009] Among them, the overlap matrix refers to the two-dimensional matrix that calculates the degree of spatial overlap between any two maximum cylindrical virtual shells or minimum cylindrical virtual shells in the platform area, and the matrix element value represents the proximity degree between the corresponding two human bodies.
[0010] Among them, the crowd flow density distribution map refers to the two-dimensional density map generated based on the spatial distribution of the maximum cylindrical virtual shells in the platform area, and is used to intuitively represent the crowd density in each area of the platform.
[0011] Among them, the risk assessment optimization function is used to map multi-dimensional congestion characteristics to a standardized risk score. The inputs include the overlap degree of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell obtained from the overlap matrix, the relative speed difference obtained from the human body movement change matrix, the spatial density gradient obtained from the crowd flow density distribution map, the crowd flow direction entropy value calculated from the human body movement change matrix, and the historical risk coefficient obtained from the historical data. The outputs are the normalized risk score and the risk distribution heat map for calculating the platform danger coefficient and risk visualization.
[0012] Among them, the platform danger coefficient refers to a dimensionless index calculated by comprehensively considering the crowd density in the crowd flow density distribution map, the movement speed inconsistency, direction inconsistency in the human body movement change matrix, and the overlap degree in the overlap matrix, and is used to quantitatively evaluate the current safety state of the platform.
[0013] Among them, the human body dynamics equation is used to predict and correct the movement 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 body mass value estimated from the set of human body posture feature points, the current velocity vector obtained from the human body movement change matrix, the environmental resistance coefficient obtained from the platform environment parameters, the force exerted by the human body estimated from the change of the set of human body posture feature points, and the time increment obtained from the system settings. The outputs are the corrected human body position and velocity vector for updating the human body movement change matrix.
[0014] In a second aspect of the present invention, there is provided a computer-readable storage medium storing program instructions which, when running on a computer, are used to execute the above-mentioned method for monitoring the flow of people on a rail transit platform.
[0015] In a third aspect of the present invention, there is provided a system for monitoring the flow of people on a rail transit platform, including the above-mentioned computer-readable storage medium. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is disposed within the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is disposed within the system.
[0016] The present invention constructs a multi-scale spatial monitoring network from individuals to groups. By introducing a three-dimensional human body space occupancy model of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell, and combining the human body dynamics equation and the risk assessment optimization function, accurate perception and dynamic prediction of the flow of people on the platform are realized.
[0017] This method effectively overcomes the limitations of traditional technologies, realizes accurate identification and tracking of individuals in crowded scenarios, and eliminates monitoring blind spots; the analysis of the flow density of people based on the three-dimensional human body space occupancy model improves the spatial perception accuracy; the introduction of the overlap matrix and the human body movement change matrix enables the system to accurately capture the dynamic characteristics of the flow of people and the interactive influence 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 the short-term change trend of the flow of people, providing sufficient time for risk warning.
[0018] By constructing a complete multi-scale flow of people monitoring and risk assessment system, the present invention successfully solves the technical problems of insufficient accuracy in monitoring the flow of people on a rail transit platform, lack of multi-scale spatial perception ability, and real-time risk warning mechanism, and significantly improves the intelligent level and warning accuracy of platform safety management. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0021] As Figure 1 shown, it is a flowchart of a method for monitoring the flow of people on a rail transit platform provided in the first aspect of the present invention. The method includes the following steps:
[0022] S01. Use a multi-level resolution camera array to obtain a panoramic image and a local high-definition image of the platform, and construct a multi-scale spatial monitoring network;
[0023] S02. Use the improved OpenPose algorithm to extract the human body skeletons from the panoramic images and local high-definition images of the platform in the obtained multi-scale spatial monitoring network, and form a set of human body pose feature points;
[0024] S03. Based on the set of extracted human body pose feature points, construct a maximum cylindrical virtual shell and a minimum cylindrical virtual shell for each detected human body, and establish a human body three-dimensional space occupancy model;
[0025] S04. Calculate the displacement vectors between each maximum cylindrical virtual shell and minimum cylindrical virtual shell in adjacent time frames, apply the human body dynamics equation to predict and correct the individual motion states, generate a human body motion change matrix, and realize the analysis of individual movement trajectories;
[0026] S05. Statistically calculate the number density of the maximum cylindrical virtual shells in the platform area, construct a crowd density distribution map, and realize the assessment of the crowd congestion degree;
[0027] S06. Analyze the overlap matrix between adjacent maximum cylindrical virtual shells and minimum cylindrical virtual shells, and use the risk assessment optimization function to quantitatively evaluate the potential risks of crowd congestion, and realize the real-time grading of risk levels;
[0028] S07. Construct the platform area as a weighted directed flow network, combine the individual movement speeds, direction consistencies in the human body motion change matrix and the overlap degrees in the overlap matrix, apply the maximum flow minimum cut algorithm to identify potential congestion bottleneck points, calculate the danger coefficients of each area of the platform, and establish a multi-threshold early warning mechanism;
[0029] S08. Based on the historical crowd density distribution map data and real-time monitoring results, apply a deep learning model to predict the short-term crowd change trend and realize early warning;
[0030] S09. When the platform danger coefficient exceeds the preset threshold, trigger a hierarchical response mechanism, send a warning message to the platform management system and start the emergency response process.
[0031] Among them, the maximum cylindrical virtual shell refers to a cylinder with the smallest volume that completely encloses the human body based on the set of human body pose feature points, and is used to represent the maximum occupancy range of the human body in the platform space.
[0032] Among them, the minimum cylindrical virtual shell refers to a cylinder that only contains the core parts of the human body with the central axis of the human body trunk determined in the set of human body pose feature points as the central axis, and is used to accurately calculate the core position and movement characteristics of the human body.
[0033] Among them, the human body movement change matrix refers to a numerical matrix that records the position changes, speed magnitudes, and directions of the maximum cylindrical virtual shells and minimum cylindrical virtual shells of each detected human body between consecutive time frames, and is used to quantitatively analyze the dynamic characteristics of pedestrian flow.
[0034] Among them, the overlap matrix refers to a two-dimensional matrix that calculates the degree of spatial overlap between any two maximum cylindrical virtual shells or minimum cylindrical virtual shells within the platform area, and the matrix element values represent the degree of proximity between the corresponding two human bodies.
[0035] Among them, the pedestrian flow density distribution map refers to a two-dimensional density map generated based on the spatial distribution of the maximum cylindrical virtual shells within the platform area, and is used to visually represent the degree of pedestrian flow density in each area of the platform.
[0036] Among them, the platform danger coefficient refers to a dimensionless index obtained by comprehensively considering the pedestrian flow density in the pedestrian flow density distribution map, the inconsistency of moving speeds, the inconsistency of directions in the human body movement change matrix, and the degree of overlap in the overlap matrix, and is used to quantitatively evaluate the current safety state of the platform.
[0037] Among them, the human body dynamics equation is used to predict and correct the movement 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 body mass value estimated from the set of human body pose feature points, the current velocity vector obtained from the human body movement change matrix, the environmental resistance coefficient obtained from the platform environment parameters, the force exerted by the human body estimated from the change in the set of human body pose feature points, and the time increment obtained from the system settings. The output is the corrected human body position and velocity vector for updating the human body movement change matrix.
[0038] Among them, the risk assessment optimization function is used to map multi-dimensional congestion characteristics to a standardized risk score. The inputs include the overlap degree of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell obtained from the overlap matrix, the relative velocity difference obtained from the human body movement change matrix, the spatial density gradient obtained from the pedestrian flow density distribution map, the pedestrian flow direction entropy value calculated from the human body movement change matrix, and the historical risk coefficient obtained from historical data. The outputs are the normalized risk score and the risk distribution heat map for platform danger coefficient calculation and risk visualization.
[0039] The specific implementation manners of the above steps are described in detail below. The specific implementation manner of step S01 is to install multiple cameras with different resolutions on the rail transit platform to form a multi-level resolution camera array. First, a panoramic camera is installed on the top of the platform, with a resolution of 1920×1080 pixels and a field of view angle of 120 degrees, covering the entire platform area; then, local high-definition cameras are installed at key positions on the platform, such as the entrance and exit, waiting area, and platform edge, with a resolution of 3840×2160 pixels and a field of view angle of 60 degrees, focusing on monitoring crowded areas. These cameras ensure the time alignment of the collected images through a time synchronization mechanism, and the sampling frequency is 10Hz. The setting of the multi-level resolution camera array aims to balance the monitoring coverage and the ability to capture details. The panoramic camera provides macroscopic pedestrian flow distribution information, and the local high-definition camera provides microscopic human body pose information, jointly constituting a multi-scale spatial monitoring network.
[0040] The specific implementation manner of step S02 is to extract the human body skeletons from the images collected in the multi-scale spatial monitoring network. First, the images are preprocessed, including illumination equalization, noise elimination, and image enhancement; then, an improved OpenPose algorithm is used for human body detection and key point localization. This algorithm is based on a convolutional neural network architecture and uses the PAF (Part Affinity Fields) technology to connect human body joints. The improved OpenPose algorithm improves the detection accuracy by introducing an attention mechanism and multi-scale feature fusion. The detection accuracy for human bodies in panoramic images reaches more than 90%, and the detection accuracy for human bodies in local high-definition images reaches more than 95%. Through this step, the coordinates of 18 key skeletal nodes of each human body are extracted from the images to form a set of human body pose feature points. These feature points include three-dimensional coordinate information of key positions such as the head, neck, shoulders, elbows, wrists, hips, knees, and ankles.
[0041] The specific implementation manner of step S03 is to construct a virtual shell model based on the set of human body pose feature points. First, the least squares method is used to fit the central axis of the human torso to determine the human central axis; then, based on the spatial distribution of the set of human body pose feature points, the parameters of the maximum circumscribed cylinder are calculated to construct the maximum cylindrical virtual shell. Its radius is taken as the maximum distance from the human body pose feature points to the central axis, and its height is taken as the vertical distance from the top of the head to the bottom of the foot; then, based on the key points of the human torso, the minimum cylindrical virtual shell is constructed. Its radius is taken as 1.2 times the average distance from the torso key points to the central axis, and its height is taken as the vertical distance from the neck to the hips. The maximum cylindrical virtual shell is used to represent the maximum occupied range of the human body in the platform space and is suitable for crowded risk assessment; the minimum cylindrical virtual shell is used to represent the core position of the human body and is suitable for precise trajectory tracking. The two virtual shells jointly constitute the human body three-dimensional space occupancy model.
[0042] The specific implementation of step S04 is to calculate human motion parameters based on the change of the virtual shell position in consecutive time frames. First, the Hungarian algorithm is used to achieve the corresponding matching of the human body between adjacent frames; then, the displacement vectors of the central points of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell of each corresponding human body between two adjacent frames are calculated; then, the human body dynamics equation is applied to predict and correct the human body motion state. The human body dynamics equation is based on Newton's laws of motion and considers parameters such as the estimated human body mass, the current velocity vector, the environmental resistance coefficient, the force exerted by the human body, and the time increment, and outputs the corrected human body position and velocity vector. Among them, the estimated human body mass is estimated according to the distribution range and statistical data of the human body pose feature point set; the environmental resistance coefficient is set to 0.3; the time increment is the time interval between adjacent frames, usually 0.1 second. Through this step, a human body motion change matrix containing position, velocity, and acceleration information is generated, providing a data basis for subsequent trajectory analysis.
[0043] The specific implementation of step S05 is to calculate the pedestrian flow density based on the spatial distribution of the maximum cylindrical virtual shells. First, the platform area is divided into grid cells with a size of 0.5 m × 0.5 m; then, the number of maximum cylindrical virtual shells within each grid cell is counted; then, the kernel density estimation algorithm is used to smooth the discrete number distribution to generate a continuous pedestrian flow density distribution map. The kernel density estimation algorithm uses a Gaussian kernel function, and the bandwidth parameter is set to 1.5 m, which is determined according to the average width of the human body and the platform environment characteristics. The pedestrian flow density threshold is set as follows: low density is 0 - 2 people per square meter, medium density is 2 - 4 people per square meter, high density is 4 - 6 people per square meter, and ultra-high density is greater than 6 people per square meter. The pedestrian flow density distribution map intuitively shows the degree of pedestrian flow concentration in each area of the platform through color gradients, providing a quantitative basis for evaluating the degree of pedestrian crowding.
[0044] The specific implementation of step S06 is to calculate the spatial relationship between virtual shells and evaluate the crowding risk. First, the shortest distance and overlapping volume between any two maximum cylindrical virtual shells within the platform area are calculated; then, the shortest distance and overlapping volume between any two minimum cylindrical virtual shells are calculated; then, an overlapping matrix is constructed, and the matrix element value represents the degree of proximity between the corresponding two human bodies, with a value range of 0 - 1, where 0 indicates no contact and 1 indicates complete overlap. Based on the overlapping matrix, the crowding risk is quantitatively evaluated using the risk assessment optimization function. The risk assessment optimization function adopts a weighted summation form, and the inputs include the overlapping degrees of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell, the relative velocity difference, the spatial density gradient, the pedestrian flow direction entropy value, and the historical risk coefficient. The weights of each parameter are 0.3, 0.2, 0.2, 0.2, and 0.1 respectively, and the output is a normalized risk score and a risk distribution heat map. The risk level threshold is set as follows: low risk is 0 - 0.3, medium risk is 0.3 - 0.6, high risk is 0.6 - 0.8, and extremely high risk is 0.8 - 1.0.
[0045] The specific implementation of step S07 is to analyze the bottleneck of the passenger flow and calculate the platform danger coefficient based on graph theory. First, the platform area is abstracted into a weighted directed graph, where the nodes represent the platform area units, the edges represent the passenger flow movement paths, and the edge weights are comprehensively determined based on the flow rate in the human body movement change matrix and the congestion degree in the overlap matrix. Then, the maximum flow minimum cut algorithm is applied to identify the bottleneck points in the network, which are usually the high-incidence areas of passenger flow congestion. The maximum flow minimum cut algorithm effectively identifies the potential congestion points in the platform by finding the maximum flow 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 heat map, the platform danger coefficient of each area is calculated. The calculation of the platform danger coefficient takes into account the passenger flow density, the inconsistency of the moving speed, the inconsistency of the direction, and the overlap degree, and a multi-level threshold warning mechanism is set: the warning threshold is 0.5, the alert threshold is 0.7, and the emergency threshold is 0.9.
[0046] The specific implementation of step S08 is to predict the change trend of the platform passenger flow using deep learning methods. First, a time series data set is constructed, including the historical passenger flow density distribution map data and the platform danger coefficient corresponding to the time period. Then, a deep learning model combining long short-term memory network and attention mechanism is used for training. The input of the model is the time series data of the past 30 minutes, the time step is 1 minute, and the output is the passenger flow prediction result for the next 5 minutes. The mean square error is used as the loss function for model training, the Adam optimizer is used for parameter update, the learning rate is set to 0.001, and the number of training epochs is 100. The prediction accuracy threshold is set to 85%. If it is lower than this threshold, the model parameters need to be readjusted. Through the deep learning model, the system can predict the change trend of the platform passenger flow in the short term, send warning information 3 - 5 minutes in advance, and provide sufficient response time for the platform management personnel.
[0047] The specific implementation of step S09 is to establish a hierarchical response mechanism based on the risk coefficient. First, three-level response strategies are set according to the platform risk coefficient: when the platform risk coefficient exceeds the warning threshold of 0.5 but is lower than the warning threshold of 0.7, the system sends a first-level warning message to the platform management personnel, suggesting to increase the inspection frequency; when the platform risk coefficient exceeds the warning threshold of 0.7 but is lower than the emergency threshold of 0.9, the system sends a second-level warning message to the platform management personnel, and at the same time plays guiding information through the in-station broadcast system to divert the passenger flow; when the platform risk coefficient exceeds the emergency threshold of 0.9, the system sends a third-level warning message to the platform management personnel, and at the same time starts the emergency response process, including measures such as temporarily restricting entry and adding temporary trains. The execution time requirements for the response mechanism are: the first-level warning response time does not exceed 30 seconds, the second-level warning response time does not exceed 20 seconds, and the third-level warning response time does not exceed 10 seconds. Through the hierarchical response mechanism, the system can take corresponding prevention and control measures according to the risk level, effectively preventing the occurrence of platform crowd stampede incidents.
[0048] The second aspect of the present invention provides a computer-readable storage medium, in which program instructions are stored, and when the program instructions run on a computer, they are used to execute the above-mentioned rail transit platform passenger flow monitoring method.
[0049] The third aspect of the present invention provides a rail transit platform passenger flow monitoring system, including the above-mentioned computer-readable storage medium. The system is any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is set inside the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is set inside the system.
[0050] The following describes in detail the mathematical models or calculation processes involved in the present invention.
[0051] In step S04, the human body dynamics equation involves multiple calculation processes, which are specifically expressed as follows:
[0052]
[0053] In the formula, is the human body position vector at time t; is the human body velocity vector at time t; is the human body acceleration vector at time t; Δt is the time increment; is the force exerted by the human body; C d is the environmental resistance coefficient; m h is the estimated value of the human body mass; are the error vectors of position, velocity, and acceleration respectively.
[0054] The parameter acquisition method is: and Obtained from the human motion change matrix of the previous frame; Δt is the time interval between adjacent frames, usually set to 0.1 seconds; Estimated by analyzing the changes of the human body pose feature point set between consecutive frames, and the calculation formula is where k f is the force estimation coefficient, and its value range is 20 - 50 N / m; is the displacement vector of the key pose points; C d is the environmental resistance coefficient, set to 0.3 according to the platform environment characteristics, dimensionless; m h is the estimated value of the human body mass, estimated by combining the distribution range of the human body pose feature point set with statistical data, and the calculation formula is where k m is the mass estimation coefficient, with a value of 3.5, h h is the human body height, in meters; The ranges of are ±0.05 m, ±0.03 m / s, ±0.01 m / s 2 .
[0055] The human body dynamics equation is constructed based on Newton's laws of motion, considering the physical characteristics of human movement. The first equation describes the change of position over time, in the form of a second-order Taylor expansion, including velocity terms, acceleration terms, and position error terms, and can accurately predict the position change of the human body in a short time. The second equation describes the change of velocity over time, considering the acceleration effect and velocity error terms. The third equation is based on Newton's second law and describes the calculation process of acceleration, considering the human body active force, environmental resistance, and acceleration error terms, where the environmental resistance term is proportional to the velocity, conforming to the resistance characteristics of low-speed motion. Introducing error terms can compensate for the effects brought by model simplification and measurement errors and improve the prediction accuracy.
[0056] In step S05, the kernel density estimation algorithm is used to generate the crowd density distribution map, which is specifically expressed as follows:
[0057]
[0058] In the formula, D(x, y) is the crowd density at point (x, y); n is the number of people in the platform area; h is the bandwidth parameter; (x i , y i ) is the center position of the largest cylindrical virtual shell of the i-th person; K(u, v) is the two-dimensional Gaussian kernel function; ε d is the density estimation error term.
[0059] The parameter acquisition method is: n is obtained by calculating the total number of the largest cylindrical virtual shells; h is the bandwidth parameter, set to 1.5 m, determined according to the average width of the human body and the platform environment characteristics; (x i , yi ) Obtained from the spatial position information of the largest cylindrical virtual shell; ε d The range of is ±0.2 persons per square meter.
[0060] The kernel density estimation algorithm adopts 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 selected because of its good mathematical properties and smoothing characteristics, which can handle the randomness and uncertainty of human positions. The bandwidth parameter h controls the degree of smoothing, and the larger the value, the stronger the smoothing effect. This algorithm can transform discrete human position information into a continuous density distribution, intuitively reflecting the crowd density in each area 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 is the overlap degree between the i-th and j-th cylindrical virtual shells in the overlap matrix; V overlap (C i , C j ) is the overlapping volume of the two cylindrical virtual shells; V i , V j are the volumes of the i-th and j-th cylindrical virtual shells respectively; d ij is the horizontal distance between the central axes of the two cylindrical virtual shells; r i , r j are the radii of the i-th and j-th cylindrical virtual shells respectively; h min , h max are the lower and upper limits of the height overlapping interval of the two cylindrical virtual shells respectively; ε o is the overlap calculation error term.
[0064] The parameter acquisition method is: V i , V j , r i , r j Obtained from the geometric parameters of the largest or smallest cylindrical virtual shell; (x i , y i ), (x j , y j ) Obtained from the spatial position information of the cylindrical virtual shell; h min , h max Calculated by comparing the height ranges of the two cylindrical virtual shells, specifically h min = max(h i,bottom , h j,bottom ), h max = min(hi,top , h j,top ), where h i,bottom , h i,top , h j,bottom , h j,top are the bottom and top heights of two cylinders respectively; ε o ranges from ±0.01.
[0065] The overlapping matrix calculation formula is based on geometric principles and considers the intersection relationship between cylinders in three-dimensional space. The overlapping degree is defined as the ratio of the overlapping volume to the smaller volume, ensuring that the value range is between 0 and 1, which is convenient for subsequent risk assessment. The overlapping volume calculation formula considers two cases: when the distance between the central axes of two cylinders is less than the sum of the radii, the overlapping volume is calculated by integration; otherwise, the overlapping degree is 0. Introducing the error term can compensate for the influence of approximate calculation and measurement errors. This calculation method can quantify the spatial proximity between humans and provide 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 position p; w1, w2, w3, w4, w5 are weight coefficients, which are 0.3, 0.2, 0.2, 0.2, 0.1 respectively; O p is the average overlapping degree within the neighborhood of position p; V p is the average relative velocity difference within the neighborhood of position p; G p is the normalized density gradient at position p; H p is the entropy value of the human flow direction at position p; H p,hist is the historical risk coefficient at position p; ε r is the risk assessment error term; n p is the number of people within the neighborhood of position p; N p is the neighborhood set of position p; is the velocity vector of humans i and j; V max is the maximum velocity threshold; is the gradient norm of the human flow density at position p; G max is the maximum gradient threshold; P kis the probability that the pedestrian flow at position p moves in the k-th direction; K is the number of direction divisions.
[0070] The parameter acquisition method is: O ij Obtained from the overlap matrix; Obtained from the human body movement change matrix; V max Set to 2 m / s, determined according to the upper limit of the normal walking speed of people in the platform environment; Obtained by calculating the spatial derivative of the pedestrian flow density distribution map; G max Set to 4 people / (m²·m), based on the empirical value of the crowded scenario on the platform; Pk 通 Obtained by statistically analyzing the distribution of human body movement directions in the neighborhood of position p, and the calculation formula is where n k is the number of people moving in the k-th direction; K is set to 8, that is, 360 degrees is equally divided into 8 directions; H p,hist Obtained from historical data, and the calculation method is the exponentially weighted average of the risk scores at this position in the past 10 minutes; ε r The range of is ±0.05.
[0071] The risk assessment optimization function adopts a weighted summation form, comprehensively considering various crowding 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 crowding risk. The average relative speed difference term measures the speed inconsistency of the pedestrian flow. The greater the speed difference, the more chaotic the pedestrian flow and the higher the risk. The normalized density gradient term measures the spatial change rate of the pedestrian flow density. A large gradient means a density mutation and is likely to form a congestion point. The pedestrian flow direction entropy term quantifies the direction consistency. The higher the entropy value, the more chaotic the direction and the higher the risk. The historical risk coefficient term introduces time continuity and considers the cumulative effect of risk. Each term is normalized to ensure that the value range is between 0 and 1, which is convenient for comprehensive evaluation. The weight coefficients are determined based on importance and experimental verification, and different risk assessment requirements in different scenarios can be adapted by adjusting the weights.
[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 the platform area units; E is a set of edges, representing the pedestrian flow movement paths; C is a capacity function, representing the weight of the edge; e ij is the edge from node i to node j; α is the flow weight coefficient; β is the congestion influence coefficient; O ij is the average overlap degree between nodes i and j; F ij is the average pedestrian flow from node i to node j; T is the length of the statistical time window; n ij (t) is the number of people moving from node i to node j at time t; MaxFlow(G, s, t) is the maximum flow from the source node s to the sink node t; Cut(S, T) is the capacity of the cut set (S, T).
[0078] The method for obtaining parameters is as follows: The set of nodes V is generated by dividing the platform area into grid cells of size 1 m × 1 m; the set of edges E is determined according to the connectivity between adjacent grid cells, and each node is connected to 8 adjacent nodes around it; α is set to 1.5 and adjusted based on experiments; β is set to 2.0 and adjusted based on experiments; O ij obtains the average value from the overlap matrix of the corresponding area; n ij (t) is obtained by counting the number of people moving from node i to node j at time t; T is set to 300 seconds, that is, 5 minutes.
[0079] The weighted directed flow network model is based on graph theory, abstracting the platform area into discrete grid cells and connection relationships. The capacity function design considers two factors: the pedestrian flow F ij reflects the historical passing capacity, and the congestion influence factor (1 - β·O ij ) represents the weakening effect of congestion on the passing capacity. The maximum flow minimum cut algorithm is based on the network flow theory. By finding the maximum flow from the entrance node to the exit node and the minimum cut set that divides the graph into two parts, it can effectively identify the bottleneck points in the platform. This algorithm is selected because it can accurately reflect the bottleneck effect in the network, and the bottleneck points usually correspond to the potential congestion areas in the platform. The algorithm complexity is O(|V| 2 |E|), and the calculation efficiency is acceptable in the network of platform scale.
[0080] In step S07, the calculation of the platform danger coefficient 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 nD(r) = min{D(r) / D crit , 1};
[0083]
[0084] where DS(r) is the platform danger coefficient of area r; γ1, γ2, γ3, γ4, γ5 are weight coefficients, which are 0.25, 0.2, 0.2, 0.25, 0.1 respectively; D n (r) is the normalized pedestrian flow density of area r; VS(r) is the velocity inconsistency index of area r; DS(r) is the direction inconsistency index of area r; OS(r) is the average overlap degree of area r; BF(r) is the bottleneck factor; ε ds is the danger coefficient calculation error term; D(r) is the pedestrian flow density of area r; D crit is the critical pedestrian flow density; n r is the number of people in area r; N r is the set of human bodies in area r; is the standard deviation of the velocity vector of human body i within the time window; V std,max is the maximum threshold of the velocity standard deviation; δ is a small constant to prevent the denominator from being zero.
[0085] The method for obtaining parameters is as follows: D(r) is obtained from the pedestrian flow density distribution map; D crit is set to 6 people per square meter based on the safe pedestrian flow density standard; is obtained from the human body movement change matrix; V std,max is set to 0.5 m / s based on experiments; O ij is obtained from the overlap matrix; the bottleneck point is identified by the maximum flow minimum cut algorithm; δ is set to 0.01; ε ds ranges from ±0.03.
[0086] The calculation formula of the platform danger coefficient adopts the weighted summation form, comprehensively considering various risk factors. The normalized pedestrian flow density term reflects the basic congestion degree and adopts a piecewise function form. When the density exceeds the critical value, the risk reaches the maximum. The velocity inconsistency index measures the volatility of the pedestrian flow velocity by calculating the velocity standard deviation. The greater the volatility, the more unstable the pedestrian flow. The direction inconsistency index measures the chaos degree of the pedestrian flow direction by calculating the consistency of the velocity vectors. The closer the value is to 1, the more dispersed the direction. The average overlap degree term directly reflects the contact degree between human bodies and is a direct indicator of personal safety risk. The bottleneck factor considers the characteristics of the network structure and improves the risk rating for areas containing bottleneck points. The weight coefficients of each item are determined according to importance and experimental verification and can be adjusted according to different scenario requirements. This calculation method can comprehensively evaluate the safety status of the platform area and provide a quantitative basis for the early warning mechanism.
[0087] Optionally, in step S02, the improved OpenPose algorithm involves the calculation process of human pose feature point extraction, which is specifically expressed as follows:
[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 is the score of the j-th human key point; F j (I) is the detection result of the j-th key point by the basic pose feature extraction function on the image I; λ is the attention mechanism weight coefficient; A j (I) is the attention enhancement function; ε s is the feature point extraction error term; CNN pose is the pose estimation convolutional neural network; CNN att is the attention mechanism convolutional neural network; σ is the sigmoid activation function; w jk is the weight of the k-th attention feature to the j-th key point; K is the number of attention features; P conf is the human pose detection confidence; J is the total number of human key points.
[0093] The parameter acquisition method is: I is the image obtained by the multi-level resolution camera array; CNN pose and CNN att are pre-trained models, fine-tuned for the platform scene through transfer learning; λ is set to 0.5 and determined by optimizing the validation set; w jk is 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 ranges from ±0.05.
[0094] The improved OpenPose algorithm formula is based on the original OpenPose framework and improves the detection accuracy by introducing the attention mechanism. The basic pose feature extraction function F j (I) extracts the human key point features through the convolutional neural network and is the main part of the detection. The attention enhancement function A j(I) Generate an attention map through another convolutional neural network and normalize it to between 0 and 1 through the sigmoid function to enhance the feature representation of important regions. The two are combined through weighted combination to form the final key point score, and the λ parameter is introduced to control the influence degree of the attention mechanism. The confidence calculation formula evaluates the overall detection quality by averaging all key point scores and is used to screen effective detection results. This algorithm improves the detection ability in crowded scenes compared with the original OpenPose, especially being more robust in dealing with partial occlusion situations.
[0095] Optionally, in step S03, the construction of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell involves the following calculations:
[0096]
[0097] r max = max j=1,2,...,J d(P j , L)+δ r ;
[0098]
[0099] In the formula, represents the central axis of the human torso, determined by the starting point and the direction vector ; d(P j , L) is the distance from point P j to the line L; is the three-dimensional coordinate of the j-th human key point; t j is the projection parameter; ε l is the central axis fitting error term; r max is the radius of the maximum cylindrical virtual shell; δ r is the radius safety margin; h max is the height of the maximum cylindrical virtual shell; is the height coordinate of the key point; δ h is the height safety margin; r min is the radius of the minimum cylindrical virtual shell; T is the set of torso key points; h min is the height of the minimum cylindrical virtual shell; is the height coordinate of the neck key point; is the height coordinate of the hip key point.
[0100] The parameter acquisition method is: Obtained from the set of human pose feature points; T includes the index sets of shoulder, chest, and waist key points; δ r is set to 0.1 meters for safety considerations; δ hSet to 0.05 meters for safety considerations; the least squares method is used in the fitting process to solve by iterative optimization; ε l The range of is ±0.02 meters.
[0101] The virtual shell construction formula is based on geometric principles, and the human body is abstracted as a cylinder for representation. The central axis fitting formula uses the least squares method to find the best fitting line by minimizing the sum of the squares of the distances from all key points to the line. The point-to-line distance formula is based on vector calculations and represents the Euclidean distance from a point to its projected point on the line. The maximum cylinder parameter calculation is based on the envelope principle, where 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 the key points plus a safety margin to ensure complete enclosure of the human body. The minimum cylinder parameter calculation is based on the core area of the human body, where the radius is the average distance from the trunk 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 part of the human body. The designs of the two virtual shells take into account both safety and accuracy, providing spatial representations at different granularities for subsequent crowding risk assessment and trajectory analysis.
[0102] Optionally, in step S08, the pedestrian flow prediction combining the long short-term memory network with the attention mechanism involves the following calculation process:
[0103]
[0104]
[0105] In the formula, is the LSTM hidden state vector at time t; LSTM is the long short-term memory network function; is the input feature vector at time t; is the LSTM cell state at time t - 1; ε h is the hidden state error vector; α t,i is the attention weight, representing the attention degree of the current time t to the historical time i; score is the attention score function; is the parameter matrix of the attention mechanism; tanh is the hyperbolic tangent activation function; represents the vector concatenation operation; is the context vector, representing the weighted combination of historical information; is the predicted output vector; is the output layer parameter; is the prediction error vector.
[0106] The parameter acquisition method is: includes the characteristics of the pedestrian flow density distribution map at time t, the platform danger coefficient, and the time coding information, which are extracted from the original data through the feature extraction network; the LSTM network structure contains 3 layers, with 128 hidden units in each layer; Obtained by training with the backpropagation algorithm; the length T of the input sequence is set to 30, corresponding to 30 minutes of historical data; The range of is ±0.01; The range of is ±0.05.
[0107] The formula of the passenger flow prediction model is based on sequence learning theory. The LSTM network is used to capture the long-term dependencies in the time series, and the attention mechanism is combined to enhance the utilization of key historical information. The LSTM function processes the input, forget, and output through the gating mechanism and can effectively learn the patterns in the long sequence data. The attention mechanism assigns weights by calculating the correlation between the current hidden state and the historical hidden states, enabling the model to dynamically focus on relevant historical information. The attention scoring function adopts an additive form, calculates the correlation score through trainable parameters, and then obtains the attention weights through softmax normalization. The context vector is generated by weighted combination of the historical hidden states and contains important historical information. The final prediction is made by concatenating the current hidden state and the context vector, making full use of the current and historical information. This model can capture the complex spatio-temporal patterns of passenger flow changes, achieve high-precision short-term passenger flow prediction, and provide important support for early warning.
[0108] Specifically, the principle of the present invention is: The technical principle of the present 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, all-round passenger flow monitoring and early warning of the rail transit platform are realized.
[0109] First, the application of the multi-level resolution camera array solves the blind spot problem of the traditional single-view monitoring system. By synchronously deploying panoramic cameras and local high-definition cameras, the system can simultaneously obtain the overall situation and local detail information of the platform and establish a multi-scale space monitoring network. The improved OpenPose algorithm optimizes the traditional skeleton extraction technology and enhances the detection ability in crowded scenes, providing a high-quality set of human pose feature points for subsequent analysis.
[0110] In terms of human body space occupancy modeling, the present invention innovatively introduces a double-layer representation method of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell. The maximum cylindrical virtual shell completely encloses the human body and reflects the maximum occupancy range of the individual in space; the minimum cylindrical virtual shell accurately describes the core position of the human body and is used for trajectory analysis. This double-layer representation method solves the problem that the traditional point-like or rectangular representation cannot accurately reflect the human body space occupancy characteristics, providing a more accurate basis for passenger flow density calculation and risk assessment.
[0111] The introduction of the human kinetics equation enables the system to physically model the individual motion state based on Newton's laws of motion, achieving the prediction and correction of future positions. The human motion variation matrix and the overlap matrix quantify the relative motion state and spatial relationship between individuals, providing multi-dimensional feature inputs for risk assessment. The risk assessment optimization function integrates these features, mapping the complex pedestrian flow state into a standardized risk score, and achieving the precise quantification of crowding risks.
[0112] At the macroscopic level, the system constructs the platform as a weighted directed flow network, applies the maximum flow minimum cut algorithm to identify potential congestion bottleneck points, and combines a deep learning model to analyze historical data to predict the short-term pedestrian flow change trend. The multi-threshold warning mechanism adaptively triggers different levels of response measures according to the change of the platform danger coefficient, ensuring the timeliness and accuracy of risk warning.
[0113] Through this complete technical link from individual space modeling to group dynamic analysis, and then to risk prediction and warning, the present invention realizes the comprehensive perception and intelligent control of the pedestrian flow on the rail transit platform, providing a systematic solution for solving the core technical problems.
[0114] A specific embodiment 1 of the present invention is provided below. The specific implementation manners of each step in this embodiment 1 are described in detail as follows.
[0115] The specific implementation manner of step S01 is to install multiple cameras with different resolutions on the rail transit platform to form a multi-level resolution camera array. First, install a panoramic camera on the top of the platform, with a resolution of 1920×1080 pixels and a field of view angle of 120 degrees, covering the entire platform area; then install local high-definition cameras at key positions on the platform such as the entrance and exit, waiting area, and platform edge, with a resolution of 3840×2160 pixels and a field of view angle of 60 degrees, focusing on monitoring crowded areas. These cameras ensure the time alignment of the collected images through a time synchronization mechanism, and the sampling frequency is 10Hz. The setting of the multi-level resolution camera array aims to balance the monitoring coverage and detail capture ability. The panoramic camera provides macroscopic pedestrian flow distribution information, and the local high-definition camera provides microscopic human body posture information, jointly constituting a multi-scale spatial monitoring network. The configuration ratio of the panoramic camera to the high-definition camera is 1:3 to ensure high-precision monitoring coverage of key areas on the platform. The installation height of the camera is 3 - 4 meters, and the downward viewing angle is 30 - 45 degrees to reduce the influence of human body occlusion. The overlapping visual field area between cameras accounts for 20% - 30% of the total visual field, which is used for multi-view fusion and seamless stitching.
[0116] The specific implementation of step S02 is to extract the human skeleton from the images collected by the multi-scale spatial monitoring network. First, preprocess the images, including illumination equalization, noise elimination, and image enhancement; then use the improved OpenPose algorithm for human detection and key point localization. This algorithm is based on the convolutional neural network architecture and uses the Part Affinity Fields technology to connect human joint points. The calculation process of the improved OpenPose algorithm is specifically expressed as follows: S j = F j (I)·(1 + λA j (I)) + ε s ; F j (I) = CNN pose (I) j ; In the formula, S j is the score of the j-th human key point; F j (I) is the detection result of the j-th key point by the basic pose feature extraction function on the image I; λ is the attention mechanism weight coefficient, set to 0.5; A j (I) is the attention enhancement function; ε s is the feature point extraction error term, with a range of ±0.05; CNN pose is the pose estimation convolutional neural network; CNN att is the attention mechanism convolutional neural network; σ is the sigmoid activation function; w jk is the weight of the k-th attention feature for the j-th key point; K is the number of attention features, set to 16; P conf is the human pose detection confidence; J is the total number of human key points, set to 18. Through this step, the coordinates of 18 key skeletal nodes of each human body are extracted from the image to form a human pose feature point set. The key point confidence threshold is set to 0.6, and the detection results below this threshold will be filtered. For occlusion situations, the algorithm uses spatio-temporal consistency constraints for compensation, and predicts the positions of occluded key points through the key point trajectories of adjacent frames.
[0117] The specific implementation of step S03 is to construct a virtual shell model based on the human pose feature point set. First, use the least squares method to fit the central axis of the human torso to determine the human central axis; then, based on the spatial distribution of the human pose feature point set, calculate the parameters of the maximum circumscribed cylinder and construct the maximum cylinder virtual shell; then, based on the key points of the human torso, construct the minimum cylinder virtual shell. The calculation process of virtual shell construction is specifically expressed as follows: r max = max j=1,2,...,J d(P j , L) + δr ; In the formula, represents the central axis of the human torso, determined by the starting point and the direction vector ; d(P j , L) is the distance from point R j to the straight line L; is the three-dimensional coordinate of the j-th human key point; t j is the projection parameter; ε l is the central axis fitting error term, with a range of ±0.02 meters; r max is the radius of the maximum cylindrical virtual shell; δ r is the radius safety margin, set to 0.1 meter; h max is the height of the maximum cylindrical virtual shell; is the height coordinate of the key point; δ h is the height safety margin, set to 0.05 meter; r min is the radius of the minimum cylindrical virtual shell; T is the set of torso key points; h min is the height of the minimum cylindrical virtual shell; is the height coordinate of the neck key point; is the height coordinate of the hip key point. The maximum cylindrical virtual shell is used to represent the maximum occupancy range of the human body in the platform space and is applicable to crowded risk assessment; the minimum cylindrical virtual shell is used to represent the core position of the human body and is applicable to precise trajectory tracking. The two virtual shells together constitute the human three-dimensional space occupancy model. For abnormal postures, the ratio threshold of the maximum and minimum cylindrical radii is set to 3.0, and exceeding this threshold will trigger the abnormal detection mechanism.
[0118] The specific implementation of step S04 is to calculate the human motion parameters based on the position change of the virtual shell in consecutive time frames. First, the Hungarian algorithm is used to achieve the corresponding matching of the human body between adjacent frames; then, the displacement vectors of the centers of the maximum and minimum cylindrical virtual shells of each corresponding human body between two adjacent frames are calculated; then, the human body dynamics equation is applied to predict and correct the human motion state. The human body dynamics equation is specifically expressed as follows: In the formula, is the human body position vector at time t; is the human body velocity vector at time t; is the human body acceleration vector at time t; Δt is the time increment, set to 0.1 second; is the force applied by the human body, calculated by the formula , where k f is the force estimation coefficient, with a value range of 20 - 50 N / m, is the displacement vector of the key posture point; C dis the environmental resistance coefficient, set to 0.3; m h is the estimated human body mass, calculated by the formula , where k m is the mass estimation coefficient, with a value of 3.5, and h h is the human height; are the error vectors of position, velocity, and acceleration respectively, with ranges of ±0.05 m, ±0.03 m / s, and ±0.01 m / s 2 . The similarity threshold of the matching algorithm is set to 0.7. Matches below this threshold will be rejected, regarded as the appearance of a new target or the disappearance of the original target. Through this step, a human body motion change matrix containing position, velocity, and acceleration information is generated, providing a data basis for subsequent trajectory analysis. For motion mutation situations, the acceleration threshold is set to 2.0 m / s 2 , and exceeding this threshold will trigger abnormal behavior detection.
[0119] The specific implementation of step S05 is to calculate the pedestrian flow density based on the spatial distribution of the maximum cylindrical virtual shells. First, the platform area is divided into grid cells of size 0.5 m × 0.5 m; then the number of maximum cylindrical virtual shells within each grid cell is counted; next, the kernel density estimation algorithm is used to smooth the discrete number distribution to generate a continuous pedestrian flow density distribution map. The kernel density estimation algorithm is specifically expressed as follows: In the formula, D(x, y) is the pedestrian flow density at point (x, y); n is the number of people in the platform area; h is the bandwidth parameter, set to 1.5 m; (x i , y i ) is the center position of the i-th human body's maximum cylindrical virtual shell; K(u, v) is the two-dimensional Gaussian kernel function; ε d is the density estimation error term, with a range of ±0.2 people / m². The pedestrian flow density thresholds are set as follows: low density is 0 - 2 people / m², medium density is 2 - 4 people / m², high density is 4 - 6 people / m², and ultra-high density is greater than 6 people / m². The pedestrian flow density distribution map visually shows the degree of pedestrian flow concentration in each area of the platform using a color gradient, with green representing low density, yellow representing medium density, orange representing high density, and red representing ultra-high density. For the density change rate, the warning threshold is set to 0.5 people / m² / s, and exceeding this threshold indicates a rapid aggregation of the pedestrian flow, which requires key attention.
[0120] The specific implementation of step S06 is to calculate the spatial relationship between virtual shells and evaluate the crowding risk. First, calculate the shortest distance and overlapping volume between any two maximum cylindrical virtual shells in the platform area; then calculate the shortest distance and overlapping volume between any two minimum cylindrical virtual shells; next, construct an overlapping matrix and use a risk assessment optimization function to quantitatively evaluate the crowding risk. The calculation of the overlapping matrix is specifically expressed as follows:
[0121] Wherein, O ij is the overlap degree between the i-th and j-th cylindrical virtual shells in the overlap matrix; V overlap (C i , C j ) is the overlapping volume of two cylindrical virtual shells; V i , V j are the volumes of the i-th and j-th cylindrical virtual shells respectively; d ij is the horizontal distance between the central axes of two cylindrical virtual shells; r i , r j are the radii of the i-th and j-th cylindrical virtual shells respectively; h min , h max are the lower and upper limits of the height overlapping interval of two cylindrical virtual shells respectively; ε o is the overlap calculation error term, with a range of ±0.01. The risk assessment optimization function is specifically expressed as follows: R(p) = w1O p + w2V p + w3G p + w4H p + w5H p,hist + ε r ; Wherein, R(p) is the risk score at position p; w1, w2, w3, w4, w5 are weight coefficients, which are 0.3, 0.2, 0.2, 0.2, 0.1 respectively; O p is the average overlap degree within the neighborhood of position p; V p is the average relative velocity difference within the neighborhood of position p; G p is the normalized density gradient at position p; H p is the entropy value of the pedestrian flow direction at position p; H p,hist is the historical risk coefficient at position p; ε r is the risk assessment error term, with a range of ±0.05; n p is the number of people within the neighborhood of position p; N p is the neighborhood set of position p; are the velocity vectors of the i-th and j-th persons; V max is the maximum velocity threshold, set to 2 m / s; is the gradient norm of the pedestrian flow density at position p; G max is the maximum gradient threshold, set to 4 persons / (m²·m); P kis the probability that the crowd flow at position p moves in the k-th direction; K is the number of direction divisions, set to 8. The risk level threshold is set as follows: low risk is 0 - 0.3, medium risk is 0.3 - 0.6, high risk is 0.6 - 0.8, and extremely high risk is 0.8 - 1.0. For the rate of change of risk score, the warning threshold is set to 0.1 / second. Exceeding this threshold indicates a rapid increase in risk and immediate attention is required.
[0122] The specific implementation of step S07 is to analyze the crowd flow bottleneck based on graph theory methods and calculate the platform danger coefficient. First, abstract the platform area as a weighted directed graph, where nodes represent platform area units, edges represent crowd flow movement paths, and the edge weights are comprehensively determined based on the flow rate in the human movement change matrix and the degree of congestion in the overlap matrix; then apply the maximum flow minimum cut algorithm to identify the bottleneck points in the network, and the bottleneck points are usually high-incidence areas of crowd congestion; finally, based on the identified bottleneck points and the risk distribution heat map, calculate the platform danger coefficient for each area. The weighted directed flow network and the maximum flow minimum cut algorithm are specifically expressed 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 the weighted directed graph; V is the set of nodes, representing platform area units; E is the set of edges, representing crowd flow movement paths; C is the capacity function, representing the edge weight; e ij is the edge from node i to node j; α is the flow rate weight coefficient, set to 1.5; β is the congestion influence coefficient, set to 2.0; O ij is the average overlap degree between nodes i and j; F ij is the average crowd flow from node i to node j; T is the statistical time window length, set to 300 seconds; n ij (t) is the number of people moving from node i to node j at time t; MaxFlow(G, s, t) is the maximum flow from the source point s to the sink point t; Cut(S, T) is the capacity of the cut set (S, T). The calculation of the platform danger coefficient is specifically expressed 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}; Wherein, DS(r) is the platform danger coefficient of area r; γ1, γ2, γ3, γ4, γ5 are weight coefficients, which are 0.25, 0.2, 0.2, 0.25, 0.1 respectively; D n (r) is the normalized pedestrian flow density of area r; VS(r) is the velocity inconsistency index of area r; DS(r) is the direction inconsistency index of area r; OS(r) is the average overlap degree of area r; BF(r) is the bottleneck factor; ε ds is the danger coefficient calculation error term, with a range of ±0.03; D(r) is the pedestrian flow density of area r; D crit is the critical pedestrian flow density, set to 6 persons per square meter; n r is the number of people in area r; N r is the set of human bodies in area r; is the standard deviation of the velocity vector of human body i within the time window; V std,max is the maximum threshold of the velocity standard deviation, set to 0.5 m / s; δ is a small constant to prevent the denominator from being zero, set to 0.01. The platform danger coefficient threshold is set as follows: the warning threshold is 0.5, the alert threshold is 0.7, and the emergency threshold is 0.9. For the change rate of the danger coefficient, the warning threshold is set to 0.05 / s. Exceeding this threshold indicates that the dangerous situation is deteriorating rapidly and an emergency response plan needs to be activated.
[0123] The specific implementation of step S08 is to use deep learning methods to predict the changing trend of the platform pedestrian flow. First, a time series data set is constructed, including the historical pedestrian flow density distribution map data and the corresponding platform danger coefficients during the corresponding periods; then, a deep learning model combining long short-term memory network and attention mechanism is used for training to achieve pedestrian flow prediction. The calculation process of the prediction model is specifically expressed as follows: Wherein, is the LSTM hidden state vector at time t; LSTM is the long short-term memory network function; is the input feature vector at time t; is the LSTM cell state at time t-1; ε h is the hidden state error vector, with a range of ±0.01; α t,i is the attention weight; score is the attention score function; is the parameter matrix of the attention mechanism; tanh is the hyperbolic tangent activation function; represents the vector concatenation operation; is the context vector; is the predicted output vector; is the parameter of the output layer; It is the prediction error vector, with a range of ±0.05. Mean squared error is used as the loss function for model training, and the Adam optimizer is used for parameter update. The learning rate is set to 0.001, and the number of training epochs is 100. The prediction accuracy threshold is set to 85%, and if it is lower than this threshold, the 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 the prediction results for the next 5 minutes. For the change in prediction error, the warning threshold is set to 30%. If it exceeds this threshold, it indicates that the prediction is unreliable and the conservative warning mode needs to be switched to.
[0124] The specific implementation of step S09 is to establish a hierarchical response mechanism based on the danger coefficient. First, a three-level response strategy is set according to the platform danger coefficient: when the platform danger coefficient exceeds the warning threshold of 0.5 but is lower than the warning threshold of 0.7, the system sends a first-level warning message to the platform management personnel, suggesting increasing the patrol frequency; when the platform danger coefficient exceeds the warning threshold of 0.7 but is lower than the emergency threshold of 0.9, the system sends a second-level warning message to the platform management personnel, and at the same time plays guiding information through the in-station broadcast system to divert the passenger flow; when the platform danger coefficient exceeds the emergency threshold of 0.9, the system sends a third-level warning message to the platform management personnel, and at the same time starts the emergency response process, including measures such as temporarily restricting entry and adding temporary trains. The response mechanism is implemented using a state machine model, including four states: normal state, warning state, warning state, and emergency state. The state transition is based on the danger coefficient and its change rate. The response information is transmitted through three methods: visual alarm, sound prompt, and message push of the platform management system to ensure multi-channel reminders. The first-level warning uses a yellow visual identifier, the second-level warning uses an orange visual identifier, and the third-level warning uses a red visual identifier. Different levels of warnings use different frequencies of sound prompts. The warning information includes four key pieces of information: the location of the dangerous area, the value of the danger coefficient, the type of congestion, and the recommended disposal measures. The execution time requirements for the response mechanism are: the response time for the first-level warning does not exceed 30 seconds, the response time for the second-level warning does not exceed 20 seconds, and the response time for the third-level warning does not exceed 10 seconds. For the situation of repeatedly triggering warnings, the system uses an exponential backoff algorithm to control the warning frequency to avoid frequent disturbances.
[0125] In this embodiment, the above nine steps implement a complete process from image acquisition, human detection, virtual shell construction, motion analysis, density calculation, risk assessment, bottleneck identification, trend prediction to warning response. This method comprehensively utilizes the double-layer cylindrical virtual shell model to achieve the accuracy and applicability of human body spatial representation; the introduction of the human body dynamics equation takes into account the physical characteristics of the flow of people; the overlapping matrix and the risk assessment optimization function achieve the comprehensive quantification of multi-dimensional congestion characteristics; the weighted directed flow network and the maximum flow minimum cut algorithm effectively identify the bottleneck points of the flow of people; the prediction model combining the long short-term memory network and the attention mechanism achieves high-precision short-term passenger flow prediction. In practical applications, this method can detect potential risks 3 to 5 minutes in advance, providing sufficient response time for platform management personnel, effectively preventing the occurrence of crowded 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 adaptability and effectiveness of the system.
[0126] To better understand and implement the present invention, the following provides an embodiment 2 of a specific application scenario of the present invention: At a boarding station on a subway line in a certain city, platform congestion often occurs during peak hours. When the subway is about to depart and the doors are closing, there are often some passengers who have not boarded the train being too close to the doors due to congestion, and the staff need to discover and give voice reminders through inspections, which is not conducive to safety management. Additionally, there is also a phenomenon that a large amount of congestion occurs at different positions within the station near the moments when vehicles enter and leave the station, affecting safety. To improve the safety management level, researchers implemented a passenger flow monitoring system based on a multi-level resolution camera array at this station in January 2024. The length of this platform is 120 meters and the width is 12 meters. A total of 4 panoramic cameras and 12 local high-definition cameras are set up. The panoramic cameras are installed 3.8 meters above the platform top, with a resolution of 1920×1080 pixels and a field of view angle of 120 degrees, covering the entire platform area; the local high-definition cameras are installed 3.6 meters above key positions such as the platform entrance and exit, waiting area, and platform edge, with a resolution of 3840×2160 pixels and a field of view angle of 60 degrees, focusing on monitoring crowded areas. The overlapping field of view area between cameras accounts for 25% of the total field of view, which is used for multi-view fusion and seamless stitching.
[0127] The system uses an improved OpenPose algorithm to extract human skeletons from the panoramic platform images and local high-definition images in the obtained 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 is controlled within the range of ±0.05, the total number of human key points J is set to 18, and the key point confidence threshold is set to 0.6. After testing, the human detection accuracy of this system in the platform environment reaches 98.2%, and the average error of key point positioning is less than 0.08 meters.
[0128] Based on the set of extracted human body pose feature points, the system constructs a maximum cylindrical virtual shell and a minimum cylindrical virtual shell for each detected human body. During the construction process, the mid-axis fitting error term ε l is controlled within the range of ±0.02 meters, and the radius safety margin δ r is set to 0.1 meter, and the height safety margin δ h is set to 0.05 meter. By analyzing the data during the peak period from 17:30 to 18:30 on a certain working day, the parameters of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell for people in different height ranges are statistically counted, as shown in Table 1:
[0129] Table 1 Statistical results of virtual shell parameters for people in different height ranges
[0130]
[0131] The system calculates the human body movement parameters based on the change of the virtual shell position in consecutive time frames. The time increment Δt is set to 0.1 second, and the force estimation coefficient k f takes a value of 35 N / m, the environmental resistance coefficient C d is set to 0.3, and the mass estimation coefficient k m takes a value of 3.5. The error vector ranges of position, velocity, and acceleration are respectively controlled within ±0.05 meters, ±0.03 m / s, and ±0.01 m / s 2 . By analyzing the pedestrian flow velocity distribution in different areas during the peak period, the statistical results shown in Table 2 are obtained:
[0132] Table 2 Statistical results of pedestrian flow velocity in different areas of the platform
[0133] Platform area Average speed (m / s) Speed standard deviation (m / s) Main direction consistency Percentage of people (%) Inbound 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 Outbound area 0.92 0.31 0.78 18.6
[0134] The system divides the platform area into grid cells with a size of 0.5 m × 0.5 m, and counts the number of maximum cylindrical virtual shells in each grid cell. The kernel density estimation algorithm is used to smooth the discrete number distribution, and the bandwidth parameter h is set to 1.5 meters. The density estimation error term ε d is controlled within the range of ±0.2 people / m². For the data during the peak period from 18:00 to 18:10, the system generates a statistical result of the pedestrian flow density distribution, as shown in Table 3:
[0135] Table 3 Statistical results of pedestrian flow density in the platform area
[0136] Density level <![CDATA[Density range (persons / m 2 )]]> Area percentage (%) 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 Ultra-high density >6 3.5 Extremely high risk
[0137] The system calculates the overlap degree between any two maximum cylindrical virtual shells and the overlap degree between any two minimum cylindrical virtual shells in the platform area, and constructs an overlap matrix. The overlap calculation error term ε oThe control is 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, and the risk assessment error term ε r The control is within ±0.05. According to the risk scores, the platform areas are divided into different risk levels and statistical analysis is carried out. The results are shown in Table 4 as follows:
[0138] Table 4 Statistical results of platform area risk levels
[0139]
[0140]
[0141] The system abstracts the platform area as a weighted directed graph, which is divided into 96 nodes and 240 edges in total. 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 3 main bottleneck points, which are located in the area in front of the escalator at Exit B, the entrance of the passage at Exit A, and the edge area of the middle platform. Based on the identified bottleneck points and the risk distribution heat map, the platform danger coefficients of each area are 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 error term ε for calculating the danger coefficient ds The control is within ±0.03. At 18:05 during the peak period, the system detected that the platform danger coefficient in the area in front of the escalator at Exit B reached 0.76, triggering a secondary warning.
[0142] The system constructs a time series dataset based on historical data and trains it using a deep learning model that combines long short-term memory networks with an attention mechanism. The hidden state error vector ε h The control is within ±0.01, and the prediction error vector ε y The control is within ±0.05. The mean squared error is used as the loss function for model training, and the Adam optimizer is used for parameter update. The learning rate is set to 0.001, and the number of training epochs is 100. At 18:05, the system predicts the change trend of the platform danger coefficient in the area in front of the escalator at Exit B in the next 5 minutes as shown in Table 5:
[0143] Table 5 Prediction of the platform danger coefficient in the area in front of the escalator at Exit B
[0144] Time point Predicted danger coefficient Predicted confidence level Risk level Recommended measures 18:06 0.78 0.93 High risk Strengthen guidance 18:07 0.81 0.91 Extremely high risk Dredge the passenger flow 18:08 0.86 0.89 Extremely high risk Restrict inbound 18:09 0.89 0.87 Extremely high risk Restrict inbound 18:10 0.85 0.85 Extremely high risk Dredge the passenger flow
[0145] Based on the prediction results, the platform management system automatically triggered a secondary warning at 18:07, sending a warning message to the platform management staff. At the same time, guiding information was played through the in-station broadcast system, and 2 staff members were dispatched to the area in front of the escalator at Exit B to divert the passenger flow. At 18:08, the system predicted that the danger coefficient would exceed 0.85, triggering a pre-response to the tertiary warning, and temporarily implementing a flow-limiting measure at Exit B in advance. Actual observations showed that due to the timely implementation of the warning measures, the actual danger coefficient 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 crowded risk that might have occurred originally.
[0146] Traditional platform passenger flow monitoring methods mainly rely on fixed-angle cameras and simple human detection algorithms, which are difficult to accurately capture the individual positions and pose information in the complex platform environment and cannot effectively evaluate the crowded risk. The present invention uses a multi-level resolution camera array to construct a multi-scale space monitoring network, combines an improved OpenPose algorithm to achieve high-precision human skeleton extraction, constructs a maximum cylindrical virtual shell and a minimum cylindrical virtual shell for each detected human body, and establishes a three-dimensional space occupancy model of the human body. By calculating the spatial relationship between the virtual shells and the human movement parameters, a passenger flow density distribution map, an overlap matrix, and a human movement change matrix are generated to achieve accurate quantification of the passenger flow density, crowded degree, and movement characteristics. Based on graph theory and deep learning methods, the system can identify the bottleneck points of the platform, predict the trend of passenger flow changes, and issue warnings in advance. Compared with traditional methods, the present invention improves the passenger flow monitoring accuracy by about 30%, and the average early warning time is increased by 3 minutes, effectively reducing the incidence of platform crowded events. The implementation results show that this method has important practical value for the safety management of rail transit platforms.
[0147] It should be noted that the detailed explanations of the variables involved in the present invention are shown in Tables 6, 7, and 8 below.
[0148] Table 6 Variable Explanation Table (Part 1)
[0149]
[0150]
[0151] Table 7 Variable Explanation Table (Part 2)
[0152]
[0153]
[0154] Table 8 Variable Explanation Table (Part 3)
[0155]
[0156] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A method for monitoring the flow of people on a rail transit platform, comprising: Obtain the panoramic image and local high-definition image of the platform, and construct a multi-scale spatial monitoring network; Extract the set of human body pose feature points; Establish a three-dimensional spatial occupancy model of the human body; analyze the individual movement trajectory; construct a crowd density distribution map; quantitatively evaluate the potential risk of crowd congestion; identify potential congestion bottleneck points; predict the short-term crowd change trend; trigger a hierarchical response mechanism. It is characterized in that a multi-level resolution camera array is used to obtain the panoramic image and local high-definition image of the platform; the improved OpenPose algorithm is used to extract the human body skeletons from the images in the multi-scale spatial monitoring network; a maximum cylindrical virtual shell and a minimum cylindrical virtual shell are constructed for each detected human body to establish a three-dimensional spatial occupancy model of the human body; the human body dynamics equation is applied to predict and correct the individual movement state to generate a human body movement change matrix; Analyze the overlap matrix, and use the risk assessment optimization function to quantitatively evaluate the potential risk of crowd congestion.
2. The method for monitoring the flow of people on the rail transit platform according to claim 1, wherein The maximum cylindrical virtual shell refers to a cylinder with the smallest volume that completely encloses the human body based on the set of human body pose feature points, and is used to represent the maximum occupancy range of the human body in the platform space; the minimum cylindrical virtual shell refers to a cylinder that only contains the core part of the human body with the central axis of the human body trunk determined from the set of human body pose feature points as the central axis, and is used to accurately calculate the core position and movement characteristics of the human body.
3. The rail transit platform passenger flow monitoring method according to claim 2, characterized in that, The human body movement change matrix refers to a numerical matrix that records the position changes, speed magnitudes and directions between the maximum cylindrical virtual shell and the minimum cylindrical virtual shell of each detected human body between consecutive time frames, and is used to quantitatively analyze the dynamic characteristics of the crowd.
4. The rail transit platform passenger flow monitoring method according to claim 3, characterized in that The overlap matrix refers to a two-dimensional matrix that calculates 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 proximity degree between the corresponding two human bodies.
5. The rail transit platform passenger flow monitoring method according to claim 4, wherein The crowd density distribution map refers to a two-dimensional density map generated based on the spatial distribution of the maximum cylindrical virtual shells in the platform area, and is used to visually represent the crowd density of each area of the platform.
6. The method for monitoring the flow of people on a rail transit platform according to claim 5, wherein, The risk assessment optimization function is used to map multi-dimensional congestion features to a standardized risk score. The inputs include the overlap degree of the maximum cylindrical virtual shell and the minimum cylindrical virtual shell obtained from the overlap matrix, the relative speed difference obtained from the human body movement change matrix, the spatial density gradient obtained from the crowd density distribution map, the crowd direction entropy value calculated from the human body movement change matrix, and the historical risk coefficient obtained from historical data. The outputs are the normalized risk score and the risk distribution heat map for platform danger coefficient calculation and risk visualization.
7. The rail transit platform passenger flow monitoring method according to claim 6, characterized in that, The platform danger coefficient refers to a dimensionless index calculated by comprehensively considering the crowd density in the crowd density distribution map, the inconsistency of moving speeds, the inconsistency of directions in the human body movement change matrix, and the overlap degree in the overlap matrix, and is used to quantitatively evaluate the current safety state of the platform.
8. The method for monitoring the flow of people on a rail transit platform according to claim 7, wherein The human body 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 body mass value estimated from the set of human body pose feature points, the current velocity vector obtained from the human body motion change matrix, the environmental resistance coefficient obtained from the platform environment parameters, the force exerted by the human body estimated from the change in the set of human body pose feature points, and the time increment obtained from the system settings. The output is the corrected human body position and velocity vector for updating the human body motion change matrix.
9. A computer-readable storage medium, characterized in that, Program instructions are stored in the computer-readable storage medium. When the program instructions run on a computer, they are used to execute a method for monitoring the flow of people on a rail transit platform according to any one of claims 1-8.
10. A passenger flow monitoring system for a rail transit platform, characterized in that, The system includes the computer-readable storage medium according to claim 9. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is set inside the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is set inside the system.
Citation Information
Patent Citations
Method and system for monitoring passenger flow safety of high-speed rail platform
CN118035941A
Subway fire scene robot-assisted pedestrian flow evacuation simulation method
CN118798042A
Rail transit passenger flow volume safety monitoring management method and system
CN119417678A
Video surveillance systems, devices and methods with improved 3D human pose and shape modeling
US20130250050A1
Cited By
Method and system for identifying and detecting illegal parking of hazardous chemical vehicles in service area
CN120913420A
Space debris feature embedded characterization method based on physically guided learning
CN121190781A