A subway passenger flow built environment feature analysis method based on large language model ensemble learning
Patent Information
- Application Number
- CN202610710821.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-05-22
AI Technical Summary
[0005]为了解决背景技术中存在的问题,本发明提供了一种基于大语言模型集成学习的地铁客流建成环境特征分析方法,解决了现有技术存在单一模型易受训练数据分布局限而产生地域性偏见与知识盲区,且易产生AI幻觉、缺乏群体校验机制,导致结果可靠性差;同时采用对称性评估指标,忽视低估客流量的严重后果,且缺乏平滑修正项,导致数值不稳定、易受小值干扰的技术问题
[0045]1. The method of this invention employs a step-by-step testing, verification, and fusion decision-making mechanism, which can effectively identify and filter out erroneous outputs from single models. Simultaneously, by integrating the analytical conclusions of multiple large language models, it provides highly interpretable decision-making basis, breaking through the black-box dilemma of traditional predictive models. This invention can provide urban planning with scientific, rapid, and low-cost pre-assessment, and has stronger practical significance and application value compared to traditional analytical methods.
Smart Images

Figure CN122242981B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of urban transportation planning, and specifically relates to a method for analyzing the built environment characteristics of subway passenger flow based on integrated learning of large language models. Background Technology
[0002] Against the backdrop of rapid urbanization, accurately understanding and quantifying the impact of the built environment on subway passenger flow is of crucial scientific value and practical significance for optimizing urban spatial layout, improving the efficiency of public transportation services, and guiding transportation-oriented urban planning and development. A passenger flow influencing factor analysis model that can provide in-depth insights and has high interpretability is the cornerstone for achieving scientific and refined urban traffic management and planning decisions.
[0003] In exploring the impact of the built environment on passenger flow, traditional machine learning models, while mature in processing structured data, struggle to effectively integrate unstructured textual information such as regional functional positioning and planning schemes. Furthermore, their analysis process often resembles a "black box," failing to provide logical and persuasive explanations for the conclusions. In recent years, artificial intelligence technologies, represented by large language models, have demonstrated superior text understanding, logical reasoning, and pattern recognition capabilities based on their powerful self-attention mechanisms and massive data training. These technologies enable a deep understanding of the physical meaning of built environment indicators, overcoming the limitations of traditional "black box" models and providing more interpretable analysis of the complex nonlinear relationship between the built environment and passenger flow.
[0004] In applying large language models to urban planning, the use of single models and static, general evaluation indicators has significant drawbacks. Current methods often rely on a single large language model, which, limited by the distribution of specific training datasets, is prone to severe regional bias. For example, if the training data mainly originates from a specific economically developed region, the model may overly favor planning patterns from that region, creating knowledge gaps regarding urban development needs under different climates and cultural backgrounds, leading to poor reliability and stability of the analysis results. Furthermore, single models are prone to generating fictitious data in complex traffic forecasting and lack effective group decision-making verification mechanisms, making it difficult to guarantee high reliability and in-depth interpretability of traffic analysis results. In addition, existing analytical methods often use symmetric indicators to evaluate prediction effectiveness, failing to consider the serious consequences of underestimating passenger flow at busy stations in traffic scheduling. This neglect of the risk of underestimating predictions directly leads to insufficient capacity allocation, making the model lack robustness in actual scheduling. Moreover, the lack of smoothing correction terms often results in numerical instability, making it susceptible to prediction bias due to small actual values. Summary of the Invention
[0005] To address the problems existing in the background technology, this invention provides a method for analyzing the characteristics of subway passenger flow construction environment based on integrated learning of large language models. This method solves the problems of existing technologies, which are prone to regional bias and knowledge blind spots due to the limited distribution of training data, and are also prone to AI illusions and lack a group verification mechanism, resulting in poor reliability of results. At the same time, the use of symmetric evaluation indicators ignores the serious consequences of underestimating passenger flow and lacks a smoothing correction term, resulting in unstable values and susceptibility to interference from small values.
[0006] The technical solution adopted in this invention is:
[0007] I. A Method for Analyzing the Built Environment Characteristics of Subway Passenger Flow Based on Ensemble Learning of Large Language Models:
[0008] S1. Collect and acquire travel data from the city's subway automatic fare collection system and passenger smart cards. Based on the travel data, divide it into input data and tag data. Based on the input data, divide it into verification input data and verification tag data.
[0009] S2. Collect and acquire multi-source built environment data, preprocess the multi-source built environment data, construct multi-dimensional indicator data based on the preprocessed multi-source built environment data, standardize the multi-dimensional indicator data, and obtain standardized multi-dimensional indicator data.
[0010] S3. Select several pre-trained large language models, and train each pre-trained large language model according to the input data, label data, validation input data, validation label data, and standardized multi-dimensional index data to obtain several corresponding final trained large language models.
[0011] S4. Use the loss value calculated at the last time during the training process of each large language model as the comprehensive performance index, and obtain the performance weight of each large language model based on the comprehensive performance index of each large language model.
[0012] S5. Based on passenger data, standardized multi-dimensional indicator data, various large language models and their corresponding performance weights, obtain the analysis results and optimization suggestions for subway construction.
[0013] Step S1 specifically involves:
[0014] S11. Collect and obtain all weekday peak-hour travel data from the automatic fare collection system and passenger smart cards of the city's subway system for a preset continuous time period. Divide the travel data into a first time period and a second time period in chronological order according to a preset ratio. Use the first time period travel data as input data and the second time period travel data as tag data.
[0015] The weekday peak-hour travel data includes morning peak boarding data, morning peak alighting data, evening peak boarding data, and evening peak alighting data.
[0016] S12. Divide the label data into a first time period label data and a second time period label data in a preset ratio according to the time sequence, and use the first time period label data as the verification input data and the second time period label data as the verification label data.
[0017] Step S2 specifically involves:
[0018] S21. Collect multi-source built environment data, including building data, road network data, and socio-economic data, within the walking-accessible area, centered on each subway station.
[0019] S22. Perform data cleaning on the building data, road network data, and socioeconomic data in the multi-source built environment data. Then, reclassify the cleaned building data. The cleaned road network data, cleaned socioeconomic data, and reclassified building data are combined to obtain new multi-source built environment data.
[0020] S23. Construct multi-dimensional indicator data based on new multi-source built environment data, including density dimension, diversity dimension, design dimension, destination accessibility dimension, and site characteristic dimension.
[0021] S24. Standardize the multi-dimensional indicator data to obtain standardized multi-dimensional indicator data.
[0022] The density dimension includes population density, building density, bus route density, and bus stop density; the diversity dimension includes land use mixed entropy; the design dimension includes road network density and number of intersections; the destination accessibility dimension includes the distance from each subway station to the central business district; and the station characteristic dimension includes the distance from the station to the central business district, whether each subway station is a terminal station, and whether each subway station is a transfer station.
[0023] Step S3 specifically involves:
[0024] S31. Input the input data and preset prompt words into the pre-trained large language model for processing to obtain the predicted ride data. Calculate the first loss value based on the predicted ride data and label data. Update the large language model based on the first loss value to obtain the updated large language model.
[0025] S32. Input the standardized multi-dimensional indicator data and preset prompt words into the updated large language model for processing to obtain the secondary predicted ride data. Calculate the second loss value based on the secondary predicted ride data and label data. Update the large language model again based on the second loss value to obtain the second updated large language model.
[0026] S33. Input the verification input data and preset prompt words into the large language model after the second update for processing to obtain the three predicted ride data. Calculate the third loss value based on the three predicted ride data and the verification label data. Update the large language model again based on the third loss value to obtain the large language model after the three updates, which is the final trained large language model.
[0027] S34. Select several pre-trained large language models. Train each pre-trained large language model in the same way as steps S31-S33 to obtain several corresponding final trained large language models.
[0028] Step S4 specifically involves:
[0029] S41. The third loss value calculated during the training process of each large language model is used as the comprehensive performance index.
[0030] S42. After normalizing the overall performance index of all large language models, the performance weights of each large language model are obtained.
[0031] The loss function for each of the large language models is set according to the following formula:
[0032]
[0033]
[0034]
[0035]
[0036]
[0037] in, The loss function representing a large language model; Indicates the R² value; This indicates the asymmetric mean square relative error; The A20 index is represented; MAPE represents the mean absolute percentage error. The basic penalty term is represented by k; the asymmetry factor is represented by c; and the smoothing value is represented by c. The indicator function is represented by ; i represents the index; n represents the total number of samples of the three predicted ride data or verification label data. Indicates the first Error per sample, ; This represents the value of the i-th sample in the verification label data; This represents the value of the i-th sample in the three predicted ride data sets; This represents the average value of all samples in the validation label data.
[0038] Step S5 specifically involves:
[0039] S51. Based on the passenger data, standardized multi-dimensional indicator data and preset prompt words, input them into each of the finally trained large language models for processing to obtain the subway construction analysis results output by the corresponding large language model. The subway construction analysis results obtained from each large language model are weighted and fused according to their corresponding performance weights to obtain the final analysis result.
[0040] S52. Input the final analysis results and preset prompts into each of the finally trained large language models to obtain the corresponding optimization suggestions for subway construction. Integrate all the optimization suggestions to obtain the final optimization suggestions.
[0041] II. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0042] 3. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0043] The innovation of this invention lies in the following: The asymmetric mean square relative error in the loss function proposed in this invention specifically increases the penalty for underestimating passenger flow at busy stations. While considering the instability of low-passenger-flow stations, it avoids the risk of insufficient capacity allocation caused by underestimating the predicted value, significantly improving the robustness of the model in actual scheduling. Furthermore, the method of this invention no longer relies on any single large language model, but organizes and utilizes an advisory group composed of multiple heterogeneous large language models through a systematic initialization, step-by-step prediction and verification aggregation decision process. This ensures the high reliability of traffic analysis results while achieving trustworthy deep interpretability.
[0044] The beneficial effects of this invention are:
[0045] 1. The method of this invention employs a step-by-step testing, verification, and fusion decision-making mechanism, which can effectively identify and filter out erroneous outputs from single models. Simultaneously, by integrating the analytical conclusions of multiple large language models, it provides highly interpretable decision-making basis, breaking through the black-box dilemma of traditional predictive models. This invention can provide urban planning with scientific, rapid, and low-cost pre-assessment, and has stronger practical significance and application value compared to traditional analytical methods.
[0046] 2. The loss function proposed in this invention addresses the serious consequences of neglecting and underestimating passenger flow in existing technologies, as well as the lack of a smoothing correction term, which leads to numerical instability and susceptibility to small values. In particular, the asymmetric mean square relative error fully considers the differentiated consequences of different types of errors in rail transit operations, specifically increasing the penalty for underestimating passenger flow at busy stations. While effectively addressing the numerical instability caused by the small base number at low-passenger-flow stations, this indicator can avoid the risk of insufficient traffic capacity allocation due to underestimating values, significantly improving the robustness of the model in actual scheduling scenarios. Attached Figure Description
[0047] Figure 1 This is a flowchart of the method of the present invention.
[0048] Figure 2 This is a flowchart illustrating the training of a single pre-trained large language model in the method of this invention.
[0049] Figure 3 This is a schematic diagram showing the area accessible by foot. Detailed Implementation
[0050] The present invention will now be described in more detail with reference to the accompanying drawings and embodiments. However, the present invention is not limited thereto. For those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention. Contents not described in detail in this specification are prior art known to those skilled in the art.
[0051] Example 1:
[0052] like Figure 1 As shown, the subway passenger flow built environment characteristic analysis method in this embodiment includes the following steps:
[0053] S1. Collect and obtain the travel data from the automatic fare collection system and passenger smart cards of all city subways within the preset range, divide the travel data into input data and tag data, and divide the input data into verification input data and verification tag data.
[0054] S11. Collect and obtain all weekday peak-hour travel data from the automatic fare collection system and passenger smart cards of the city's subway system for a preset continuous time period. Divide the travel data into a first time period and a second time period in chronological order according to a preset ratio. Use the first time period travel data as input data and the second time period travel data as tag data.
[0055] The weekday peak-hour travel data includes morning peak boarding data, morning peak alighting data, evening peak boarding data, and evening peak alighting data.
[0056] The morning rush hour is from 7:00 AM to 9:00 AM, and the evening rush hour is from 5:00 PM to 7:00 PM. Each sample of travel data includes time, location, and whether the passenger entered or exited the station.
[0057] S12. Divide the label data into a first time period label data and a second time period label data in a preset ratio according to the time sequence, and use the first time period label data as the verification input data and the second time period label data as the verification label data.
[0058] S2. Collect and acquire multi-source built environment data, preprocess the multi-source built environment data, construct multi-dimensional indicator data based on the preprocessed multi-source built environment data, standardize the multi-dimensional indicator data, and obtain standardized multi-dimensional indicator data.
[0059] S21. Collect multi-source built environment data, including building data, road network data, and socio-economic data, within the walking-accessible area, centered on each subway station.
[0060] In practice, a walkable area is formed by pre-setting a walking radius centered on the subway station. Building data includes building locations (used to count the number of buildings and calculate building density). Road network data includes road centerlines (used to count the number of roads and calculate road network density) and intersection locations (used to count the number of intersections). Socioeconomic data includes population distribution data (used to calculate population density), bus route data (used to count the number of bus routes and calculate bus route density), bus stop locations (used to count the number of bus stops and calculate bus stop density), POI data (including category and quantity, used to calculate land use mixing entropy), subway station locations and attributes (whether it is a terminal station or a transfer station, used for station feature dimensions), and central business district location coordinates (used to calculate the distance from each station to the CBD).
[0061] S22. Perform data cleaning on the building data, road network data, and socioeconomic data in the multi-source built environment data. Then, reclassify the cleaned building data. The cleaned road network data, cleaned socioeconomic data, and reclassified building data are combined to obtain new multi-source built environment data.
[0062] In practice, the building data after cleaning is reclassified as follows:
[0063] First, irrelevant categories are eliminated, removing categories that have very little relevance to residents' daily public transportation needs or cannot reflect the characteristics of the built environment. These mainly include car service categories (such as gas stations, car repair shops, etc.), temporary construction sites or abandoned sites, natural geographical entities (such as mountains, rivers, etc.), single-function vending machines or newsstands, and abstract geographical landmarks.
[0064] Secondly, the building categories were restructured and refined, dividing the retained buildings into five major categories: residential, commercial, industrial, public management, and green space, and assigning them secondary codes. The residential category was unified into residential communities (R); the commercial category was further subdivided into seven subcategories: catering (C1), hotels (C2), shops (C3), life services (C4), leisure and entertainment (C5), business training (C6), and banking (C7); the industrial category specifically includes enterprises (I1) and high-rise office buildings (I2); the public management category was integrated into four subcategories: medical (P1), education (P2), culture and media (P3), and administrative institutions (P4); and the green space category includes parks (G1) and nature reserves (G2).
[0065] S23. Construct multi-dimensional indicator data based on new multi-source built environment data, including density dimension, diversity dimension, design dimension, destination accessibility dimension, and site characteristic dimension.
[0066] The density dimension includes population density, building density, bus route density, and bus stop density; the diversity dimension includes land use mix entropy; the design dimension includes road network density and number of intersections; the destination accessibility dimension includes the distance from each subway station to the central business district; and the station characteristic dimension includes the distance from the station to the central business district, whether each subway station is a terminal station, and whether each subway station is a transfer station.
[0067] Specifically, density dimension: Based on multi-source built environment data, the population density, building density, bus route density, and bus stop density are obtained by statistically analyzing the number of people, buildings, bus routes, and bus stops per square kilometer within the walkable area.
[0068] The land use mixed entropy is obtained by processing it according to the following formula:
[0069] ;
[0070] in, Represents the entropy of land use mixture; For indexing; The number of categories of points of interest (e.g., restaurants, hotels, business training, etc.); Indicates the first The number of points of interest; Total number of points of interest; For the first The proportion of similar interest points.
[0071] Design dimensions: The road network density is obtained by counting the number of roads per square kilometer within the walkable area based on multi-source built environment data, and the number of intersections per square kilometer within the walkable area is also counted based on multi-source built environment data.
[0072] Destination accessibility dimension: Destination accessibility is obtained by calculating the distance from each subway station to the central business district based on multi-source built environment data;
[0073] Station feature dimensions: Based on multi-source built environment data, the distance from each subway station to the central business district, whether it is a terminal station and whether it is a transfer station are statistically analyzed to obtain station distance, terminal station identification and transfer station identification respectively.
[0074] S24. Standardize the multi-dimensional indicator data to obtain standardized multi-dimensional indicator data, so as to eliminate the influence of different variables on the model analysis due to different units.
[0075] S3. Select several pre-trained large language models, and train each pre-trained large language model according to the input data, label data, validation input data, validation label data, and standardized multi-dimensional index data to obtain several corresponding final trained large language models.
[0076] like Figure 2 As shown in step S31, the input data and preset prompt words are input into the pre-trained large language model for processing to obtain the predicted ride data. The first loss value is calculated based on the predicted ride data and the label data. The large language model is updated based on the first loss value to obtain the updated large language model.
[0077] In this embodiment, the preset prompt in this step is "Based on the input real data of urban subway travel time, perform passenger flow prediction learning. You need to identify the passenger flow change patterns of different stations during weekday peak hours, combine the time sequence relationship, and infer the travel data of the corresponding label time period from the historical input data. The output results should maintain numerical consistency, temporal rationality, and interpretability of differences between stations, and must not fabricate non-existent data."
[0078] S32. Input the standardized multi-dimensional indicator data and preset prompt words into the updated large language model for processing to obtain the secondary predicted ride data. Calculate the second loss value based on the secondary predicted ride data and label data. Update the large language model again based on the second loss value to obtain the second updated large language model.
[0079] In this embodiment, the preset prompt in this step is: "Based on the input standardized multi-dimensional built environment index data, analyze the correlation between the built environment characteristics around each subway station and passenger flow. You need to identify key factors that have a significant impact on passenger flow changes from the dimensions of density, diversity, design, destination accessibility, and station characteristics, and correct and output the prediction results for the target passenger data accordingly."
[0080] S33. Input the verification input data and preset prompt words into the large language model after the second update for processing to obtain the three predicted ride data. Calculate the third loss value based on the three predicted ride data and the verification label data. Update the large language model again based on the third loss function to obtain the large language model after the three updates, which is the final trained large language model.
[0081] In practice, the dimensions of the predicted ride data and the label data are the same, the dimensions of the secondary predicted ride data and the label data are also the same, and the dimensions of the tertiary predicted ride data and the verification label data are the same.
[0082] In this embodiment, the preset prompt in this step is: "Verify and correct the aforementioned prediction results based on the input real data. You need to combine the characteristics of the passenger data in the verification stage to evaluate the deviation between the current model prediction results and the verification label data, and further optimize the model parameters so that the model has higher prediction accuracy, robustness and generalization ability in peak passenger flow scenarios, especially reducing the risk of underestimating passenger flow at busy stations."
[0083] S34. Select several pre-trained large language models. Train each pre-trained large language model in the same way as steps S31-S33 to obtain several corresponding final trained large language models.
[0084] S4. Use the loss value calculated at the last time during the training process of each large language model as the comprehensive performance index, and obtain the performance weight of each large language model based on the comprehensive performance index of each large language model.
[0085] S41. The third loss value calculated during the training process of each large language model is used as the comprehensive performance index.
[0086] The loss function for each large language model is set according to the following formula:
[0087]
[0088]
[0089]
[0090]
[0091]
[0092] in, The loss function representing a large language model; Indicates the R² value; This indicates the asymmetric mean square relative error; The A20 index is represented; MAPE represents the mean absolute percentage error. The basic penalty term is represented by k; the asymmetry factor is represented by c; and the smoothing value is represented by (a very small constant that controls the stability for smaller true values, taking a value of...). (0.1%) The indicator function is 1 if the condition is met, and 0 otherwise; i represents the index; n represents the total number of samples of the three predicted ride data or verification label data. Indicates the first Error per sample, ; This represents the value of the i-th sample in the verification label data; This represents the value of the i-th sample in the three predicted ride data sets; This represents the average value of all samples in the validation label data.
[0093] This indicates an underestimation of the indicator function, when hour =1, otherwise =0; This indicates an overestimation of the indicator function, when hour =1, otherwise =0.
[0094] S42. After normalizing the overall performance index of all large language models, the performance weights of each large language model are obtained.
[0095] S5. Based on passenger data, standardized multi-dimensional indicator data, various large language models and their corresponding performance weights, obtain the analysis results and optimization suggestions for subway construction.
[0096] S51. Based on the passenger data, standardized multi-dimensional indicator data and preset prompt words, input them into each of the finally trained large language models for processing to obtain the subway construction analysis results output by the corresponding large language model. The subway construction analysis results obtained from each large language model are weighted and fused according to their corresponding performance weights to obtain the final analysis result.
[0097] In this embodiment, the preset prompt for this step is: "Based on the input real passenger data and standardized multi-dimensional built environment index data, please conduct a comprehensive analysis of the relationship between subway station passenger flow and built environment characteristics. You need to identify the key built environment factors affecting changes in subway passenger flow, explain the direction, degree, and possible interaction of each factor's influence on passenger flow, and output interpretable analysis results. The analysis results should highlight the core variables closely related to passenger flow at busy stations, and must not fabricate non-existent factors or relationships."
[0098] The analysis results of subway construction obtained from various large language models are weighted and fused according to their corresponding performance weights to obtain the final analysis result.
[0099] 1. Input the conclusions of each large language model into a new large language model, and require it to output a "factor list" in JSON format.
[0100] For example: {"factor": "number of businesses and restaurants", "direction": "positive", "outcome": "passenger flow during evening rush hour", "condition": "the closer to the city center, the stronger", "weight": 0.195}.
[0101] 2. Merge identical factors (string matching or semantic similarity clustering) and accumulate the weights.
[0102] 3. Output the data in descending order of weight, and then call this new large language model to generate a natural language summary.
[0103] S52. Input the final analysis results and preset prompts into each of the finally trained large language models to obtain the corresponding optimization suggestions for subway construction. Integrate all the optimization suggestions to obtain the final optimization suggestions.
[0104] In this embodiment, the preset prompt for this step is: "Based on the final analysis results, please provide targeted suggestions for subway construction and optimization of the built environment around stations. You need to combine the identified key built environment factors and their impact on passenger flow, and provide feasible, interpretable and forward-looking optimization suggestions, focusing on reducing the capacity allocation risk of busy stations, improving station distribution efficiency and the overall coordination of urban rail transit operation. You must not output suggestions that are unrelated to the analysis results."
[0105] This embodiment also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method of the present invention.
[0106] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method of the present invention.
[0107] Example 2:
[0108] This embodiment is implemented using the same steps as the previous embodiment, and this embodiment uses several subway stations along several lines in a certain city as the research sample.
[0109] S11. Collect and obtain passenger data from the automatic fare collection system and passenger smart cards for four consecutive months. By processing the raw card swipe records, calculate the passenger flow entering and exiting each station during specific time periods. To achieve more refined analysis, weekday passenger flow is further divided into four variable categories: morning peak boarding data, morning peak alighting data, evening peak boarding data, and evening peak alighting data.
[0110] S12. Divide the ride data into a 3:1 ratio of input data for the first 3 months and label data for the last month, and then divide the label data into a 1:1 ratio of half-month verification input data and half-month verification label data.
[0111] Figure 3 The terrain and subway station locations shown in the schematic diagram are fictional designs. S21. Define a 600-meter walkable area centered on each subway station. Collect multi-source built environment data within the walkable area, including building data, road network data, and socioeconomic data.
[0112] Specifically, multi-source built environment data is collected at the current moment. If there is overlap in the walkable areas of adjacent stations, methods such as Thiessen polygons can be used for division. If the walkable area contains invalid areas such as water bodies, they are removed using geographic information system software. Within the defined walkable area, the collected data includes at least: building data from platforms such as a map app for detailed functional classification of land use; high-resolution satellite remote sensing imagery data from platforms such as a map app for reference in land use classification; road network data obtained from OpenStreetMap to calculate road density and the number of intersections; and socioeconomic data obtained from housing price data from platforms such as Lianjia.com and population raster data from WorldPop.
[0113] S22. The building data is cleaned and reclassified sequentially to better align with traffic demand analysis. For example, categories unrelated to public transportation such as car services are removed, and categories are merged or split as needed. Road network data and socioeconomic data are also cleaned separately and then merged to obtain new multi-source built environment data.
[0114] S23. Construct multi-dimensional indicator data based on new multi-source built environment data, including density dimension, diversity dimension, design dimension, destination accessibility dimension, and site characteristic dimension;
[0115] S24. Standardize the multi-dimensional indicator data to obtain standardized multi-dimensional indicator data;
[0116] In this embodiment, a total of 5 pre-trained large language models were selected, namely Model A (Gemini 2.5 Flash from Google), Model B (GPT-4o from OpenAI), Model C (Grok 1.5 from xAI), Model D (DS-R1 from DeepSeek), and Model E (Qwen 1.8 from Alibaba).
[0117] The training process for Model A is as follows:
[0118] S31. Input the input data of 3 months and the preset prompt words into the pre-trained model A for processing to obtain the predicted ride data of 1 month. Calculate the first loss value based on the predicted ride data of 1 month and the label data of 1 month. Update the large language model based on the first loss value to obtain the updated model A.
[0119] S32. Input the standardized multi-dimensional indicator data and preset prompt words into the updated model A for processing to obtain the secondary predicted ride data. Calculate the second loss value based on the secondary predicted ride data and label data. Update model A again based on the second loss value to obtain the second updated model A.
[0120] S33. Input the verification input data and preset prompt words of half a month into the model A after the second update for processing to obtain the three predicted ride data of half a month. Calculate the third loss value based on the three predicted ride data of half a month and the verification label data of half a month. Update model A again based on the third loss value to obtain the model A after the three updates, which is the final trained model A.
[0121] S34. Following the same method as steps S31-S33, train models B, C, D, and E respectively to obtain the final trained models B, C, D, and E.
[0122] S41. The third loss value obtained by model A during training is used as the comprehensive performance index of model A = 2.14; similarly, the comprehensive performance index of model B is 2.38; the comprehensive performance index of model C is 1.95; the comprehensive performance index of model D is 2.45; and the comprehensive performance index of model E is 2.08.
[0123] The normalized performance weights of the comprehensive performance indices of models S42, A, B, C, D, and E are 0.195, 0.216, 0.177, 0.223, and 0.189, respectively.
[0124] S51. Based on the passenger data, multi-source built environment data, and preset prompts, the data are input into the finally trained models A, B, C, D, and E. The analysis results obtained are as follows:
[0125] The analysis results of Model A show that the number of commercial and catering facilities is the most critical positive factor affecting passenger flow alighting during the evening peak, and this positive correlation increases exponentially with decreasing distance from the city center, but its predictive effect is relatively weak in low-density residential areas. The analysis results of Model B show that the density of high-rise office buildings in the industrial sector has a decisive impact on passenger flow alighting during the morning peak, and that the land use mixed entropy in the range of 0.6 to 0.8 has the most significant promoting effect on passenger flow. The analysis results of Model C show that the number of bus stops and road intersections has a strong promoting relationship with passenger flow boarding during the evening peak, but the prediction of peak passenger flow fluctuates when dealing with high-density road networks outside the central business district. The analysis results of Model D show that population density and residential communities have a significant nonlinear threshold effect on passenger flow, especially identifying a significant promoting effect of high-density residential areas on passenger flow at busy stations. The analysis results of Model E show that educational and medical facilities have a significant promoting effect on passenger flow during the morning peak, and that the terminal station attribute of subway stations has a terminal convergence effect in long-distance commutes.
[0126] The final analysis results show that the density of high-rise office buildings and the mixed entropy of land use are the core driving forces of morning peak passenger flow, while the completeness of the public transportation connection system determines the coverage boundary of passenger flow services.
[0127] S52. Input the final analysis results and preset prompts into each of the finally trained models A, B, C, D, and E to obtain the primary optimization suggestions for subway construction output by models A, B, C, D, and E respectively. These suggestions are: increase short-distance shuttle buses around core business districts; optimize the configuration of entrance gates during the morning rush hour in densely populated office areas; strengthen the construction of bus-subway transfer channels in peripheral residential areas; expand and renovate stations around old, high-density residential areas to cope with surges in passenger flow; and reserve tidal lanes around terminal stations to alleviate instantaneous evacuation pressure. The final optimization suggestion is to prioritize the implementation of a "high-mixed land development + micro-circulation connection densification" strategy in urban CBDs and high-density employment centers. For identified potential "busy stations," expand platform capacity and optimize entry and exit flow in advance. At the same time, along newly built rail transit corridors, the scale of single residential land should be controlled, and multi-functional mixed development under the TOD (Transit-Oriented Development) model should be encouraged to balance the distribution of passenger flow throughout the day and reduce the risk of capacity allocation.
[0128] Comparative Example 1:
[0129] This comparative example collects passenger data for four consecutive months and current multi-source built environment data using the same method as in Example 2, and processes the data to obtain standardized multi-dimensional indicator data.
[0130] This comparative example uses only one pre-trained model A. The passenger data, standardized multi-dimensional indicator data, and preset prompts are directly input into the pre-trained model A. The analysis results show that the key built environment factors mainly include population density of commercial, catering, and office facilities, green space and leisure facilities, density of public transport connection stations, land use mix, distance from the city center, and road network density. Among these, the number of commercial and catering facilities is the most critical positive factor affecting passenger flow during the evening rush hour. The optimization suggestion is to increase short-distance shuttle buses around the core business district.
[0131] Compared to Example 2, this comparative example relies solely on a single large language model for analysis. Due to the lack of an advisory group composed of multiple heterogeneous large language models and an aggregated decision-making process of step-by-step prediction and verification, the model exhibits significant inherent biases and AI illusions when processing complex built environment data. It fails to fully identify the deep-seated interactive effects of factors such as office building density and land use, resulting in serious knowledge blind spots in the output traffic analysis results. Consequently, it cannot provide highly reliable and deeply interpretable preliminary assessment basis for urban planning.
[0132] Comparative Example 2:
[0133] This comparative example is implemented using the same method as Example 2, except that the loss function for each large language model is adopted in the following form:
[0134]
[0135] The remaining methods and steps are the same as in Example 2. The final analysis results are: road network density, distance from the city center, green space and recreational facilities, commercial and office facilities, population density, public transport connection station density, and land use mix. The optimization suggestion is to prioritize increasing the road network density around the stations and expanding the park green space area.
[0136] Compared with Example 2, this comparative example does not use asymmetric mean square relative error, and the general symmetric evaluation index fails to specifically increase the penalty for underestimating passenger flow at busy stations. As a result, the integrated model lacks vigilance when facing extreme peak passenger flow, ignores the numerical instability of low passenger flow stations, and is very likely to cause the risk of insufficient traffic capacity allocation due to underestimation of predicted values, which greatly reduces the robustness of the model in actual scheduling and planning decisions.
[0137] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.
Claims
1. A subway passenger flow built environment feature analysis method based on large language model ensemble learning, characterized in that, Includes the following steps: S1. Collect and acquire travel data from the city's subway automatic fare collection system and passenger smart cards, divide the travel data into input data and tag data, and divide the input data into verification input data and verification tag data. S2. Collect and acquire multi-source built environment data, preprocess the multi-source built environment data and construct multi-dimensional indicator data based on the preprocessed multi-source built environment data, standardize the multi-dimensional indicator data, and obtain standardized multi-dimensional indicator data. S3. Select several pre-trained large language models, and train each pre-trained large language model according to the input data, label data, validation input data, validation label data and standardized multi-dimensional index data to obtain several corresponding final trained large language models. Step S3 specifically involves: S31. Input the input data and preset prompt words into the pre-trained large language model for processing to obtain the predicted ride data. Calculate the first loss value based on the predicted ride data and label data. Update the large language model based on the first loss value to obtain the updated large language model. S32. Input the standardized multi-dimensional indicator data and preset prompt words into the updated large language model for processing to obtain the secondary predicted ride data. Calculate the second loss value based on the secondary predicted ride data and label data. Update the large language model again based on the second loss value to obtain the second updated large language model. S33. Input the verification input data and preset prompt words into the large language model after the second update for processing to obtain the three predicted ride data. Calculate the third loss value based on the three predicted ride data and the verification label data. Update the large language model again based on the third loss value to obtain the large language model after the three updates, which is the final trained large language model. S34. Select several pre-trained large language models. Train each pre-trained large language model in the same way as steps S31-S33 to obtain several corresponding final trained large language models. S4. Use the loss value calculated at the last time during the training process of each large language model as the comprehensive performance index, and obtain the performance weight of each large language model based on the comprehensive performance index of each large language model. Step S4 specifically involves: S41. The third loss value calculated during the training process of each large language model is used as the comprehensive performance index. S42. After normalizing the overall performance index of all large language models, the performance weights of each large language model are obtained. The loss function for each of the large language models is set according to the following formula: in, The loss function representing a large language model; R represents 2 value; This indicates the asymmetric mean square relative error; The A20 index is represented; MAPE represents the mean absolute percentage error. The basic penalty term is represented by k; the asymmetry factor is represented by c; and the smoothing value is represented by c. The indicator function is represented by ; i represents the index; n represents the total number of samples of the three predicted ride data or verification label data. Indicates the first Error per sample, ; This represents the value of the i-th sample in the verification label data; This represents the value of the i-th sample in the three predicted ride data sets; This represents the average value of all samples in the validation label data; S5. Based on passenger data, standardized multi-dimensional indicator data, various large language models and corresponding performance weights, obtain the analysis results and optimization suggestions for subway construction; Step S5 specifically involves: S51. The subway construction analysis results are obtained by inputting the passenger data, standardized multi-dimensional indicator data and preset prompt words into each of the finally trained large language models for processing. The subway construction analysis results obtained from each large language model are weighted and fused according to their corresponding performance weights to obtain the final analysis result. S52. Input the final analysis results and preset prompts into each of the finally trained large language models to obtain the corresponding optimization suggestions for subway construction. Integrate all the optimization suggestions to obtain the final optimization suggestions.
2. The method for analyzing the characteristics of subway passenger flow built environment based on ensemble learning of large language models according to claim 1, characterized in that, Step S1 specifically involves: S11. Collect and obtain all weekday peak-hour travel data from the automatic fare collection system and passenger smart cards of the city's subway, divide the travel data into a first time period and a second time period according to a preset ratio, and use the first time period travel data as input data and the second time period travel data as tag data. The weekday peak-hour travel data includes morning peak boarding data, morning peak alighting data, evening peak boarding data, and evening peak alighting data. S12. Divide the label data into a first time period label data and a second time period label data in a preset ratio according to the time sequence, and use the first time period label data as the verification input data and the second time period label data as the verification label data.
3. The method for analyzing the characteristics of subway passenger flow built environment based on ensemble learning of large language models according to claim 1, characterized in that, Step S2 specifically involves: S21. Collect multi-source built environment data, including building data, road network data, and socio-economic data, within the walking-accessible area, centered on each subway station; S22. Clean the building data, road network data and socio-economic data in the multi-source built environment data respectively. Then, reclassify the cleaned building data. The cleaned road network data, cleaned socio-economic data and reclassified building data are summarized to obtain new multi-source built environment data. S23. Construct multi-dimensional indicator data based on new multi-source built environment data, including density dimension, diversity dimension, design dimension, destination accessibility dimension, and site characteristic dimension; S24. Standardize the multi-dimensional indicator data to obtain standardized multi-dimensional indicator data.
4. The method for analyzing the characteristics of subway passenger flow built environment based on ensemble learning of large language models according to claim 3, characterized in that: The density dimension includes population density, building density, bus route density, and bus stop density; the diversity dimension includes land use mixed entropy; the design dimension includes road network density and number of intersections; the destination accessibility dimension includes the distance from each subway station to the central business district; and the station characteristic dimension includes the distance from the station to the central business district, whether each subway station is a terminal station, and whether each subway station is a transfer station.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.