A bus line intelligent recommendation method, system, device and medium
Patent Information
- Application Number
- CN202610997658.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]本发明的目的是提供一种公交线路智能推荐方法、系统、设备及介质,以解决现有技术存在的公交路网站点与线路的二元关联能力弱、对应的图学习模型适应性差、无法精准捕捉线路与站点的耦合关系、容易出现最优路径漏筛、次优路径优先推荐、推荐准确率与稳定性不足的问题
[0028]本发明深度融合静态路网数据与动态运营数据,并设计三矩阵生成与三分支图卷积融合的新型学习架构,从邻接交互、站点共现和线路共现三个维度综合学习嵌入表示,有效克服了现有图学习模型对深层次拓扑关联捕捉能力不足、对动态场景适配性差的缺陷,
Smart Images

Figure CN122964353A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation information technology, and in particular relates to a method, system, device and medium for intelligent recommendation of bus routes. Background Technology
[0002] Existing public transport network modeling technologies mostly adopt traditional topological network modeling methods, constructing a graph model of a single node (isomorphic node graph model) with bus stops as individual nodes and the connecting road segments between stops as edges. This modeling method has a simple structure and easy-to-understand computational logic, and can adapt to the path retrieval needs of early small-scale public transport networks. However, it has obvious technical shortcomings, including: 1) The isomorphic node graph model cannot directly distinguish the relationship between bus stops and bus routes. In scenarios where different routes share the same stop or multiple bus routes run parallel in the same section, problems such as confusion of topological relationships and unclear semantics of feature learning are very likely to occur; 2) The isomorphic node graph model lacks a precise characterization mechanism for bus transfer relationships. It can only support the feasibility of transfers under the condition of station overlap, and it is difficult to generate optimized transfer routes by utilizing the core features of bus stops and bus routes themselves (such as station passenger flow, route congestion, etc.).
[0003] Meanwhile, the existing mainstream bus route recommendation algorithms are mainly divided into three categories: (1) Recommendation methods based on traditional shortest path or time algorithms. These methods take travel distance and travel time as the single optimization objective. The algorithm has high computational efficiency, but it is very easy to produce recommendation results of "shortest path but complicated transfer", which reduces the passenger's travel experience. (2) Recommendation methods based on statistical rules or statistical machine learning. These methods are in line with users' travel habits to a certain extent, but they have problems such as rigid rules and extremely poor flexibility. In particular, they cannot adapt to dynamic scenarios such as new routes, road construction, and emergencies, and are difficult to adapt to the dynamic changes of urban bus network. (3) Recommendation methods based on graph learning. These methods transform the bus network into graph structure data. The current mainstream method is to complete the learning and recommendation through isomorphic graph neural network models. It is difficult to deeply integrate the deep topological relationships of the bus network, especially the ability to capture the coupling relationship between bus stops and routes is insufficient.
[0004] In summary, existing technologies suffer from numerous problems, such as weak public transport network modeling capabilities, lack of effective binary relationships, and poor dynamic adaptability. These shortcomings make it difficult to meet the current demand for refined, intelligent, and personalized travel recommendations in smart public transport. New modeling and intelligent recommendation methods are urgently needed to address these technical deficiencies. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, device, and medium for intelligent bus route recommendation, in order to solve the problems of weak binary association between bus route stops and routes, poor adaptability of the corresponding graph learning model, inability to accurately capture the coupling relationship between routes and stops, easy omission of optimal paths, priority recommendation of suboptimal paths, and insufficient recommendation accuracy and stability in the existing technology.
[0006] To achieve the above objectives, the present invention provides a method for intelligent recommendation of bus routes, comprising:
[0007] S1: Obtain basic public transport data, which includes static road network data and dynamic operation data;
[0008] S2: Based on the basic bus data, construct a two-part bus graph G=(S∪L,E), where S is the set of bus stop nodes, L is the set of bus route nodes, and E is the set of edges;
[0009] S3: Based on the passenger's input of the origin and destination stations, dynamically extract the corresponding sub-graphs from the bus bi-graph;
[0010] S4: Based on the extracted bipartite subgraph, generate the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix. Input the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix into the first graph convolutional learning module, the second graph convolutional learning module, and the third graph convolutional learning module, respectively, for embedding representation learning to obtain the embedding representation vector corresponding to each graph convolutional learning module.
[0011] S5: Fuse the embedding representation vectors of each graph convolutional learning module separately, use the fused embedding representation vector as feature input, calculate the recommendation score of the candidate route, and output several recommended routes in descending order of score.
[0012] Optionally, the static road network data in step S1 may include at least the numbers of all bus routes in the city, their routes, the coordinates of bus stops, and the route information at each stop.
[0013] Optionally, the dynamic operation data in step S1 may include at least the departure frequency of each route, real-time vehicle speed, road congestion level, historical travel time, average waiting time, passenger congestion level, and temporary route adjustment information.
[0014] Optionally, step S2 further includes constructing a virtual transfer association edge, which connects bus stop nodes or bus line nodes corresponding to routes that can transfer to each other at the same station, and marks transfer attribute information, which includes at least one of transfer distance, number of transfers, waiting time, and congestion level.
[0015] Optionally, in step S4, the first graph convolutional learning module performs graph convolutional learning based on the adjacency matrix and outputs the embedding representation vectors of stations and routes for the specified travel plan; the second graph convolutional learning module performs graph convolutional learning based on the station co-occurrence matrix and outputs the embedding representation vectors of all candidate stations; and the third graph convolutional learning module performs graph convolutional learning based on the route co-occurrence matrix and outputs the embedding representation vectors of all candidate routes.
[0016] Optionally, each graph convolutional learning module can be trained jointly to optimize the sorting of positive and negative samples using the BPR loss function.
[0017] Optionally, the calculation process for the recommendation score of the candidate route in step S5 specifically includes:
[0018]
[0019] In the formula, As the starting station, For the destination station, The site embedding vectors learned and fused by the learning module. The line embedding vectors learned and fused by the learning module. This is a matrix transpose operation. Represents any possible transit point between the originating station and the destination station.
[0020] Secondly, to achieve the above objectives, the present invention provides an intelligent bus route recommendation system, comprising:
[0021] The data acquisition module is used to acquire basic public transport data, which includes static road network data and dynamic operation data.
[0022] The bipartite graph construction module is used to construct a bipartite bus graph G=(S∪L,E) based on basic bus data, where S is the set of bus stop nodes, L is the set of bus route nodes, and E is the set of edges; and dynamically extracts the corresponding bipartite subgraphs from the bipartite bus graph based on the passenger's input start and destination stations.
[0023] The bipartite graph neural network learning module is used to generate an adjacency matrix, a station co-occurrence matrix, and a line co-occurrence matrix based on the extracted bipartite subgraph. The adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix are then input into the first graph convolutional learning module GCN-A, the second graph convolutional learning module GCN-S, and the third graph convolutional learning module GCN-L, respectively, for embedding representation learning, to obtain the embedding representation vector corresponding to each graph convolutional learning module.
[0024] The intelligent route recommendation module is used to fuse the embedding representation vectors of each graph convolutional learning module, use the fused embedding representation vector as feature input, calculate the recommendation score of candidate routes, and output several recommended routes in descending order of score.
[0025] Thirdly, to achieve the above objectives, the present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the intelligent bus route recommendation method described in the first aspect.
[0026] Fourthly, to achieve the above objectives, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the intelligent bus route recommendation method described in the first aspect.
[0027] The technical effects of this invention are as follows:
[0028] This invention deeply integrates static road network data and dynamic operation data, and designs a novel learning architecture that combines three-matrix generation and three-branch graph convolution. It comprehensively learns embedded representations from three dimensions: adjacency interaction, station co-occurrence, and route co-occurrence, effectively overcoming the shortcomings of existing graph learning models in capturing deep topological relationships and their poor adaptability to dynamic scenarios. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be 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.
[0030] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0031] Figure 1 This is a schematic diagram of the bus interaction diagram and its co-occurrence diagram in an embodiment of the present invention;
[0032] Figure 2 This is an overall framework diagram of the ptRecGCN model in an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram illustrating the formation process of the recommended route in an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of local co-occurrence subgraph analysis of typical sites in an embodiment of the present invention;
[0035] Figure 5 This is a flowchart illustrating the implementation of an embodiment of the present invention. Detailed Implementation
[0036] Various exemplary embodiments of the present invention will now be described in detail. This detailed description should not be considered as a limitation of the present invention, but rather as a more detailed description of certain aspects, features, and embodiments of the present invention.
[0037] It should be understood that the terminology used in this invention is merely for describing particular embodiments and is not intended to limit the invention. Furthermore, with respect to numerical ranges in this invention, it should be understood that each intermediate value between the upper and lower limits of the range is also specifically disclosed. Every smaller range between any stated value or intermediate value within a stated range, and any other stated value or intermediate value within said range, is also included in this invention. The upper and lower limits of these smaller ranges may be independently included or excluded from the range.
[0038] Various modifications and variations can be made to the specific embodiments described in this specification without departing from the scope or spirit of the invention, as will be apparent to those skilled in the art. Other embodiments derived from this specification will also be obvious to those skilled in the art. This application specification and embodiments are merely exemplary.
[0039] The terms “include,” “including,” “have,” “contain,” etc., used in this article are all open-ended terms, meaning that they include but are not limited to.
[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0041] Example 1
[0042] like Figure 1 - Figure 5 As shown, this embodiment provides a method for intelligent recommendation of bus routes, including:
[0043] S1: Obtain basic public transport data, which includes static road network data and dynamic operation data;
[0044] S2: Based on the basic bus data, construct a two-part bus graph G=(S∪L,E), where S is the set of bus stop nodes, L is the set of bus route nodes, and E is the set of edges;
[0045] S3: Based on the passenger's input of the origin and destination stations, dynamically extract the corresponding sub-graphs from the bus bi-graph;
[0046] S4: Based on the extracted bipartite subgraph, generate the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix. Input the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix into the first graph convolutional learning module, the second graph convolutional learning module, and the third graph convolutional learning module, respectively, for embedding representation learning to obtain the embedding representation vector corresponding to each graph convolutional learning module.
[0047] S5: Fuse the embedding representation vectors of each graph convolutional learning module separately, use the fused embedding representation vector as feature input, calculate the recommendation score of the candidate route, and output several recommended routes in descending order of score.
[0048] This embodiment constructs a bipartite graph logical structure of "bus stop-bus route" for the public transport network to achieve accurate structured modeling of the public transport network. At the same time, it integrates static topology data and dynamic operation data to realize bipartite graph neural network learning, and proposes a method for recommending bus routes based on the learning results.
[0049] The specific implementation process of this embodiment is as follows:
[0050] S1: Basic data collection and preprocessing for public transportation.
[0051] The basic data collected in this embodiment includes two categories: static road network data and dynamic operation data. Static road network data includes all city bus route numbers, route directions, bus stop coordinates, and route information for each stop. Dynamic operation data includes departure frequency, real-time speed, road congestion level, historical travel time, average waiting time, passenger flow congestion level, and temporary route adjustment information for each route. After data collection, standardized preprocessing operations are performed to remove missing values, outliers, and duplicate data, and to normalize the coordinate data, time data, and congestion data.
[0052] S2: Structured construction of the bus route II map.
[0053] This embodiment constructs a dedicated two-part graph model for public transportation, dividing network nodes into two independent sets of nodes: bus stops and bus routes. For example... Figure 1 As shown, let the set of sites be... and route set Construct a bipartite graph , among which the side Indicates the line On the site Establish rest stops. The most direct representation of a bipartite graph is the interaction matrix. , ,Right now A stop is indicated when a stop is set up; otherwise, no stop is set up. Given the passenger's origin and destination stations, a bipartite (sub)graph is dynamically constructed for this recommendation. Furthermore, for transfer scenarios, virtual transfer association edges are constructed between transferable station nodes, marking attributes such as transfer distance, number of trips, waiting time, and congestion level, fully covering the topological relationships for direct and multi-transfer scenarios.
[0054] S3: Construction of a bipartite graph neural network.
[0055] This embodiment breaks through the limitations of isomorphic neural network structures by designing an adjacency matrix A and a site co-occurrence matrix S of a bipartite graph. C Co-occurrence matrix L of lines C Three data input specifications for graph neural networks: A, S C and L C It evolved from the interaction matrix of the bus route diagram (see...). Figure 1 Co-occurrence diagram and Figure 2 (Middle Three Matrix Generation Module).
[0056] Figure 2 The diagram shows the overall framework of the ptRecGCN model, illustrating the structural relationships between the three matrix generation modules (SGCN-A, GCN-S, and GCN-L), the three graph convolutional learning modules, and the recommendation module.
[0057] In the model, module SGCN-A learns the bipartite graph adjacency matrix A, forming an embedding representation vector of stations and routes for a given travel plan; module SGCN-S learns the station co-occurrence matrix S. C This forms a site-related embedding representation vector; the SGCN-L module learns the route co-occurrence matrix L. C This process generates embedding representation vectors for all candidate routes. The embedding representation vectors learned from all modules are then fused and calculated according to the two node types: station and route, to form a set of embedding representation vectors for the Top K recommendations. Like most deep learning methods, graph convolutional learning always utilizes the input feature data to generate associated embedding representation vectors to support the application. For example... Figure 2 As shown, the site or line-related embedding vectors are the learning results of the Graph Convolutional Network (GCN), and the corresponding site fusion calculations... ,in and These are the site-related embedding vectors learned by SGCN-A and SGCN-S, respectively. Bitwise addition operation for vectors; line fusion calculation ,in and These are the line-related embedding representation vectors learned by SGCN-A and SGCN-L, respectively.
[0058] S4: Intelligent bus route recommendation.
[0059] The route recommendation process, which combines user travel requests, includes the following steps: receiving user requests for origin, destination, travel time, and preferences; dynamically constructing a bipartite public transport map; embedding collected node feature data to learn feature representations for a bipartite graph neural network; and finally generating recommendation results using the learned embedding vector set. This embodiment employs Top-K recommendation, specifically sorting recommendations from highest to lowest based on their recommendation scores. The recommendation score is calculated as follows: Let the origin and destination stations be... and The sequence of candidate stations traversed from the starting station to the destination station is { The corresponding candidate bus routes (vehicles) for transfer are sequenced as follows: Therefore, the recommended rating for this route is:
[0060]
[0061] A specific implementation example of this embodiment is as follows:
[0062] Data preparation: Extract station-route stop records from the Beijing Public Transport GTFS dataset and construct an interaction matrix. (14,724 stations × 2,135 lines). The data were randomly divided into training, validation, and test sets in a ratio of 7:1:2.
[0063] Matrix generation: based on interaction matrix Calculate the site co-occurrence matrix (14724×14724 dimensional) and line co-occurrence matrix (2135×2135 dimensional), and the extended adjacency matrix .
[0064] Model configuration: embedding dimension d=64, number of graph convolutional layers L=3, Adam optimizer, learning rate 0.001, batch size 256, early stopping strategy (stop if there is no improvement after 10 consecutive rounds of Recall@10 on the validation set).
[0065] Training process: The SGCN-A module in the adjacency matrix The GCN-S module performs graph convolutional learning on the site co-occurrence matrix. The GCN-L module performs graph convolutional learning on the line co-occurrence matrix. Graph convolutional learning is performed on the top layer. The three modules are trained jointly, and the BPR loss function is used to optimize the sorting of positive and negative samples.
[0066] Recommendation process: Given a target site, the site embedding and route embedding output from the three modules are merged respectively, the recommendation score of the site and all candidate routes is calculated, and the Top-K routes with the highest scores are output.
[0067] Implementation Results: On the Beijing Public Transport GTFS dataset, Recall@5=0.4916, Recall@10=0.5883, NDCG@5=0.4027, and NDCG@10=0.4350, all outperforming all compared methods. Ablation studies show that the three-matrix joint learning method achieves a maximum improvement of 5.56% in Recall@10 compared to the basic method using only the interaction matrix.
[0068] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for intelligently recommending bus routes, characterized in that, include: S1: Obtain basic public transport data, which includes static road network data and dynamic operation data; S2: Based on the basic bus data, construct a two-part bus graph G=(S∪L,E), where S is the set of bus stop nodes, L is the set of bus route nodes, and E is the set of edges; S3: Based on the passenger's input of the origin and destination stations, dynamically extract the corresponding sub-graphs from the bus bi-graph; S4: Based on the extracted bipartite subgraph, generate the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix. Input the adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix into the first graph convolutional learning module, the second graph convolutional learning module, and the third graph convolutional learning module, respectively, for embedding representation learning to obtain the embedding representation vector corresponding to each graph convolutional learning module. S5: Fuse the embedding representation vectors of each graph convolutional learning module separately, use the fused embedding representation vector as feature input, calculate the recommendation score of the candidate route, and output several recommended routes in descending order of score.
2. The intelligent bus route recommendation method according to claim 1, characterized in that, The static road network data in step S1 includes at least the city's bus route numbers, route directions, bus stop coordinates, and route information for each stop.
3. The intelligent bus route recommendation method according to claim 1, characterized in that, The dynamic operation data in step S1 includes at least the departure frequency of each route, real-time vehicle speed, road congestion level, historical travel time, average waiting time, passenger congestion level, and temporary route adjustment information.
4. The intelligent bus route recommendation method according to claim 1, characterized in that, Step S2 also includes constructing a virtual transfer association edge, which connects bus stop nodes or bus line nodes corresponding to routes that can transfer to each other at the same station, and marks transfer attribute information, which includes at least one of transfer distance, number of transfers, waiting time, and congestion level.
5. The intelligent bus route recommendation method according to claim 1, characterized in that, In step S4, the first graph convolutional learning module performs graph convolutional learning based on the adjacency matrix and outputs the embedded representation vectors of stations and routes for the specified travel plan; the second graph convolutional learning module performs graph convolutional learning based on the station co-occurrence matrix and outputs the embedded representation vectors of all candidate stations; and the third graph convolutional learning module performs graph convolutional learning based on the route co-occurrence matrix and outputs the embedded representation vectors of all candidate routes.
6. The intelligent bus route recommendation method according to claim 5, characterized in that, Each graph convolutional learning module is trained jointly, and the BPR loss function is used to optimize the sorting of positive and negative samples.
7. The intelligent bus route recommendation method according to claim 1, characterized in that, The calculation process for the recommendation score of the candidate route in step S5 specifically includes: In the formula, As the starting station, For the destination station, The site embedding vectors learned and fused by the learning module. The line embedding vectors learned and fused by the learning module. This is a matrix transpose operation. Represents any possible transit point between the originating station and the destination station.
8. A smart bus route recommendation system, characterized in that, include: The data acquisition module is used to acquire basic public transport data, which includes static road network data and dynamic operation data. The bipartite graph construction module is used to construct a bipartite bus graph G=(S∪L,E) based on basic bus data, where S is the set of bus stop nodes, L is the set of bus route nodes, and E is the set of edges; and dynamically extracts the corresponding bipartite subgraphs from the bipartite bus graph based on the passenger's input start and destination stations. The bipartite graph neural network learning module is used to generate an adjacency matrix, a station co-occurrence matrix, and a line co-occurrence matrix based on the extracted bipartite subgraphs. The adjacency matrix, station co-occurrence matrix, and line co-occurrence matrix are then input into the first graph convolutional learning module, the second graph convolutional learning module, and the third graph convolutional learning module, respectively, for embedding representation learning, to obtain the embedding representation vectors corresponding to each graph convolutional learning module. The intelligent route recommendation module is used to fuse the embedding representation vectors of each graph convolutional learning module, use the fused embedding representation vector as feature input, calculate the recommendation score of candidate routes, and output several recommended routes in descending order of score.
9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program and the processor runs the computer program to enable the electronic device to perform a method for intelligent recommendation of bus routes according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements a method for intelligent recommendation of bus routes as described in any one of claims 1-7.