Bus stop prediction method and system enhanced by fusion of search enhancement and map enhancement

CN122596322APending Publication Date: 2026-08-18YANGTZE NORMAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610737735.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

上述专利方案分别从多源数据融合、集成学习、外部数据源引入等角度优化预测效果,但仍未解决个体行为精细化建模不足、图神经网络数值嵌入与大模型语义框架融合困难、检索增强与图增强机制相互割裂、预测结果缺乏决策依据等核心问题,在复杂时空环境与个体异质性场景下,精度与可靠性仍难以满足智能交通系统的实际部署要求

Benefits of technology

[0050] This invention can provide a refined representation of passengers’ historical travel behavior. By fusing passenger flow spatiotemporal entropy with multidimensional features to form a unified behavior vector, it can fully depict individual travel patterns and implicit attributes, providing stable and reliable feature support for personalized prediction, and making the prediction process fully consistent with the actual travel habits and behavior patterns of individual passengers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596322A_ABST
    Figure CN122596322A_ABST
Patent Text Reader

Abstract

The application discloses a bus drop-off site prediction method and system integrating search enhancement and graph enhancement, and belongs to the technical field of intelligent transportation. By constructing a historical travel database, passenger behavior characteristics are extracted and a site space graph is constructed; similar passengers are matched based on multi-dimensional adaptive similarity to generate search enhancement context; graph attention network is used to complete site space coding and pick-up point semantic enhancement; journey characteristics, search context and graph enhancement information are spliced into prompt words, which are input into a large language model that has been fine-tuned by gradient screening and dynamic anchor point strategy, to generate drop-off site probability distribution and complete prediction. The system includes data processing, similar search, graph enhancement, model fine-tuning, prompt word reasoning and output decoding modules. The application realizes individual travel behavior representation, site space relationship semantic fusion and interpretable prediction, improves the accuracy and robustness of bus drop-off site prediction, and is suitable for intelligent scheduling and operation management of large-scale bus passenger flow in multiple lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, specifically to a method and system for predicting bus stop locations by fusing retrieval enhancement and graph enhancement. Background Technology

[0002] Accurate perception of urban public transport passenger flow is a core prerequisite for network optimization, capacity scheduling, and travel service upgrades. Bus stop prediction, as a key link in extrapolating the spatiotemporal distribution of passenger flow, has long been constrained by issues such as missing card swipe data, significant heterogeneity in individual behavior, and difficulty in modeling complex spatiotemporal dependencies. Traditional solutions often rely on travel chain completion, statistical probability models, or shallow machine learning, which struggle to consider both individual preferences and road network topology, limiting prediction accuracy and generalization ability. With the rapid penetration of graph neural networks, large language models, and retrieval-enhanced generative technologies, traffic prediction is gradually evolving towards personalization and interpretability. However, current technologies have not yet achieved deep synergy between similar passengers' historical experience, station spatial structure, and large-scale model semantic reasoning. There is still significant room for improvement in the accuracy, robustness, and interpretability of bus stop prediction.

[0003] In their paper "Research on Passenger Public Transportation Travel Chain Completion Strategy Based on Public Transport and Subway Combined Travel," published in *Railway Computer Applications*, Vol. 34, No. 8, 2025, Bian Weizhong et al. proposed a transfer chain completion mechanism that integrates bus and subway card swiping data. By combining improved DBSCAN and weighted geometric center optimization for alighting station determination, the accuracy of travel chain completion reached 92.5%, an improvement of more than 10% compared to traditional methods. In their paper "A Method for Estimating Public Transport Passenger Alighting Stations Based on Expanded Historical Travel Records," published in *Journal of Nanjing University (Natural Science Edition)*, Cui Ziwei et al. effectively improved the estimation coverage in scenarios of travel chain breaks by expanding historical travel datasets and integrating similar travel rules of individuals and groups. Zhang et al.'s paper, "Passenger flow prediction for citywide bus stops based on gated multi-graph convolutional network," published in the *Journal of Advanced Transportation* in 2025, constructs a gated multi-graph convolutional network framework to simultaneously capture the spatial relationships and temporal periodic features of bus stops. This reduces the RMSE by 21.98%–29.25% compared to the baseline model across multiple temporal granularities. While these academic studies have made breakthroughs in travel chain completion, historical data utilization, and spatiotemporal graph modeling, they generally suffer from shortcomings such as insufficient mining of individual behavioral features, a disconnect between spatial topology and semantic understanding, a lack of interpretability in the prediction process, and separation of similarity experience retrieval and spatial structure modeling. These deficiencies make it difficult to support the personalized and interpretable prediction needs of large-scale road networks.

[0004] Chinese patent CN116823475A (A method for inferring bus passenger alighting points based on travel chains and ensemble learning) discloses a two-layer framework that integrates multi-source bus data and combines preliminary inference using deterministic algorithms with supplementary inference using ensemble learning, while also incorporating built-up environment and external route information to improve coverage. Chinese patent CN114882693B (A method for predicting bus passenger alighting points based on deep mining of card-swipe data) calculates points by mining the attraction power of high-frequency passenger stops and downstream stops, and constructing a statistical and clustering fusion model. Chinese patent CN114363842B (A method and device for predicting bus passenger alighting points based on mobile phone signaling data) introduces mobile phone signaling data to supplement behavioral characteristics, improving stability in abnormal scenarios. The aforementioned patent solutions optimize prediction results from the perspectives of multi-source data fusion, ensemble learning, and the introduction of external data sources. However, they still fail to address core issues such as insufficient refined modeling of individual behaviors, difficulty in integrating graph neural network numerical embedding with large model semantic frameworks, separation between retrieval enhancement and graph enhancement mechanisms, and lack of decision-making basis for prediction results. In complex spatiotemporal environments and scenarios with individual heterogeneity, the accuracy and reliability still cannot meet the actual deployment requirements of intelligent transportation systems.

[0005] Existing bus stop prediction technologies generally suffer from four major pain points: insufficient utilization of individual behavior, disconnect between spatial relationships and semantic understanding, prediction black box, and separation of retrieval and graph modeling. Neither academic research nor patented technologies have formed a complete solution that integrates the historical experience of similar passengers, spatial relationships of stops, and semantic reasoning of large language models. Summary of the Invention

[0006] Based on the aforementioned technical problems, this application discloses a method and system for predicting bus stop locations by fusing retrieval enhancement and graph enhancement; the method for predicting bus stop locations by fusing retrieval enhancement and graph enhancement specifically includes:

[0007] A historical travel database was constructed, and bus card swiping and QR code scanning data were preprocessed to extract passenger historical travel behavior characteristics and construct a bus stop spatial map.

[0008] Similar passenger retrieval is performed based on passenger behavior vectors, generating enhanced retrieval context;

[0009] A graph attention network is used to encode the site spatial graph to obtain enhanced site graph embeddings and complete the semantic enhancement of the boarding point;

[0010] The current trip features, search enhancement context, and graph enhancement information are concatenated into a prompt word input to a finely tuned large language model, which then generates the probability distribution of the drop-off point to complete the prediction.

[0011] Preferably, the extraction of passenger historical travel behavior features specifically includes:

[0012] For each passenger's travel record, a frequency distribution is constructed with departure station and departure time as dimensions, and the distribution entropy of departure station is calculated for each. Entropy of departure time distribution ;

[0013] Site distribution entropy With time period distribution entropy The passenger flow spatiotemporal entropy is obtained by weighting and fusing the data according to preset weights. ,in For site distribution entropy weights, The weights are the time-period distribution entropy weights, and ;

[0014] Statistics on passenger travel origin-destination (OD) matrix, average daily number of trips, peak hour travel rate, and off-peak travel rate;

[0015] Unsupervised clustering is performed based on passengers' card swiping frequency and route preferences to obtain passengers' implicit static attribute labels;

[0016] Passenger flow spatiotemporal entropy, OD matrix features, frequency features, time period proportion features, and implicit static attribute labels are concatenated and fused into a dense behavior vector of fixed dimensions. .

[0017] Preferably, the similar passenger retrieval based on passenger behavior vectors employs a multi-dimensional adaptive fusion comprehensive similarity calculation, as shown in the formula: ,in, Let be the current passenger's behavior vector. For historical passenger behavior vectors; The adaptive weight coefficients for each similarity component are dynamically calculated by a feedforward neural network based on historical matching data, and satisfy the following conditions: ; To calculate behavioral similarity based on the spatiotemporal entropy of passenger flow, cosine similarity is used. and The degree of matching of spatiotemporal entropy-related features of medium passenger flow; For spatiotemporal similarity, calculate the normalized matching degree between the current trip and the historical boarding station distance and boarding time difference; For contextual similarity, match the consistency of environmental features such as route, weather, and holidays of the trip.

[0018] Preferably, the generation of the retrieval enhancement context specifically includes:

[0019] based on Sort historical passengers and filter the set of candidate passengers whose similarity is higher than a preset threshold;

[0020] From the candidate passenger set, further filter travel records that are on the same route and at the same boarding point as the current itinerary, with a boarding time difference of no more than 30 minutes, and whose travel time is within the past 30 days;

[0021] Extract the following information from the filtered records: boarding station, alighting station, boarding time, alighting time, trip duration, weather type, and holiday information.

[0022] The frequency distribution of drop-off points, the mean and standard deviation of travel time are statistically analyzed, and the above information is organized into structured text to form a search-enhanced context.

[0023] Preferably, the construction of the bus stop spatial map specifically includes:

[0024] Define a directed graph ,in It is a set of nodes for bus stops, where each node corresponds to one bus stop; It is a set of directed edges, containing two types of edges: operational connection edges and geographical adjacency edges;

[0025] The operation connection edge connects two adjacent stations in the same direction on the same bus route. The direction of the edge is consistent with the operation direction of the bus route, and the initial weight of the edge is the operation frequency of the route.

[0026] The geographically adjacent edges connect different bus stops with a walking distance less than a preset distance threshold or shared bus stops. The initial weight of the edge is the reciprocal of the walking distance between the stops.

[0027] The static attributes, operational attributes, and passenger flow attributes of each station are used as node features, along with the node set. Associated storage.

[0028] Preferably, the encoding of the site spatial graph using a graph attention network specifically includes:

[0029] Initialize the initial feature vectors of each site node. The static attributes, operational attributes, and passenger flow attributes of the site are concatenated into an initial feature vector;

[0030] In the graph attention network Layer, compute node With all its first-order neighbor nodes Attention coefficient The formula is: ,in, For nodes The set of its first-order neighbors; For the first Layer weight matrix; For the first The attention weight vector of the layer; This is a vector concatenation operation;

[0031] The node feature vector is updated based on the attention coefficient, using the following formula: ,in, It is a non-linear activation function;

[0032] After encoding through a multi-layer graph attention network, the final embedding vectors of each site are obtained. The embedding vectors of the current boarding stations are converted into natural language descriptions, thus completing the semantic enhancement of the boarding points.

[0033] Preferably, the selection of the training set for fine-tuning the large language model adopts the gradient distribution adaptive criterion, and the selection formula is as follows: ,in, The selected training subset; For sample index; For the first The loss function corresponding to each sample affects the model parameters. The gradient; Let L2 be the norm of the vector; The first of the gradient norm distributions Quantiles This is the preset filtering ratio parameter; The total number of samples in the original training set;

[0034] During the screening process, the gradient norm is calculated for each sample in the original training set, and only samples with a gradient norm greater than that quantile are retained to form a training subset for fine-tuning.

[0035] Preferably, the fine-tuning of the large language model adopts a dynamic evolution anchor point interpolation strategy, the formula of which is: ,in, For the first Model parameters for the next iteration; For the first The target model parameters for the next iteration; These are the initial anchor point parameters before model fine-tuning; For parameters The output distribution of the time model; For parameters The output distribution of the time model; The output distribution of the model to be optimized; Let KL divergence be the denominator. The preset distribution constraint threshold; For the first The evolution coefficients of the next iteration And it monotonically approaches 1 as the number of iterations increases; For training subsets;

[0036] During fine-tuning, each iteration ensures that the KL divergence between the current model distribution and the previous model distribution does not exceed a threshold. Under the constraints, the KL divergence between the target distribution and the weighted average distribution is minimized to achieve incremental model updates.

[0037] Preferably, the step of concatenating the current trip features, retrieval enhancement context, and graph enhancement information into prompt words, and inputting them into a fine-tuned large language model for prediction, specifically includes:

[0038] The boarding station, boarding time, route information, weather information, and holiday information of the current trip will be used as the characteristics of the current trip.

[0039] The structured text of the search enhanced context and the site map enhanced with the corresponding semantic description are concatenated with the current trip features to construct structured prompt words containing instructions, inputs and reference information;

[0040] Input the prompt words into the finely tuned large language model, and the model outputs text containing the predicted drop-off point, the corresponding probability distribution, and the basis for the prediction.

[0041] Parse the JSON-formatted prediction results from the output text to extract the drop-off stations and their probabilities. If the model output does not conform to the JSON format or there are no valid prediction results, fall back to the drop-off station distribution obtained from the enhanced context statistics and take the station with the highest probability as the prediction result.

[0042] A bus stop prediction system that integrates retrieval enhancement and graph enhancement includes:

[0043] The historical travel data processing module cleans and preprocesses bus card swiping and QR code scanning data, extracts passenger historical travel behavior characteristics, and constructs a bus stop spatial map.

[0044] The similar passenger retrieval module stores a passenger behavior vector library, calculates and matches similar passengers based on multi-dimensional adaptive fusion of comprehensive similarity, and generates retrieval enhancement context;

[0045] The site graph enhancement module extracts the static, operational, and initial passenger flow features of the site, uses a graph attention network to generate site embedding vectors, and converts the boarding site embeddings into natural language descriptions to complete the semantic enhancement of the boarding point.

[0046] The large language model fine-tuning module selects a training subset based on the gradient distribution adaptive criterion and uses a dynamic evolution anchor point interpolation strategy to fine-tune the large language model.

[0047] The prompt word construction and reasoning module concatenates the current trip features, retrieval enhancement context, and graph enhancement information into structured prompt words, which are then input into the fine-tuned large language model to perform reasoning.

[0048] The output decoding module parses the prediction results in JSON format from the model's output text. When the output is abnormal, it falls back to the distribution of drop-off stations in the enhanced context as the prediction result.

[0049] Compared with the prior art, the technical solution of this application has the following technical effects:

[0050] This invention can provide a refined representation of passengers’ historical travel behavior. By fusing passenger flow spatiotemporal entropy with multidimensional features to form a unified behavior vector, it can fully depict individual travel patterns and implicit attributes, providing stable and reliable feature support for personalized prediction, and making the prediction process fully consistent with the actual travel habits and behavior patterns of individual passengers.

[0051] This invention enables efficient retrieval and effective utilization of similar passenger travel experiences. By using multi-dimensional adaptive similarity calculation, it accurately matches passengers with similar behaviors and extracts historical travel records that are suitable for the current itinerary, providing real and traceable contextual basis for prediction and ensuring that the prediction results are fully supported by historical experience.

[0052] This invention fully models the spatial topological relationships of bus stops, generates station embedding vectors through graph attention networks and completes semantic enhancement, transforming the geographical and operational associations of stations into semantic information that can be understood by large models, thus achieving a natural integration of spatial structural information and semantic reasoning process.

[0053] This invention leverages an optimized large language model to achieve stable inference and standardized output. It achieves efficient model fine-tuning through gradient filtering and dynamic anchor point strategies. Combined with structured prompts and anomaly rollback mechanisms, it ensures that the prediction results are formatted correctly and logically clear, while improving the robustness and practicality of the overall prediction process.

[0054] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.

[0055] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0057] Based on the description of the figures and their corresponding technical content in the document, the titles of the figures are as follows:

[0058] Figure 1 This is a flowchart illustrating the overall process of predicting bus stop locations using a large-scale model that integrates retrieval enhancement and graph enhancement, as described in this invention.

[0059] Figure 2 This is a detailed flowchart of the construction and feature encoding of the historical travel database of the present invention;

[0060] Figure 3 This is a complete execution flowchart of the similar passenger retrieval enhancement module of the present invention;

[0061] Figure 4 This is a flowchart illustrating the specific implementation of the site map embedding enhancement module of the present invention.

[0062] Figure 5 This is a complete flowchart of the large language model fine-tuning and inference decoding of the present invention;

[0063] Figure 6 This is a diagram illustrating the architecture of the bus stop prediction system that integrates retrieval enhancement and graph enhancement large-scale models according to the present invention. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.

[0065] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0066] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0067] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.

[0068] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.

[0069] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.

[0070] Example 1

[0071] This embodiment mainly describes a bus stop prediction method that combines retrieval enhancement and graph enhancement, such as... Figure 1 As shown, it specifically includes:

[0072] By retrieving the historical travel records of similar passengers as contextual knowledge and using graph neural networks to extract station spatial relationships, the large language model is guided to generate a reasonable distribution of drop-off stations, thereby improving prediction accuracy and interpretability, as shown in Figure 1.

[0073] Historical travel database construction and feature encoding: collect bus card swiping / QR code scanning data, extract passengers' historical travel records, and construct passenger behavior vectors and station spatial maps.

[0074] For the current passenger (or the current trip), retrieve the Top-K passengers with the highest behavioral similarity from the historical passenger database, and extract their drop-off station records at the same boarding point and in adjacent time windows to form a retrieval context.

[0075] Construct a spatial graph with bus stops as nodes and geographical / operational relationships between stops as edges. Use a graph attention neural network to calculate the graph-enhanced embedding vector for each stop and fuse it with the boarding point vector.

[0076] An adaptive gradient-aware data strategy is used to select training data, and a progressive stability optimization strategy is used to fine-tune the large language model.

[0077] The retrieved context, graph-enhanced station embeddings, and current trip features are concatenated into prompt words, which are then input into a large language model to generate a probability distribution of drop-off stations, thus achieving end-to-end drop-off station prediction.

[0078] Furthermore, the construction and feature encoding of the historical travel database consists of data processing, historical travel behavior feature filtering, and the construction of a route and station spatial map. The overall process is as follows: Figure 2 As shown.

[0079] Collect complete card swipe / QR code scanning records of bus passengers. Each record must include at least the passenger boarding record, vehicle GPS location, and timetable. Clean up abnormal records such as short-term repeated card swipes within the threshold range.

[0080] For each passenger, the following features are statistically analyzed according to a preset time window: (1) Spatiotemporal entropy: the entropy value of the departure station distribution and the entropy value of the departure time distribution according to a preset granularity (e.g., 15 minutes). (2) OD matrix: the frequency of boarding and alighting stations. (3) Frequency features: the average number of trips per day, the proportion of trips during preset peak hours and off-peak hours. (4) Static attributes: the latent features of passengers are obtained by clustering according to the travel time patterns of passenger types (students / office workers / elderly). The above features are combined and concatenated into a dense vector P (dimension adjustable).

[0081] Define a directed graph G=(V,E), where V is the set of bus stops and E is the set of extended routes. E consists of operational connection edges formed by adjacent stops on the same route traveling in the same direction, and geographically adjacent edges between any two stops where the walking distance is less than a threshold d or where they share the same bus stop. Edge weights are calculated using an adaptive graph attention neural network.

[0082] Furthermore, the overall process comprises a passenger behavior vector library, query vector generation, similar passenger retrieval, and retrieval context extraction, as follows: Figure 3 As shown.

[0083] Use a vector database to store the behavior vectors P of all passengers and update them regularly (daily increments).

[0084] If the current passenger exists in the historical database, their latest behavior vector is used directly.

[0085] If the passenger is new, the current single trip features plus the default feature population prototype vector are used. Trip features include: boarding station ID, boarding time (day of the week, hour), and whether it is a holiday. These features are mapped to dense vectors and then weighted and averaged with the default feature population prototype vector.

[0086] In public transport origin-destination (OD) prediction, passenger travel similarity is measured across multiple dimensions, including boarding station matching, time matching, behavioral pattern matching, and destination station matching. A single dimension is insufficient to characterize this similarity. Therefore, a multi-dimensional adaptive fusion comprehensive similarity measurement method between passenger p and search candidate r is proposed, with the formula: Among them, behavioral similarity It is based on semantic similarity derived from passenger flow spatiotemporal entropy, frequency characteristics, and travel preferences. Spatiotemporal similarity Calculated based on travel time and destination. Contextual similarity. Weights are calculated based on the matching degree of weather, holidays, and weekdays. It is adaptively computed by a feedforward neural network.

[0087] Furthermore, for the K similar passengers retrieved, records in their historical travel history that meet the following conditions are selected:

[0088] The boarding station is the same as the current boarding station.

[0089] The difference between the boarding time and the current boarding time is ≤30 minutes (dynamic window, which can be adjusted according to the passenger flow of the station).

[0090] Records generated within the last 30 days (time decay bonus: the more recent, the higher the weight).

[0091] For each record that meets the criteria, extract the following fields: start_stop, end_stop, start_time, duration, day_of_week, holiday, and weather. Sort these records in reverse chronological order, retaining a maximum of L records (L=20), and simultaneously calculate the following indicators: (1) Destination distribution: frequency histogram of end_stop (normalized to probability); (2) Trip duration statistics: mean and standard deviation; (3) Time offset pattern: list of minute differences between actual departure time and current time. These statistics, along with the original records, constitute the retrieval context.

[0092] Furthermore, by acquiring initial site features, site codes, and adding strong boarding site semantic levels, the overall process is shown in Figure 4.

[0093] The features of each station i include: (1) Static features: the area it belongs to (business district / residential / school / industrial zone, one-hot encoding), station capacity (number of platforms), and whether it is a transfer hub; (2) Operational features: the number of routes it passes through and the average departure interval; (3) Passenger flow features: the historical daily average boarding / disembarking passenger flow (normalized). All features are concatenated into a vector X with dimension d.

[0094] The graph neural network encoding uses a multi-layer graph attention network (GAT) to compute the final embedding vector E for each station: ,in for The attention coefficients of the layer network, in the graph attention network. Layer, compute node With all its first-order neighbor nodes Attention coefficient The formula is: ,in, For nodes The set of its first-order neighbors; For the first Layer weight matrix; For the first The attention weight vector of the layer; This is a vector concatenation operation; It is a set containing station i and its first-order neighbors. After L layers (which can be set), the station embedding vector is obtained. .

[0095] For the current boarding point Take its GNN embedding The embedding is mapped to a set of semantically discrete labels through a multi-class neural network, which serve as natural language label indexes, thereby generating a natural language description.

[0096] Furthermore, large language model prediction enables fine-tuning and inference of the large model, with the process as follows: Figure 5 As shown;

[0097] The structured prompt is constructed, containing three parts: (1) the current trip context; (2) the search enhancement context (a summary of similar passenger history records); and (3) the graph-enhanced spatial relationships (providing spatial descriptions of candidate stations). The final prompt template is as follows:

[0098] Based on the following information, the public transport passenger flow prediction expert predicts the most likely alighting point for the current passenger (multiple candidates and their probabilities can be output).

[0099] [Current Trip] {current_trip_info}

[0100] [Similar Passenger History Reference] {retrieval_context}

[0101] [Point Spatial Relationships] {graph_enhanced_description}

[0102] Please output the result in JSON format:

[0103] "predictions": [

[0104] {"stop_id": "xxx", "probability": 0.xx, "reason": "brief reason"},

[0105] The selection and fine-tuning of large language models are as follows:

[0106] Base model: A lightweight LLM is selected to ensure controllable inference latency.

[0107] Fine-tuning strategy: The fine-tuning dataset is constructed from historical travel records, with each sample containing (current features, retrieval context, graph augmentation description, and actual drop-off station label). After training for one epoch using the candidate data, the gradient of each sample is extracted. A subset is selected based on the gradient distribution adaptive criterion, and only this selected subset is used for formal fine-tuning. The formula is as follows:

[0108]

[0109] An adaptive selection criterion is described, namely, the selected subset is all samples that satisfy the following condition: the gradient norm of the sample is greater than or equal to the (1-p) quantile of the gradient norm distribution of all samples.

[0110] An anchor point is interpolated between the fine-tuned model and the frozen reference model. Each update explicitly controls the update magnitude of the fine-tuned model by dynamically evolving towards the anchor point. This transforms global fine-tuning into a series of local trust domain updates in the solution space. When LLM learns both "retrieval context" and "graph augmentation information" simultaneously, its updates are confined to a small region while being pulled towards a dynamic goal of "gradually sliding from the current model to the reference model." This achieves a progressive update that learns new knowledge without forgetting old knowledge. The specific dynamic evolution anchor point interpolation formula is as follows: ,in, , when

[0111] Extract JSON from the text generated by LLM and parse it to obtain the probability of each candidate site. If the model output does not conform to the format or is a hallucination, it falls back to the retrieval statistics distribution (i.e., uses the endpoint distribution of the retrieval context as the final prediction) to ensure robustness.

[0112] This implementation captures individual passenger travel preferences, leverages the historical experience of similar passengers to support predictions, fully models the spatial topology of stations through graph attention networks and achieves semantic fusion, and the optimized and fine-tuned large language model can output a standardized and reliable probability distribution of alighting stations. It has good interpretability and robustness, is adaptable to multi-line and multi-passenger scenarios, and can be quickly deployed in intelligent transportation systems to meet the actual needs of refined and intelligent public transportation operations.

[0113] Example 2 describes in detail a bus stop prediction system that integrates retrieval enhancement and graph enhancement, such as... Figure 6 As shown, it includes:

[0114] The historical travel data processing module cleans and preprocesses bus card swiping and QR code scanning data, extracts passenger historical travel behavior characteristics, and constructs a bus stop spatial map.

[0115] The similar passenger retrieval module stores a passenger behavior vector library, calculates and matches similar passengers based on multi-dimensional adaptive fusion of comprehensive similarity, and generates retrieval enhancement context;

[0116] The site graph enhancement module extracts the static, operational, and initial passenger flow features of the site, uses a graph attention network to generate site embedding vectors, and converts the boarding site embeddings into natural language descriptions to complete the semantic enhancement of the boarding point.

[0117] The large language model fine-tuning module selects a training subset based on the gradient distribution adaptive criterion and uses a dynamic evolution anchor point interpolation strategy to fine-tune the large language model.

[0118] The prompt word construction and reasoning module concatenates the current trip features, retrieval enhancement context, and graph enhancement information into structured prompt words, which are then input into the fine-tuned large language model to perform reasoning.

[0119] The output decoding module parses the prediction results in JSON format from the model's output text. When the output is abnormal, it falls back to the distribution of drop-off stations in the enhanced context as the prediction result.

[0120] Furthermore, the historical travel data processing module is responsible for collecting multi-source data such as bus card swiping, QR code scanning, vehicle GPS, and timetables. It cleans abnormal records such as repeated card swiping within a short period of time, extracts passenger flow spatiotemporal entropy, OD matrix, frequency features, and implicit static attributes, and integrates them to generate dense behavior vectors. At the same time, it constructs a directed spatial graph with bus stops as nodes and operational and geographical relationships as edges, and calculates the adaptive weights of the edges.

[0121] Furthermore, the similar passenger retrieval module has a built-in vector database that updates the behavior vectors of all passengers incrementally every day. It generates corresponding query vectors for the current passenger (including new passengers), calculates the matching degree with historical passengers through a multi-dimensional adaptive fusion comprehensive similarity formula, filters similar passengers, extracts travel records from the same boarding point, the nearest time window, and the last 30 days, and statistically analyzes relevant indicators and organizes them into a structured retrieval context.

[0122] Furthermore, the site map enhancement module extracts the static attributes, operational attributes, and passenger flow attributes of each site and concatenates them into an initial feature vector. It then uses a multi-layer graph attention network to encode the site spatial map, updates the node features by calculating the attention coefficient, and obtains the final site embedding vector. Finally, it uses a multi-class neural network to convert the boarding point embedding into a natural language description to meet the semantic input requirements of large models.

[0123] Furthermore, the large language model fine-tuning module uses a lightweight large language model as its foundation, selects a training subset based on the gradient distribution adaptive criterion, and fine-tunes the model through a dynamic evolution anchor point interpolation strategy. This ensures that the model does not forget old knowledge while learning new knowledge, and guarantees controllable inference latency. The prompt word construction and inference module uses a preset template to concatenate current journey features, retrieval context, and graph-enhanced semantic descriptions to generate structured prompt words, which are then input into the fine-tuned large model for inference.

[0124] Furthermore, the output decoding module is responsible for parsing the text output by the large model, extracting the drop-off stations and probability information in JSON format. When there are format errors or illusions in the model output, it automatically falls back to the drop-off station distribution statistically obtained from the retrieval context to ensure the robustness of the prediction results. All modules work together to achieve personalized, interpretable, and highly reliable bus drop-off station predictions.

[0125] This embodiment, through the collaborative work of various modules, can accurately capture individual passenger travel preferences, make full use of the historical experience of similar passengers and the spatial topology of stations, and output standardized and reliable prediction results through optimized and fine-tuned large model. It has good interpretability and robustness, is adaptable to multi-line and multi-passenger scenarios, and can be quickly deployed in intelligent transportation systems to meet the needs of refined and intelligent public transportation operations.

[0126] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter changes made to these embodiments within the spirit and principles of the present invention, without departing from the principles and spirit of the present invention, through conventional substitutions or to achieve the same function, fall within the scope of protection of the present invention.

Claims

1. A method for predicting bus stop locations by integrating retrieval enhancement and graph enhancement large-scale models, characterized in that, include: A historical travel database was constructed, and bus card swiping and QR code scanning data were preprocessed to extract passenger historical travel behavior characteristics and construct a bus stop spatial map. Similar passenger retrieval is performed based on passenger behavior vectors, generating enhanced retrieval context; A graph attention network is used to encode the site spatial graph to obtain enhanced site graph embeddings and complete the semantic enhancement of the boarding point; The current trip features, search enhancement context, and graph enhancement information are concatenated into a prompt word input to a finely tuned large language model, which then generates the probability distribution of the drop-off point to complete the prediction.

2. The method according to claim 1, characterized in that, The extraction of passengers' historical travel behavior features specifically includes: For each passenger's travel record, a frequency distribution is constructed with departure station and departure time as dimensions, and the distribution entropy of departure station is calculated for each. Entropy of departure time distribution ; Site distribution entropy With time period distribution entropy The passenger flow spatiotemporal entropy is obtained by weighting and fusing the data according to preset weights. ,in For site distribution entropy weights, The weights are the time-period distribution entropy weights, and ; Statistics on passenger travel origin-destination (OD) matrix, average daily number of trips, peak hour travel rate, and off-peak travel rate; Unsupervised clustering is performed based on passengers' card swiping frequency and route preferences to obtain passengers' implicit static attribute labels; Passenger flow spatiotemporal entropy, OD matrix features, frequency features, time period proportion features, and implicit static attribute labels are concatenated and fused into a dense behavior vector of fixed dimensions. .

3. The method according to claim 2, characterized in that, The similar passenger retrieval based on passenger behavior vectors employs a multi-dimensional adaptive fusion comprehensive similarity calculation, using the following formula: ,in, Let be the current passenger's behavior vector. For historical passenger behavior vectors; The adaptive weight coefficients for each similarity component are dynamically calculated by a feedforward neural network based on historical matching data, and satisfy the following conditions: ; To calculate behavioral similarity based on the spatiotemporal entropy of passenger flow, cosine similarity is used. and The degree of matching of spatiotemporal entropy-related features of medium passenger flow; For spatiotemporal similarity, calculate the normalized matching degree between the current trip and the historical boarding station distance and boarding time difference; For contextual similarity, match the consistency of environmental features such as route, weather, and holidays of the trip.

4. The method according to claim 3, characterized in that, The generation of the retrieval enhancement context specifically includes: based on Sort historical passengers and filter the set of candidate passengers whose similarity is higher than a preset threshold; From the candidate passenger set, further filter travel records that are on the same route as the current itinerary, at the same boarding point, with a boarding time difference of no more than 30 minutes, and whose travel time is within the past 30 days; Extract the following information from the filtered records: boarding station, alighting station, boarding time, alighting time, trip duration, weather type, and holiday information. The frequency distribution of drop-off points, the mean and standard deviation of travel time are statistically analyzed, and the above information is organized into structured text to form a search-enhanced context.

5. The method according to claim 1, characterized in that, The construction of the bus stop spatial map specifically includes: Define a directed graph ,in It is a set of nodes for bus stops, where each node corresponds to one bus stop; It is a set of directed edges, containing two types of edges: operational connection edges and geographical adjacency edges; The operation connection edge connects two adjacent stations in the same direction on the same bus route. The direction of the edge is consistent with the operation direction of the bus route, and the initial weight of the edge is the operation frequency of the route. The geographically adjacent edges connect different bus stops with a walking distance less than a preset distance threshold or shared bus stops. The initial weight of the edge is the reciprocal of the walking distance between the stops. The static attributes, operational attributes, and passenger flow attributes of each station are used as node features, along with the node set. Associated storage.

6. The method according to claim 5, characterized in that, The method of encoding the site spatial graph using a graph attention network specifically includes: Initialize the initial feature vectors of each site node. The static attributes, operational attributes, and passenger flow attributes of the site are concatenated into an initial feature vector; In the graph attention network Layer, compute node With all its first-order neighbor nodes Attention coefficient The formula is: ,in, For nodes The set of its first-order neighbors; For the first Layer weight matrix; For the first The attention weight vector of the layer; This is a vector concatenation operation; The node feature vector is updated based on the attention coefficient, using the following formula: ,in, It is a non-linear activation function; After encoding through a multi-layer graph attention network, the final embedding vectors of each site are obtained. The embedding vectors of the current boarding stations are converted into natural language descriptions, thus completing the semantic enhancement of the boarding points.

7. The method according to claim 1, characterized in that, The selection of the training set for fine-tuning the large language model adopts an adaptive gradient distribution criterion, and the selection formula is as follows: ,in, The selected training subset; For sample index; For the first The loss function corresponding to each sample affects the model parameters. The gradient; Let L2 be the norm of the vector; The first of the gradient norm distributions Quantiles This is the preset filtering ratio parameter; The total number of samples in the original training set; During the screening process, the gradient norm is calculated for each sample in the original training set, and only samples with a gradient norm greater than that quantile are retained to form a training subset for fine-tuning.

8. The method according to claim 7, characterized in that, The fine-tuning of the large language model adopts a dynamic evolution anchor point interpolation strategy, with the following formula: ,in, For the first Model parameters for the next iteration; For the first The target model parameters for the next iteration; These are the initial anchor point parameters before model fine-tuning; For parameters The output distribution of the time model; For parameters The output distribution of the time model; The output distribution of the model to be optimized; Let KL divergence be the denominator. The preset distribution constraint threshold; For the first The evolution coefficients of the next iteration And it monotonically approaches 1 as the number of iterations increases; For training subsets; During fine-tuning, each iteration ensures that the KL divergence between the current model distribution and the previous model distribution does not exceed a threshold. Under the constraints, the KL divergence between the target distribution and the weighted average distribution is minimized to achieve incremental model updates.

9. The method according to claim 1, characterized in that, The process of concatenating current trip features, retrieval enhancement context, and graph enhancement information into prompt words, and inputting them into a fine-tuned large language model for prediction, specifically includes: The boarding station, boarding time, route information, weather information, and holiday information of the current trip will be used as the characteristics of the current trip. The structured text of the search enhanced context and the site map enhanced with the corresponding semantic description are concatenated with the current trip features to construct structured prompt words containing instructions, inputs and reference information; Input the prompt words into the finely tuned large language model, and the model outputs text containing the predicted drop-off point, the corresponding probability distribution, and the basis for the prediction. Parse the JSON-formatted prediction results from the output text to extract the drop-off stations and their probabilities. If the model output does not conform to the JSON format or there are no valid prediction results, fall back to the drop-off station distribution obtained from the enhanced context statistics and take the station with the highest probability as the prediction result.

10. A bus stop prediction system integrating retrieval enhancement and graph enhancement large-scale models, characterized in that, include: The historical travel data processing module cleans and preprocesses bus card swiping and QR code scanning data, extracts passenger historical travel behavior characteristics, and constructs a bus stop spatial map. The similar passenger retrieval module stores a passenger behavior vector library, calculates and matches similar passengers based on multi-dimensional adaptive fusion of comprehensive similarity, and generates retrieval enhancement context; The site graph enhancement module extracts the static, operational, and initial passenger flow features of the site, uses a graph attention network to generate site embedding vectors, and converts the boarding site embeddings into natural language descriptions to complete the semantic enhancement of the boarding point. The large language model fine-tuning module selects a training subset based on the gradient distribution adaptive criterion and uses a dynamic evolution anchor point interpolation strategy to fine-tune the large language model. The prompt word construction and reasoning module concatenates the current trip features, retrieval enhancement context, and graph enhancement information into structured prompt words, which are then input into the fine-tuned large language model to perform reasoning. The output decoding module parses the prediction results in JSON format from the model's output text. When the output is abnormal, it falls back to the distribution of drop-off stations in the enhanced context as the prediction result.

Citation Information

Patent Citations

  • Method and Device for Predicting Bus Passenger Drop-off Points Based on Mobile Phone Signaling Data

    CN114363842B

  • A method for predicting bus passenger alighting points based on deep mining of card swipe data

    CN114882693B

  • Bus passenger getting-off station inference method based on trip chain and ensemble learning

    CN116823475A