Method and system for predicting origin-destination passenger flow volume based on large language model

By combining large language models with structured aviation data, the shortcomings of traditional OD passenger flow forecasting methods in handling nonlinear relationships and unstructured data are addressed, achieving higher accuracy and timeliness in passenger flow forecasting.

CN121935844APending Publication Date: 2026-04-28BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF TECH
Filing Date
2026-01-17
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional OD (Original Demand) passenger flow forecasting methods struggle to capture complex nonlinear relationships and process key exogenous variables in unstructured data, resulting in insufficient forecast accuracy and timeliness.

Method used

By combining a large language model with structured aviation data, and fine-tuning the Transformer architecture through semantic feature encoding and low-rank adaptive methods, predictions of future passenger traffic are generated.

Benefits of technology

It significantly improves the accuracy and timeliness of passenger flow forecasting at origin and destination, providing more precise data-driven decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935844A_ABST
    Figure CN121935844A_ABST
Patent Text Reader

Abstract

The invention discloses an origin-destination passenger flow prediction method and system based on a large language model, and the method comprises the steps: S1, collecting historical origin-destination related parameters of a target region, and carrying out the preprocessing of the related parameters; s2, according to the pre-processed related parameters, performing semantic feature coding through a prompt project; s3, inputting the encoded semantic features into a large language model, and predicting the future passenger flow of the origin and destination of the target area; and S4, outputting the predicted passenger flow volume of the origin and destination of the target area, and carrying out anti-normalization processing on the predicted passenger flow volume. According to the method, the large language model is combined with the structured aviation data, the key factors influencing the passenger flow can be automatically extracted and fused from the multi-source heterogeneous data by utilizing the strong semantic understanding and reasoning capability of the large language model, and particularly, unstructured text information which is difficult to quantify by a traditional model is effectively introduced; therefore, the accuracy, timeliness and interpretability of origin-destination passenger flow volume prediction are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air transport management, and specifically to a method and system for predicting origin-destination passenger flow based on a large language model. Background Technology

[0002] The global air transport industry is a cornerstone of modern socio-economic development. For airlines, accurate passenger traffic forecasting, especially origin-destination (OD) passenger traffic forecasting, is crucial for data-driven decision-making, optimizing resource allocation, and improving profitability. OD passenger traffic directly reflects passengers' true travel intentions and provides a more fundamental data-driven basis compared to segment-based forecasting.

[0003] However, traditional methods for predicting origin-destination (OD) traffic face significant challenges. Classical statistical models (such as ARIMA and SARIMA) and gravity models perform well when handling stationary data, but struggle to capture the complex nonlinear relationships and impacts of unforeseen events in the real world. Traditional machine learning models (such as gradient boosting trees and random forests) improve prediction accuracy to some extent, but their performance is highly dependent on cumbersome feature engineering and they struggle to effectively integrate unstructured data. For example, key exogenous variables embedded in a large amount of textual information—such as the release of new macroeconomic policies, large-scale events in specific cities, public health emergencies, or trending travel topics on social media—often have a direct and immediate impact on travelers' travel intentions, but traditional models can neither capture nor quantify this information.

[0004] In recent years, the emergence of large language models (LLMs), such as GPT, BERT, and LLaMA, has provided a new paradigm for overcoming the aforementioned bottlenecks. Leveraging their powerful capabilities in natural language understanding, context learning, and zero-shot / few-shot reasoning, large models can automatically extract deep semantic information from massive amounts of unstructured text data and effectively integrate it with structured historical passenger flow data. This allows predictive models to move beyond endogenous patterns that rely solely on historical data, and instead understand and respond to exogenous market drivers. However, the application of LLMs to the highly specific and multimodal field of air OD passenger flow prediction remains largely unexplored. Summary of the Invention

[0005] To address the technical problems mentioned above, this invention provides a method for predicting origin-destination passenger flow based on a large language model, comprising the following steps:

[0006] S1. Collect historical start and end point related parameters of the target area and preprocess the related parameters;

[0007] S2. Based on the preprocessed relevant parameters, semantic feature encoding is performed through the prompting process;

[0008] S3. Input the encoded semantic features into the large language model to predict the future passenger flow at the origin and destination of the target area;

[0009] S4. Output the predicted passenger flow of the target area's origin and destination points, and perform inverse normalization on the predicted passenger flow.

[0010] Preferably, step S1 includes:

[0011] Based on the collected flight record data, a passenger flow sequence between origin and destination is constructed;

[0012] Based on the passenger flow sequence from origin to destination, multi-source data is integrated to form a feature system containing multiple dimensions;

[0013] Based on the origin-destination passenger flow sequence and characteristic system, the passenger flow data is normalized.

[0014] Preferably, step S2 includes:

[0015] Based on the preprocessed structured data, construct structured natural language prompts;

[0016] Natural language prompts include task description, contextual information, input data, instructions, and response format.

[0017] Preferably, step S3 includes:

[0018] A large language model using a decoder-only Transformer architecture receives natural language prompts;

[0019] Fine-tuning of a large language model using a low-rank adaptive method;

[0020] A large language model is trained based on the objective of causal language modeling to generate normalized numerical outputs representing future passenger flow.

[0021] Preferably, the low-rank adaptive method used in step S3 includes:

[0022] Introduce trainable low-rank matrices into the self-attention module and feedforward layer of the large language model;

[0023] Keep the non-low-rank adaptive parameters in the large language model frozen.

[0024] Preferably, step S3 further includes:

[0025] During the reasoning process, text output is generated using a greedy decoding method;

[0026] Extract the floating-point values ​​representing the predicted passenger flow from the text output.

[0027] Preferably, step S4 includes:

[0028] The extracted floating-point values ​​are cropped to a preset range;

[0029] The cropped values ​​are converted into actual passenger flow using an inverse normalization function.

[0030] The present invention also provides a passenger flow prediction system based on a large language model, the system being used to implement the above method, comprising: a data acquisition module, an extraction module, an input module, and an output module;

[0031] The acquisition module is used to collect historical start and end point related parameters of the target area and to preprocess the related parameters;

[0032] The extraction module is used to perform semantic feature encoding based on the preprocessed relevant parameters and through the prompting process;

[0033] The input module is used to input the encoded semantic features into the large language model to predict the future passenger flow of the origin and destination of the target area;

[0034] The output module is used to output the predicted passenger flow of the origin and destination points of the target area, and to perform inverse normalization processing on the predicted passenger flow.

[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0036] This invention combines a large language model with structured aviation data, leveraging its powerful semantic understanding and reasoning capabilities to automatically extract and integrate key factors influencing passenger flow from multi-source heterogeneous data. In particular, it effectively introduces unstructured textual information that is difficult to quantify in traditional models, thereby significantly improving the accuracy, timeliness, and interpretability of origin-destination passenger flow prediction. This provides airlines with more accurate and reliable data-driven decision support for dynamic capacity allocation, route network optimization, and revenue management. Attached Figure Description

[0037] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Example 1

[0042] like Figure 1 The diagram shown is a schematic representation of the method flow in this embodiment, and the steps include:

[0043] S1. Collect relevant parameters of the historical start and end points of the target area and perform preprocessing.

[0044] This embodiment collects raw flight record data from an international airport in City A, my country, to multiple destination cities to construct a dedicated dataset of historical origin-destination (OD) parameters for air travel in City A. This data includes multi-dimensional information such as flight number, date, flight type, service type, route, and passenger volume. First, the raw data is cleaned, removing non-commercial passenger flight records such as cargo, business jets, and shuttle flights, retaining only valid commercial passenger flight data. Then, the flight-level data is converted into a city-level OD structure by mapping destination airport codes to corresponding city names and merging passenger volumes from multiple airports serving the same city to form a unified city-level passenger flow. To further improve data quality, cities with unstable air services or consistently zero passenger volume are filtered out, ultimately retaining 91 representative destination cities. The data is aggregated weekly to form a weekly time series from week 10 to week 61, with each series corresponding to an OD passenger flow from City A to a destination.

[0045] Based on the constructed OD (Original Demand) passenger flow sequence, multi-source data was integrated to form a comprehensive feature system. This system aims to provide a comprehensive view of market demand drivers by incorporating features across four key dimensions: destination city profile, time and macroeconomic indicators, market interest and city attractiveness, and operational and climate constraints. This multidimensional feature set combines historical passenger flow with a rich set of external drivers to enhance the model's predictive power.

[0046] The passenger flow data for all OD pairs is normalized using Min-Max, scaling it to the [0,1] interval, as shown in the following formula:

[0047]

[0048] Among them, y min and y max These represent the minimum and maximum passenger flow values ​​for the OD pair in the entire dataset, respectively; y represents the original passenger flow value; y scaled This represents the normalized passenger flow value. The normalizer is fitted to the training data and used for the transformation of all subsequent historical data and for the denormalization of the model output.

[0049] S2. The processed parameters are semantically encoded using the prompting process.

[0050] The preprocessed structured data is dynamically converted into structured natural language prompts through prompting engineering, which serve as input to the Large Language Model (LLM). Carefully designed, it comprises distinct parts: a task—clearly defining the model's role as an aviation industry data analyst tasked with predicting next week's air passenger traffic from a specified origin to a destination; context—describing the destination city's overview, including its static attributes; input data; instructions—requiring the model to predict next week's normalized passenger traffic based on all provided information; and response—guiding the LLM's inference process, as detailed below:

[0051] (1) Role: You are a world-leading aviation data scientist and precision forecasting expert. Your task is to apply advanced analytical methods to accurately predict...

[0052] (2) Objective: Predict the normalized air passenger volume for {city} in the week following {current_week_index}, i.e., the value for the future {future} week. Your output must be highly accurate and contain only one value.

[0053] (3) Background and city overview: Insert static description text of the destination city (such as economic indicators, population, etc.).

[0054] (4) Input data: (All features have been normalized to the range [0,1] using Min-Max. If the original values ​​are displayed, it indicates that normalization has been completed.)

[0055] Normalized historical passenger volume (past {length} weeks): {passengers_history_str} (0 represents the historical minimum; 1 represents the historical maximum).

[0056] Aviation Market Index: {market_index_val} (reflects overall market activity).

[0057] (5) Reasoning process: Analyze historical trends, study normalized passenger data over the past {length} weeks, and identify seasonality, periodicity, outliers and trend slope.

[0058] (6) Instruction: Strictly follow the above reasoning process and output only a normalized passenger volume value of {city} after {future} weeks.

[0059] (7) Reply: Reserve a space for LLM to generate the answer.

[0060] This structured approach contextualizes the task, presents all relevant variables in a human-readable format, and restricts the output to a single, parsable numerical value, effectively bridging the gap between multimodal data and text-based predictive models.

[0061] S3. Input the encoded semantic features into the large language model to predict the weekly passenger flow of the origin and destination points of the target area.

[0062] This embodiment uses a single decoder-only Transformer-based Large Language Model (LLM), represented as follows: This paper transforms the task of predicting air traffic origin-destination (OD) passenger volume into a structured language modeling problem. The model receives domain-specific, imperative prompts and generates normalized numerical outputs representing future passenger volume.

[0063] The LLM used in this embodiment follows the standard decoder-only Transformer architecture proposed by Vaswani et al. (2017), and consists of the following parts:

[0064] (1) A tag embedding layer and position encoding;

[0065] (2) Stacked masked multi-head self-attention layers;

[0066] (3) Feedforward layer with residual connections;

[0067] (4) Final normalization and language modeling head;

[0068] For each time step t, the model receives an input sequence x. 1:t The sequence was tokenized and embedded as E t It then generates a probability distribution over the vocabulary for the next tag. The core self-attention mechanism formula is as follows:

[0069]

[0070] in, This represents the projection of input X. Represents a causal mask that enforces autoregressive constraints; d kLet represent the feature dimension of each attention head; T represents the length of the input sequence. In multi-head attention, the attention operation is performed in... The data is executed in parallel and connected on each head.

[0071] This embodiment uses LLaMA-compatible models (e.g., LLaMA-2, LLaMA-3 variants), which are optimized decoder-only Transformers. Compared to the GPT model, LLaMA uses:

[0072] (1) Rotational Position Embedding (RoPE) replaces learned or absolute position encoding;

[0073] (2) The SwiGLU activation function in the feedforward layer;

[0074] (3) Pre-normalization (LayerNorm is performed before each block);

[0075] (4) A high-efficiency tagger based on SentencePiece with byte-level encoding;

[0076] These design choices improve training stability and generalization ability for downstream tasks, especially in the case of low-resource fine-tuning.

[0077] Input prompts The text prompts are constructed using the domain content of the dataset from step S1. The text prompts are tokenized using a SentencePiece-based sub-word tokenizer, which decomposes the input into a discrete sequence of token IDs:

[0078]

[0079] This tagger is pre-trained in conjunction with the underlying LLM and supports robust handling of numbers, punctuation marks, and domain-specific terms such as “passenger volume” and “weather impact”.

[0080] Furthermore, the LLM is trained using a causal language modeling (CLM) objective, in which it learns the next label in the prediction sequence. Let Y be the labeled answer corresponding to the normalized passenger prediction. The training loss is:

[0081]

[0082] To ensure that supervision focuses only on the output (i.e., excluding cues), we apply a loss mask during training, ignoring cue markers. The model is optimized using the AdamW optimizer and a cosine learning rate scheduler. To improve training efficiency on modern accelerators, this embodiment employs mixed-precision training with bfloat16, which accelerates matrix operations without sacrificing numerical stability.

[0083] In order to fine-tune the aerospace forecasting mission This embodiment employs low-rank adaptive (LoRA). It does not update the complete weight matrix. Instead, it introduces two trainable low-rank matrices. and , so that:

[0084]

[0085] in, Typically, r = 8 or 16, which reduces the number of trainable parameters by several orders of magnitude and allows for efficient adaptation on small datasets; This represents the adapted weight matrix; d represents the low-rank adaptation matrix; d represents the dimension of the original weight matrix.

[0086] In this embodiment, LoRA is applied to the self-attention module ( ) and MLP blocks ( The LoRA dropout rate was set to 0.05 to prevent overfitting and improve generalization. All non-LoRA parameters in the backbone LLM were kept frozen.

[0087] S4. Output the weekly passenger flow of the target area's origin and destination points and perform normalization processing.

[0088] During the reasoning process, the model receives prompts. And generate a short text output through greedy decoding:

[0089]

[0090] in, This represents the original text response generated by the model.

[0091] To extract numerical predictions, this embodiment uses a regular expression pattern to identify the first floating-point number in the output. This value is clipped to the interval [0,1] and transformed back to a real-world scale using the inverse of the min-max normalization function:

[0092]

[0093] Final value It represents the predicted number of passengers in city c at week t+1, incorporating all known dynamic and static features up to time t.

[0094] The flowchart of this embodiment is shown below. Figure 1 As shown.

[0095] Example 2

[0096] This embodiment also provides a passenger flow prediction system based on a large language model, including: a collection module, an extraction module, an input module, and an output module; the collection module is used to collect historical origin-destination related parameters of the target area and preprocess the related parameters; the extraction module is used to encode semantic features based on the preprocessed related parameters through prompting engineering; the input module is used to input the encoded semantic features into the large language model to predict the future passenger flow of the origin-destination points of the target area; the output module is used to output the predicted passenger flow of the origin-destination points of the target area and perform inverse normalization processing on the predicted passenger flow.

[0097] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for predicting origin-destination passenger flow based on a large language model, characterized in that, Includes the following steps: S1. Collect historical start and end point related parameters of the target area and preprocess the related parameters; S2. Based on the preprocessed relevant parameters, semantic feature encoding is performed through the prompting process; S3. Input the encoded semantic features into the large language model to predict the future passenger flow at the origin and destination of the target area; S4. Output the predicted passenger flow of the target area's origin and destination points, and perform inverse normalization on the predicted passenger flow.

2. The method for predicting origin-destination passenger flow based on a large language model according to claim 1, characterized in that, Step S1 includes: Based on the collected flight record data, a passenger flow sequence between origin and destination is constructed; Based on the passenger flow sequence from origin to destination, multi-source data is integrated to form a feature system containing multiple dimensions; Based on the origin-destination passenger flow sequence and characteristic system, the passenger flow data is normalized.

3. The method for predicting origin-destination passenger flow based on a large language model according to claim 2, characterized in that, Step S2 includes: Based on the preprocessed structured data, construct structured natural language prompts; Natural language prompts include task description, contextual information, input data, instructions, and response format.

4. The method for predicting origin-destination passenger flow based on a large language model according to claim 3, characterized in that, Step S3 includes: A large language model using a decoder-only Transformer architecture receives natural language prompts; Fine-tuning of a large language model using a low-rank adaptive method; A large language model is trained based on the objective of causal language modeling to generate normalized numerical outputs representing future passenger flow.

5. The method for predicting origin-destination passenger flow based on a large language model according to claim 4, characterized in that, The low-rank adaptive method used in step S3 includes: Introduce trainable low-rank matrices into the self-attention module and feedforward layer of the large language model; Keep the non-low-rank adaptive parameters in the large language model frozen.

6. The method for predicting origin-destination passenger flow based on a large language model according to claim 4, characterized in that, Step S3 also includes: During the reasoning process, text output is generated using a greedy decoding method; Extract the floating-point values ​​representing the predicted passenger flow from the text output.

7. The method for predicting origin-destination passenger flow based on a large language model according to claim 6, characterized in that, Step S4 includes: The extracted floating-point values ​​are cropped to a preset range; The cropped values ​​are converted into actual passenger flow using an inverse normalization function.

8. A passenger flow prediction system based on a large language model, the system being used to implement the method described in any one of claims 1-7, characterized in that, include: Acquisition module, extraction module, input module, and output module; The acquisition module is used to collect historical start and end point related parameters of the target area and to preprocess the related parameters; The extraction module is used to perform semantic feature encoding based on the preprocessed relevant parameters and through the prompting process; The input module is used to input the encoded semantic features into the large language model to predict the future passenger flow of the origin and destination of the target area; The output module is used to output the predicted passenger flow of the origin and destination points of the target area, and to perform inverse normalization processing on the predicted passenger flow.