Travel route recommendation method, travel route recommendation device and electronic equipment

By predicting passenger flow inside public transportation vehicles, assessing the comfort of candidate routes, and recommending more comfortable travel routes, this technology addresses the problem of unmet user comfort needs in existing technologies and improves the user experience.

CN121144604APending Publication Date: 2025-12-16NOBO AUTOMOTIVE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511263015.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, public transportation route recommendation methods cannot meet users' diverse comfort needs, thus affecting user experience.

Method used

By obtaining users' candidate routes and travel times, the system predicts the passenger flow in vehicles for multiple candidate routes, assesses the ride comfort of each route based on the passenger flow, and determines the recommended route.

Benefits of technology

It improves the comfort of public transportation, meets users' needs for comfortable travel, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144604A_ABST
    Figure CN121144604A_ABST
Patent Text Reader

Abstract

The invention provides a travel route recommendation method, a travel route recommendation device and electronic equipment, the method relates to the technical field of public transport travel route recommendation, the method comprises the following steps: obtaining candidate routes and travel time of a user, the candidate routes comprising a plurality of candidate routes obtained based on a starting position and a terminal position; on the basis of the travel time, in-vehicle pedestrian flows of the multiple candidate routes are predicted, and the in-vehicle pedestrian flows are used for representing the in-vehicle pedestrian flows of the public transport means in the multiple candidate routes in the travel time; and determining a recommended route in the candidate routes based on the in-vehicle visitor flows of the plurality of candidate routes. According to the method, the travel route with higher comfort can be recommended, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of public transportation route recommendation, and more specifically, to a route recommendation method, route recommendation device, and electronic device in the field of electronic control technology. Background Technology

[0002] With the development of intelligent transportation systems and in-vehicle navigation technology, navigation has become an indispensable core function, providing users with real-time route planning and travel suggestions. Current technologies recommend public transportation routes based on factors such as distance length or number of transfers. However, this route determination method cannot meet the diverse travel needs of users and negatively impacts user experience.

[0003] Therefore, recommending more comfortable travel routes and improving user experience is an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, device, and electronic device for recommending travel routes. The method can recommend more comfortable travel routes and improve user experience.

[0005] Firstly, a method for recommending travel routes is provided, which includes:

[0006] Obtain the user's candidate routes and travel times. The candidate routes include multiple candidate routes based on the start and end locations.

[0007] Based on travel time, predict passenger flow inside vehicles on multiple candidate routes. Passenger flow inside vehicles is used to represent the passenger flow inside public transportation vehicles on multiple candidate routes during the travel time.

[0008] Based on the passenger flow in vehicles of multiple candidate routes, the recommended route is determined from the candidate routes.

[0009] In the embodiments of this application, passenger flow in multiple candidate routes is predicted based on travel time, i.e., the passenger flow in various public transportation modes (e.g., buses, subways, light rail, etc.) can be predicted during the user's travel time. By analyzing passenger flow, the comfort level of each route can be predicted, and a recommended route can be determined based on the comfort level of each route. Compared to existing technologies that recommend routes to users solely based on travel time and number of transfers, this solution can assess the comfort level of multiple candidate routes based on the user's travel time and passenger flow, determining the recommended route with higher comfort. In other words, it can recommend travel routes with less passenger flow and higher comfort to users, thereby improving the user experience.

[0010] In conjunction with the first aspect, in some possible implementations, a recommended route is determined from the candidate routes based on the in-vehicle passenger flow of multiple candidate routes, including:

[0011] Based on the passenger flow in vehicles at each station of the target road segment in multiple candidate routes, the predicted congestion level of each station in the target road segment is determined. The target road segment is used to represent the road segment between the starting position and the preset station.

[0012] Recommended routes are determined based on the predicted congestion levels at each station in the target road segment.

[0013] In the embodiments of this application, by determining the predicted congestion level of each station in the target road segment (i.e., the road segment between the starting position and the preset station) through the in-vehicle passenger flow in multiple candidate routes, the congestion level of each station can be evaluated, and the congestion situation that users may face in the early stage of their trip on multiple candidate routes can be determined; and a recommended route can be determined based on the congestion level of the early stage of the trip on multiple candidate routes. Compared with the prior art that recommends routes to users only based on travel time and number of transfers, this solution can determine a more comfortable travel route based on the predicted congestion level of each candidate route in the early stage of the user's trip, thereby improving the user's travel experience.

[0014] Combining the first aspect and the above implementation methods, in some possible implementation methods, a recommended route is determined based on the predicted congestion level of each station in the target road segment, including:

[0015] Based on the predicted congestion level of each station in the target road segment, determine whether there is a first station in the target road segment. The first station is used to represent a station whose predicted congestion level is lower than the preset congestion level.

[0016] If a first stop exists in the target road segment, a recommended route is determined based on the first stop;

[0017] When the first stop is not available in any of the target segments of multiple candidate routes, a recommended route is determined based on the predicted congestion levels of the multiple candidate routes. The predicted congestion levels of the multiple candidate routes are used to represent the congestion level inside the public transportation vehicle from the starting point to the destination.

[0018] In the embodiments of this application, by analyzing the predicted congestion levels of each station in the target road segment, it is determined whether there are stations in the target road segment with predicted congestion levels lower than preset congestion levels. This allows for the determination of whether there are stations with relatively low predicted congestion levels among multiple candidate routes. When there are stations in the target road segment with predicted congestion levels lower than preset congestion levels, a recommended route is determined based on these stations. When there are no stations in the target road segment with predicted congestion levels lower than preset congestion levels, the recommended route is determined based on the congestion levels from the start to the end of multiple candidate routes. Compared to existing technologies that recommend routes to users solely based on travel time and the number of transfers, this solution can determine the recommended route based on whether there are stations with low predicted congestion levels in the initial section of the candidate route, i.e., based on the local congestion levels of the candidate route. This method can determine routes with high comfort levels for users during their travel time, thereby improving their travel experience.

[0019] Combining the first aspect and the above implementation methods, in some possible implementation methods, a recommended route is determined based on the first station, including:

[0020] If, among multiple candidate routes, there is a candidate route whose target segment includes the first station, the candidate route that includes the first station will be determined as the recommended route.

[0021] When at least two of the candidate routes include the first station in their target segments, the recommended route is determined based on the number of stops from the starting position to the first station in each of the at least two candidate routes.

[0022] In the embodiments of this application, by determining whether the target segment of multiple candidate routes contains a first station (i.e., a station with a predicted congestion level lower than a preset congestion level), when only one candidate route contains a first station in its target segment, that candidate route is directly determined as the recommended route. This can identify routes with low congestion levels at the beginning, meaning that users can enter a comfortable carriage environment early in the journey. When multiple candidate routes contain a first station, the number of stops from the starting point to the first station in each candidate route is further compared, and the route with fewer stops is determined as the recommended route. Since fewer stops mean that users can enter a comfortable carriage environment earlier, this solution prioritizes recommending routes with lower congestion levels to users earlier, which can improve the comfort and rationality of travel route recommendations and enhance the user's travel experience.

[0023] Combining the first aspect and the above implementation methods, in some possible implementation methods, a recommended route is determined based on the number of stops from the starting position to the first station in each of at least two candidate routes, including:

[0024] When the number of stops corresponding to at least two candidate routes is different, the candidate route corresponding to the minimum number of stops among the at least two candidate routes shall be determined as the recommended route.

[0025] When at least two candidate routes have the same number of stops, determine the number of stops at the first stop on the target segment of at least two candidate routes, and determine the candidate route with the most stops at the first stop as the recommended route.

[0026] In embodiments of this application, when the number of stops at the first station of at least two candidate routes is different, the number of stops from the starting point to the first station is compared, and the route with fewer stops is preferentially selected as the recommended route. Since users are more likely to enter a comfortable zone earlier on routes with fewer stops and have a higher probability of securing a seat in the carriage, the route with fewer stops is determined as the recommended route in this case. When the number of stops from the starting point to the first station of at least two candidate routes is the same, the number of first stops on each route is further compared, and the route with more first stops on the target segment is determined as the recommended route. A higher number of first stops on the target segment means that the route has several less crowded stops in the early part of the route, i.e., fewer passengers in the carriage compared to other routes. Therefore, this route is determined as the recommended route, which can recommend less crowded routes to users, increasing the probability of users securing a seat in the carriage in the early part of the journey and improving the user's travel experience.

[0027] Combining the first aspect and the above implementation methods, in some possible implementation methods, based on travel time, the in-vehicle passenger flow of multiple candidate routes is predicted, including:

[0028] Based on travel time, the historical passenger flow in vehicles for multiple candidate routes is determined. The historical passenger flow in vehicles is used to represent the passenger flow in public transportation vehicles corresponding to the travel time on a historical date.

[0029] The historical passenger flow data of multiple candidate routes is preprocessed and normalized to obtain the target input data;

[0030] The target input data is fed into the Extreme Learning Machine (ELM) prediction model, which processes the target input data to obtain the in-vehicle passenger flow of multiple candidate routes.

[0031] In the embodiments of this application, historical in-vehicle passenger flow data for multiple candidate routes is obtained based on the user's travel time, providing a time-related data foundation for subsequent predictions. Preprocessing and normalizing the historical in-vehicle passenger flow data eliminates outliers and interference, improving data consistency and prediction accuracy. The processed data is then input into an Extreme Learning Machine (ELM) prediction model for prediction, yielding predicted in-vehicle passenger flow data for multiple candidate routes. Since the ELM prediction model boasts high efficiency and fast convergence, this solution ensures prediction accuracy while reducing computational resource consumption. Compared to existing technologies using traditional models, which require complex network structures and multiple iterations leading to high time complexity, this solution reduces algorithm time complexity while maintaining prediction accuracy.

[0032] Combining the first aspect and the above implementation methods, in some possible implementations, the Extreme Learning Machine (ELM) prediction model includes an input layer, at least one hidden layer, and an output layer. The target input data is input into the ELM prediction model, and the ELM prediction model processes the target input data to obtain the in-vehicle passenger flow of multiple candidate routes, including:

[0033] Receive target input data through the input layer;

[0034] The received target input data is processed by feature extraction through at least one hidden layer to obtain the features of the target input data. The feature extraction process includes extracting linear and non-linear features of the target input data.

[0035] Based on the features of the target input data, the output layer generates in-vehicle passenger flow data for multiple candidate routes.

[0036] In the embodiments of this application, the target input data is received and processed through the input layer to ensure that the Extreme Learning Machine prediction model can accurately acquire historical passenger flow data related to travel time; feature extraction processing of the target input data is performed through at least one hidden layer to extract potential relationships in the data, and the extracted features are used by the output layer to generate corresponding candidate routes for in-vehicle passenger flow. This solution can improve the prediction efficiency of the model while ensuring the accuracy of prediction and using a simple model structure.

[0037] In combination with the first aspect and the above implementation methods, some possible implementation methods also include:

[0038] Based on the passenger flow and number of seats in multiple candidate routes, the predicted congestion level of each station in the multiple candidate routes is determined.

[0039] The predicted congestion level of multiple candidate routes is determined by a weighted sum of the predicted congestion level of each station in the multiple candidate routes and the number of stations in the multiple candidate routes.

[0040] In the embodiments of this application, based on the passenger flow and number of seats in multiple candidate routes, the predicted congestion level of each station can be accurately assessed. By weighting the predicted congestion level of each station with the number of stations, the predicted congestion level of the candidate routes can be calculated, reflecting the overall congestion level of the routes. Because this solution considers the number of seats and passengers in the carriage when calculating the congestion level of candidate routes, it can reasonably assess the congestion level, achieve more reasonable route recommendation selection, and improve the user's travel experience.

[0041] Secondly, a travel route recommendation device is provided, the device comprising:

[0042] The acquisition module is used to acquire the user's candidate routes and travel times. The candidate routes include multiple candidate routes obtained based on the start and end locations.

[0043] The processing module is used to predict the passenger flow inside multiple candidate routes based on travel time. The passenger flow inside the vehicle represents the passenger flow inside the public transportation vehicle on multiple candidate routes during the travel time. Based on the passenger flow inside the vehicle on multiple candidate routes, the recommended route is determined from the candidate routes.

[0044] It should be understood that the extensions, limitations, explanations and descriptions of the relevant content in the first aspect above also apply to the same content in the second aspect.

[0045] Thirdly, an electronic device is provided, including a memory and a processor; the memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the method of recommending travel routes in the first aspect or any possible implementation of the first aspect.

[0046] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to execute the method for recommending travel routes in the first aspect or any possible implementation thereof.

[0047] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the method for recommending travel routes as described in the first aspect or any possible implementation thereof. Attached Figure Description

[0048] Figure 1 This is a schematic flowchart illustrating a method for recommending travel routes provided in an embodiment of this application;

[0049] Figure 2 A schematic diagram of a candidate route provided in an embodiment of this application;

[0050] Figure 3 A schematic diagram of the network structure of an extreme learning machine prediction model provided in an embodiment of this application;

[0051] Figure 4 A schematic diagram of a data prediction process provided in an embodiment of this application;

[0052] Figure 5 A schematic diagram of another candidate route provided for an embodiment of this application;

[0053] Figure 6 This is a schematic flowchart illustrating another method for recommending travel routes provided in an embodiment of this application;

[0054] Figure 7 This is a schematic diagram of the structure of a travel route recommendation device provided in an embodiment of this application;

[0055] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0057] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0058] In existing technologies, users can choose their mode of transportation when using navigation applications. When choosing driving, the application can help users select routes with smooth traffic based on real-time road congestion information provided by the transportation network. When choosing public transportation, the application can recommend routes based on indicators such as shortest walking distance, fewest transfers, or shortest waiting time, and can also display some information about public transportation routes, such as station names and vehicle arrival times. For passengers choosing public transportation, especially those carrying luggage, the level of crowding on public transport is a significant factor affecting travel comfort. However, existing technologies do not provide users with passenger flow information at each station along the route. Therefore, users cannot judge the changes in congestion levels or the duration of high congestion along different routes during their journey. In other words, existing technologies lack consideration for users' comfort needs along their travel routes.

[0059] In view of this, this application provides a method, device, and electronic device for recommending travel routes. It can predict the in-vehicle passenger flow of multiple candidate routes based on travel time, and can determine the in-vehicle passenger flow of public transportation vehicles during the user's travel time in advance, predicting the comfort of each route. Predicting the in-vehicle passenger flow of multiple candidate routes based on travel time means predicting the in-vehicle passenger flow of various public transportation vehicles (e.g., buses, subways, light rail, etc.) during the user's travel time. By analyzing the in-vehicle passenger flow, the comfort of each route can be predicted, and a recommended route can be determined based on the comfort of each route. Compared to existing technologies that recommend routes to users solely based on travel time and number of transfers, this solution can judge the comfort of multiple candidate routes based on the user's travel time and the in-vehicle passenger flow of multiple candidate routes, determining the recommended route with higher comfort among the candidate routes. In other words, it can recommend travel routes with less in-vehicle passenger flow and higher comfort to users, thereby improving the user experience.

[0060] The following is combined Figure 1 This application provides a detailed description of a method for recommending travel routes based on embodiments thereof.

[0061] Figure 1 This is a schematic flowchart illustrating a method for recommending travel routes provided in an embodiment of this application. Figure 1 As shown, method 100 includes steps S110 to S130, which are described in detail below.

[0062] For example, Figure 1The method 100 shown can be executed by an electronic device, which may include a mobile terminal; or by a processor in the electronic device; or by a chip in the processor of the electronic device; or by a software platform integrated in the electronic device; or by an application in the mobile terminal; or by a server; or by a navigation platform deployed on the server; or by a navigation system with a predictive model.

[0063] S110: Obtain the user's candidate routes and travel times.

[0064] The candidate routes include multiple candidate routes based on the starting and ending positions.

[0065] In embodiments of this application, the user's desired travel time is obtained, along with multiple candidate routes from multiple starting locations to multiple ending locations obtained based on the user's needs.

[0066] For example, if the system detects that the user inputs "People's Square" as the starting location and "Railway Station" as the destination location, the navigation application can generate three candidate routes based on these two input locations. In addition, the user can input the travel time, such as expecting to depart at 10:00 AM tomorrow.

[0067] Optionally, in one embodiment, the navigation application can provide multiple travel options. For example, after detecting that the user has entered the starting and ending locations, it waits for the user to select the travel time and mode of transportation. If the user selects public transportation, it generates several public transportation routes from the starting location to the ending location based on the travel time.

[0068] It should be noted that multiple candidate routes that meet the conditions can be generated based on map information, urban public transportation networks, and bus / subway transfer rules.

[0069] For example, Figure 2 A schematic diagram of a candidate route provided in an embodiment of this application, such as... Figure 2 As shown, the navigation application can generate four routes based on the origin and destination, such as... Figure 2 The routes A, B, C and D are shown in the diagram. The stops on each of the four routes can include bus, subway or light rail stops.

[0070] Optionally, when obtaining the travel time corresponding to the user's travel needs, the options that can be provided to the user include: depart now, 10:00 AM tomorrow, Friday morning, etc., in natural language, as well as a precise timestamp.

[0071] S120 predicts passenger flow in vehicles for multiple candidate routes based on travel time.

[0072] Among them, passenger flow inside the vehicle is used to represent the passenger flow inside public transportation vehicles on multiple candidate routes during the travel time.

[0073] In the embodiments of this application, after obtaining candidate routes and travel times, the passenger flow in public transportation vehicles on multiple candidate routes is predicted at the travel time.

[0074] For example, if the user selects a travel time of 8:00 AM the next day, based on historical data, predict the passenger flow in bus and / or subway cars on each candidate route at 8:00 AM the next day.

[0075] In one implementation, the above method includes:

[0076] Based on travel time, determine the historical passenger flow in multiple candidate routes;

[0077] The historical passenger flow data of multiple candidate routes is preprocessed and normalized to obtain the target input data;

[0078] The target input data is fed into the Extreme Learning Machine (ELM) prediction model, which processes the target input data to obtain the in-vehicle passenger flow of multiple candidate routes.

[0079] Among them, historical passenger flow is used to represent the passenger flow inside public transportation vehicles corresponding to the travel time on a historical date.

[0080] In the embodiments of this application, based on travel time, the passenger flow inside public transportation vehicles for multiple candidate routes at travel times on historical dates is determined. The above data is preprocessed and normalized to obtain target data, which is then input into the Extreme Learning Machine prediction model. The output data of the model is the passenger flow inside the vehicles for multiple candidate routes corresponding to the predicted travel time.

[0081] For example, if the user inputs "People's Square" as the starting location and "Railway Station" as the destination location, the navigation application can generate three candidate routes based on these two input locations. Additionally, the user can input their travel time, such as an expected departure time of 10:00 AM on the 15th. After obtaining the candidate routes and travel time, historical in-vehicle passenger flow information is obtained, specifically the passenger flow on public transportation vehicles on the candidate routes at 10:00 AM on the 14th, 13th, 12th, 11th, 10th, 9th, and 8th. This data is then analyzed using a scatter plot matrix and box plot combined method to detect and remove outliers (data anomalies). The data is then normalized, and the normalized data is input into an extreme learning machine prediction model to finally obtain the in-vehicle passenger flow for multiple candidate routes corresponding to the travel time.

[0082] Optionally, after obtaining the candidate routes and travel times, the passenger flow at each station on each candidate route under the travel time of historical dates is obtained. Based on the passenger flow at each station on each candidate route under the travel time of historical dates, the passenger flow in the carriage at each station on each candidate route is obtained, i.e., the historical passenger flow in the carriage.

[0083] For example, the passenger flow in the carriage of station i on route A at time t is equal to the passenger flow in the carriage of the previous station (i.e., station i-1) plus the passenger flow entering from station i, minus the passenger flow leaving from station i. in This represents the passenger flow inside the carriage at time t at station i on route A. This is used to represent the passenger flow in the carriage of the station preceding station i (i.e., station i-1), where Y is used to represent the number of visitors entering site i, where Y i t Used to represent the lost traffic to site i.

[0084] Optionally, at the starting station of a route, since there is no previous station at the starting station, it is impossible to calculate the passenger flow of the starting station by adding the passenger flow of the previous station to the passenger flow of the starting station and subtracting the passenger flow of the starting station from the passenger flow of the starting station. Therefore, the passenger flow of the starting station can be used as the passenger flow inside the vehicle at the starting station.

[0085] For example, assuming time t is the current time, the calculated passenger flow in the carriage at station i on route A at time t is... Then, the historical passenger flow at station i on route A at time t can be represented as: When predicting future pedestrian traffic at time t, the future pedestrian traffic can be expressed as: After predicting passenger flow at each station on route A, the in-vehicle passenger flow at each station on candidate route A can be obtained (assuming the travel time is t+1):

[0086] Optionally, after preprocessing the data to remove outliers, zero-mean normalization (also known as standard deviation normalization, Z-score normalization, or Z-score standardization) can be used to normalize the data. Zero-mean normalization transforms the original data according to the mean and standard deviation of the features, resulting in a standard distribution with a mean of 0 and a standard deviation of 1. Zero-mean normalization can scale datasets with large variations or large values ​​to a certain range according to a uniform rule. Inputting the scaled data into a neural network model helps the model converge quickly and improves prediction accuracy.

[0087] For example, the normalization formula can be as follows:

[0088]

[0089] Where Z is the standard score, μ is the mean of the dataset, and σ is the standard deviation of the dataset.

[0090] Optionally, after normalization, the data can be further filtered, and sample values ​​whose standard scores (Z values) are greater than or less than a preset value can be regarded as outliers and cleaned up to improve data quality.

[0091] For example, sample values ​​with a standard score greater than 3 or less than -3 are considered outliers and cleaned up.

[0092] Optionally, after normalizing and other processing of the dataset, the data can be reshaped to convert it into a structure suitable for input to a neural network model, and formatted into a form containing 7 data points per group for training purposes.

[0093] In the above implementation, historical in-vehicle passenger flow data for multiple candidate routes is obtained based on users' travel times, providing a time-correlated data foundation for subsequent predictions. Preprocessing and normalizing the historical in-vehicle passenger flow data eliminates outliers and interference, improving data consistency and prediction accuracy. The processed data is then input into an Extreme Learning Machine (ELM) prediction model for prediction, yielding predicted in-vehicle passenger flow for multiple candidate routes. Since the ELM prediction model boasts high efficiency and fast convergence, this solution ensures prediction accuracy while reducing computational resource consumption. Compared to existing technologies using traditional models, which require complex network structures and multiple iterations leading to high time complexity, this solution reduces time complexity while maintaining prediction accuracy.

[0094] In one implementation, the above method includes:

[0095] Receive target input data through the input layer;

[0096] The features of the target input data are obtained by performing feature extraction processing on the received target input data through at least one hidden layer.

[0097] Based on the features of the target input data, the output layer generates in-vehicle passenger flow data for multiple candidate routes.

[0098] Feature extraction processing includes extracting linear and nonlinear features from the target input data; Extreme Learning Machine (ELM) prediction model, also known as ELM neural network model, extreme learning machine model, ELM model, etc.

[0099] In the embodiments of this application, due to the simple structure of the Extreme Learning Machine (ELM) network, the network parameters of neurons are not optimized and updated using complex algorithms such as iterative learning. Instead, the input weights and biases of neurons are randomly initialized, and the output weights are obtained using the Moore-Penrose generalized inverse formula, achieving rapid model convergence. Therefore, this application uses an ELM prediction model instead of other networks such as Long Short-Term Memory (LSTM) or Graph Convolutional Network (GCN). Normalized data is input into the ELM prediction model through the input layer, and linear and nonlinear features in the input data are extracted through the hidden layer. Multiple candidate routes and their in-vehicle pedestrian flow are then obtained through the input layer.

[0100] For example, Figure 3 A schematic diagram of the network structure of an extreme learning machine prediction model provided in an embodiment of this application; as shown Figure 3 As shown, 300 represents the network structure of the Extreme Learning Machine (ELM) prediction model. The ELM prediction model's network structure comprises four layers: 301, 302, 303, and 304. Layer 301 is the input layer, responsible for receiving the preprocessed dataset. Layer 302 is the first hidden layer, which can have 200 neurons and uses a non-linear activation function (e.g., the sigmoid activation function) to capture non-linear features in the data. Layer 303 is the second hidden layer, which can have 100 neurons and uses a linear activation function (e.g., the linear activation function) to extract linear features from the data. The output layer generates the prediction results.

[0101] It should be understood that the above examples illustrating the network structure of the Extreme Learning Machine prediction model are not limited to the number of layers or the number of neurons in each layer in the embodiments of this application.

[0102] For example, Figure 4 This is a schematic diagram of a data prediction process provided in an embodiment of this application, such as... Figure 4As shown, in the data preprocessing stage, outlier identification and processing are first performed on the acquired historical in-vehicle traffic data to remove or correct unreasonable data. Then, data normalization is performed to convert data of different dimensions to the same numerical range. Outlier identification and processing are performed again to ensure the quality of the normalized data. Finally, data format conversion is performed to transform the data into a structured input form that the model can recognize. In the prediction stage, the preprocessed data is first used as input. Then, feature extraction is performed to extract key information helpful for prediction (such as linear and nonlinear features of the data). Feature fusion is then performed to combine multiple features into a feature vector input to the model. Finally, the prediction result is output for subsequent route recommendation.

[0103] It should be understood that after the output layer generates the prediction results, the results need to be denormalized to convert them into predicted pedestrian flow.

[0104] For example, when the input data is When Z is the result calculated by the output layer, assuming the travel time is t+1, the predicted passenger flow at station i at the travel time is:

[0105] It should be noted that the Extreme Learning Machine neural network model can be constructed using the HPELM library in Python.

[0106] Optionally, since the correlation between data gradually weakens over time, the actual pedestrian traffic at each site can be periodically obtained and compared with the pedestrian traffic predicted by the Extreme Learning Machine (ELM) prediction model. Based on the comparison results, the model can be retrained and the network parameters updated to maintain prediction accuracy. Other neural networks have complex internal structures with many layers and parameters, and rely on complex algorithms to solve for optimal parameters, resulting in high resource consumption and long training times. In contrast, the ELM prediction model has a simple network structure, does not employ complex algorithms (such as iterative algorithms), and has the characteristic of fast convergence. Therefore, during retraining, while maintaining the same prediction accuracy as models like LSTM, the ELM prediction model requires at least a hundred times less training time compared to models like LSTM.

[0107] It should be understood that improved models of Extreme Learning Machines (ELMs), such as online sequence learning machines and bidirectional extreme learning machines, improve the prediction accuracy of traditional ELMs to some extent by sacrificing the simplicity of the original network structure and employing complex algorithms. However, these improvements lead to a significant increase in the computational complexity and resource consumption of the models. In the embodiments of this application, the prediction model is used to predict the passenger flow at a station at a future time to assess the congestion level inside public transportation vehicles. That is, in the embodiments of this application, the purpose of the prediction is a range assessment, classifying or grading the congestion level, rather than calculating high-precision specific values. Furthermore, the ELM prediction model has good generalization ability and can accurately predict traffic flow. Therefore, this solution adopts a lightweight prediction model of ELM, which can avoid resource consumption.

[0108] Optionally, after obtaining the historical passenger flow data, the historical passenger flow data is preprocessed and normalized to obtain the target input data. The target input data is then input into a pre-trained extreme learning machine prediction model. Based on the various parameters in the pre-trained extreme learning machine prediction model, the output result corresponding to the target input data is calculated.

[0109] Optionally, in one embodiment, the historical pedestrian traffic of the site can be used as input data. After data preprocessing and normalization, the historical pedestrian traffic of the site is input into a pre-trained extreme learning machine prediction model for prediction.

[0110] In the embodiments of this application, the bus / subway prediction model based on Extreme Learning Machine (ELM) can quickly adapt to public transportation such as light rail and trams. Traffic flow data from different modes of transportation exhibit common patterns to some extent. Conventional methods can use transfer learning to reconstruct part of the neural network model's structure, and then train some parameters to adapt to different modes of transportation. However, retraining some parameters using transfer learning is time-consuming due to the large number of network parameters. In contrast, leveraging the similar patterns in traffic flow, the ELM-based prediction model does not require redesigning the network structure. Furthermore, retraining all network parameters using traffic flow data from different modes of transportation takes less time than using transfer learning. Therefore, applying the prediction model to navigation route planning can effectively support the dynamic assessment and management of congestion in bus and subway vehicles, providing non-driving users with personalized travel solutions that meet their comfort needs.

[0111] In the above implementation, the target input data is received and processed through the input layer, ensuring that the Extreme Learning Machine prediction model can accurately acquire historical passenger flow data related to travel time. Feature extraction processing of the target input data is performed through at least one hidden layer, extracting potential relationships within the data. The output layer then generates corresponding candidate routes for in-vehicle passenger flow based on the extracted features. This scheme can improve the prediction efficiency of the model while maintaining prediction accuracy using a simple model structure.

[0112] S130. Based on the passenger flow in vehicles of multiple candidate routes, determine the recommended route among the candidate routes.

[0113] In the embodiments of this application, after obtaining the in-vehicle passenger flow of multiple candidate routes, the route with better user travel experience among the candidate routes is determined as the recommended route based on the in-vehicle passenger flow of multiple candidate routes.

[0114] It should be understood that when recommending routes to users, the system can detect the user's chosen travel preferences. These preferences can include options such as: shortest travel time, route with the fewest transfers, least congested, and shortest walking distance. When the system detects that the user has chosen the least congested route, the recommended route is determined based on the passenger flow within vehicles on multiple candidate routes.

[0115] Optionally, when it is detected that the number of times a user selects the least crowded travel preference in their historical travel records exceeds a preset percentage in the total travel records, after detecting that the user has determined the start and end locations, the recommended route among the candidate routes is determined by default based on the passenger flow in the vehicle of multiple candidate routes. That is, the route with low passenger flow in public transportation during the travel period is recommended to the user by default.

[0116] Optionally, when it is detected that the user selects public transportation as the mode of travel, the recommended route is determined by default based on the passenger flow in the vehicle of multiple candidate routes, that is, the route with low passenger density in the public transportation vehicle during the travel period is recommended to the user by default.

[0117] In one implementation, the above method includes:

[0118] Based on the passenger flow in vehicles at each station of the target road segment in multiple candidate routes, the predicted congestion level of each station in the target road segment is determined.

[0119] Recommended routes are determined based on the predicted congestion levels at each station in the target road segment.

[0120] The target road segment is used to represent the road segment between the starting position and the preset station.

[0121] In the embodiments of this application, based on the predicted passenger flow at each station in the preceding segment of the multiple candidate routes, the congestion level at each station in the preceding segment of the multiple candidate routes is determined, and a recommended route is determined based on the congestion level.

[0122] In one embodiment, the preset station can be a station on the route from the starting point to the ending point where the number of stops is half the total number of stops on the route; that is, the number of stops from the starting point to the preset station is the same as the number of stops from the preset station to the ending point. Assuming the total number of stops on the route from the starting point to the ending point is N, if N is even, the preset station can be a station where the passenger travels N / 2 stops from the starting point; if the total number of stops is odd, the preset station can be a station where the passenger travels (N-1) / 2 stops or (N+1) / 2 stops from the starting point.

[0123] For example, such as Figure 5 As shown in (a), the starting point is 501 and the ending point is 502. There are four public transportation routes between 501 and 502, which are four candidate routes. 503 to 520 are the stations on the candidate routes. Route 1 has eight stations: 503, 504, 505, 506, 507, 508, 509, and 510, with a total of 7 stops. Therefore, the preset station can be 506 or 507. Route 2 has seven stations: 511, 512, 513, 514, 508, 509, and 510, with a total of 6 stops. Therefore, the preset station can be the station that is 3 stops from the starting point, namely 514.

[0124] Optionally, the preset station can be a station on the route from the starting position to the ending position where the number of stops is a preset proportion of the total number of stops on the route. The preset proportion can be 1 / 3, 1 / 4, etc., and this embodiment of the application does not limit this.

[0125] In the above implementation, by determining the predicted congestion level of each station on the target road segment (i.e., the road segment between the starting point and the preset station) based on the in-vehicle passenger flow in multiple candidate routes, the congestion level of each station can be evaluated, and the potential congestion situation that users may face on multiple candidate routes in the early stages of their journey can be determined. Furthermore, a recommended route can be determined based on the congestion level of the early stages of the journey on multiple candidate routes. Compared to existing technologies that recommend routes to users solely based on travel time and the number of transfers, this solution can determine a more comfortable travel route based on the predicted congestion level of each candidate route in the early stages of the user's journey, thereby improving the user's travel experience.

[0126] One implementation also includes:

[0127] Based on the passenger flow and number of seats in multiple candidate routes, the predicted congestion level of each station in the multiple candidate routes is determined.

[0128] The predicted congestion level of multiple candidate routes is determined by a weighted sum of the predicted congestion level of each station in the multiple candidate routes and the number of stations in the multiple candidate routes.

[0129] Passenger flow inside vehicles includes the number of people inside public transportation vehicles at each station.

[0130] In embodiments of this application, the predicted congestion level is determined based on the ratio of passenger flow to the number of seats in the vehicle. The predicted congestion level of multiple candidate routes is determined by a weighted sum of the predicted congestion level of each station on multiple candidate routes and the number of stations on the multiple candidate routes.

[0131] For example, when the ratio of passenger flow to seat count is less than 1 (i.e., the passenger flow divided by the seat count is less than 1), the congestion level is determined to be "smooth," with a congestion coefficient of 25. When the ratio is greater than 1 and less than 1.5 (i.e., the passenger flow divided by the seat count is greater than 1 and less than 1.5), the congestion level is determined to be "mildly congested," with a congestion coefficient of 50. When the ratio is greater than 1.5 and less than 2 (i.e., the passenger flow divided by the seat count is greater than 1.5 and less than 2), the congestion level is determined to be "moderately congested," with a congestion coefficient of 75. When the ratio is greater than 2 (i.e., the passenger flow divided by the seat count is greater than 2), the congestion level is determined to be "severely congested," with a congestion coefficient of 100. Recommended routes are then determined based on the congestion level.

[0132] In the embodiments of this application, the congestion level of each candidate route is quantitatively evaluated, and a congestion level value is calculated for each route. The congestion level value can be equal to the number of stops where congestion persists divided by the total number of stops, multiplied by a weighted sum of congestion level coefficients, as shown in the following formula:

[0133]

[0134] Among them, V x L represents the congestion level of route x, c represents the degree of congestion, 1 represents smooth traffic, 2 represents light congestion, 3 represents moderate congestion, and 4 represents heavy congestion. x This represents the total distance of the x-th route. W represents the continuous distance with congestion level c in route x. c This represents the congestion coefficient. By calculating the congestion coefficient for each route, the route with the lowest congestion coefficient can be identified, and this route is recommended as the optimal route.

[0135] In the above implementation, based on the passenger flow and number of seats in multiple candidate routes, the predicted congestion level of each station can be accurately assessed. By weighting the predicted congestion level of each station with the number of stations, the predicted congestion level of the candidate routes can be calculated, reflecting the overall congestion level of the routes. Because this solution considers the number of seats and passengers in the carriage when calculating the congestion level of candidate routes, it can reasonably assess the congestion level, achieve more reasonable route recommendation selection, and improve the user's travel experience.

[0136] In one implementation, the above method includes:

[0137] Based on the predicted congestion level of each station in the target road segment, determine whether there is a first station in the target road segment;

[0138] If a first stop exists in the target road segment, a recommended route is determined based on the first stop;

[0139] When the first station is not present in any of the target road segments of multiple candidate routes, the recommended route is determined based on the predicted congestion levels of the multiple candidate routes.

[0140] The first station is used to indicate a station where the predicted congestion level is lower than the preset congestion level; the predicted congestion levels of multiple candidate routes are used to indicate the congestion level inside public transportation vehicles from the starting point to the destination.

[0141] In the embodiments of this application, if there are stations with low congestion in the target segment of the candidate route, the recommended route is determined based on the stations; if there are stations with low congestion in the beginning of each candidate route, the recommended route is determined based on the congestion value of each candidate route.

[0142] For example, Figure 5 A schematic diagram of another candidate route provided in the embodiments of this application, as shown below. Figure 5As shown in (a), the starting point 501 is the starting position, and the ending point 502 is the ending position. The congestion level in public transport vehicles is unobstructed for routes 503 to 504; lightly congested for routes 503 to 512 and 515 to 519; moderately congested for routes 519 to 520, 504 to 508, and 512 to 514; and heavily congested for routes 512 to 521, 521 to 510, and 514 to 510. Based on the congestion level of each route, only the first half of Route 1 has an unobstructed stop, i.e., the congestion level in public transport vehicles is unobstructed for the route 503 to 504. Therefore, 503 is the unobstructed stop (i.e., the first stop). Based on the unobstructed stop, a recommended route is determined. For example, Route 1, which includes 503, can be considered the recommended route.

[0143] Optionally, in one embodiment, the route that includes the most first stops on the target road segment among multiple candidate routes is determined as the recommended route.

[0144] It should be understood that the congestion level of each stop on the candidate route is predicted based on historical passenger flow data. If there are stops with relatively smooth congestion in the first half of the route, users choosing this route are highly likely to find a seat in the first half. However, if there are no stops with relatively smooth congestion, users are less likely to find a seat and will experience prolonged congestion, resulting in a poor travel experience. Therefore, in the embodiments of this application, routes with smooth congestion between the starting point and a preset stop are identified as recommended routes, ensuring higher comfort and a better travel experience for users.

[0145] For example, such as Figure 5 As shown in (b), the congestion level in public transport vehicles is lightly congested on routes 503 to 512 and 515 to 519; moderately congested on routes 519 to 520, 503 to 504 and then to 508, and 512 to 514; and heavily congested on routes 512 to 521, 521 to 510, and 514 to 510. Since there are no unobstructed stops on the target sections of any route, the congestion level is calculated for each route, and the route with the lowest congestion level is selected as the recommended route.

[0146] Specifically, for Route 1, the entire journey involves 7 stops. Buses 503 to 508 take 5 stops, resulting in moderate congestion. Buses 508 to 510 take 2 stops, resulting in severe congestion. The congestion level V1 for Route 1 is:

[0147]

[0148] For Route 2, the entire journey involves 7 stops. From 503 to 512, there are 2 stops with a light level of crowding; from 512 to 514, there are 2 stops with a moderate level of crowding; and from 514 to 510, there are 3 stops with a heavy level of crowding. The crowding level V1 for Route 2 is:

[0149]

[0150] For Route 3, the entire journey involves 4 stops. From 503 to 512, there are 2 stops, indicating a slightly crowded route. From 512 to 521 and then to 510, there are 2 stops, indicating a heavily crowded route. The crowding level V3 for Route 3 is:

[0151]

[0152] For Route 4, the entire journey involves 5 stops. From 515 to 519, there are 4 stops, with a light level of crowding. From 519 to 520, there is 1 stop, with a moderate level of crowding. The crowding level V4 for Route 4 is:

[0153]

[0154] Based on the above calculations, Route 4 has the lowest congestion level, therefore Route 4 is selected as the recommended route.

[0155] In the above implementation, by analyzing the predicted congestion levels of each station in the target road segment, it is determined whether there are stations in the target road segment with predicted congestion levels lower than the preset congestion levels. This allows for the identification of stations with relatively low predicted congestion levels among multiple candidate routes. If a station with a predicted congestion level lower than the preset congestion level exists in the target road segment, a recommended route is determined based on that station. If no station with a predicted congestion level lower than the preset congestion level exists in the target road segment, the recommended route is determined based on the congestion levels from the start to the end of multiple candidate routes. Compared to existing technologies that recommend routes to users solely based on travel time and the number of transfers, this solution can determine the recommended route based on whether there are stations with low predicted congestion levels in the initial section of the candidate route, i.e., based on the local congestion levels of the candidate route. This method can identify routes with high comfort levels for users during their travel time, thereby improving their travel experience.

[0156] In one implementation, the above method includes:

[0157] If, among multiple candidate routes, there is a candidate route whose target segment includes the first station, the candidate route that includes the first station will be determined as the recommended route.

[0158] When at least two of the candidate routes include the first station in their target segments, the recommended route is determined based on the number of stops from the starting position to the first station in each of the at least two candidate routes.

[0159] In the embodiments of this application, if only one of the multiple candidate routes includes the first station in its target segment, this candidate route is determined as the recommended route; if at least two of the multiple candidate routes include the first station in their target segments, the number of stops from the starting position to the first station in the at least two candidate routes is determined, and the recommended route is determined based on the number of stops.

[0160] For example, such as Figure 5 As shown in (a), only the first half of Route 1 has unobstructed stops. The level of congestion inside the public transport vehicles during the journey from 503 to 504 is unobstructed, that is, 503 is a stop with unobstructed congestion (i.e., the first stop). Route 1, which includes 503, is the recommended route.

[0161] For example, suppose the candidate routes include Route 1, Route 2, Route 3, and Route 4, where the target segments of Route 1 and Route 2 both include stops with a congestion level of "smooth flow," while the target segments of Route 3 and Route 4 do not include stops with a congestion level of "smooth flow." The recommended routes are determined based on the number of stops from the starting point to the smooth flow stops in Route 1 and Route 2.

[0162] In the above implementation, by determining whether the target segment of multiple candidate routes contains the first station (i.e., the station with a predicted congestion level lower than the preset congestion level), when only one candidate route contains the first station in its target segment, that candidate route is directly determined as the recommended route. This can identify routes with low congestion levels at the beginning, meaning that users can enter a comfortable carriage environment early in the journey. When multiple candidate routes contain the first station, the number of stops from the starting point to the first station in each candidate route is further compared, and the route with fewer stops is determined as the recommended route. Since fewer stops mean that users can enter a comfortable carriage environment earlier, this solution prioritizes recommending routes with lower congestion levels to users earlier, which can improve the comfort and rationality of travel route recommendations and enhance the user's travel experience.

[0163] In one implementation, the above method includes:

[0164] When the number of stops corresponding to at least two candidate routes is different, the candidate route corresponding to the minimum number of stops among the at least two candidate routes shall be determined as the recommended route.

[0165] When at least two candidate routes have the same number of stops, determine the number of stops at the first stop on the target segment of at least two candidate routes, and determine the candidate route with the most stops at the first stop as the recommended route.

[0166] In the embodiments of this application, among multiple candidate routes, if at least two candidate routes have a first station on their target road segment and the number of stops from the starting position to the first station is different, the route with fewer stops is determined as the recommended route; if at least two candidate routes have a first station on their target road segment and the number of stops from the starting position to the first station is the same, the route with more first stations on the target road segment is determined as the candidate route.

[0167] For example, suppose the candidate routes include Route 1, Route 2, Route 3 and Route 4, where the target segments of Route 1 and Route 2 both include stations with a congestion level of "smooth sailing", while the target segments of Route 3 and Route 4 do not include stations with a congestion level of "smooth sailing". The number of stops between the smooth sailing station on the target segment of Route 1 and the starting position is 2, and the number of stops between the smooth sailing station on the target segment of Route 2 and the starting position is 3. The number of stops from the starting position to the first station on the target segments of Route 1 and Route 2 is different. Since a smooth sailing station means that the number of people in the public transportation vehicle is less than the number of seats, that is, the user is likely to be able to get a seat at that station, Route 1 is determined as the recommended route.

[0168] For example, suppose the candidate routes include Route 1, Route 2, Route 3, and Route 4. Route 1 and Route 2 both include stops with a congestion level of "smooth flow" on their target segments, while Route 3 and Route 4 do not include stops with a congestion level of "smooth flow". The number of stops between the smooth flow stop and the starting point on Route 1's target segment is 2, and the number of stops between the smooth flow stop and the starting point on Route 2's target segment is 2. The number of stops from the starting point to the first stop on Route 1 and Route 2's target segments is the same. Further, we determine the number of first stops on the target segments of Route 1 and Route 2. Assuming that Route 1 has 4 stops with a congestion level of "smooth flow" (i.e., 4 first stops) on its target segment, and Route 2 has 3 stops with a congestion level of "smooth flow" (i.e., 3 first stops) on its target segment, Route 1 has more stops with a congestion level of "smooth flow" on its target segment than Route 2. Therefore, Route 1 is determined as the recommended route.

[0169] In one embodiment, at least two candidate routes have a first station on their target segments, and the number of stops from the starting point to the first station is the same, and the number of first stations on the target segments of at least two candidate routes is the same. The congestion value of the target segments of at least two candidate routes is calculated respectively, and the route with the lower congestion value is determined as the recommended route.

[0170] In another embodiment, at least two candidate routes have a first station on their target segments, and the number of stops from the starting position to the first station is the same, and the number of first stations on the target segments of at least two candidate routes is the same. The congestion value of the complete segment (from the starting position to the ending position) of the at least two candidate routes is calculated, and the route with the lower congestion value is determined as the recommended route.

[0171] In the above implementation, when the number of stops at the first station of at least two candidate routes is different, the number of stops from the starting point to the first station is compared, and the route with fewer stops is prioritized as the recommended route. Since users are more likely to enter the comfort zone earlier on routes with fewer stops and have a higher probability of securing a seat in the carriage, the route with fewer stops is determined as the recommended route in this case. When the number of stops from the starting point to the first station of at least two candidate routes is the same, the number of first stops on each route is further compared, and the route with more first stops on the target segment is determined as the recommended route. A higher number of first stops on the target segment means that the route has several less crowded stops in the early part of the route, i.e., fewer passengers in the carriage compared to other routes. Therefore, this route is determined as the recommended route, which can recommend less crowded routes to users, increasing the probability of users securing a seat in the carriage in the early part of the journey and improving the user's travel experience.

[0172] In the above embodiments, passenger flow in multiple candidate routes is predicted based on travel time, meaning that passenger flow in various public transportation modes (e.g., buses, subways, light rail, etc.) can be predicted during the user's travel time. Passenger flow can be used to predict the comfort level of each route, thereby determining a recommended route based on the comfort level of each route. Compared to existing technologies that recommend routes to users solely based on travel time and number of transfers, this solution can assess the comfort level of multiple candidate routes based on the user's travel time and passenger flow, determining the recommended route with higher comfort. In other words, it can recommend travel routes with less passenger flow and higher comfort to users, thereby improving the user experience.

[0173] The following is combined Figure 6 Another method for recommending travel routes provided in the embodiments of this application will be described in detail.

[0174] Figure 6This is a schematic flowchart illustrating another method for recommending travel routes provided in an embodiment of this application. Figure 6 As shown, method 600 includes S601 to S613, which are described in detail below.

[0175] For example, Figure 6 The method 600 shown can be executed by an electronic device, which may include a mobile terminal; or by a processor in the electronic device; or by a chip in the processor of the electronic device; or by a software platform integrated in the electronic device; or by an application in the mobile terminal; or by a server; or by a navigation platform deployed on the server; or by a navigation system with a predictive model.

[0176] S601. When a user is detected to have a need for public transportation navigation, obtain multiple candidate routes and travel times.

[0177] Among them, multiple candidate routes refer to multiple candidate routes from the starting point to the destination based on the user's public transportation navigation needs.

[0178] In embodiments of this application, the user's desired travel time is obtained, along with multiple candidate routes from multiple starting locations to multiple ending locations obtained based on the user's needs.

[0179] For example, if the system detects that the user inputs "People's Square" as the starting location and "Railway Station" as the destination location, it is determined that the user has a need for public transportation navigation. Three candidate routes can be generated based on these two input locations. In addition, the user can input the travel time, such as expecting to depart at 10:00 AM tomorrow.

[0180] Optionally, the implementation of S601 can be found in [reference needed]. Figure 1 The relevant descriptions in S110 will not be repeated here.

[0181] S602. Obtain the historical passenger flow of multiple candidate routes corresponding to the travel time.

[0182] In the embodiments of this application, passenger flow in public transportation vehicles on multiple candidate routes is determined based on travel time on historical dates.

[0183] For example, if the user inputs "People's Square" as the starting location and "Railway Station" as the destination, the navigation application can generate three candidate routes based on these two input locations. Additionally, the user can input their travel time, such as an expected departure time of 10:00 AM on the 15th. After obtaining the candidate routes and travel time, the application retrieves historical passenger flow information, specifically the passenger flow at each station along the candidate routes at 10:00 AM on the 14th, 13th, 12th, 11th, 10th, 9th, and 8th.

[0184] Optionally, the implementation of S602 can be found in [reference needed]. Figure 1 The relevant descriptions in S120 will not be repeated here.

[0185] S603. Determine the historical passenger flow inside the vehicle at each station based on the historical passenger flow of multiple candidate routes.

[0186] In the embodiments of this application, after obtaining the candidate routes and travel times, the historical passenger flow of multiple candidate routes is obtained. Based on the historical passenger flow of multiple candidate routes, the passenger flow in the carriages of each station on each candidate route is obtained, i.e., the historical passenger flow in the carriages.

[0187] For example, suppose the passenger flow in the carriage at station i on route A at time t is... Equal to the passenger flow in the carriage of the station i above station i Adding the traffic from site i Subtract the lost traffic Y from site i i t ,Right now

[0188] Optionally, the implementation of S603 can be found in [reference needed]. Figure 1 The relevant descriptions in S120 will not be repeated here.

[0189] S604. Perform abnormal data removal and normalization processing on the historical passenger flow data in vehicles at each station to obtain the target input data.

[0190] In the embodiments of this application, based on travel time, the passenger flow in public transportation vehicles on multiple candidate routes at travel times on historical dates is determined, and the above data is preprocessed and normalized to obtain target data.

[0191] Optionally, after preprocessing the data to remove outliers, zero-mean normalization (also known as standard deviation normalization, Z-score normalization, or Z-score standardization) can be used to normalize the data. Zero-mean normalization transforms the original data according to the mean and standard deviation of the features, resulting in a standard distribution with a mean of 0 and a standard deviation of 1. Zero-mean normalization can scale datasets with large variations or large values ​​to a certain range according to a uniform rule. Inputting the scaled data into a neural network model helps the model converge quickly and improves prediction accuracy.

[0192] Optionally, the implementation of S604 can be found in [reference needed]. Figure 1 The relevant descriptions in S120 will not be repeated here.

[0193] S605. Input the target input data into the Extreme Learning Machine prediction model and perform inverse normalization to obtain the predicted passenger flow inside the vehicle.

[0194] In the embodiments of this application, normalized data is input into the Extreme Learning Machine prediction model through the input layer, linear and nonlinear features in the input data are extracted through the hidden layer, and the in-vehicle pedestrian flow of multiple candidate routes is obtained through the input layer, that is, the in-vehicle pedestrian flow is predicted.

[0195] It should be understood that after the output layer generates the prediction results, the results need to be denormalized to convert them into predicted pedestrian flow.

[0196] Optionally, the implementation of S605 can be found in [reference needed]. Figure 1 The relevant descriptions in S120 will not be repeated here.

[0197] S606. Based on the predicted ratio of passenger flow to the number of seats in the vehicle, the congestion level of each station is determined.

[0198] Among them, the predicted passenger flow inside the vehicle is equivalent to Figure 1 The passenger flow inside vehicles on multiple candidate routes of S120, hereinafter referred to as passenger flow inside vehicles.

[0199] In the embodiments of this application, the predicted level of congestion is determined based on the ratio of passenger flow to the number of seats in the vehicle.

[0200] For example, when the ratio of passenger flow to seat count is less than 1 (i.e., the passenger flow divided by the seat count is less than 1), the congestion level is determined to be "smooth," with a congestion coefficient of 25. When the ratio is greater than 1 and less than 1.5 (i.e., the passenger flow divided by the seat count is greater than 1 and less than 1.5), the congestion level is determined to be "mildly congested," with a congestion coefficient of 50. When the ratio is greater than 1.5 and less than 2 (i.e., the passenger flow divided by the seat count is greater than 1.5 and less than 2), the congestion level is determined to be "moderately congested," with a congestion coefficient of 75. When the ratio is greater than 2 (i.e., the passenger flow divided by the seat count is greater than 2), the congestion level is determined to be "severely congested," with a congestion coefficient of 100. Recommended routes are then determined based on the congestion level.

[0201] Optionally, the implementation of S606 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0202] S607. Determine if there are any stations with a congestion level of "unimpeded" in the first half of the multiple candidate routes; if yes, proceed to S608; if no, proceed to S609.

[0203] In the embodiments of this application, it is determined whether there are stations with a level of congestion that are not congested in the first half of multiple candidate routes; if so, it is necessary to further determine whether there are stations with a level of congestion that are not congested in the first half of only one route, and execute S608; if not, it is necessary to determine the recommended route based on the overall congestion level of each candidate route, and execute S609.

[0204] Optionally, the implementation of S607 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0205] S608. Determine whether there is only one route among multiple candidate routes with a station in the first half of the route that is in a state of smooth congestion; if yes, proceed to S610; if no, proceed to S611.

[0206] In the embodiments of this application, it is determined whether there is only one route with a smooth congestion level in the first half of the multiple candidate routes; if there is only one route with a smooth congestion level in the first half of the route, then this route is directly determined as the recommended route, and S610 is executed; if there are at least two routes with a smooth congestion level in the first half of the route, then the recommended route needs to be determined based on the number of smooth stations in the first half of the at least two routes, and S611 is executed.

[0207] Optionally, the implementation of S608 can be found in [reference needed]. Figure 1The relevant descriptions in S130 will not be repeated here.

[0208] S609. Based on the weighted sum of the congestion level and the number of stations on each candidate route, the route with the smallest weighted sum is determined as the recommended route.

[0209] In the embodiments of this application, the congestion level of each candidate route is quantitatively evaluated, and a congestion level value is calculated for each route. The congestion level value can be equal to the number of stops where congestion persists divided by the total number of stops, multiplied by a weighted sum of congestion level coefficients, as shown in the following formula:

[0210]

[0211] Among them, V x L represents the congestion level of route x, c represents the degree of congestion, 1 represents smooth traffic, 2 represents light congestion, 3 represents moderate congestion, and 4 represents heavy congestion. x This represents the total distance of the x-th route. W represents the continuous distance with congestion level c in route x. c This represents the congestion coefficient. By calculating the congestion coefficient for each route, the route with the lowest congestion coefficient can be identified, and this route is recommended as the optimal route.

[0212] Optionally, the implementation of S609 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0213] S610. The candidate routes, including those with stations where the congestion level is "unimpeded", are identified as recommended routes.

[0214] In the embodiments of this application, the congestion level of each station on the candidate route at the travel time is obtained by predicting the historical passenger flow in the vehicle. If there are stations with a congestion level of "smooth flow" in the first half of the route, users who choose this route are likely to be able to get a seat in the first half. If only one candidate route among multiple candidate routes includes the first station in its target segment, this candidate route is determined as the recommended route.

[0215] Optionally, the implementation of S610 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0216] S611. Determine whether the number of stops from the starting position to the smooth station is the same in the candidate route where there are stations with a congestion level in the first half; if yes, proceed to S612; if no, proceed to S613.

[0217] In the embodiments of this application, it is determined whether the number of stops from the starting position to the smooth station is the same in the candidate route with a congestion level of the first half; if the number of stops is the same, it is necessary to further determine the congestion level of the first half of the candidate route and execute S612; if the number of stops is different, considering that the user can sit down earlier, the route with fewer stops is determined as the recommended route and S613 is executed.

[0218] Optionally, the implementation of S611 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0219] S612. The route with the most stations in the first half of the candidate route that are considered to be in a smooth flow of traffic is selected as the recommended route.

[0220] For example, suppose the candidate routes include Route 1, Route 2, Route 3, and Route 4. Route 1 and Route 2 both include stops with a congestion level of "smooth flow" on their target segments, while Route 3 and Route 4 do not include stops with a congestion level of "smooth flow". The number of stops between the smooth flow stop and the starting point on Route 1's target segment is 2, and the number of stops between the smooth flow stop and the starting point on Route 2's target segment is 2. The number of stops from the starting point to the first stop on Route 1 and Route 2's target segments is the same. Further, we determine the number of first stops on the target segments of Route 1 and Route 2. Assuming that Route 1 has 4 stops with a congestion level of "smooth flow" (i.e., 4 first stops) on its target segment, and Route 2 has 3 stops with a congestion level of "smooth flow" (i.e., 3 first stops) on its target segment, Route 1 has more stops with a congestion level of "smooth flow" on its target segment than Route 2. Therefore, Route 1 is determined as the recommended route.

[0221] Optionally, the implementation of S612 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0222] S613. The candidate route with the fewest stops from the starting point to the accessible station is determined as the recommended route.

[0223] For example, suppose the candidate routes include Route 1, Route 2, Route 3 and Route 4, where the target segments of Route 1 and Route 2 both include stations with a congestion level of "smooth sailing", while the target segments of Route 3 and Route 4 do not include stations with a congestion level of "smooth sailing". The number of stops between the smooth sailing station on the target segment of Route 1 and the starting position is 2, and the number of stops between the smooth sailing station on the target segment of Route 2 and the starting position is 3. The number of stops from the starting position to the first station on the target segments of Route 1 and Route 2 is different. Since a smooth sailing station means that the number of people in the public transportation vehicle is less than the number of seats, that is, the user is likely to be able to get a seat at that station, Route 1 is determined as the recommended route.

[0224] Optionally, the implementation of S613 can be found in [reference needed]. Figure 1 The relevant descriptions in S130 will not be repeated here.

[0225] Optionally, since the correlation between data gradually weakens as the time scale increases, the actual traffic flow of each site can be obtained periodically and compared with the traffic flow predicted by the Extreme Learning Machine prediction model. Based on the comparison results, the model can be corrected and trained, and the network parameters can be updated to maintain the accuracy of the prediction.

[0226] In the above embodiments, passenger flow in multiple candidate routes is predicted based on travel time, meaning that passenger flow in various public transportation modes (e.g., buses, subways, light rail, etc.) can be predicted during the user's travel time. Passenger flow can be used to predict the comfort level of each route, thereby determining a recommended route based on the comfort level of each route. Compared to existing technologies that recommend routes to users solely based on travel time and number of transfers, this solution can assess the comfort level of multiple candidate routes based on the user's travel time and passenger flow, determining the recommended route with higher comfort. In other words, it can recommend travel routes with less passenger flow and higher comfort to users, thereby improving the user experience.

[0227] The above text combined Figures 1 to 6 This application provides a detailed description of a method for recommending travel routes, as illustrated in its embodiments. The following will combine... Figure 7 and Figure 8 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0228] Figure 7 This is a schematic diagram of a travel route device provided in an embodiment of this application. The travel route device 700 includes an acquisition module 710 and a processing module 720.

[0229] The acquisition module is used to acquire the user's candidate routes and travel times. The candidate routes include multiple candidate routes obtained based on the start and end locations.

[0230] The processing module is used to predict the passenger flow inside multiple candidate routes based on travel time. The passenger flow inside the vehicle represents the passenger flow inside the public transportation vehicle on multiple candidate routes during the travel time. Based on the passenger flow inside the vehicle on multiple candidate routes, the recommended route is determined from the candidate routes.

[0231] Optionally, as an embodiment, the processing module 720 is specifically used to: determine the predicted congestion level of each station in the target road segment based on the in-vehicle passenger flow of each station in the target road segment among multiple candidate routes, wherein the target road segment is used to represent the road segment between the starting position and the preset station; and determine the recommended route based on the predicted congestion level of each station in the target road segment.

[0232] Optionally, as an embodiment, the processing module 720 is specifically used to: determine whether there is a first station in the target road segment based on the predicted congestion level of each station in the target road segment, wherein the first station is used to represent a station whose predicted congestion level is lower than a preset congestion level; when there is a first station in the target road segment, determine a recommended route based on the first station; when there is no first station in each station of the target road segment of multiple candidate routes, determine a recommended route based on the predicted congestion level of multiple candidate routes, wherein the predicted congestion level of multiple candidate routes is used to represent the congestion level inside the public transportation vehicle from the starting position to the ending position.

[0233] Optionally, as an embodiment, the processing module 720 is specifically used to: when there is a candidate route among multiple candidate routes whose target segment includes the first station, determine the candidate route including the first station as the recommended route; when there are at least two candidate routes among multiple candidate routes whose target segments include the first station, determine the recommended route based on the number of stops from the starting position to the first station in each of the at least two candidate routes.

[0234] Optionally, as an embodiment, the processing module 720 is specifically used to: when the number of stations corresponding to at least two candidate routes is different, determine the candidate route corresponding to the minimum number of stations among the at least two candidate routes as the recommended route; when the number of stations corresponding to at least two candidate routes is the same, determine the number of stations of the first station on the target road segment of the at least two candidate routes, and determine the candidate route with the most stations of the first station as the recommended route.

[0235] Optionally, as an embodiment, the processing module 720 is specifically used to: determine the historical passenger flow in multiple candidate routes based on travel time, wherein the historical passenger flow in multiple candidate routes represents the passenger flow in public transportation vehicles corresponding to the travel time on a historical date; perform data preprocessing and normalization on the historical passenger flow in multiple candidate routes to obtain target input data; input the target input data into an extreme learning machine prediction model, and process the target input data through the extreme learning machine prediction model to obtain the passenger flow in multiple candidate routes.

[0236] Optionally, as an embodiment, the processing module 720 is specifically used to: receive target input data through the input layer; perform feature extraction processing on the received target input data through at least one hidden layer to obtain features of the target input data, the feature extraction processing including extracting linear features and nonlinear features of the target input data; and generate in-vehicle passenger flow of multiple candidate routes based on the features of the target input data through the output layer.

[0237] Optionally, as an embodiment, the processing module 720 is further configured to: determine the predicted congestion level of each station in the multiple candidate routes based on the passenger flow and the number of seats in the multiple candidate routes; and determine the predicted congestion level of the multiple candidate routes based on the weighted sum of the predicted congestion level of each station in the multiple candidate routes and the number of stations in the multiple candidate routes.

[0238] It should be noted that the aforementioned route recommendation device 700 is embodied in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0239] For example, a "module" can be a software program, hardware circuitry, or a combination of both that implements the above-described functions. Hardware circuitry may include application-specific integrated circuits (ASICs), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.

[0240] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0241] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0242] For example, electronic device 800 includes: processor 810, memory 820 and executable program code 830.

[0243] For example, electronic device 800 includes one or more processors 810 that can support the route recommendation method in the method embodiments of electronic device 800. Processor 810 can be a general-purpose processor or a special-purpose processor. For example, processor 810 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0244] For example, processor 810 can be used to control electronic device 800, execute software programs, and process data from the software programs. Electronic device 800 may also include a communication unit for receiving and transmitting signals.

[0245] For example, the electronic device 800 may include one or more memories 820 storing executable program code 830. The executable program code 830 can be run by the processor 810 to generate instructions, causing the processor 810 to execute the route recommendation method described in the above method embodiments according to the instructions. For example, the processor 810 executes the following according to the instructions: obtaining the user's candidate routes and travel time, the candidate routes including multiple candidate routes obtained based on the start and end locations; predicting the in-vehicle passenger flow of the multiple candidate routes based on the travel time, the in-vehicle passenger flow being used to represent the passenger flow inside the public transportation vehicle among the multiple candidate routes during the travel time; and determining the recommended route among the candidate routes based on the in-vehicle passenger flow of the multiple candidate routes.

[0246] Optionally, the memory 820 may also store data. Optionally, the processor 810 may also read data stored in the memory 820, which may be stored at the same memory address as the executable program code 830, or the data may be stored at a different memory address than the executable program code 830.

[0247] For example, the processor 810 and memory 820 can be configured separately or integrated together, for example, integrated on the system-on-chip (SOC) of the terminal device.

[0248] For example, the memory 820 can be used to store related programs of the travel route recommendation method provided in the embodiments of this application, and the processor 810 can be used to call the executable program code 830 stored in the memory 820 when controlling the electronic device to execute the travel route recommendation method of the embodiments of this application.

[0249] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for recommending travel routes according to any of the foregoing embodiments.

[0250] The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROM), microdrives, and magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), dynamic random access memory (DRAM), video random access memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0251] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the travel route recommendation method in the above embodiments.

[0252] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute the travel route recommendation method in the above embodiments.

[0253] The electronic devices, computer-readable storage media, computer program products, or chips provided in this application are all used to execute the corresponding travel route recommendation method provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding travel route recommendation method provided above, and will not be repeated here.

[0254] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0255] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0256] The above description is merely a specific 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 scope of the technology 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 recommending travel routes, characterized in that, The method includes: Obtain the user's candidate routes and travel times, wherein the candidate routes include multiple candidate routes obtained based on the start and end locations; Based on the travel time, the passenger flow inside the vehicle on the multiple candidate routes is predicted, and the passenger flow inside the vehicle is used to represent the passenger flow inside the public transportation vehicle on the multiple candidate routes during the travel time. Based on the passenger flow inside the vehicles of the multiple candidate routes, a recommended route is determined from the candidate routes.

2. The recommended method according to claim 1, characterized in that, The step of determining the recommended route among the candidate routes based on the in-vehicle passenger flow of the multiple candidate routes includes: Based on the in-vehicle passenger flow at each station of the target road segment in the multiple candidate routes, the predicted congestion level of each station in the target road segment is determined, and the target road segment is used to represent the road segment between the starting position and the preset station; The recommended route is determined based on the predicted congestion levels of each station in the target road segment.

3. The recommended method according to claim 2, characterized in that, Determining the recommended route based on the predicted congestion levels of each station in the target road segment includes: Based on the predicted congestion level of each station in the target road segment, it is determined whether there is a first station in the target road segment, where the first station is used to represent a station where the predicted congestion level is lower than a preset congestion level; When the first station exists in the target road segment, the recommended route is determined based on the first station; When the first station is not present in any of the target segments of the plurality of candidate routes, the recommended route is determined based on the predicted congestion level of the plurality of candidate routes, wherein the predicted congestion level of the plurality of candidate routes is used to represent the congestion level inside the public transportation vehicle from the starting position to the ending position.

4. The recommended method according to claim 3, characterized in that, Determining the recommended route based on the first station includes: When one of the multiple candidate routes has a target road segment that includes the first station, the candidate route that includes the first station is determined as the recommended route. When at least two of the candidate routes include the first station in the target section, the recommended route is determined based on the number of stops from the starting position to the first station in each of the at least two candidate routes.

5. The recommended method according to claim 4, characterized in that, The step of determining the recommended route based on the number of stops from the starting position to the first station in each of the at least two candidate routes includes: When the number of stops corresponding to the at least two candidate routes is not the same, the candidate route corresponding to the minimum number of stops among the at least two candidate routes is determined as the recommended route; When the number of stops corresponding to the at least two candidate routes is the same, the number of stops of the first station on the target segment of the at least two candidate routes is determined, and the candidate route with the most stops of the first station is determined as the recommended route.

6. The recommendation method according to claim 1, characterized in that, The prediction of in-vehicle passenger flow based on the travel time includes: Based on the travel time, the historical passenger flow in the vehicles of the multiple candidate routes is determined. The historical passenger flow in the vehicles is used to represent the passenger flow in the public transportation vehicle corresponding to the travel time on a historical date. The historical in-vehicle passenger flow data of the multiple candidate routes is preprocessed and normalized to obtain the target input data; The target input data is input into the Extreme Learning Machine (ELM) prediction model, and the ELM prediction model processes the target input data to obtain the in-vehicle passenger flow for the multiple candidate routes.

7. The recommended method according to claim 6, characterized in that, The Extreme Learning Machine (ELM) prediction model includes an input layer, at least one hidden layer, and an output layer. The step of inputting the target input data into the ELM prediction model and processing the target input data through the ELM prediction model to obtain the in-vehicle passenger flow for the multiple candidate routes includes: The target input data is received through the input layer; The received target input data is processed by feature extraction through the at least one hidden layer to obtain the features of the target input data. The feature extraction process includes extracting linear features and nonlinear features of the target input data. The output layer generates the in-vehicle passenger flow for the multiple candidate routes based on the features of the target input data.

8. The recommended method according to any one of claims 3 to 5, characterized in that, Also includes: Based on the passenger flow and number of seats in the vehicles of the multiple candidate routes, the predicted congestion level of each station in the multiple candidate routes is determined. The predicted congestion level of the multiple candidate routes is determined by a weighted sum of the predicted congestion level of each station in the multiple candidate routes and the number of stations in the multiple candidate routes.

9. A travel route recommendation device, characterized in that, The device includes: The acquisition module is used to acquire the user's candidate routes and travel time, wherein the candidate routes include multiple candidate routes obtained based on the start and end locations; The processing module is configured to predict the in-vehicle passenger flow of the multiple candidate routes based on the travel time, wherein the in-vehicle passenger flow represents the passenger flow inside the public transportation vehicles on the multiple candidate routes during the travel time; and determine the recommended route among the candidate routes based on the in-vehicle passenger flow of the multiple candidate routes.

10. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 8.