A method and device for predicting and analyzing passenger flow data at security checkpoints
By using video analytics to identify re-inspection behavior within the security check area, a non-linear mapping relationship between re-inspection behavior and passenger flow fluctuations is constructed. This solves the problem that existing technologies cannot identify policy-driven, phased re-inspection fluctuations, enabling more accurate passenger flow prediction and resource scheduling support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-03
AI Technical Summary
Existing passenger flow forecasting technologies cannot identify and quantify policy-driven, periodic re-inspection fluctuations, and lack consideration for the internal process characteristics of security checks, resulting in decreased forecast accuracy and difficulty in providing effective support for real-time scheduling.
By using video analytics to identify re-inspection behavior within the security check area, the correlation parameters between the proportion of re-inspection behavior and changes in passenger flow rate are calculated. A nonlinear mapping relationship between the influence coefficient and passenger flow fluctuations is constructed, and a passenger flow prediction model is trained and generated. The model takes current passenger flow data and re-inspection frequency data as input and outputs passenger flow distribution prediction results for future periods.
It enables accurate identification and quantification of the impact of re-inspection behavior, improves the predictive stability in complex security inspection environments, and can respond in real time to the impact of changes in security inspection intensity on passenger flow, providing a more timely decision-making basis for resource scheduling.
Smart Images

Figure CN121543842B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of passenger flow prediction technology, and in particular to a method and apparatus for predicting and analyzing security check passenger flow data. Background Technology
[0002] At public transportation hubs such as airports and subway stations, security checks are a critical point affecting passenger flow efficiency. Accurately predicting passenger flow changes in security check areas is of great significance for optimizing resource allocation and alleviating congestion.
[0003] However, existing passenger flow forecasting technologies have the following main drawbacks: First, traditional methods rely primarily on historical passenger flow data for time-series forecasting, focusing only on the quantitative changes in passenger flow and ignoring the impact of special behaviors during security checks on passenger flow rates. In real-world scenarios, some passengers require re-inspection due to their carry-on items triggering alarms. Especially when based on civil aviation safety regulations (such as adjustments to the prohibited items list or updates to liquid carrying standards), carry-on items that were previously compliant may be prohibited under the new regulations, leading to a significant increase in re-inspection rates in the initial stages of new regulations. As passengers gradually adapt to the new regulations, the re-inspection rate will gradually decline from its initial high level to a normal level. This periodic fluctuation in re-inspection caused by changes in safety regulations is cyclical and predictable, but the linearity of its change curve is insufficient for long-term historical data reference. However, it can serve as a basis for forecasting the next similar new regulations. Such re-inspection behavior significantly reduces throughput and exacerbates passenger flow fluctuations, but existing technologies cannot identify and quantify this influencing factor, especially failing to establish a dynamic forecasting mechanism for policy-driven periodic re-inspection fluctuations. Secondly, existing predictive models lack consideration for the internal process characteristics of security checks, treating the security check area as a "black box" and failing to capture the correlation between changes in re-check frequency and passenger flow congestion. This leads to decreased predictive accuracy when security check intensity is dynamically adjusted. Thirdly, existing technologies fail to effectively integrate behavioral pattern data during feature extraction, particularly lacking the ability to identify short-term behavioral anomalies caused by policy changes and lacking in-depth analysis of the causes of passenger flow fluctuations. This results in insufficient responsiveness of predictive models to sudden congestion, making it difficult to provide effective support for real-time scheduling.
[0004] Therefore, a technical solution is needed that can identify re-inspection behavior, quantify its impact on passenger flow, distinguish between routine re-inspection and policy-driven phased re-inspection, and establish a correlation between behavioral characteristics and passenger flow prediction. Summary of the Invention
[0005] This invention provides a method and apparatus for predicting and analyzing security check passenger flow data to solve the aforementioned problems in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for predicting and analyzing security check passenger flow data includes:
[0008] S1: Acquire video image sequences of the security check area and passenger security check passage records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, and distinguish between first-time and re-inspection behaviors based on the spatial location change pattern of the personnel trajectory, movement speed characteristics and area stay time, and generate behavior sequence data containing behavior type and timestamp;
[0009] S2: Based on behavioral sequence data, calculate the correlation parameter between the proportion of re-inspection behavior and the change in passenger flow rate within a set time window as the influence coefficient, and combine the influence coefficient with the passenger flow data of the corresponding time period to generate a re-inspection labeled sample set.
[0010] S3: Based on the re-inspection labeled sample set, extract multi-scale time-series features of passenger flow, construct the nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train to generate a passenger flow prediction model;
[0011] S4: Based on the passenger flow prediction model, input the passenger flow data and re-inspection frequency data for the current period, and output the passenger flow distribution prediction results for the future period.
[0012] Furthermore, step S1 includes:
[0013] S11: Receive continuous image frames output by the video surveillance system and passage time records output by the security inspection equipment;
[0014] S12: Perform deep learning-based object detection on consecutive image frames, extract the coordinates of personnel bounding boxes, and generate a sequence of position coordinates of personnel trajectories through inter-frame matching;
[0015] S13: Determine the spatial change pattern of the position coordinate sequence relative to the position area of the security inspection equipment, mark the trajectory from the area behind the equipment back to the area in front as a re-inspection behavior, and mark the trajectory of one-way passage as a passage behavior;
[0016] S14: Combine behavior type tags and passage time records to generate behavior sequence data in chronological order.
[0017] Furthermore, step S2 includes:
[0018] S21: Set a fixed-duration sliding time window, traverse the behavior sequence data, and count the number of re-inspection behaviors and the total number of people passing through each window;
[0019] S22: Calculate the re-inspection rate for each time window, which is the ratio of the number of re-inspection behaviors to the total number of people passing through, forming a time series of re-inspection rates;
[0020] S23: Calculate the Pearson correlation coefficient between the time series of re-inspection rate and the time series of passenger flow change rate during the same period, and use the corresponding absolute value as the influence coefficient;
[0021] S24: Extract passenger flow data, corresponding impact coefficients, and environmental attribute parameters from historical time periods, align them by timestamp, and combine them to generate a re-inspection labeled sample set. The impact coefficient is used as the weight feature dimension of the sample and is organized in parallel with the passenger flow feature dimension.
[0022] Furthermore, step S3 includes:
[0023] S31: Perform time-domain filtering at different scales on the passenger flow time series in the re-inspection and annotation sample set to extract short-term fluctuations, medium-term trends and long-term cycle features, and construct a multi-scale feature matrix;
[0024] S32: Input the multi-scale feature matrix and the sequence of influence coefficients as the weight feature dimensions into the attention-based temporal encoder to calculate the dynamic weight distribution between features and generate a fused feature vector;
[0025] S33: The fused feature vector is nonlinearly transformed by a multilayer perceptron to output the passenger flow prediction value. The parameters are optimized based on the backpropagation of the prediction error to generate a passenger flow prediction model. The model parameters include the weight matrix of the attention mechanism and the connection weights of the multilayer perceptron.
[0026] Furthermore, the calculation of the influence coefficient in S23 includes:
[0027] Zero-mean standardization was applied to both the re-inspection rate time series and the passenger flow change rate series.
[0028] The Pearson correlation coefficient is obtained by calculating the ratio of the product of the covariance and the standard deviation of the two standardized sequences.
[0029] The Pearson correlation coefficient is used as the influence coefficient to characterize the degree of impact of re-inspection behavior on passenger flow.
[0030] Furthermore, step S4 includes:
[0031] S41: Collect the passenger flow sequence and re-inspection frequency sequence within a preset time period before the current moment;
[0032] S42: Calculate the re-inspection rate for the current period based on the re-inspection frequency sequence, and calculate the current impact coefficient by combining it with the passenger flow change rate;
[0033] S43: Obtain weather type, date attribute, and time period category, and encode them to generate an environmental attribute vector;
[0034] S44: Input the passenger flow sequence, current influence coefficient and environmental attribute vector into the passenger flow prediction model, and output the passenger flow distribution prediction results for each future time period through forward propagation calculation.
[0035] Furthermore, step S13 includes:
[0036] S131: Extract the position boundary of the security inspection equipment in the image coordinate system, define the area in front of the equipment and the area behind the equipment, and set the key judgment areas including the equipment exit area, waiting area and return channel area;
[0037] S132: Calculate the relative positional relationship between each point in the personnel trajectory's position coordinate sequence and the equipment's position boundary, and extract the trajectory's velocity vector sequence and the duration of dwell time in the area;
[0038] S133: Establish multi-dimensional behavior judgment rules:
[0039] The temporal distribution characteristics of the computation trajectory in the front region, equipment region, and rear region;
[0040] Analyze the continuous changes in the trajectory direction and velocity fluctuations to identify the start and end positions and duration of the reverse movement segment;
[0041] Trajectory that stays in the rear area for more than a preset threshold and then returns to the front area is considered a re-inspection behavior;
[0042] The trajectory of briefly stopping in the equipment area and then moving unidirectionally through the area in front is determined as a passing behavior.
[0043] Exclude incomplete trajectories that linger in the area ahead but do not reach the area behind the equipment.
[0044] Furthermore, the encoding of the environment attribute vector includes:
[0045] Weather types are coded into different values based on meteorological data: sunny days correspond to the first value, rainy days correspond to the second value, and snowy days correspond to the third value.
[0046] Encode the date attributes based on calendar information, with weekdays corresponding to base values and rest days corresponding to incremental values;
[0047] The time period is coded according to the time information: the morning peak period corresponds to the first time period value, the off-peak period corresponds to the second time period value, the evening peak period corresponds to the third time period value, and the nighttime period corresponds to the fourth time period value.
[0048] The weather type code value, date attribute code value, and time period category code value are concatenated according to the feature dimension to generate an environmental attribute vector.
[0049] Furthermore, step S44 includes:
[0050] S441: Concatenate the passenger flow sequence and the current influence coefficient according to the feature dimension to form the input tensor;
[0051] S442: Pass the input tensor through the encoding layer of the passenger flow prediction model, perform multi-layer feature extraction and dimensionality transformation, and generate a latent state vector;
[0052] S443: The implicit state vector and the environmental attribute vector are fused and input into the decoding layer, and the future passenger flow distribution prediction sequence is generated through recursive calculation for each time period.
[0053] Furthermore, a security check passenger flow data prediction and analysis device includes:
[0054] The behavior recognition module is used to acquire video image sequences of the security check area and passenger security check records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, and distinguish between first-time and second-time behaviors based on the spatial position change pattern of the personnel trajectory, movement speed characteristics and area stay time, and generate behavior sequence data containing behavior type and timestamp;
[0055] The sample construction module is used to calculate the correlation parameter between the proportion of re-inspection behavior and the change in passenger flow rate within a set time window based on behavioral sequence data, and to combine the influence coefficient with the passenger flow data of the corresponding time period to generate a re-inspection labeled sample set.
[0056] The model training module is used to extract multi-scale time-series features of passenger flow based on the re-examination labeled sample set, construct the nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train and generate a passenger flow prediction model.
[0057] The prediction output module is used to take the current passenger flow data and re-inspection frequency data as input, based on the passenger flow prediction model, and output the passenger flow distribution prediction results for future periods.
[0058] Compared with the prior art, the present invention has the following advantages:
[0059] This invention overcomes the limitations of traditional passenger flow forecasting, which relies solely on historical traffic data, by introducing a mechanism for recognizing re-inspection behavior and quantifying influence coefficients. By distinguishing between passage behavior and re-inspection behavior, it captures key factors affecting passenger flow rate and establishes a nonlinear mapping relationship between re-inspection frequency and passenger flow fluctuations, enabling the prediction model to more accurately reflect actual passenger flow changes. Multi-scale temporal feature extraction combined with influence coefficient labeling allows the model to adapt to passenger flow patterns under different re-inspection rate scenarios, improving prediction stability in complex security check environments. Simultaneously inputting passenger flow and re-inspection frequency data allows for real-time response to the impact of changes in security check intensity on passenger flow, providing more timely decision-making basis for resource scheduling.
[0060] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.
[0061] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0062] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0063] Figure 1 This is a flowchart of a security check passenger flow data prediction and analysis method according to an embodiment of the present invention;
[0064] Figure 2 This is a flowchart illustrating the generation of behavior sequence data including behavior type and timestamp in an embodiment of the present invention;
[0065] Figure 3 This is a structural diagram of a security check passenger flow data prediction and analysis device according to an embodiment of the present invention. Detailed Implementation
[0066] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0067] The embodiments of the present invention provide, as follows Figure 1 As shown, a method for predicting and analyzing security check passenger flow data includes:
[0068] S1: Acquire video image sequences of the security check area and passenger security check passage records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, and distinguish between first-time and re-inspection behaviors based on the spatial location change pattern of the personnel trajectory, movement speed characteristics and area stay time, and generate behavior sequence data containing behavior type and timestamp;
[0069] S2: Based on behavioral sequence data, calculate the correlation parameter between the proportion of re-inspection behavior and the change in passenger flow rate within a set time window as the influence coefficient, and combine the influence coefficient with the passenger flow data of the corresponding time period to generate a re-inspection labeled sample set.
[0070] S3: Based on the re-inspection labeled sample set, extract multi-scale time-series features of passenger flow, construct the nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train to generate a passenger flow prediction model;
[0071] S4: Based on the passenger flow prediction model, input the passenger flow data and re-inspection frequency data for the current period, and output the passenger flow distribution prediction results for the future period.
[0072] The working principle and beneficial effects of the above technical solution are as follows: Video analytics technology is used to identify the passage patterns and re-inspection behaviors of personnel within the security check area, establishing a correlation model between re-inspection behavior and passenger flow fluctuations. The system first collects video images and equipment recordings, uses object detection algorithms to locate personnel positions, and determines movement patterns through trajectory tracking. Trajectories to and from the equipment are identified as re-inspections, while unidirectional passage is marked as normal passage. Then, the frequency of re-inspections is statistically analyzed within a time window, and the correlation strength between re-inspection and passenger flow changes is calculated to form an influence coefficient. This coefficient is paired with historical passenger flow data to form training samples. Temporal feature extraction technology is used to analyze short-term fluctuations, medium-term trends, and long-term patterns of passenger flow, and machine learning is used to establish a mapping function from the influence coefficient to passenger flow changes. During prediction, real-time passenger flow and re-inspection data are input, and the model outputs the passenger flow distribution for future time periods.
[0073] In another embodiment, such as Figure 2 As shown, step S1 includes:
[0074] S11: Receive continuous image frames output by the video surveillance system and passage time records output by the security inspection equipment;
[0075] S12: Perform deep learning-based object detection on consecutive image frames, extract the coordinates of personnel bounding boxes, and generate a sequence of position coordinates of personnel trajectories through inter-frame matching;
[0076] S13: Determine the spatial change pattern of the position coordinate sequence relative to the position area of the security inspection equipment, mark the trajectory from the area behind the equipment back to the area in front as a re-inspection behavior, and mark the trajectory of one-way passage as a passage behavior;
[0077] S14: Combine behavior type tags and passage time records to generate behavior sequence data in chronological order.
[0078] The working principle and beneficial effects of the above technical solution are as follows: The acquisition and processing process of video images and passage records is as follows: The video surveillance system continuously outputs image sequences at a fixed frame rate (usually 25-30 frames per second), and the security gate or X-ray machine equipment synchronously records the timestamp of each passage event.
[0079] The deep learning object detection network scans each frame of the image, locates people in the scene, and outputs the coordinates of the bounding box of each person (including the pixel positions of the top left and bottom right corners). Adjacent frames are associated with detection boxes of the same person through a feature matching algorithm. Specifically, this involves calculating the positional distance and appearance feature similarity of detection boxes in consecutive frames. The box with the closest distance and the best feature match is considered to belong to the same tracking target, thus concatenating the discrete detection results into a continuous motion trajectory.
[0080] Spatial behavior analysis is performed on each trajectory. First, the location area of the security inspection equipment in the monitoring screen is calibrated, dividing the screen into a waiting area in front of the equipment and a checked area behind it. The trajectory's position coordinate sequence moving from the front area into the equipment area and then to the rear area indicates normal passage; if the trajectory coordinates return to the front area after reaching the rear area, i.e., reverse movement occurs, it is judged as a re-inspection behavior. The behavior type determination result of each trajectory is associated with the passage time record, and a complete behavior sequence data stream is generated by arranging them chronologically.
[0081] In another embodiment, step S2 includes:
[0082] S21: Set a fixed-duration sliding time window, traverse the behavior sequence data, and count the number of re-inspection behaviors and the total number of people passing through each window;
[0083] S22: Calculate the re-inspection rate for each time window, which is the ratio of the number of re-inspection behaviors to the total number of people passing through, forming a time series of re-inspection rates;
[0084] S23: Calculate the Pearson correlation coefficient between the time series of re-inspection rate and the time series of passenger flow change rate during the same period, and use the corresponding absolute value as the influence coefficient;
[0085] S24: Extract passenger flow data, corresponding impact coefficients, and environmental attribute parameters from historical time periods, align them by timestamp, and combine them to generate a re-inspection labeled sample set. The impact coefficient is used as the weight feature dimension of the sample and is organized in parallel with the passenger flow feature dimension.
[0086] The working principle and beneficial effects of the above technical solution are as follows: A time window size is set, and this window slides along the timeline to traverse the entire behavior sequence. For each window position, the behavior events falling within that window are counted: the number of behaviors marked as re-examination is counted. At the same time, the total number of people passing through this window is counted. (Including normal passes and re-inspections).
[0087] The re-inspection rate r is calculated as the proportion of re-inspection behavior within the window to the total throughput, i.e. Arrange the re-inspection rates of all time windows in chronological order to form a time series of re-inspection rates. At the same time, passenger flow sequences for the corresponding time periods are extracted from historical data. Calculate the passenger flow change rate sequence between adjacent time periods. ,in .
[0088] The impact coefficient is measured using the Pearson correlation coefficient. The specific calculation is as follows: First, the re-inspection rate series and the passenger flow change rate series are standardized separately, and their respective means and standard deviations are calculated, converting the original values into standardized values. Then, the covariance of the two standardized series is calculated, which is the average of the products of the differences between corresponding elements, and then divided by the product of the standard deviations of the two series to obtain the correlation coefficient. The coefficient ranges from -1 to 1, and the larger the absolute value, the stronger the correlation.
[0089] Finally, historical passenger flow measurements from different time periods, corresponding calculated impact coefficients, and environmental factors such as weather conditions and date type are collected and combined according to timestamps to form a structured training sample set. Each sample contains input features (historical passenger flow sequence, impact coefficient, environmental parameters) and a prediction target (future passenger flow value).
[0090] In another embodiment, step S3 includes:
[0091] S31: Perform time-domain filtering at different scales on the passenger flow time series in the re-inspection and annotation sample set to extract short-term fluctuations, medium-term trends and long-term cycle features, and construct a multi-scale feature matrix;
[0092] S32: Input the multi-scale feature matrix and the sequence of influence coefficients as the weight feature dimensions into the attention-based temporal encoder to calculate the dynamic weight distribution between features and generate a fused feature vector;
[0093] S33: The fused feature vector is nonlinearly transformed by a multilayer perceptron to output the passenger flow prediction value. The parameters are optimized based on the backpropagation of the prediction error to generate a passenger flow prediction model. The model parameters include the weight matrix of the attention mechanism and the connection weights of the multilayer perceptron.
[0094] The working principle and beneficial effects of the above technical solution are as follows: Filters with different cutoff frequencies are applied to the passenger flow time series to separate short-term disturbances, medium-term trends, and long-term periodic components, forming a multi-dimensional feature matrix. This feature matrix and the influence coefficient sequence are input into an attention network. A learnable weight allocation mechanism strengthens key features and weakens redundant information, generating a fused representation vector. This vector is then passed through a multi-layer nonlinear transformation network, gradually mapping it to the passenger flow prediction value space. The loss function is calculated using the error between the predicted and actual values. The network parameters are iteratively optimized using a gradient descent algorithm, enabling the model to learn the intrinsic relationship between the influence coefficients and passenger flow fluctuations.
[0095] In another embodiment, the calculation of the influence coefficient in S23 includes:
[0096] Zero-mean standardization was applied to both the re-inspection rate time series and the passenger flow change rate series.
[0097] The Pearson correlation coefficient is obtained by calculating the ratio of the product of the covariance and the standard deviation of the two standardized sequences.
[0098] The Pearson correlation coefficient is used as the influence coefficient to characterize the degree of impact of re-inspection behavior on passenger flow.
[0099] The working principle and beneficial effects of the above technical solution are as follows: Normalization is achieved by subtracting the mean from both the re-inspection rate sequence and the passenger flow change rate sequence, and then dividing by the standard deviation, thus eliminating dimensional differences. The covariance of the two standardized sequences is calculated, which is the mean of the product of corresponding elements. The standard deviation of each sequence is calculated separately. The covariance is divided by the product of the two standard deviations to obtain the Pearson correlation coefficient. This coefficient ranges from -1 to +1; a larger absolute value indicates a more significant impact of re-inspection behavior on passenger flow, and the sign indicates a positive or negative correlation.
[0100] In another embodiment, step S4 includes:
[0101] S41: Collect the passenger flow sequence and re-inspection frequency sequence within a preset time period before the current moment;
[0102] S42: Calculate the re-inspection rate for the current period based on the re-inspection frequency sequence, and calculate the current impact coefficient by combining it with the passenger flow change rate;
[0103] S43: Obtain weather type, date attribute, and time period category, and encode them to generate an environmental attribute vector;
[0104] S44: Input the passenger flow sequence, current influence coefficient and environmental attribute vector into the passenger flow prediction model, and output the passenger flow distribution prediction results for each future time period through forward propagation calculation.
[0105] The working principle and beneficial effects of the above technical solution are as follows: The system traces back a certain period of time (e.g., the past 2 hours) from the current moment, continuously reads the passenger flow observation values at each time point within that period, and forms an input passenger flow sequence. At the same time, it counts the number of re-inspection events that occur within that period and calculates the re-inspection frequency (the number of re-inspections per unit time).
[0106] The re-inspection rate for the current time period is calculated based on the re-inspection frequency, using the same method as in the training phase: the number of re-inspections divided by the total number of passages. The passenger flow change rate for the most recent time period is extracted, and a correlation analysis is performed between the current re-inspection rate and the passenger flow change rate sequence to calculate the current impact coefficient. This coefficient reflects the real-time impact of re-inspection behavior on passenger flow at the current moment.
[0107] Environmental attribute encoding converts non-numerical information into a numerical vector that the model can process. Weather type is obtained from the meteorological interface: sunny day is encoded as a numerical value 1, cloudy day as a numerical value 2, rainy day as a numerical value 3, and snowy day as a numerical value 4. Date attribute is determined based on the calendar: weekday is encoded as a base value 0, weekend as an incremental value 1, and public holidays as an extended value 2. Time period category is determined based on the current time: morning peak is encoded as 1, off-peak as 0, evening peak as 2, and late night as -1. These encoded values are combined to form the environmental attribute vector.
[0108] The passenger flow sequence, current influence coefficient, and environmental attribute vector are input into the trained prediction model. The model's encoding layer extracts sequence features, and the decoding layer combines environmental information to perform temporal reasoning, outputting a sequence of predicted passenger flow values for each future time period (e.g., every 15 minutes within the next hour), thus forming the passenger flow distribution prediction result.
[0109] In another embodiment, step S13 includes:
[0110] S131: Extract the position boundary of the security inspection equipment in the image coordinate system, define the area in front of the equipment and the area behind the equipment, and set the key judgment areas including the equipment exit area, waiting area and return channel area;
[0111] S132: Calculate the relative positional relationship between each point in the personnel trajectory's position coordinate sequence and the equipment's position boundary, and extract the trajectory's velocity vector sequence and the duration of dwell time in the area;
[0112] S133: Establish multi-dimensional behavior judgment rules:
[0113] The temporal distribution characteristics of the computation trajectory in the front region, equipment region, and rear region;
[0114] Analyze the continuous changes in the trajectory direction and velocity fluctuations to identify the start and end positions and duration of the reverse movement segment;
[0115] Trajectory that stays in the rear area for more than a preset threshold and then returns to the front area is considered a re-inspection behavior;
[0116] The trajectory of briefly stopping in the equipment area and then moving unidirectionally through the area in front is determined as a passing behavior.
[0117] Exclude incomplete trajectories that linger in the area ahead but do not reach the area behind the equipment.
[0118] The working principle and beneficial effects of the above technical solution are as follows: The pixel coordinate boundaries of the security inspection equipment are marked in the video frame. Using these boundaries as a dividing benchmark, the monitoring field of view is divided into the space to be inspected and the space already inspected. The system reads the set of coordinate points of the personnel's trajectory frame by frame. By comparing the positional relationship between each coordinate point and the equipment boundary, it determines which side of the space the trajectory point belongs to. For a complete trajectory path, the temporal evolution sequence of its spatial position is extracted, and the displacement direction vector between adjacent frames is calculated. When a reverse displacement component from the inspected side to the to-be-inspected side is detected in the trajectory path, and the duration of this reverse movement reaches a set threshold, it is determined that the personnel have performed a return re-inspection operation, and the system adds a re-inspection label to this trajectory. If the trajectory path always maintains a single flow direction from the to-be-inspected side to the inspected side, and the dwell time on the inspected side is less than a threshold, it is determined as a successful passage behavior, and a passage label is assigned. For incomplete paths that do not cross the equipment boundary or wander back and forth on the to-be-inspected side, the system excludes them from the behavior classification.
[0119] In another embodiment, the encoding of the environment attribute vector includes:
[0120] Weather types are coded into different values based on meteorological data: sunny days correspond to the first value, rainy days correspond to the second value, and snowy days correspond to the third value.
[0121] Encode the date attributes based on calendar information, with weekdays corresponding to base values and rest days corresponding to incremental values;
[0122] The time period is coded according to the time information: the morning peak period corresponds to the first time period value, the off-peak period corresponds to the second time period value, the evening peak period corresponds to the third time period value, and the nighttime period corresponds to the fourth time period value.
[0123] The weather type code value, date attribute code value, and time period category code value are concatenated according to the feature dimension to generate an environmental attribute vector.
[0124] The working principle and beneficial effects of the above technical solution are as follows: Weather factors affect travel intentions and passenger flow. Sunny days (value 1) correspond to normal passenger flow levels, rainy days (value 3) see a decrease in passenger flow due to travel inconvenience, and snowy days (value 4) have a greater impact. These values reflect the increasing relationship between the degree of weather's impact on passenger flow.
[0125] Date attribute coding reflects work travel patterns. Weekdays (value 0) see passenger flow mainly from commuting and business, exhibiting morning and evening peak characteristics; weekends (value 1) see passenger flow from leisure and shopping, with a more even distribution; holidays (value 2) see large and concentrated passenger flow, potentially leading to tourist peaks. An increase in the value indicates a stronger specialization in passenger flow patterns.
[0126] The time period category code reflects the intraday passenger flow cycle. Regular time periods on ordinary days (value 0) are predicted based on historical patterns; passenger flow patterns are abnormal before holidays or during special events (value extension), requiring special handling. The code values for morning peak (value 1), evening peak (value 2), and late night (value -1) reflect the relative levels of passenger flow density.
[0127] These encoded values are arranged in a fixed order into a vector, such as: This represents the morning rush hour on a rainy weekend. After the vector is input into the model, it is converted into a high-dimensional feature representation through an embedding layer, enabling the model to learn the differences in passenger flow patterns under different environmental conditions.
[0128] In another embodiment, step S44 includes:
[0129] S441: Concatenate the passenger flow sequence and the current influence coefficient according to the feature dimension to form the input tensor;
[0130] S442: Pass the input tensor through the encoding layer of the passenger flow prediction model, perform multi-layer feature extraction and dimensionality transformation, and generate a latent state vector;
[0131] S443: The implicit state vector and the environmental attribute vector are fused and input into the decoding layer, and the future passenger flow distribution prediction sequence is generated through recursive calculation for each time period.
[0132] The working principle and beneficial effects of the above technical solution are as follows: Passenger flow sequences and influence coefficients are concatenated along the feature dimension to form a multi-dimensional input tensor. This tensor is processed by a multi-layer neural network of the encoder, with each layer performing feature extraction and dimensional transformation, progressively compressing the information into a fixed-length latent state vector. This vector contains the core patterns of historical passenger flow. The latent state vector is then fused with the environmental attribute vector and input into the decoder. The decoder recursively calculates the data step-by-step, generating a passenger flow prediction value for a given time period based on the current latent state and environmental information at each step, thus progressively constructing a complete future passenger flow distribution sequence.
[0133] In another embodiment, such as Figure 3 As shown, a security check passenger flow data prediction and analysis device includes:
[0134] The behavior recognition module is used to acquire video image sequences of the security check area and passenger security check records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, and distinguish between first-time and second-time behaviors based on the spatial position change pattern of the personnel trajectory, movement speed characteristics and area stay time, and generate behavior sequence data containing behavior type and timestamp;
[0135] The sample construction module is used to calculate the correlation parameter between the proportion of re-inspection behavior and the change in passenger flow rate within a set time window based on behavioral sequence data, and to combine the influence coefficient with the passenger flow data of the corresponding time period to generate a re-inspection labeled sample set.
[0136] The model training module is used to extract multi-scale time-series features of passenger flow based on the re-examination labeled sample set, construct the nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train and generate a passenger flow prediction model.
[0137] The prediction output module is used to take the current passenger flow data and re-inspection frequency data as input, based on the passenger flow prediction model, and output the passenger flow distribution prediction results for future periods.
[0138] The working principle and beneficial effects of the above technical solution are as follows: The device is implemented based on an edge computing intelligent agent hardware platform. The intelligent agent's visual sensor array collects real-time images of the security checkpoint. The image data flows into the built-in GPU processing unit. The behavior recognition module calls the target detection algorithm to complete personnel positioning and trajectory construction in the processor. By analyzing the spatial coordinate sequence of trajectory points, instantaneous speed changes, and dwell time thresholds, it distinguishes between two types of behavioral events: normal passage and re-inspection, and outputs a behavior record stream with timestamps. The sample construction module runs in the processor's data processing unit, statistically analyzes the behavior record stream in segments according to time windows, calculates the correlation coefficient between the re-inspection event density and the passenger flow throughput change rate, and aligns this coefficient as the behavior influence weight with the passenger flow basic data on the time axis to form a sample matrix for training and stores it in the intelligent agent's local memory. The model training module uses the processor's neural network acceleration core to extract multi-timescale passenger flow evolution features from the sample matrix, optimizes the network parameters through the backpropagation algorithm to fit the nonlinear function of the influence weights to passenger flow changes, and the trained model weights are fixed in the intelligent agent's memory. The prediction output module reads real-time passenger flow sensor data and current re-inspection frequency statistics, loads the trained model in the inference engine to perform forward calculation, and generates a future passenger flow prediction curve that is transmitted to the scheduling terminal or local display screen through the agent's communication interface.
[0139] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from the spirit and scope of this invention.
Claims
1. A method for predicting and analyzing security check passenger flow data, characterized in that, include: S1: Acquire video image sequences of the security check area and passenger security check passage records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, distinguish between passing behavior and re-inspection behavior according to the spatial position change pattern of personnel trajectory, and generate behavior sequence data containing behavior type and timestamp; S2: Based on behavioral sequence data, calculate the correlation parameter between the re-inspection rate and the passenger flow change rate sequence within a set time window as the influence coefficient. Then, align and combine the influence coefficient with the passenger flow data and environmental attribute parameters of the corresponding time period to generate a re-inspection annotation sample set. S3: Based on the re-inspection labeled sample set, extract multi-scale time-series features of passenger flow, construct a nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train to generate a passenger flow prediction model; S4: Based on the passenger flow prediction model, input the passenger flow data and re-inspection frequency data for the current time period, and output the passenger flow distribution prediction results for future time periods; including: S41: Collect passenger flow data and re-inspection frequency data within a preset time period before the current moment; S42: Calculate the re-inspection rate for the current period based on the re-inspection frequency data, and calculate the current impact coefficient by combining it with the passenger flow change rate sequence; S43: Obtain weather type, date attribute, and time period category, and encode them to generate an environmental attribute vector; S44: Input passenger flow data, current impact coefficient and environmental attribute parameters into the passenger flow prediction model, and output the passenger flow distribution prediction results for each future time period through forward propagation calculation.
2. The method for predicting and analyzing security check passenger flow data according to claim 1, characterized in that, Step S1 includes: S11: Receive continuous image frames output by the video surveillance system and passage time records output by the security inspection equipment; S12: Perform deep learning-based object detection on consecutive image frames, extract the coordinates of personnel bounding boxes, and generate a sequence of position coordinates of personnel trajectories through inter-frame matching; S13: Determine the spatial change pattern of the position coordinate sequence relative to the position area of the security inspection equipment, mark the trajectory from the area behind the equipment back to the area in front as a re-inspection behavior, and mark the trajectory of one-way passage as a passage behavior; S14: Combine behavior type tags and passage time records to generate behavior sequence data in chronological order.
3. The method for predicting and analyzing security check passenger flow data according to claim 1, characterized in that, Step S2 includes: S21: Set a fixed-duration sliding time window, traverse the behavior sequence data, and count the number of re-inspection behaviors and the total number of people passing through each window; S22: Calculate the re-inspection rate for each time window, which is the ratio of the number of re-inspection behaviors to the total number of people passing through, forming a time series of re-inspection rates; S23: Calculate the Pearson correlation coefficient between the time series of re-inspection rate and the time series of passenger flow change rate during the same period, and use the corresponding absolute value as the influence coefficient; S24: Extract the passenger flow data, corresponding impact coefficients, and environmental attribute parameters for the corresponding time period, align them by timestamp, and combine them to generate a re-inspection labeled sample set. The impact coefficient is used as the weight feature dimension of the sample and is organized in parallel with the passenger flow feature dimension.
4. The method for predicting and analyzing security check passenger flow data according to claim 3, characterized in that, Step S3 includes: S31: Perform time-domain filtering at different scales on the passenger flow time series in the re-inspection and annotation sample set to extract short-term fluctuations, medium-term trends and long-term cycle features, and construct a multi-scale feature matrix; S32: Input the multi-scale feature matrix and the sequence of influence coefficients as the weight feature dimensions into the attention-based temporal encoder to calculate the dynamic weight distribution between features and generate a fused feature vector; S33: The fused feature vector is nonlinearly transformed by a multilayer perceptron to output the passenger flow prediction value. The parameters are optimized based on the backpropagation of the prediction error to generate a passenger flow prediction model. The model parameters include the weight matrix of the attention mechanism and the connection weights of the multilayer perceptron.
5. The method for predicting and analyzing security check passenger flow data according to claim 3, characterized in that, The calculation of the influence coefficient in S23 includes: Zero-mean standardization was applied to both the time series of re-inspection rate and the time series of passenger flow change rate during the same period. The Pearson correlation coefficient is obtained by calculating the ratio of the product of the covariance and the standard deviation of the two standardized sequences. The Pearson correlation coefficient is used as the influence coefficient to characterize the degree of impact of re-inspection behavior on passenger flow.
6. The method for predicting and analyzing security check passenger flow data according to claim 2, characterized in that, Step S13 includes: S131: Extract the position boundary of the security inspection equipment in the image coordinate system, define the area in front of the equipment and the area behind the equipment, and set the key judgment areas including the equipment exit area, waiting area and return channel area; S132: Calculate the relative positional relationship between each point in the personnel trajectory's position coordinate sequence and the equipment's position boundary, and extract the trajectory's velocity vector sequence and the duration of stay in the area; S133: Establish multi-dimensional behavior judgment rules: The temporal distribution characteristics of the computation trajectory in the front region, equipment region, and rear region; Analyze the continuous changes in the trajectory direction and velocity fluctuations to identify the start and end positions and duration of the reverse movement segment; Trajectory that stays in the rear area for more than a preset threshold and then returns to the front area is considered a re-inspection behavior; The trajectory of briefly stopping in the equipment area and then moving unidirectionally through the area in front is determined as a passing behavior. Exclude incomplete trajectories that linger in the area ahead but do not reach the area behind the equipment.
7. The method for predicting and analyzing security check passenger flow data according to claim 1, characterized in that, The encoding of environment attribute vectors includes: Weather types are coded into different values based on meteorological data: sunny days correspond to the first value, rainy days correspond to the second value, and snowy days correspond to the third value. Encode the date attributes based on calendar information: weekdays correspond to base values, rest days correspond to incremental values, and public holidays correspond to extended values. The time period is coded according to the time information: the morning peak period corresponds to the first time period value, the off-peak period corresponds to the second time period value, the evening peak period corresponds to the third time period value, and the nighttime period corresponds to the fourth time period value. The weather type code value, date attribute code value, and time period category code value are concatenated according to the feature dimension to generate an environmental attribute vector.
8. The method for predicting and analyzing security check passenger flow data according to claim 1, characterized in that, Step S44 includes: S441: Concatenate the passenger flow sequence and the current influence coefficient according to the feature dimension to form the input tensor; S442: Pass the input tensor through the encoding layer of the passenger flow prediction model, perform multi-layer feature extraction and dimensionality transformation, and generate a latent state vector; S443: The implicit state vector and the environmental attribute vector are fused and then input into the decoding layer. The future passenger flow distribution prediction sequence is generated through recursive calculation for each time period.
9. A security check passenger flow data prediction and analysis device, characterized in that, The method applied to any one of claims 1-8 includes: The behavior recognition module is used to acquire video image sequences of the security check area and passenger security check records, perform target detection on the image sequences and generate trajectory tracking data through inter-frame target association, distinguish between first-time behavior and re-inspection behavior based on the spatial position change pattern of the personnel trajectory, and generate behavior sequence data containing behavior type and timestamp; The sample construction module is used to calculate the correlation parameter between the re-inspection rate and the passenger flow change rate sequence within a set time window based on behavioral sequence data, and use it as the influence coefficient. The influence coefficient is then combined with the passenger flow data and environmental attribute parameters of the corresponding time period in a time-series alignment to generate a re-inspection labeled sample set. The model training module is used to extract multi-scale time-series features of passenger flow based on the re-examination labeled sample set, construct the nonlinear mapping relationship between the influence coefficient and passenger flow fluctuation, and train and generate a passenger flow prediction model. The prediction output module is used to take the current passenger flow data and re-inspection frequency data as input, based on the passenger flow prediction model, and output the passenger flow distribution prediction results for future periods.
Citation Information
Patent Citations
Self-service security check channel flow control system based on video analysis
CN115482611A
Whole-domain-oriented hub passenger flow space-time intelligent management and control method and system
CN116739160A