Cross-border port entry-exit passenger flow prediction method and prediction device, storage medium and computer equipment

By parametrically processing the characteristics of inbound and outbound passenger flows at cross-border ports and performing multi-scale self-attention calculations, the problems of holiday impact and time lag correlation in cross-border port inbound and outbound passenger flow forecasting have been solved, achieving more accurate passenger flow forecasting.

CN121998161APending Publication Date: 2026-05-08SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
Filing Date
2025-12-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Cross-border port passenger flow forecasting models struggle to cope with the dual unique effects of holidays and the time lag correlation between passenger flow and inbound/outbound traffic, leading to inaccurate forecasts.

Method used

We employ cross-border regional holiday feature parameterization to construct multi-scale local passenger flow features and holiday location features. We then use a dual-stream encoder to perform single-stream multi-scale self-attention calculation, cross-stream same-scale interactive calculation, and multi-scale fusion calculation, and combine it with a future time-aware decoder for prediction.

Benefits of technology

It effectively addresses the impact of holidays and the time lag correlation of inbound and outbound passenger flows in cross-border port entry and exit scenarios, thereby improving the accuracy of passenger flow forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998161A_ABST
    Figure CN121998161A_ABST
Patent Text Reader

Abstract

The invention provides a cross-border port entry-exit passenger flow prediction method and device, a storage medium and computer equipment. The method comprises the following steps: parameterizing holiday features of a cross-border area to obtain time sequence features, constructing to obtain multi-scale passenger flow local segment features, constructing to obtain holiday position features, and constructing to obtain passenger flow input features; single-flow multi-scale self-attention calculation, cross-flow same-scale interactive calculation and multi-scale fusion calculation are sequentially carried out on the entry passenger flow input features and the exit passenger flow input features respectively, and exit and entry passenger flow fusion features are obtained; constructing a query vector according to the features of the target time period; and obtaining an entry passenger flow prediction value and an exit passenger flow prediction value according to the future query vector and the exit-entry passenger flow fusion feature. The prediction method can effectively deal with the problems of dual particularity of festival and holiday influence in a cross-border port exit-entry scene, time lag correlation of exit-entry passenger flow and the like, and a more accurate passenger flow prediction value is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of information technology, and specifically relates to a method, device, computer-readable storage medium, and computer equipment for predicting inbound and outbound passenger flow at cross-border ports. Background Technology

[0002] Cross-border ports are crucial nodes in regional transportation. Accurately predicting inbound and outbound passenger flow is essential for optimizing resource allocation (such as customs clearance window scheduling and inspection personnel shift work), improving the cross-border travel experience (reducing congestion and waiting times), and ensuring public safety (emergency crowd control). Compared to general traffic scenarios, port passenger flow exhibits both daily and weekly regularities, and is also affected by the combined influence of external factors such as regional holidays, weather, major events, and economic conditions. The numerous external influencing factors result in greater randomness and uncertainty, significantly increasing the difficulty of prediction.

[0003] Passenger demand prediction has been extensively studied in the transportation and tourism sectors. Early research in these areas primarily relied on CNNs and RNNs / LSTMs. The former excels at capturing local spatiotemporal features, while the latter effectively models sequence dependencies, particularly suitable for time-series data. To extract features at different temporal granularities, the encoder-decoder (Encoder-Decoder) structure of RNNs / LSTMs subsequently gained widespread application. The encoder maps the input sequence to a vector representation, while the decoder directly generates the target sequence, enabling end-to-end prediction and demonstrating leading performance. However, RNNs are prone to the vanishing gradient problem when processing long sequences.

[0004] In recent years, Transformer has significantly improved its ability to model long sequence dependencies through its self-attention mechanism, demonstrating higher accuracy and robustness in time series prediction tasks. Some studies have incorporated external information (such as holidays, weather, and special events) into prediction models to improve prediction accuracy. However, cross-border passenger flow has characteristics different from conventional traffic prediction. For example, port traffic exhibits both intraday and weekly cyclical patterns, is affected by cross-regional holidays, and shows a significant time lag correlation between inbound and outbound traffic. This is specifically manifested in the following two aspects:

[0005] (1) The dual uniqueness of the impact of holidays: Cross-regional overlap and cross-time period extension. Port passenger flow is affected by both Chinese and Western holidays, and often there are staggered holidays, forming an "asynchronous impact". For example, at Shenzhen ports, a large number of mainland residents travel to Hong Kong during the Spring Festival, while Hong Kong and Macao residents concentrate on entering the country for shopping during Christmas. Due to the asynchronous holidays, passenger flow shows alternating peaks in different directions. At the same time, the holiday effect also extends to the periods before and after, such as the cross-border shopping rush before National Day and the return peak after the holiday, which often form a continuous fluctuation of "pre-holiday-mid-holiday-post-holiday". This cross-regional and cross-time period holiday effect is significantly different from the single-region, short-cycle holiday impact pattern in traditional scenarios.

[0006] (2) Time lag correlation of inbound and outbound passenger flows: Unlike the "multi-dimensional correlation in the same time period" (such as the real-time coupling of road traffic flow and speed) commonly seen in traffic forecasting, there is a significant time lag between inbound and outbound passenger flows at ports. For example, during the Spring Festival, a large number of overseas tourists enter the country, and a large-scale outbound peak usually forms one to two weeks after the holiday ends. This "entry / exit first, exit / entry later" lag pattern breaks through the assumption of "real-time synchronous linkage" in traditional forecasting.

[0007] These characteristics make it difficult to directly apply existing passenger flow forecasting model architectures to port passenger flow forecasting. Summary of the Invention

[0008] The technical problem addressed in this application is: how to address the dual uniqueness of cross-border port entry and exit scenarios, including the impact of holidays and the time lag correlation of entry and exit passenger flows, in order to improve the accuracy of passenger flow forecasting.

[0009] This application provides a method for predicting inbound and outbound passenger flow at cross-border ports, the method comprising:

[0010] Input feature construction stage: Parametric processing of holiday features in cross-border areas to obtain time-series features, construction of multi-scale passenger flow local segment features, and construction of holiday location features; based on the time-series features, multi-scale passenger flow local segment features, and holiday location features, passenger flow input features are constructed, including inbound passenger flow input features and outbound passenger flow input features;

[0011] Dual-stream encoder processing stage: Single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation are performed on the inbound passenger flow input features and outbound passenger flow input features respectively to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; Multi-scale fusion calculation is performed on the inbound passenger flow interaction features and outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features;

[0012] Future time-aware decoder processing stage: Construct a query vector based on the features of the target time period; Obtain the predicted values ​​of inbound and outbound passenger flows based on the future query vector and the inbound and outbound passenger flow fusion features.

[0013] Optionally, the holiday characteristics of cross-border regions are parameterized to obtain time-series characteristics, including:

[0014] A holiday feature system is constructed based on intraday time information, weekday parameters, holiday length parameters, and holiday sequence parameters of cross-border regions, serving as a temporal feature.

[0015] Optionally, multi-scale local segment features of passenger flow are constructed, including:

[0016] The passenger flow sequences and external features of several historical time slices are constructed according to different time lengths to form short-scale passenger flow local segment features, medium-scale passenger flow local segment features, and long-scale passenger flow local segment features.

[0017] Reversible strength normalization was performed on the local segment features of short-scale, medium-scale, and long-scale passenger flow, respectively.

[0018] Optionally, single-flow multi-scale self-attention calculation and cross-flow same-scale interaction calculation are performed sequentially on the inbound passenger flow input characteristics and outbound passenger flow input characteristics to obtain inbound passenger flow interaction characteristics and outbound passenger flow interaction characteristics, including:

[0019] Self-attention calculations are performed sequentially on the inbound passenger flow input characteristics at each scale to obtain the inbound passenger flow self-attention characteristics at each scale. Self-attention calculations are also performed sequentially on the outbound passenger flow input characteristics at each scale to obtain the outbound passenger flow self-attention characteristics at each scale.

[0020] By sequentially performing cross-attention calculations on the self-attention features of inbound and outbound passenger flows at the same scale, the interactive features of inbound and outbound passenger flows at various scales are obtained.

[0021] Optionally, multi-scale fusion calculation is performed on the inbound passenger flow interaction features and the outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features, including:

[0022] A fusion strategy was adopted to fuse the interaction characteristics of inbound and outbound passenger flows at various scales to obtain the fused characteristics of inbound and outbound passenger flows.

[0023] Optionally, a query vector is constructed based on the characteristics of the target time period, including:

[0024] Several target time periods and external features are embedded into a unified dimension to obtain a query vector. The external features include holiday parameters, weekday information, and weather forecasts.

[0025] Optionally, the predicted values ​​of inbound and outbound passenger flows are obtained based on the future query vector and the inbound / outbound passenger flow fusion features, including:

[0026] The future query vector and the inbound / outbound passenger flow fusion features are fused using a two-layer interaction mechanism to obtain historical features;

[0027] The future query vector and the historical features are fused across attention to obtain the decoder output features;

[0028] The decoder output features are input into the linear projection layer to obtain the predicted values ​​of inbound and outbound passenger flows.

[0029] This application also provides a cross-border port passenger flow prediction device, the device comprising:

[0030] An input feature construction unit is configured to: parameterize the holiday features of cross-border areas to obtain time-series features, construct multi-scale passenger flow local segment features, and construct holiday location features; and construct passenger flow input features based on the time-series features, multi-scale passenger flow local segment features, and holiday location features, wherein the passenger flow input features include inbound passenger flow input features and outbound passenger flow input features.

[0031] A dual-stream encoder processing unit is configured to: perform single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation on inbound passenger flow input features and outbound passenger flow input features respectively to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; and perform multi-scale fusion calculation on the inbound passenger flow interaction features and outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features.

[0032] The future time-aware decoder processing unit is configured to: construct a query vector based on the features of the target time period; and obtain inbound passenger flow prediction values ​​and outbound passenger flow prediction values ​​based on the future query vector and the inbound / outbound passenger flow fusion features.

[0033] This application also provides a computer-readable storage medium storing a cross-border port passenger flow prediction program, which, when executed by a processor, implements the aforementioned cross-border port passenger flow prediction method.

[0034] This application also provides a computer device, which includes a computer-readable storage medium, a processor, and a cross-border port inbound / outbound passenger flow prediction program stored in the computer-readable storage medium. When the cross-border port inbound / outbound passenger flow prediction program is executed by the processor, it implements the above-described cross-border port inbound / outbound passenger flow prediction method.

[0035] The cross-border port passenger flow prediction method provided in this application has the following technical advantages:

[0036] This forecasting method can effectively address the unique characteristics of cross-border port entry and exit scenarios, such as the impact of holidays and the time lag correlation of entry and exit passenger flows, and obtain more accurate passenger flow forecasts. Attached Figure Description

[0037] Figure 1 This is a flowchart of a method for predicting cross-border passenger flow at ports of entry and exit, based on one or more embodiments.

[0038] Figure 2 This is a model architecture diagram of a cross-border port passenger flow prediction method according to one or more embodiments.

[0039] Figure 3 Timing features are obtained through parameterization processing according to one or more embodiments.

[0040] Figure 4 This is a schematic diagram of a cross-border port passenger flow prediction device according to one or more embodiments.

[0041] Figure 5 This is a schematic diagram of a computer device according to one or more embodiments. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] Before describing the various embodiments of this application in detail, the technical concept of this application is first briefly described: Current passenger flow prediction models are unable to cope with the dual special characteristics of cross-border port entry and exit scenarios, such as the impact of holidays and the time lag correlation of entry and exit passenger flows, resulting in inaccurate predictions. Therefore, this application provides a method for predicting cross-border port entry and exit passenger flows. The key improvement lies in the parameterization of cross-border regional holiday features to obtain time-series features. In the dual-flow encoder processing stage, single-flow multi-scale self-attention calculation, cross-flow same-scale interactive calculation, and multi-scale fusion calculation are performed on entry and exit passenger flows to obtain fused features. In the decoder stage, relevant features for future target time periods are added to query similar historical passenger flow patterns. This prediction method can effectively address the dual special characteristics of cross-border port entry and exit scenarios, such as the impact of holidays and the time lag correlation of entry and exit passenger flows, and obtain more accurate passenger flow prediction values. The specific principles of the cross-border port entry and exit passenger flow prediction method of this application are described below with more embodiments.

[0044] Specifically, such as Figure 1 and Figure 2 As shown, the method for predicting inbound and outbound passenger flow at cross-border ports in this embodiment includes the following steps:

[0045] Step S10, Input Feature Construction Stage: Parametric processing of holiday features in cross-border areas to obtain time-series features, construction of multi-scale passenger flow local segment features, and construction of holiday location features; based on the time-series features, multi-scale passenger flow local segment features, and holiday location features, passenger flow input features are constructed, including inbound passenger flow input features and outbound passenger flow input features;

[0046] Step S20, Dual-stream encoder processing stage: Single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation are performed on the inbound passenger flow input features and outbound passenger flow input features respectively to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; Multi-scale fusion calculation is performed on the inbound passenger flow interaction features and the outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features;

[0047] Step S30, Future Time Aware Decoder Processing Stage: Construct a query vector based on the characteristics of the target time period; obtain the predicted values ​​of inbound and outbound passenger flows based on the future query vector and the inbound and outbound passenger flow fusion characteristics.

[0048] In one or more embodiments, the representation of time slices and inbound / outbound passenger flows is first defined. Time slice: The research data is divided into a series of time slices at fixed time intervals (e.g., 1 hour), denoted as {t1, t2, ..., t...} (e.g., 30 minutes). |T| Within time slice t, the number of people entering and leaving the destination port is defined as In.t and Out t Given an inbound passenger flow sequence X over P past time slices. In ={In t-p+1 ,...,In t-1 Outbound passenger flow sequence X Out ={Out t-p+1 ,...,Out t-1} and external feature sequence X containing historical and future available information Ext ={E t-P ,...,E t-1 E t E t+1 ,…,E t+Q-1 The goal is to predict inbound and outbound passenger flows for Q consecutive time periods starting from time slice t, denoted as}. The problem can be formally described as follows: Where F is the mapping function.

[0049] To fully characterize the complexity of the holiday effect in cross-border passenger flow, we conducted a refined modeling of holiday characteristics. In-depth analysis of passenger flow at a specific port revealed three main complexities in the impact of holidays: First, the total holiday duration varies significantly (e.g., the passenger flow patterns differ markedly between a 3-day mini-holiday and a 7-day Golden Week); second, the holiday duration affects peak passenger flow (the characteristics of the first-day round-trip peak and the last-day return peak are quite different); and third, cross-border holiday combinations (holidays unilaterally granted by the mainland, unilaterally granted by other regions, or jointly granted by both) can fundamentally alter passenger flow direction. Therefore, when parameterizing time, we upgraded the previously simple binary "whether it's a holiday" criterion used in other fields (transportation, tourism, etc.) into a parameterized holiday characteristic system. This system was then transformed into a dense vector through an embedding layer and input into the model along with passenger flow data.

[0050] Specifically, the holiday characteristics of cross-border regions are parameterized to obtain time-series features. This includes constructing a holiday feature system based on intraday time information, weekday parameters, holiday length parameters, and holiday sequence parameters of the cross-border region, which serves as the time-series feature. For example, the Shenzhen port is used as an example:

[0051] (1) Intraday time information (hours, minutes): A day is divided into a fixed number of time periods (e.g., one hour) and represented by 1-M.

[0052] (2) Weekday parameter: used to characterize travel patterns within the week. Regular weekdays are represented by 1–7 (Monday to Sunday), and adjusted workdays are represented by 0; the weekday effect during holidays is not significant and is uniformly recorded as 8.

[0053] (3) Holiday length parameter (Mainland China / Hong Kong): Used to reflect the difference in travel intensity for holidays of different total lengths, and is directly represented by integers (e.g., a 3-day mini-holiday is recorded as 3, a 5-day holiday as 5, and a non-holiday as 0).

[0054] (4) Holiday sequence parameters (Mainland China / Hong Kong): Used to model the holiday process effect. Day 1, Day 2, and Day 3 of the holiday are denoted as 1, 2, and 3 respectively, while non-holiday days are denoted as 0.

[0055] like Figure 3 As shown, in addition to intraday time information, a parametric method was used to meticulously characterize the holiday characteristics of Mainland China and Hong Kong during the 2024 Qingming Festival: Mainland China had a 3-day holiday (April 4-6), while Hong Kong only had a holiday on April 4. Through three types of parameters—weekday parameter (holidays are uniformly set to 0), holiday length (total number of days in the holiday), and holiday sequence (holiday progression)—the triple complexity of the holiday effect was fully described, providing accurate temporal feature input for cross-border passenger flow forecasting. The multidimensional information of holidays is transformed into learnable temporal features to capture the cross-regional and cross-time-period holiday effects that traditional forecasting models cannot characterize.

[0056] In one or more embodiments, multi-scale passenger flow local segment features are constructed, including: constructing short-scale passenger flow local segment features, medium-scale passenger flow local segment features, and long-scale passenger flow local segment features by constructing passenger flow sequences and external features of several historical time slices according to different time lengths; and performing reversible strength normalization processing on the short-scale passenger flow local segment features, medium-scale passenger flow local segment features, and long-scale passenger flow local segment features respectively.

[0057] Specifically, port passenger flow exhibits significant short-term fluctuations and long-term trends: it shows clear peaks and troughs within a day, and continuous fluctuations across time periods occur before and after holidays and during cross-regional holidays. Furthermore, there is a lagged correlation between inbound and outbound passenger flow. These complex, multi-scale, and non-stationary time-series characteristics make it difficult to efficiently capture local and global dependencies by directly modeling the original sequence using Transformer. Therefore, this embodiment employs patch representation to divide the continuous time series into local segments, and uses Reversible Instance Normalization (RevIN) within each patch to stabilize amplitude fluctuations. Through a multi-scale adaptive path Transformer, time-series dependencies are modeled at the patch level, preserving local trend information while capturing cross-period and lagged correlations, thus providing efficient and stable feature representation and modeling capabilities for predicting inbound and outbound passenger flow at ports.

[0058] Multi-scale Patch Construction: The inbound and outbound passenger flow sequences and external features from the past P time slices are constructed by dividing them into different lengths L1, L2, ..., L... KMulti-scale patches were constructed. The lengths of patches at different scales were selected based on the temporal characteristics of passenger flow at the port. This paper used three types of patches:

[0059] Short-scale patch (L1): Covers 2-6 time slices (e.g., 1-3 hours) to capture intraday peaks / troughs and short-term fluctuations before / during holidays;

[0060] Mesoscale patch (L2): Covers 6-24 time slices (e.g., 3-12 hours), modeling continuous daily fluctuations before, during, and after the holiday;

[0061] Long-scale patch (L3): Covers 48-168 time slices (e.g., 1-7 days), capturing weekly cycles, trends across holidays, and inbound / outbound lag effects.

[0062] The formula for constructing a multi-scale patch for inbound passenger flow is as follows:

[0063] The formula for constructing a multi-scale patch for outbound passenger flow is as follows:

[0064] Short-scale patches capture short-term fluctuations and intraday patterns before, during, and after holidays, while long-scale patches capture trends across holidays and weekly cycles. Because each patch retains local temporal structure while reducing sequence length, computational complexity is lowered.

[0065] Patch-based reversible instance normalization (RevIN): Normalizes the sequences at each scale and within each patch, eliminating amplitude differences across different patches and making the constructed Transformer more effective at capturing trends and periodicity. The specific implementation is as follows:

[0066]

[0067] Where, μ (k),i and σ (k),i The mean and standard deviation of this patch.

[0068] Perform inverse transformation during the output prediction stage:

[0069]

[0070] Next, the model's input embedding consists of three parts: passenger flow embedding, time feature embedding, and location embedding.

[0071] Passenger flow embedded in E flowFor the normalized and multi-scale segmented local passenger flow features, each patch is mapped to a unified dimension D through linear projection to obtain the basic passenger flow embedding matrix: Where N is the number of patches. This embedding preserves local temporal patterns while providing a high-dimensional representation for subsequent self-attention modeling of the Transformer.

[0072] Temporal feature embedding E temp For each time slice, we constructed time features using a cross-regional time parameterization method. All time-related features were concatenated and fused through a fully connected layer to obtain the final time feature embedding. This embedding can explicitly represent holiday impacts, asynchronous cross-regional effects, and periodic patterns.

[0073] Embedding of holiday location features E pos In port passenger flow forecasting, both global time anchors (e.g., whether a day is a holiday) and local relative relationships (e.g., the difference in passenger flow before and after a holiday) are needed. Therefore, we adopt Hybrid Positional Encoding. At the input layer, we use learnable Absolute Positional Encoding (APE): A global temporal reference coordinate is provided for the sequence. Subsequently, a relative position bias (RPE) is introduced into the computation of self-attention and cross-attention, assigning a learnable bias to the relative distance ij between any two time slices, thereby capturing local ordering and lag effects. The final position embedding can be represented as E pos =E ape +RPE.

[0074] Finally, the embedding vector input to the encoder is the sum of the three: Z (0) =E flow +E temp +E pos .

[0075] Inbound and outbound flows are embedded separately to obtain inbound passenger flow input features. and characteristics of outbound passenger flow

[0076] In one or more embodiments, the inbound passenger flow input features and outbound passenger flow input features are sequentially subjected to single-flow multi-scale self-attention calculation and cross-flow same-scale interaction calculation to obtain inbound passenger flow interaction features and outbound passenger flow interaction features, including: sequentially performing self-attention calculation on inbound passenger flow input features at each scale to obtain inbound passenger flow self-attention features at each scale; sequentially performing self-attention calculation on outbound passenger flow input features at each scale to obtain outbound passenger flow self-attention features at each scale; and sequentially performing cross-attention calculation on inbound passenger flow self-attention features and outbound passenger flow self-attention features at the same scale to obtain inbound passenger flow interaction features and outbound passenger flow interaction features at each scale.

[0077] For example, the inbound and outbound sequences are divided into local passenger flow feature segments of different lengths (short-scale L1, medium-scale L2, and long-scale L3) to extract features from different time granularities such as intraday fluctuations, cross-day effects, and weekly trends. For each scale k, the input passenger flow local segment feature sequence Z is... (0,k) Internal dependencies are learned via an independent Transformer encoder: Inbound passenger flow self-attention features: Inbound passenger flow self-attention characteristics It is important to note that self-attention is only calculated between local segments of passenger flow features within the same flow and scale. That is, short-scale local segments of passenger flow only interact with other short-scale local segments of passenger flow; attention is not directly calculated between different scales. This ensures semantic consistency within the temporal granularity.

[0078] Next, cross-stream same-scale cross-attention computation is performed. After obtaining the single-stream representation at each scale, the dual-stream encoder realizes cross-stream information interaction through the cross-attention mechanism.

[0079] Interaction characteristics of inbound passenger flow:

[0080] Outbound passenger flow interaction characteristics:

[0081] Cross-attention at this stage is limited to inbound and outbound sequences at the same scale, such as short-scale inbound-short-scale outbound. By introducing relative position encoding (RPE), the model can capture lag patterns such as "inbound first, outbound later" or "outbound first, inbound later". This design ensures that cross-flow dependencies at different time granularities can be explicitly modeled without disrupting the temporal structure across scales.

[0082] Next, a fusion strategy was employed to integrate the interaction characteristics of inbound and outbound passenger flows at various scales, resulting in fused inbound and outbound passenger flow characteristics. Inbound and outbound passenger flow fusion characteristic H Dual The representation is as follows:

[0083]

[0084] In the formula, "Fusion" represents the fusion strategy, which can employ methods such as concatenating the input feedforward network, weighted averaging, or gating mechanisms to integrate short-term fluctuations, medium-term effects, and long-term trends. In this way, the model retains the dependency modeling within the same scale while achieving cross-scale information interaction and supplementation through fusion.

[0085] In summary, the dual-stream encoder, through its design of "single-stream multi-scale self-attention → cross-stream same-scale interaction → multi-scale fusion," effectively captures local fluctuations, long-term trends, and in / out lag correlations, providing a comprehensive temporal context representation for subsequent decoders. Furthermore, by employing a cross-attention mechanism with relative temporal bias to model cross-stream temporal lag dependencies, it overcomes the limitation of traditional methods that can only handle synchronous correlations.

[0086] In one or more embodiments, a query vector is constructed based on the characteristics of a target time period, including: embedding several future target time periods and external features into a unified dimension to obtain the query vector. The external features include holiday parameters, weekday information, and weather forecasts. The query vector is represented as follows:

[0087]

[0088] Among them, E t+1 E t+2 ,...,E t+Q These query vectors represent various external features. They not only provide prior information about the target time slice, but also introduce "future anchors" for the decoding process, thereby explicitly modeling the impact of holidays across regions and time periods.

[0089] In one or more embodiments, obtaining predicted inbound and outbound passenger flows based on future query vectors and inbound / outbound passenger flow fusion features includes:

[0090] A two-layer interactive mechanism is used to fuse future query vectors and inbound / outbound passenger flow features to obtain historical features. Specifically, the two-layer interactive mechanism employs FiLM modulation (Feature-wise Linear Modulation): using scaling and translation parameters generated from future features, the inbound / outbound passenger flow fusion feature H is modulated. Dual Perform channel-by-channel modulation:

[0091] Here, γ(·) and β(·) are generated by fully connected layers, and ⊙ represents element-wise multiplication. This operation is equivalent to adjusting the activation mode of historical memory with future information as a "filter," making the model pay more attention to historical patterns related to future conditions.

[0092] Next, cross-attention fusion is performed on the future query vector and historical features to obtain the decoder output features. The cross-attention fusion method is as follows:

[0093] H dec =CrossAttn(Q,K,V), Q=Z future ,

[0094] In this way, each query for a future time slice can select relevant entry / exit dependency patterns from historical memory, thereby enabling prediction based on future feature conditions and effectively improving the accuracy and event sensitivity of multi-step prediction.

[0095] Finally, the decoder output features are input into the linear projection layer to obtain the predicted inbound and outbound passenger flows. Specifically, the linear projection layer generates the inbound and outbound passenger flow predictions for the next Q time slices: The 2 in the formula corresponds to the predicted values ​​for both inbound and outbound directions.

[0096] By testing on real data from Shenzhen’s four major ports (Shenzhen Bay, Futian, Luohu, and Liantang), the cross-border port passenger flow prediction method showed a decrease of more than 5% in MAPE compared to the best baseline during holidays. Attention visualization revealed the dynamic patterns captured by the model before, during, and after holidays, as well as the lag dependence of inbound / outbound traffic.

[0097] The cross-border passenger flow prediction method provided in this embodiment has the following effects:

[0098] (1) Comprehensive capture of cross-regional holiday patterns. By parametric modeling of holidays, complex cross-regional and cross-time period holiday information is transformed into learnable features, effectively capturing "misaligned holidays" and "pre- and post-holiday extension effects", significantly improving the model's sensitivity to passenger flow fluctuations during special periods and its prediction accuracy.

[0099] (2) Refined modeling of inbound and outbound two-way dynamics. The dual-flow encoder realizes separate modeling of inbound and outbound traffic, and uses a cross-attention mechanism to characterize time lag correlation, which can accurately reflect real patterns such as "inbound traffic lagging outbound traffic", and improve the ability to express the two-way dynamics of cross-border passenger flow.

[0100] (3) Make full use of known information about the future. The future-aware decoding framework directly integrates known features such as future holidays and weather into the prediction process. Combined with FiLM modulation and historical memory, it greatly improves the model's foresight and robustness in predicting future trends, breaking through the limitation of traditional methods that can only rely on historical data.

[0101] like Figure 4As shown in Embodiment 2, a cross-border port passenger flow prediction device is also disclosed. The device includes an input feature construction unit 100, a dual-stream encoder processing unit 200, and a future time-aware decoder processing unit 300. The input feature construction unit 100 is configured to: parameterize the holiday features of the cross-border area to obtain temporal features; construct multi-scale passenger flow local segment features; and construct holiday location features; based on the temporal features, multi-scale passenger flow local segment features, and holiday location features, construct passenger flow input features, including inbound passenger flow input features and outbound passenger flow input features. The dual-stream encoder processing unit 200 is configured to: sequentially perform single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation on the inbound passenger flow input features and outbound passenger flow input features, respectively, to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; and perform multi-scale fusion calculation on the inbound passenger flow interaction features and outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features. The future time-aware decoder processing unit 300 is configured to: construct a query vector based on the characteristics of the target time period; and obtain the predicted values ​​of inbound and outbound passenger flows based on the future query vector and the inbound and outbound passenger flow fusion characteristics.

[0102] Embodiment 3 of this application also discloses a computer-readable storage medium storing a cross-border port inbound and outbound passenger flow prediction program. When the cross-border port inbound and outbound passenger flow prediction program is executed by a processor, it implements the above-mentioned cross-border port inbound and outbound passenger flow prediction method.

[0103] This fourth embodiment also discloses a computer device, at the hardware level, such as... Figure 5 As shown, the computer device includes a processor 12, an internal bus 13, a network interface 14, and a computer-readable storage medium 11. The processor 12 reads the corresponding computer program from the computer-readable storage medium and runs it, forming a request processing device at the logical level. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices. The computer-readable storage medium 11 stores a cross-border port inbound and outbound passenger flow prediction program. When the cross-border port inbound and outbound passenger flow prediction program is executed by the processor, it implements the above-described cross-border port inbound and outbound passenger flow prediction method.

[0104] Computer-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0105] The specific embodiments of this application have been described in detail above. Although some embodiments have been shown and described, those skilled in the art should understand that modifications and improvements can be made to these embodiments without departing from the principles and spirit of this application as defined by the claims and their equivalents, and such modifications and improvements should also be within the protection scope of this application.

Claims

1. A method for predicting inbound and outbound passenger flow at cross-border ports, characterized in that, The method includes: Input feature construction stage: Parametric processing of holiday features in cross-border areas to obtain time-series features, construction of multi-scale passenger flow local segment features, and construction of holiday location features; based on the time-series features, multi-scale passenger flow local segment features, and holiday location features, passenger flow input features are constructed, including inbound passenger flow input features and outbound passenger flow input features; Dual-stream encoder processing stage: Single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation are performed on the inbound passenger flow input features and outbound passenger flow input features respectively to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; Multi-scale fusion calculation is performed on the inbound passenger flow interaction features and outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features; Future time-aware decoder processing stage: Construct a query vector based on the characteristics of the target time period; Obtain the predicted values ​​of inbound and outbound passenger flows based on the future query vector and the inbound and outbound passenger flow fusion characteristics.

2. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 1, characterized in that, The holiday characteristics of cross-border regions are parameterized to obtain time-series features, including: A holiday feature system is constructed based on intraday time information, weekday parameters, holiday length parameters, and holiday sequence parameters of cross-border regions, serving as a temporal feature.

3. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 1, characterized in that, Multi-scale local segment features of passenger flow were constructed, including: The passenger flow sequences and external features of several historical time slices are constructed according to different time lengths to form short-scale passenger flow local segment features, medium-scale passenger flow local segment features, and long-scale passenger flow local segment features. Reversible strength normalization was performed on the local segment features of short-scale, medium-scale, and long-scale passenger flow, respectively.

4. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 3, characterized in that, Single-flow multi-scale self-attention calculation and cross-flow same-scale interaction calculation are performed sequentially on the inbound passenger flow input characteristics and outbound passenger flow input characteristics to obtain inbound passenger flow interaction characteristics and outbound passenger flow interaction characteristics, including: Self-attention calculations are performed sequentially on the inbound passenger flow input features at each scale to obtain the inbound passenger flow self-attention features at each scale. Self-attention calculations are also performed sequentially on the outbound passenger flow input features at each scale to obtain the outbound passenger flow self-attention features at each scale. By sequentially performing cross-attention calculations on the self-attention features of inbound and outbound passenger flows at the same scale, the interactive features of inbound and outbound passenger flows at various scales are obtained.

5. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 4, characterized in that, Multi-scale fusion calculations are performed on the inbound passenger flow interaction features and the outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features, including: A fusion strategy was adopted to fuse the interaction characteristics of inbound and outbound passenger flows at various scales to obtain the fused characteristics of inbound and outbound passenger flows.

6. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 2, characterized in that, Construct a query vector based on the characteristics of the target time period, including: Several target time periods and external features are embedded into a unified dimension to obtain a query vector. The external features include holiday parameters, weekday information, and weather forecasts.

7. The method for predicting cross-border passenger flow at ports of entry and exit according to claim 6, characterized in that, Based on the future query vector and the inbound / outbound passenger flow fusion features, the predicted values ​​for inbound and outbound passenger flows are obtained, including: The future query vector and the inbound / outbound passenger flow fusion features are fused using a two-layer interaction mechanism to obtain historical features; The future query vector and the historical features are fused across attention to obtain the decoder output features; The decoder output features are input into the linear projection layer to obtain the predicted values ​​of inbound and outbound passenger flows.

8. A device for predicting passenger flow at cross-border ports, characterized in that, The device includes: An input feature construction unit is configured to: parameterize the holiday features of cross-border areas to obtain time-series features, construct multi-scale passenger flow local segment features, and construct holiday location features; and construct passenger flow input features based on the time-series features, multi-scale passenger flow local segment features, and holiday location features, wherein the passenger flow input features include inbound passenger flow input features and outbound passenger flow input features. A dual-stream encoder processing unit is configured to: perform single-stream multi-scale self-attention calculation and cross-stream same-scale interaction calculation on inbound passenger flow input features and outbound passenger flow input features respectively to obtain inbound passenger flow interaction features and outbound passenger flow interaction features; and perform multi-scale fusion calculation on the inbound passenger flow interaction features and outbound passenger flow interaction features to obtain inbound and outbound passenger flow fusion features. The future time-aware decoder processing unit is configured to: construct a query vector based on the features of the target time period; and obtain inbound passenger flow prediction values ​​and outbound passenger flow prediction values ​​based on the future query vector and the inbound / outbound passenger flow fusion features.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a cross-border port passenger flow prediction program, which, when executed by a processor, implements the cross-border port passenger flow prediction method according to any one of claims 1 to 7.

10. A computer device, characterized in that, The computer device includes a computer-readable storage medium, a processor, and a cross-border port passenger flow prediction program stored in the computer-readable storage medium, wherein the cross-border port passenger flow prediction program, when executed by the processor, implements the cross-border port passenger flow prediction method according to any one of claims 1 to 7.