Pedestrian flow composition ratio prediction method based on time series fluctuation
Through the pedestrian flow composition ratio prediction method based on time series fluctuations, the problem that existing technologies cannot provide efficient diversion solutions in emergency situations is solved, the intelligent management of traffic signals and road resources is realized, and the adaptability and intelligence level of the transportation system are improved.
Patent Information
- Application Number
- CN202411753744.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing technologies are unable to provide efficient real-time simulation and targeted diversion solutions in emergency situations, and cannot meet the dynamic management needs of intelligent transportation, especially in terms of dynamically adjusting traffic signals and allocating road resources.
A pedestrian flow composition ratio prediction method based on time series fluctuations is adopted. By collecting and processing real scene data, pedestrian flow is simulated, and the pedestrian type and behavior characteristics are combined to predict the pedestrian flow composition ratio and carry out intelligent management and control.
It realizes the intelligent dynamic management of traffic signals and road resources, improves the adaptability and intelligence level of the traffic system, and provides more accurate and efficient traffic diversion solutions.
Smart Images

Figure CN119541213B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent transportation, and particularly relates to a pedestrian flow composition ratio prediction method based on time sequence fluctuation. BACKGROUND
[0002] With the rapid development of intelligent transportation, traditional transportation is undergoing a profound transformation, and modern transportation is accelerating towards intelligentization. Under this background, reasonable design of traffic scenes and scientific setting of pedestrian crossing facilities are of great significance for quickly guiding pedestrians and reducing accident risks, especially in emergency situations to improve traffic safety and efficiency.
[0003] To address the above problems, many scholars have optimized and corrected the social force model by analyzing the behavior of pedestrians in different scenarios, making it more realistic in actual traffic scenarios. Based on the simulation results, not only the layout of pedestrian crossing facilities can be optimized, but also certain guidance suggestions can be provided in emergency situations, thereby improving traffic management and public safety capabilities. However, the existing research still has obvious deficiencies: on the one hand, the research mainly focuses on the optimization of static facilities, and there is less exploration of intelligent management of dynamic adjustment of traffic signals and allocation of road resources; on the other hand, the actual scene in emergency situations is often complex and variable, and the existing technology is difficult to provide efficient real-time simulation and targeted guidance scheme in time, which cannot fully meet the dynamic management needs of intelligent transportation. SUMMARY
[0004] The present application is to solve the above-mentioned deficiencies in the prior art, and proposes a pedestrian flow composition ratio prediction method based on time sequence fluctuation, so as to predict the composition ratio of pedestrian flow according to the fluctuation sequence of actual pedestrian flow combined with the characteristics of simulated pedestrian flow sequence, and intelligently manage and control traffic signals, road resources and the like according to the type and behavior characteristics of pedestrians, thereby providing a new solution for optimizing traffic management, guidance and emergency response.
[0005] To achieve the above-mentioned application purposes, the following technical solutions are adopted:
[0006] The pedestrian flow composition ratio prediction method based on time sequence fluctuation has the following characteristics:
[0007] Step 1: Collect and process real scene data;
[0008] Step 1.1: Obtain pedestrian videos of the same one-way straight channel in the same time period in the first period and set a reference line at the exit of the channel in each frame of the pedestrian video, so as to process the pedestrian video in the first period every certain time interval Identify the pedestrians passing through the reference line and get the number of pedestrians passing through the reference line and form the first Pedestrian flow sequence under a period , thus obtaining Pedestrian flow sequence under a period ,in, Indicates the The next cycle Pedestrian flow of time, Indicates the total duration;
[0009] Step 1.2: After taking the average and then performing median filtering, the overall trend sequence of pedestrian flow is obtained. ,in, Indicates the The overall trend of pedestrian flow during the period;
[0010] Step 1.3: The pedestrian flow volume trend of each duration in is taken as the random arrival rate of Poisson distribution, thus generating a total of After taking the Poisson random number and reversing it, we can get the number of pedestrians arriving at the entrance of the one-way straight channel at each moment. ;in, Indicates the The number of pedestrians arriving at the entrance of the one-way straight passage at a certain moment;
[0011] Step 1.4: According to Construct a pedestrian type array ,in, Indicates the The type identification sequence of all pedestrians arriving at the entrance of the one-way straight passage at the moment, and ; Indicates the Arriving at the entrance of the one-way straight passage at the pedestrian types; and , Indicates aggregation type, Represents distributed type; initialization = ;
[0012] Step 2: Simulate pedestrian flow;
[0013] Step 2.0: Initialization ;
[0014] Take a vertex at the entrance of the channel in the pedestrian video as the origin and the horizontal direction of the channel as Axis direction, with the vertical direction of the channel as Axis direction, establish the first plane coordinate system;
[0015] Get the channel in Length in the axial direction and Width in the axial direction ;
[0016] Use the four-point calibration method to calibrate the coordinates of the first point in the first plane coordinate system , coordinates of the second point , coordinates of the third point , coordinates of the fourth point ;
[0017] Definition from arrive The line segments between arrive The line segments between the two sides of the channel represent the edges of the walls ;in, Indicates the channel Side wall edges;
[0018] Definition from arrive The line segment is the reference line of the simulation scene ;
[0019] The radius interval of pedestrians is defined as ,in, is the minimum radius of pedestrians, is the maximum radius of the pedestrian;
[0020] The pedestrian weight range is defined as ,in, is the minimum weight of the pedestrian, is the maximum weight of the pedestrian;
[0021] The expected speed range of pedestrians is defined as ,in, is the minimum expected speed of pedestrians, is the maximum expected speed of the pedestrian;
[0022] Define the initial vertical coordinate interval of the pedestrian as , where 0 is the minimum value of the pedestrian’s initial vertical coordinate, is the maximum value of the pedestrian’s initial vertical coordinate;
[0023] Define the target point coordinates of each pedestrian as ,in, , is the horizontal coordinate of a point in front of the channel exit, ;
[0024] Step 2.1: Randomly generate the radius sequence of the pedestrians at time , where denotes the radius of the th pedestrian arriving at the entrance of the one-way straight channel at time ; denotes the number of pedestrians arriving at the entrance of the one-way straight channel at time ;
[0025] Step 2.2: Randomly generate the weight sequence of the pedestrians at time , where denotes the weight of the th pedestrian arriving at the entrance of the one-way straight channel at time ;
[0026] Step 2.3: Randomly generate the expected speed sequence of the pedestrians at time , where denotes the expected speed of the th pedestrian arriving at the entrance of the one-way straight channel at time ;
[0027] Step 2.4: Define the vector speed sequence of the pedestrians at time , where denotes the vector speed of the th pedestrian arriving at the entrance of the one-way straight channel at time , and initialize to 0;
[0028] Step 2.5: Randomly generate the initial longitudinal coordinate sequence of the pedestrians at time , where denotes the initial longitudinal coordinate of the th pedestrian arriving at the entrance of the one-way straight channel at time , thereby generating the position sequence of the pedestrians at time , denotes the initial position of the th pedestrian arriving at the entrance of the one-way straight channel at time ;
[0029] Step 2.6: Initialize ;
[0030] Step 2.3: Calculate the first Pedestrian position sequence at each moment Middle Pedestrian self-propelled force ;
[0031] (1)
[0032] In formula (1), Indicates the The moment The time it takes for a pedestrian's walking speed to return to the expected speed; For the The moment The position of the pedestrian points to the target point coordinates direction vector;
[0033] Step 2.4: Calculate the first Pedestrian position sequence at each moment Middle Pedestrians and The interaction forces between pedestrians ;
[0034] (2)
[0035] In formula (2), For the The repulsive force parameter of each pedestrian, The minimum range for generating repulsive force; For the The moment Pedestrians and The sum of the radii of the pedestrians; For the The moment Pedestrians and The distance between the centroids of pedestrians; For the The moment A pedestrian points to The unit vector of each pedestrian; is the extrusion pressure parameter; is the friction parameter; For the The moment Pedestrians and The unit vector of the tangential direction between pedestrians; represents the contact force discriminant function, when season ,when season ; For the The moment Pedestrians and The tangential velocity difference between pedestrians;
[0036] Step 2.5: Calculate the first Pedestrian position sequence at each moment Middle Pedestrians and Side wall edge The force between ;
[0037] (3)
[0038] In formula (3), For the The first position in the pedestrian position sequence at the moment pedestrians to the edge of the wall distance, For the The first position in the pedestrian position sequence at the moment Pedestrians and the edge of the wall The unit vector in the perpendicular direction, Indicates the The first position in the pedestrian position sequence at the moment Pedestrians walking parallel The unit vector of the direction;
[0039] Step 2.6: If = , then using formula (4) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion ,like = , then using formula (5) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion ;
[0040] (4)
[0041] (5)
[0042] In formula (4) and formula (5), It indicates the driving force of any pedestrian to accelerate or decelerate when facing congestion. For the The first position in the pedestrian position sequence at the moment The pedestrian density in front of the pedestrian is , For the The first position in the pedestrian position sequence at the moment The length in front of the pedestrian is The total number of pedestrians within the range; Indicates the threshold for judging congestion ahead, Indicates the threshold for judging that the front is not crowded;
[0043] Step 2.7: Update the first Pedestrian position sequence at each moment Middle vector velocity of pedestrians ;
[0044] (6)
[0045] Step 2.8: Update the first Pedestrian position sequence at each moment Middle The positions of pedestrians after adjacent time intervals ;
[0046] (7)
[0047] Step 2.9: Assign to Afterwards, if , then return to step 2.2 to execute sequentially, otherwise, it means that the The position sequence of all pedestrians after adjacent time intervals ; and record the Pedestrian position sequence at each moment Through the reference line Number of pedestrians ;
[0048] Step 2.10: Delete Pedestrian position sequence at each moment The horizontal coordinate is in the interval Pedestrian coordinate information outside the radius sequence is deleted at the same time. , weight sequence , expected velocity sequence , vector velocity sequence and identification information sequence The information in the Moment 、 、 、 、 and ; and update the number of pedestrians ;
[0049] Step 2.11: Assign to ,like , then follow step 2.1 to obtain Moment 、 、 、 、 and as well as , and respectively and 、 and 、 and 、 and 、 and 、 and Merge Assign to After that, return to step 2.2 and execute sequentially; otherwise, it means that the number of pedestrians sequence is obtained. ;
[0050] Step 2.12: Zhongmei The sum of the number of pedestrians is used as the simulated pedestrian flow sequence The elements in , thus obtaining the simulated clustered pedestrian flow sequence ; Indicates the simulated aggregated pedestrian flow over a period of time;
[0051] Step 2.13: Initialization = ,initialization Then, follow the process from step 2.1 to step 2.12 to obtain the simulated dispersed pedestrian flow sequence. ;in, Indicates the simulated dispersed pedestrian flow for a certain period of time;
[0052] Step 3: Sequence feature extraction and judgment threshold determination;
[0053] Step 3.1: Sequence 、 Subtract , and obtain the fluctuation sequence of simulated aggregated pedestrian flow sequence and the fluctuating sequence simulating the dispersed pedestrian flow sequence ;in, It means that the simulated clustered pedestrian flow sequence is higher than the overall trend sequence in the The fluctuation value over time, Indicates the The simulated dispersed pedestrian flow of duration is compared with the overall trend sequence in Fluctuation value over a certain period of time;
[0054] Step 3.2: Use equation (8) and set the moving window length as Calculate separately The moving standard deviation series and The moving standard deviation series ,in, Indicates that the moving window length is Time Series exist The moving standard deviation at each moment, Indicates that the moving window length is Time Series exist Moving standard deviation at each moment;
[0055] (8)
[0056] In formula (8), Indicates that the moving window length is Time Series exist The moving average of time, and ; Indicates that the moving window length is Time Series exist The moving average of time, and ;
[0057] Step 3.3: Calculation The mean 、 The mean ;
[0058] Step 3.4: Calculate the upper threshold of the moving standard deviation , the lower threshold of the moving standard deviation ;
[0059] Step 4: Pedestrian flow composition prediction;
[0060] Step 4.1: Get the Pedestrian flow sequence under a period minus After that, get Fluctuation sequence under a period ,in, Indicates the The pedestrian flow sequence in the period is compared with the overall trend sequence in the Fluctuation value over a certain period of time;
[0061] Step 4.2: Calculate according to formula (8) The moving standard deviation series ,in, Indicates that the moving window length is When, Pedestrian flow fluctuation sequence under a period exist Moving standard deviation at each moment;
[0062] Step 4.3: When , indicating the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher;
[0063] when , then it means the Under the cycle The proportion of dispersed pedestrians in the pedestrian flow composition after the time is higher.
[0064] The method for predicting pedestrian flow composition ratio based on time series fluctuations according to the present invention is also characterized in that steps 3.2 to 4.3 are replaced by the following steps:
[0065] Step 1: Use formula (9) and set the moving window length as Calculate separately The moving root mean square sequence and The moving root mean square sequence ,in, Indicates that the moving window length is Time Series exist The moving root mean square of time, Indicates that the moving window length is Time Series exist Moving root mean square of time;
[0066] (9)
[0067] Step 2: Calculation The mean 、 The mean ;
[0068] Step 3: Calculate the upper threshold of the moving mean square , the lower threshold of the moving root mean square ;
[0069] Step 4: Get the Pedestrian flow sequence under a period minus After that, get Fluctuation sequence under a period ,in, Indicates the The pedestrian flow sequence in the period is compared with the overall trend sequence in the Fluctuation value over a certain period of time;
[0070] Step 5: Calculate according to formula (9) The moving standard deviation series ,in, Indicates that the moving window length is When, Pedestrian flow fluctuation sequence under a period exist Moving standard deviation at each moment;
[0071] Step 6: When , then it means the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher;
[0072] when , then it means the Under the cycle The proportion of dispersed pedestrians in the pedestrian flow composition after the time is higher.
[0073] The electronic device of the present invention includes a memory and a processor, and is characterized in that the memory is used to store a program that supports the processor to execute the pedestrian flow composition ratio prediction method, and the processor is configured to execute the program stored in the memory.
[0074] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program executes the steps of the pedestrian flow composition ratio prediction method when the computer program is executed by a processor.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] 1. The present application provides a pedestrian flow composition ratio prediction method based on time series fluctuation, which can effectively make up for the shortcomings of existing research in dynamic adjustment of traffic signals and road resource allocation. By analyzing the type and behavior characteristics of pedestrians through the prediction results, intelligent dynamic management and optimization control of traffic signals, road resources, etc. can be realized, thereby improving the adaptability and intelligent level of the traffic system and meeting the high requirements of modern intelligent traffic for real-time regulation.
[0077] 2. The present application can predict the composition ratio of pedestrian flow in real time by recording pedestrian flow fluctuation data and combining the characteristics of simulated pedestrian flow. By analyzing the type and behavior of pedestrians in the scene, a more accurate and efficient diversion scheme can be provided according to the complexity of the actual scene. BRIEF DESCRIPTION OF DRAWINGS
[0078] Figure 1 is the overall flowchart of the present application;
[0079] Figure 2 is the video recognition schematic diagram in the embodiment of the present application;
[0080] Figure 3 is the data graph obtained by splicing the pedestrian flow sequence under three periods in the embodiment of the present application;
[0081] Figure 4 is the overall trend graph of pedestrian flow in the embodiment of the present application;
[0082] Figure 5 is the first plane coordinate system constructed with a certain vertex at the entrance of the channel in the pedestrian video as the origin of the present application;
[0083] Figure 6a is the simulated aggregated pedestrian flow sequence graph in the embodiment of the present application;
[0084] Figure 6b is the simulated dispersed pedestrian flow sequence graph in the embodiment of the present application;
[0085] Figure 7a is the simulated aggregated pedestrian flow fluctuation sequence and its moving standard deviation and moving root mean square graph in the embodiment of the present application;
[0086] Figure 7b is the simulated dispersed pedestrian flow fluctuation sequence and its moving standard deviation and moving root mean square graph in the embodiment of the present application;
[0087] Figure 8a is the moving standard deviation prediction result graph in the embodiment of the present application;
[0088] Figure 8b is the moving root mean square prediction result graph in the embodiment of the present application. DETAILED DESCRIPTION
[0089] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0090] In this embodiment, a pedestrian flow composition ratio prediction method based on time series fluctuations is used. Figure 1 As shown, the steps are as follows:
[0091] Step 1: Collect and process real scene data;
[0092] Step 1.1: Get the The pedestrian video of the same one-way straight channel in the same time period under the same cycle is set at the exit of the channel in each frame of the pedestrian video, so as to The pedestrian video under the cycle is Pedestrians are identified by reference lines. Pedestrians in the video are identified as follows: Figure 2 As shown, pedestrians will be identified in the green box and assigned a unique ID. The red dot on the green box is used to determine whether the pedestrian has passed the reference line. The yellow and blue lines are reference lines used to record the number of pedestrians passing through. The number of pedestrians passing through the reference line is obtained and constitutes the first Pedestrian flow sequence under a period , thus obtaining Pedestrian flow sequence under a period ,in, Indicates the The next cycle Pedestrian flow of time, Indicates the total duration, When is 5, the pedestrian flow sequence of 3 cycles is as follows Figure 3 As shown, the sequences under each period are separated by dotted lines.
[0093] Step 1.2: After taking the average and then performing median filtering, the overall trend sequence of pedestrian flow is obtained. ,in, Indicates the The overall trend of pedestrian flow over a certain period of time, such as Figure 4 As shown;
[0094] Step 1.3: The pedestrian flow volume trend of each duration in is taken as the random arrival rate of Poisson distribution, thus generating a total of After taking the Poisson random number and reversing it, we can get the number of pedestrians arriving at the entrance of the one-way straight channel at each moment. ;in, Indicates the The number of pedestrians arriving at the entrance of the one-way straight passage at a certain moment.
[0095] Step 1.4: According to Construct a pedestrian type array ,in, Indicates the The type identification sequence of all pedestrians arriving at the entrance of the one-way straight passage at the moment, and ; Indicates the Arriving at the entrance of the one-way straight passage at the pedestrian types; and , Indicates aggregation type, Represents distributed type; initialization = ;
[0096] Step 2: Simulate pedestrian flow;
[0097] Step 2.0: Initialization ;
[0098] Take a vertex at the entrance of the channel in the pedestrian video as the origin and the horizontal direction of the channel as Axis direction, with the vertical direction of the channel as Axis direction, establish the first plane coordinate system, such as Figure 5 As shown;
[0099] Get channel in Length in the axial direction and Width in the axial direction ;
[0100] Use the four-point calibration method to calibrate the coordinates of the first point in the first plane coordinate system , coordinates of the second point , coordinates of the third point , coordinates of the fourth point ;
[0101] Definition from arrive The line segments between arrive The line segments between them represent the edges of the walls on both sides of the channel ;in, Indicates the channel Side wall edges;
[0102] Definition from arrive The line segment is the reference line of the simulation scene ;
[0103] The radius interval of pedestrians is defined as ,in, is the minimum radius of pedestrians, is the maximum radius of the pedestrian;
[0104] The pedestrian weight range is defined as ,in, is the minimum weight of the pedestrian, is the maximum weight of the pedestrian;
[0105] The expected speed range of pedestrians is defined as ,in, is the minimum expected speed of pedestrians, is the maximum expected speed of the pedestrian;
[0106] Define the initial vertical coordinate interval of the pedestrian as , where 0 is the minimum value of the pedestrian’s initial vertical coordinate, is the maximum value of the pedestrian’s initial vertical coordinate;
[0107] Define the target point coordinates of each pedestrian as ,in, , is the horizontal coordinate of a point in front of the channel exit, .
[0108] Step 2.1: Randomly generate Radius sequence of pedestrians at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The radius of pedestrians, Indicates the The number of pedestrians arriving at the entrance of the one-way straight passage at a certain moment, and ;
[0109] exist Randomly generate Pedestrian weight sequence at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The weight of a pedestrian;
[0110] exist Randomly generate The expected speed sequence of pedestrians at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The expected speed of each pedestrian;
[0111] define a first vector velocity sequence of pedestrians at time wherein, represents the vector velocity of the pedestrian arriving at the entrance of the one-way straight channel at time and is initialized to 0;
[0112] generate an initial longitudinal coordinate sequence of pedestrians at time in a random manner; wherein, represents the initial longitudinal coordinate of the pedestrian arriving at the entrance of the one-way straight channel at time , thereby generating a position sequence of pedestrians at time , represents the initial position of the pedestrian arriving at the entrance of the one-way straight channel at time . Step 2.2: initialize ;
[0113] Step 2.3: calculate the self-driving force of the pedestrian in the position sequence of pedestrians at time
[0114] according to formula (1) ; (1)
[0115] (1)
[0116] In formula (1), represents the time taken by the pedestrian at time to restore the walking speed to the expected speed; is the direction vector of the position of the pedestrian at time pointing to the coordinate of the target point.
[0117] Step 2.4: calculate the interaction force between the pedestrian and the pedestrian in the position sequence of pedestrians at time according to formula (2) ;
[0118] (2)
[0119] In formula (2), For the The repulsive force parameter of each pedestrian, The minimum range for generating repulsive force; For the The moment Pedestrians and The sum of the radii of the pedestrians; For the The moment Pedestrians and The distance between the centroids of pedestrians; For the The moment A pedestrian points to The unit vector of each pedestrian; is the extrusion pressure parameter; is the friction parameter; For the The moment Pedestrians and The unit vector of the tangential direction between pedestrians; represents the contact force discriminant function, when season ,when season ; For the The moment Pedestrians and The tangential velocity difference between pedestrians.
[0120] Step 2.5: Calculate the first Pedestrian position sequence at each moment Middle Pedestrians and Side wall edge The force between ;
[0121] (3)
[0122] In formula (3), For the The first position in the pedestrian position sequence at the moment pedestrians to the edge of the wall distance, For the The first position in the pedestrian position sequence at the moment Pedestrians and the edge of the wall The unit vector in the perpendicular direction, Indicates the The first position in the pedestrian position sequence at the moment Pedestrians walking parallel The unit vector of the direction.
[0123] Step 2.6: If = , then using formula (4) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion ,like = , then using formula (5) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion , It is a modification of the social force model to reflect the characteristics of clustered and dispersed pedestrians;
[0124] (4)
[0125] (5)
[0126] In formula (4) and formula (5), It indicates the driving force of any pedestrian to accelerate or decelerate when facing congestion. For the The first position in the pedestrian position sequence at the moment The pedestrian density in front of the pedestrian is , For the The first position in the pedestrian position sequence at the moment The length in front of the pedestrian is The total number of pedestrians within the range; Indicates the threshold for judging congestion ahead, represents the threshold for judging that the road ahead is not crowded. Formula (4) can reflect the characteristics of clustered pedestrians, who tend to accelerate when the road ahead is crowded and decelerate when it is not crowded. Formula (5) can reflect the characteristics of dispersed pedestrians, who tend to decelerate when the road ahead is crowded and accelerate when it is not crowded.
[0127] Step 2.7: Update the first Pedestrian position sequence at each moment Middle Vector velocity of pedestrians ;
[0128] (6)
[0129] Step 2.8: Update the first Pedestrian position sequence at each moment Middle The positions of pedestrians after adjacent time intervals ;
[0130] (7)
[0131] Step 2.9: Assign to Afterwards, if , then return to step 2.2 to execute sequentially, otherwise, it means that the The position sequence of all pedestrians after adjacent time intervals ; and record the Pedestrian position sequence at each moment Through the reference line Number of pedestrians .
[0132] Step 2.10: Delete Pedestrian position sequence at each moment The horizontal coordinate is in the interval Pedestrian coordinate information outside the radius sequence is deleted at the same time. , weight sequence , expected velocity sequence , vector velocity sequence and identification information sequence The information in the Moment 、 、 、 、 and ; and update the number of pedestrians ;
[0133] Step 2.11: Assign to ,like , then follow step 2.1 to obtain Moment 、 、 、 、 and as well as , and respectively and 、 and 、 and 、 and 、 and 、 and Merge Assign to After that, return to step 2.2 and execute sequentially; otherwise, it means that the number of pedestrians sequence is obtained. .
[0134] Step 2.12: Zhongmei The sum of the number of pedestrians is used as the simulated pedestrian flow sequence The elements in , thus obtaining the simulated clustered pedestrian flow sequence ,The simulated crowd flow sequence can reflect the sequence characteristics corresponding to ,clustered pedestrians.,When the scene is full of crowding pedestrians, the amplitude of the ,data curve will be stretched and the fluctuation of the curve will be more ,obvious, e.g. Figure 6a As shown; Indicates the The simulated aggregated pedestrian flow of a certain duration.
[0135] Step 2.13: Initialization = ,initialization Then, follow the process from step 2.1 to step 2.12 to obtain the simulated dispersed pedestrian flow sequence. ,The simulation of dispersed pedestrian flow sequence can reflect the ,sequence characteristics corresponding to dispersed pedestrians. When the scene is ,completely dispersed pedestrians, the amplitude of the data curve will be ,compressed and the curve becomes smooth, e.g. Figure 6b As shown; Indicates the The simulated dispersed pedestrian flow of time length, the sequence values in Figure 6 are simulated by the model parameters in Table I;
[0136] Table I Model parameters
[0137]
[0138] Step 3: Sequence feature extraction and judgment threshold determination;
[0139] Step 3.1: Sequence 、 Subtract , and obtain the fluctuation sequence of simulated aggregated pedestrian flow sequence and the fluctuating sequence simulating the dispersed pedestrian flow sequence , thus reflecting the corresponding fluctuation characteristics of aggregation and dispersion; It means that the simulated clustered pedestrian flow sequence is higher than the overall trend sequence in the The fluctuation value over time, Indicates the The simulated dispersed pedestrian flow of duration is compared with the overall trend sequence in Fluctuation value over a certain period of time.
[0140] Step 3.2: Use equation (8) and set the moving window length as Calculate separately The moving standard deviation series and The moving standard deviation series ,in, Indicates that the moving window length is Time Series exist The moving standard deviation at each moment, Indicates that the moving window length is Time Series exist Moving standard deviation at each moment;
[0141] (8)
[0142] In formula (8), Indicates that the moving window length is Time Series exist The moving average of time, and ; Indicates that the moving window length is Time Series exist The moving average of time, and ;
[0143] Step 3.3: Calculation The mean 、 The mean , , ,The characteristics of clustering and dispersion are significantly different in the ,values of the moving standard deviation. Therefore, the moving standard ,deviation can be used to predict the pedestrian flow composition;
[0144] Step 3.4: Calculate the upper threshold of the moving standard deviation , the lower threshold of the moving standard deviation In order to make the selection of the judgment threshold more general, the floating value is adopted based on the middle value. % to determine the final threshold, The value of is 5, When the value of is 10, , .
[0145] Step 4: Pedestrian flow composition prediction;
[0146] Step 4.1: Get the Pedestrian flow sequence under a period minus Then, we get its fluctuation sequence ,in, Indicates the The pedestrian flow sequence in the period is compared with the overall trend sequence in the Fluctuation value over a certain period of time;
[0147] Step 4.2: Calculate according to formula (8) The moving standard deviation series ,in, Indicates that the moving window length is When, Pedestrian flow fluctuation sequence under a period exist The moving standard deviation at each moment.
[0148] Step 4.3: When , indicating the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher;
[0149] when , then it means the Under the cycle After the time, the proportion of dispersed pedestrians in the pedestrian flow is higher. The prediction results of the moving standard deviation of the pedestrian flow composition in the downward pedestrian flow fluctuation sequence of a period are shown in Figure 8(a). The red upper triangle in Figure 8(a) indicates that the moving standard deviation has just exceeded the upper threshold of the moving standard deviation. It is predicted that the proportion of clustered pedestrians is high at this moment. Therefore, in the time period from the red upper triangle to the black lower triangle, the proportion of clustered pedestrians is high. On the contrary, in the time period from the black lower triangle to the red upper triangle, the proportion of dispersed pedestrians is high.
[0150] In this embodiment, steps 3.2 to 4.3 are replaced by the following steps:
[0151] Step 1: Use formula (9) and set the moving window length as Calculate separately The moving root mean square sequence and The moving root mean square sequence ,in, Indicates that the moving window length is Time Series exist The moving root mean square of time, The moving window length is The time series At the moment, the moving root mean square, when the value of is 5, the sequence and the moving standard deviation sequence and the moving root mean square sequence Figure 7a As shown, the sequence and the moving standard deviation sequence and the moving root mean square sequence Figure 7b As shown;
[0152] (9)
[0153] Step two: calculate the mean of , the mean of , The characteristics of aggregation and dispersion have obvious differences in the values of the moving root mean square, so the moving root mean square can be selected to predict the composition of pedestrian flow;
[0154] Step three: calculate the upper threshold value of the moving root mean square and the lower threshold value of the moving root mean square In order to make the selection of the threshold value more general, the final threshold value is determined by floating % up and down based on the intermediate value, the value of is 5, the value of is 10, ;
[0155] Step four: subtract from the pedestrian flow sequence in the first period obtained in step 1.1 to obtain its fluctuation sequence , wherein represents the fluctuation value of the pedestrian flow sequence in the first period compared with the overall trend sequence in the first time length;
[0156] Step five: calculate the moving standard deviation sequence of according to formula (9), wherein represents the moving window length , the pedestrian flow fluctuation sequence in the first period Moving standard deviation at each moment;
[0157] Step 6: When , then it means the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher;
[0158] when , then it means the Under the cycle After the time, the proportion of dispersed pedestrians in the pedestrian flow is higher. The prediction results of the moving mean square root of the pedestrian flow composition of the periodic downlink pedestrian flow fluctuation sequence are as follows: Figure 8b shown. Figure 8b The red upper triangle indicates that the moving mean square has just exceeded the upper threshold of the moving mean square. It is predicted that the proportion of clustered pedestrians is high at this moment. Therefore, during the time period from the red upper triangle to the black lower triangle, the proportion of clustered pedestrians is high. On the contrary, during the time period from the black lower triangle to the red upper triangle, the proportion of dispersed pedestrians is high.
[0159] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0160] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.
Claims
1. A pedestrian flow composition ratio prediction method based on time series fluctuations, characterized in that: The steps are as follows: Step 1: Collect and process real scene data; Step 1.1: Get the The pedestrian video of the same one-way straight channel in the same time period under the same cycle is set at the exit of the channel in each frame of the pedestrian video, so as to The pedestrian video under the cycle is Identify the pedestrians passing through the reference line and get the number of pedestrians passing through the reference line and form the first Pedestrian flow sequence under a period , thus obtaining Pedestrian flow sequence under a period ,in, Indicates the The next cycle Pedestrian flow of time, The total amount of time; Step 1.2: After taking the average and then performing median filtering, the overall trend sequence of pedestrian flow is obtained. ,in, Indicates the The overall trend of pedestrian flow during the period; Step 1.3: The pedestrian flow volume trend of each duration in is respectively used as the random arrival rate of Poisson distribution, thus generating a total of After taking the Poisson random number and reversing it, we can get the number of pedestrians arriving at the entrance of the one-way straight channel at each moment. ;in, Indicates the The number of pedestrians arriving at the entrance of the one-way straight passage at a certain moment; Step 1.4: According to Construct a pedestrian type array ,in, Indicates the The type identification sequence of all pedestrians arriving at the entrance of the one-way straight passage at the moment, and ; Indicates the Arriving at the entrance of the one-way straight passage at the pedestrian types; and , Indicates aggregation type, Represents distributed type; initialization = ; Step 2: Simulate pedestrian flow; Step 2.0: Initialization ; Take a vertex at the entrance of the channel in the pedestrian video as the origin and the horizontal direction of the channel as Axis direction, with the vertical direction of the channel as Axis direction, establish the first plane coordinate system; Get the channel in Length in the axial direction and Width in the axial direction ; Use the four-point calibration method to calibrate the coordinates of the first point in the first plane coordinate system , coordinates of the second point , coordinates of the third point , coordinates of the fourth point ; Definition from arrive The line segments between arrive The line segments between the two sides of the channel represent the edges of the walls ;in, Indicates the channel Side wall edges; Definition from arrive The line segment is the reference line of the simulation scene ; The radius interval of pedestrians is defined as ,in, is the minimum radius of pedestrians, is the maximum radius of the pedestrian; The pedestrian weight range is defined as ,in, is the minimum weight of the pedestrian, is the maximum weight of the pedestrian; The expected speed range of pedestrians is defined as ,in, is the minimum expected speed of pedestrians, is the maximum expected speed of the pedestrian; Define the initial vertical coordinate interval of the pedestrian as , where 0 is the minimum value of the pedestrian’s initial vertical coordinate, is the maximum value of the pedestrian’s initial vertical coordinate; Define the target point coordinates of each pedestrian as ,in, , is the horizontal coordinate of a point in front of the channel exit, ; Step 2.1: Randomly generate Radius sequence of pedestrians at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The radius of pedestrians, Indicates the The number of pedestrians arriving at the entrance of the one-way straight passage at a certain moment, and ; exist Randomly generate Pedestrian weight sequence at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The weight of a pedestrian; exist Randomly generate The expected speed sequence of pedestrians at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The expected speed of each pedestrian; Definition Vector velocity sequence of pedestrians at each moment ,in, Indicates the Arrive at the entrance of the one-way straight passage at the moment The vector velocity of pedestrians and initialize is 0; exist Randomly generate The initial vertical coordinate sequence of the pedestrian at time ;in, Indicates the Arrive at the entrance of the one-way straight passage at the time The initial vertical coordinate of the pedestrian, thus generating the Pedestrian position sequence at each moment , Indicates the Arrive at the entrance of the one-way straight passage at the time The initial position of each pedestrian; Step 2.2: Initialization ; Step 2.3: Calculate the first Pedestrian position sequence at each moment Middle Pedestrian self-propelled force ; (1) In formula (1), Indicates the The moment The time it takes for a pedestrian's walking speed to return to the expected speed; For the The moment The position of the pedestrian points to the target point coordinates The direction vector of Step 2.4: Calculate the first Pedestrian position sequence at each moment Middle Pedestrians and The interaction forces between pedestrians ; (2) In formula (2), For the The repulsive force parameter of each pedestrian, The minimum range for generating repulsive force; For the The moment Pedestrians and The sum of the radii of the pedestrians; For the The moment Pedestrians and The distance between the centroids of pedestrians; For the The moment A pedestrian points to The unit vector of each pedestrian; is the extrusion pressure parameter; is the friction parameter; For the The moment Pedestrians and The unit vector of the tangential direction between pedestrians; represents the contact force discriminant function, when season ,when season ; For the The moment Pedestrians and The tangential velocity difference between pedestrians; Step 2.5: Calculate the first Pedestrian position sequence at each moment Middle Pedestrians and Side wall edge The force between ; (3) In formula (3), For the The first position of the pedestrian in the position sequence at the moment pedestrians to the edge of the wall distance, For the The first position of the pedestrian in the position sequence at the moment Pedestrians and the edge of the wall The unit vector in the perpendicular direction, Indicates the The first position of the pedestrian in the position sequence at the moment Pedestrians walking parallel The unit vector of the direction; Step 2.6: If = , then using formula (4) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion ,like = , then using formula (5) we can get Pedestrian position sequence at each moment Middle The driving force behind pedestrians' tendency to speed up or slow down when faced with congestion ; (4) (5) In formula (4) and formula (5), It indicates the driving force of any pedestrian to accelerate or decelerate when facing congestion. For the The first position in the pedestrian position sequence at the moment The pedestrian density in front of the pedestrian is , For the The first position in the pedestrian position sequence at the moment The length in front of the pedestrian is The total number of pedestrians within the range; Indicates the threshold for judging congestion ahead, Indicates the threshold for judging that the front is not crowded; Step 2.7: Update the first Pedestrian position sequence at each moment Middle vector velocity of pedestrians ; (6) Step 2.8: Update the first Pedestrian position sequence at each moment Middle The positions of pedestrians after adjacent time intervals ; (7) Step 2.9: Assign to Afterwards, if , then return to step 2.2 to execute sequentially, otherwise, it means that the The position sequence of all pedestrians after adjacent time intervals ; and record the Pedestrian position sequence at each moment Through the reference line Number of pedestrians ; Step 2.10: Delete Pedestrian position sequence at each moment The horizontal coordinate is in the interval Pedestrian coordinate information outside the radius sequence is deleted at the same time. , weight sequence , expected velocity sequence , vector velocity sequence and identification information sequence The information in the Moment 、 、 、 、 and ; and update the number of pedestrians ; Step 2.11: Assign to ,like , then follow step 2.1 to obtain Moment 、 、 、 、 and as well as , and respectively and 、 and 、 and 、 and 、 and 、 and Merge Assign to After that, return to step 2.2 and execute sequentially; otherwise, it means that the number of pedestrians sequence is obtained. ; Step 2.12: Zhongmei The sum of the number of pedestrians is used as the simulated pedestrian flow sequence The elements in , thus obtaining the simulated clustered pedestrian flow sequence ; Indicates the simulated aggregated pedestrian flow over a period of time; Step 2.13: Initialization = ,initialization Then, follow the process from step 2.1 to step 2.12 to obtain the simulated dispersed pedestrian flow sequence. ;in, Indicates the simulated dispersed pedestrian flow for a certain period of time; Step 3: Sequence feature extraction and judgment threshold determination; Step 3.1: Sequence 、 Subtract , and obtain the fluctuation sequence of simulated aggregated pedestrian flow sequence and the fluctuating sequence simulating the dispersed pedestrian flow sequence ;in, It means that the simulated clustered pedestrian flow sequence is higher than the overall trend sequence in the The fluctuation value over time, Indicates the The simulated dispersed pedestrian flow of duration is compared with the overall trend sequence in Fluctuation value over a certain period of time; Step 3.2: Use equation (8) and set the moving window length as Calculate separately The moving standard deviation series and The moving standard deviation series ,in, Indicates that the moving window length is Time Series exist The moving standard deviation at each moment, Indicates that the moving window length is Time Series exist Moving standard deviation at each moment; (8) In formula (8), Indicates that the moving window length is Time Series exist The moving average of time, and ; Indicates that the moving window length is Time Series exist The moving average of time, and ; Step 3.3: Calculation The mean 、 The mean ; Step 3.4: Calculate the upper threshold of the moving standard deviation , the lower threshold of the moving standard deviation ; Step 4: Pedestrian flow composition prediction; Step 4.1: Get the Pedestrian flow sequence under a period minus After that, get Fluctuation sequence under a period ,in, Indicates the The pedestrian flow sequence in the period is compared with the overall trend sequence in the Fluctuation value over a certain period of time; Step 4.2: Calculate according to formula (8) The moving standard deviation series ,in, Indicates that the moving window length is When, Pedestrian flow fluctuation sequence under a period exist Moving standard deviation at each moment; Step 4.3: When , indicating the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher; when , then it means the Under the cycle The proportion of dispersed pedestrians in the pedestrian flow composition after the time is higher.
2. The pedestrian flow composition ratio prediction method based on time series fluctuation according to claim 1 is characterized in that: The steps 3.2 to 4.3 are replaced by the following steps: Step 1: Use formula (9) and set the moving window length as Calculate separately The moving root mean square sequence and The moving root mean square sequence ,in, Indicates that the moving window length is Time Series exist The moving root mean square of time, Indicates that the moving window length is Time Series exist Moving root mean square of time; (9) Step 2: Calculation The mean 、 The mean ; Step 3: Calculate the upper threshold of the moving mean square , the lower threshold of the moving root mean square ; Step 4: Get the Pedestrian flow sequence under a period minus After that, get Fluctuation sequence under a period ,in, Indicates the The pedestrian flow sequence in the period is compared with the overall trend sequence in the Fluctuation value over a certain period of time; Step 5: Calculate according to formula (9) The moving standard deviation series ,in, Indicates that the moving window length is When, Pedestrian flow fluctuation sequence under a period exist Moving standard deviation at each moment; Step 6: When , then it means the Under the cycle The proportion of clustered pedestrians in the pedestrian flow composition after the time is higher; when , then it means the Under the cycle The proportion of dispersed pedestrians in the pedestrian flow composition after the time is higher.
3. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the pedestrian flow composition ratio prediction method according to claim 1 or 2, and the processor is configured to execute the program stored in the memory.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the pedestrian flow composition ratio prediction method according to claim 1 or 2 are executed.
Citation Information
Patent Citations
Pedestrian simulation method for public transport space of high-rise office building
CN112685907A
Pedestrian movement trajectory online prediction method and system in complex environment
CN113569980A